diff --git a/ckeditor/CHANGES.md b/ckeditor/CHANGES.md index 1e7b8e8d89..24258bb65c 100644 --- a/ckeditor/CHANGES.md +++ b/ckeditor/CHANGES.md @@ -1,11 +1,76 @@ CKEditor 4 Changelog ==================== +## CKEditor 4.18.0 + +**Security Updates:** + +* Fixed an XSS vulnerability in the core module reported by GitHub Security Lab team member [Kevin Backhouse](https://github.com/kevinbackhouse). + + Issue summary: The vulnerability allowed to inject malformed HTML bypassing content sanitization, which could result in executing a JavaScript code. See [CVE-2022-24728](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-4fc4-4p5g-6w89) for more details. + +* Fixed a Regular expression Denial of Service (ReDoS) vulnerability in dialog plugin discovered by the CKEditor 4 team during our regular security audit. + + Issue summary: The vulnerability allowed to abuse a dialog input validator regular expression, which could cause a significant performance drop resulting in a browser tab freeze. See [CVE-2022-24729](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-f6rf-9m92-x2hh) for more details. + +You can read more details in the relevant security advisory and [contact us](security@cksource.com) if you have more questions. + +**An upgrade is highly recommended!** + +**Highlights:** + +[Web Spell Checker](https://webspellchecker.com/) ended support for WebSpellChecker Dialog on December 31st, 2021. This means the plugin is not supported any longer. Therefore, we decided to deprecate and remove the WebSpellChecker Dialog plugin from CKEditor 4 presets. + +We strongly encourage everyone to choose one of the other available spellchecking solutions - [Spell Check As You Type (SCAYT)](https://ckeditor.com/cke4/addon/scayt) or [WProofreader](https://ckeditor.com/cke4/addon/wproofreader). + +Fixed issues: + +* [#5097](https://github.com/ckeditor/ckeditor4/issues/5097): [Chrome] Fixed: Incorrect conversion of points to pixels while using [`CKEDITOR.tools.convertToPx()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-convertToPx). +* [#5044](https://github.com/ckeditor/ckeditor4/issues/5044): Fixed: `select` elements with `multiple` attribute had incorrect styling. Thanks to [John R. D'Orazio](https://github.com/JohnRDOrazio)! + +Other changes: + +* [#5093](https://github.com/ckeditor/ckeditor4/issues/5093): Deprecated and removed WebSpellChecker Dialog from presets. +* [#5127](https://github.com/ckeditor/ckeditor4/issues/5127): Deprecated the [`CKEDITOR.rnd`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-rnd) property to discourage using it in a security-sensitive context. +* [#5087](https://github.com/ckeditor/ckeditor4/issues/5087): Improved the jQuery adapter by replacing a deprecated jQuery API with existing counterparts. Thanks to [Fran Boon](https://github.com/flavour)! +* [#5128](https://github.com/ckeditor/ckeditor4/issues/5128): Improved the [Emoji](https://ckeditor.com/cke4/addon/emoji) definitions encoding set by the [`config.emoji_emojiListUrl`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-emoji_emojiListUrl) configuration option. + +## CKEditor 4.17.2 + +Fixed issues: + +* [#4934](https://github.com/ckeditor/ckeditor4/issues/4934): Fixed: Active focus in dialog tabs is not visible in the High Contrast mode. +* [#547](https://github.com/ckeditor/ckeditor4/issues/547): Fixed: Dragging and dropping elements like images within a table is no longer available. +* [#4875](https://github.com/ckeditor/ckeditor4/issues/4875): Fixed: It is not possible to delete multiple selected lists. +* [#4873](https://github.com/ckeditor/ckeditor4/issues/4873): Fixed: Pasting content from MS Word and Outlook with horizontal lines prevents images from being uploaded. +* [#4952](https://github.com/ckeditor/ckeditor4/issues/4952): Fixed: Dragging and dropping images within a table cell appends additional elements. +* [#4761](https://github.com/ckeditor/ckeditor4/issues/4761): Fixed: Some CSS files are missing unique timestamp used to prevent browser to cache static resources between editor releases. +* [#4987](https://github.com/ckeditor/ckeditor4/issues/4987): Fixed: [Find/Replace](https://ckeditor.com/cke4/addon/find) is not recognizing more than one space character. +* [#5061](https://github.com/ckeditor/ckeditor4/issues/5061): Fixed: [Find/Replace](https://ckeditor.com/cke4/addon/find) plugin incorrectly handles multiple whitespace during replacing text. +* [#5004](https://github.com/ckeditor/ckeditor4/issues/5004): Fixed: `MutationObserver` used in [IFrame Editing Area](https://ckeditor.com/cke4/addon/wysiwygarea) plugin causes memory leaks. +* [#4994](https://github.com/ckeditor/ckeditor4/issues/4994): Fixed: [Easy Image](https://ckeditor.com/cke4/addon/easyimage) plugin caused content pasted from Word to turn into an image. + +API changes: + +* [#4918](https://github.com/ckeditor/ckeditor4/issues/4918): Explicitly set the [`config.useComputedState`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-useComputedState) default value to `true`. Thanks to [Shabab Karim](https://github.com/shabab477)! +* [#4761](https://github.com/ckeditor/ckeditor4/issues/4761): The [`CKEDITOR.appendTimestamp()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-appendTimestamp) function was added. +* [#4761](https://github.com/ckeditor/ckeditor4/issues/4761): [`CKEDITOR.dom.document#appendStyleSheet()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_document.html#method-appendStyleSheet) and [`CKEDITOR.tools.buildStyleHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-buildStyleHtml) now use the newly added [`CKEDITOR.appendTimestamp()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-appendTimestamp) function to correctly handle caching of CSS files. + +Other changes: + +* [#5014](https://github.com/ckeditor/ckeditor4/issues/5014): Fixed: Toolbar configurator fails when plugin does not define a toolbar group. Thanks to [SuperPat](https://github.com/SuperPat45)! + ## CKEditor 4.17.1 +**Highlights:** + +Due to a regression in CKEeditor 4.17.0 version that was only revealed after the release and affected a limited area of operation, CSS assets loaded via relative links started to point into invalid location when loaded from external resources. + +We have therefore decided to immediately release CKEditor 4.17.1 that fixed this problem. If you have already upgraded to v4.17.0, make sure to upgrade to v4.17.1 to avoid this regression. + Fixed issues: -* [#4979](https://github.com/ckeditor/ckeditor4/issues/3757): Added cache key in [#4761](https://github.com/ckeditor/ckeditor4/issues/4761) started to breaking relative links for external CSS resources. The fix had been reverted and will be corrected in the upcoming release. +* [#4979](https://github.com/ckeditor/ckeditor4/issues/3757): Fixed: Added cache key in [#4761](https://github.com/ckeditor/ckeditor4/issues/4761) started to breaking relative links for external CSS resources. The fix has been reverted and will be corrected in the next editor version. ## CKEditor 4.17 @@ -13,11 +78,11 @@ Fixed issues: * Fixed XSS vulnerability in the core module reported by [William Bowling](https://github.com/wbowling). - Issue summary: The vulnerability allowed to inject malformed comments HTML bypassing content sanitization, which could result in executing JavaScript code. See [security advisory](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-7h26-63m7-qhf2) for more details. + Issue summary: The vulnerability allowed to inject malformed comments HTML bypassing content sanitization, which could result in executing JavaScript code. See [CVE-2021-41165](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-7h26-63m7-qhf2) for more details. * Fixed XSS vulnerability in the core module reported by [Maurice Dauer](https://twitter.com/laytonctf). - Issue summary: The vulnerability allowed to inject malformed HTML bypassing content sanitization, which could result in executing JavaScript code. See [security advisory](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-pvmx-g8h5-cprj) for more details. + Issue summary: The vulnerability allowed to inject malformed HTML bypassing content sanitization, which could result in executing JavaScript code. See [CVE-2021-41164](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-pvmx-g8h5-cprj) for more details. You can read more details in the relevant security advisory and [contact us](security@cksource.com) if you have more questions. @@ -79,15 +144,15 @@ Other Changes: * Fixed XSS vulnerability in the [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin reported by [Anton Subbotin](https://github.com/skavans). - Issue summary: The vulnerability allowed to abuse paste functionality using malformed HTML, which could result in injecting arbitrary HTML into the editor. See [security advisory](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-7889-rm5j-hpgg) for more details. + Issue summary: The vulnerability allowed to abuse paste functionality using malformed HTML, which could result in injecting arbitrary HTML into the editor. See [CVE-2021-32809](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-7889-rm5j-hpgg) for more details. * Fixed XSS vulnerability in the [Widget](https://ckeditor.com/cke4/addon/widget) plugin reported by [Anton Subbotin](https://github.com/skavans). - Issue summary: The vulnerability allowed to abuse undo functionality using malformed [Widget](https://ckeditor.com/cke4/addon/widget) HTML, which could result in executing JavaScript code. See [security advisory](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-6226-h7ff-ch6c) for more details. + Issue summary: The vulnerability allowed to abuse undo functionality using malformed [Widget](https://ckeditor.com/cke4/addon/widget) HTML, which could result in executing JavaScript code. See [CVE-2021-32808](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-6226-h7ff-ch6c) for more details. * Fixed XSS vulnerability in the [Fake Objects](https://ckeditor.com/cke4/addon/fakeobjects) plugin reported by [Mika Kulmala](https://github.com/kulmik). - Issue summary: The vulnerability allowed to inject malformed [Fake Objects](https://ckeditor.com/cke4/addon/fakeobjects) HTML, which could result in executing JavaScript code. See [security advisory](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-m94c-37g6-cjhc) for more details. + Issue summary: The vulnerability allowed to inject malformed [Fake Objects](https://ckeditor.com/cke4/addon/fakeobjects) HTML, which could result in executing JavaScript code. See [CVE-2021-37695](https://github.com/ckeditor/ckeditor4/security/advisories/GHSA-m94c-37g6-cjhc) for more details. You can read more details in the relevant security advisory and [contact us](security@cksource.com) if you have more questions. @@ -117,7 +182,7 @@ Fixed Issues: * [#4351](https://github.com/ckeditor/ckeditor4/issues/4351): Fixed: Incorrect values for RGBA/HSLA colors in [Color Dialog](https://ckeditor.com/cke4/addon/colordialog). * [#4509](https://github.com/ckeditor/ckeditor4/issues/4509): Fixed: Incorrect handling of drag & drop inside [widgets](https://ckeditor.com/cke4/addon/widget) and nested editables. * [#4611](https://github.com/ckeditor/ckeditor4/issues/4611): [Android, iOS] Fixed: Incorrect hover styles for buttons in the toolbar on mobile devices. -* [#4652](https://github.com/ckeditor/ckeditor4/issues/4652): Fixed: [Event data](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_eventInfo.html) set to `false` is treated as an event cancelation. +* [#4652](https://github.com/ckeditor/ckeditor4/issues/4652): Fixed: [Event data](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_eventInfo.html) set to `false` is treated as an event cancellation. * [#4659](https://github.com/ckeditor/ckeditor4/issues/4659): Fixed: [`CKEDITOR.htmlParser`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_htmlParser.html) does not treat `--!>` as a comment end tag correctly. ## CKEditor 4.16 @@ -1616,7 +1681,7 @@ Other Changes: New Features: -* [#11297](https://dev.ckeditor.com/ticket/11297): Styles can now be applied to widgets. The definition of a style which can be applied to a specific widget must contain two additional properties — `type` and `widget`. Read more in the [Widget Styles](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#widget-styles) section of the "Syles Drop-down" guide. Note that by default, widgets support only classes and no other attributes or styles. Related changes and features: +* [#11297](https://dev.ckeditor.com/ticket/11297): Styles can now be applied to widgets. The definition of a style which can be applied to a specific widget must contain two additional properties — `type` and `widget`. Read more in the [Widget Styles](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#widget-styles) section of the "Styles Drop-down" guide. Note that by default, widgets support only classes and no other attributes or styles. Related changes and features: * Introduced the [`CKEDITOR.style.addCustomHandler()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#static-method-addCustomHandler) method for registering custom style handlers. * The [`CKEDITOR.style.apply()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-apply) and [`CKEDITOR.style.remove()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-remove) methods are now called with an editor instance instead of the document so they can be reused by the [`CKEDITOR.editor.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-applyStyle) and [`CKEDITOR.editor.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-removeStyle) methods. Backward compatibility was preserved, but from CKEditor 4.4 it is highly recommended to pass an editor instead of a document to these methods. * Many new methods and properties were introduced in the [Widget API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html) to make the handling of styles by widgets fully customizable. See: [`widget.definition.styleableElements`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-styleableElements), [`widget.definition.styleToAllowedContentRule`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-styleToAllowedContentRules), [`widget.addClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-addClass), [`widget.removeClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-removeClass), [`widget.getClasses()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-getClasses), [`widget.hasClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-hasClass), [`widget.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-applyStyle), [`widget.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-removeStyle), [`widget.checkStyleActive()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-checkStyleActive). diff --git a/ckeditor/LICENSE.md b/ckeditor/LICENSE.md index 258da81949..7efd4ef509 100644 --- a/ckeditor/LICENSE.md +++ b/ckeditor/LICENSE.md @@ -2,7 +2,7 @@ Software License Agreement ========================== CKEditor - The text editor for Internet - https://ckeditor.com/ -Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. Licensed under the terms of any of the following licenses at your choice: @@ -37,7 +37,7 @@ done by developers outside of CKSource with their express permission. The following libraries are included in CKEditor under the MIT license (see Appendix D): -* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2021, CKSource - Frederico Knabben. +* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2022, CKSource Holding sp. z o.o. * PicoModal (included in `samples/js/sf.js`) - Copyright (c) 2012 James Frasca. * CodeMirror (included in the samples) - Copyright (C) 2014 by Marijn Haverbeke and others. * ES6Promise - Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors. @@ -60,7 +60,7 @@ The following libraries are included in CKEditor under the BSD-3 License (see Ap Trademarks ---------- -CKEditor is a trademark of CKSource - Frederico Knabben. All other brand +CKEditor is a trademark of CKSource Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. diff --git a/ckeditor/adapters/jquery.js b/ckeditor/adapters/jquery.js index 0f6e64fbe3..0defc72049 100644 --- a/ckeditor/adapters/jquery.js +++ b/ckeditor/adapters/jquery.js @@ -1,10 +1,10 @@ /* - Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. + Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ (function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a}, -ckeditor:function(g,e){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g)){var m=e;e=g;g=m}var k=[];e=e||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function d(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(d,100)},0)},null,null,9999); -else{if(e.autoUpdateElement||"undefined"==typeof e.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)e.autoUpdateElementJquery=!0;e.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,e):CKEDITOR.inline(h,e);b.data("ckeditorInstance",c);c.on("instanceReady",function(e){var d=e.editor;setTimeout(function n(){if(d.element){e.removeListener();d.on("dataReady",function(){b.trigger("dataReady.ckeditor",[d])});d.on("setData",function(a){b.trigger("setData.ckeditor", -[d,a.data])});d.on("getData",function(a){b.trigger("getData.ckeditor",[d,a.data])},999);d.on("destroy",function(){b.trigger("destroy.ckeditor",[d])});d.on("save",function(){a(h.form).submit();return!1},null,null,20);if(d.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){d.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize", +ckeditor:function(g,e){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if("function"!==typeof g){var m=e;e=g;g=m}var k=[];e=e||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function d(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(d,100)},0)},null,null, +9999);else{if(e.autoUpdateElement||"undefined"==typeof e.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)e.autoUpdateElementJquery=!0;e.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,e):CKEDITOR.inline(h,e);b.data("ckeditorInstance",c);c.on("instanceReady",function(e){var d=e.editor;setTimeout(function n(){if(d.element){e.removeListener();d.on("dataReady",function(){b.trigger("dataReady.ckeditor",[d])});d.on("setData",function(a){b.trigger("setData.ckeditor", +[d,a.data])});d.on("getData",function(a){b.trigger("getData.ckeditor",[d,a.data])},999);d.on("destroy",function(){b.trigger("destroy.ckeditor",[d])});d.on("save",function(){a(h.form).trigger("submit");return!1},null,null,20);if(d.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){d.updateElement()})};a(h.form).on("submit",c);a(h.form).on("form-pre-serialize",c);b.on("destroy.ckeditor",function(){a(h.form).off("submit",c);a(h.form).off("form-pre-serialize", c)})}d.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[d]);g&&g.apply(d,[h]);l.resolve()}else setTimeout(n,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,k).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(e){if(arguments.length){var m= this,k=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(e,function(){f.resolve()});k.push(f.promise());return!0}return g.call(b,e)});if(k.length){var b=new a.Deferred;a.when.apply(this,k).done(function(){b.resolveWith(m)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery); \ No newline at end of file diff --git a/ckeditor/ckeditor.js b/ckeditor/ckeditor.js index 5599e3a303..613d497ba2 100644 --- a/ckeditor/ckeditor.js +++ b/ckeditor/ckeditor.js @@ -1,1230 +1,1235 @@ /* -Copyright (c) 2003-2022, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/ */ -(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"M1EK",version:"4.17.1 DEV",revision:"f793f2bc2c",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:e},status:"unloaded",basePath:function(){var d=window.CKEDITOR_BASEPATH||"";if(!d)for(var a=document.getElementsByTagName("script"),f=0;fw.getListenerIndex(a)){w=w.listeners;f||(f=this); -isNaN(b)&&(b=10);c.fn=a;c.priority=b;for(var x=w.length-1;0<=x;x--)if(w[x].priority<=b)return w.splice(x+1,0,c),{removeListener:g};w.unshift(c)}return{removeListener:g}},once:function(){var a=Array.prototype.slice.call(arguments),e=a[1];a[1]=function(a){a.removeListener();return e.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,k=function(){a=1},l=0, -m=function(){l=1};return function(b,c,g){var n=f(this)[b];b=a;var w=l;a=l=0;if(n){var x=n.listeners;if(x.length)for(var x=x.slice(0),h,r=0;rdocument.documentMode), -mobile:-1a||f.quirks);f.gecko&&(h=e.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),a=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));f.air&&(a=parseFloat(e.match(/ adobeair\/(\d+)/)[1]));f.webkit&&(a=parseFloat(e.match(/ applewebkit\/(\d+)/)[1]));f.version=a;f.isCompatible=!(f.ie&&7>a)&&!(f.gecko&&4E4>a)&&!(f.webkit&&534>a);f.hidpi=2<=window.devicePixelRatio;f.needsBrFiller=f.gecko||f.webkit||f.ie&&10a;f.cssClass="cke_browser_"+(f.ie?"ie":f.gecko?"gecko":f.webkit?"webkit": -"unknown");f.quirks&&(f.cssClass+=" cke_browser_quirks");f.ie&&(f.cssClass+=" cke_browser_ie"+(f.quirks?"6 cke_browser_iequirks":f.version));f.air&&(f.cssClass+=" cke_browser_air");f.iOS&&(f.cssClass+=" cke_browser_ios");f.hidpi&&(f.cssClass+=" cke_hidpi");return f}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var e=document.createElement("script"); -e.type="text/javascript";e.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(e)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)};(function(){CKEDITOR.domReady(function(){var e=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();CKEDITOR.status="basic_loaded"}(),"use strict", -CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(e,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:e,additionalData:h})},CKEDITOR.error=function(e,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:e,additionalData:h})},CKEDITOR.on("log",function(e){if(window.console&&window.console.log){var h=console[e.data.type]?e.data.type: -"log",f=e.data.errorCode;if(e=e.data.additionalData)console[h]("[CKEDITOR] Error code: "+f+".",e);else console[h]("[CKEDITOR] Error code: "+f+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+f)}},null,null,999),CKEDITOR.dom={},function(){function e(n,g,b){this._minInterval=n;this._context=b;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(g,b||{});var a=this;this.input=function(){function g(){a._lastOutput= -(new Date).getTime();a._scheduledTimer=0;a._call()}if(!a._scheduledTimer||!1!==a._reschedule()){var n=(new Date).getTime()-a._lastOutput;n/g,l=/|\s) /g,function(g,b){return b+"\x26nbsp;"}).replace(/ (?=<)/g, -"\x26nbsp;")},getNextNumber:function(){var g=0;return function(){return++g}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var g="e",b=0;8>b;b++)g+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return g},override:function(g,b){var a=b(g);a.prototype=g.prototype;return a},setTimeout:function(g,b,a,c,d){d||(d=window);a||(a=d);return d.setTimeout(function(){c?g.apply(a,[].concat(c)):g.apply(a)},b||0)},throttle:function(g,b,a){return new this.buffers.throttle(g, -b,a)},trim:function(){var g=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(g,"")}}(),ltrim:function(){var g=/^[ \t\n\r]+/g;return function(b){return b.replace(g,"")}}(),rtrim:function(){var g=/[ \t\n\r]+$/g;return function(b){return b.replace(g,"")}}(),indexOf:function(g,b){if("function"==typeof b)for(var a=0,c=g.length;aparseFloat(b);a&&(b=b.replace("-",""));g.setStyle("width",b);b=g.$.clientWidth;return a?-b:b}return b}}(),repeat:function(g,b){return Array(b+1).join(g)}, -tryThese:function(){for(var g,b=0,a=arguments.length;bb;b++)g[b]=("0"+parseInt(g[b],10).toString(16)).slice(-2);return"#"+g.join("")})},normalizeHex:function(g){return g.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(g,b,a,c){g=b.toLowerCase();3==g.length&&(g=g.split(""),g=[g[0],g[0],g[1],g[1],g[2],g[2]].join(""));return"#"+g+c})},_isValidColorFormat:function(g){if(!g)return!1;g=g.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(g)},parseCssText:function(g,b,a){var c={};a&&(g=(new CKEDITOR.dom.element("span")).setAttribute("style", -g).getAttribute("style")||"");g&&(g=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(g)));if(!g||";"==g)return c;g.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(g,a,n){b&&(a=a.toLowerCase(),"font-family"==a&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));c[a]=n});return c},writeCssText:function(g,b){var a,c=[];for(a in g)c.push(a+":"+g[a]);b&&c.sort();return c.join("; ")},objectCompare:function(g,b,a){var c;if(!g&&!b)return!0;if(!g||!b)return!1; -for(c in g)if(g[c]!=b[c])return!1;if(!a)for(c in b)if(g[c]!=b[c])return!1;return!0},objectKeys:function(g){return CKEDITOR.tools.object.keys(g)},convertArrayToObject:function(g,b){var a={};1==arguments.length&&(b=!0);for(var c=0,d=g.length;ca;a++)g.push(Math.floor(256*Math.random()));for(a=0;a=c||0==a&&48<=c&&57>=c||1==a&&48<=c&&57>=c&&45==e?d+("\\"+c.toString(16)+" "):0==a&&1==b&&45==c?d+("\\"+g.charAt(a)):128<=c||45==c||95==c||48<=c&&57>=c||65<=c&&90>=c||97<=c&&122>=c?d+g.charAt(a):d+("\\"+g.charAt(a));g=d}else g="";return g}, -getMouseButton:function(g){return(g=g&&g.data?g.data.$:g)?CKEDITOR.tools.normalizeMouseButton(g.button):!1},normalizeMouseButton:function(g,b){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return g;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],c=0;ce)for(f=e;3>f;f++)d[f]=0;m[0]=(d[0]&252)>>2;m[1]=(d[0]&3)<<4|d[1]>>4;m[2]=(d[1]&15)<<2|(d[2]&192)>>6;m[3]=d[2]&63;for(f=0;4>f;f++)b=f<=e?b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m[f]):b+"\x3d"}return b},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/, -_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(g){var b={},a=this._findColor(g);a.length&&(b.color=a[0],CKEDITOR.tools.array.forEach(a,function(b){g=g.replace(b,"")}));if(g=CKEDITOR.tools.trim(g))b.unprocessed=g;return b},margin:function(g){return CKEDITOR.tools.style.parse.sideShorthand(g,function(g){return g.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)|| -["0px"]})},sideShorthand:function(g,b){function a(g){c.top=d[g[0]];c.right=d[g[1]];c.bottom=d[g[2]];c.left=d[g[3]]}var c={},d=b?b(g):g.split(/\s+/);switch(d.length){case 1:a([0,0,0,0]);break;case 2:a([0,1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return c},border:function(g){return CKEDITOR.tools.style.border.fromCssRule(g)},_findColor:function(g){var b=[],a=CKEDITOR.tools.array,b=b.concat(g.match(this._rgbaRegExp)||[]),b=b.concat(g.match(this._hslaRegExp)||[]);return b=b.concat(a.filter(g.split(/\s+/), -function(g){return g.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:g.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(g,b,a){var c=[];this.forEach(g,function(d,e){b.call(a,d,e,g)&&c.push(d)});return c},find:function(g,b,a){for(var c=g.length,d=0;dCKEDITOR.env.version&&(!g||"object"!==typeof g)){b=[];if("string"===typeof g)for(a=0;aCKEDITOR.env.version)for(d=0;dCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&a(d);return d},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(e){e.$.parentNode.insertBefore(this.$,e.$.nextSibling);return e},insertBefore:function(e){e.$.parentNode.insertBefore(this.$, -e.$);return e},insertBeforeMe:function(e){this.$.parentNode.insertBefore(e.$,this.$);return e},getAddress:function(e){for(var h=[],f=this.getDocument().$.documentElement,a=this;a&&a!=f;){var d=a.getParent();d&&h.unshift(this.getIndex.call(a,e));a=d}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(e){function h(a,d){var e=d?a.getNext():a.getPrevious();return e&&e.type==CKEDITOR.NODE_TEXT?e.isEmpty()?h(e,d):e: -null}var f=this,a=-1,d;if(!this.getParent()||e&&f.type==CKEDITOR.NODE_TEXT&&f.isEmpty()&&!h(f)&&!h(f,!0))return-1;do if(!e||f.equals(this)||f.type!=CKEDITOR.NODE_TEXT||!d&&!f.isEmpty())a++,d=f.type==CKEDITOR.NODE_TEXT;while(f=f.getPrevious());return a},getNextSourceNode:function(e,h,f){if(f&&!f.call){var a=f;f=function(d){return!d.equals(a)}}e=!e&&this.getFirst&&this.getFirst();var d;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;e=this.getNext()}for(;!e&&(d=(d||this).getParent());){if(f&& -!1===f(d,!0))return null;e=d.getNext()}return!e||f&&!1===f(e)?null:h&&h!=e.type?e.getNextSourceNode(!1,h,f):e},getPreviousSourceNode:function(e,h,f){if(f&&!f.call){var a=f;f=function(d){return!d.equals(a)}}e=!e&&this.getLast&&this.getLast();var d;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;e=this.getPrevious()}for(;!e&&(d=(d||this).getParent());){if(f&&!1===f(d,!0))return null;e=d.getPrevious()}return!e||f&&!1===f(e)?null:h&&e.type!=h?e.getPreviousSourceNode(!1,h,f): -e},getPrevious:function(e){var h=this.$,f;do f=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(f&&e&&!e(f));return f},getNext:function(e){var h=this.$,f;do f=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(f&&e&&!e(f));return f},getParent:function(e){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||e&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(e){var h=this,f=[];do f[e?"push":"unshift"](h);while(h=h.getParent()); -return f},getCommonAncestor:function(e){if(e.equals(this))return this;if(e.contains&&e.contains(this))return e;var h=this.contains?this:this.getParent();do if(h.contains(e))return h;while(h=h.getParent());return null},getPosition:function(e){var h=this.$,f=e.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(f);if(h==f)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&e.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(f))return CKEDITOR.POSITION_CONTAINS+ -CKEDITOR.POSITION_PRECEDING;if(f.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>f.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex=document.documentMode||!h||(e=h+":"+e);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e=e?new CKEDITOR.dom.element(e):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(e){this.$.open("text/html","replace");CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(e);this.$.close()},find:function(e){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e))},findOne:function(e){return(e=this.$.querySelector(e))?new CKEDITOR.dom.element(e):null},_getHtml5ShivFrag:function(){var e=this.getCustomData("html5ShivFrag");e|| -(e=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(e,!0),this.setCustomData("html5ShivFrag",e));return e}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return 0>e||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(e){return new CKEDITOR.dom.node(e)})}},CKEDITOR.dom.element=function(e,h){"string"==typeof e&& -(e=(h?h.$:document).createElement(e));CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,h){var f=new CKEDITOR.dom.element("div",h);f.setHtml(e);return f.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,h,f,a){var d=h.getCustomData("list_marker_id")|| -h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),k=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");e[d]=h;k[f]=1;return h.setCustomData(f,a)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var h in e)CKEDITOR.dom.element.clearMarkers(e,e[h],1)},CKEDITOR.dom.element.clearMarkers=function(e,h,f){var a=h.getCustomData("list_marker_names"),d=h.getCustomData("list_marker_id"),k;for(k in a)h.removeCustomData(k); -h.removeCustomData("list_marker_names");f&&(h.removeCustomData("list_marker_id"),delete e[d])},function(){function e(a,b){return-1<(" "+a+" ").replace(k," ").indexOf(" "+b+" ")}function h(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function f(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function a(a){for(var b=0,c=0,g=l[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 g=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=g.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);c.insertAfter(this);c.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)& -16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0)); -return a.innerHTML},getClientRect:function(a){var b=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),b):b},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(g){this.$.innerHTML=""; -b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){switch(b){case "class":b= -"className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":return b=this.$.getAttribute(b,2),0!==b&&0===this.$.tabIndex&&(b=null),b;case "checked":return b=this.$.attributes.getNamedItem(b),(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"): -null}return this.$.getAttribute(b,2)}:a}(),getAttributes:function(a){var b={},c=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a)); -return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;bCKEDITOR.env.version&&this.is("a")){var 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 g;if(b)for(;g=c.lastChild;)a.insertBefore(c.removeChild(g),a.firstChild);else for(;g=c.firstChild;)a.appendChild(c.removeChild(g))}},mergeSiblings:function(){function a(b,c,g){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=g?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var e=g?b.getLast():b.getFirst();d.length;)d.shift().move(b,!g);c.moveChildren(b,!g);c.remove(); -e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,c){this.$.setAttribute(a,c);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(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)}; -return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,g=b.count();cf||0f?f:d);c&&(0>e||0e?e:g,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 g=0;gCKEDITOR.env.version){var d=g.ownerDocument.createEventObject(),e;for(e in b)d[e]=b[e];g.fireEvent(c,d)}else g[g[a]?a:c](b)},isDetached:function(){var a=this.getDocument(),b=a.getDocumentElement();return b.equals(this)||b.contains(this)?!CKEDITOR.env.ie||8=B.getChildCount()?(B=B.getChild(C-1),F=!0):B=B.getChild(C):L=F=!0;q.type==CKEDITOR.NODE_TEXT?v?D=!0:q.split(A):0 -ca)for(;X;)X=f(X,O,!0);O=Y}v||l()}}function f(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||b(e)?!0:d(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(k)?!1:!0}}function a(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&l(d)||d.type==CKEDITOR.NODE_ELEMENT&& -d.is(CKEDITOR.dtd.$removeEmpty)}}function d(a){return function(){var d;return this[a?"getPreviousNode":"getNextNode"](function(a){!d&&c(a)&&(d=a);return b(a)&&!(l(a)&&a.equals(d))})}}var k={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(),m=/^[\t\r\n ]*(?: |\xa0)$/,b=CKEDITOR.dom.walker.editable(),c=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype= -{clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document); -this.collapsed||h(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,c,a,"undefined"==typeof b?!0:b);return c},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var g; -if(g=a.data&&a.data("cke-temp"))g=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return g},!0)}var c=this.startContainer,d=this.endContainer,e=this.collapsed,f,k,l,h;f=this.document.createElement("span");f.data("cke-bookmark",1);f.setStyle("display","none");f.setHtml("\x26nbsp;");a&&(l="cke_bm_"+CKEDITOR.tools.getNextNumber(),f.setAttribute("id",l+(e?"C":"S")));e||(k=f.clone(),k.setHtml("\x26nbsp;"),a&&k.setAttribute("id",l+"E"),h=this.clone(),b(d)&&(d=b(d), -h.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),h.collapse(),h.insertNode(k));h=this.clone();b(c)&&(d=b(c),h.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START));h.collapse(!0);h.insertNode(f);k?(this.setStartAfter(f),this.setEndBefore(k)):this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);return{startNode:a?l+(e?"C":"S"):f,endNode:a?l+"E":k,serializable:a,collapsed:e}},createBookmark2:function(){function a(g){var b=g.container,d=g.offset,e;e=b;var f=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===f||f==e.getChildCount()? -0:e.getChild(f-1).type==CKEDITOR.NODE_TEXT&&e.getChild(f).type==CKEDITOR.NODE_TEXT;e&&(b=b.getChild(d-1),d=b.getLength());if(b.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,e={container:this.startContainer,offset:this.startOffset},f={container:this.endContainer,offset:this.endOffset};c&&(a(e),b(e,this.root), -d||(a(f),b(f,this.root)));return{start:e.container.getAddress(c),end:d?null:f.container.getAddress(c),startOffset:e.offset,endOffset:f.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,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>c)a=a.getChild(c);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>d)b=b.getChild(d).getPreviousSourceNode(!0); -else if(1>e)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,e=this.collapsed;if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var f=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!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 e=1;case CKEDITOR.ENLARGE_ELEMENT:var f=function(a,b){var g=new CKEDITOR.dom.range(l);g.setStart(a,b);g.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);var g=new CKEDITOR.dom.walker(g),c;for(g.guard= -function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};c=g.next();){if(c.type!=CKEDITOR.NODE_TEXT)return!1;E=c!=a?c.getText():c.substring(b);if(d.test(E))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),l=this.root,h,m,v,q,B,A=!1,C,E;C=this.startContainer;var F=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(F&&(C=!CKEDITOR.tools.trim(C.substring(0,F)).length&&C,A=!!C),C&&((q=C.getPrevious())||(v=C.getParent()))):(F&&(q=C.getChild(F-1)||C.getLast()),q||(v=C)); -for(v=c(v);v||q;){if(v&&!q){!B&&v.equals(k)&&(B=!0);if(e?v.isBlockBoundary():!l.contains(v))break;A&&"inline"==v.getComputedStyle("display")||(A=!1,B?h=v:this.setStartBefore(v));q=v.getPrevious()}for(;q;)if(C=!1,q.type==CKEDITOR.NODE_COMMENT)q=q.getPrevious();else{if(q.type==CKEDITOR.NODE_TEXT)E=q.getText(),d.test(E)&&(q=null),C=/[\s\ufeff]$/.test(E);else if((q.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&q.is("br"))&&!q.data("cke-bookmark"))if(A&&CKEDITOR.dtd.$removeEmpty[q.getName()]){E=q.getText(); -if(d.test(E))q=null;else for(var F=q.$.getElementsByTagName("*"),H=0,L;L=F[H++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){q=null;break}q&&(C=!!E.length)}else q=null;C&&(A?B?h=v:v&&this.setStartBefore(v):A=!0);if(q){C=q.getPrevious();if(!v&&!C){v=q;q=null;break}q=C}else v=null}v&&(v=c(v.getParent()))}C=this.endContainer;F=this.endOffset;v=q=null;B=A=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(F)).length?A=!0:(A=!C.getLength(),F==C.getLength()?(q=C.getNext())||(v=C.getParent()): -f(C,F)&&(v=C.getParent())):(q=C.getChild(F))||(v=C);for(;v||q;){if(v&&!q){!B&&v.equals(k)&&(B=!0);if(e?v.isBlockBoundary():!l.contains(v))break;A&&"inline"==v.getComputedStyle("display")||(A=!1,B?m=v:v&&this.setEndAfter(v));q=v.getNext()}for(;q;){C=!1;if(q.type==CKEDITOR.NODE_TEXT)E=q.getText(),f(q,0)||(q=null),C=/^[\s\ufeff]/.test(E);else if(q.type==CKEDITOR.NODE_ELEMENT){if((0=k.getLength()?f.setStartAfter(k):(f.setStartBefore(k),c=0):f.setStartBefore(k));l&&l.type==CKEDITOR.NODE_TEXT&&(m?m>=l.getLength()?f.setEndAfter(l):(f.setEndAfter(l),v=0):f.setEndBefore(l));var f=new CKEDITOR.dom.walker(f),q=CKEDITOR.dom.walker.bookmark(),B=CKEDITOR.dom.walker.bogus();f.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var A;f.guard=function(b,c){if(e&&B(b)||q(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&& -b.type==CKEDITOR.NODE_TEXT||c&&b.equals(A)||!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||(A=b);return!0};c&&(k=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);v&&(f.reset(),(f=f[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)); -return!(!c&&!v)}},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(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=b;this.endContainer||(this._setEndContainer(a),this.endOffset=b);e(this)},setEnd:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=b;this.startContainer||(this._setStartContainer(a), -this.startOffset=b);e(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a, -a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}e(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}e(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 e=d.getBogus();e&&e.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),e=c.block,f=d.block,k=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!= -a&&(e||(e=this.fixBlock(!0,a),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=f&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(f)&&(d?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END),f=null):c?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(f=this.splitElement(e,b|| -!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:f,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:k}},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(g){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()|| -g.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"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(a(e));)f=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=f;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(b,c){var d=c==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](b,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=a(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var b=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.ltrim(b.substring(0,c)),m.test(b)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer, -this.root);b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=f();return a.checkBackward()},checkEndOfBlock:function(a){var b=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.rtrim(b.substring(c)),m.test(b)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END); -a=new CKEDITOR.dom.walker(b);a.evaluator=f();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,g){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(g)||b.equals(g)))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 d=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&m.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);d=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),d=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); -else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,f=d,k=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(k=e[b?"getLast":"getFirst"](c));f||k||(k=e[b?"getPrevious":"getNext"](c));a=k}return!!d},moveToClosestEditablePosition:function(a,b){var c,d=0,e,f,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,k[b?0:1])):c=this.clone();if(a&& -!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(f=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&f&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,k[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:d(),getPreviousEditableNode:d(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),c=this.getTouchedEndNode(),d=b.getAscendant("table",!0),c=c.getAscendant("table",!0);return d&&!this.root.contains(d)? -null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&c&&(d.equals(c)||d.contains(c)||c.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,e=this.clone();e.optimize();(d=e.startContainer.type==CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();d&&(e.startContainer.setText(c), -b.remove());a.remove()},getClientRects:function(){function a(b,c){var g=CKEDITOR.tools.array.map(b,function(a){return a}),d=new CKEDITOR.dom.range(c.root),e,f,k;c.startContainer instanceof CKEDITOR.dom.element&&(f=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(k=(k=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));f&&d.setStart(c.startContainer.getParent(), -c.startContainer.getIndex());k&&d.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(f||k)c=d;d=c.cloneContents().find("[data-cke-widget-id]").toArray();if(d=CKEDITOR.tools.array.map(d,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return d=CKEDITOR.tools.array.map(d,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;e=this.root.getDocument().$.createRange();e.setStart(b.getParent().$,b.getIndex()); -e.setEnd(b.getParent().$,b.getIndex()+1);b=e.getClientRects();b.widgetRect=a.getClientRect();return b},c),CKEDITOR.tools.array.forEach(d,function(a){function b(d){CKEDITOR.tools.array.forEach(g,function(b,e){var f=CKEDITOR.tools.objectCompare(a[d],b);f||(f=CKEDITOR.tools.objectCompare(a.widgetRect,b));f&&(Array.prototype.splice.call(g,e,a.length-d,a.widgetRect),c=!0)});c||(darguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._|| -(this._={}))}function h(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function f(a,b,d,e){a:{null==e&&(e=h(d));for(var k;k=e.shift();)if(k.getDtd().p){e={element:k,remaining:e};break a}e=null}if(!e)return 0;if((k=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!k.check(b))return f(a,b,d,e.remaining);b=new CKEDITOR.dom.range(e.element);b.selectNodeContents(e.element);b=b.createIterator();b.enlargeBr= -a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=k;a._.nestedEditable={element:e.element,container:d,remaining:e.remaining,iterator:b};return 1}function a(a,b,d){if(!b)return!1;a=a.clone();a.collapse(!d);return a.checkBoundaryOfElement(b,d?CKEDITOR.START:CKEDITOR.END)}var d=/^[\r\n\t ]+$/,k=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),m=function(a){return k(a)&&l(a)},b={dd:1,dt:1,li:1};e.prototype={getNextParagraph:function(c){var g,e,l,h,t; -c=c||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(c))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(f(this,c,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(c);this._.nestedEditable=null}if(!this.range.root.getDtd()[c])return null;if(!this._.started){var r=this.range.clone(); -e=r.startPath();var u=r.endPath(),z=!r.collapsed&&a(r,e.block),p=!r.collapsed&&a(r,u.block,1);r.shrink(CKEDITOR.SHRINK_ELEMENT,!0);z&&r.setStartAt(e.block,CKEDITOR.POSITION_BEFORE_END);p&&r.setEndAt(u.block,CKEDITOR.POSITION_AFTER_START);e=r.endContainer.hasAscendant("pre",!0)||r.startContainer.hasAscendant("pre",!0);r.enlarge(this.forceBrBreak&&!e||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);r.collapsed||(e=new CKEDITOR.dom.walker(r.clone()),u=CKEDITOR.dom.walker.bookmark(!0, -!0),e.evaluator=u,this._.nextNode=e.next(),e=new CKEDITOR.dom.walker(r.clone()),e.evaluator=u,e=e.previous(),this._.lastNode=e.getNextSourceNode(!0,null,r.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(u=this.range.clone(),u.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),u.checkEndOfBlock()&&(u=new CKEDITOR.dom.elementPath(u.endContainer,u.root),this._.lastNode=(u.block|| -u.blockLimit).getNextSourceNode(!0))),this._.lastNode&&r.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=r.document.createText(""),this._.lastNode.insertAfter(e)),r=null);this._.started=1;e=r}u=this._.nextNode;r=this._.lastNode;for(this._.nextNode=null;u;){var z=0,p=u.hasAscendant("pre"),y=u.type!=CKEDITOR.NODE_ELEMENT,v=0;if(y)u.type==CKEDITOR.NODE_TEXT&&d.test(u.getText())&&(y=0);else{var q=u.getName();if(CKEDITOR.dtd.$block[q]&&"false"==u.getAttribute("contenteditable")){g= -u;f(this,c,g);break}else if(u.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if("br"==q)y=1;else if(!e&&!u.getChildCount()&&"hr"!=q){g=u;l=u.equals(r);break}e&&(e.setEndAt(u,CKEDITOR.POSITION_BEFORE_START),"br"!=q&&(this._.nextNode=u));z=1}else{if(u.getFirst()){e||(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));u=u.getFirst();continue}y=1}}y&&!e&&(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));l=(!z||y)&&u.equals(r);if(e&&!z)for(;!u.getNext(m)&&!l;){q= -u.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){z=1;y=0;l||q.equals(r);e.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}u=q;y=1;l=u.equals(r);v=1}y&&e.setEndAt(u,CKEDITOR.POSITION_AFTER_END);u=this._getNextSourceNode(u,v,r);if((l=!u)||z&&e)break}if(!g){if(!e)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(e.startContainer,e.root);u=g.blockLimit;z={div:1,th:1,td:1};g=g.block;!g&&u&&!this.enforceRealBlocks&&z[u.getName()]&& -e.checkStartOfBlock()&&e.checkEndOfBlock()&&!u.equals(e.root)?g=u:!g||this.enforceRealBlocks&&g.is(b)?(g=this.range.document.createElement(c),e.extractContents().appendTo(g),g.trim(),e.insertNode(g),h=t=!0):"li"!=g.getName()?e.checkStartOfBlock()&&e.checkEndOfBlock()||(g=g.clone(!1),e.extractContents().appendTo(g),g.trim(),t=e.splitBlock(),h=!t.wasStartOfBlock,t=!t.wasEndOfBlock,e.insertNode(g)):l||(this._.nextNode=g.equals(r)?null:this._getNextSourceNode(e.getBoundaryNodes().endNode,1,r))}h&&(h= -g.getPrevious())&&h.type==CKEDITOR.NODE_ELEMENT&&("br"==h.getName()?h.remove():h.getLast()&&"br"==h.getLast().$.nodeName.toLowerCase()&&h.getLast().remove());t&&(h=g.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&&"br"==h.getName()&&(!CKEDITOR.env.needsBrFiller||h.getPrevious(k)||h.getNext(k))&&h.remove();this._.nextNode||(this._.nextNode=l||g.equals(r)||!r?null:this._getNextSourceNode(g,1,r));return g},_getNextSourceNode:function(a,b,d){function e(a){return!(a.equals(d)||a.equals(f))}var f=this.range.root; -for(a=a.getNextSourceNode(b,null,e);!k(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new e(this)}}(),CKEDITOR.command=function(e,h){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&e.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,e,a)};this.refresh=function(a,d){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!d.isContextFor(this.context)|| -!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:d})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var f;this.checkAllowed=function(a){return a||"boolean"!=typeof f?f=e.activeFilter.checkFeature(this):f};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype= -{enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){if(this.state==e||e!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=e;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.ADDITIONAL_RESOURCE_PARAMS={},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 e(a,b,c,g,d){var e,f;a=[];for(e in b){f=b[e];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:H(f);"$"!=e.charAt(0)&&(f.elements=e);c&&(f.featureName=c.toLowerCase());var k=f;k.elements=l(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var h= -/\s*,\s*/,q=void 0;for(q in N){k[q]=l(k[q],h)||null;var m=k,n=I[q],u=l(k[I[q]],h),G=k[q],p=[],Q=!0,w=void 0;u?Q=!1:u={};for(w in G)"!"==w.charAt(0)&&(w=w.slice(1),p.push(w),u[w]=!0,Q=!1);for(;w=p.pop();)G[w]=G["!"+w],delete G["!"+w];m[n]=(Q?!1:u)||null}k.match=k.match||null;g.push(f);a.push(f)}b=d.elements;d=d.generic;var K;c=0;for(g=a.length;c=--b&&(k&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(d))},x=function(a,b){e[a]=1;var c=h[a];delete h[a];for(var g=0;g=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?g.$.onreadystatechange=function(){if("loaded"==g.$.readyState||"complete"==g.$.readyState)g.$.onreadystatechange=null,x(b,!0)}:(g.$.onload=function(){setTimeout(function(){g.$.onload=null;g.$.onerror=null;x(b,!0)},0)},g.$.onerror=function(){g.$.onload=null;g.$.onerror=null;x(b,!1)}));g.appendTo(CKEDITOR.document.getHead())}}};k&& -CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var r=0;r]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var e=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g, -h={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(f){for(var a,d,k=0,l;a=this._.htmlPartsRegex.exec(f);){d=a.index;if(d>k)if(k=f.substring(k,d),l)l.push(k);else this.onText(k);k=this._.htmlPartsRegex.lastIndex;if(d=a[1])if(d=d.toLowerCase(),l&&CKEDITOR.dtd.$cdata[d]&& -(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(d);continue}if(l)l.push(a[0]);else if(d=a[3]){if(d=d.toLowerCase(),!/="/.test(d)){var m={},b,c=a[4];a=!!a[5];if(c)for(;b=e.exec(c);){var g=b[1].toLowerCase();b=b[2]||b[3]||b[4]||"";m[g]=!b&&h[g]?g:CKEDITOR.tools.htmlDecodeAttr(b)}this.onTagOpen(d,m,a);!l&&CKEDITOR.dtd.$cdata[d]&&(l=[])}}else if(d=a[2])this.onComment(d)}if(f.length>k)this.onText(f.substring(k,f.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._= -{output:[]}},proto:{openTag:function(e){this._.output.push("\x3c",e)},openTagClose:function(e,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(e,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",e,'\x3d"',h,'"')},closeTag:function(e){this._.output.push("\x3c/",e,"\x3e")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("\x3c!--",e,"--\x3e")},write:function(e){this._.output.push(e)},reset:function(){this._.output= -[];this._.indent=!1},getHtml:function(e){var h=this._.output.join("");e&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var e=this.parent.children,h=CKEDITOR.tools.indexOf(e,this),f=this.previous,a=this.next;f&&(f.next=a);a&&(a.previous=f);e.splice(h,1);this.parent=null},replaceWith:function(e){var h=this.parent.children,f=CKEDITOR.tools.indexOf(h,this),a=e.previous=this.previous,d=e.next=this.next;a&&(a.next= -e);d&&(d.previous=e);h[f]=e;e.parent=this.parent;this.parent=null},insertAfter:function(e){var h=e.parent.children,f=CKEDITOR.tools.indexOf(h,e),a=e.next;h.splice(f+1,0,this);this.next=e.next;this.previous=e;e.next=this;a&&(a.previous=this);this.parent=e.parent},insertBefore:function(e){var h=e.parent.children,f=CKEDITOR.tools.indexOf(h,e);h.splice(f,0,this);this.next=e;(this.previous=e.previous)&&(e.previous.next=this);e.previous=this;this.parent=e.parent},getAscendant:function(e){var h="function"== -typeof e?e:"string"==typeof e?function(a){return a.name==e}:function(a){return a.name in e},f=this.parent;for(;f&&f.type==CKEDITOR.NODE_ELEMENT;){if(h(f))return f;f=f.parent}return null},wrapWith:function(e){this.replaceWith(e);e.add(this);return e},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(e){return e||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(e){this.value=e;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype= -CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(e,h){var f=this.value;if(!(f=e.onComment(h,f,this)))return this.remove(),!1;if("string"!=typeof f)return this.replaceWith(f),!1;this.value=f;return!0},writeHtml:function(e,h){h&&this.filter(h);e.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(e){this.value=e;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT, -filter:function(e,h){if(!(this.value=e.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(e,h){h&&this.filter(h);e.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(e){this.value=e};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(e){var h=this.getAscendant("style");if(h&&h.getAscendant({math:1,svg:1})){var h=CKEDITOR.htmlParser.fragment.fromHtml(this.value),f=new CKEDITOR.htmlParser.basicWriter; -e.applyTo(h);h.writeHtml(f);this.value=f.getHtml()}},writeHtml:function(e){e.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),f={ol:1,ul:1}, -a=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),d={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(k,l,m){function b(a){var b;if(0l;l++)if(k=d[l]){k=k.exec(e,a,this);if(!1===k)return null;if(k&&k!=a)return this.onNode(e,k);if(a.parent&&!a.name)break}return a},onNode:function(e,a){var d=a.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(e,a):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,a.value,a)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,a.value,a)):null}, -onAttribute:function(e,a,d,k){return(d=this.attributesRules[d])?d.exec(e,k,a,this):k}}});CKEDITOR.htmlParser.filterRulesGroup=e;e.prototype={add:function(e,a,d){this.rules.splice(this.findIndex(a),0,{value:e,priority:a,options:d})},addMany:function(e,a,d){for(var k=[this.findIndex(a),0],l=0,h=e.length;l/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+ -encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(I,function(a,b){return decodeURIComponent(b)})}function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+p+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function x(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function t(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 r(a,b){var c=[],g=b.config.protectedSource,d=b._.dataStore||(b._.dataStore={id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,g=[/|$)/gi,//gi,//gi].concat(g);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(c.push(a)-1)+"--\x3e"});for(var f=0;f]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){d[d.id]=decodeURIComponent(b);return"{cke_protected_"+d.id++ + -"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,g,d){return"\x3c"+c+g+"\x3e"+t(x(d),b)+"\x3c/"+c+"\x3e"})}var u;CKEDITOR.htmlDataProcessor=function(a){var b,d,f=this;this.editor=a;this.dataFilter=b=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;b.addRules(B);b.addRules(A,{applyToAll:!0});b.addRules(e(a,"data"),{applyToAll:!0});d.addRules(C);d.addRules(E,{applyToAll:!0});d.addRules(e(a, -"html"),{applyToAll:!0});a.on("toHtml",function(b){b=b.data;var d=b.dataValue,e,d=u(d),d=r(d,a),d=g(d,N),d=c(d),d=g(d,D),d=d.replace(M,"$1cke:$2"),d=d.replace(K,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),d=d.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),d=d.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=b.context||a.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",d="\x3cpre\x3e"+d+"\x3c/pre\x3e",f=1);e=a.document.createElement(e);e.setHtml("a"+ -d);d=e.getHtml().substr(1);d=d.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(d=d.replace(/^
|<\/pre>$/gi,""));d=d.replace(R,"$1$2");d=n(d);d=x(d);e=!1===b.fixForBody?!1:h(b.enterMode,a.config.autoParagraph);d=CKEDITOR.htmlParser.fragment.fromHtml(d,b.context,e);e&&(f=d,!f.children.length&&CKEDITOR.dtd[f.name][e]&&(e=new CKEDITOR.htmlParser.element(e),f.add(e)));b.dataValue=d},null,null,5);a.on("toHtml",function(b){b.data.filter.applyTo(b.data.dataValue,!0,b.data.dontFilter,b.data.enterMode)&&
-a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=w(b)},null,null,15);a.on("toDataFormat",function(b){var c=b.data.dataValue;b.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^
/i,""));b.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,b.data.context,h(b.data.enterMode, -a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,!0)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);a.on("toDataFormat",function(b){var c=b.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=x(c);c=t(c,a);b.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var g=this.editor,e,f,k,l;b&&"object"==typeof b? -(e=b.context,c=b.fixForBody,d=b.dontFilter,f=b.filter,k=b.enterMode,l=b.protectedWhitespaces):e=b;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d,filter:f||g.filter,enterMode:k||g.enterMode,protectedWhitespaces:l}).dataValue},toDataFormat:function(a,b){var c,d,g;b&&(c=b.context,d=b.filter,g=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:g||this.editor.enterMode}).dataValue},protectSource:function(a){return r(a,this.editor)},unprotectSource:function(a){return t(a,this.editor)},unprotectRealComments:function(a){return x(a)}};var z=/(?: |\xa0)$/,p="{cke_protected}",y=CKEDITOR.dtd,v="caption colgroup col thead tfoot tbody".split(" "),q=CKEDITOR.tools.extend({},y.$blockLimit,y.$block),B={elements:{input:m,textarea:m}},A={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}}}},C={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,g=0;gd?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type|| -(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:b,textarea:b},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(E.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var F=/<(a|area|img|input|source)\b([^>]*)>/gi,H=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi, -L=/^(href|src|name)$/i,D=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,N=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,I=/([^<]*)<\/cke:encoded>/gi,M=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,R=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,K=/]*?)\/?>(?!\s*<\/cke:\1)/gi;u=function(){function a(b,c){for(var d=0;d/g];return function(b){for(;a(d,b);)for(var c=d,g=0;gd?1:0},f=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:f.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name, -this.attributes)},filter:function(a,d){var e=this,f,h;d=e.getFilterContext(d);if(!e.parent)a.onRoot(d,e);for(;;){f=e.name;if(!(h=a.onElementName(d,f)))return this.remove(),!1;e.name=h;if(!(e=a.onElement(d,e)))return this.remove(),!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==f)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(),!1}f=e.attributes;var b,c;for(b in f){for(h=f[b];;)if(c=a.onAttributeName(d,b))if(c!=b)delete f[b], -b=c;else break;else{delete f[b];break}c&&(!1===(h=a.onAttribute(d,e,c,h))?delete f[c]:f[c]=h)}e.isEmpty||this.filterChildren(a,!1,d);return!0},filterChildren:f.filterChildren,writeHtml:function(a,d){d&&this.filter(d);var e=this.name,f=[],m=this.attributes,b,c;a.openTag(e,m);for(b in m)f.push([b,m[b]]);a.sortAttributes&&f.sort(h);b=0;for(c=f.length;bCKEDITOR.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()};y.eol.detect(a,this);y.bogus.exclude(a);y.cell.shrink(a);a.fragment=a.range.cloneContents();y.tree.rebuild(a,this);y.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=v,d={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var e=this.editor.createRange(); -e.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=e.createBookmark();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"),e=0,f;if(d)for(;f=d.getItem(e++);)if(!w(f)){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 g},setup:function(){var b=this.editor;this.attachListener(b,"beforeGetData",function(){var a= -this.getData();this.is("textarea")||!1!==b.config.ignoreEmptyParagraph&&(a=a.replace(r,function(a,b){return b}));b.setData(a,null,1)},this);this.attachListener(b,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(b,"afterSetData",function(){this.setData(b.getData(1))},this);this.attachListener(b,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(b,"beforeFocus",function(){var a=b.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()}, +(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var c=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"M3DI",version:"4.18.0 DEV",revision:"4c37728e20",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:c},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var a=document.getElementsByTagName("script"),g=0;gw.getListenerIndex(a)){w=w.listeners;g||(g=this);isNaN(b)&&(b=10);d.fn=a;d.priority=b;for(var y=w.length-1;0<=y;y--)if(w[y].priority<=b)return w.splice(y+1,0,d),{removeListener:f};w.unshift(d)}return{removeListener:f}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this,arguments)};return this.on.apply(this, +a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,k=function(){a=1},l=0,m=function(){l=1};return function(b,d,f){var p=g(this)[b];b=a;var w=l;a=l=0;if(p){var y=p.listeners;if(y.length)for(var y=y.slice(0),h,t=0;tdocument.documentMode),mobile:-1a||g.quirks);g.gecko&&(h=c.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),a=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));g.air&&(a=parseFloat(c.match(/ adobeair\/(\d+)/)[1]));g.webkit&&(a=parseFloat(c.match(/ applewebkit\/(\d+)/)[1]));g.version=a;g.isCompatible=!(g.ie&&7>a)&&!(g.gecko&&4E4>a)&&!(g.webkit&&534>a);g.hidpi=2<=window.devicePixelRatio; +g.needsBrFiller=g.gecko||g.webkit||g.ie&&10a;g.cssClass="cke_browser_"+(g.ie?"ie":g.gecko?"gecko":g.webkit?"webkit":"unknown");g.quirks&&(g.cssClass+=" cke_browser_quirks");g.ie&&(g.cssClass+=" cke_browser_ie"+(g.quirks?"6 cke_browser_iequirks":g.version));g.air&&(g.cssClass+=" cke_browser_air");g.iOS&&(g.cssClass+=" cke_browser_ios");g.hidpi&&(g.cssClass+=" cke_hidpi");return g}()),"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 c=document.createElement("script");c.type="text/javascript";c.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(c)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(c){(this._.pending||(this._.pending=[])).push(c)};(function(){CKEDITOR.domReady(function(){var c=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;c&&(CKEDITOR.status="basic_ready", +c&&c._load?c():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(c,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:c,additionalData:h})},CKEDITOR.error=function(c,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log", +{type:"error",errorCode:c,additionalData:h})},CKEDITOR.on("log",function(c){if(window.console&&window.console.log){var h=console[c.data.type]?c.data.type:"log",g=c.data.errorCode;if(c=c.data.additionalData)console[h]("[CKEDITOR] Error code: "+g+".",c);else console[h]("[CKEDITOR] Error code: "+g+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+g)}},null,null,999),CKEDITOR.dom={},function(){function c(f,b,a){this._minInterval= +f;this._context=a;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(b,a||{});var d=this;this.input=function(){function f(){d._lastOutput=(new Date).getTime();d._scheduledTimer=0;d._call()}if(!d._scheduledTimer||!1!==d._reschedule()){var p=(new Date).getTime()-d._lastOutput;p/g,l=/|\s) /g,function(f,b){return b+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var f=0;return function(){return++f}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var f="e",b=0;8>b;b++)f+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return f},override:function(f, +b){var a=b(f);a.prototype=f.prototype;return a},setTimeout:function(f,b,a,d,e){e||(e=window);a||(a=e);return e.setTimeout(function(){d?f.apply(a,[].concat(d)):f.apply(a)},b||0)},throttle:function(f,b,a){return new this.buffers.throttle(f,b,a)},trim:function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(f,"")}}(),ltrim:function(){var f=/^[ \t\n\r]+/g;return function(b){return b.replace(f,"")}}(),rtrim:function(){var f=/[ \t\n\r]+$/g;return function(b){return b.replace(f, +"")}}(),indexOf:function(f,b){if("function"==typeof b)for(var a=0,d=f.length;aparseFloat(a);d&&(a=a.replace("-",""));f.setStyle("width",a);b=f.getClientRect();a=Math.round(b.width);return d?-a:a}return a}}(),repeat:function(f,b){return Array(b+1).join(f)},tryThese:function(){for(var f,b=0,a=arguments.length;bb;b++)f[b]=("0"+parseInt(f[b],10).toString(16)).slice(-2);return"#"+f.join("")})},normalizeHex:function(f){return f.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi, +function(f,b,a,d){f=b.toLowerCase();3==f.length&&(f=f.split(""),f=[f[0],f[0],f[1],f[1],f[2],f[2]].join(""));return"#"+f+d})},_isValidColorFormat:function(f){if(!f)return!1;f=f.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(f)},parseCssText:function(f,b,a){var d={};a&&(f=(new CKEDITOR.dom.element("span")).setAttribute("style",f).getAttribute("style")||"");f&&(f=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(f)));if(!f||";"==f)return d;f.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, +function(f,a,p){b&&(a=a.toLowerCase(),"font-family"==a&&(p=p.replace(/\s*,\s*/g,",")),p=CKEDITOR.tools.trim(p));d[a]=p});return d},writeCssText:function(f,b){var a,d=[];for(a in f)d.push(a+":"+f[a]);b&&d.sort();return d.join("; ")},objectCompare:function(f,b,a){var d;if(!f&&!b)return!0;if(!f||!b)return!1;for(d in f)if(f[d]!=b[d])return!1;if(!a)for(d in b)if(f[d]!=b[d])return!1;return!0},objectKeys:function(f){return CKEDITOR.tools.object.keys(f)},convertArrayToObject:function(f,b){var a={};1==arguments.length&& +(b=!0);for(var d=0,e=f.length;da;a++)f.push(Math.floor(256*Math.random()));for(a=0;a=d||0==a&&48<= +d&&57>=d||1==a&&48<=d&&57>=d&&45==c?e+("\\"+d.toString(16)+" "):0==a&&1==b&&45==d?e+("\\"+f.charAt(a)):128<=d||45==d||95==d||48<=d&&57>=d||65<=d&&90>=d||97<=d&&122>=d?e+f.charAt(a):e+("\\"+f.charAt(a));f=e}else f="";return f},getMouseButton:function(f){return(f=f&&f.data?f.data.$:f)?CKEDITOR.tools.normalizeMouseButton(f.button):!1},normalizeMouseButton:function(f,b){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return f;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE, +4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],d=0;dc)for(g=c;3>g;g++)e[g]=0;m[0]=(e[0]&252)>>2;m[1]=(e[0]&3)<<4|e[1]>>4;m[2]=(e[1]&15)<<2|(e[2]&192)>>6;m[3]=e[2]&63;for(g=0;4>g;g++)b=g<=c? +b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m[g]):b+"\x3d"}return b},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(f){var b={},a=this._findColor(f); +a.length&&(b.color=a[0],CKEDITOR.tools.array.forEach(a,function(b){f=f.replace(b,"")}));if(f=CKEDITOR.tools.trim(f))b.unprocessed=f;return b},margin:function(f){return CKEDITOR.tools.style.parse.sideShorthand(f,function(f){return f.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(f,b){function a(f){d.top=e[f[0]];d.right=e[f[1]];d.bottom=e[f[2]];d.left=e[f[3]]}var d={},e=b?b(f):f.split(/\s+/);switch(e.length){case 1:a([0,0,0,0]);break;case 2:a([0, +1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return d},border:function(f){return CKEDITOR.tools.style.border.fromCssRule(f)},_findColor:function(f){var b=[],a=CKEDITOR.tools.array,b=b.concat(f.match(this._rgbaRegExp)||[]),b=b.concat(f.match(this._hslaRegExp)||[]);return b=b.concat(a.filter(f.split(/\s+/),function(f){return f.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:f.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(f,b,a){var d=[];this.forEach(f, +function(e,c){b.call(a,e,c,f)&&d.push(e)});return d},find:function(f,b,a){for(var d=f.length,e=0;eCKEDITOR.env.version&&(!f||"object"!==typeof f)){b=[];if("string"===typeof f)for(a=0;aCKEDITOR.env.version)for(e=0;eCKEDITOR.env.version&& +(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&a(e);return e},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(c){c.$.parentNode.insertBefore(this.$,c.$.nextSibling);return c},insertBefore:function(c){c.$.parentNode.insertBefore(this.$,c.$);return c},insertBeforeMe:function(c){this.$.parentNode.insertBefore(c.$,this.$);return c},getAddress:function(c){for(var h=[],g=this.getDocument().$.documentElement, +a=this;a&&a!=g;){var e=a.getParent();e&&h.unshift(this.getIndex.call(a,c));a=e}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(c){function h(a,e){var c=e?a.getNext():a.getPrevious();return c&&c.type==CKEDITOR.NODE_TEXT?c.isEmpty()?h(c,e):c:null}var g=this,a=-1,e;if(!this.getParent()||c&&g.type==CKEDITOR.NODE_TEXT&&g.isEmpty()&&!h(g)&&!h(g,!0))return-1;do if(!c||g.equals(this)||g.type!=CKEDITOR.NODE_TEXT||!e&& +!g.isEmpty())a++,e=g.type==CKEDITOR.NODE_TEXT;while(g=g.getPrevious());return a},getNextSourceNode:function(c,h,g){if(g&&!g.call){var a=g;g=function(e){return!e.equals(a)}}c=!c&&this.getFirst&&this.getFirst();var e;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;c=this.getNext()}for(;!c&&(e=(e||this).getParent());){if(g&&!1===g(e,!0))return null;c=e.getNext()}return!c||g&&!1===g(c)?null:h&&h!=c.type?c.getNextSourceNode(!1,h,g):c},getPreviousSourceNode:function(c,h,g){if(g&& +!g.call){var a=g;g=function(e){return!e.equals(a)}}c=!c&&this.getLast&&this.getLast();var e;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;c=this.getPrevious()}for(;!c&&(e=(e||this).getParent());){if(g&&!1===g(e,!0))return null;c=e.getPrevious()}return!c||g&&!1===g(c)?null:h&&c.type!=h?c.getPreviousSourceNode(!1,h,g):c},getPrevious:function(c){var h=this.$,g;do g=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(g&&c&&!c(g));return g},getNext:function(c){var h= +this.$,g;do g=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(g&&c&&!c(g));return g},getParent:function(c){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||c&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(c){var h=this,g=[];do g[c?"push":"unshift"](h);while(h=h.getParent());return g},getCommonAncestor:function(c){if(c.equals(this))return this;if(c.contains&&c.contains(this))return c;var h=this.contains?this:this.getParent(); +do if(h.contains(c))return h;while(h=h.getParent());return null},getPosition:function(c){var h=this.$,g=c.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(g);if(h==g)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&c.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(g))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(g.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex|| +0>g.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex=document.documentMode||!h||(c=h+":"+c);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(c))}, +getHead:function(){var c=this.$.getElementsByTagName("head")[0];return c=c?new CKEDITOR.dom.element(c):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(c){this.$.open("text/html","replace");CKEDITOR.env.ie&&(c=c.replace(/(?:^\s*]*?>)|^/i, +'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(c);this.$.close()},find:function(c){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c))},findOne:function(c){return(c=this.$.querySelector(c))?new CKEDITOR.dom.element(c):null},_getHtml5ShivFrag:function(){var c=this.getCustomData("html5ShivFrag");c||(c=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(c,!0),this.setCustomData("html5ShivFrag",c));return c}}),CKEDITOR.dom.nodeList= +function(c){this.$=c},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(c){return 0>c||c>=this.$.length?null:(c=this.$[c])?new CKEDITOR.dom.node(c):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(c){return new CKEDITOR.dom.node(c)})}},CKEDITOR.dom.element=function(c,h){"string"==typeof c&&(c=(h?h.$:document).createElement(c));CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.element.get=function(c){return(c="string"==typeof c?document.getElementById(c)|| +document.getElementsByName(c)[0]:c)&&(c.$?c:new CKEDITOR.dom.element(c))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(c,h){var g=new CKEDITOR.dom.element("div",h);g.setHtml(c);return g.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(c,h,g,a){var e=h.getCustomData("list_marker_id")||h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),k=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names", +{}).getCustomData("list_marker_names");c[e]=h;k[g]=1;return h.setCustomData(g,a)},CKEDITOR.dom.element.clearAllMarkers=function(c){for(var h in c)CKEDITOR.dom.element.clearMarkers(c,c[h],1)},CKEDITOR.dom.element.clearMarkers=function(c,h,g){var a=h.getCustomData("list_marker_names"),e=h.getCustomData("list_marker_id"),k;for(k in a)h.removeCustomData(k);h.removeCustomData("list_marker_names");g&&(h.removeCustomData("list_marker_id"),delete c[e])},function(){function c(a,b){return-1<(" "+a+" ").replace(k, +" ").indexOf(" "+b+" ")}function h(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function g(a,b){var d=CKEDITOR.tools.escapeCss(a.$.id);return"#"+d+" "+b.split(/,\s*/).join(", #"+d+" ")}function a(a){for(var b=0,d=0,f=l[a].length;dCKEDITOR.env.version? +this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);var f=d.extractContents(!1,b||!1),e;d.insertNode(this.remove()); +if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(d=new CKEDITOR.dom.element("div");e=f.getFirst();)e.$.style.backgroundColor&&(e.$.style.backgroundColor=e.$.style.backgroundColor),d.append(e);d.insertAfter(this);d.remove(!0)}else f.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(a){var b=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&& +(b.height=b.bottom-b.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),b):b},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var d=this.getDocument()._getHtml5ShivFrag();d.appendChild(b);b.innerHTML=a;d.removeChild(b);return a}catch(f){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(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){switch(b){case "class":b="className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":return b=this.$.getAttribute(b,2),0!==b&&0===this.$.tabIndex&&(b=null), +b;case "checked":return b=this.$.attributes.getNamedItem(b),(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(b,2)}:a}(),getAttributes:function(a){var b={},d=this.$.attributes,f;a=CKEDITOR.tools.isArray(a)?a:[];for(f=0;f=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, +is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;bCKEDITOR.env.version&&this.is("a")){var d=this.getParent();d.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.setHtml(b),b=d.getHtml(),d.setHtml(a),a=d.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,d;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(d=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(d)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; +for(var a=this.getChildren(),b=0,d=a.count();bCKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var d=this.$;a=a.$;if(d!=a){var f;if(b)for(;f=d.lastChild;)a.insertBefore(d.removeChild(f),a.firstChild);else for(;f=d.firstChild;)a.appendChild(d.removeChild(f))}},mergeSiblings:function(){function a(b,d,f){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var e= +[];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(e.push(d),d=f?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(d)){for(var c=f?b.getLast():b.getFirst();e.length;)e.shift().move(b,!f);d.moveChildren(b,!f);d.remove();c&&c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", +visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,d){"class"==b?this.$.className=d:"style"==b?this.$.style.cssText=d:"tabindex"==b?this.$.tabIndex=d:"checked"==b?this.$.checked=d:"contenteditable"==b?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,d){if("src"==b&&d.match(/^http:\/\//))try{a.apply(this, +arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b= +0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", +"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),d=0,f=b.count();dg||0g?g:e);d&&(0>c||0c?c:f,0)},setState:function(a,b,d){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+ +"_off");this.removeClass(b+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}}, +getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var d=this.$.attributes;b=b||{};for(var f=0;fCKEDITOR.env.version){var e=f.ownerDocument.createEventObject(),c;for(c in b)e[c]=b[c];f.fireEvent(d, +e)}else f[f[a]?a:d](b)},isDetached:function(){var a=this.getDocument(),b=a.getDocumentElement();return b.equals(this)||b.contains(this)?!CKEDITOR.env.ie||8=z.getChildCount()?(z=z.getChild(C-1),E=!0):z=z.getChild(C):K=E=!0;u.type== +CKEDITOR.NODE_TEXT?q?F=!0:u.split(A):0da)for(;U;)U=g(U,N,!0);N=V}q||l()}}function g(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),e=CKEDITOR.dom.walker.bogus();return function(c){return d(c)||b(c)?!0:e(c)&&!a?a=!0:c.type==CKEDITOR.NODE_TEXT&&(c.hasAscendant("pre")||CKEDITOR.tools.trim(c.getText()).length)||c.type==CKEDITOR.NODE_ELEMENT&&!c.is(k)?!1:!0}}function a(a){var b=CKEDITOR.dom.walker.whitespaces(), +d=CKEDITOR.dom.walker.bookmark(1);return function(e){return d(e)||b(e)?!0:!a&&l(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$removeEmpty)}}function e(a){return function(){var e;return this[a?"getPreviousNode":"getNextNode"](function(a){!e&&d(a)&&(e=a);return b(a)&&!(l(a)&&a.equals(e))})}}var k={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(), +m=/^[\t\r\n ]*(?: |\xa0)$/,b=CKEDITOR.dom.walker.editable(),d=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer), +this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,b){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,d,a,"undefined"==typeof b?!0:b);return d},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&& +this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var f;if(f=a.data&&a.data("cke-temp"))f=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return f},!0)}var d=this.startContainer,e=this.endContainer,c=this.collapsed,g,k,l,h;g=this.document.createElement("span");g.data("cke-bookmark",1);g.setStyle("display","none");g.setHtml("\x26nbsp;");a&&(l="cke_bm_"+ +CKEDITOR.tools.getNextNumber(),g.setAttribute("id",l+(c?"C":"S")));c||(k=g.clone(),k.setHtml("\x26nbsp;"),a&&k.setAttribute("id",l+"E"),h=this.clone(),b(e)&&(e=b(e),h.moveToPosition(e,CKEDITOR.POSITION_AFTER_END)),h.collapse(),h.insertNode(k));h=this.clone();b(d)&&(e=b(d),h.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START));h.collapse(!0);h.insertNode(g);k?(this.setStartAfter(g),this.setEndBefore(k)):this.moveToPosition(g,CKEDITOR.POSITION_AFTER_END);return{startNode:a?l+(c?"C":"S"):g,endNode:a?l+ +"E":k,serializable:a,collapsed:c}},createBookmark2:function(){function a(f){var b=f.container,e=f.offset,c;c=b;var g=e;c=c.type!=CKEDITOR.NODE_ELEMENT||0===g||g==c.getChildCount()?0:c.getChild(g-1).type==CKEDITOR.NODE_TEXT&&c.getChild(g).type==CKEDITOR.NODE_TEXT;c&&(b=b.getChild(e-1),e=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=e.getIndex(),a.container=e.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT, +!0);return function(d){var e=this.collapsed,c={container:this.startContainer,offset:this.startOffset},g={container:this.endContainer,offset:this.endOffset};d&&(a(c),b(c,this.root),e||(a(g),b(g,this.root)));return{start:c.container.getAddress(d),end:e?null:g.container.getAddress(d),startOffset:c.offset,endOffset:g.offset,normalized:d,collapsed:e,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,e=a.end&&this.document.getByAddress(a.end, +a.normalized);a=a.endOffset;this.setStart(b,d);e?this.setEnd(e,a):this.collapse(!0)}else b=(d=a.serializable)?this.document.getById(a.startNode):a.startNode,a=d?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,d=this.startOffset,e=this.endOffset,c;if(a.type==CKEDITOR.NODE_ELEMENT)if(c=a.getChildCount(),c>d)a=a.getChild(d);else if(1>c)a=a.getPreviousSourceNode(); +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(c=b.getChildCount(),c>e)b=b.getChild(e).getPreviousSourceNode(!0);else if(1>c)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var d=this.startContainer,e=this.endContainer,d=d.equals(e)?a&&d.type==CKEDITOR.NODE_ELEMENT&& +this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(e);return b&&!d.is?d.getParent():d},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&& +a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var d=this.startContainer,e=this.startOffset,c=this.collapsed;if((!a||c)&&d&&d.type==CKEDITOR.NODE_TEXT){if(e)if(e>=d.getLength())e=d.getIndex()+1,d=d.getParent();else{var g=d.split(e),e=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(g,this.endOffset-this.startOffset):d.equals(this.endContainer)&& +(this.endOffset+=1)}else e=d.getIndex(),d=d.getParent();this.setStart(d,e);if(c){this.collapse(!0);return}}d=this.endContainer;e=this.endOffset;b||c||!d||d.type!=CKEDITOR.NODE_TEXT||(e?(e>=d.getLength()||d.split(e),e=d.getIndex()+1):e=d.getIndex(),d=d.getParent(),this.setEnd(d,e))},enlarge:function(a,b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var e=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:var g= +function(a,f){var b=new CKEDITOR.dom.range(l);b.setStart(a,f);b.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);var b=new CKEDITOR.dom.walker(b),d;for(b.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};d=b.next();){if(d.type!=CKEDITOR.NODE_TEXT)return!1;D=d!=a?d.getText():d.substring(f);if(e.test(D))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),l=this.root,h,m,q,u,z,A=!1,C,D;C=this.startContainer;var E=this.startOffset;C.type==CKEDITOR.NODE_TEXT? +(E&&(C=!CKEDITOR.tools.trim(C.substring(0,E)).length&&C,A=!!C),C&&((u=C.getPrevious())||(q=C.getParent()))):(E&&(u=C.getChild(E-1)||C.getLast()),u||(q=C));for(q=d(q);q||u;){if(q&&!u){!z&&q.equals(k)&&(z=!0);if(c?q.isBlockBoundary():!l.contains(q))break;A&&"inline"==q.getComputedStyle("display")||(A=!1,z?h=q:this.setStartBefore(q));u=q.getPrevious()}for(;u;)if(C=!1,u.type==CKEDITOR.NODE_COMMENT)u=u.getPrevious();else{if(u.type==CKEDITOR.NODE_TEXT)D=u.getText(),e.test(D)&&(u=null),C=/[\s\ufeff]$/.test(D); +else if((u.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&u.is("br"))&&!u.data("cke-bookmark"))if(A&&CKEDITOR.dtd.$removeEmpty[u.getName()]){D=u.getText();if(e.test(D))u=null;else for(var E=u.$.getElementsByTagName("*"),G=0,K;K=E[G++];)if(!CKEDITOR.dtd.$removeEmpty[K.nodeName.toLowerCase()]){u=null;break}u&&(C=!!D.length)}else u=null;C&&(A?z?h=q:q&&this.setStartBefore(q):A=!0);if(u){C=u.getPrevious();if(!q&&!C){q=u;u=null;break}u=C}else q=null}q&&(q=d(q.getParent()))}C=this.endContainer;E=this.endOffset; +q=u=null;z=A=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(E)).length?A=!0:(A=!C.getLength(),E==C.getLength()?(u=C.getNext())||(q=C.getParent()):g(C,E)&&(q=C.getParent())):(u=C.getChild(E))||(q=C);for(;q||u;){if(q&&!u){!z&&q.equals(k)&&(z=!0);if(c?q.isBlockBoundary():!l.contains(q))break;A&&"inline"==q.getComputedStyle("display")||(A=!1,z?m=q:q&&this.setEndAfter(q));u=q.getNext()}for(;u;){C=!1;if(u.type==CKEDITOR.NODE_TEXT)D=u.getText(),g(u,0)||(u=null),C=/^[\s\ufeff]/.test(D);else if(u.type== +CKEDITOR.NODE_ELEMENT){if((0=k.getLength()?g.setStartAfter(k):(g.setStartBefore(k),d=0):g.setStartBefore(k));l&&l.type==CKEDITOR.NODE_TEXT&&(m?m>=l.getLength()?g.setEndAfter(l):(g.setEndAfter(l),q=0):g.setEndBefore(l));var g=new CKEDITOR.dom.walker(g),u=CKEDITOR.dom.walker.bookmark(),z=CKEDITOR.dom.walker.bogus();g.evaluator= +function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var A;g.guard=function(b,d){if(c&&z(b)||u(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(A)||!1===e&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||(A=b);return!0};d&&(k=g[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,b?CKEDITOR.POSITION_AFTER_START: +CKEDITOR.POSITION_BEFORE_START);q&&(g.reset(),(g=g[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(g,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!d&&!q)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,d=b.getChild(this.startOffset);d?a.insertBefore(d):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a, +b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=b;this.endContainer||(this._setEndContainer(a),this.endOffset=b);c(this)},setEnd:function(a, +b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=b;this.startContainer||(this._setStartContainer(a),this.startOffset=b);c(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a, +b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}c(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a, +a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}c(this)},fixBlock:function(a,b){var d=this.createBookmark(),e=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(e);e.trim();this.insertNode(e);var c=e.getBogus();c&&c.remove();e.appendBogus();this.moveToBookmark(d);return e},splitBlock:function(a,b){var d= +new CKEDITOR.dom.elementPath(this.startContainer,this.root),e=new CKEDITOR.dom.elementPath(this.endContainer,this.root),c=d.block,g=e.block,k=null;if(!d.blockLimit.equals(e.blockLimit))return null;"br"!=a&&(c||(c=this.fixBlock(!0,a),g=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),g||(g=this.fixBlock(!1,a)));d=c&&this.checkStartOfBlock();e=g&&this.checkEndOfBlock();this.deleteContents();c&&c.equals(g)&&(e?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g, +CKEDITOR.POSITION_AFTER_END),g=null):d?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),c=null):(g=this.splitElement(c,b||!1),c.is("ul","ol")||c.appendBogus()));return{previousBlock:c,nextBlock:g,wasStartOfBlock:d,wasEndOfBlock:e,elementPath:k}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,b||!1),e=a.clone(!1,b||!1);d.appendTo(e);e.insertAfter(a); +this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return e},removeEmptyBlocksAtEnd:function(){function a(f){return function(a){return b(a)||d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||f.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var d=this.createBookmark(),e=this[b?"endPath":"startPath"](),c=e.block||e.blockLimit,g;c&&!c.equals(e.root)&&!c.getFirst(a(c));)g=c.getParent(),this[b?"setEndAt": +"setStartAt"](c,CKEDITOR.POSITION_AFTER_END),c.remove(1),c=g;this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(b,d){var e=d==CKEDITOR.START,c=this.clone();c.collapse(e);c[e?"setStartAt":"setEndAt"](b,e?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=a(e);return c[e? +"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var b=this.startContainer,d=this.startOffset;CKEDITOR.env.ie&&d&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.ltrim(b.substring(0,d)),m.test(b)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=g();return a.checkBackward()},checkEndOfBlock:function(a){var b= +this.endContainer,d=this.endOffset;CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.rtrim(b.substring(d)),m.test(b)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(b);a.evaluator=g();return a.checkForward()},getPreviousNode:function(a,b,d){var e=this.clone();e.collapse(1);e.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START); +d=new CKEDITOR.dom.walker(e);d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var e=this.clone();e.collapse();e.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(e);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(b,f){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(f)||b.equals(f)))break}b= +b.getParent()}return 1}return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,b))}}(),moveToElementEditablePosition:function(a,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 e=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&m.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END: +CKEDITOR.POSITION_BEFORE_START);e=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),e=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var c=a,g=e,k=void 0;c.type==CKEDITOR.NODE_ELEMENT&&c.isEditable(!1)&& +(k=c[b?"getLast":"getFirst"](d));g||k||(k=c[b?"getPrevious":"getNext"](d));a=k}return!!e},moveToClosestEditablePosition:function(a,b){var d,e=0,c,g,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,k[b?0:1])):d=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))e=1;else if(c=d[b?"getNextEditableNode":"getPreviousEditableNode"]())e=1,(g=c.type==CKEDITOR.NODE_ELEMENT)&&c.is(CKEDITOR.dtd.$block)&&"false"==c.getAttribute("contenteditable")? +(d.setStartAt(c,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(c,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&g&&c.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(c,0),d.collapse()):d.moveToPosition(c,k[b?1:0]);e&&this.moveToRange(d);return!!e},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!= +CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return d(a)&&b(a)};var e=a.next();a.reset();return e&&e.equals(a.previous())?e: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:e(),getPreviousEditableNode:e(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),d=this.getTouchedEndNode(),e=b.getAscendant("table",!0),d=d.getAscendant("table",!0);return e&&!this.root.contains(e)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):e&&d&&(e.equals(d)||e.contains(d)||d.contains(e))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a= +new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,d,e,c=this.clone();c.optimize();(e=c.startContainer.type==CKEDITOR.NODE_TEXT)?(d=c.startContainer.getText(),b=c.startContainer.split(c.startOffset),a.insertAfter(c.startContainer)):c.insertNode(a);a.scrollIntoView();e&&(c.startContainer.setText(d),b.remove());a.remove()},getClientRects:function(){function a(b,d){var f=CKEDITOR.tools.array.map(b,function(a){return a}),e=new CKEDITOR.dom.range(d.root),c,g, +k;d.startContainer instanceof CKEDITOR.dom.element&&(g=0===d.startOffset&&d.startContainer.hasAttribute("data-widget"));d.endContainer instanceof CKEDITOR.dom.element&&(k=(k=d.endOffset===(d.endContainer.getChildCount?d.endContainer.getChildCount():d.endContainer.length))&&d.endContainer.hasAttribute("data-widget"));g&&e.setStart(d.startContainer.getParent(),d.startContainer.getIndex());k&&e.setEnd(d.endContainer.getParent(),d.endContainer.getIndex()+1);if(g||k)d=e;e=d.cloneContents().find("[data-cke-widget-id]").toArray(); +if(e=CKEDITOR.tools.array.map(e,function(a){var b=d.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return e=CKEDITOR.tools.array.map(e,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;c=this.root.getDocument().$.createRange();c.setStart(b.getParent().$,b.getIndex());c.setEnd(b.getParent().$,b.getIndex()+1);b=c.getClientRects();b.widgetRect=a.getClientRect();return b},d),CKEDITOR.tools.array.forEach(e,function(a){function b(e){CKEDITOR.tools.array.forEach(f, +function(b,c){var g=CKEDITOR.tools.objectCompare(a[e],b);g||(g=CKEDITOR.tools.objectCompare(a.widgetRect,b));g&&(Array.prototype.splice.call(f,c,a.length-e,a.widgetRect),d=!0)});d||(earguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function h(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function g(a,b,e,c){a:{null== +c&&(c=h(e));for(var k;k=c.shift();)if(k.getDtd().p){c={element:k,remaining:c};break a}c=null}if(!c)return 0;if((k=CKEDITOR.filter.instances[c.element.data("cke-filter")])&&!k.check(b))return g(a,b,e,c.remaining);b=new CKEDITOR.dom.range(c.element);b.selectNodeContents(c.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=k;a._.nestedEditable={element:c.element,container:e,remaining:c.remaining,iterator:b};return 1}function a(a,b,e){if(!b)return!1; +a=a.clone();a.collapse(!e);return a.checkBoundaryOfElement(b,e?CKEDITOR.START:CKEDITOR.END)}var e=/^[\r\n\t ]+$/,k=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),m=function(a){return k(a)&&l(a)},b={dd:1,dt:1,li:1};c.prototype={getNextParagraph:function(d){var f,c,l,h,r;d=d||"p";if(this._.nestedEditable){if(f=this._.nestedEditable.iterator.getNextParagraph(d))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,f;this.activeFilter=this.filter;if(g(this,d, +this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(d);this._.nestedEditable=null}if(!this.range.root.getDtd()[d])return null;if(!this._.started){var t=this.range.clone();c=t.startPath();var v=t.endPath(),B=!t.collapsed&&a(t,c.block),n=!t.collapsed&&a(t,v.block,1);t.shrink(CKEDITOR.SHRINK_ELEMENT,!0);B&&t.setStartAt(c.block,CKEDITOR.POSITION_BEFORE_END);n&&t.setEndAt(v.block, +CKEDITOR.POSITION_AFTER_START);c=t.endContainer.hasAscendant("pre",!0)||t.startContainer.hasAscendant("pre",!0);t.enlarge(this.forceBrBreak&&!c||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);t.collapsed||(c=new CKEDITOR.dom.walker(t.clone()),v=CKEDITOR.dom.walker.bookmark(!0,!0),c.evaluator=v,this._.nextNode=c.next(),c=new CKEDITOR.dom.walker(t.clone()),c.evaluator=v,c=c.previous(),this._.lastNode=c.getNextSourceNode(!0,null,t.root),this._.lastNode&&this._.lastNode.type== +CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(v=this.range.clone(),v.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),v.checkEndOfBlock()&&(v=new CKEDITOR.dom.elementPath(v.endContainer,v.root),this._.lastNode=(v.block||v.blockLimit).getNextSourceNode(!0))),this._.lastNode&&t.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=t.document.createText(""),this._.lastNode.insertAfter(c)),t=null);this._.started= +1;c=t}v=this._.nextNode;t=this._.lastNode;for(this._.nextNode=null;v;){var B=0,n=v.hasAscendant("pre"),x=v.type!=CKEDITOR.NODE_ELEMENT,q=0;if(x)v.type==CKEDITOR.NODE_TEXT&&e.test(v.getText())&&(x=0);else{var u=v.getName();if(CKEDITOR.dtd.$block[u]&&"false"==v.getAttribute("contenteditable")){f=v;g(this,d,f);break}else if(v.isBlockBoundary(this.forceBrBreak&&!n&&{br:1})){if("br"==u)x=1;else if(!c&&!v.getChildCount()&&"hr"!=u){f=v;l=v.equals(t);break}c&&(c.setEndAt(v,CKEDITOR.POSITION_BEFORE_START), +"br"!=u&&(this._.nextNode=v));B=1}else{if(v.getFirst()){c||(c=this.range.clone(),c.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));v=v.getFirst();continue}x=1}}x&&!c&&(c=this.range.clone(),c.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));l=(!B||x)&&v.equals(t);if(c&&!B)for(;!v.getNext(m)&&!l;){u=v.getParent();if(u.isBlockBoundary(this.forceBrBreak&&!n&&{br:1})){B=1;x=0;l||u.equals(t);c.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);break}v=u;x=1;l=v.equals(t);q=1}x&&c.setEndAt(v,CKEDITOR.POSITION_AFTER_END); +v=this._getNextSourceNode(v,q,t);if((l=!v)||B&&c)break}if(!f){if(!c)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;f=new CKEDITOR.dom.elementPath(c.startContainer,c.root);v=f.blockLimit;B={div:1,th:1,td:1};f=f.block;!f&&v&&!this.enforceRealBlocks&&B[v.getName()]&&c.checkStartOfBlock()&&c.checkEndOfBlock()&&!v.equals(c.root)?f=v:!f||this.enforceRealBlocks&&f.is(b)?(f=this.range.document.createElement(d),c.extractContents().appendTo(f),f.trim(),c.insertNode(f),h=r=!0): +"li"!=f.getName()?c.checkStartOfBlock()&&c.checkEndOfBlock()||(f=f.clone(!1),c.extractContents().appendTo(f),f.trim(),r=c.splitBlock(),h=!r.wasStartOfBlock,r=!r.wasEndOfBlock,c.insertNode(f)):l||(this._.nextNode=f.equals(t)?null:this._getNextSourceNode(c.getBoundaryNodes().endNode,1,t))}h&&(h=f.getPrevious())&&h.type==CKEDITOR.NODE_ELEMENT&&("br"==h.getName()?h.remove():h.getLast()&&"br"==h.getLast().$.nodeName.toLowerCase()&&h.getLast().remove());r&&(h=f.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&& +"br"==h.getName()&&(!CKEDITOR.env.needsBrFiller||h.getPrevious(k)||h.getNext(k))&&h.remove();this._.nextNode||(this._.nextNode=l||f.equals(t)||!t?null:this._getNextSourceNode(f,1,t));return f},_getNextSourceNode:function(a,b,e){function c(a){return!(a.equals(e)||a.equals(g))}var g=this.range.root;for(a=a.getNextSourceNode(b,null,c);!k(a);)a=a.getNextSourceNode(b,null,c);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new c(this)}}(),CKEDITOR.command=function(c,h){this.uiItems= +[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&c.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,c,a)};this.refresh=function(a,e){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!e.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:e})?!0:h.refresh&&!1!==h.refresh.apply(this, +arguments)};var g;this.checkAllowed=function(a){return a||"boolean"!=typeof g?g=c.activeFilter.checkFeature(this):g};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)}, +setState:function(c){if(this.state==c||c!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=c;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ADDITIONAL_RESOURCE_PARAMS={},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,useComputedState:!0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function c(a, +b,d,f,e){var c,g;a=[];for(c in b){g=b[c];g="boolean"==typeof g?{}:"function"==typeof g?{match:g}:G(g);"$"!=c.charAt(0)&&(g.elements=c);d&&(g.featureName=d.toLowerCase());var k=g;k.elements=l(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var h=/\s*,\s*/,m=void 0;for(m in M){k[m]=l(k[m],h)||null;var p=k,O=H[m],v=l(k[H[m]],h),n=k[m],w=[],J=!0,L=void 0;v?J=!1:v={};for(L in n)"!"==L.charAt(0)&&(L=L.slice(1),w.push(L),v[L]=!0,J=!1);for(;L=w.pop();)n[L]=n["!"+L],delete n["!"+ +L];p[O]=(J?!1:v)||null}k.match=k.match||null;f.push(g);a.push(g)}b=e.elements;e=e.generic;var q;d=0;for(f=a.length;d=--b&&(k&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),p(e))},y=function(a,b){c[a]=1;var d=h[a];delete h[a];for(var f=0;f=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"== +f.$.readyState)f.$.onreadystatechange=null,y(b,!0)}:(f.$.onload=function(){setTimeout(function(){f.$.onload=null;f.$.onerror=null;y(b,!0)},0)},f.$.onerror=function(){f.$.onload=null;f.$.onerror=null;y(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};k&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var c=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={checked:1, +compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(g){for(var a,e,k=0,l;a=this._.htmlPartsRegex.exec(g);){e=a.index;if(e>k)if(k=g.substring(k,e),l)l.push(k);else this.onText(k);k=this._.htmlPartsRegex.lastIndex;if(e=a[1])if(e=e.toLowerCase(),l&&CKEDITOR.dtd.$cdata[e]&&(this.onCDATA(l.join("")), +l=null),!l){this.onTagClose(e);continue}if(l)l.push(a[0]);else if(e=a[3]){if(e=e.toLowerCase(),!/="/.test(e)){var m={},b,d=a[4];a=!!a[5];if(d)for(;b=c.exec(d);){var f=b[1].toLowerCase();b=b[2]||b[3]||b[4]||"";m[f]=!b&&h[f]?f:CKEDITOR.tools.htmlDecodeAttr(b)}this.onTagOpen(e,m,a);!l&&CKEDITOR.dtd.$cdata[e]&&(l=[])}}else if(e=a[2])this.onComment(e)}if(g.length>k)this.onText(g.substring(k,g.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(c){this._.output.push("\x3c", +c)},openTagClose:function(c,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(c,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",c,'\x3d"',h,'"')},closeTag:function(c){this._.output.push("\x3c/",c,"\x3e")},text:function(c){this._.output.push(c)},comment:function(c){this._.output.push("\x3c!--",c,"--\x3e")},write:function(c){this._.output.push(c)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(c){var h=this._.output.join(""); +c&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var c=this.parent.children,h=CKEDITOR.tools.indexOf(c,this),g=this.previous,a=this.next;g&&(g.next=a);a&&(a.previous=g);c.splice(h,1);this.parent=null},replaceWith:function(c){var h=this.parent.children,g=CKEDITOR.tools.indexOf(h,this),a=c.previous=this.previous,e=c.next=this.next;a&&(a.next=c);e&&(e.previous=c);h[g]=c;c.parent=this.parent;this.parent=null}, +insertAfter:function(c){var h=c.parent.children,g=CKEDITOR.tools.indexOf(h,c),a=c.next;h.splice(g+1,0,this);this.next=c.next;this.previous=c;c.next=this;a&&(a.previous=this);this.parent=c.parent},insertBefore:function(c){var h=c.parent.children,g=CKEDITOR.tools.indexOf(h,c);h.splice(g,0,this);this.next=c;(this.previous=c.previous)&&(c.previous.next=this);c.previous=this;this.parent=c.parent},getAscendant:function(c){var h="function"==typeof c?c:"string"==typeof c?function(a){return a.name==c}:function(a){return a.name in +c},g=this.parent;for(;g&&g.type==CKEDITOR.NODE_ELEMENT;){if(h(g))return g;g=g.parent}return null},wrapWith:function(c){this.replaceWith(c);c.add(this);return c},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(c){return c||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(c){this.value=c;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(c, +h){var g=this.value;if(!(g=c.onComment(h,g,this)))return this.remove(),!1;if("string"!=typeof g)return this.replaceWith(g),!1;this.value=g;return!0},writeHtml:function(c,h){h&&this.filter(h);c.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(c){this.value=c;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(c,h){if(!(this.value=c.onText(h,this.value,this)))return this.remove(), +!1},writeHtml:function(c,h){h&&this.filter(h);c.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(c){this.value=c};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(c){var h=this.getAscendant("style");if(h&&h.getAscendant({math:1,svg:1})){var h=CKEDITOR.htmlParser.fragment.fromHtml(this.value),g=new CKEDITOR.htmlParser.basicWriter;c.applyTo(h);h.writeHtml(g);this.value=g.getHtml()}},writeHtml:function(c){c.write(this.value)}})}(), +"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function c(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),g={ol:1,ul:1},a=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}), +e={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(k,l,m){function b(a){var b;if(0l;l++)if(k=e[l]){k=k.exec(c,a,this);if(!1===k)return null;if(k&&k!=a)return this.onNode(c,k);if(a.parent&&!a.name)break}return a},onNode:function(c,a){var e=a.type;return e==CKEDITOR.NODE_ELEMENT?this.onElement(c,a):e==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(c,a.value,a)):e==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(c,a.value,a)):null},onAttribute:function(c,a,e,k){return(e=this.attributesRules[e])?e.exec(c,k,a,this):k}}}); +CKEDITOR.htmlParser.filterRulesGroup=c;c.prototype={add:function(c,a,e){this.rules.splice(this.findIndex(a),0,{value:c,priority:a,options:e})},addMany:function(c,a,e){for(var k=[this.findIndex(a),0],l=0,h=c.length;l/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function p(a){return a.replace(H,function(a,b){return decodeURIComponent(b)})} +function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+n+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function y(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function r(a,b){var d=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})} +function t(a,b,d){var f=[],e=b.config.protectedSource,c=b._.dataStore||(b._.dataStore={id:1}),g=new RegExp("\x3c\\!--\\{cke_temp_"+d+"(comment)?\\}(\\d*?)--\x3e","g"),e=[/|$)/gi,//gi,//gi].concat(e);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_temp_"+d+"comment}"+(f.push(a)-1)+"--\x3e"});for(var k=0;k]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){c[c.id]=decodeURIComponent(b);return"{cke_protected_"+c.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a, +d,f,e){return"\x3c"+d+f+"\x3e"+r(y(e),b)+"\x3c/"+d+"\x3e"})}var v;CKEDITOR.htmlDataProcessor=function(a){var b,e,g=this;this.editor=a;this.dataFilter=b=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;b.addRules(z);b.addRules(A,{applyToAll:!0});b.addRules(c(a,"data"),{applyToAll:!0});e.addRules(C);e.addRules(D,{applyToAll:!0});e.addRules(c(a,"html"),{applyToAll:!0});a.on("toHtml",function(b){var e;var c=window.crypto|| +window.msCrypto;e=c?c.getRandomValues(new Uint32Array(1))[0]:Math.floor(9E9*Math.random()+1E9);b=b.data;var c=b.dataValue,c=v(c),c=t(c,a,e),c=f(c,M),c=d(c,e),c=f(c,F),c=c.replace(I,"$1cke:$2"),c=c.replace(L,"\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-"+e+"-$2"),g=b.context||a.editable().getName(),k;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==g&&(g="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",k=1);g=a.document.createElement(g); +g.setHtml("a"+c);c=g.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+e+"-","ig"),"");k&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(P,"$1$2");c=p(c);c=y(c);e=!1===b.fixForBody?!1:h(b.enterMode,a.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,b.context,e);e&&(k=c,!k.children.length&&CKEDITOR.dtd[k.name][e]&&(e=new CKEDITOR.htmlParser.element(e),k.add(e)));b.dataValue=c},null,null,5);a.on("toHtml",function(b){b.data.filter.applyTo(b.data.dataValue,!0,b.data.dontFilter,
+b.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(g.dataFilter,!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var b=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(!0);a.dataValue=w(b)},null,null,15);a.on("toDataFormat",function(b){var d=b.data.dataValue;b.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^
/i,""));b.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,b.data.context, +h(b.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(g.htmlFilter,!0)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);a.on("toDataFormat",function(b){var d=b.data.dataValue,f=g.writer;f.reset();d.writeChildrenHtml(f);d=f.getHtml(!0);d=y(d);d=r(d,a);b.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,f){var e=this.editor,c,g,k,l; +b&&"object"==typeof b?(c=b.context,d=b.fixForBody,f=b.dontFilter,g=b.filter,k=b.enterMode,l=b.protectedWhitespaces):c=b;c||null===c||(c=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:c,fixForBody:d,dontFilter:f,filter:g||e.filter,enterMode:k||e.enterMode,protectedWhitespaces:l}).dataValue},toDataFormat:function(a,b){var d,f,e;b&&(d=b.context,f=b.filter,e=b.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:f|| +this.editor.filter,context:d,enterMode:e||this.editor.enterMode}).dataValue},protectSource:function(a){return t(a,this.editor)},unprotectSource:function(a){return r(a,this.editor)},unprotectRealComments:function(a){return y(a)}};var B=/(?: |\xa0)$/,n="{cke_protected}",x=CKEDITOR.dtd,q="caption colgroup col thead tfoot tbody".split(" "),u=CKEDITOR.tools.extend({},x.$blockLimit,x.$block),z={elements:{input:m,textarea:m}},A={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}}}},C={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var d=b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length|| +b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},D={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var d=["name","href","src"],f,e=0;ef?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0]; +b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:b,textarea:b},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(D.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var E=/<(a|area|img|input|source)\b([^>]*)>/gi, +G=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,K=/^(href|src|name)$/i,F=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,M=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,H=/([^<]*)<\/cke:encoded>/gi,I=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,P=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/]*?)\/?>(?!\s*<\/cke:\1)/gi;v=function(){function a(b,d){for(var f=0;f/g];return function(b){for(;a(f,b);)for(var d=f,e=0;ee?1:0},g=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, +{type:CKEDITOR.NODE_ELEMENT,add:g.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,e){var c=this,g,h;e=c.getFilterContext(e);if(!c.parent)a.onRoot(e,c);for(;;){g=c.name;if(!(h=a.onElementName(e,g)))return this.remove(),!1;c.name=h;if(!(c=a.onElement(e,c)))return this.remove(),!1;if(c!==this)return this.replaceWith(c),!1;if(c.name==g)break;if(c.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(c),!1;if(!c.name)return this.replaceWithChildren(), +!1}g=c.attributes;var b,d;for(b in g){for(h=g[b];;)if(d=a.onAttributeName(e,b))if(d!=b)delete g[b],b=d;else break;else{delete g[b];break}d&&(!1===(h=a.onAttribute(e,c,d,h))?delete g[d]:g[d]=h)}c.isEmpty||this.filterChildren(a,!1,e);return!0},filterChildren:g.filterChildren,writeHtml:function(a,e){e&&this.filter(e);var c=this.name,g=[],m=this.attributes,b,d;a.openTag(c,m);for(b in m)g.push([b,m[b]]);a.sortAttributes&&g.sort(h);b=0;for(d=g.length;bCKEDITOR.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 d=z,f={range:a,doc:a.document},c=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),c;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(f);f.bookmark=a.createBookmark();delete f.range;var e=this.editor.createRange(); +e.moveToPosition(f.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);f.targetBookmark=e.createBookmark();d.list.detectMerge(f,this);d.table.detectRanges(f,this);d.block.detectMerge(f,this);f.tableContentsRanges?(d.table.deleteRanges(f),a.moveToBookmark(f.bookmark),f.range=a):(a.moveToBookmark(f.bookmark),f.range=a,a.extractContents(d.detectExtractMerge(f)));a.moveToBookmark(f.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(f,this);d.table.purge(f,this);d.block.merge(f,this); +if(b){d=a.startPath();if(f=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var f=d.block.getElementsByTag("span"),e=0,g;if(f)for(;g=f.getItem(e++);)if(!r(g)){f=!0;break a}f=!1}f=!f}f&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),t(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return c},setup:function(){var b=this.editor;this.attachListener(b,"beforeGetData",function(){var a= +this.getData();this.is("textarea")||!1!==b.config.ignoreEmptyParagraph&&(a=a.replace(B,function(a,b){return b}));b.setData(a,null,1)},this);this.attachListener(b,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(b,"afterSetData",function(){this.setData(b.getData(1))},this);this.attachListener(b,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(b,"beforeFocus",function(){var a=b.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()}, this);this.attachListener(b,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(b,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(b,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(b.readOnly);this.attachClass("cke_editable");b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):b.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO|| -this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+b.config.contentsLangDirection);b.keystrokeHandler.blockedKeystrokes[8]=+b.readOnly;b.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){b._.previousScrollTop=b.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?l.$.styleSheet.cssText=h:l.setText(h)):(h=d.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),e.setCustomData("stylesheet",h),h.data("cke-temp",1))}e=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref", -e+1);this.setCustomData("cke_includeReadonly",!b.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 m={8:1,46:1};this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var c=a.data.domEvent.getKey(),d;a=b.getSelection();if(0!==a.getRanges().length){if(c in m){var g,e=a.getRanges()[0],f=e.startPath(),h,l,w,c=8==c;CKEDITOR.env.ie&& -11>CKEDITOR.env.version&&(g=a.getSelectedElement())||(g=k(a))?(b.fire("saveSnapshot"),e.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),g.remove(),e.select(),b.fire("saveSnapshot"),d=1):e.collapsed&&((h=f.block)&&(w=h[c?"getPrevious":"getNext"](n))&&w.type==CKEDITOR.NODE_ELEMENT&&w.is("table")&&e[c?"checkStartOfBlock":"checkEndOfBlock"]()?(b.fire("saveSnapshot"),e[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),e["moveToElementEdit"+(c?"End":"Start")](w),e.select(),b.fire("saveSnapshot"), -d=1):f.blockLimit&&f.blockLimit.is("td")&&(l=f.blockLimit.getAscendant("table"))&&e.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END)&&(w=l[c?"getPrevious":"getNext"](n))?(b.fire("saveSnapshot"),e["moveToElementEdit"+(c?"End":"Start")](w),e.checkStartOfBlock()&&e.checkEndOfBlock()?w.remove():e.select(),b.fire("saveSnapshot"),d=1):(l=f.contains(["td","th","caption"]))&&e.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});b.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&& -this.attachListener(this,"keyup",function(c){c.data.getKeystroke()in m&&!this.getFirst(a)&&(this.appendBogus(),c=b.createRange(),c.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),c.select())});this.attachListener(this,"dblclick",function(a){if(b.readOnly)return!1;a={element:a.data.getTarget()};b.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",f);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var c=a.data.getTarget();c.is("img","hr", -"input","textarea","select")&&!c.isReadOnly()&&(b.getSelection().selectElement(c),c.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&b.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(r,""))){var c=b.createRange();c.moveToElementEditStart(a); -c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var c=a.data.domEvent.getKey();if(c in m&&(a=b.getSelection(),0!==a.getRanges().length)){var c=8==c,d=a.getRanges()[0];a=d.startPath();if(d.collapsed)a:{var e= -a.block;if(e&&d[c?"checkStartOfBlock":"checkEndOfBlock"](!0)&&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")){b.fire("saveSnapshot");f.remove();a=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))a=void 0;else{b.fire("saveSnapshot");var k;(k=(c?d:e).getBogus())&&k.remove();k=b.getSelection();f=k.createBookmarks();(c?e:d).moveChildren(c? -d:e,!1);a.lastElement.mergeSiblings();g(e,d,!c);k.selectBookmarks(f);a=!0}}else a=!1}else c=d,k=a.block,d=c.endPath().block,k&&d&&!k.equals(d)?(b.fire("saveSnapshot"),(e=k.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(k,!1),a.lastElement.mergeSiblings(),g(k,d,!0)),c=b.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),a=!0):a=!1;if(!a)return;b.getSelection().scrollIntoView(); -b.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),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())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b=null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(a){var b=a.editor;b.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")|| -a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});b.on("selectionChange",function(a){if(!b.readOnly){var c=b.getSelection();c&&!c.isLocked&&(c=b.checkDirty(),b.fire("lockSnapshot"),e(a),b.fire("unlockSnapshot"),!c&&b.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-multiline","true");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 g=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",g)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"); -n=CKEDITOR.dom.walker.whitespaces(!0);w=CKEDITOR.dom.walker.bookmark(!1,!0);x=CKEDITOR.dom.walker.empty();t=CKEDITOR.dom.walker.bogus();r=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;u=function(){function c(a){return a.type==CKEDITOR.NODE_ELEMENT}function d(a,b){var g,e,f,k,h=[],l=b.range.startContainer;g=b.range.startPath();for(var l=n[l.getName()],m=0,w=a.getChildren(),p=w.count(),v=-1,r=-1,u=0,F=g.contains(n.$list);m< -p;++m)g=w.getItem(m),c(g)?(f=g.getName(),F&&f in CKEDITOR.dtd.$list?h=h.concat(d(g,b)):(k=!!l[f],"br"!=f||!g.data("cke-eol")||m&&m!=p-1||(u=(e=m?h[m-1].node:w.getItem(m+1))&&(!c(e)||!e.is("br")),e=e&&c(e)&&n.$block[e.getName()]),-1!=v||k||(v=m),k||(r=m),h.push({isElement:1,isLineBreak:u,isBlock:g.isBlockBoundary(),hasBlockSibling:e,node:g,name:f,allowed:k}),e=u=0)):h.push({isElement:0,node:g,allowed:1});-1CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var g=d.startContainer,e=g.getAscendant("table",1),f=!1;c(e.getElementsByTag("td"));c(e.getElementsByTag("th"));e=d.clone();e.setStart(g,0);e=a(e).lastBackward();e||(e=d.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),f=!0);e||(e=g);e.is("table")?(d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e= -b(e,"tr",f)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",f)),(g=e.getBogus())&&g.remove(),d.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();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.$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,g;g=b.clone();g.setStart(c,0);g=a(g).lastBackward();g||(g=b.clone(),g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),d=!0);g||(g=c);g.is(CKEDITOR.dtd.$list)?(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),g.remove()):((c=g.getBogus())&&c.remove(),b.moveToPosition(g,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();y={eol:{detect:function(a,b){var c=a.range,d=c.clone(),g=c.clone(),e=new CKEDITOR.dom.elementPath(c.startContainer, -b),f=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);g.collapse();e.block&&d.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(c.setStartAfter(e.block),a.prependEolBr=1);f.block&&g.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(c.setEndBefore(f.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||!t(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(d,b),e=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),f;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(g.blockLimit.is({tr:1,table:1})){var k=g.contains("table").getParent();f=function(a){return!a.equals(k)}}else if(g.block&& -g.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!e.equals(c))){var h=g.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(h)}}f||(f=function(a){return!a.equals(g.block)&&!a.equals(g.blockLimit)});this.rebuildFragment(a,b,d,f)},rebuildFragment:function(a,b,c,d){for(var g;c&&!c.equals(b)&&d(c);)g=c.clone(0,1),a.fragment.appendTo(g),a.fragment=g,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer, -d=a.startOffset,g=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};v=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,g){a(d);a(g,1);for(var e;e=g.getNext();)e.insertAfter(d),d=e;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), -g=d.startPath(),e=d.endPath(),f=g.contains(CKEDITOR.dtd.$list),k=e.contains(CKEDITOR.dtd.$list);a.mergeList=f&&k&&f.getParent().equals(k.getParent())&&!f.equals(k);a.mergeListItems=g.block&&e.block&&g.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode, -g=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(g,c);if(a.mergeList){var k=e.contains(CKEDITOR.dtd.$list),h=f.contains(CKEDITOR.dtd.$list);k.equals(h)||(h.moveChildren(k),h.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),e.equals(f)||b(f,d,g));d.remove();g.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,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(g,c),e=e.block,f=f.block;e&&f&&!e.equals(f)&&b(f,d,g);d.remove();g.remove()}}},table:function(){function a(c){var g=[],e,f=new CKEDITOR.dom.walker(c),k=c.startPath().contains(d),h=c.endPath().contains(d),l={};f.guard=function(a, -f){if(a.type==CKEDITOR.NODE_ELEMENT){var m="visited_"+(f?"out":"in");if(a.getCustomData(m))return;CKEDITOR.dom.element.setMarker(l,a,m,1)}if(f&&k&&a.equals(k))e=c.clone(),e.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!f&&h&&a.equals(h))e=c.clone(),e.setStartAt(h,CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(m=!f)m=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!k||b(a,k))&&(!h||b(a,h));if(!m&&(m=f))if(a.is(d))var m=k&&k.getAscendant("table",!0),n=h&&h.getAscendant("table",!0),w=a.getAscendant("table", -!0),m=m&&m.contains(w)||n&&n.contains(w);else m=void 0;m&&(e=c.clone(),e.selectNodeContents(a),g.push(e))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(l);return g}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(c);return g===CKEDITOR.POSITION_IDENTICAL?!1:0===(g&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),g=0;c.evaluator=function(a){a.type== -CKEDITOR.NODE_ELEMENT&&a.is(d)&&++g};c.checkForward();if(1e&&g&&g.intersectsNode(c.$)){var f= -[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==c.$&&d.anchorOffset>e&&(f[0].offset-=e);d.focusNode==c.$&&d.focusOffset>e&&(f[1].offset-=e)}}c.setText(w(c.getText(),1));f&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(f[0].node,f[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(f[1].node,f[1].offset))}}function w(a,b){return b?a.replace(y,function(a,b){return b?" ":""}):a.replace(p,"")}function x(a,b){var c= -b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",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;width:0;height:0;overflow:hidden;")+'"\x3e'+c+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),g=a.createRange(),e=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);g.setStartAt(c,CKEDITOR.POSITION_AFTER_START); -g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([g]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function t(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var g=a.getSelection(),e=g.getRanges()[0];g.isCollapsed()&&(e=e[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable")&&(g=g.getStartElement(),!g.isBlockBoundary()||""!==(void 0===g.$.textContent? -g.$.innerText:g.$.textContent)||8!==d&&46!==d||(g.remove(),a.fire("saveSnapshot")),a.getSelection().fake(e),c.data.preventDefault(),c.cancel())}}}function r(a){for(var b=0;b=d.getLength()?k.setStartAfter(d):k.setStartBefore(d));g&&g.type==CKEDITOR.NODE_TEXT&&(f?k.setEndAfter(g):k.setEndBefore(g));d=new CKEDITOR.dom.walker(k);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var g=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(d),g.collapsed||a.splice(b+1,0,g));return!0}return!1}; -d.next()}}return a}var u="function"!=typeof window.getSelection,z=1,p=CKEDITOR.tools.repeat("​",7),y=new RegExp(p+"( )?","g"),v,q,B,A=CKEDITOR.dom.walker.invisible(1),C=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(),g;if(!c.readOnly)return(g=d.moveToClosestEditablePosition(b.selected,a))||(g=d.moveToClosestEditablePosition(b.selected, -!a)),g&&c.getSelection().selectRanges([d]),c.fire("saveSnapshot"),b.selected.remove(),g||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d])),c.fire("saveSnapshot"),!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);w.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){var b,c;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(c=g(b))&&!c.equals(h)&&(b.selectElement(c),a.data.preventDefault()))}function g(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")}, -!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var e=c.document,f=CKEDITOR.document,h=c.editable(),m=e.getBody(),w=e.getDocumentElement(),p=h.isInline(),v,r;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==v&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==h.$&&(a=c.createRange(),a.moveToElementEditStart(h),a.select())},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(v&&(CKEDITOR.env.webkit|| -CKEDITOR.env.gecko)){v=c._.previousActive&&c._.previousActive.equals(e.getActive());var a=null!=c._.previousScrollTop&&c._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&v&&a&&(h.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(v);v=0},null,null,-1);h.attachListener(h,"mousedown",function(){v=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||p)u?h.attachListener(h,"beforedeactivate",a,null,null,-1):h.attachListener(c,"selectionCheck",a,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko? -"focusout":"blur",function(){var a=r&&(r.isFake||2>r.getRanges().length);CKEDITOR.env.gecko&&!p&&a||(c.lockSelection(r),v=1)},null,null,-1),h.attachListener(h,"mousedown",function(){v=0});if(CKEDITOR.env.ie&&!p){var q;h.attachListener(h,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(q=c.window.getScrollPosition()))});h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&q&&(c.document.$.documentElement.scrollLeft=q.x,c.document.$.documentElement.scrollTop= -q.y);q=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var y,z;w.on("mousedown",function(a){function b(a){a=a.data.$;if(y){var c=m.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}y.setEndPoint(0>z.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);y.select()}}function c(){w.removeListener("mousemove",b);f.removeListener("mouseup",c);w.removeListener("mouseup",c);y.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)w.on("mousedown",function(a){a.data.getTarget().is("html")&&(f.on("mouseup",b),w.on("mouseup",b))})}}h.attachListener(h,"selectionchange",k,c);h.attachListener(h,"keyup",l,c);h.attachListener(h,"touchstart",l,c);h.attachListener(h,"touchend",l,c);CKEDITOR.env.ie&&h.attachListener(h, -"keydown",d,c);if(p&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var x;h.attachListener(h,"mousedown",function(){x=1});h.attachListener(e.getDocumentElement(),"mouseup",function(){x&&l.call(c);x=0})}else h.attachListener(CKEDITOR.env.ie?h:e.getDocumentElement(),"mouseup",l,c);CKEDITOR.env.webkit&&h.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h.hasFocus&&n(h)}},null,null,-1);h.attachListener(h,"keydown", -t(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=C[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")? -(n(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){n(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?k:l).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&& -"wysiwyg"==this.mode&&"recreating"!==this.status?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();return b&&b.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var 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:z++;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,g;if(a)if(a.getRangeAt)d=(g=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer); -else{try{g=a.createRange()}catch(e){}d=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var E={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1, -select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:w,_createFillingCharSequenceNode:g,FILLING_CHAR_SEQUENCE:p});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=u?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:u?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(g){}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&&E[d.childNodes[c.startOffset].nodeName.toLowerCase()]&& -(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=u?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 g=d.children,e,f,k=b.duplicate(),h=0,l=g.length-1,m=-1,n,w;h<=l;)if(m=Math.floor((h+l)/2),e=g[m],k.moveToElementText(e),n=k.compareEndPoints("StartToStart",b),0n)h=m+1;else return{container:d,offset:a(e)}; -if(-1==m||m==g.length-1&&0>n){k.moveToElementText(d);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;g=d.childNodes;if(!k)return e=g[g.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:g.length}:{container:e,offset:e.nodeValue.length};for(d=g.length;0c.length?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=z++},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,e=b&&b._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,f,k=0;k]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g," ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var k=a.getDocument().createElement("div"); -k.append(e);e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";e.copyAttributes(k.getFirst());e=k.getFirst().remove()}else e.setHtml(f);b=e}else f?b=w(c?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;(h=c.getPrevious(D))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")&&(d=n(h.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":c.setHtml(d),h.remove())}else c&&u(b)}function g(a){var b=[];n(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 n(a,b,c){var d="",g="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(g=c);return""});return d+a.replace(b,c)+g}function w(a,b){var c;1=d&&a<=e}function d(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,d){this._.initialColorCode=a;this._.defaultValue=d;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue; -var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb", -a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type===CKEDITOR.tools.color.TYPE_HSL&&a?a=[this._.hue,this._.saturation,this._.lightness]:(a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]));return this._.formatHslString("hsl", -a[0],a[1],a[2])},getHsla:function(){var a;if(!this._.isValidColor)return this._.defaultValue;a=this._.type===CKEDITOR.tools.color.TYPE_HSL?[this._.hue,this._.saturation,this._.lightness]:this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,type:0,hue:0,saturation:0,lightness:0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,d, -e,b){return CKEDITOR.tools.array.map([a,d,e],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-b*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(a,e,f,b){a="#"+d(a)+d(e)+d(f);void 0!==b&&(a+=d(b));return a.toUpperCase()},formatRgbString:function(a,d,e,b,c){d=[d,e,b];void 0!==c&&d.push(c);return a+"("+d.join(",")+")"},formatHslString:function(a,d,e,b,c){return a+"("+d+","+e+"%,"+b+"%"+(void 0!==c?","+c:"")+")"},parseInput:function(a){if("string"!== -typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var d=this._.matchStringToNamedColor(a);d&&(a=d);var d=this._.extractColorChannelsFromHex(a),e=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=d||e||a)?(this._.type=a.type,this._.red=a.red,this._.green=a.green,this._.blue=a.blue,this._.alpha=a.alpha,a.type===CKEDITOR.tools.color.TYPE_HSL&&(this._.hue=a.hue,this._.saturation=a.saturation,this._.lightness=a.lightness)):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]|| -null},extractColorChannelsFromHex:function(a){-1===a.indexOf("#")&&(a="#"+a);a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));a.match(CKEDITOR.tools.color.hex4CharsRegExp)&&(a=this._.hex4ToHex8(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var d=1;a[7]&&a[8]&&(d=parseInt(a[7]+a[8],16),d/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,d=Number(d.toFixed(1)));return{type:CKEDITOR.tools.color.TYPE_RGB, -red:parseInt(a[1]+a[2],16),green:parseInt(a[3]+a[4],16),blue:parseInt(a[5]+a[6],16),alpha:d}},extractColorChannelsFromRgba:function(a){var d=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!d||3>d.length||4d.length||4=a?(k=d.createText(""),k.insertAfter(this)):(e=d.createText(""),e.insertAfter(k),e.remove()));return k},substring:function(e, -h){return"number"!=typeof h?this.$.nodeValue.substr(e):this.$.nodeValue.substring(e,h)}}),function(){function e(e,a,d){var h=e.serializable,l=a[d?"endContainer":"startContainer"],m=d?"endOffset":"startOffset",b=h?a.document.getById(e.startNode):e.startNode;e=h?a.document.getById(e.endNode):e.endNode;l.equals(b.getPrevious())?(a.startOffset=a.startOffset-l.getLength()-e.getPrevious().getLength(),l=e.getNext()):l.equals(e.getPrevious())&&(a.startOffset-=l.getLength(),l=e.getNext());l.equals(b.getParent())&& -a[m]++;l.equals(e.getParent())&&a[m]++;a[d?"endContainer":"startContainer"]=l;return a}CKEDITOR.dom.rangeList=function(e){if(e instanceof CKEDITOR.dom.rangeList)return e;e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[];return CKEDITOR.tools.extend(e,h)};var h={createIterator:function(){var e=this,a=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(l){h=void 0===h?0:h+1;var m=e[h];if(m&&1b?-1:1}),f=0, -h;fCKEDITOR.env.version?a[k].$.styleSheet.cssText+=h:a[k].$.innerHTML+=h}}var k={};CKEDITOR.skin={path:e,loadPart:function(a,b){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e()+"skin.js"),function(){f(a,b)}):f(a,b)}, -getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,b,d,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:d||0,bgsize:e||"16px"})},getIconStyle:function(a,b,d,e,f){var h;a&&(a=a.toLowerCase(),b&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=d||h&&h.path||"";e=e||h&&h.offset;f=f||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+e+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype, -{getUiColor:function(){return this.uiColor},setUiColor:function(c){var g=a(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof c&&(e=c(this,"editor"),f=c(this,"panel"));a=[[b,a]];d([g],e,a);d(m,f,a)}).call(this,c)}});var l="cke_ui_color",m=[],b=/\$color/g;CKEDITOR.on("instanceLoaded",function(c){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var g=c.editor;c=function(c){c=(c.data[0]||c.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(); -if(!c.getById("cke_ui_color")){var e=a(c);m.push(e);g.on("destroy",function(){m=CKEDITOR.tools.array.filter(m,function(a){return e!==a})});(c=g.getUiColor())&&d([e],CKEDITOR.skin.chameleon(g,"panel"),[[b,c]])}};g.on("panelShow",c);g.on("menuShow",c);g.config.uiColor&&g.setUiColor(g.config.uiColor)}})}(),function(){var e=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); -e.appendTo(CKEDITOR.document.getHead());try{var h=e.getComputedStyle("border-top-color"),f=e.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=f)}catch(a){CKEDITOR.env.hc=!1}e.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(e=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;hh;h++){var l=h,m;m=parseInt(d[h],16);m=("0"+(0>a?0|m*(1+a):0|m+(255-m)*a).toString(16)).slice(-2);d[l]=m}return"#"+d.join("")}}(),h={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "), +this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+b.config.contentsLangDirection);b.keystrokeHandler.blockedKeystrokes[8]=+b.readOnly;b.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){b._.previousScrollTop=b.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?h.$.styleSheet.cssText=e:h.setText(e)):(e=f.appendStyleText(e),e=new CKEDITOR.dom.element(e.ownerNode||e.owningElement),c.setCustomData("stylesheet",e),e.data("cke-temp",1))}c=f.getCustomData("stylesheet_ref")||0;f.setCustomData("stylesheet_ref", +c+1);this.setCustomData("cke_includeReadonly",!b.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 p={8:1,46:1};this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var d=a.data.domEvent.getKey(),f,c=b.getSelection();if(0!==c.getRanges().length){if(d in p){var e;a=c.getRanges()[0];var g=a.startPath(),h,w,n,d=8==d,q=!1;if(CKEDITOR.env.ie&& +11>CKEDITOR.env.version&&c.getSelectedElement())e=c.getSelectedElement();else if(k(c)){var t=new CKEDITOR.dom.walker(a),v=a.collapsed?a.startContainer:t.next(),q=!1,u;if(a.checkStartOfBlock()){u=a.startPath().block||a.startPath().blockLimit;var K=u.getName();u=-1!==CKEDITOR.tools.array.indexOf(["dd","dt","li"],K)&&null===u.getPrevious()}else u=!1;if(u){for(;v&&!q;)q=v.$.nodeName.toLowerCase(),q=!!A[q],v=t.next();t=m(a.startPath());v=m(a.endPath());q=q||t!==v}else q=void 0;q||(e=l(c))}e||q?(b.fire("saveSnapshot"), +q?((f=a.startContainer.getAscendant(A,!0))?(a.setStart(f,0),a.enlarge(CKEDITOR.ENLARGE_ELEMENT),e=a):e=null,e.deleteContents()):(a.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove()),a.select(),b.fire("saveSnapshot"),f=1):a.collapsed&&((h=g.block)&&(n=h[d?"getPrevious":"getNext"](y))&&n.type==CKEDITOR.NODE_ELEMENT&&n.is("table")&&a[d?"checkStartOfBlock":"checkEndOfBlock"]()?(b.fire("saveSnapshot"),a[d?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),a["moveToElementEdit"+(d?"End":"Start")](n), +a.select(),b.fire("saveSnapshot"),f=1):g.blockLimit&&g.blockLimit.is("td")&&(w=g.blockLimit.getAscendant("table"))&&a.checkBoundaryOfElement(w,d?CKEDITOR.START:CKEDITOR.END)&&(n=w[d?"getPrevious":"getNext"](y))?(b.fire("saveSnapshot"),a["moveToElementEdit"+(d?"End":"Start")](n),a.checkStartOfBlock()&&a.checkEndOfBlock()?n.remove():a.select(),b.fire("saveSnapshot"),f=1):(w=g.contains(["td","th","caption"]))&&a.checkBoundaryOfElement(w,d?CKEDITOR.START:CKEDITOR.END)&&(f=1))}return!f}});b.blockless&& +CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(d){d.data.getKeystroke()in p&&!this.getFirst(a)&&(this.appendBogus(),d=b.createRange(),d.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),d.select())});this.attachListener(this,"dblclick",function(a){if(b.readOnly)return!1;a={element:a.data.getTarget()};b.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",g);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var d= +a.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(b.getSelection().selectElement(d),d.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&b.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(B, +""))){var d=b.createRange();d.moveToElementEditStart(a);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var d=a.data.domEvent.getKey();if(d in p&&(a=b.getSelection(),0!==a.getRanges().length)){var d= +8==d,f=a.getRanges()[0];a=f.startPath();if(f.collapsed)a:{var c=a.block;if(c&&f[d?"checkStartOfBlock":"checkEndOfBlock"](!0)&&f.moveToClosestEditablePosition(c,!d)&&f.collapsed){if(f.startContainer.type==CKEDITOR.NODE_ELEMENT){var e=f.startContainer.getChild(f.startOffset-(d?1:0));if(e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("hr")){b.fire("saveSnapshot");e.remove();a=!0;break a}}f=f.startPath().block;if(!f||f&&f.contains(c))a=void 0;else{b.fire("saveSnapshot");var g;(g=(d?f:c).getBogus())&&g.remove(); +g=b.getSelection();e=g.createBookmarks();(d?c:f).moveChildren(d?f:c,!1);a.lastElement.mergeSiblings();w(c,f,!d);g.selectBookmarks(e);a=!0}}else a=!1}else d=f,g=a.block,f=d.endPath().block,g&&f&&!g.equals(f)?(b.fire("saveSnapshot"),(c=g.getBogus())&&c.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),f.getParent()&&(f.moveChildren(g,!1),a.lastElement.mergeSiblings(),w(g,f,!0)),d=b.getSelection().getRanges()[0],d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(), +d.select(),a=!0):a=!1;if(!a)return;b.getSelection().scrollIntoView();b.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),b=a.getHead(); +if(b.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b=null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(a){var b=a.editor;b.on("insertElement", +function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});b.on("selectionChange",function(a){if(!b.readOnly){var d=b.getSelection();d&&!d.isLocked&&(d=b.checkDirty(),b.fire("lockSnapshot"),c(a),b.fire("unlockSnapshot"),!d&&b.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a= +b.editable();if(a&&a.isInline()){var d=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var f=b.fire("ariaEditorHelpLabel",{}).label;if(f&&(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var c=CKEDITOR.tools.getNextId(),f=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+c+'" class\x3d"cke_voice_label"\x3e'+f+"\x3c/span\x3e");d.append(f);a.changeAttr("aria-describedby",c)}}})}); +CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");y=CKEDITOR.dom.walker.whitespaces(!0);r=CKEDITOR.dom.walker.bookmark(!1,!0);t=CKEDITOR.dom.walker.empty();v=CKEDITOR.dom.walker.bogus();B=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;n=function(){function c(a){return a.type==CKEDITOR.NODE_ELEMENT}function e(a,b){var d,f,g,k,h=[],l=b.range.startContainer; +d=b.range.startPath();for(var l=p[l.getName()],m=0,n=a.getChildren(),w=n.count(),L=-1,q=-1,t=0,v=d.contains(p.$list);mCKEDITOR.env.version&&f.getChildCount()&&f.getFirst().remove())}return function(f){var c=f.startContainer,e=c.getAscendant("table",1),g=!1;d(e.getElementsByTag("td"));d(e.getElementsByTag("th"));e=f.clone();e.setStart(c,0);e=a(e).lastBackward();e||(e=f.clone(),e.setEndAt(c, +CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),g=!0);e||(e=c);e.is("table")?(f.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),f.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=b(e,"tr",g)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",g)),(c=e.getBogus())&&c.remove(),f.moveToPosition(e,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();q=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 d=b.startContainer,f=!1,c;c=b.clone();c.setStart(d,0);c=a(c).lastBackward();c||(c=b.clone(),c.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),c=a(c).lastForward(),f=!0);c||(c=d);c.is(CKEDITOR.dtd.$list)?(b.setStartAt(c,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),c.remove()):((d=c.getBogus())&&d.remove(),b.moveToPosition(c,f?CKEDITOR.POSITION_AFTER_START: +CKEDITOR.POSITION_BEFORE_END),b.select())}}();u={eol:{detect:function(a,b){var d=a.range,f=d.clone(),c=d.clone(),e=new CKEDITOR.dom.elementPath(d.startContainer,b),g=new CKEDITOR.dom.elementPath(d.endContainer,b);f.collapse(1);c.collapse();e.block&&f.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(d.setStartAfter(e.block),a.prependEolBr=1);g.block&&c.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(d.setEndBefore(g.block),a.appendEolBr=1)},fix:function(a,b){var d=b.getDocument(),f;a.appendEolBr&&(f= +this.createEolBr(d),a.fragment.append(f));!a.prependEolBr||f&&!f.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode,b=b.endNode;!b||!v(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,f=d.getCommonAncestor(),c=new CKEDITOR.dom.elementPath(f,b),e=new CKEDITOR.dom.elementPath(d.startContainer,b), +d=new CKEDITOR.dom.elementPath(d.endContainer,b),g;f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent());if(c.blockLimit.is({tr:1,table:1})){var k=c.contains("table").getParent();g=function(a){return!a.equals(k)}}else if(c.block&&c.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!e.equals(d))){var h=c.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(h)}}g||(g=function(a){return!a.equals(c.block)&&!a.equals(c.blockLimit)});this.rebuildFragment(a, +b,f,g)},rebuildFragment:function(a,b,d,f){for(var c;d&&!d.equals(b)&&f(d);)c=d.clone(0,1),a.fragment.appendTo(c),a.fragment=c,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer,f=a.startOffset,c=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++f==c&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};z=function(){function a(b,d){var f=b.getParent();if(f.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](f)}function f(b,d,c){a(d);a(c,1);for(var e;e= +c.getNext();)e.insertAfter(d),d=e;t(b)&&b.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),f=d.startPath(),e=d.endPath(),g=f.contains(CKEDITOR.dtd.$list),k=e.contains(CKEDITOR.dtd.$list);a.mergeList=g&&k&&g.getParent().equals(k.getParent())&&!g.equals(k);a.mergeListItems=f.block&&e.block&&f.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList|| +a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,b){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,c=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,b),g=new CKEDITOR.dom.elementPath(c,b);if(a.mergeList){var k=e.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);k.equals(h)||(h.moveChildren(k),h.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem), +g=g.contains(CKEDITOR.dtd.$listItem),e.equals(g)||f(g,d,c));d.remove();c.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(b);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,b){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,c=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,b),g=new CKEDITOR.dom.elementPath(c, +b),e=e.block,g=g.block;e&&g&&!e.equals(g)&&f(g,d,c);d.remove();c.remove()}}},table:function(){function a(f){var c=[],e,g=new CKEDITOR.dom.walker(f),k=f.startPath().contains(d),h=f.endPath().contains(d),l={};g.guard=function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT){var m="visited_"+(g?"out":"in");if(a.getCustomData(m))return;CKEDITOR.dom.element.setMarker(l,a,m,1)}if(g&&k&&a.equals(k))e=f.clone(),e.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),c.push(e);else if(!g&&h&&a.equals(h))e=f.clone(),e.setStartAt(h, +CKEDITOR.POSITION_AFTER_START),c.push(e);else{if(m=!g)m=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!k||b(a,k))&&(!h||b(a,h));if(!m&&(m=g))if(a.is(d))var m=k&&k.getAscendant("table",!0),p=h&&h.getAscendant("table",!0),n=a.getAscendant("table",!0),m=m&&m.contains(n)||p&&p.contains(n);else m=void 0;m&&(e=f.clone(),e.selectNodeContents(a),c.push(e))}};g.lastForward();CKEDITOR.dom.element.clearAllMarkers(l);return c}function b(a,d){var f=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,c=a.getPosition(d); +return c===CKEDITOR.POSITION_IDENTICAL?!1:0===(c&f)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,f=b.clone();f.enlarge(CKEDITOR.ENLARGE_ELEMENT);var f=new CKEDITOR.dom.walker(f),c=0;f.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++c};f.checkForward();if(1e&&c&&c.intersectsNode(d.$)){var g=[{node:f.anchorNode,offset:f.anchorOffset},{node:f.focusNode,offset:f.focusOffset}];f.anchorNode==d.$&&f.anchorOffset>e&&(g[0].offset-=e);f.focusNode==d.$&&f.focusOffset>e&&(g[1].offset-=e)}}d.setText(w(d.getText(),1));g&&(d=a.getDocument().$, +f=d.getSelection(),d=d.createRange(),d.setStart(g[0].node,g[0].offset),d.collapse(!0),f.removeAllRanges(),f.addRange(d),f.extend(g[1].node,g[1].offset))}}function w(a,b){return b?a.replace(x,function(a,b){return b?" ":""}):a.replace(n,"")}function y(a,b){var d=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+ +'"\x3e'+d+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var f=a.getSelection(1),c=a.createRange(),e=f.root.on("selectionchange",function(a){a.cancel()},null,null,0);c.setStartAt(d,CKEDITOR.POSITION_AFTER_START);c.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);f.selectRanges([c]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function r(a){var b={37:1,39:1,8:1,46:1};return function(d){var f=d.data.getKeystroke();if(b[f]){var c=a.getSelection(),e=c.getRanges()[0]; +c.isCollapsed()&&(e=e[38>f?"getPreviousEditableNode":"getNextEditableNode"]())&&e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable")&&(c=c.getStartElement(),!c.isBlockBoundary()||""!==(void 0===c.$.textContent?c.$.innerText:c.$.textContent)||8!==f&&46!==f||(c.remove(),a.fire("saveSnapshot")),a.getSelection().fake(e),d.data.preventDefault(),d.cancel())}}}function t(a){for(var b=0;b=f.getLength()?k.setStartAfter(f):k.setStartBefore(f));c&&c.type==CKEDITOR.NODE_TEXT&&(g?k.setEndAfter(c):k.setEndBefore(c));f=new CKEDITOR.dom.walker(k);f.evaluator=function(f){if(f.type==CKEDITOR.NODE_ELEMENT&& +f.isReadOnly()){var c=d.clone();d.setEndBefore(f);d.collapsed&&a.splice(b--,1);f.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(c.setStartAfter(f),c.collapsed||a.splice(b+1,0,c));return!0}return!1};f.next()}}return a}var v="function"!=typeof window.getSelection,B=1,n=CKEDITOR.tools.repeat("​",7),x=new RegExp(n+"( )?","g"),q,u,z,A=CKEDITOR.dom.walker.invisible(1),C=function(){function a(b){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([d]); +return!1}}function b(a){return function(b){var d=b.editor,f=d.createRange(),c;if(!d.readOnly)return(c=f.moveToClosestEditablePosition(b.selected,a))||(c=f.moveToClosestEditablePosition(b.selected,!a)),c&&d.getSelection().selectRanges([f]),d.fire("saveSnapshot"),b.selected.remove(),c||(f.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([f])),d.fire("saveSnapshot"),!1}}var d=a(),f=a(1);return{37:d,38:d,39:f,40:f,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a= +d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom",function(){function a(){t=new CKEDITOR.dom.selection(d.getSelection());t.lock()}function b(){g.removeListener("mouseup",b);n.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,d=a.createRange();"None"!=a.type&&d.parentElement()&&d.parentElement().ownerDocument==e.$&&d.select()}function f(a){var b,d;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(d=c(b))&& +!d.equals(h)&&(b.selectElement(d),a.data.preventDefault()))}function c(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var e=d.document,g=CKEDITOR.document,h=d.editable(),m=e.getBody(),n=e.getDocumentElement(),q=h.isInline(),w,t;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==w&&(a=d.getSelection().getNative())&& +a.isCollapsed&&a.anchorNode==h.$&&(a=d.createRange(),a.moveToElementEditStart(h),a.select())},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(w&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){w=d._.previousActive&&d._.previousActive.equals(e.getActive());var a=null!=d._.previousScrollTop&&d._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&w&&a&&(h.$.scrollTop=d._.previousScrollTop)}d.unlockSelection(w);w=0},null,null,-1);h.attachListener(h, +"mousedown",function(){w=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||q)v?h.attachListener(h,"beforedeactivate",a,null,null,-1):h.attachListener(d,"selectionCheck",a,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=t&&(t.isFake||2>t.getRanges().length);CKEDITOR.env.gecko&&!q&&a||(d.lockSelection(t),w=1)},null,null,-1),h.attachListener(h,"mousedown",function(){w=0});if(CKEDITOR.env.ie&&!q){var u;h.attachListener(h,"mousedown",function(a){2== +a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(u=d.window.getScrollPosition()))});h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&u&&(d.document.$.documentElement.scrollLeft=u.x,d.document.$.documentElement.scrollTop=u.y);u=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var x,B;n.on("mousedown",function(a){function b(a){a=a.data.$;if(x){var d=m.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(f){}x.setEndPoint(0> +B.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);x.select()}}function d(){n.removeListener("mousemove",b);g.removeListener("mouseup",d);n.removeListener("mouseup",d);x.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)n.on("mousedown",function(a){a.data.getTarget().is("html")&& +(g.on("mouseup",b),n.on("mouseup",b))})}}h.attachListener(h,"selectionchange",k,d);h.attachListener(h,"keyup",l,d);h.attachListener(h,"touchstart",l,d);h.attachListener(h,"touchend",l,d);CKEDITOR.env.ie&&h.attachListener(h,"keydown",f,d);if(q&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var y;h.attachListener(h,"mousedown",function(){y=1});h.attachListener(e.getDocumentElement(),"mouseup",function(){y&&l.call(d);y=0})}else h.attachListener(CKEDITOR.env.ie?h:e.getDocumentElement(),"mouseup",l,d);CKEDITOR.env.webkit&& +h.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h.hasFocus&&p(h)}},null,null,-1);h.attachListener(h,"keydown",r(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&b()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",b,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection;delete d._.hiddenSelectionContainer; +d.selectionChange(1)});d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=d.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=d.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);d.on("key",function(a){if("wysiwyg"==d.mode){var b=d.getSelection();if(b.isFake){var f=C[a.data.keyCode];if(f)return f({editor:d,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})}); +if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?(p(a),a.editor.fire("selectionCheck")):d.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){p(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange= +function(a){(a?k:l).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode&&"recreating"!==this.status?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();return b&&b.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE? +(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var 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 d=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:B++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache), +this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var f,c;if(a)if(a.getRangeAt)f=(c=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(c.commonAncestorContainer);else{try{c=a.createRange()}catch(e){}f=c&&CKEDITOR.dom.element.get(c.item&&c.item(0)||c.parentElement())}if(!f||f.type!=CKEDITOR.NODE_ELEMENT&&f.type!=CKEDITOR.NODE_TEXT||!this.root.equals(f)&&!this.root.contains(f))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 D={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:w,_createFillingCharSequenceNode:f,FILLING_CHAR_SEQUENCE:n});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel= +v?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:v?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),f=d.type;"Text"==f&&(b=CKEDITOR.SELECTION_TEXT);"Control"==f&&(b=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(c){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)b=CKEDITOR.SELECTION_NONE; +else if(1==d.rangeCount){var d=d.getRangeAt(0),f=d.startContainer;f==d.endContainer&&1==f.nodeType&&1==d.endOffset-d.startOffset&&D[f.childNodes[d.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=v?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,d){b=b.duplicate();b.collapse(d);var f=b.parentElement();if(!f.hasChildNodes())return{container:f,offset:0};for(var c=f.children,e,g,k=b.duplicate(),h=0, +l=c.length-1,m=-1,p,n;h<=l;)if(m=Math.floor((h+l)/2),e=c[m],k.moveToElementText(e),p=k.compareEndPoints("StartToStart",b),0p)h=m+1;else return{container:f,offset:a(e)};if(-1==m||m==c.length-1&&0>p){k.moveToElementText(f);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;c=f.childNodes;if(!k)return e=c[c.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:f,offset:c.length}:{container:e,offset:e.nodeValue.length};for(f=c.length;0d.length?this.selectElement(b):this.selectRanges(d))}},reset:function(){this._.cache= +{};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var d=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!d&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=B++},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,k=0;k]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g, +" ");g=g.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var k=a.getDocument().createElement("div");k.append(e);e.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";e.copyAttributes(k.getFirst());e=k.getFirst().remove()}else e.setHtml(g);b=e}else g?b=w(d?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(c){var d=b,h;(h=d.getPrevious(F))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")&&(c=p(h.getHtml(),/\n$/,"")+"\n\n"+p(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+c+"\x3c/pre\x3e": +d.setHtml(c),h.remove())}else d&&v(b)}function f(a){var b=[];p(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,d){return b+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,d){b.push(d)});return b}function p(a,b,d){var f="",c="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(f=b);d&&(c=d);return""});return f+a.replace(b,d)+c}function w(a,b){var d; +1=c&&a<=e}function e(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,c){this._.initialColorCode=a;this._.defaultValue=c;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0], +a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba", +this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type===CKEDITOR.tools.color.TYPE_HSL&&a?a=[this._.hue,this._.saturation,this._.lightness]:(a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]));return this._.formatHslString("hsl",a[0],a[1],a[2])},getHsla:function(){var a;if(!this._.isValidColor)return this._.defaultValue; +a=this._.type===CKEDITOR.tools.color.TYPE_HSL?[this._.hue,this._.saturation,this._.lightness]:this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,type:0,hue:0,saturation:0,lightness:0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,c,e,b){return CKEDITOR.tools.array.map([a,c,e],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE- +b*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(a,c,g,b){a="#"+e(a)+e(c)+e(g);void 0!==b&&(a+=e(b));return a.toUpperCase()},formatRgbString:function(a,c,e,b,d){c=[c,e,b];void 0!==d&&c.push(d);return a+"("+c.join(",")+")"},formatHslString:function(a,c,e,b,d){return a+"("+c+","+e+"%,"+b+"%"+(void 0!==d?","+d:"")+")"},parseInput:function(a){if("string"!==typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var c=this._.matchStringToNamedColor(a);c&&(a=c);var c= +this._.extractColorChannelsFromHex(a),e=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=c||e||a)?(this._.type=a.type,this._.red=a.red,this._.green=a.green,this._.blue=a.blue,this._.alpha=a.alpha,a.type===CKEDITOR.tools.color.TYPE_HSL&&(this._.hue=a.hue,this._.saturation=a.saturation,this._.lightness=a.lightness)):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||null},extractColorChannelsFromHex:function(a){-1=== +a.indexOf("#")&&(a="#"+a);a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));a.match(CKEDITOR.tools.color.hex4CharsRegExp)&&(a=this._.hex4ToHex8(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var c=1;a[7]&&a[8]&&(c=parseInt(a[7]+a[8],16),c/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,c=Number(c.toFixed(1)));return{type:CKEDITOR.tools.color.TYPE_RGB,red:parseInt(a[1]+a[2],16),green:parseInt(a[3]+a[4], +16),blue:parseInt(a[5]+a[6],16),alpha:c}},extractColorChannelsFromRgba:function(a){var e=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!e||3>e.length||4e.length||4=a?(k=e.createText(""),k.insertAfter(this)):(c=e.createText(""),c.insertAfter(k),c.remove()));return k},substring:function(c,h){return"number"!=typeof h?this.$.nodeValue.substr(c):this.$.nodeValue.substring(c,h)}}),function(){function c(c, +a,e){var h=c.serializable,l=a[e?"endContainer":"startContainer"],m=e?"endOffset":"startOffset",b=h?a.document.getById(c.startNode):c.startNode;c=h?a.document.getById(c.endNode):c.endNode;l.equals(b.getPrevious())?(a.startOffset=a.startOffset-l.getLength()-c.getPrevious().getLength(),l=c.getNext()):l.equals(c.getPrevious())&&(a.startOffset-=l.getLength(),l=c.getNext());l.equals(b.getParent())&&a[m]++;l.equals(c.getParent())&&a[m]++;a[e?"endContainer":"startContainer"]=l;return a}CKEDITOR.dom.rangeList= +function(c){if(c instanceof CKEDITOR.dom.rangeList)return c;c?c instanceof CKEDITOR.dom.range&&(c=[c]):c=[];return CKEDITOR.tools.extend(c,h)};var h={createIterator:function(){var c=this,a=CKEDITOR.dom.walker.bookmark(),e=[],h;return{getNextRange:function(l){h=void 0===h?0:h+1;var m=c[h];if(m&&1b?-1:1}),g=0,h;gCKEDITOR.env.version?a[k].$.styleSheet.cssText+=h:a[k].$.innerHTML+=h}}var k={};CKEDITOR.skin={path:c,loadPart:function(a,b){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c()+"skin.js"),function(){g(a,b)}):g(a,b)},getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,b,c,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:e|| +"16px"})},getIconStyle:function(a,b,c,e,g){var h;a&&(a=a.toLowerCase(),b&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=c||h&&h.path||"";e=e||h&&h.offset;g=g||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+e+"px;background-size:"+g+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(d){var f=a(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor= +a;var d=CKEDITOR.skin.chameleon,c="",g="";"function"==typeof d&&(c=d(this,"editor"),g=d(this,"panel"));a=[[b,a]];e([f],c,a);e(m,g,a)}).call(this,d)}});var l="cke_ui_color",m=[],b=/\$color/g;CKEDITOR.on("instanceLoaded",function(d){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var f=d.editor;d=function(d){d=(d.data[0]||d.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!d.getById("cke_ui_color")){var c=a(d);m.push(c);f.on("destroy",function(){m=CKEDITOR.tools.array.filter(m,function(a){return c!== +a})});(d=f.getUiColor())&&e([c],CKEDITOR.skin.chameleon(f,"panel"),[[b,d]])}};f.on("panelShow",d);f.on("menuShow",d);f.config.uiColor&&f.setUiColor(f.config.uiColor)}})}(),function(){var c=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);c.appendTo(CKEDITOR.document.getHead());try{var h=c.getComputedStyle("border-top-color"),g=c.getComputedStyle("border-right-color"); +CKEDITOR.env.hc=!(!h||h!=g)}catch(a){CKEDITOR.env.hc=!1}c.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(c=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;hh;h++){var l=h,m;m=parseInt(e[h],16);m=("0"+(0>a?0|m*(1+a):0|m+(255-m)*a).toString(16)).slice(-2);e[l]=m}return"#"+e.join("")}}(),h={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "), panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; -return function(f,a){var d=e(f.uiColor,.4),d={id:"."+f.id,defaultBorder:e(d,-.2),toolbarElementsBorder:e(d,-.25),defaultBackground:d,lightBackground:e(d,.8),darkBackground:e(d,-.15),ckeButtonOn:e(d,.4),ckeResizer:e(d,-.4),ckeColorauto:e(d,.8),dialogBody:e(d,.7),dialogTab:e(d,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:e(d,-.6),menubuttonHover:e(d,.1),menubuttonIcon:e(d,.5),menubuttonIconHover:e(d,.3)};return h[a].output(d).replace(/\[/g,"{").replace(/\]/g,"}")}}(), -CKEDITOR.plugins.add("dialogui",{onLoad:function(){var e=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var c=[this._],d=1;darguments.length)){var h=e.call(this,c);h.labelId=CKEDITOR.tools.getNextId()+ -"_label";this._.children=[];var k={role:c.role||"presentation"};c.includeLabel&&(k["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,c,d,"div",null,k,function(){var d=[],e=c.required?" cke_required":"";"horizontal"!=c.labelLayout?d.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.required?c.label+'\x3cspan class\x3d"cke_dialog_ui_labeled_required" aria-hidden\x3d"true"\x3e*\x3c/span\x3e': -c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',f.call(this,a,c),"\x3c/div\x3e"):(e={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+ -(c.controlStyle?' style\x3d"'+c.controlStyle+'"':"")+"\x3e"+f.call(this,a,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,e,d));return d.join("")})}},textInput:function(a,c,d){if(!(3>arguments.length)){e.call(this,c);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+c.type,id:f,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(h.maxlength=c.maxLength);c.size&&(h.size=c.size);c.inputStyle&&(h.style=c.inputStyle);var k= -this,l=!1;a.on("load",function(){k.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(l=!0)});k.getInputElement().on("keyup",function(c){13==c.data.getKeystroke()&&l&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),l=!1);k.bidi&&m.call(k,c)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput "); -h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,c,d){if(!(3>arguments.length)){e.call(this,c);var f=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",k={};c.validate&&(this.validate=c.validate);k.rows=c.rows||5;k.cols=c.cols||20;k["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(k.style=c.inputStyle); -c.dir&&(k.dir=c.dir);if(f.bidi)a.on("load",function(){f.getInputElement().on("keyup",m)},f);CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){k["aria-labelledby"]=this._.labelId;this._.required&&(k["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',h,'" '],b;for(b in k)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(k[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e"); -return a.join("")})}},checkbox:function(a,c,d){if(!(3>arguments.length)){var f=e.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,c,d,"span",null,null,function(){var d=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],g=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(d);c["default"]&&(h.checked="checked");"undefined"!= -typeof d.inputStyle&&(d.style=d.inputStyle);f.checkbox=new CKEDITOR.ui.dialog.uiElement(a,d,e,"input",null,h);e.push(' \x3clabel id\x3d"',g,'" for\x3d"',h.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return e.join("")})}},radio:function(a,c,d){if(!(3>arguments.length)){e.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var f=[],h=this;c.role="radiogroup"; -c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){for(var d=[],e=[],g=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",k=0;karguments.length)){var f=e.call(this,c);c.validate&&(this.validate=c.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){var d=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],g=[],h={id:f.inputId,"class":"cke_dialog_ui_input_select", -"aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"');c.width&&e.push('style\x3d"width:'+c.width+'" ');e.push("\x3e");void 0!==c.size&&(h.size=c.size);void 0!==c.multiple&&(h.multiple=c.multiple);l(d);for(var k=0,m;karguments.length)){void 0===c["default"]&&(c["default"]="");var f=CKEDITOR.tools.extend(e.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);a.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d, -function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',f.frameId,'" title\x3d"',c.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(a,c,d){var f=this;if(!(3>arguments.length)){e.call(this, -c);c.validate&&(this.validate=c.validate);var h=CKEDITOR.tools.extend({},c),k=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(d){var e=c["for"];d=k?k.call(this,d):!1;!1!==d&&("xhr"!==d&&a.getContentElement(e[0],e[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(c["for"][0],c["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,a,h,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,c=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/, -d=/\/$/;return function(e,f,h){if(!(3>arguments.length)){var k=[],l=f.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var m=f.focus;if(m){var z=this.focus;this.focus=function(){("function"==typeof m?m:z).call(this);this.fire("focus")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,f,k,"span",null,null,"");k=k.join("").match(a);l=l.match(c)||["","",""];d.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);h.push([l[1], -" ",k[1]||"",l[2]].join(""))}}}(),fieldset:function(a,c,d,e,f){var h=f.label;this._={children:c};CKEDITOR.ui.dialog.uiElement.call(this,a,f,e,"fieldset",null,null,function(){var a=[];h&&a.push("\x3clegend"+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var b=0;bc.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(c):c.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:d},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})}, -enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,c){this.on("click",function(){c.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()}, -accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var c=a.getInputElement();c&&c.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var c=a.getInputElement();c&&(c.$.focus(),c.$.select())},0)},accessKeyUp:function(){this.select()}, -setValue:function(a){if(this.bidi){var c=a&&a.charAt(0);(c="‪"==c?"ltr":"‫"==c?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(c)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var c=this.getDirectionMarker();c&&(a=("ltr"==c?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var c=this.getInputElement();a?c.setAttributes({dir:a,"data-cke-dir-marker":a}): -this.getDirectionMarker()&&c.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,c,d){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document), -f=this.getInputElement().$;e.$.text=a;e.$.value=void 0===c||null===c?a:c;void 0===d||null===d?CKEDITOR.env.ie?f.add(e.$):f.add(e.$,null):f.add(e.$,d);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;0b-a;c--)if(this._.tabs[this._.tabIdList[c% -a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function f(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;cl.width-k.width-f?l.width-k.width+("rtl"==g.lang.dir?0:h[1]):e.x;k=e.y+h[0]l.height-k.height-f?l.height-k.height+h[2]:e.y;m=Math.floor(m);k=Math.floor(k);a.move(m,k,1);c.data.preventDefault()} -function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,e=null,g=a.getParentEditor(),f=g.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(g){if(!a._.moved){var f=a._.element;f.getFirst().setStyle("position","absolute");f.removeStyle("display"); -a._.moved=!0;a.layout()}d={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);e=a.getPosition();CKEDITOR.env.ie6Compat&&(f=E.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));g.data.preventDefault()},a)}function w(a){function b(c){var n="rtl"==g.lang.dir,p=m.width,w=m.height,v=p+(c.data.$.screenX-l.x)*(n?-1:1)*(a._.moved?1:2),Q=w+(c.data.$.screenY-l.y)*(a._.moved?1:2),q=a._.element.getFirst(),q=n&&parseInt(q.getComputedStyle("right"), -10),u=a.getPosition();u.x=u.x||0;u.y=u.y||0;u.y+Q>k.height&&(Q=k.height-u.y);(n?q:u.x)+v>k.width&&(v=k.width-(n?q:u.x));Q=Math.floor(Q);v=Math.floor(v);if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||e==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(d.minWidth||0,v-f);if(e==CKEDITOR.DIALOG_RESIZE_HEIGHT||e==CKEDITOR.DIALOG_RESIZE_BOTH)w=Math.max(d.minHeight||0,Q-h);a.resize(p,w);a._.moved&&x(a,a._.position.x,a._.position.y);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup", -c);CKEDITOR.document.removeListener("mousemove",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var d=a.definition,e=d.resizable;if(e!=CKEDITOR.DIALOG_RESIZE_NONE){var g=a.getParentEditor(),f,h,k,l,m,n,p=CKEDITOR.tools.addFunction(function(d){function e(a){return a.isVisible()}m=a.getSize();var g=a.parts.contents,p=g.$.getElementsByTagName("iframe").length,w=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&& -CKEDITOR.env.quirks);p&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),g.append(n));h=m.height-a.parts.contents.getFirst(e).getSize("height",w);f=m.width-a.parts.contents.getFirst(e).getSize("width",1);l={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&& -(g=E.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";e==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":e==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+g.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(g.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+p+', event )"\x3e'+("ltr"== -g.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function x(a,b,c){var d=a.parts.dialog.getParent().getClientSize(),e=a.getSize(),g=a._.viewportRatio,f=Math.max(d.width-e.width,0),d=Math.max(d.height-e.height,0);g.width=f?b/f:g.width;g.height=d?c/d:g.height;a._.viewportRatio=g}function t(a){a.data.preventDefault(1)}function r(a){var b=a.config,c=CKEDITOR.skinName||a.config.skin,d=b.dialog_backgroundCoverColor||("moono-lisa"== -c?"black":"white"),c=b.dialog_backgroundCoverOpacity,e=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(d,c,e),g=M[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");g?g.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+ -d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(e.join("")), -g.setOpacity(void 0!==c?c:.5),g.on("keydown",t),g.on("keypress",t),g.on("keyup",t),g.appendTo(CKEDITOR.document.getBody()),M[b]=g);a.focusManager.add(g);E=g;CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus()}function u(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");E&&(a.focusManager.remove(E),E.hide())}function z(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(b=R[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+ -e])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function p(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(b=R[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+e])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function y(a,b,c,d,e){(R[c]||(R[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:e||a.accessKeyUp,keydown:d|| -a.accessKeyDown})}function v(a){for(var b in R){for(var c=R[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete R[b]}}function q(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function B(){}var A=CKEDITOR.tools.cssLength,C,E,F=!1,H=!CKEDITOR.env.ie||CKEDITOR.env.edge,L='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(H?"display:flex":"")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+ -CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(H?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; -CKEDITOR.dialog=function(a,b){function g(){var a=A._.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=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,g=1arguments.length)){var g=c.call(this,d);g.labelId=CKEDITOR.tools.getNextId()+ +"_label";this._.children=[];var h={role:d.role||"presentation"};d.includeLabel&&(h["aria-labelledby"]=g.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,d,f,"div",null,h,function(){var f=[],c=d.required?" cke_required":"";"horizontal"!=d.labelLayout?f.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" ',' id\x3d"'+g.labelId+'"',g.inputId?' for\x3d"'+g.inputId+'"':"",(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",d.required?d.label+'\x3cspan class\x3d"cke_dialog_ui_labeled_required" aria-hidden\x3d"true"\x3e*\x3c/span\x3e': +d.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',d.controlStyle?' style\x3d"'+d.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,a,d),"\x3c/div\x3e"):(c={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" id\x3d"'+g.labelId+'" for\x3d"'+g.inputId+'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+ +(d.controlStyle?' style\x3d"'+d.controlStyle+'"':"")+"\x3e"+e.call(this,a,d)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,c,f));return f.join("")})}},textInput:function(a,d,f){if(!(3>arguments.length)){c.call(this,d);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",g={"class":"cke_dialog_ui_input_"+d.type,id:e,type:d.type};d.validate&&(this.validate=d.validate);d.maxLength&&(g.maxlength=d.maxLength);d.size&&(g.size=d.size);d.inputStyle&&(g.style=d.inputStyle);var h= +this,k=!1;a.on("load",function(){h.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(k=!0)});h.getInputElement().on("keyup",function(d){13==d.data.getKeystroke()&&k&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),k=!1);h.bidi&&m.call(h,d)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,d,f,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"'];d.width&&a.push('style\x3d"width:'+d.width+'" ');a.push("\x3e\x3cinput "); +g["aria-labelledby"]=this._.labelId;this._.required&&(g["aria-required"]=this._.required);for(var b in g)a.push(b+'\x3d"'+g[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,d,f){if(!(3>arguments.length)){c.call(this,d);var e=this,g=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};d.validate&&(this.validate=d.validate);h.rows=d.rows||5;h.cols=d.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");"undefined"!=typeof d.inputStyle&&(h.style=d.inputStyle); +d.dir&&(h.dir=d.dir);if(e.bidi)a.on("load",function(){e.getInputElement().on("keyup",m)},e);CKEDITOR.ui.dialog.labeledElement.call(this,a,d,f,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',g,'" '],b;for(b in h)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(h[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e"); +return a.join("")})}},checkbox:function(a,d,f){if(!(3>arguments.length)){var e=c.call(this,d,{"default":!!d["default"]});d.validate&&(this.validate=d.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,d,f,"span",null,null,function(){var f=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),c=[],g=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(f);d["default"]&&(h.checked="checked");"undefined"!= +typeof f.inputStyle&&(f.style=f.inputStyle);e.checkbox=new CKEDITOR.ui.dialog.uiElement(a,f,c,"input",null,h);c.push(' \x3clabel id\x3d"',g,'" for\x3d"',h.id,'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(d.label),"\x3c/label\x3e");return c.join("")})}},radio:function(a,d,f){if(!(3>arguments.length)){c.call(this,d);this._["default"]||(this._["default"]=this._.initValue=d.items[0][1]);d.validate&&(this.validate=d.validate);var e=[],g=this;d.role="radiogroup"; +d.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,a,d,f,function(){for(var f=[],c=[],h=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",k=0;karguments.length)){var e=c.call(this,d);d.validate&&(this.validate=d.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,d,f,function(){var f=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),c=[],g=[],h={id:e.inputId,"class":"cke_dialog_ui_input_select", +"aria-labelledby":this._.labelId};c.push('\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"');d.width&&c.push('style\x3d"width:'+d.width+'" ');c.push("\x3e");void 0!==d.size&&(h.size=d.size);void 0!==d.multiple&&(h.multiple=d.multiple);l(f);for(var k=0,m;karguments.length)){void 0===d["default"]&&(d["default"]="");var e=CKEDITOR.tools.extend(c.call(this,d),{definition:d,buttons:[]});d.validate&&(this.validate=d.validate);a.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,a,d,f, +function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',e.frameId,'" title\x3d"',d.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(a,d,f){var e=this;if(!(3>arguments.length)){c.call(this, +d);d.validate&&(this.validate=d.validate);var g=CKEDITOR.tools.extend({},d),h=g.onClick;g.className=(g.className?g.className+" ":"")+"cke_dialog_ui_button";g.onClick=function(f){var c=d["for"];f=h?h.call(this,f):!1;!1!==f&&("xhr"!==f&&a.getContentElement(c[0],c[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(d["for"][0],d["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,a,g,f)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,d=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/, +f=/\/$/;return function(c,e,g){if(!(3>arguments.length)){var h=[],k=e.html;"\x3c"!=k.charAt(0)&&(k="\x3cspan\x3e"+k+"\x3c/span\x3e");var l=e.focus;if(l){var m=this.focus;this.focus=function(){("function"==typeof l?l:m).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,c,e,h,"span",null,null,"");h=h.join("").match(a);k=k.match(d)||["","",""];f.test(k[1])&&(k[1]=k[1].slice(0,-1),k[2]="/"+k[2]);g.push([k[1], +" ",h[1]||"",k[2]].join(""))}}}(),fieldset:function(a,d,f,c,e){var g=e.label;this._={children:d};CKEDITOR.ui.dialog.uiElement.call(this,a,e,c,"fieldset",null,null,function(){var a=[];g&&a.push("\x3clegend"+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+g+"\x3c/legend\x3e");for(var b=0;bd.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(d):d.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:e},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})}, +enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,d){this.on("click",function(){d.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()}, +accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&d.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&(d.$.focus(),d.$.select())},0)},accessKeyUp:function(){this.select()}, +setValue:function(a){if(this.bidi){var d=a&&a.charAt(0);(d="‪"==d?"ltr":"‫"==d?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(d)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var d=this.getDirectionMarker();d&&(a=("ltr"==d?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var d=this.getInputElement();a?d.setAttributes({dir:a,"data-cke-dir-marker":a}): +this.getDirectionMarker()&&d.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,d,f){var c=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document), +e=this.getInputElement().$;c.$.text=a;c.$.value=void 0===d||null===d?a:d;void 0===f||null===f?CKEDITOR.env.ie?e.add(c.$):e.add(c.$,null):e.add(c.$,f);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;0b-a;d--)if(this._.tabs[this._.tabIdList[d% +a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function g(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=b+1;dl.width-k.width-g?l.width-k.width+("rtl"==e.lang.dir?0:h[1]):c.x;k=c.y+h[0]l.height-k.height-g?l.height-k.height+h[2]:c.y;m=Math.floor(m);k=Math.floor(k);a.move(m,k,1);d.data.preventDefault()} +function d(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=D.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var f=null,c=null,e=a.getParentEditor(),g=e.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(e){if(!a._.moved){var g=a._.element;g.getFirst().setStyle("position","absolute");g.removeStyle("display"); +a._.moved=!0;a.layout()}f={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);c=a.getPosition();CKEDITOR.env.ie6Compat&&(g=D.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",d));e.data.preventDefault()},a)}function w(a){function b(d){var p="rtl"==e.lang.dir,n=m.width,q=m.height,u=n+(d.data.$.screenX-l.x)*(p?-1:1)*(a._.moved?1:2),J=q+(d.data.$.screenY-l.y)*(a._.moved?1:2),w=a._.element.getFirst(),w=p&&parseInt(w.getComputedStyle("right"), +10),x=a.getPosition();x.x=x.x||0;x.y=x.y||0;x.y+J>k.height&&(J=k.height-x.y);(p?w:x.x)+u>k.width&&(u=k.width-(p?w:x.x));J=Math.floor(J);u=Math.floor(u);if(c==CKEDITOR.DIALOG_RESIZE_WIDTH||c==CKEDITOR.DIALOG_RESIZE_BOTH)n=Math.max(f.minWidth||0,u-g);if(c==CKEDITOR.DIALOG_RESIZE_HEIGHT||c==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(f.minHeight||0,J-h);a.resize(n,q);a._.moved&&y(a,a._.position.x,a._.position.y);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup", +d);CKEDITOR.document.removeListener("mousemove",b);p&&(p.remove(),p=null);if(CKEDITOR.env.ie6Compat){var a=D.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var f=a.definition,c=f.resizable;if(c!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(),g,h,k,l,m,p,n=CKEDITOR.tools.addFunction(function(f){function c(a){return a.isVisible()}m=a.getSize();var e=a.parts.contents,n=e.$.getElementsByTagName("iframe").length,q=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&& +CKEDITOR.env.quirks);n&&(p=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),e.append(p));h=m.height-a.parts.contents.getFirst(c).getSize("height",q);g=m.width-a.parts.contents.getFirst(c).getSize("width",1);l={x:f.screenX,y:f.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&& +(e=D.getChild(0).getFrameDocument(),e.on("mousemove",b),e.on("mouseup",d));f.preventDefault&&f.preventDefault()});a.on("load",function(){var b="";c==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":c==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event )"\x3e'+("ltr"== +e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(n)})}}function y(a,b,d){var f=a.parts.dialog.getParent().getClientSize(),c=a.getSize(),e=a._.viewportRatio,g=Math.max(f.width-c.width,0),f=Math.max(f.height-c.height,0);e.width=g?b/g:e.width;e.height=f?d/f:e.height;a._.viewportRatio=e}function r(a){a.data.preventDefault(1)}function t(a){var b=a.config,d=CKEDITOR.skinName||a.config.skin,f=b.dialog_backgroundCoverColor||("moono-lisa"== +d?"black":"white"),d=b.dialog_backgroundCoverOpacity,c=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(f,d,c),e=I[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");e?e.show():(c=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",c,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+f,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(f="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+ +f+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",c.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),c.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+f+"' );document.close();")+"})())"),c.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),c.push("\x3c/div\x3e"),e=CKEDITOR.dom.element.createFromHtml(c.join("")), +e.setOpacity(void 0!==d?d:.5),e.on("keydown",r),e.on("keypress",r),e.on("keyup",r),e.appendTo(CKEDITOR.document.getBody()),I[b]=e);a.focusManager.add(e);D=e;CKEDITOR.env.mac&&CKEDITOR.env.webkit||e.focus()}function v(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");D&&(a.focusManager.remove(D),D.hide())}function B(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,f=a.data.$.shiftKey,c=String.fromCharCode(a.data.$.keyCode);(b=P[(b?"CTRL+":"")+(d?"ALT+":"")+(f?"SHIFT+":"")+ +c])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function n(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,f=a.data.$.shiftKey,c=String.fromCharCode(a.data.$.keyCode);(b=P[(b?"CTRL+":"")+(d?"ALT+":"")+(f?"SHIFT+":"")+c])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function x(a,b,d,f,c){(P[d]||(P[d]=[])).push({uiElement:a,dialog:b,key:d,keyup:c||a.accessKeyUp,keydown:f|| +a.accessKeyDown})}function q(a){for(var b in P){for(var d=P[b],f=d.length-1;0<=f;f--)d[f].dialog!=a&&d[f].uiElement!=a||d.splice(f,1);0===d.length&&delete P[b]}}function u(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function z(){}var A=CKEDITOR.tools.cssLength,C,D,E=!1,G=!CKEDITOR.env.ie||CKEDITOR.env.edge,K='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(G?"display:flex":"")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+ +CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(G?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; +CKEDITOR.dialog=function(a,b){function f(){var a=A._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,d=0;db.length)){var d=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(f){}var c=d,e=1arguments.length)){var h=(d.call?d(b):d)||"div",k=["\x3c",h," "],l=(e&&e.call?e(b):e)||{},m=(g&&g.call?g(b):g)||{},n=(f&&f.call?f.call(this,a,b):f)||"",p=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed= -!0);m.id=p;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var v=m["class"]&&m["class"].split?m["class"].split(" "):[],p=0;pCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus", -function(){a._.tabBarMode=!1;a._.hasFocus=!0;w.fire("focus");c&&this.addClass(c)});b.on("blur",function(){w.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=w.focusIndex}))}},hbox:function(a,b,c,d,e){if(!(4>arguments.length)){this._||(this._={});var g=this._.children=b,f=e&&e.widths||null,h=e&&e.height||null,k,l={role:"presentation"}; -e&&e.align&&(l.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;karguments.length)){this._||(this._={});var g=this._.children=b,f=e&&e.width||null,h=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b= -['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');e&&e.expand&&b.push("height:100%;");b.push("width:"+A(f||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(e&&e.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var d=0;darguments.length)){var h=(f.call?f(b):f)||"div",k=["\x3c",h," "],l=(c&&c.call?c(b):c)||{},m=(e&&e.call?e(b):e)||{},p=(g&&g.call?g.call(this,a,b):g)||"",n=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed= +!0);m.id=n;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var u=m["class"]&&m["class"].split?m["class"].split(" "):[],n=0;nCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus", +function(){a._.tabBarMode=!1;a._.hasFocus=!0;w.fire("focus");d&&this.addClass(d)});b.on("blur",function(){w.fire("blur");d&&this.removeClass(d)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=w.focusIndex}))}},hbox:function(a,b,d,f,c){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,g=c&&c.widths||null,h=c&&c.height||null,k,l={role:"presentation"}; +c&&c.align&&(l.align=c.align);CKEDITOR.ui.dialog.uiElement.call(this,a,c||{type:"hbox"},f,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;karguments.length)){this._||(this._={});var e=this._.children=b,g=c&&c.width||null,h=c&&c.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,c||{type:"vbox"},f,"div",null,{role:"presentation"},function(){var b= +['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');c&&c.expand&&b.push("height:100%;");b.push("width:"+A(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(c&&c.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var f=0;farguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a, -b,c){for(var d=b.children,e,g=[],f=[],h=0;hl.length&&(f=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),m=k.shift(),d.insertNode(f),f.append(new CKEDITOR.dom.text("",e.document)),d.moveToBookmark(m),d.selectNodeContents(f),d.collapse(!0),m=d.createBookmark(), -l.push(f),k.unshift(m));b=l[0].getParent();d=[];for(m=0;ma||(this.notifications.splice(a, -1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,a=e.config,d=new CKEDITOR.dom.element("div");d.addClass("cke_notifications_area");d.setAttribute("id","cke_notifications_area_"+e.name);d.setStyle("z-index",a.baseFloatZIndex-2);return d},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),a=this.editor;e.on("scroll",this._uiBuffer.input);e.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 e=CKEDITOR.document.getWindow(),a=this.editor;e.removeListener("scroll",this._uiBuffer.input);e.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function e(){a.setStyle("left",z(p+h.width-n-w))}var a=this.element,d= -this.editor,h=d.ui.contentsElement.getClientRect(),l=d.ui.contentsElement.getDocumentPosition(),m,b,c=a.getClientRect(),g,n=this._notificationWidth,w=this._notificationMargin;g=CKEDITOR.document.getWindow();var x=g.getScrollPosition(),t=g.getViewPaneSize(),r=CKEDITOR.document.getBody(),u=r.getDocumentPosition(),z=CKEDITOR.tools.cssLength;n&&w||(g=this.element.getChild(0),n=this._notificationWidth=g.getClientRect().width,w=this._notificationMargin=parseInt(g.getComputedStyle("margin-left"),10)+parseInt(g.getComputedStyle("margin-right"), -10));d.toolbar&&(m=d.ui.space(d.config.toolbarLocation),b=m.getClientRect());m&&m.isVisible()&&b.bottom>h.top&&b.bottomx.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:z(l.y+h.height-c.height)});var p="fixed"==a.getStyle("position")?h.left:"static"!=r.getComputedStyle("position")?l.x-u.x:l.x;h.widthx.x+t.width?e(): -a.setStyle("left",z(p)):l.x+n+w>x.x+t.width?a.setStyle("left",z(p)):l.x+h.width/2+n/2+w>x.x+t.width?a.setStyle("left",z(p-l.x+x.x+t.width-n-w)):0>h.left+h.width-n-w?e():0>h.left+h.width/2-n/2?a.setStyle("left",z(p-l.x+x.x)):a.setStyle("left",z(p+h.width/2-n/2-w/2))}};CKEDITOR.plugins.notification=e}(),function(){var e='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"'; -CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var h="";CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var e=e+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ -'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',f=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),a=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button", -{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(e){e.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(d,e){function h(){var a=d.mode;a&&(a=this.modes[a]?void 0!==m[a]?m[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED, -a=d.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var m=null,b=CKEDITOR.env,c="",g=this.command,n,w,x,t=this._.id;t||(t=CKEDITOR.tools.getNextId(),this._.id=t);this._.editor=d;var r={id:t,button:this,editor:d,focus:function(){CKEDITOR.document.getById(t).focus()},execute:function(){this.button.click(d)},attach:function(a){this.button.attach(a)}},u=CKEDITOR.tools.addFunction(function(a){if(r.onkey)return a=new CKEDITOR.dom.event(a),!1!==r.onkey(r, -a.getKeystroke())}),z=CKEDITOR.tools.addFunction(function(a){var b;r.onfocus&&(b=!1!==r.onfocus(r,new CKEDITOR.dom.event(a)));return b}),p=0;r.clickFn=n=CKEDITOR.tools.addFunction(function(){p&&(d.unlockSelection(1),p=0);r.execute();b.iOS&&d.focus()});this.modes?(m={},d.on("beforeModeUnload",function(){d.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[d.mode]=this._.state)},this),d.on("activeFilterChange",h,this),d.on("mode",h,this),!this.readOnly&&d.on("readOnly",h,this)):g&&(g=d.getCommand(g))&& -(g.on("state",function(){this.setState(g.state)},this),c+=g.state==CKEDITOR.TRISTATE_ON?"on":g.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var y;if(this.directional)d.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),c=b.getFirst();a=a.data;a!=d.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(y,"rtl"==a,this.icon,this.iconOffset))},this);g?(w=d.getCommandKeystroke(g))&&(x=CKEDITOR.tools.keystrokeToString(d.lang.common.keyboard, -w)):c+="off";w=this.name||this.command;var v=null,q=this.icon;y=w;this.icon&&!/\./.test(this.icon)?(y=this.icon,q=null):(this.icon&&(v=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(v=this.iconHiDpi));v?(CKEDITOR.skin.addIcon(v,v),q=null):v=y;c={id:t,name:w,iconName:y,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:c,ariaDisabled:"disabled"==c?"true":"false",title:this.title+(x?" ("+x.display+")":""),ariaShortcutSpace:x?"\x26nbsp;":"",ariaShortcut:x?d.lang.common.keyboardShortcut+ -" "+x.aria:"",titleJs:b.gecko&&!b.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:u,focusFn:z,clickFn:n,style:CKEDITOR.skin.getIconStyle(v,"rtl"==d.lang.dir,q,this.iconOffset),arrowHtml:this.hasArrow?f.output():""};a.output(c,e);if(this.onRender)this.onRender();return r},setState:function(a){if(this._.state==a)return!1;this._.state=a;var e=CKEDITOR.document.getById(this._.id);return e?(e.setState(a,"cke_button"), -e.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?e.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?e.setAttribute("aria-pressed",!0):e.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var e=this;this.allowedContent||this.requiredContent||!this.command||(e=a.getCommand(this.command)||e);return this._.feature=e}};CKEDITOR.ui.prototype.addButton=function(a, -e){this.add(a,CKEDITOR.UI_BUTTON,e)}}(),function(){function e(a){function e(){for(var b=f(),c=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),g=0;gb.order?-1:0>a.order?1:a.order]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&e(a,c)})}function B(){if("wysiwyg"==a.mode){var b=A("paste");a.getCommand("cut").setState(A("cut")); -a.getCommand("copy").setState(A("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function A(b){var c=a.getSelection(),c=c&&c.getRanges()[0];if((a.readOnly||c&&c.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,E=0,F=0;(function(){a.on("key", -v);a.on("contentDom",b);a.on("selectionChange",B);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:A("cut"),copy:A("copy"),paste:A("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b= -CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,d,e,f,h){var k=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&a.ui.addButton(c,{label:k,command:d,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(d,{label:k,command:d,group:"clipboard",order:h})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",d(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData= -function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();a.cancel();c({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,h="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();f=!0;h=a.data.type},null,null,1E3);a.on("paste",d,null,null,0);!1===y()&&(a.removeListener("paste",d),a._.forcePasteDialog&&f&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",e),a.on("dialogHide",function(a){a.removeListener(); -a.data.removeListener("pasteDialogCommit",e);a.data._.committed||c(null)})):c(null))}}function f(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function a(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e", +b,d){for(var f=b.children,c,e=[],g=[],h=0;hl.length&&(g=c.document.createElement(c.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),m=k.shift(),e.insertNode(g),g.append(new CKEDITOR.dom.text("",c.document)),e.moveToBookmark(m),e.selectNodeContents(g),e.collapse(!0),m=e.createBookmark(),l.push(g),k.unshift(m));b=l[0].getParent();e=[];for(m=0;ma||(this.notifications.splice(a,1),c.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var c=this.editor,a=c.config,e=new CKEDITOR.dom.element("div");e.addClass("cke_notifications_area"); +e.setAttribute("id","cke_notifications_area_"+c.name);e.setStyle("z-index",a.baseFloatZIndex-2);return e},_attachListeners:function(){var c=CKEDITOR.document.getWindow(),a=this.editor;c.on("scroll",this._uiBuffer.input);c.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 c=CKEDITOR.document.getWindow(),a=this.editor;c.removeListener("scroll",this._uiBuffer.input); +c.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function c(){a.setStyle("left",B(n+h.width-p-w))}var a=this.element,e=this.editor,h=e.ui.contentsElement.getClientRect(),l=e.ui.contentsElement.getDocumentPosition(),m,b,d=a.getClientRect(),f,p=this._notificationWidth,w=this._notificationMargin;f=CKEDITOR.document.getWindow();var y=f.getScrollPosition(), +r=f.getViewPaneSize(),t=CKEDITOR.document.getBody(),v=t.getDocumentPosition(),B=CKEDITOR.tools.cssLength;p&&w||(f=this.element.getChild(0),p=this._notificationWidth=f.getClientRect().width,w=this._notificationMargin=parseInt(f.getComputedStyle("margin-left"),10)+parseInt(f.getComputedStyle("margin-right"),10));e.toolbar&&(m=e.ui.space(e.config.toolbarLocation),b=m.getClientRect());m&&m.isVisible()&&b.bottom>h.top&&b.bottomy.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:B(l.y+h.height-d.height)});var n="fixed"==a.getStyle("position")?h.left:"static"!=t.getComputedStyle("position")?l.x-v.x:l.x;h.widthy.x+r.width?c():a.setStyle("left",B(n)):l.x+p+w>y.x+r.width?a.setStyle("left",B(n)):l.x+h.width/2+p/2+w>y.x+r.width?a.setStyle("left",B(n-l.x+y.x+r.width-p-w)):0>h.left+h.width-p-w?c():0>h.left+h.width/2-p/2?a.setStyle("left", +B(n-l.x+y.x)):a.setStyle("left",B(n+h.width/2-p/2-w/2))}};CKEDITOR.plugins.notification=c}(),function(){var c='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';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 h="";CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ +'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',g=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),a=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button", +{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(c){c.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(c,h){function l(){var a=c.mode;a&&(a=this.modes[a]?void 0!==m[a]?m[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED, +a=c.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var m=null,b=CKEDITOR.env,d="",f=this.command,p,w,y,r=this._.id;r||(r=CKEDITOR.tools.getNextId(),this._.id=r);this._.editor=c;var t={id:r,button:this,editor:c,focus:function(){CKEDITOR.document.getById(r).focus()},execute:function(){this.button.click(c)},attach:function(a){this.button.attach(a)}},v=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==t.onkey(t, +a.getKeystroke())}),B=CKEDITOR.tools.addFunction(function(a){var b;t.onfocus&&(b=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return b}),n=0;t.clickFn=p=CKEDITOR.tools.addFunction(function(){n&&(c.unlockSelection(1),n=0);t.execute();b.iOS&&c.focus()});this.modes?(m={},c.on("beforeModeUnload",function(){c.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[c.mode]=this._.state)},this),c.on("activeFilterChange",l,this),c.on("mode",l,this),!this.readOnly&&c.on("readOnly",l,this)):f&&(f=c.getCommand(f))&& +(f.on("state",function(){this.setState(f.state)},this),d+=f.state==CKEDITOR.TRISTATE_ON?"on":f.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var x;if(this.directional)c.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),d=b.getFirst();a=a.data;a!=c.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(x,"rtl"==a,this.icon,this.iconOffset))},this);f?(w=c.getCommandKeystroke(f))&&(y=CKEDITOR.tools.keystrokeToString(c.lang.common.keyboard, +w)):d+="off";w=this.name||this.command;var q=null,u=this.icon;x=w;this.icon&&!/\./.test(this.icon)?(x=this.icon,u=null):(this.icon&&(q=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(q=this.iconHiDpi));q?(CKEDITOR.skin.addIcon(q,q),u=null):q=x;d={id:r,name:w,iconName:x,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:d,ariaDisabled:"disabled"==d?"true":"false",title:this.title+(y?" ("+y.display+")":""),ariaShortcutSpace:y?"\x26nbsp;":"",ariaShortcut:y?c.lang.common.keyboardShortcut+ +" "+y.aria:"",titleJs:b.gecko&&!b.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:v,focusFn:B,clickFn:p,style:CKEDITOR.skin.getIconStyle(q,"rtl"==c.lang.dir,u,this.iconOffset),arrowHtml:this.hasArrow?g.output():""};a.output(d,h);if(this.onRender)this.onRender();return t},setState:function(a){if(this._.state==a)return!1;this._.state=a;var c=CKEDITOR.document.getById(this._.id);return c?(c.setState(a,"cke_button"), +c.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?c.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?c.setAttribute("aria-pressed",!0):c.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var c=this;this.allowedContent||this.requiredContent||!this.command||(c=a.getCommand(this.command)||c);return this._.feature=c}};CKEDITOR.ui.prototype.addButton=function(a, +c){this.add(a,CKEDITOR.UI_BUTTON,c)}}(),function(){function c(a){function c(){for(var b=g(),d=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),f=0;fb.order?-1:0>a.order?1:a.order]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&c(a,d)})}function z(){if("wysiwyg"==a.mode){var b=A("paste");a.getCommand("cut").setState(A("cut")); +a.getCommand("copy").setState(A("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function A(b){var d=a.getSelection(),d=d&&d.getRanges()[0];if((a.readOnly||d&&d.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();d=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,D=0,E=0;(function(){a.on("key", +q);a.on("contentDom",b);a.on("selectionChange",z);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:A("cut"),copy:A("copy"),paste:A("paste")}});var d=null;a.on("menuShow",function(){d&&(d.removeListener(),d=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(d=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b= +CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(d,c,e,g,h){var k=a.lang.clipboard[c];a.addCommand(c,e);a.ui.addButton&&a.ui.addButton(d,{label:k,command:c,toolbar:"clipboard,"+g});a.addMenuItems&&a.addMenuItem(c,{label:k,command:c,group:"clipboard",order:h})}b("Cut","cut",d("cut"),10,1);b("Copy","copy",d("copy"),20,4);b("Paste","paste",e(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData= +function(b,d){function c(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();d({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var g=!1,h="auto";d||(d=b,b=null);a.on("beforePaste",function(a){a.removeListener();g=!0;h=a.data.type},null,null,1E3);a.on("paste",c,null,null,0);!1===x()&&(a.removeListener("paste",c),a._.forcePasteDialog&&g&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",e),a.on("dialogHide",function(a){a.removeListener(); +a.data.removeListener("pasteDialogCommit",e);a.data._.committed||d(null)})):d(null))}}function g(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 d(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e", ~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1(
|)<\/div>)(?!$|(

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

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

)+/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 m(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function b(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,d,f){d.select();e(a,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot"); -f.sourceEditor.editable().extractHtmlFromRange(b);f.sourceEditor.getSelection().selectRanges([b]);f.sourceEditor.fire("saveSnapshot")}function d(c,f){c.select();e(a,{dataTransfer:f,method:"drop"},1);b.resetDragDataTransfer()}function f(b,c,d){var e={$:b.data.$,target:b.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===a.fire(b.name,e)&&b.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=a.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(a), -m=a.ui.space("top"),y=a.ui.space("bottom");b.preventDefaultDropOnElement(m);b.preventDefaultDropOnElement(y);k.attachListener(l,"dragstart",f);k.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);k.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);k.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);k.attachListener(l,"dragend",f);k.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);k.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);k.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}}); -k.attachListener(l,"drop",function(c){if(!c.data.$.defaultPrevented&&(c.data.preventDefault(),!a.readOnly)){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&&f(c,e,d)}}},null,null,9999);k.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);k.attachListener(a,"drop",function(e){if(e=e.data){var f=e.dropRange,h=e.dragRange,k=e.dataTransfer;k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){b.internalDrop(h, -f,k,a)},0):k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(h,f,k):d(f,k)}},null,null,9999)})}var c;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(c){function e(a){a=CKEDITOR.tools.array.map(a,function(a){return a.split("/")[1].toUpperCase()}).join(", ");return c.lang.clipboard.fileFormatNotSupportedNotification.replace(/\${formats\}/g,a)}function l(a,b){return CKEDITOR.env.ie&&a.data.fileTransferCancel||!(CKEDITOR.env.ie||b&&z!==b.id)?!1:b.isFileTransfer()&& -1===b.getFilesCount()}var m,t=d(c);c.config.forcePasteAsPlainText?m="plain-text":c.config.pasteFilter?m=c.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in c.config||(m="semantic-content");c.pasteFilter=t.get(m);h(c);b(c);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if((CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||CKEDITOR.plugins.clipboard.isFileApiSupported)&&c.config.clipboard_handleImages){var r=["image/png","image/jpeg","image/gif"],u=e(r),z;c.on("paste", -function(a){var b=a.data,d=b.dataTransfer;if(!b.dataValue&&l(a,d))if(d=d.getFile(0),-1===CKEDITOR.tools.indexOf(r,d.type))c.showNotification(u,"info",c.config.clipboard_notificationDuration);else{var e=new FileReader;e.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e';c.fire("paste",a.data)},!1);e.addEventListener("abort",function(){CKEDITOR.env.ie&&(a.data.fileTransferCancel=!0);c.fire("paste",a.data)},!1);e.addEventListener("error",function(){CKEDITOR.env.ie&& -(a.data.fileTransferCancel=!0);c.fire("paste",a.data)},!1);e.readAsDataURL(d);z=b.dataTransfer.id;a.stop()}},null,null,1)}c.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var b=a.data.dataTransfer,d=b.getData("text/html");if(d)a.data.dataValue=d,a.data.type="html";else if(d=b.getData("text/plain"))a.data.dataValue=c.editable().transformPlainTextToHtml(d),a.data.type="text"}},null,null,1);c.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,e,g=new CKEDITOR.dom.element("div");for(g.setHtml(b);1==g.getChildCount()&&(d=g.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)g=e=d;e&&(b=e.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);c.on("paste",function(b){b=b.data;var d=c._.nextPasteType||b.type,e=b.dataValue,h,l=c.config.clipboard_defaultContentType||"html",m=b.dataTransfer.getTransferType(c)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===c.config.forcePasteAsPlainText;h="html"==d||"html"==b.preSniffing?"html":f(e);delete c._.nextPasteType;"htmlifiedtext"==h&&(e=a(c.config,e));if("text"==d&&"html"==h)e= -k(c,e,t.get("plain-text"));else if(m&&c.pasteFilter&&!b.dontFilter||n)e=k(c,e,c.pasteFilter);b.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+e);b.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==h||"html"==l?"html":"text");b.type=d;b.dataValue=e;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);c.on("paste",function(a){a=a.data;a.dataValue&&(c.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){c.fire("afterPaste")},0))},null,null, -1E3);c.on("pasteDialog",function(a){setTimeout(function(){c.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function e(a,c,d){var g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var f=b.startContainer;"number"==typeof d&&"number"== -typeof c&&f.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,f,c)||e(a.endContainer,f,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,b))||(k=a.createBookmark(!1));f=b.clone().createBookmark(!1);l&&(k=a.createBookmark(!1));a=k.startNode;b=k.endNode;l=f.startNode;b&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=d.createRange();a.moveToBookmark(k);h.extractHtmlFromRange(a,1);b=d.createRange(); -f.startNode.getCommonAncestor(h)||(f=d.getSelection().createBookmarks()[0]);b.moveToBookmark(f);e(d,{dataTransfer:c,method:"drop",range:b},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,e=c.clientY,f=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,e))c=b.document.$.caretRangeFromPoint(d,e),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset), -h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!k;l++){if(!k)try{c.moveToPoint(d,e-l),k=!0}catch(m){}if(!k)try{c.moveToPoint(d,e+l),k=!0}catch(v){}}if(k){var q="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+q+'"\x3e​\x3c/span\x3e'); -var B=b.document.getById(q);h.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START);B.remove()}else{var A=b.document.$.elementFromPoint(d,e),C=new CKEDITOR.dom.element(A),E;if(C.equals(b.editable())||"html"==C.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;E=C.getClientRect();d/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g, -types:[],data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":"files"===a?"Files":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(c);this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==c||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))}; -CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&& -this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var e=c.indexOf("\x3c/html\x3e"),c=-1!==e?c.substring(0,e+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==c&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a, -b)}catch(d){}},storeId:function(){"Text"!==c&&this.setData(c,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var d=b.getData(c);"text/html"==c&&(b._.nativeHtmlCache=b.getData(c,!0),d=b._stripHtml(d));d&&(b._.data[c]=d);b._.types.push(c)}if(this.$){var b=this,c,d,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c= -0;c$/gi,"")}a&&a.length&&(a=b(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,""));return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported= -null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1; -return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,e=this._dataTransfer.$;try{e.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(f){if(this._isUnsupportedMimeTypeError(f)){c= -CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),h=this._getFallbackTypeData();h[a]=d;try{d=this._applyDataComment(c,h),e.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(k){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a= -this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&& --1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16e?u+e:d.width>e?u-a.left:u-a.right+d.width):fe?u-e:d.width>e?u-a.right+d.width:u-a.left);e=a.top;d.height-a.topg?z-g:d.height>g?z-a.bottom+d.height:z-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((d=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==d.getName()&&(d=d.getDocument().getBody()),d&&"rtl"==d.getComputedStyle("direction")&& -(u=CKEDITOR.env.ie8Compat?u-2*n.getDocument().getDocumentElement().$.scrollLeft:u-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),k;(k=a.getCustomData("activePanel"))&&k.onHide&&k.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:z+"px",left:u+"px"});n.setOpacity(1);m&&m()},this);b.isLoaded?a():b.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();c.element.focus();CKEDITOR.env.webkit&& -(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed()},0):c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(), -this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(); -this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(e=e&&this._.returnFocus)CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(e){var a=this._.panel;void 0!==e&&(a.allowBlur=e);return a.allowBlur},showAsChild:function(e,a,d,h,l,m){if(this._.activeChild!=e||e._.panel._.offsetParentId!=d.getId())this.hideChild(),e.onHide= -CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(a,d,h,l,m),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(e){var a=this._.activeChild;a&&(delete a.onHide,delete this._.activeChild,a.hide(),e&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var e=CKEDITOR.tools.isEmpty(CKEDITOR.instances), -a;for(a in h){var d=h[a];e?d.destroy():d.element.hide()}e&&(h={})})}(),function(){var e,h,f;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function d(d){function g(){var b=a.config["colorButton_"+u+"Style"];b.childRule="back"==u?function(a){return l(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||l(a)};return b}function n(b,c,d){var e={};b&&(e.color=b);c&&(e.colorName=c);c=!CKEDITOR.tools.isEmpty(e)&&new CKEDITOR.style(g(),e);a.execCommand(y, -{newStyle:c});if(b&&d)for(d.addColor(b.substr(1).toUpperCase()),b=F.element.find("[role\x3doption]").toArray(),d=0;dd)return null;this.boxes[d].getElement().remove(); -return this.boxes.splice(d,1)[0]}}});f=CKEDITOR.tools.createClass({$:function(a,d,e){this.editor=a;this.cssProperty=d;this.clickFn=e;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,d){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',d.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e', -"\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},getRowLimit:function(a){return a.config.colorButton_historyRowLimit},getCapacity:function(a){return f.getRowLimit(a)*a.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var a=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(a,function(a,e){var h=this._.getHexCode(e,this.cssProperty,f.colorList); -a[h]=a[h]||0;a[h]+=1;return a},{},this)},getHexCode:function(a,d,f){var h=a.getStyle(d);return h in f?f[h].substr(1):e.normalizeColor(a.getComputedStyle(d)).toUpperCase()},sortByOccurrencesAscending:function(a,d){var e=[],f;for(f in a){var h={};h[d]=f;h.frequency=a[f];e.push(h)}e.sort(function(a,c){return c.frequency-a.frequency});this._.trimToCapacity(e);return e.reverse()},trimToCapacity:function(a){a.splice(f.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a,function(a){this.addColor(a.colorCode)}, -this)},extractColorBox:function(a){for(var d=0;db.group?1:a.orderb.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"', -f="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(f='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+f+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+ -'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',a=CKEDITOR.addTemplate("menuItem",h),d=CKEDITOR.addTemplate("menuArrow", -'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),k=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,d){d=this._.definition=d||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=d.level||1;var b=CKEDITOR.tools.extend({},d.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level- -1,block:{}}),c=b.block.attributes=b.attributes||{};!c.role&&(c.role="menu");this._.panelDefinition=b},_:{onShow:function(){var a=this.editor.getSelection(),d=a&&a.getStartElement(),b=this.editor.elementPath(),c=this._.listeners;this.removeAll();for(var e=0;eCKEDITOR.env.version?k.createText("\r"):k.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(k.createText("").insertAfter(a),l&&(u||r.blockLimit).appendBogus(),a.getNext().$.nodeValue= -"",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):m(a,d,e,f)}}};k=CKEDITOR.plugins.enterkey;l=k.enterBr;m=k.enterBlock;b=/^h[1-6]$/}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), -f=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),a=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,e){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),e))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,e){e=e||{};var f=e.attributes||(e.attributes={});(this.multiSelect=!!e.multiSelect)&& -(f["aria-multiselectable"]=!0);!f.role&&(f.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",f.role);f=this.keys;f[40]="next";f[9]="next";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(f[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=e.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 e=this.toggle(a);if(this.onClick)this.onClick(a,e)},this));return this._.click}},proto:{add:function(d,e,f){var m=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[d]=m;var b;b=CKEDITOR.tools.htmlEncodeAttr(d).replace(a,"\\'");d={id:m,val:b,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26': -"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(f||d),text:e||d};this._.pendingList.push(h.output(d))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(f.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var e=this.isMarked(a);e?this.unmark(a):this.mark(a);return!e},hideGroup:function(a){var e=(a= -this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),e&&"ul"==e.getName()&&e.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,e=this._.groups,f=this.element.getDocument(),h;for(h in a)f.getById(a[h]).setStyle("display","");for(var b in e)a=f.getById(e[b]),h=a.getNext(),a.setStyle("display",""),h&&"ul"==h.getName()&&h.setStyle("display", -"")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var e=this.element.getDocument().getById(a);e.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(e)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var e=this.element.getDocument();a=this._.items[a];var f=e.getById(a);f.removeClass("cke_selected");e.getById(a+"_option").removeAttribute("aria-selected"); -this.onUnmark&&this.onUnmark(f)},unmarkAll:function(){var a=this._.items,e=this.element.getDocument(),f;for(f in a){var h=a[f];e.getById(h).removeClass("cke_selected");e.getById(h+"_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 e=this.element.getElementsByTag("a"),f,h=-1;if(a)for(f=this.element.getDocument().getById(this._.items[a]).getFirst();a= -e.getItem(++h);){if(a.equals(f)){this._.focusIndex=h;break}}else this.element.focus();f&&setTimeout(function(){f.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+ -(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var e=e+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+ -h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),f=CKEDITOR.addTemplate("combo",e);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:{},listeners:[]}},proto:{renderHtml:function(a){var d=[];this.render(a,d);return d.join("")},render:function(a,d){function e(){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 h=CKEDITOR.env,m,b,c="cke_"+this.id,g=CKEDITOR.tools.addFunction(function(c){b&&(a.unlockSelection(1),b=0);m.execute(c)},this),n=this;m={id:c,combo:this,focus:function(){CKEDITOR.document.getById(c).getChild(1).focus()},execute:function(b){var c=n._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(a), -c.on)c.panel.hide();else{n.commit();var d=n.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(n.id,new CKEDITOR.dom.element(b),4)}},clickFn:g};this._.listeners.push(a.on("activeFilterChange",e,this));this._.listeners.push(a.on("mode",e,this));this._.listeners.push(a.on("selectionChange",e,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",e,this));var w=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(g, -b);break;default:m.onkey(m,c)}a.preventDefault()}),x=CKEDITOR.tools.addFunction(function(){m.onfocus&&m.onfocus()});b=0;m.keyDownFn=w;h={id:c,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:h.gecko&&!h.hc?"":(this.title||"").replace("'",""),keydownFn:w,focusFn:x,clickFn:g};f.output(h,d);if(this.onRender)this.onRender();return m},createPanel:function(a){if(!this._.panel){var d=this._.panelDefinition,e=this._.panelDefinition.block,f=d.parent||CKEDITOR.document.getBody(), -h="cke_combopanel__"+this.name,b=new CKEDITOR.ui.floatPanel(a,f,d),d=b.addListBlock(this.id,e),c=this;b.onShow=function(){this.element.addClass(h);c.setState(CKEDITOR.TRISTATE_ON);c._.on=1;c.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(c.onOpen)c.onOpen()};b.onHide=function(b){this.element.removeClass(h);c.setState(c.modes&&c.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);c._.on=0;if(!b&&c.onClose)c.onClose()};b.onEscape=function(){b.hide(1)};d.onClick=function(a,d){c.onClick&& -c.onClick.call(c,a,d);b.hide()};this._.panel=b;this._.list=d;b.getBlock(this.id).onHide=function(){c._.on=0;c.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,d){this._.value=a;var e=this.document.getById("cke_"+this.id+"_text");e&&(a||d?e.removeClass("cke_combo_inlinelabel"):(d=this.label,e.addClass("cke_combo_inlinelabel")),e.setText("undefined"!=typeof d?d:a));var e="undefined"!=typeof d?d:a,f=this.label,e=e===f?e:e+", "+f;(f=this.document.getById("cke_"+this.id+"_label"))&& -f.setText(e)},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,d,e){this._.items[a]=e||a;this._.list.add(a,d,e)},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 d=this.document.getById("cke_"+this.id),e=d.getElementsByTag("a").getItem(0);d.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled");e&&e.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON);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))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var d in this._.items)if(a({value:d,text:this._.items[d]})){this.setValue(d);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,d){this.add(a, -CKEDITOR.UI_RICHCOMBO,d)}}(),function(){function e(a,e){var m=a.config,b=e.lang,c=new CKEDITOR.style(e.styleDefinition),g=new d({entries:e.entries,styleVariable:e.styleVariable,styleDefinition:e.styleDefinition}),n;a.addCommand(e.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,e=a.getSelection().getRanges()[0],g=void 0===c;if(d||c)d&&e.collapsed&&f({editor:a,range:e,style:d}),g?a.removeStyle(d):(d&&!h(d,c)&&a.removeStyle(d),a.applyStyle(c))},refresh:function(a,b){c.checkApplicable(b, -a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});n=a.getCommand(e.commandName);a.ui.addRichCombo(e.comboName,{label:b.label,title:b.panelTitle,command:e.commandName,toolbar:"styles,"+e.order,defaultValue:"cke-default",allowedContent:c,requiredContent:c,contentTransformations:"span"===e.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" "); +function(a){return d(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div>
/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^

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

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


<\/div>$/,function(b,c){return c in +d?(a.data.endsWithEOL=1,"\x3c/"+c+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null,null,3);d.on("paste",function(b){b=b.data;var c=d._.nextPasteType||b.type,e=b.dataValue,h,l=d.config.clipboard_defaultContentType||"html",m=b.dataTransfer.getTransferType(d)==CKEDITOR.DATA_TRANSFER_EXTERNAL,p=!0===d.config.forcePasteAsPlainText;h="html"==c||"html"==b.preSniffing?"html":g(e);delete d._.nextPasteType;"htmlifiedtext"==h&&(e=a(d.config,e));if("text"==c&&"html"==h)e= +k(d,e,r.get("plain-text"));else if(m&&d.pasteFilter&&!b.dontFilter||p)e=k(d,e,d.pasteFilter);b.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+e);b.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==c&&(c="html"==h||"html"==l?"html":"text");b.type=c;b.dataValue=e;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);d.on("paste",function(a){a=a.data;a.dataValue&&(d.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){d.fire("afterPaste")},0))},null,null, +1E3);d.on("pasteDialog",function(a){setTimeout(function(){d.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,d,c){function e(a,d,c){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(d)&&c!=d.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),d=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&d&&d.type==CKEDITOR.NODE_TEXT&&(c=a.getLength(),a.setText(a.getText()+d.getText()),d.remove(),b.setStart(a,c),b.collapse(!0)),!0}var g=b.startContainer;"number"==typeof c&&"number"== +typeof d&&g.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,g,d)||e(a.endContainer,g,c))},isDropRangeAffectedByDragRange:function(a,b){var d=b.startContainer,c=b.endOffset;return a.endContainer.equals(d)&&a.endOffset<=c||a.startContainer.getParent().equals(d)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,g.dragStartContainerChildCount,g.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,b))||(k=a.createBookmark(!1));g=b.clone().createBookmark(!1);l&&(k=a.createBookmark(!1));a=k.startNode;b=k.endNode;l=g.startNode;b&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=e.createRange();a.moveToBookmark(k);h.extractHtmlFromRange(a,1);b=e.createRange(); +g.startNode.getCommonAncestor(h)||(g=e.getSelection().createBookmarks()[0]);b.moveToBookmark(g);c(e,{dataTransfer:d,method:"drop",range:b},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var d=a.data.$,c=d.clientX,e=d.clientY,g=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(c,e))d=b.document.$.caretRangeFromPoint(c,e),h.setStart(CKEDITOR.dom.node(d.startContainer),d.startOffset), +h.collapse(!0);else if(d.rangeParent)h.setStart(CKEDITOR.dom.node(d.rangeParent),d.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!k;l++){if(!k)try{d.moveToPoint(c,e-l),k=!0}catch(m){}if(!k)try{d.moveToPoint(c,e+l),k=!0}catch(q){}}if(k){var u="cke-temp-"+(new Date).getTime();d.pasteHTML('\x3cspan id\x3d"'+u+'"\x3e​\x3c/span\x3e'); +var z=b.document.getById(u);h.moveToPosition(z,CKEDITOR.POSITION_BEFORE_START);z.remove()}else{var A=b.document.$.elementFromPoint(c,e),C=new CKEDITOR.dom.element(A),D;if(C.equals(b.editable())||"html"==C.getName())return g&&g.startContainer&&!g.startContainer.equals(b.editable())?g:null;D=C.getClientRect();c/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g, +types:[],data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":"files"===a?"Files":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(d);this.id||(this.id="Text"==d?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==d||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))}; +CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var d="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===d||null===d||""===d){if(this._.fallbackDataTransfer.isRequired())d=this._.fallbackDataTransfer.getData(a,b);else try{d=this.$.getData(a)||""}catch(c){d=""}"text/html"!=a||b||(d=this._stripHtml(d))}"Text"==a&&CKEDITOR.env.gecko&& +this.getFilesCount()&&"file://"==d.substring(0,7)&&(d="");if("string"===typeof d)var e=d.indexOf("\x3c/html\x3e"),d=-1!==e?d.substring(0,e+7):d;return d},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==d&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a, +b)}catch(c){}},storeId:function(){"Text"!==d&&this.setData(d,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(d){d=b._.normalizeType(d);var c=b.getData(d);"text/html"==d&&(b._.nativeHtmlCache=b.getData(d,!0),c=b._stripHtml(c));c&&(b._.data[d]=c);b._.types.push(d)}if(this.$){var b=this,d,c,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(d= +0;d$/gi,"")}a&&a.length&&(a=b(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,""));return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported= +null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(d){}}else return!1; +return!a._isCustomMimeTypeSupported},getData:function(a,b){var d=this._getData(this._customDataFallbackType,!0);if(b)return d;var d=this._extractDataComment(d),c=null,c=a===this._customDataFallbackType?d.content:d.data&&d.data[a]?d.data[a]:this._getData(a,!0);return null!==c?c:""},setData:function(a,b){var d=a===this._customDataFallbackType;d&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var c=b,e=this._dataTransfer.$;try{e.setData(a,c),d&&(this._dataTransfer._.nativeHtmlCache=c)}catch(g){if(this._isUnsupportedMimeTypeError(g)){d= +CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(d._customTypes,a)&&d._customTypes.push(a);var d=this._getFallbackTypeContent(),h=this._getFallbackTypeData();h[a]=c;try{c=this._applyDataComment(d,h),e.setData(this._customDataFallbackType,c),this._dataTransfer._.nativeHtmlCache=c}catch(k){c=""}}}return c},_getData:function(a,b){var d=this._dataTransfer._.data;if(!b&&d[a])return d[a];try{return this._dataTransfer.$.getData(a)}catch(c){return null}},_getFallbackTypeContent:function(){var a= +this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},d=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==d[a]?b[a]=d[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&& +-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16e?v+e:c.width>e?v-a.left:v-a.right+c.width):ge?v-e:c.width>e?v-a.right+c.width:v-a.left);e=a.top;c.height-a.topf?B-f:c.height>f?B-a.bottom+c.height:B-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((c=a=p.$.offsetParent&&new CKEDITOR.dom.element(p.$.offsetParent))&&"html"==c.getName()&&(c=c.getDocument().getBody()),c&&"rtl"==c.getComputedStyle("direction")&& +(v=CKEDITOR.env.ie8Compat?v-2*p.getDocument().getDocumentElement().$.scrollLeft:v-(a.$.scrollWidth-a.$.clientWidth)));var a=p.getFirst(),k;(k=a.getCustomData("activePanel"))&&k.onHide&&k.onHide.call(this,1);a.setCustomData("activePanel",this);p.setStyles({top:B+"px",left:v+"px"});p.setOpacity(1);m&&m()},this);b.isLoaded?a():b.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();d.element.focus();CKEDITOR.env.webkit&& +(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){d.markFirstDisplayed?d.markFirstDisplayed():d._.markFirstDisplayed()},0):d.markFirstDisplayed?d.markFirstDisplayed():d._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var c=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(), +this.showBlock.apply(this,c))},focus:function(){if(CKEDITOR.env.webkit){var c=CKEDITOR.document.getActive();c&&!c.equals(this._.iframe)&&c.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var c=this._.iframe.getFrameDocument().getActive();c&&c.is("a")&&(this._.lastFocused=c)},hide:function(c){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(); +this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(c=c&&this._.returnFocus)CKEDITOR.env.webkit&&c.type&&c.getWindow().$.focus(),c.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(c){var a=this._.panel;void 0!==c&&(a.allowBlur=c);return a.allowBlur},showAsChild:function(c,a,e,h,l,m){if(this._.activeChild!=c||c._.panel._.offsetParentId!=e.getId())this.hideChild(),c.onHide= +CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=c,this._.focused=!1,c.showBlock(a,e,h,l,m),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){c.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(c){var a=this._.activeChild;a&&(delete a.onHide,delete this._.activeChild,a.hide(),c&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var c=CKEDITOR.tools.isEmpty(CKEDITOR.instances), +a;for(a in h){var e=h[a];c?e.destroy():e.element.hide()}c&&(h={})})}(),function(){var c,h,g;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function e(e){function f(){var b=a.config["colorButton_"+v+"Style"];b.childRule="back"==v?function(a){return l(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||l(a)};return b}function p(b,d,c){var e={};b&&(e.color=b);d&&(e.colorName=d);d=!CKEDITOR.tools.isEmpty(e)&&new CKEDITOR.style(f(),e);a.execCommand(x, +{newStyle:d});if(b&&c)for(c.addColor(b.substr(1).toUpperCase()),b=E.element.find("[role\x3doption]").toArray(),c=0;cc)return null;this.boxes[c].getElement().remove(); +return this.boxes.splice(c,1)[0]}}});g=CKEDITOR.tools.createClass({$:function(a,c,g){this.editor=a;this.cssProperty=c;this.clickFn=g;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,c){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',c.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e', +"\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},getRowLimit:function(a){return a.config.colorButton_historyRowLimit},getCapacity:function(a){return g.getRowLimit(a)*a.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var a=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(a,function(a,c){var h=this._.getHexCode(c,this.cssProperty,g.colorList); +a[h]=a[h]||0;a[h]+=1;return a},{},this)},getHexCode:function(a,e,g){var h=a.getStyle(e);return h in g?g[h].substr(1):c.normalizeColor(a.getComputedStyle(e)).toUpperCase()},sortByOccurrencesAscending:function(a,c){var g=[],h;for(h in a){var m={};m[c]=h;m.frequency=a[h];g.push(m)}g.sort(function(a,d){return d.frequency-a.frequency});this._.trimToCapacity(g);return g.reverse()},trimToCapacity:function(a){a.splice(g.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a,function(a){this.addColor(a.colorCode)}, +this)},extractColorBox:function(a){for(var c=0;cb.group?1:a.orderb.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"', +g="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(g='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+g+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+ +'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',a=CKEDITOR.addTemplate("menuItem",h),e=CKEDITOR.addTemplate("menuArrow", +'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),k=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,c){c=this._.definition=c||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=c.level||1;var b=CKEDITOR.tools.extend({},c.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level- +1,block:{}}),d=b.block.attributes=b.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition=b},_:{onShow:function(){var a=this.editor.getSelection(),c=a&&a.getStartElement(),b=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var e=0;eCKEDITOR.env.version?k.createText("\r"):k.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(k.createText("").insertAfter(a),l&&(v||t.blockLimit).appendBogus(),a.getNext().$.nodeValue= +"",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):m(a,c,e,g)}}};k=CKEDITOR.plugins.enterkey;l=k.enterBr;m=k.enterBlock;b=/^h[1-6]$/}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var c=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), +g=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),a=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,c){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),c))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,c){c=c||{};var g=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&& +(g["aria-multiselectable"]=!0);!g.role&&(g.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",g.role);g=this.keys;g[40]="next";g[9]="next";g[38]="prev";g[CKEDITOR.SHIFT+9]="prev";g[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(g[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=c.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 c=this.toggle(a);if(this.onClick)this.onClick(a,c)},this));return this._.click}},proto:{add:function(c,g,l){var m=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[c]=m;var b;b=CKEDITOR.tools.htmlEncodeAttr(c).replace(a,"\\'");c={id:m,val:b,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26': +"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||c),text:g||c};this._.pendingList.push(h.output(c))},startGroup:function(a){this._.close();var c=CKEDITOR.tools.getNextId();this._.groups[a]=c;this._.pendingHtml.push(g.output({id:c,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var c=this.isMarked(a);c?this.unmark(a):this.mark(a);return!c},hideGroup:function(a){var c=(a= +this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),c&&"ul"==c.getName()&&c.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,c=this._.groups,g=this.element.getDocument(),h;for(h in a)g.getById(a[h]).setStyle("display","");for(var b in c)a=g.getById(c[b]),h=a.getNext(),a.setStyle("display",""),h&&"ul"==h.getName()&&h.setStyle("display", +"")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var c=this.element.getDocument().getById(a);c.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(c)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var c=this.element.getDocument();a=this._.items[a];var g=c.getById(a);g.removeClass("cke_selected");c.getById(a+"_option").removeAttribute("aria-selected"); +this.onUnmark&&this.onUnmark(g)},unmarkAll:function(){var a=this._.items,c=this.element.getDocument(),g;for(g in a){var h=a[g];c.getById(h).removeClass("cke_selected");c.getById(h+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var c=this.element.getElementsByTag("a"),g,h=-1;if(a)for(g=this.element.getDocument().getById(this._.items[a]).getFirst();a= +c.getItem(++h);){if(a.equals(g)){this._.focusIndex=h;break}}else this.element.focus();g&&setTimeout(function(){g.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"listbox"',h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+ +h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),g=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:{},listeners:[]}},proto:{renderHtml:function(a){var c=[];this.render(a,c);return c.join("")},render:function(a,c){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b= +this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=CKEDITOR.env,m,b,d="cke_"+this.id,f=CKEDITOR.tools.addFunction(function(c){b&&(a.unlockSelection(1),b=0);m.execute(c)},this),p=this;m={id:d,combo:this,focus:function(){CKEDITOR.document.getById(d).getChild(1).focus()},execute:function(b){var c=p._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(p.createPanel(a), +c.on)c.panel.hide();else{p.commit();var d=p.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(p.id,new CKEDITOR.dom.element(b),4)}},clickFn:f};this._.listeners.push(a.on("activeFilterChange",h,this));this._.listeners.push(a.on("mode",h,this));this._.listeners.push(a.on("selectionChange",h,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",h,this));var w=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(f, +b);break;default:m.onkey(m,c)}a.preventDefault()}),y=CKEDITOR.tools.addFunction(function(){m.onfocus&&m.onfocus()});b=0;m.keyDownFn=w;l={id:d,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:w,focusFn:y,clickFn:f};g.output(l,c);if(this.onRender)this.onRender();return m},createPanel:function(a){if(!this._.panel){var c=this._.panelDefinition,g=this._.panelDefinition.block,h=c.parent||CKEDITOR.document.getBody(), +m="cke_combopanel__"+this.name,b=new CKEDITOR.ui.floatPanel(a,h,c),c=b.addListBlock(this.id,g),d=this;b.onShow=function(){this.element.addClass(m);d.setState(CKEDITOR.TRISTATE_ON);d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen()};b.onHide=function(b){this.element.removeClass(m);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};b.onEscape=function(){b.hide(1)};c.onClick=function(a,c){d.onClick&& +d.onClick.call(d,a,c);b.hide()};this._.panel=b;this._.list=c;b.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,c){this._.value=a;var g=this.document.getById("cke_"+this.id+"_text");g&&(a||c?g.removeClass("cke_combo_inlinelabel"):(c=this.label,g.addClass("cke_combo_inlinelabel")),g.setText("undefined"!=typeof c?c:a));var g="undefined"!=typeof c?c:a,h=this.label,g=g===h?g:g+", "+h;(h=this.document.getById("cke_"+this.id+"_label"))&& +h.setText(g)},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,c,g){this._.items[a]=g||a;this._.list.add(a,c,g)},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 c=this.document.getById("cke_"+this.id),g=c.getElementsByTag("a").getItem(0);c.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?c.setAttribute("aria-disabled",!0):c.removeAttribute("aria-disabled");g&&g.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON);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))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var c in this._.items)if(a({value:c,text:this._.items[c]})){this.setValue(c);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,c){this.add(a, +CKEDITOR.UI_RICHCOMBO,c)}}(),function(){function c(a,c){var m=a.config,b=c.lang,d=new CKEDITOR.style(c.styleDefinition),f=new e({entries:c.entries,styleVariable:c.styleVariable,styleDefinition:c.styleDefinition}),p;a.addCommand(c.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,e=a.getSelection().getRanges()[0],f=void 0===c;if(d||c)d&&e.collapsed&&g({editor:a,range:e,style:d}),f?a.removeStyle(d):(d&&!h(d,c)&&a.removeStyle(d),a.applyStyle(c))},refresh:function(a,b){d.checkApplicable(b, +a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});p=a.getCommand(c.commandName);a.ui.addRichCombo(c.comboName,{label:b.label,title:b.panelTitle,command:c.commandName,toolbar:"styles,"+c.order,defaultValue:"cke-default",allowedContent:d,requiredContent:d,contentTransformations:"span"===c.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" "); a.name="span";a.attributes.size&&(a.styles["font-size"]=b[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(m.contentsCss),multiSelect:!1,attributes:{"aria-label":b.panelTitle}},init:function(){var c="("+a.lang.common.optionDefault+")";this.startGroup(b.panelTitle);this.add(this.defaultValue, -c,c);g.addToCombo(this)},onClick:function(b){var c=this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(e.commandName,{newStyle:g.getStyle(b),oldStyle:g.getStyle(c)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();(b=g.getMatchingValue(a,b.data.path))?b!=c&&this.setValue(b):this.setValue("",e.defaultLabel)},this);n.on("state",function(){this.setState(n.state)},this)},refresh:function(){this.setState(n.state)}})}function h(a,d){if(!(a instanceof -CKEDITOR.style&&d instanceof CKEDITOR.style))return!1;var e=function(a,b){var d=a.getDefinition().attributes,e=b.getDefinition().attributes;return CKEDITOR.tools.objectCompare(d,e)}(a,d),b=function(a,b){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(b.getDefinition())}(a,d);return e&&b}function f(d){var e=d.editor,f=d.range,b=d.style,c,g,h;c=e.elementPath();if(d=c.contains(function(a){return b.checkElementRemovable(a)})){g=f.checkBoundaryOfElement(d,CKEDITOR.START); -h=f.checkBoundaryOfElement(d,CKEDITOR.END);if(g&&h){for(g=f.createBookmark();c=d.getFirst();)c.insertBefore(d);d.remove();f.moveToBookmark(g)}else g||h?f.moveToPosition(d,g?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(f.splitElement(d),f.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),a(f,c.elements.slice(),d);e.getSelection().selectRanges([f])}}function a(d,e,f){var b=e.pop();if(b){if(f)return a(d,e,b.equals(f)?null:f);f=b.clone();d.insertNode(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START); -a(d,e)}}var d=CKEDITOR.tools.createClass({$:function(a){var d=a.entries.split(";");this._.data={};this._.names=[];for(var e=0;e=this.rect.right||a<=this.rect.top|| -a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);e.attachListener(a,"resize",f);e.attachListener(a,"mode",l);a.on("destroy",l);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({}, -k,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function a(a){var c;if(c=a&&a.type==CKEDITOR.NODE_ELEMENT)c=!(l[a.getComputedStyle("float")]||l[a.getAttribute("align")]);return c&& -!m[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;e.prototype={start:function(a){var c=this,d=this.editor,e=this.doc,f,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){d.readOnly||"wysiwyg"!=d.mode||(c.relations={},(h=e.$.elementFromPoint(k,l))&&h.nodeType&&(f=new CKEDITOR.dom.element(h),c.traverseSearch(f),isNaN(k+l)||c.pixelSearch(f,k,l),a&&a(c.relations,k,l)))});this.listener=this.editable.attachListener(this.target, -"mousemove",function(a){k=a.data.$.clientX;l=a.data.$.clientY;m.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){m.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(c){var d=this.editor.createRange();d.moveToPosition(this.relations[c.uid].element, -a[c.type]);return d}}(),store:function(){function b(a,b,d){var e=a.getUniqueId();e in d?d[e].type|=b:d[e]={element:a,type:b}}return function(c,d){var e;d&CKEDITOR.LINEUTILS_AFTER&&a(e=c.getNext())&&e.isVisible()&&(b(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_AFTER);d&CKEDITOR.LINEUTILS_INSIDE&&a(e=c.getFirst())&&e.isVisible()&&(b(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_INSIDE);b(c,d,this.relations)}}(),traverseSearch:function(b){var c,d,e;do if(e=b.$["data-cke-expando"], -!(e&&e in this.relations)){if(b.equals(this.editable))break;if(a(b))for(c in this.lookups)(d=this.lookups[c](b))&&this.store(b,d)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(b,d,e,f,h){for(var k=0,l;h(e);){e+=f;if(25==++k)break;if(l=this.doc.$.elementFromPoint(d,e))if(l==b)k=0;else if(c(b,l)&&(k=0,a(l=new CKEDITOR.dom.element(l))))return l}}var c=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}: -function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(c,d,e){var f=this.win.getViewPaneSize().height,h=b.call(this,c.$,d,e,-1,function(a){return 0this.rect.bottom)return!1;this.inline? -f.left=d.elementRect.left-this.rect.relativeX:(0[^<]*=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);f.attachListener(a,"resize",g);f.attachListener(a,"mode",l);a.on("destroy",l);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({}, +k,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},e,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},e,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function a(a){var c;if(c=a&&a.type==CKEDITOR.NODE_ELEMENT)c=!(l[a.getComputedStyle("float")]||l[a.getAttribute("align")]);return c&& +!m[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;c.prototype={start:function(a){var c=this,e=this.editor,g=this.doc,h,k,l,m,v=CKEDITOR.tools.eventsBuffer(50,function(){e.readOnly||"wysiwyg"!=e.mode||(c.relations={},(k=g.$.elementFromPoint(l,m))&&k.nodeType&&(h=new CKEDITOR.dom.element(k),c.traverseSearch(h),isNaN(l+m)||c.pixelSearch(h,l,m),a&&a(c.relations,l,m)))});this.listener=this.editable.attachListener(this.target, +"mousemove",function(a){l=a.data.$.clientX;m=a.data.$.clientY;v.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){v.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(c){var e=this.editor.createRange();e.moveToPosition(this.relations[c.uid].element, +a[c.type]);return e}}(),store:function(){function b(a,b,c){var e=a.getUniqueId();e in c?c[e].type|=b:c[e]={element:a,type:b}}return function(c,e){var g;e&CKEDITOR.LINEUTILS_AFTER&&a(g=c.getNext())&&g.isVisible()&&(b(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_AFTER);e&CKEDITOR.LINEUTILS_INSIDE&&a(g=c.getFirst())&&g.isVisible()&&(b(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_INSIDE);b(c,e,this.relations)}}(),traverseSearch:function(b){var c,e,g;do if(g=b.$["data-cke-expando"], +!(g&&g in this.relations)){if(b.equals(this.editable))break;if(a(b))for(c in this.lookups)(e=this.lookups[c](b))&&this.store(b,e)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(b,e,g,h,k){for(var l=0,m;k(g);){g+=h;if(25==++l)break;if(m=this.doc.$.elementFromPoint(e,g))if(m==b)l=0;else if(c(b,m)&&(l=0,a(m=new CKEDITOR.dom.element(m))))return m}}var c=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}: +function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(c,d,e){var g=this.win.getViewPaneSize().height,h=b.call(this,c.$,d,e,-1,function(a){return 0this.rect.bottom)return!1;this.inline? +h.left=e.elementRect.left-this.rect.relativeX:(0[^<]*e});0>g&&(g=a._.upcasts.length);a._.upcasts.splice(g,0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,g=b.upcastPriority||10;e&&("string"==typeof e?d(c, -b,g):d(e,b,g))}function k(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function l(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,g,f;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=k.count();de});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c, +b,f):d(e,b,f))}function k(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function l(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,g;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=k.count();d -a.selected.length||I(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function A(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),g=c(a.endContainer);!d&&g?(a.setEndBefore(g.wrapper),a.select()):d&&!g&&(a.setStartAfter(d.wrapper),a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")} -var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e,"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(u(a,d,null),c&&b&&u(a,c,b)):c&&b&&u(a,c,b)});e.on("dataReady",function(){F(a).commit()}); -e.on("blur",function(){var b;(b=a.focused)&&k(a,b);(b=a.widgetHoldingFocusedEditable)&&u(a,b,null)})}function C(a){var d=a.editor,e={};d.on("toDataFormat",function(d){var g=CKEDITOR.tools.getNextNumber(),f=[];d.data.downcastingSessionId=g;e[g]=f;d.data.dataValue.forEach(function(d){var e=d.attributes,g;if("data-cke-widget-white-space"in e){g=b(d);var k=c(d);g.parent.attributes["data-cke-white-space-first"]&&(g.value=g.value.replace(/^ /g," "));k.parent.attributes["data-cke-white-space-last"]&& -(k.value=k.value.replace(/ $/g," "))}if("data-cke-widget-id"in e){if(e=a.instances[e["data-cke-widget-id"]])g=d.getFirst(h.isParserWidgetElement),f.push({wrapper:d,element:g,widget:e,editables:{}}),"1"!=g.attributes["data-cke-widget-keep-attr"]&&delete g.attributes["data-widget"]}else if("data-cke-widget-editable"in e)return 0CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var g=a.focused!==e,f,h;a.editor.fire("lockSnapshot");for(g&& -(f=a.focused)&&k(a,f);f=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,f),1),f.isInited()&&(h=f.editor.checkDirty(),f.setSelected(!1),!h&&f.editor.resetDirty());g&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;f=c.pop();)b.push(f),f.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function H(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"")})}function L(a, -b,c){var d=0;b=M(b);var e=a.data.classes||{},g;if(b){for(e=CKEDITOR.tools.clone(e);g=b.pop();)c?e[g]||(d=e[g]=1):e[g]&&(delete e[g],d=1);d&&a.setData("classes",e)}}function D(a){a.cancel()}function N(a,b){var c=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),d=new CKEDITOR.dom.element(c);"br"!==c&&d.appendBogus();"after"===b?d.insertAfter(a.wrapper):d.insertBefore(a.wrapper);(function(b){var c=a.editor.createRange();c.setStart(b,0);a.editor.getSelection().selectRanges([c])})(d)} -function I(a,b){var c=a.widgets.focused,d,e,g;P.hasCopyBin(a)||(e=new P(a,{beforeDestroy:function(){!b&&c&&c.focus();g&&a.getSelection().selectBookmarks(g);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),g=a.getSelection().createBookmarks(!0)),e.handle(G(a)))}function M(a){return(a= -(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function R(){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 K(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function G(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat", -function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function O(a,b){var c=a.editor.config.widget_keystrokeInsertLineBefore,d=a.editor.config.widget_keystrokeInsertLineAfter;Y(a);S(a);X(a);ca(a);W(a);ba(a);da(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element"); -a.on("key",function(b){b=b.data.keyCode;if(b==c)N(a,"before"),a.editor.fire("saveSnapshot");else if(b==d)N(a,"after"),a.editor.fire("saveSnapshot");else if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){I(a.editor,b==CKEDITOR.CTRL+88);return}if(b in ha||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 Y(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id", -a.id)}function S(a,b){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function X(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function ca(a){if(!0===a.mask)J(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,T,a),c=CKEDITOR.env.gecko?300:0,d, -e;a.on("focus",function(){b.input();d=a.editor.on("change",b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var g=a.element.find("img");CKEDITOR.tools.array.forEach(g.toArray(),function(a){a.on("load",function(){b.input()})})}for(var f in a.editables)a.editables[f].on("focus",function(){a.editor.on("change", -b.input);e&&e.removeListener()}),a.editables[f].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function J(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function T(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask"); +tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function q(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,f;c.attachListener(d,"mousedown",function(c){var d=c.data.getTarget();e=d instanceof CKEDITOR.dom.element?a.getByElement(d):null;f=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("data-cke-widget-drag-handler")?(f=1,a.focused!=e&&b.getSelection().removeAllRanges()):h.getNestedEditable(e.wrapper, +d)?e=null:(c.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});c.attachListener(d,"mouseup",function(){f&&e&&e.wrapper&&(f=0,e.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&c.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!h.getNestedEditable(c.wrapper,b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function u(a){a.editor.on("key", +function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function z(a){function b(d){1> +a.selected.length||H(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function A(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),f=c(a.endContainer);!d&&f?(a.setEndBefore(f.wrapper),a.select()):d&&!f&&(a.setStartAfter(d.wrapper),a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")} +var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e,"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(v(a,d,null),c&&b&&v(a,c,b)):c&&b&&v(a,c,b)});e.on("dataReady",function(){E(a).commit()}); +e.on("blur",function(){var b;(b=a.focused)&&k(a,b);(b=a.widgetHoldingFocusedEditable)&&v(a,b,null)})}function C(a){var c=a.editor,e={};c.on("toDataFormat",function(c){var f=CKEDITOR.tools.getNextNumber(),g=[];c.data.downcastingSessionId=f;e[f]=g;c.data.dataValue.forEach(function(c){var e=c.attributes,f;if("data-cke-widget-white-space"in e){f=b(c);var k=d(c);f.parent.attributes["data-cke-white-space-first"]&&(f.value=f.value.replace(/^ /g," "));k.parent.attributes["data-cke-white-space-last"]&& +(k.value=k.value.replace(/ $/g," "))}if("data-cke-widget-id"in e){if(e=a.instances[e["data-cke-widget-id"]])f=c.getFirst(h.isParserWidgetElement),g.push({wrapper:c,element:f,widget:e,editables:{}}),"1"!=f.attributes["data-cke-widget-keep-attr"]&&delete f.attributes["data-widget"]}else if("data-cke-widget-editable"in e)return 0CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&& +(g=a.focused)&&k(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(h=g.editor.checkDirty(),g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function G(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"")})}function K(a, +b,c){var d=0;b=I(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function F(a){a.cancel()}function M(a,b){var c=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),d=new CKEDITOR.dom.element(c);"br"!==c&&d.appendBogus();"after"===b?d.insertAfter(a.wrapper):d.insertBefore(a.wrapper);(function(b){var c=a.editor.createRange();c.setStart(b,0);a.editor.getSelection().selectRanges([c])})(d)} +function H(a,b){var c=a.widgets.focused,d,e,f;Q.hasCopyBin(a)||(e=new Q(a,{beforeDestroy:function(){!b&&c&&c.focus();f&&a.getSelection().selectBookmarks(f);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),e.handle(O(a)))}function I(a){return(a= +(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function P(){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 L(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function O(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat", +function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function N(a,b){var c=a.editor.config.widget_keystrokeInsertLineBefore,d=a.editor.config.widget_keystrokeInsertLineAfter;V(a);S(a);U(a);da(a);fa(a);ka(a);W(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element"); +a.on("key",function(b){b=b.data.keyCode;if(b==c)M(a,"before"),a.editor.fire("saveSnapshot");else if(b==d)M(a,"after"),a.editor.fire("saveSnapshot");else if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){H(a.editor,b==CKEDITOR.CTRL+88);return}if(b in X||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 V(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id", +a.id)}function S(a,b){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function U(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function da(a){if(!0===a.mask)T(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,ea,a),c=CKEDITOR.env.gecko?300:0, +d,e;a.on("focus",function(){b.input();d=a.editor.on("change",b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change", +b.input);e&&e.removeListener()}),a.editables[g].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function T(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function ea(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask"); b||(b=new CKEDITOR.dom.element("img",this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+ -"px",height:a.$.offsetHeight+"px"})}}}function W(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler", -"data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",aa,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart", -function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function aa(a){function b(){var c;for(q.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,g=this.repository.liner,f=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(g.visible)||(d=e.getRange(d[0]),this.focus(),f.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");g.hideVisible();f.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c= -this.repository.finder,d=this.repository.locator,e=this.repository.liner,g=this.editor,f=g.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var p=c.greedySearch(),q=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(p);k=d.sort(m,1);k.length&&(e.prepare(p,l),e.placeLine(k[0]),e.cleanup())});f.addClass("cke_widget_dragging");h.push(f.on("mousemove",function(a){m=a.data.$.clientY;q.input()}));g.fire("dragstart",{target:a.sender});h.push(g.document.once("mouseup",b,this));f.isInline()|| -h.push(CKEDITOR.document.once("mouseup",b,this))}}function ba(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function da(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 Z(a){a.element.data("cke-widget-data", -encodeURIComponent(JSON.stringify(a.data)))}function U(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,g=0;gCKEDITOR.env.version))d.on("dragstart", +function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function ia(a){function b(){var c;for(q.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c= +this.repository.finder,d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=c.greedySearch(),q=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;q.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",b,this));g.isInline()|| +h.push(CKEDITOR.document.once("mouseup",b,this))}}function ka(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function W(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 Z(a){a.element.data("cke-widget-data", +encodeURIComponent(JSON.stringify(a.data)))}function aa(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,f=0;f)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, -ha={37:1,38:1,39:1,40:1,8:1,46:1};ha[CKEDITOR.SHIFT+121]=1;var P=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection? -"left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,g=c.document.getDocumentElement().$,f=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout, -p,q,v;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);p=c.on("selectionChange",D,null,null,0);q=c.widgets.on("checkSelection",D,null,null,0);e&&(v=g.scrollTop);f.selectNodeContents(b);f.select();e&&(g.scrollTop=v);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();p.removeListener();q.removeListener();c.fire("unlockSnapshot"); -h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!P.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=e;h.nestedEditable=f}(),CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13,CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13,"use strict",function(){function e(a){function b(){this.deflated||(a.widgets.focused==this.widget&&(this.focused=!0),a.widgets.destroy(this.widget), -this.deflated=!0)}function d(){var b=a.editable(),c=a.document;if(this.deflated)this.widget=a.widgets.initOn(this.element,"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,b)).block&&(b=c.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div"),b.replace(this.widget.wrapper),this.widget.wrapper.move(b)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var g=this.widget,b=e,c=g.wrapper,f=g.data.align,g=g.data.hasCaption; -if(b){for(var h=3;h--;)c.removeClass(b[h]);"center"==f?g&&c.addClass(b[1]):"none"!=f&&c.addClass(b[x[f]])}else"center"==f?(g?c.setStyle("text-align","center"):c.removeStyle("text-align"),c.removeStyle("float")):("none"==f?c.removeStyle("float"):c.setStyle("float",f),c.removeStyle("text-align"))}}var e=a.config.image2_alignClasses,l=a.config.image2_captionedClass;return{allowedContent:c(a),requiredContent:"img[src,alt]",features:g(a),styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]], -editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}},parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var c=this.features;this.data.hasCaption&&!a.filter.checkFeature(c.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||a.filter.checkFeature(c.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:b, -inflate:d});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(c.dimension)){c=this.data;c={width:c.width,height:c.height};e=this.parts.image;for(var g in c)c[g]?e.setAttribute(g, -c[g]):e.removeAttribute(g),e.$.style.removeProperty(g)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var b=CKEDITOR.plugins.image2,c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.$.style.width&&parseInt(c.$.style.width)||c.getAttribute("width")||"",height:c.$.style.height&&parseInt(c.$.style.height)||c.getAttribute("height")||"",lock:this.ready?b.checkHasNaturalRatio(c):!0},g=c.getAscendant("a");g&&this.wrapper.contains(g)&& -(this.parts.link=g);d.align||(c=d.hasCaption?this.element:c,e?(c.hasClass(e[0])?d.align="left":c.hasClass(e[2])&&(d.align="right"),d.align?c.removeClass(e[x[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float")));a.plugins.link&&this.parts.link&&(d.link=b.getLinkAttributesParser()(a,this.parts.link),(c=d.link.advanced)&&c.advCSSClasses&&(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(d.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption"); -this.setData(d);a.filter.checkFeature(this.features.dimension)&&!0!==a.config.image2_disableResizer&&k(this);this.shiftState=b.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF;if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=CKEDITOR.TRISTATE_OFF})},addClass:function(a){n(this).addClass(a)},hasClass:function(a){return n(this).hasClass(a)},removeClass:function(a){n(this).removeClass(a)},getClasses:function(){var a=new RegExp("^("+ -[].concat(l,e).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:h(a),downcast:f(a),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt||"")+" "+this.pathName)}}}function h(b){var c=a(b),e=b.config.image2_captionedClass;return function(a,b){var g={width:1,height:1},f=a.name,h;if(!a.attributes["data-cke-realelement"]&&(c(a)?("div"==f&&(h=a.getFirst("figure"))&& -(a.replaceWith(h),a=h),b.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==f&&a.hasClass(e)?h=a.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:d(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var k in g)(g=h.attributes[k])&&g.match(t)&&delete h.attributes[k];return a}}}function f(a){var b=a.config.image2_alignClasses;return function(a){var c="a"==a.name?a.getFirst():a,d=c.attributes,e=this.data.align;if(!this.inline){var g= -a.getFirst("span");g&&g.replaceWith(g.getFirst({img:1,a:1}))}e&&"none"!=e&&(g=CKEDITOR.tools.parseCssText(d.style||""),"center"==e&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1,right:1}&&(b?c.addClass(b[x[e]]):g["float"]=e),b||CKEDITOR.tools.isEmpty(g)||(d.style=CKEDITOR.tools.writeCssText(g)));return a}}function a(a){var b=a.config.image2_captionedClass,c=a.config.image2_alignClasses,e={figure:1,a:1,img:1};return function(g){if(!(g.name in -{div:1,p:1}))return!1;var f=g.children;if(1!==f.length)return!1;f=f[0];if(!(f.name in e))return!1;if("p"==g.name){if(!d(f))return!1}else if("figure"==f.name){if(!f.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!d(f))return!1;return(c?g.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(g.attributes.style||"",!0)["text-align"])?!0:!1}}function d(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function k(a){var b=a.editor,c=b.editable(),d=b.document, -e=a.resizer=d.createElement("span");e.addClass("cke_image_resizer");e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("​",d));if(a.inline)a.wrapper.append(e);else{var g=a.parts.link||a.parts.image,f=g.getParent(),h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(g);h.append(e);a.element.append(h,!0);f.is("span")&&f.remove()}e.on("mousedown",function(g){function f(a,b,c){var e=CKEDITOR.document,g=[];d.equals(e)||g.push(e.on(a,b));g.push(d.on(a,b)); -if(c)for(a=g.length;a--;)c.push(g.pop())}function h(){S=B+q*J;X=Math.round(S/x)}function k(){X=w-T;S=Math.round(X*x)}var l=a.parts.image,m=function(){var a=b.config.image2_maxSize,c;if(!a)return null;a=CKEDITOR.tools.copy(a);c=CKEDITOR.plugins.image2.getNatural(l);a.width=Math.max("natural"===a.width?c.width:a.width,15);a.height=Math.max("natural"===a.height?c.height:a.height,15);return a}(),q="right"==a.data.align?-1:1,v=g.data.$.screenX,n=g.data.$.screenY,B=l.$.clientWidth,w=l.$.clientHeight,x= -B/w,t=[],O="cke_image_s"+(~q?"e":"w"),Y,S,X,ca,J,T,W;l.$.style.height&&(l.setAttribute("height",parseInt(l.$.style.height)),l.$.style.removeProperty("height"));l.$.style.width&&(l.setAttribute("width",parseInt(l.$.style.width)),l.$.style.removeProperty("width"));b.fire("saveSnapshot");f("mousemove",function(a){Y=a.data.$;J=Y.screenX-v;T=n-Y.screenY;W=Math.abs(J/T);1==q?0>=J?0>=T?h():W>=x?h():k():0>=T?W>=x?k():h():k():0>=J?0>=T?W>=x?k():h():k():0>=T?h():W>=x?h():k();a=m&&(S>m.width||X>m.height);15> -S||15>X||a||(ca={width:S,height:X},l.setAttributes(ca))},t);f("mouseup",function(){for(var d;d=t.pop();)d.removeListener();c.removeClass(O);e.removeClass("cke_image_resizing");ca&&(a.setData(ca),b.fire("saveSnapshot"));ca=!1},t);c.addClass(O);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function l(a){var c=[],d;return function(e){var g=a.getCommand("justify"+e);if(g){c.push(function(){g.refresh(a,a.elementPath())}); -if(e in{right:1,left:1,center:1})g.on("exec",function(d){var g=b(a);if(g){g.setData("align",e);for(g=c.length;g--;)c[g]();d.cancel()}});g.on("refresh",function(c){var g=b(a),f={right:1,left:1,center:1};g&&(void 0===d&&(d=a.filter.checkFeature(a.widgets.registered.image.features.align)),d?this.setState(g.data.align==e?CKEDITOR.TRISTATE_ON:e in f?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),c.cancel())})}}}function m(a){if(a.plugins.link){var c=CKEDITOR.on("dialogDefinition", -function(c){c=c.data;if("link"==c.name){c=c.definition;var d=c.onShow,e=c.onOk;c.onShow=function(){var c=b(a),e=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();c&&(c.inline?!c.wrapper.getAscendant("a"):1)?(this.setupContent(c.data.link||{}),e.hide()):(e.show(),d.apply(this,arguments))};c.onOk=function(){var c=b(a);if(c&&(c.inline?!c.wrapper.getAscendant("a"):1)){var d={};this.commitContent(d);c.setData("link",d)}else e.apply(this,arguments)}}});a.on("destroy", -function(){c.removeListener()});a.getCommand("unlink").on("exec",function(c){var d=b(a);d&&d.parts.link&&(d.setData("link",null),this.refresh(a,a.elementPath()),c.cancel())});a.getCommand("unlink").on("refresh",function(c){var d=b(a);d&&(this.setState(d.data.link||d.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),c.cancel())})}}function b(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function c(b){var c=b.config.image2_alignClasses;b={div:{match:a(b)},p:{match:a(b)}, -img:{attributes:"!src,alt,width,height"},figure:{classes:"!"+b.config.image2_captionedClass},figcaption:!0};c?(b.div.classes=c[1],b.p.classes=b.div.classes,b.img.classes=c[0]+","+c[2],b.figure.classes+=","+b.img.classes):(b.div.styles="text-align",b.p.styles="text-align",b.img.styles="float",b.figure.styles="float,display");return b}function g(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+(a?"("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}} -function n(a){return a.data.hasCaption?a.element:a.parts.image}var w=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),x={left:0,center:1,right:2},t=/^\s*(\d+\%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:!0,onLoad:function(){CKEDITOR.addCss('.cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_editable[contenteditable\x3d"false"] .cke_image_resizer{display:none;}.cke_widget_wrapper\x3ea{display:inline-block}')}, -init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var b=a.config,c=a.lang.image2,d=e(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;d.pathName=c.pathName;d.editables.caption.pathName=c.pathNameCaption;a.widgets.add("image",d);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:c.menu,command:"image", -group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=l(a),d;for(d in b)c(d);m(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,g){var f={};e?f.attributes={"class":e[1]}:f.styles={"text-align":"center"};f=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",f);c(f,g);g.move(f);return f}function c(b,d){if(d.getParent()){var e=a.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START); -d.remove();f.insertElementIntoRange(b,e)}else b.replace(d)}var d=a.document,e=a.config.image2_alignClasses,g=a.config.image2_captionedClass,f=a.editable(),h=["hasCaption","align","link"],k={align:function(c,d,g){var f=c.element;c.changed.align?c.newData.hasCaption||("center"==g&&(c.deflate(),c.element=b(a,f)),c.changed.hasCaption||"center"!=d||"center"==g||(c.deflate(),d=f.findOne("a,img"),d.replace(f),c.element=d)):"center"==g&&c.changed.hasCaption&&!c.newData.hasCaption&&(c.deflate(),c.element= -b(a,f));!e&&f.is("figure")&&("center"==g?f.setStyle("display","inline-block"):f.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(w.output({captionedClass:g,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(f,b.element),e.replace(f.findOne("img")),b.element=f):(e.replace(b.element),b.element=e))},link:function(b,c,e){if(b.changed.link){var g=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")&&!e||b.element.is("img")&&e,k;h&&b.deflate();e?(c||(k=d.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(g),g.move(k)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(k||f).setAttributes(e.set),e.removed.length&&(k||f).removeAttributes(e.removed)):(e=f.findOne("img"),e.replace(f),k=e);h&&(b.element=k)}}};return function(a){var b,c; +h.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};h.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};h.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};h.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";g.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData|| +this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.unprotectRealComments(a);a=this.editor.dataProcessor.unprotectSource(a);a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var ca=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, +X={37:1,38:1,39:1,40:1,8:1,46:1};X[CKEDITOR.SHIFT+121]=1;var Q=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection? +"left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=c.document.getDocumentElement().$,g=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout, +n,q,u;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);n=c.on("selectionChange",F,null,null,0);q=c.widgets.on("checkSelection",F,null,null,0);e&&(u=f.scrollTop);g.selectNodeContents(b);g.select();e&&(f.scrollTop=u);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();n.removeListener();q.removeListener();c.fire("unlockSnapshot"); +h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!Q.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=c;h.nestedEditable=g}(),CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13,CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13,"use strict",function(){function c(a){function b(){this.deflated||(a.widgets.focused==this.widget&&(this.focused=!0),a.widgets.destroy(this.widget), +this.deflated=!0)}function c(){var b=a.editable(),d=a.document;if(this.deflated)this.widget=a.widgets.initOn(this.element,"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,b)).block&&(b=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div"),b.replace(this.widget.wrapper),this.widget.wrapper.move(b)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var f=this.widget,b=e,d=f.wrapper,g=f.data.align,f=f.data.hasCaption; +if(b){for(var h=3;h--;)d.removeClass(b[h]);"center"==g?f&&d.addClass(b[1]):"none"!=g&&d.addClass(b[y[g]])}else"center"==g?(f?d.setStyle("text-align","center"):d.removeStyle("text-align"),d.removeStyle("float")):("none"==g?d.removeStyle("float"):d.setStyle("float",g),d.removeStyle("text-align"))}}var e=a.config.image2_alignClasses,l=a.config.image2_captionedClass;return{allowedContent:d(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 f in d)d[f]?e.setAttribute(f, +d[f]):e.removeAttribute(f),e.$.style.removeProperty(f)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var b=CKEDITOR.plugins.image2,c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.$.style.width&&parseInt(c.$.style.width)||c.getAttribute("width")||"",height:c.$.style.height&&parseInt(c.$.style.height)||c.getAttribute("height")||"",lock:this.ready?b.checkHasNaturalRatio(c):!0},f=c.getAscendant("a");f&&this.wrapper.contains(f)&& +(this.parts.link=f);d.align||(c=d.hasCaption?this.element:c,e?(c.hasClass(e[0])?d.align="left":c.hasClass(e[2])&&(d.align="right"),d.align?c.removeClass(e[y[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float")));a.plugins.link&&this.parts.link&&(d.link=b.getLinkAttributesParser()(a,this.parts.link),(c=d.link.advanced)&&c.advCSSClasses&&(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(d.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption"); +this.setData(d);a.filter.checkFeature(this.features.dimension)&&!0!==a.config.image2_disableResizer&&k(this);this.shiftState=b.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF;if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=CKEDITOR.TRISTATE_OFF})},addClass:function(a){p(this).addClass(a)},hasClass:function(a){return p(this).hasClass(a)},removeClass:function(a){p(this).removeClass(a)},getClasses:function(){var a=new RegExp("^("+ +[].concat(l,e).join("|")+")$");return function(){var b=this.repository.parseElementClasses(p(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:h(a),downcast:g(a),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt||"")+" "+this.pathName)}}}function h(b){var c=a(b),d=b.config.image2_captionedClass;return function(a,b){var f={width:1,height:1},g=a.name,h;if(!a.attributes["data-cke-realelement"]&&(c(a)?("div"==g&&(h=a.getFirst("figure"))&& +(a.replaceWith(h),a=h),b.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==g&&a.hasClass(d)?h=a.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:e(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var k in f)(f=h.attributes[k])&&f.match(r)&&delete h.attributes[k];return a}}}function g(a){var b=a.config.image2_alignClasses;return function(a){var c="a"==a.name?a.getFirst():a,d=c.attributes,e=this.data.align;if(!this.inline){var f= +a.getFirst("span");f&&f.replaceWith(f.getFirst({img:1,a:1}))}e&&"none"!=e&&(f=CKEDITOR.tools.parseCssText(d.style||""),"center"==e&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1,right:1}&&(b?c.addClass(b[y[e]]):f["float"]=e),b||CKEDITOR.tools.isEmpty(f)||(d.style=CKEDITOR.tools.writeCssText(f)));return a}}function a(a){var b=a.config.image2_captionedClass,c=a.config.image2_alignClasses,d={figure:1,a:1,img:1};return function(f){if(!(f.name in +{div:1,p:1}))return!1;var g=f.children;if(1!==g.length)return!1;g=g[0];if(!(g.name in d))return!1;if("p"==f.name){if(!e(g))return!1}else if("figure"==g.name){if(!g.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!e(g))return!1;return(c?f.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(f.attributes.style||"",!0)["text-align"])?!0:!1}}function e(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function k(a){var b=a.editor,c=b.editable(),d=b.document, +e=a.resizer=d.createElement("span");e.addClass("cke_image_resizer");e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("​",d));if(a.inline)a.wrapper.append(e);else{var f=a.parts.link||a.parts.image,g=f.getParent(),h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(f);h.append(e);a.element.append(h,!0);g.is("span")&&g.remove()}e.on("mousedown",function(f){function g(a,b,c){var e=CKEDITOR.document,f=[];d.equals(e)||f.push(e.on(a,b));f.push(d.on(a,b)); +if(c)for(a=f.length;a--;)c.push(f.pop())}function h(){S=z+q*T;U=Math.round(S/r)}function k(){U=w-ea;S=Math.round(U*r)}var l=a.parts.image,m=function(){var a=b.config.image2_maxSize,c;if(!a)return null;a=CKEDITOR.tools.copy(a);c=CKEDITOR.plugins.image2.getNatural(l);a.width=Math.max("natural"===a.width?c.width:a.width,15);a.height=Math.max("natural"===a.height?c.height:a.height,15);return a}(),q="right"==a.data.align?-1:1,u=f.data.$.screenX,p=f.data.$.screenY,z=l.$.clientWidth,w=l.$.clientHeight,r= +z/w,y=[],N="cke_image_s"+(~q?"e":"w"),V,S,U,da,T,ea,fa;l.$.style.height&&(l.setAttribute("height",parseInt(l.$.style.height)),l.$.style.removeProperty("height"));l.$.style.width&&(l.setAttribute("width",parseInt(l.$.style.width)),l.$.style.removeProperty("width"));b.fire("saveSnapshot");g("mousemove",function(a){V=a.data.$;T=V.screenX-u;ea=p-V.screenY;fa=Math.abs(T/ea);1==q?0>=T?0>=ea?h():fa>=r?h():k():0>=ea?fa>=r?k():h():k():0>=T?0>=ea?fa>=r?k():h():k():0>=ea?h():fa>=r?h():k();a=m&&(S>m.width||U> +m.height);15>S||15>U||a||(da={width:S,height:U},l.setAttributes(da))},y);g("mouseup",function(){for(var d;d=y.pop();)d.removeListener();c.removeClass(N);e.removeClass("cke_image_resizing");da&&(a.setData(da),b.fire("saveSnapshot"));da=!1},y);c.addClass(N);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function l(a){var c=[],d;return function(e){var f=a.getCommand("justify"+e);if(f){c.push(function(){f.refresh(a, +a.elementPath())});if(e in{right:1,left:1,center:1})f.on("exec",function(d){var f=b(a);if(f){f.setData("align",e);for(f=c.length;f--;)c[f]();d.cancel()}});f.on("refresh",function(c){var f=b(a),g={right:1,left:1,center:1};f&&(void 0===d&&(d=a.filter.checkFeature(a.widgets.registered.image.features.align)),d?this.setState(f.data.align==e?CKEDITOR.TRISTATE_ON:e in g?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),c.cancel())})}}}function m(a){if(a.plugins.link){var c= +CKEDITOR.on("dialogDefinition",function(c){c=c.data;if("link"==c.name){c=c.definition;var d=c.onShow,e=c.onOk;c.onShow=function(){var c=b(a),e=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();c&&(c.inline?!c.wrapper.getAscendant("a"):1)?(this.setupContent(c.data.link||{}),e.hide()):(e.show(),d.apply(this,arguments))};c.onOk=function(){var c=b(a);if(c&&(c.inline?!c.wrapper.getAscendant("a"):1)){var d={};this.commitContent(d);c.setData("link",d)}else e.apply(this, +arguments)}}});a.on("destroy",function(){c.removeListener()});a.getCommand("unlink").on("exec",function(c){var d=b(a);d&&d.parts.link&&(d.setData("link",null),this.refresh(a,a.elementPath()),c.cancel())});a.getCommand("unlink").on("refresh",function(c){var d=b(a);d&&(this.setState(d.data.link||d.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),c.cancel())})}}function b(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function d(b){var c=b.config.image2_alignClasses; +b={div:{match:a(b)},p:{match:a(b)},img:{attributes:"!src,alt,width,height"},figure:{classes:"!"+b.config.image2_captionedClass},figcaption:!0};c?(b.div.classes=c[1],b.p.classes=b.div.classes,b.img.classes=c[0]+","+c[2],b.figure.classes+=","+b.img.classes):(b.div.styles="text-align",b.p.styles="text-align",b.img.styles="float",b.figure.styles="float,display");return b}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 p(a){return a.data.hasCaption?a.element:a.parts.image}var w=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),y={left:0,center:1,right:2},r=/^\s*(\d+\%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:!0,onLoad:function(){CKEDITOR.addCss('.cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_editable[contenteditable\x3d"false"] .cke_image_resizer{display:none;}.cke_widget_wrapper\x3ea{display:inline-block}')}, +init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var b=a.config,d=a.lang.image2,e=c(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;e.pathName=d.pathName;e.editables.caption.pathName=d.pathNameCaption;a.widgets.add("image",e);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:d.menu,command:"image", +group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=l(a),d;for(d in b)c(d);m(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,f){var g={};e?g.attributes={"class":e[1]}:g.styles={"text-align":"center"};g=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",g);c(g,f);f.move(g);return g}function c(b,d){if(d.getParent()){var e=a.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START); +d.remove();g.insertElementIntoRange(b,e)}else b.replace(d)}var d=a.document,e=a.config.image2_alignClasses,f=a.config.image2_captionedClass,g=a.editable(),h=["hasCaption","align","link"],k={align:function(c,d,f){var g=c.element;c.changed.align?c.newData.hasCaption||("center"==f&&(c.deflate(),c.element=b(a,g)),c.changed.hasCaption||"center"!=d||"center"==f||(c.deflate(),d=g.findOne("a,img"),d.replace(g),c.element=d)):"center"==f&&c.changed.hasCaption&&!c.newData.hasCaption&&(c.deflate(),c.element= +b(a,g));!e&&g.is("figure")&&("center"==f?g.setStyle("display","inline-block"):g.removeStyle("display"))},hasCaption:function(b,e,g){b.changed.hasCaption&&(e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),g?(g=CKEDITOR.dom.element.createFromHtml(w.output({captionedClass:f,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(g,b.element),e.replace(g.findOne("img")),b.element=g):(e.replace(b.element),b.element=e))},link:function(b,c,e){if(b.changed.link){var f=b.element.is("img")? +b.element:b.element.findOne("img"),g=b.element.is("a")?b.element:b.element.findOne("a"),h=b.element.is("a")&&!e||b.element.is("img")&&e,k;h&&b.deflate();e?(c||(k=d.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(f),f.move(k)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(k||g).setAttributes(e.set),e.removed.length&&(k||g).removeAttributes(e.removed)):(e=g.findOne("img"),e.replace(g),k=e);h&&(b.element=k)}}};return function(a){var b,c; a.changed={};for(c=0;cy.length)return!1;h=b.getParents(!0);for(l=0;lq;l++)v[l].indent+=h;h=CKEDITOR.plugins.list.arrayToList(v,d,null,a.config.enterMode,b.getDirection());if(!c.isIndent){var C;if((C=b.getParent())&&C.is("li"))for(var y=h.listNode.getChildren(),E=[],x,l=y.count()-1;0<=l;l--)(x=y.getItem(l))&&x.is&&x.is("li")&&E.push(x)}h&&h.listNode.replace(b); -if(E&&E.length)for(l=0;l(b+=e?1:-1))return;b=Math.min(b,d.length);b=Math.max(b,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0b)return;b=Math.max(b,0);b=Math.ceil(b/f)*f;a.setStyle(d,b?b+(c.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database, -a,"indent_processed",1)}}function h(a,d){return"ltr"==(d||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var f=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,d=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(l){function m(){b.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:c?null:"margin-left,margin-right",classes:c||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")+(c?"("+c.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var e=b.block|| -b.blockLimit;if(!e.is(f))var l=e.getAscendant(f),e=l&&b.contains(l)||e;e.is(f)&&(e=e.getParent());if(this.enterBr||this.getContext(b)){if(c){var l=c,e=e.$.className.match(this.classNameRegex),m=this.isIndent,l=e?m?e[1]!=l.slice(-1):!0:m;return l?k:d}return this.isIndent?k:e?CKEDITOR[0>=(parseInt(e.getStyle(h(e)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:d}return d},exec:function(b){var d=b.getSelection(),d=d&&d.getRanges()[0],f;if(f=b.elementPath().contains(a))e.call(this,f,c);else for(d=d.createIterator(), -b=b.config.enterMode,d.enforceRealBlocks=!0,d.enlargeBr=b!=CKEDITOR.ENTER_BR;f=d.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)f.isReadOnly()||e.call(this,f,c);return!0}}}}var b=CKEDITOR.plugins.indent,c=l.config.indentClasses;b.registerCommands(l,{indentblock:new m(l,"indentblock",!0),outdentblock:new m(l,"outdentblock")});CKEDITOR.tools.extend(m.prototype,b.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:c?new RegExp("(?:^|\\s+)("+ -c.join("|")+")(?\x3d$|\\s)"):null})}})}(),function(){function e(a,d){d=void 0===d||d;var e;if(d)e=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){e=a.getParent();if(!e)break;a=e}e=a.getStyle("text-align")||a.getAttribute("align")||""}e&&(e=e.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!e&&d&&(e="rtl"==a.getComputedStyle("direction")?"right":"left");return e}function h(a,d,e){this.editor=a;this.name=d;this.value=e;this.context= -"p";d=a.config.justifyClasses;var f=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(d){switch(e){case "left":this.cssClassName=d[0];break;case "center":this.cssClassName=d[1];break;case "right":this.cssClassName=d[2];break;case "justify":this.cssClassName=d[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+d.join("|")+")(?\x3d$|\\s)");this.requiredContent=f+"("+this.cssClassName+")"}else this.requiredContent=f+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0, -styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};a.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function f(a){var d=a.editor,e=d.createRange();e.setStartBefore(a.data.node);e.setEndAfter(a.data.node);for(var f=new CKEDITOR.dom.walker(e),h;h=f.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(a.data.node)&&h.getDirection())e.setStartAfter(h),f=new CKEDITOR.dom.walker(e);else{var b=d.config.justifyClasses;b&&(h.hasClass(b[0])?(h.removeClass(b[0]), -h.addClass(b[2])):h.hasClass(b[2])&&(h.removeClass(b[2]),h.addClass(b[0])));b=h.getStyle("text-align");"left"==b?h.setStyle("text-align","right"):"right"==b&&h.setStyle("text-align","left")}}h.prototype={exec:function(a){var d=a.getSelection(),f=a.config.enterMode;if(d){for(var h=d.createBookmarks(),m=d.getRanges(),b=this.cssClassName,c,g,n=a.config.useComputedState,n=void 0===n||n,w=m.length-1;0<=w;w--)for(c=m[w].createIterator(),c.enlargeBr=f!=CKEDITOR.ENTER_BR;g=c.getNextParagraph(f==CKEDITOR.ENTER_P? -"p":"div");)if(!g.isReadOnly()){var x=g.getName(),t;t=a.activeFilter.check(x+"{text-align}");if((x=a.activeFilter.check(x+"("+b+")"))||t){g.removeAttribute("align");g.removeStyle("text-align");var r=b&&(g.$.className=CKEDITOR.tools.ltrim(g.$.className.replace(this.cssClassRegex,""))),u=this.state==CKEDITOR.TRISTATE_OFF&&(!n||e(g,!0)!=this.value);b&&x?u?g.addClass(b):r||g.removeAttribute("class"):u&&t&&g.setStyle("text-align",this.value)}}a.focus();a.forceNextSelectionCheck();d.selectBookmarks(h)}}, -refresh:function(a,d){var f=d.block||d.blockLimit,h=f.getName(),m=f.equals(a.editable()),h=this.cssClassName?a.activeFilter.check(h+"("+this.cssClassName+")"):a.activeFilter.check(h+"{text-align}");m&&!CKEDITOR.dtd.$list[d.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!m&&h?this.setState(e(f,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var d= -new h(a,"justifyleft","left"),e=new h(a,"justifycenter","center"),l=new h(a,"justifyright","right"),m=new h(a,"justifyblock","justify");a.addCommand("justifyleft",d);a.addCommand("justifycenter",e);a.addCommand("justifyright",l);a.addCommand("justifyblock",m);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{label:a.lang.common.center,command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight", -{label:a.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),a.ui.addButton("JustifyBlock",{label:a.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",f)}}})}(),function(){function e(a,d){var b=k.exec(a),c=k.exec(d);if(b){if(!b[2]&&"px"==c[2])return c[1];if("px"==b[2]&&!c[2])return c[1]+"px"}return d}function h(d){return{elements:{$:function(h){var b=h.attributes,b=b&&b["data-cke-realelement"],c=f(d,decodeURIComponent(b));if((b=(b=b&&new CKEDITOR.htmlParser.fragment.fromHtml(c))&& -b.children[0])&&h.attributes["data-cke-resizable"]){var g=(new a(h)).rules;h=b.attributes;c=g.width;g=g.height;c&&(h.width=e(h.width,c));g&&(h.height=e(h.height,g))}return b}}}}function f(a,d){var b=[],c=/^cke:/i,e=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){c.test(a.name)&&(a.name=a.name.replace(c,""),b.push(a))},iframe:function(a){a.children=[]}}}),f=a.activeFilter,h=new CKEDITOR.htmlParser.basicWriter,k=CKEDITOR.htmlParser.fragment.fromHtml(d);e.applyTo(k);f.applyTo(k);CKEDITOR.tools.array.forEach(b, -function(a){a.name="cke:"+a.name});k.writeHtml(h);return h.getHtml()}var a=CKEDITOR.htmlParser.cssStyle,d=CKEDITOR.tools.cssLength,k=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){var d=a.dataProcessor;(d=d&&d.htmlFilter)&&d.addRules(h(a),{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(e,f,b,c){var g=this.lang.fakeobjects,g=g[b]|| -g.unknown;f={"class":f,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:g,title:g,align:e.getAttribute("align")||""};CKEDITOR.env.hc||(f.src=CKEDITOR.tools.transparentImageData);b&&(f["data-cke-real-element-type"]=b);c&&(f["data-cke-resizable"]=c,b=new a,c=e.getAttribute("width"),e=e.getAttribute("height"),c&&(b.rules.width=d(c)),e&&(b.rules.height=d(e)),b.populate(f));return this.document.createElement("img",{attributes:f})};CKEDITOR.editor.prototype.createFakeParserElement= -function(e,f,b,c){var g=this.lang.fakeobjects,g=g[b]||g.unknown,h;h=new CKEDITOR.htmlParser.basicWriter;e.writeHtml(h);h=h.getHtml();f={"class":f,"data-cke-realelement":encodeURIComponent(h),"data-cke-real-node-type":e.type,alt:g,title:g,align:e.attributes.align||""};CKEDITOR.env.hc||(f.src=CKEDITOR.tools.transparentImageData);b&&(f["data-cke-real-element-type"]=b);c&&(f["data-cke-resizable"]=c,c=e.attributes,e=new a,b=c.width,c=c.height,void 0!==b&&(e.rules.width=d(b)),void 0!==c&&(e.rules.height= -d(c)),e.populate(f));return new CKEDITOR.htmlParser.element("img",f)};CKEDITOR.editor.prototype.restoreRealElement=function(a){if(a.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var d=decodeURIComponent(a.data("cke-realelement")),d=f(this,d),d=CKEDITOR.dom.element.createFromHtml(d,this.document);if(a.data("cke-resizable")){var b=a.getStyle("width");a=a.getStyle("height");b&&d.setAttribute("width",e(d.getAttribute("width"),b));a&&d.setAttribute("height",e(d.getAttribute("height"),a))}return d}}(), -"use strict",function(){function e(a){return a.replace(/'/g,"\\$\x26")}function h(a){for(var b=a.length,c=[],d,e=0;ex.length)return!1;h=b.getParents(!0);for(n=0;nu;n++)q[n].indent+=h;h=CKEDITOR.plugins.list.arrayToList(q,e,null,a.config.enterMode,b.getDirection());if(!c.isIndent){var r;if((r=b.getParent())&&r.is("li"))for(var x=h.listNode.getChildren(),D=[],y,n=x.count()-1;0<=n;n--)(y=x.getItem(n))&&y.is&&y.is("li")&&D.push(y)}h&&h.listNode.replace(b); +if(D&&D.length)for(n=0;n(b+=e?1:-1))return;b=Math.min(b,c.length);b=Math.max(b,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0b)return;b=Math.max(b,0);b=Math.ceil(b/g)*g;a.setStyle(c,b?b+(d.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database, +a,"indent_processed",1)}}function h(a,c){return"ltr"==(c||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var g=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,e=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(l){function m(){b.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 c=b.block|| +b.blockLimit;if(!c.is(g))var l=c.getAscendant(g),c=l&&b.contains(l)||c;c.is(g)&&(c=c.getParent());if(this.enterBr||this.getContext(b)){if(d){var l=d,c=c.$.className.match(this.classNameRegex),m=this.isIndent,l=c?m?c[1]!=l.slice(-1):!0:m;return l?k:e}return this.isIndent?k:c?CKEDITOR[0>=(parseInt(c.getStyle(h(c)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:e}return e},exec:function(b){var e=b.getSelection(),e=e&&e.getRanges()[0],g;if(g=b.elementPath().contains(a))c.call(this,g,d);else for(e=e.createIterator(), +b=b.config.enterMode,e.enforceRealBlocks=!0,e.enlargeBr=b!=CKEDITOR.ENTER_BR;g=e.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)g.isReadOnly()||c.call(this,g,d);return!0}}}}var b=CKEDITOR.plugins.indent,d=l.config.indentClasses;b.registerCommands(l,{indentblock:new m(l,"indentblock",!0),outdentblock:new m(l,"outdentblock")});CKEDITOR.tools.extend(m.prototype,b.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 c(a,c){var g;if(c)g=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){g=a.getParent();if(!g)break;a=g}g=a.getStyle("text-align")||a.getAttribute("align")||""}g&&(g=g.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!g&&c&&(g="rtl"==a.getComputedStyle("direction")?"right":"left");return g}function h(a,c,g){this.editor=a;this.name=c;this.value=g;this.context="p";c=a.config.justifyClasses; +var h=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(c){switch(g){case "left":this.cssClassName=c[0];break;case "center":this.cssClassName=c[1];break;case "right":this.cssClassName=c[2];break;case "justify":this.cssClassName=c[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+c.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent=h+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName? +null:"text-align",classes:this.cssClassName||null}};a.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function g(a){var c=a.editor,g=c.createRange();g.setStartBefore(a.data.node);g.setEndAfter(a.data.node);for(var h=new CKEDITOR.dom.walker(g),m;m=h.next();)if(m.type==CKEDITOR.NODE_ELEMENT)if(!m.equals(a.data.node)&&m.getDirection())g.setStartAfter(m),h=new CKEDITOR.dom.walker(g);else{var b=c.config.justifyClasses;b&&(m.hasClass(b[0])?(m.removeClass(b[0]),m.addClass(b[2])):m.hasClass(b[2])&& +(m.removeClass(b[2]),m.addClass(b[0])));b=m.getStyle("text-align");"left"==b?m.setStyle("text-align","right"):"right"==b&&m.setStyle("text-align","left")}}h.prototype={exec:function(a){var e=a.getSelection(),g=a.config.enterMode;if(e){for(var h=e.createBookmarks(),m=e.getRanges(),b=this.cssClassName,d,f,p=a.config.useComputedState,w=m.length-1;0<=w;w--)for(d=m[w].createIterator(),d.enlargeBr=g!=CKEDITOR.ENTER_BR;f=d.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!f.isReadOnly()){var y=f.getName(), +r;r=a.activeFilter.check(y+"{text-align}");if((y=a.activeFilter.check(y+"("+b+")"))||r){f.removeAttribute("align");f.removeStyle("text-align");var t=b&&(f.$.className=CKEDITOR.tools.ltrim(f.$.className.replace(this.cssClassRegex,""))),v=this.state==CKEDITOR.TRISTATE_OFF&&(!p||c(f,!0)!=this.value);b&&y?v?f.addClass(b):t||f.removeAttribute("class"):v&&r&&f.setStyle("text-align",this.value)}}a.focus();a.forceNextSelectionCheck();e.selectBookmarks(h)}},refresh:function(a,e){var g=e.block||e.blockLimit, +h=g.getName(),m=g.equals(a.editable()),h=this.cssClassName?a.activeFilter.check(h+"("+this.cssClassName+")"):a.activeFilter.check(h+"{text-align}");m&&!CKEDITOR.dtd.$list[e.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!m&&h?this.setState(c(g,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var c=new h(a,"justifyleft","left"),k=new h(a, +"justifycenter","center"),l=new h(a,"justifyright","right"),m=new h(a,"justifyblock","justify");a.addCommand("justifyleft",c);a.addCommand("justifycenter",k);a.addCommand("justifyright",l);a.addCommand("justifyblock",m);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{label:a.lang.common.center,command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight",{label:a.lang.common.alignRight, +command:"justifyright",toolbar:"align,30"}),a.ui.addButton("JustifyBlock",{label:a.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",g)}}})}(),function(){function c(a,c){var b=k.exec(a),d=k.exec(c);if(b){if(!b[2]&&"px"==d[2])return d[1];if("px"==b[2]&&!d[2])return d[1]+"px"}return c}function h(e){return{elements:{$:function(h){var b=h.attributes,b=b&&b["data-cke-realelement"],d=g(e,decodeURIComponent(b));if((b=(b=b&&new CKEDITOR.htmlParser.fragment.fromHtml(d))&&b.children[0])&& +h.attributes["data-cke-resizable"]){var f=(new a(h)).rules;h=b.attributes;d=f.width;f=f.height;d&&(h.width=c(h.width,d));f&&(h.height=c(h.height,f))}return b}}}}function g(a,c){var b=[],d=/^cke:/i,e=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){d.test(a.name)&&(a.name=a.name.replace(d,""),b.push(a))},iframe:function(a){a.children=[]}}}),g=a.activeFilter,h=new CKEDITOR.htmlParser.basicWriter,k=CKEDITOR.htmlParser.fragment.fromHtml(c);e.applyTo(k);g.applyTo(k);CKEDITOR.tools.array.forEach(b, +function(a){a.name="cke:"+a.name});k.writeHtml(h);return h.getHtml()}var a=CKEDITOR.htmlParser.cssStyle,e=CKEDITOR.tools.cssLength,k=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){var c=a.dataProcessor;(c=c&&c.htmlFilter)&&c.addRules(h(a),{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(c,g,b,d){var f=this.lang.fakeobjects,f=f[b]|| +f.unknown;g={"class":g,"data-cke-realelement":encodeURIComponent(c.getOuterHtml()),"data-cke-real-node-type":c.type,alt:f,title:f,align:c.getAttribute("align")||""};CKEDITOR.env.hc||(g.src=CKEDITOR.tools.transparentImageData);b&&(g["data-cke-real-element-type"]=b);d&&(g["data-cke-resizable"]=d,b=new a,d=c.getAttribute("width"),c=c.getAttribute("height"),d&&(b.rules.width=e(d)),c&&(b.rules.height=e(c)),b.populate(g));return this.document.createElement("img",{attributes:g})};CKEDITOR.editor.prototype.createFakeParserElement= +function(c,g,b,d){var f=this.lang.fakeobjects,f=f[b]||f.unknown,h;h=new CKEDITOR.htmlParser.basicWriter;c.writeHtml(h);h=h.getHtml();g={"class":g,"data-cke-realelement":encodeURIComponent(h),"data-cke-real-node-type":c.type,alt:f,title:f,align:c.attributes.align||""};CKEDITOR.env.hc||(g.src=CKEDITOR.tools.transparentImageData);b&&(g["data-cke-real-element-type"]=b);d&&(g["data-cke-resizable"]=d,d=c.attributes,c=new a,b=d.width,d=d.height,void 0!==b&&(c.rules.width=e(b)),void 0!==d&&(c.rules.height= +e(d)),c.populate(g));return new CKEDITOR.htmlParser.element("img",g)};CKEDITOR.editor.prototype.restoreRealElement=function(a){if(a.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var e=decodeURIComponent(a.data("cke-realelement")),e=g(this,e),e=CKEDITOR.dom.element.createFromHtml(e,this.document);if(a.data("cke-resizable")){var b=a.getStyle("width");a=a.getStyle("height");b&&e.setAttribute("width",c(e.getAttribute("width"),b));a&&e.setAttribute("height",c(e.getAttribute("height"),a))}return e}}(), +"use strict",function(){function c(a){return a.replace(/'/g,"\\$\x26")}function h(a){for(var b=a.length,c=[],d,e=0;eg.length)){d=g[g.length-1].getNext();f=e.createElement(this.type);for(c.push(f);g.length;)c=g.shift(),a=e.createElement("li"),l=c,l.is("pre")||t.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a): -(c.copyAttributes(a),h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(f);h&&k&&f.setAttribute("dir",h);d?f.insertBefore(d):f.appendTo(b)}}function f(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root, +linkShowTargetTab:!0,linkDefaultProtocol:"http://"})}(),function(){function c(a,b,c,d){for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;gf.length)){d=f[f.length-1].getNext();g=e.createElement(this.type);for(c.push(g);f.length;)c=f.shift(),a=e.createElement("li"),l=c,l.is("pre")||r.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a), +h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);d?g.insertBefore(d):g.appendTo(b)}}function g(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root, c),f=[],g=0;ge[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode, -b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function a(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function d(a,b,c,d){for(var e,g;e=a[d?"getLast":"getFirst"](r);)(g=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",g),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function k(a){function b(c){var e=a[c?"getPrevious":"getNext"](w);e&&e.type==CKEDITOR.NODE_ELEMENT&& -e.is(a.getName())&&(d(a,e,null,!c),a.remove(),a=e)}b();b(1)}function l(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function m(a,c,e){a.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var g=e.extractContents();c.trim(!1,!0);var f=c.createBookmark(),h=new CKEDITOR.dom.elementPath(c.startContainer),l=h.block,h=h.lastElement.getAscendant("li",1)||l,m=new CKEDITOR.dom.elementPath(e.startContainer), -r=m.contains(CKEDITOR.dtd.$listItem),m=m.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():m&&(l=m.getPrevious(w))&&x(l)&&l.remove();(l=g.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=c.startContainer.getChild(c.startOffset))?g.insertBefore(l):c.startContainer.append(g);r&&(g=b(r))&&(h.contains(r)?(d(g,r.getParent(),r),g.remove()):h.append(g));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){m=e.startPath();g=m.block;if(!g)break;g.is("li")&&(h=g.getParent(),g.equals(h.getLast(w))&& -g.equals(h.getFirst(w))&&(g=h));e.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove()}e=e.clone();g=a.editable();e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=function(a){return w(a)&&!x(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&k(e);c.moveToBookmark(f);c.select();a.fire("saveSnapshot")}function b(a){return(a=a.getLast(w))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in c?a:null}var c={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(), -n=CKEDITOR.dom.walker.bookmark(),w=function(a){return!(g(a)||n(a))},x=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,d,e,g){if(!c[a.getName()])return[];e||(e=0);d||(d=[]);for(var f=0,h=a.getChildCount();f=h.$.documentMode&&x.append(h.createText(" ")),x.append(m.listNode),m=m.nextIndex;else if(-1==I.indent&&!d&&f){c[f.getName()]?(x=I.element.clone(!1,!0),t!=f.getDirection(1)&&x.setAttribute("dir",t)):x=new CKEDITOR.dom.documentFragment(h);var l=f.getDirection(1)!=t,M=I.element,R=M.getAttribute("class"),K=M.getAttribute("style"),G=x.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||l||K||R),O,Y=I.contents.length,S; -for(f=0;fb&&aH.version?" ":S,f=a.hotNode&&a.hotNode.getText()==g&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;b(a,function(b){f&&a.hotNode&&a.hotNode.remove();b[c?"insertAfter":"insertBefore"](d);b.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});H.ie||a.enterMode== -CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(b){b=b.getSelection().getStartElement();var g;b=b.getAscendant(T,1);if(!r(a,b)&&b&&!b.equals(a.editable)&&!b.contains(a.editable)){(g=l(b))&&"false"==g.getAttribute("contenteditable")&&(b=g);a.element=b;g=d(a,b,!c);var h;n(g)&&g.is(a.triggers)&&g.is(J)&&(!d(a,g,!c)||(h=d(a,g,!c))&&n(h)&&h.is(a.triggers))?e(g):(h=f(a,b),n(h)&&(d(a,h,!c)?(b=d(a,h,!c))&&n(b)&&b.is(a.triggers)&&e(h):e(h)))}}}()}}function g(a,b){if(!b||b.type!= -CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function w(a){if(!n(a))return!1;var b;(b=x(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function x(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function t(a,b){return n(b)?b.is(a.triggers):null}function r(a,b){if(!b)return!1;for(var c=b.getParents(1),d= -c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function u(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(ca)});if(!b)return!1;v(a,b);return c?b.size.top>a.mouse.y:b.size.bottom(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[f?"getLast":"getFirst"](function(a){return!(U(a)|| -V(a))});if(!b)return null;g(a,b)&&(b=a.line.wrap[f?"getPrevious":"getNext"](function(a){return!(U(a)||V(a))}));if(!n(b)||w(b)||!t(a,b))return null;v(a,b);return!f&&0<=b.size.top&&k(c.y,0,b.size.top+e)?(a=a.inInlineMode||0===d.scroll.y?G:Y,new h([null,b,I,K,a])):f&&b.size.bottom<=d.pane.height&&k(c.y,b.size.bottom-e,d.pane.height)?(a=a.inInlineMode||k(b.size.bottom,d.pane.height-e,d.pane.height)?O:Y,new h([b,null,M,K,a])):null}function p(a){var b=a.mouse,c=a.view,e=a.triggerOffset,g=f(a);if(!g)return null; -v(a,g);var e=Math.min(e,0|g.size.outerHeight/2),l=[],m,r;if(k(b.y,g.size.top-1,g.size.top+e))r=!1;else if(k(b.y,g.size.bottom-e,g.size.bottom+1))r=!0;else return null;if(w(g)||u(a,g,r)||g.getParent().is(X))return null;var p=d(a,g,!r);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(n(p)){if(w(p)||!t(a,p)||p.getParent().is(X))return null;l=[p,g][r?"reverse":"concat"]().concat([R,K])}}else g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?(q(a),r&&k(b.y,g.size.bottom-e,c.pane.height)&& -k(g.size.bottom,c.pane.height-e,c.pane.height)?m=O:k(b.y,0,g.size.top+e)&&(m=G)):m=Y,l=[null,g][r?"reverse":"concat"]().concat([r?M:I,K,m,g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?r?O:G:Y]);return 0 in l?new h(l):null}function y(a,b,c,d){for(var e=b.getDocumentPosition(),g={},f={},h={},k={},l=P.length;l--;)g[P[l]]=parseInt(b.getComputedStyle.call(b,"border-"+P[l]+"-width"),10)||0,h[P[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+P[l]),10)||0,f[P[l]]=parseInt(b.getComputedStyle.call(b, -"margin-"+P[l]),10)||0;c&&!d||B(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+g.top+g.bottom);k.width=k.outerWidth-(h.left+h.right+g.left+g.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return C({border:g,padding:h,margin:f,ignoreScroll:c},k,!0)}function v(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size= -{};else if(b.size.ignoreScroll==c&&b.size.date>new Date-W)return null;return C(b.size,y(a,b,c),{date:+new Date},!0)}function q(a,b){a.view.editable=y(a,a.editable,b,!0)}function B(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-W)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();C(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date}, -!0)}}function A(a,b,c,d){for(var e=d,g=d,f=0,k=!1,l=!1,m=a.view.pane.height,q=a.mouse;q.y+fd.left-e.x&&c< -d.right-e.x&&b>d.top-e.y&&bCKEDITOR.env.version,D=CKEDITOR.dtd,N={},I=128,M=64,R=32,K=16,G=4,O=2,Y=1,S=" ",X=D.$listItem,ca=D.$tableContent,J=C({},D.$nonEditable,D.$empty),T=D.$block, -W=100,aa="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",ba=aa+"border-color:transparent;display:block;border-style:solid;",da="\x3cspan\x3e"+S+"\x3c/span\x3e";N[CKEDITOR.ENTER_BR]="br";N[CKEDITOR.ENTER_P]="p";N[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties=a+b+(c||Y);return this},is:function(a){return(this.properties&a)==a}};var Z=function(){function a(b,c){var d=b.$.elementFromPoint(c.x, -c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,f=b.line.wrap;d=d||b.mouse;var h=a(e,d);c&&g(b,h)&&(f.hide(),h=a(e,d),f.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||H.ie&&9>H.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),U=CKEDITOR.dom.walker.whitespaces(),V=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),ha=function(){function b(d){var g=d.element,f,h,l;if(!n(g)||g.contains(d.editable)||g.isReadOnly())return null; -l=A(d,function(a,b){return!b.equals(a)},function(a,b){return Z(a,!0,b)},g);f=l.upper;h=l.lower;if(e(d,f,h))return l.set(R,8);if(f&&g.contains(f))for(;!f.getParent().equals(g);)f=f.getParent();else f=g.getFirst(function(a){return c(d,a)});if(h&&g.contains(h))for(;!h.getParent().equals(g);)h=h.getParent();else h=g.getLast(function(a){return c(d,a)});if(!f||!h)return null;v(d,f);v(d,h);if(!k(d.mouse.y,f.size.top,h.size.bottom))return null;for(var g=Number.MAX_VALUE,m,q,r,p;h&&!h.equals(f)&&(q=f.getNext(d.isRelevant));)m= -Math.abs(a(d,f,q)-d.mouse.y),m|<\/font>)/,d=d?"microsoft"===d:e.test(a);return a&&(h||d)},handle:function(a,f){var m=a.data,b=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/html"),c=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/rtf"),b={dataValue:b,dataTransfer:{"text/rtf":c}}; -if(!1!==e.fire("pasteFromWord",b)||h){m.dontFilter=!0;if(h||!e.config.pasteFromWordPromptCleanup||confirm(e.lang.pastefromword.confirmCleanup))b.dataValue=CKEDITOR.cleanWord(b.dataValue,e),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&d&&CKEDITOR.pasteFilters.image&&(b.dataValue=CKEDITOR.pasteFilters.image(b.dataValue,e,c)),e.fire("afterPasteFromWord",b),m.dataValue=b.dataValue,!0===e.config.forcePasteAsPlainText?m.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!== -e.config.forcePasteAsPlainText||(m.type="html");h=0;f()}}})}})}(),function(){var e={canUndo:!1,async:!0,exec:function(e,f){var a=e.lang,d=CKEDITOR.tools.keystrokeToString(a.common.keyboard,e.getCommandKeystroke(CKEDITOR.env.ie?e.commands.paste:this)),k=f&&"undefined"!==typeof f.notification?f.notification:!f||!f.from||"keystrokeHandler"===f.from&&CKEDITOR.env.ie,a=k&&"string"===typeof k?k:a.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+d.aria+'"\x3e'+d.display+"\x3c/kbd\x3e"); -e.execCommand("paste",{type:"text",notification:k?a:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var f=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",e);h.setKeystroke(f,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste",function(a){"html"!=a.data.type&& -(a.data.type="text")});h.on("pasteState",function(a){h.getCommand("pastetext").setState(a.data)})}})}(),function(){CKEDITOR.plugins.add("xml",{});CKEDITOR.xml=function(e){var h=null;if("object"==typeof e)h=e;else if(e=(e||"").replace(/ /g," "),"ActiveXObject"in window){try{h=new ActiveXObject("MSXML2.DOMDocument")}catch(f){try{h=new ActiveXObject("Microsoft.XmlDom")}catch(a){}}h&&(h.async=!1,h.resolveExternals=!1,h.validateOnParse=!1,h.loadXML(e))}else window.DOMParser&&(h=(new DOMParser).parseFromString(e, -"text/xml"));this.baseXml=h};CKEDITOR.xml.prototype={selectSingleNode:function(e,h){var f=this.baseXml;if(h||(h=f)){if("selectSingleNode"in h)return h.selectSingleNode(e);if(f.evaluate)return(f=f.evaluate(e,h,null,9,null))&&f.singleNodeValue||null}return null},selectNodes:function(e,h){var f=this.baseXml,a=[];if(h||(h=f)){if("selectNodes"in h)return h.selectNodes(e);if(f.evaluate&&(f=f.evaluate(e,h,null,5,null)))for(var d;d=f.iterateNext();)a.push(d)}return a},getInnerXml:function(e,h){var f=this.selectSingleNode(e, -h),a=[];if(f)for(f=f.firstChild;f;)f.xml?a.push(f.xml):window.XMLSerializer&&a.push((new XMLSerializer).serializeToString(f)),f=f.nextSibling;return a.length?a.join(""):null}}}(),function(){CKEDITOR.plugins.add("ajax",{requires:"xml"});CKEDITOR.ajax=function(){function e(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}return null}function h(a, -e){if(4!=a.readyState||!(200<=a.status&&300>a.status||304==a.status||0===a.status||1223==a.status))return null;switch(e){case "text":return a.responseText;case "xml":var f=a.responseXML;return new CKEDITOR.xml(f&&f.firstChild?f:a.responseText);case "arraybuffer":return a.response;default:return null}}function f(a,f,l){var m=!!f,b=e();if(!b)return null;m&&"text"!==l&&"xml"!==l&&(b.responseType=l);b.open("GET",a,m);m&&(b.onreadystatechange=function(){4==b.readyState&&(f(h(b,l)),b=null)});b.send(null); -return m?"":h(b,l)}function a(a,f,l,m,b){var c=e();if(!c)return null;c.open("POST",a,!0);c.onreadystatechange=function(){4==c.readyState&&(m&&m(h(c,b)),c=null)};c.setRequestHeader("Content-type",l||"application/x-www-form-urlencoded; charset\x3dUTF-8");c.send(f)}return{load:function(a,e,h){return f(a,e,h||"text")},post:function(d,e,f,h){return a(d,e,f,h,"text")},loadXml:function(a,e){return f(a,e,"xml")},loadText:function(a,e){return f(a,e,"text")},loadBinary:function(a,e){return f(a,e,"arraybuffer")}}}()}(), -function(){function e(a,d){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(d)}).sort(function(a,c){return a.priority===c.priority?0:a.priority-c.priority})}function h(a,d){var b=a.shift();b&&b.handle(d,function(){h(a,d)})}function f(a){var d=CKEDITOR.tools.array.reduce(a,function(a,c){return CKEDITOR.tools.array.isArray(c.filters)?a.concat(c.filters):a},[]);return CKEDITOR.tools.array.filter(d,function(a,c){return CKEDITOR.tools.array.indexOf(d,a)===c})}function a(a,e){var b=0, -c,g;if(!CKEDITOR.tools.array.isArray(a)||0===a.length)return!0;c=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(d,a)});if(0 -b.width&&(a.resize_minWidth=b.width);a.resize_minHeight>b.height&&(a.resize_minHeight=b.height);CKEDITOR.document.on("mousemove",h);CKEDITOR.document.on("mouseup",f);e.document&&(e.document.on("mousemove",h),e.document.on("mouseup",f));c.preventDefault&&c.preventDefault()});e.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});e.on("uiSpace",function(a){if("bottom"==a.data.space){var b="";c&&!g&&(b=" cke_resizer_horizontal");!c&&g&&(b=" cke_resizer_vertical");var f='\x3cspan id\x3d"'+d+'" class\x3d"cke_resizer'+ -b+" cke_resizer_"+k+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==k?"◢":"◣")+"\x3c/span\x3e";"ltr"==k&&"ltr"==b?a.data.html+=f:a.data.html=f+a.data.html}},e,null,100);e.on("maximize",function(a){e.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){function e(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(e){if(e.editable().hasFocus){var f=e.getSelection(), -h;if(h=(new CKEDITOR.dom.elementPath(f.getCommonAncestor(),f.root)).contains({td:1,th:1},1)){var f=e.createRange(),b=CKEDITOR.tools.tryThese(function(){var b=h.getParent().$.cells[h.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=h.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(b||a)if(b)b=new CKEDITOR.dom.element(b),f.moveToElementEditStart(b),f.checkStartOfBlock()&&f.checkEndOfBlock()||f.selectNodeContents(b); -else return!0;else{for(var c=h.getAscendant("table").$,b=h.getParent().$.cells,c=new CKEDITOR.dom.element(c.insertRow(-1),e.document),g=0,n=b.length;g=f)for(m=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);m;){if(m.isVisible()&&0===m.getTabIndex()){k=m;break}m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(m=this.getDocument().getBody().getFirst();m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!d&&m.equals(this)){if(d=!0,e){if(!(m=m.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else d&&!this.contains(m)&&(a=1);if(m.isVisible()&&!(0>(b=m.getTabIndex()))){if(a&& -b==f){k=m;break}b>f&&(!k||!l||b(m=b.getTabIndex())))if(0>=f){if(a&&0===m){k=b;break}m> -l&&(k=b,l=m)}else{if(a&&m==f){k=b;break}ml)&&(k=b,l=m)}}k&&k.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function h(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,e){this.setState(e.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var f=e.lang.table;e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+ -(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var d;if(a.styles.border)d=CKEDITOR.tools.style.parse.border(a.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var e=a.styles;e["border-left"]&&e["border-left"]===e["border-right"]&&e["border-right"]===e["border-top"]&& -e["border-top"]===e["border-bottom"]&&(d=CKEDITOR.tools.style.parse.border(e["border-top"]))}d&&d.style&&"solid"===d.style&&d.width&&0!==parseFloat(d.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));e.addCommand("tableDelete",h({exec:function(a){var d=a.elementPath().contains("table",1);if(d){var e=d.getParent(),f=a.editable();1!=e.getChildCount()||e.is("td", -"th")||e.equals(f)||(d=e);a=a.createRange();a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();a.select()}}}));e.ui.addButton&&e.ui.addButton("Table",{label:f.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");e.addMenuItems&&e.addMenuItems({table:{label:f.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:f.deleteTable,command:"tableDelete",group:"table", -order:1}});e.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function e(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){var b=/^(?:td|th)$/;0d)d=g}return d}function k(a,b){for(var c=t(a)?a:e(a),g=c[0].getAscendant("table"),f=d(c,1),c=d(c),h=b?f:c,k=CKEDITOR.tools.buildTableMap(g),g=[],f=[],c=[],l=k.length,m=0;ml?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(d.$.parentNode);m.length==a&&(c[0].moveToPosition(d,CKEDITOR.POSITION_AFTER_END),c[0].select(),d.remove());return k}function m(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function b(a){if(a instanceof CKEDITOR.dom.selection){var d= -a.getRanges(),g=e(a),f=g[0]&&g[0].getAscendant("table"),h;a:{var k=0;h=g.length-1;for(var l={},m,n;m=g[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=g[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=g[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=g[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a= -g.length-1;0<=a;a--)b(g[a]);h?c(h,!0):f&&(d[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),d[0].select(),f.remove())}else a instanceof CKEDITOR.dom.element&&(d=a.getParent(),1==d.getChildCount()?d.remove():a.remove())}function c(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function g(a,b,c){a=a[b]; -if("undefined"==typeof c)return a;for(b=0;a&&bd.length)||(f=a.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;a=d[0];f=a.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(f),k=h.length,l=h[0].length,m=a.getParent().$.rowIndex,n=g(h,m,a),t;if(b){var w;try{var x=parseInt(a.getAttribute("rowspan"),10)||1;t=parseInt(a.getAttribute("colspan"), -10)||1;w=h["up"==b?m-x:"down"==b?m+x:m]["left"==b?n-t:"right"==b?n+t:n]}catch(L){return!1}if(!w||a.$==w)return!1;d["up"==b||"left"==b?"unshift":"push"](new CKEDITOR.dom.element(w))}b=a.getDocument();var D=m,x=w=0,N=!c&&new CKEDITOR.dom.documentFragment(b),I=0;for(b=0;b=l?a.removeAttribute("rowSpan"):a.$.rowSpan=w;w>=k?a.removeAttribute("colSpan"):a.$.colSpan=x;c=new CKEDITOR.dom.nodeList(f.$.rows);d=c.count();for(b=d-1;0<=b;b--)f=c.getItem(b),f.$.cells.length||(f.remove(),d++);return a}function w(a,b){var c=e(a);if(1< -c.length)return!1;if(b)return!0;var c=c[0],d=c.getParent(),f=d.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k=d.$.rowIndex,l=g(h,k,c),m=c.$.rowSpan,n;if(1l){d.insertBefore(new CKEDITOR.dom.element(t));break}else t=null;t||f.append(d)}else for(m=n=1,f=d.clone(),f.insertAfter(d),f.append(d=c.clone()),t=g(h,k),l=0;la);n++){l[k+n]||(l[k+n]=[]);for(var w=0;w=d)break}}return l},"use strict",function(){function e(a,c){return CKEDITOR.tools.array.reduce(c,function(a,b){return b(a)},a)}var h=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+ -89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],f={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function c(a){e.enabled&&!1!==a.data.command.canUndo&&e.save()}function d(){e.enabled=b.readOnly?!1:"wysiwyg"==b.mode;e.onChange()}var e=b.undoManager=new a(b),f=e.editingHandler=new l(e),k=b.addCommand("undo",{exec:function(){e.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=b.addCommand("redo",{exec:function(){e.redo()&&(b.selectionChange(),this.fire("afterRedo"))}, -startDisabled:!0,canUndo:!1});b.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);e.onChange=function(){k.setState(e.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(e.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",c);b.on("afterCommandExec",c);b.on("saveSnapshot",function(a){e.save(a.data&&a.data.contentOnly)});b.on("contentDom",f.attachListeners,f);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload", -function(){"wysiwyg"==b.mode&&e.save(!0)});b.on("mode",d);b.on("readOnly",d);b.ui.addButton&&(b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"}),b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"}));b.resetUndo=function(){e.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){e.currentImage&&e.update()});b.on("lockSnapshot",function(a){a=a.data;e.lock(a&&a.dontUpdate,a&&a.forceUpdate)});b.on("unlockSnapshot",e.unlock,e)}});CKEDITOR.plugins.undo= -{};var a=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};a.prototype={type:function(b,c){var d=a.getKeyGroup(b),e=this.strokesRecorded[d]+1;c=c||e>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange()); -c?(e=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[d]=e;this.previousKeyGroup=d},keyGroupChanged:function(b){return a.getKeyGroup(b)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1); -this.resetType();this.onChange()},save:function(a,c,e){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var h=f.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;c||(c=new d(f));if(!1===c.contents)return!1;if(this.currentImage)if(c.equalsContent(this.currentImage)){if(a||c.equalsSelection(this.currentImage))return!1}else!1!==e&&f.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(c)-1;this.currentImage= -c;!1!==e&&this.refreshState();return!0},restoreImage:function(a){var c=this.editor,d;a.bookmarks&&(c.focus(),d=c.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?d.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(d=this.editor.document.getBody().$.createTextRange(),d.collapse(!0),d.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();c.fire("change")},getNextImage:function(a){var c=this.snapshots, -d=this.currentImage,e;if(d)if(a)for(e=this.index-1;0<=e;e--){if(a=c[e],!d.equalsContent(a))return a.index=e,a}else for(e=this.index+1;e=this.undoManager.strokesLimit&& -(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var c=this.undoManager;b=b.data.getKey();var e=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(a.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new d(c.editor,!0))))if(0=h.$.documentMode&&r.append(h.createText(" ")),r.append(m.listNode),m=m.nextIndex;else if(-1==H.indent&&!c&&g){d[g.getName()]?(r=H.element.clone(!1,!0),y!=g.getDirection(1)&&r.setAttribute("dir",y)):r=new CKEDITOR.dom.documentFragment(h);var l=g.getDirection(1)!=y,I=H.element,P=I.getAttribute("class"),L=I.getAttribute("style"),O=r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||l||L||P),N,V=H.contents.length,S; +for(g=0;gb&&aG.version?" ":S,g=a.hotNode&&a.hotNode.getText()==f&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;b(a,function(b){g&&a.hotNode&&a.hotNode.remove();b[c?"insertAfter":"insertBefore"](e);b.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});G.ie||a.enterMode== +CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(b){b=b.getSelection().getStartElement();var f;b=b.getAscendant(ea,1);if(!t(a,b)&&b&&!b.equals(a.editable)&&!b.contains(a.editable)){(f=l(b))&&"false"==f.getAttribute("contenteditable")&&(b=f);a.element=b;f=e(a,b,!c);var h;p(f)&&f.is(a.triggers)&&f.is(T)&&(!e(a,f,!c)||(h=e(a,f,!c))&&p(h)&&h.is(a.triggers))?d(f):(h=g(a,b),p(h)&&(e(a,h,!c)?(b=e(a,h,!c))&&p(b)&&b.is(a.triggers)&&d(h):d(h)))}}}()}}function f(a,b){if(!b||b.type!= +CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function p(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function w(a){if(!p(a))return!1;var b;(b=y(a))||(p(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function y(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function r(a,b){return p(b)?b.is(a.triggers):null}function t(a,b){if(!b)return!1;for(var c=b.getParents(1),d= +c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function v(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(da)});if(!b)return!1;q(a,b);return c?b.size.top>a.mouse.y:b.size.bottom(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[g?"getLast":"getFirst"](function(a){return!(aa(a)|| +ca(a))});if(!b)return null;f(a,b)&&(b=a.line.wrap[g?"getPrevious":"getNext"](function(a){return!(aa(a)||ca(a))}));if(!p(b)||w(b)||!r(a,b))return null;q(a,b);return!g&&0<=b.size.top&&k(c.y,0,b.size.top+e)?(a=a.inInlineMode||0===d.scroll.y?O:V,new h([null,b,H,L,a])):g&&b.size.bottom<=d.pane.height&&k(c.y,b.size.bottom-e,d.pane.height)?(a=a.inInlineMode||k(b.size.bottom,d.pane.height-e,d.pane.height)?N:V,new h([b,null,I,L,a])):null}function n(a){var b=a.mouse,c=a.view,d=a.triggerOffset,f=g(a);if(!f)return null; +q(a,f);var d=Math.min(d,0|f.size.outerHeight/2),l=[],m,n;if(k(b.y,f.size.top-1,f.size.top+d))n=!1;else if(k(b.y,f.size.bottom-d,f.size.bottom+1))n=!0;else return null;if(w(f)||v(a,f,n)||f.getParent().is(U))return null;var t=e(a,f,!n);if(t){if(t&&t.type==CKEDITOR.NODE_TEXT)return null;if(p(t)){if(w(t)||!r(a,t)||t.getParent().is(U))return null;l=[t,f][n?"reverse":"concat"]().concat([P,L])}}else f.equals(a.editable[n?"getLast":"getFirst"](a.isRelevant))?(u(a),n&&k(b.y,f.size.bottom-d,c.pane.height)&& +k(f.size.bottom,c.pane.height-d,c.pane.height)?m=N:k(b.y,0,f.size.top+d)&&(m=O)):m=V,l=[null,f][n?"reverse":"concat"]().concat([n?I:H,L,m,f.equals(a.editable[n?"getLast":"getFirst"](a.isRelevant))?n?N:O:V]);return 0 in l?new h(l):null}function x(a,b,c,d){for(var e=b.getDocumentPosition(),f={},g={},h={},k={},l=Q.length;l--;)f[Q[l]]=parseInt(b.getComputedStyle.call(b,"border-"+Q[l]+"-width"),10)||0,h[Q[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+Q[l]),10)||0,g[Q[l]]=parseInt(b.getComputedStyle.call(b, +"margin-"+Q[l]),10)||0;c&&!d||z(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+f.top+f.bottom);k.width=k.outerWidth-(h.left+h.right+f.left+f.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return C({border:f,padding:h,margin:g,ignoreScroll:c},k,!0)}function q(a,b,c){if(!p(b))return b.size=null;if(!b.size)b.size= +{};else if(b.size.ignoreScroll==c&&b.size.date>new Date-fa)return null;return C(b.size,x(a,b,c),{date:+new Date},!0)}function u(a,b){a.view.editable=x(a,a.editable,b,!0)}function z(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-fa)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();C(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y}, +date:+new Date},!0)}}function A(a,b,c,d){for(var e=d,f=d,g=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+gd.left-e.x&&cd.top-e.y&&bCKEDITOR.env.version,F=CKEDITOR.dtd,M={},H=128,I=64,P=32,L=16,O=4,N=2,V=1,S=" ",U=F.$listItem,da=F.$tableContent,T=C({},F.$nonEditable, +F.$empty),ea=F.$block,fa=100,ia="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",ka=ia+"border-color:transparent;display:block;border-style:solid;",W="\x3cspan\x3e"+S+"\x3c/span\x3e";M[CKEDITOR.ENTER_BR]="br";M[CKEDITOR.ENTER_P]="p";M[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties=a+b+(c||V);return this},is:function(a){return(this.properties&a)==a}};var Z=function(){function a(b,c){var d= +b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,g=b.line.wrap;d=d||b.mouse;var h=a(e,d);c&&f(b,h)&&(g.hide(),h=a(e,d),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||G.ie&&9>G.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),aa=CKEDITOR.dom.walker.whitespaces(),ca=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),X=function(){function b(e){var f=e.element,g,h,l;if(!p(f)||f.contains(e.editable)|| +f.isReadOnly())return null;l=A(e,function(a,b){return!b.equals(a)},function(a,b){return Z(a,!0,b)},f);g=l.upper;h=l.lower;if(c(e,g,h))return l.set(P,8);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(a){return d(e,a)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(a){return d(e,a)});if(!g||!h)return null;q(e,g);q(e,h);if(!k(e.mouse.y,g.size.top,h.size.bottom))return null;for(var f=Number.MAX_VALUE,m,n,u,t;h&& +!h.equals(g)&&(n=g.getNext(e.isRelevant));)m=Math.abs(a(e,g,n)-e.mouse.y),m|<\/font>)/,c=c?"microsoft"===c:e.test(a);return a&&(h||c)},handle:function(a,g){var m=a.data,b=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/html"),d=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/rtf"),b={dataValue:b,dataTransfer:{"text/rtf":d}}; +if(!1!==c.fire("pasteFromWord",b)||h){m.dontFilter=!0;if(h||!c.config.pasteFromWordPromptCleanup||confirm(c.lang.pastefromword.confirmCleanup))b.dataValue=CKEDITOR.cleanWord(b.dataValue,c),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&e&&CKEDITOR.pasteFilters.image&&(b.dataValue=CKEDITOR.pasteFilters.image(b.dataValue,c,d)),c.fire("afterPasteFromWord",b),m.dataValue=b.dataValue,!0===c.config.forcePasteAsPlainText?m.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!== +c.config.forcePasteAsPlainText||(m.type="html");h=0;g()}}})}})}(),function(){var c={canUndo:!1,async:!0,exec:function(c,g){var a=c.lang,e=CKEDITOR.tools.keystrokeToString(a.common.keyboard,c.getCommandKeystroke(CKEDITOR.env.ie?c.commands.paste:this)),k=g&&"undefined"!==typeof g.notification?g.notification:!g||!g.from||"keystrokeHandler"===g.from&&CKEDITOR.env.ie,a=k&&"string"===typeof k?k:a.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+e.aria+'"\x3e'+e.display+"\x3c/kbd\x3e"); +c.execCommand("paste",{type:"text",notification:k?a:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var g=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",c);h.setKeystroke(g,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste",function(a){"html"!=a.data.type&& +(a.data.type="text")});h.on("pasteState",function(a){h.getCommand("pastetext").setState(a.data)})}})}(),function(){CKEDITOR.plugins.add("xml",{});CKEDITOR.xml=function(c){var h=null;if("object"==typeof c)h=c;else if(c=(c||"").replace(/ /g," "),"ActiveXObject"in window){try{h=new ActiveXObject("MSXML2.DOMDocument")}catch(g){try{h=new ActiveXObject("Microsoft.XmlDom")}catch(a){}}h&&(h.async=!1,h.resolveExternals=!1,h.validateOnParse=!1,h.loadXML(c))}else window.DOMParser&&(h=(new DOMParser).parseFromString(c, +"text/xml"));this.baseXml=h};CKEDITOR.xml.prototype={selectSingleNode:function(c,h){var g=this.baseXml;if(h||(h=g)){if("selectSingleNode"in h)return h.selectSingleNode(c);if(g.evaluate)return(g=g.evaluate(c,h,null,9,null))&&g.singleNodeValue||null}return null},selectNodes:function(c,h){var g=this.baseXml,a=[];if(h||(h=g)){if("selectNodes"in h)return h.selectNodes(c);if(g.evaluate&&(g=g.evaluate(c,h,null,5,null)))for(var e;e=g.iterateNext();)a.push(e)}return a},getInnerXml:function(c,h){var g=this.selectSingleNode(c, +h),a=[];if(g)for(g=g.firstChild;g;)g.xml?a.push(g.xml):window.XMLSerializer&&a.push((new XMLSerializer).serializeToString(g)),g=g.nextSibling;return a.length?a.join(""):null}}}(),function(){CKEDITOR.plugins.add("ajax",{requires:"xml"});CKEDITOR.ajax=function(){function c(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(c){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(g){}return null}function h(a, +c){if(4!=a.readyState||!(200<=a.status&&300>a.status||304==a.status||0===a.status||1223==a.status))return null;switch(c){case "text":return a.responseText;case "xml":var g=a.responseXML;return new CKEDITOR.xml(g&&g.firstChild?g:a.responseText);case "arraybuffer":return a.response;default:return null}}function g(a,g,l){var m=!!g,b=c();if(!b)return null;m&&"text"!==l&&"xml"!==l&&(b.responseType=l);b.open("GET",a,m);m&&(b.onreadystatechange=function(){4==b.readyState&&(g(h(b,l)),b=null)});b.send(null); +return m?"":h(b,l)}function a(a,g,l,m,b){var d=c();if(!d)return null;d.open("POST",a,!0);d.onreadystatechange=function(){4==d.readyState&&(m&&m(h(d,b)),d=null)};d.setRequestHeader("Content-type",l||"application/x-www-form-urlencoded; charset\x3dUTF-8");d.send(g)}return{load:function(a,c,h){return g(a,c,h||"text")},post:function(c,g,h,m){return a(c,g,h,m,"text")},loadXml:function(a,c){return g(a,c,"xml")},loadText:function(a,c){return g(a,c,"text")},loadBinary:function(a,c){return g(a,c,"arraybuffer")}}}()}(), +function(){function c(a,c){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(c)}).sort(function(a,c){return a.priority===c.priority?0:a.priority-c.priority})}function h(a,c){var b=a.shift();b&&b.handle(c,function(){h(a,c)})}function g(a){var c=CKEDITOR.tools.array.reduce(a,function(a,c){return CKEDITOR.tools.array.isArray(c.filters)?a.concat(c.filters):a},[]);return CKEDITOR.tools.array.filter(c,function(a,d){return CKEDITOR.tools.array.indexOf(c,a)===d})}function a(a,c){var b=0, +d,f;if(!CKEDITOR.tools.array.isArray(a)||0===a.length)return!0;d=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(e,a)});if(0 +b.width&&(a.resize_minWidth=b.width);a.resize_minHeight>b.height&&(a.resize_minHeight=b.height);CKEDITOR.document.on("mousemove",h);CKEDITOR.document.on("mouseup",g);c.document&&(c.document.on("mousemove",h),c.document.on("mouseup",g));d.preventDefault&&d.preventDefault()});c.on("destroy",function(){CKEDITOR.tools.removeFunction(p)});c.on("uiSpace",function(a){if("bottom"==a.data.space){var b="";d&&!f&&(b=" cke_resizer_horizontal");!d&&f&&(b=" cke_resizer_vertical");var g='\x3cspan id\x3d"'+e+'" class\x3d"cke_resizer'+ +b+" cke_resizer_"+k+'" title\x3d"'+CKEDITOR.tools.htmlEncode(c.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+p+', event)"\x3e'+("ltr"==k?"◢":"◣")+"\x3c/span\x3e";"ltr"==k&&"ltr"==b?a.data.html+=g:a.data.html=g+a.data.html}},c,null,100);c.on("maximize",function(a){c.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){function c(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(c){if(c.editable().hasFocus){var g=c.getSelection(), +h;if(h=(new CKEDITOR.dom.elementPath(g.getCommonAncestor(),g.root)).contains({td:1,th:1},1)){var g=c.createRange(),b=CKEDITOR.tools.tryThese(function(){var b=h.getParent().$.cells[h.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=h.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(b||a)if(b)b=new CKEDITOR.dom.element(b),g.moveToElementEditStart(b),g.checkStartOfBlock()&&g.checkEndOfBlock()||g.selectNodeContents(b); +else return!0;else{for(var d=h.getAscendant("table").$,b=h.getParent().$.cells,d=new CKEDITOR.dom.element(d.insertRow(-1),c.document),f=0,p=b.length;f=g)for(m=this.getNextSourceNode(c,CKEDITOR.NODE_ELEMENT);m;){if(m.isVisible()&&0===m.getTabIndex()){k=m;break}m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(m=this.getDocument().getBody().getFirst();m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!e&&m.equals(this)){if(e=!0,c){if(!(m=m.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else e&&!this.contains(m)&&(a=1);if(m.isVisible()&&!(0>(b=m.getTabIndex()))){if(a&& +b==g){k=m;break}b>g&&(!k||!l||b(m=b.getTabIndex())))if(0>=g){if(a&&0===m){k=b;break}m> +l&&(k=b,l=m)}else{if(a&&m==g){k=b;break}ml)&&(k=b,l=m)}}k&&k.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(c){function h(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,c){this.setState(c.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!c.blockless){var g=c.lang.table;c.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+ +(c.plugins.dialogadvtab?"table"+c.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var c;if(a.styles.border)c=CKEDITOR.tools.style.parse.border(a.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var g=a.styles;g["border-left"]&&g["border-left"]===g["border-right"]&&g["border-right"]===g["border-top"]&& +g["border-top"]===g["border-bottom"]&&(c=CKEDITOR.tools.style.parse.border(g["border-top"]))}c&&c.style&&"solid"===c.style&&c.width&&0!==parseFloat(c.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));c.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));c.addCommand("tableDelete",h({exec:function(a){var c=a.elementPath().contains("table",1);if(c){var g=c.getParent(),h=a.editable();1!=g.getChildCount()||g.is("td", +"th")||g.equals(h)||(c=g);a=a.createRange();a.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c.remove();a.select()}}}));c.ui.addButton&&c.ui.addButton("Table",{label:g.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");c.addMenuItems&&c.addMenuItems({table:{label:g.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:g.deleteTable,command:"tableDelete",group:"table", +order:1}});c.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});c.contextMenu&&c.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function c(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){var b=/^(?:td|th)$/;0d)d=f}return d}function k(a,b){for(var d=r(a)?a:c(a),f=d[0].getAscendant("table"),g=e(d,1),d=e(d),h=b?g:d,k=CKEDITOR.tools.buildTableMap(f),f=[],g=[],d=[],l=k.length,m=0;ml?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(e.$.parentNode);m.length==a&&(d[0].moveToPosition(e,CKEDITOR.POSITION_AFTER_END),d[0].select(),e.remove());return k}function m(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function b(a){if(a instanceof CKEDITOR.dom.selection){var e= +a.getRanges(),f=c(a),g=f[0]&&f[0].getAscendant("table"),h;a:{var k=0;h=f.length-1;for(var l={},m,p;m=f[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=f[k++];)if((p=m.getPrevious())&&!p.getCustomData("delete_cell")||(p=m.getNext())&&!p.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=p;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=f[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=f[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a= +f.length-1;0<=a;a--)b(f[a]);h?d(h,!0):g&&(e[0].moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),e[0].select(),g.remove())}else a instanceof CKEDITOR.dom.element&&(e=a.getParent(),1==e.getChildCount()?e.remove():a.remove())}function d(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function f(a,b,c){a=a[b]; +if("undefined"==typeof c)return a;for(b=0;a&&be.length)||(g=a.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;a=e[0];g=a.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(g),k=h.length,l=h[0].length,m=a.getParent().$.rowIndex,p=f(h,m,a),r;if(b){var w;try{var y=parseInt(a.getAttribute("rowspan"),10)||1;r=parseInt(a.getAttribute("colspan"), +10)||1;w=h["up"==b?m-y:"down"==b?m+y:m]["left"==b?p-r:"right"==b?p+r:p]}catch(K){return!1}if(!w||a.$==w)return!1;e["up"==b||"left"==b?"unshift":"push"](new CKEDITOR.dom.element(w))}b=a.getDocument();var F=m,y=w=0,M=!d&&new CKEDITOR.dom.documentFragment(b),H=0;for(b=0;b=l?a.removeAttribute("rowSpan"):a.$.rowSpan=w;w>=k?a.removeAttribute("colSpan"):a.$.colSpan=y;d=new CKEDITOR.dom.nodeList(g.$.rows);e=d.count();for(b=e-1;0<=b;b--)g=d.getItem(b),g.$.cells.length||(g.remove(),e++);return a}function w(a,b){var d=c(a);if(1< +d.length)return!1;if(b)return!0;var d=d[0],e=d.getParent(),g=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=e.$.rowIndex,l=f(h,k,d),m=d.$.rowSpan,p;if(1l){e.insertBefore(new CKEDITOR.dom.element(r));break}else r=null;r||g.append(e)}else for(m=p=1,g=e.clone(),g.insertAfter(e),g.append(e=d.clone()),r=f(h,k),l=0;la);p++){l[k+p]||(l[k+p]=[]);for(var w=0;w=e)break}}return l},"use strict",function(){function c(a,c){return CKEDITOR.tools.array.reduce(c,function(a,b){return b(a)},a)}var h=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+ +89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],g={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function c(a){g.enabled&&!1!==a.data.command.canUndo&&g.save()}function e(){g.enabled=b.readOnly?!1:"wysiwyg"==b.mode;g.onChange()}var g=b.undoManager=new a(b),k=g.editingHandler=new l(g),m=b.addCommand("undo",{exec:function(){g.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),r=b.addCommand("redo",{exec:function(){g.redo()&&(b.selectionChange(),this.fire("afterRedo"))}, +startDisabled:!0,canUndo:!1});b.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);g.onChange=function(){m.setState(g.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);r.setState(g.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",c);b.on("afterCommandExec",c);b.on("saveSnapshot",function(a){g.save(a.data&&a.data.contentOnly)});b.on("contentDom",k.attachListeners,k);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload", +function(){"wysiwyg"==b.mode&&g.save(!0)});b.on("mode",e);b.on("readOnly",e);b.ui.addButton&&(b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"}),b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"}));b.resetUndo=function(){g.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){g.currentImage&&g.update()});b.on("lockSnapshot",function(a){a=a.data;g.lock(a&&a.dontUpdate,a&&a.forceUpdate)});b.on("unlockSnapshot",g.unlock,g)}});CKEDITOR.plugins.undo= +{};var a=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};a.prototype={type:function(b,c){var e=a.getKeyGroup(b),g=this.strokesRecorded[e]+1;c=c||g>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange()); +c?(g=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[e]=g;this.previousKeyGroup=e},keyGroupChanged:function(b){return a.getKeyGroup(b)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1); +this.resetType();this.onChange()},save:function(a,c,f){var g=this.editor;if(this.locked||"ready"!=g.status||"wysiwyg"!=g.mode)return!1;var h=g.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;c||(c=new e(g));if(!1===c.contents)return!1;if(this.currentImage)if(c.equalsContent(this.currentImage)){if(a||c.equalsSelection(this.currentImage))return!1}else!1!==f&&g.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(c)-1;this.currentImage= +c;!1!==f&&this.refreshState();return!0},restoreImage:function(a){var c=this.editor,e;a.bookmarks&&(c.focus(),e=c.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?e.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(e=this.editor.document.getBody().$.createTextRange(),e.collapse(!0),e.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();c.fire("change")},getNextImage:function(a){var c=this.snapshots, +e=this.currentImage,g;if(e)if(a)for(g=this.index-1;0<=g;g--){if(a=c[g],!e.equalsContent(a))return a.index=g,a}else for(g=this.index+1;g=this.undoManager.strokesLimit&& +(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var c=this.undoManager;b=b.data.getKey();var f=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(a.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new e(c.editor,!0))))if(0CKEDITOR.env.version&&f.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10this.$.offsetHeight){var c=f.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(m,"blur",function(){try{m.$.selection.empty()}catch(a){}}); -CKEDITOR.env.iOS&&this.attachListener(m,"touchend",function(){a.focus()});b=f.document.getElementsByTag("title").getItem(0);b.data("cke-title",b.getText());CKEDITOR.env.ie&&(f.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");f.fire("contentDom");this._.isPendingFocus&&(f.focus(),this._.isPendingFocus=!1);setTimeout(function(){f.fire("dataReady")},0)},0,this)}}function h(a){function e(){var b;a.editable().attachListener(a,"selectionChange", -function(){var e=a.getSelection().getSelectedElement();e&&(b&&(b.detachEvent("onresizestart",f),b=null),e.$.attachEvent("onresizestart",f),b=e.$)})}function f(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var h=a.document.$;h.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);h.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(b){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&e()}function f(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}"); -var e=[],f;for(f in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+f+"[contenteditable\x3dfalse]");a.push(e.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 a;CKEDITOR.plugins.add("wysiwygarea",{init:function(d){d.config.fullPage&&d.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]", -requiredContent:"body"});d.addMode("wysiwyg",function(e){function f(c){c&&c.removeListener();if(!d.isDestroyed()&&!d.isDetached()&&(d.editable(new a(d,x.getFrameDocument().getBody())),d.setData(d.getData(1),e),y)){if(p)d.on("mode",h,{iframe:x,editor:d,callback:e});d.on("mode",function(){d.status="ready"});b()}}function h(a){a&&a.removeListener();x.on("load",function(){z&&(z=!1,n())})}function b(){v=new MutationObserver(function(a){CKEDITOR.tools.array.forEach(a,c)});v.observe(d.config.observableParent, -{childList:!0,subtree:!0})}function c(a){"childList"===a.type&&0!==a.addedNodes.length&&CKEDITOR.tools.array.forEach(a.addedNodes,g)}function g(a){a.contains&&a.contains(d.container.$)&&(p?z=!0:n())}function n(){var b=d.getData(!1),c;d.editable().preserveIframe=!0;d.editable(null);c=new a(d,x.getFrameDocument().getBody());d.editable(c);d.status="recreating";d.setData(b,{callback:e,internal:!1,noSnapshot:!1})}var w="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();", -w=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(w)+"}())":"",x=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+w+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');x.setStyles({width:"100%",height:"100%"});x.addClass("cke_wysiwyg_frame").addClass("cke_reset");w=d.ui.space("contents")||d.ui.contentsElement;w.append(x);var t=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(t)x.on("load",f);var r=d.title,u=d.fire("ariaEditorHelpLabel", -{}).label,z=!1,p=CKEDITOR.env.ie&&11===CKEDITOR.env.version,y=!!window.MutationObserver,v;r&&(CKEDITOR.env.ie&&u&&(r+=", "+u),x.setAttribute("title",r));if(u){var r=CKEDITOR.tools.getNextId(),q=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+r+'" class\x3d"cke_voice_label"\x3e'+u+"\x3c/span\x3e");w.append(q,1);x.setAttribute("aria-describedby",r)}d.on("beforeModeUnload",function(a){a.removeListener();q&&q.remove();y&&v.disconnect()});x.setAttributes({tabIndex:d.tabIndex,allowTransparency:"true"}); -!t&&f();d.fire("ariaWidget",x)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var e=this.config,f=e.contentsCss;CKEDITOR.tools.isArray(f)||(e.contentsCss=f?[f]:[]);e.contentsCss.push(a)};a=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(e,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{preserveIframe:!1,setData:function(a, -e){var h=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var m=h.config,b=m.fullPage,c=m.docType,g=CKEDITOR.tools.buildStyleHtml(f()).replace(/