diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/CHANGES.md b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/CHANGES.md index 94a6605..8126f56 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/CHANGES.md +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/CHANGES.md @@ -1,6 +1,276 @@ CKEditor 4 Changelog ==================== +## CKEditor 4.4.3 + +**Security Updates:** + +* Fixed XSS vulnerability in the Preview plugin reported by Mario Heiderich of [Cure53](https://cure53.de/). + +**An upgrade is highly recommended!** + +New Features: + +* [#12164](http://dev.ckeditor.com/ticket/12164): Added the "Justify" option to the "Horizontal Alignment" drop-down in the Table Cell Properties dialog window. + +Fixed Issues: + +* [#12110](http://dev.ckeditor.com/ticket/12110): Fixed: Editor crash after deleting a table. Thanks to [Alin Purcaru](https://github.com/mesmerizero)! +* [#11897](http://dev.ckeditor.com/ticket/11897): Fixed: **Enter** key used in an empty list item creates a new line instead of breaking the list. Thanks to [noam-si](https://github.com/noam-si)! +* [#12140](http://dev.ckeditor.com/ticket/12140): Fixed: Double-clicking linked widgets opens two dialog windows. +* [#12132](http://dev.ckeditor.com/ticket/12132): Fixed: Image is inserted with `width` and `height` styles even when they are not allowed. +* [#9317](http://dev.ckeditor.com/ticket/9317): [IE] Fixed: [`config.disableObjectResizing`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-disableObjectResizing) does not work on IE. **Note**: We were not able to fix this issue on IE11+ because necessary events stopped working. See a [last resort workaround](http://dev.ckeditor.com/ticket/9317#comment:16) and make sure to [support our complaint to Microsoft](https://connect.microsoft.com/IE/feedback/details/742593/please-respect-execcommand-enableobjectresizing-in-contenteditable-elements). +* [#9638](http://dev.ckeditor.com/ticket/9638): Fixed: There should be no information about accessibility help available under the *Alt+0* keyboard shortcut if the [Accessibility Help](http://ckeditor.com/addon/a11yhelp) plugin is not available. +* [#8117](http://dev.ckeditor.com/ticket/8117) and [#9186](http://dev.ckeditor.com/ticket/9186): Fixed: In HTML5 `` tags should be allowed everywhere, including inside the `` element. +* [#10422](http://dev.ckeditor.com/ticket/10422): Fixed: [`config.fillEmptyBlocks`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fillEmptyBlocks) not working properly if a function is specified. + +## CKEditor 4.4.2 + +Important Notes: + +* The CKEditor testing environment is now publicly available. Read more about how to set up the environment and execute tests in the [CKEditor Testing Environment](http://docs.ckeditor.com/#!/guide/dev_tests) guide. + Please note that the [`tests/`](https://github.com/ckeditor/ckeditor-dev/tree/master/tests) directory which contains editor tests is not available in release packages. It can only be found in the development version of CKEditor on [GitHub](https://github.com/ckeditor/ckeditor-dev/). + +New Features: + +* [#11909](http://dev.ckeditor.com/ticket/11909): Introduced a parameter to prevent the [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) method from recording undo snapshots. + +Fixed Issues: + +* [#11757](http://dev.ckeditor.com/ticket/11757): Fixed: Imperfections in the [Moono](http://ckeditor.com/addon/moono) skin. Thanks to [danyaPostfactum](https://github.com/danyaPostfactum)! +* [#10091](http://dev.ckeditor.com/ticket/10091): Blockquote should be treated like an object by the styles system. Thanks to [dan-james-deeson](https://github.com/dan-james-deeson)! +* [#11478](http://dev.ckeditor.com/ticket/11478): Fixed: Issue with passing jQuery objects to [adapter](http://docs.ckeditor.com/#!/guide/dev_jquery) configuration. +* [#10867](http://dev.ckeditor.com/ticket/10867): Fixed: Issue with setting encoded URI as image link. +* [#11983](http://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-getByElement) method was improved. +* [#12000](http://dev.ckeditor.com/ticket/12000): Fixed: Nested widgets should be initialized on [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) and [`nestedEditable.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.nestedEditable-method-setData). +* [#12022](http://dev.ckeditor.com/ticket/12022): Fixed: Outer widget's drag handler is not created at all if it has any nested widgets inside. +* [#11960](http://dev.ckeditor.com/ticket/11960): [Blink/WebKit] Fixed: The caret should be scrolled into view on *Backspace* and *Delete* (covers only the merging blocks case). +* [#11306](http://dev.ckeditor.com/ticket/11306): [OSX][Blink/WebKit] Fixed: No widget entries in the context menu on widget right-click. +* [#11957](http://dev.ckeditor.com/ticket/11957): Fixed: Alignment labels in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window are not translated. +* [#11980](http://dev.ckeditor.com/ticket/11980): [Blink/WebKit] Fixed: `` elements created when joining adjacent elements (non-collapsed selection). +* [#12009](http://dev.ckeditor.com/ticket/12009): [Nested widgets] Integration with the [Magic Line](http://ckeditor.com/addon/magicline) plugin. +* [#11387](http://dev.ckeditor.com/ticket/11387): Fixed: `role="radiogroup"` should be applied only to radio inputs' container. +* [#7975](http://dev.ckeditor.com/ticket/7975): [IE8] Fixed: Errors when trying to select an empty table cell. +* [#11947](http://dev.ckeditor.com/ticket/11947): [Firefox+IE11] Fixed: *Shift+Enter* in lists produces two line breaks. +* [#11972](http://dev.ckeditor.com/ticket/11972): Fixed: Feature detection in the [`element.setText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-setText) method should not trigger the layout engine. +* [#7634](http://dev.ckeditor.com/ticket/7634): Fixed: The [Flash Dialog](http://ckeditor.com/addon/flash) plugin omits the `allowFullScreen` parameter in the editor data if set to `true`. +* [#11910](http://dev.ckeditor.com/ticket/11910): Fixed: [Enhanced Image](http://ckeditor.com/addon/image2) does not take [`config.baseHref`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-baseHref) into account when updating image dimensions. +* [#11753](http://dev.ckeditor.com/ticket/11753): Fixed: Wrong [`checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method value after focusing or blurring a widget. +* [#11830](http://dev.ckeditor.com/ticket/11830): Fixed: Impossible to pass some arguments to [CKBuilder](https://github.com/ckeditor/ckbuilder) when using the `/dev/builder/build.sh` script. +* [#11945](http://dev.ckeditor.com/ticket/11945): Fixed: [Form Elements](http://ckeditor.com/addon/forms) plugin should not change a core method. +* [#11384](http://dev.ckeditor.com/ticket/11384): [IE9+] Fixed: `IndexSizeError` thrown when pasting into a non-empty selection anchored in one text node. + +## CKEditor 4.4.1 + +New Features: + +* [#9661](http://dev.ckeditor.com/ticket/9661): Added the option to [configure](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-linkJavaScriptLinksAllowed) anchor tags with JavaScript code in the `href` attribute. + +Fixed Issues: + +* [#11861](http://dev.ckeditor.com/ticket/11861): [Webkit/Blink] Fixed: Span elements created while joining adjacent elements. **Note:** This patch only covers cases when *Backspace* or *Delete* is pressed on a collapsed (empty) selection. The remaining case, with a non-empty selection, will be fixed in the next release. +* [#10714](http://dev.ckeditor.com/ticket/10714): [iOS] Fixed: Selection and drop-downs are broken if a touch event listener is used due to a [Webkit bug](https://bugs.webkit.org/show_bug.cgi?id=128924). Thanks to [Arty Gus](https://github.com/artygus)! +* [#11911](http://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for a preloaded language in [CKEDITOR.lang](http://docs.ckeditor.com/#!/api/CKEDITOR.lang). Thanks to [Akash Mohapatra](https://github.com/akashmohapatra)! +* [#11926](http://dev.ckeditor.com/ticket/11926): Fixed: [Code Snippet](http://ckeditor.com/addon/codesnippet) does not decode HTML entities when loading code from the `` element. +* [#11223](http://dev.ckeditor.com/ticket/11223): Fixed: Issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the `` element. +* [#11859](http://dev.ckeditor.com/ticket/11859): Fixed: Removed the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin dependency from the [Code Snippet](http://ckeditor.com/addon/codesnippet) sample. +* [#11754](http://dev.ckeditor.com/ticket/11754): [Chrome] Fixed: Infinite loop when content includes not closed attributes. +* [#11848](http://dev.ckeditor.com/ticket/11848): [IE] Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) throwing an exception when there was no selection in the editor. +* [#11801](http://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking the [Enhanced Image](http://ckeditor.com/addon/image2) widget. +* [#11626](http://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) sets invalid column width. +* [#11872](http://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-addClass) chainable symmetrically to [`element.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeClass). +* [#11813](http://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting a captioned image and restoring an undo snapshot ([Enhanced Image](http://ckeditor.com/addon/image2)). +* [#11814](http://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in the [Enhanced Image](http://ckeditor.com/addon/image2) context menu. +* [#11839](http://dev.ckeditor.com/ticket/11839): [IE9] Fixed: The caret jumps out of the editable area when resizing the editor in the source mode. +* [#11822](http://dev.ckeditor.com/ticket/11822): [Webkit] Fixed: Editing anchors by double-click is broken in some cases. +* [#11823](http://dev.ckeditor.com/ticket/11823): [IE8] Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) throws an error over scrollbar. +* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: It is not possible to change the language back to _Not set_ in the [Code Snippet](http://ckeditor.com/addon/codesnippet) dialog window. +* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: [Filter](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied inside elements with the `contenteditable` attribute set to `true`. +* [#11798](http://dev.ckeditor.com/ticket/11798): Fixed: Inserting a non-editable element inside a table cell breaks the table. +* [#11793](http://dev.ckeditor.com/ticket/11793): Fixed: Drop-down is not "on" when clicking it while the editor is blurred. +* [#11850](http://dev.ckeditor.com/ticket/11850): Fixed: Fake objects with the `contenteditable` attribute set to `false` are not downcasted properly. +* [#11811](http://dev.ckeditor.com/ticket/11811): Fixed: Widget's data is not encoded correctly when passed to an attribute. +* [#11777](http://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin. +* [#11880](http://dev.ckeditor.com/ticket/11880): [IE8-9] Fixed: Linked image has a default thick border. + +Other Changes: + +* [#11807](http://dev.ckeditor.com/ticket/11807): Updated jQuery version used in the sample to 1.11.0 and tested CKEditor jQuery Adapter with version 1.11.0 and 2.1.0. +* [#9504](http://dev.ckeditor.com/ticket/9504): Stopped using deprecated `attribute.specified` in all browsers except Internet Explorer. +* [#11809](http://dev.ckeditor.com/ticket/11809): Changed tab size in `<pre>` to 4 spaces. + +## CKEditor 4.4 + +**Important Notes:** + +* Marked the [`editor.beforePaste`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-beforePaste) event as deprecated. +* The default class of captioned images has changed to `image` (was: `caption`). Please note that once edited in CKEditor 4.4+, all existing images of the `caption` class (`<figure class="caption">`) will be [filtered out](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) unless the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option is set to `caption`. For backward compatibility (i.e. when upgrading), it is highly recommended to use this setting, which also helps prevent CSS conflicts, etc. This does not apply to new CKEditor integrations. +* Widgets without defined buttons are no longer registered automatically to the [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). Before CKEditor 4.4 widgets were registered to the ACF which was an incorrect behavior ([#11567](http://dev.ckeditor.com/ticket/11567)). This change should not have any impact on standard scenarios, but if your button does not execute the widget command, you need to set [`allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-allowedContent) and [`requiredContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-requiredContent) properties for it manually, because the editor will not be able to find them. +* The [Show Borders](http://ckeditor.com/addon/showborders) plugin was added to the Standard installation package in order to ensure that unstyled tables are still visible for the user ([#11665](http://dev.ckeditor.com/ticket/11665)). +* Since CKEditor 4.4 the editor instance should be passed to [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) methods to ensure full compatibility with other features (e.g. applying styles to widgets requires that). We ensured backward compatibility though, so the [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) will work even when the editor instance is not provided. + +New Features: + +* [#11297](http://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](http://docs.ckeditor.com/#!/guide/dev_styles-section-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: + * Introduced the [`CKEDITOR.style.addCustomHandler()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-static-method-addCustomHandler) method for registering custom style handlers. + * The [`CKEDITOR.style.apply()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-apply) and [`CKEDITOR.style.remove()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-remove) methods are now called with an editor instance instead of the document so they can be reused by the [`CKEDITOR.editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) and [`CKEDITOR.editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-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](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget) to make the handling of styles by widgets fully customizable. See: [`widget.definition.styleableElements`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleableElements), [`widget.definition.styleToAllowedContentRule`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleToAllowedContentRules), [`widget.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-addClass), [`widget.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeClass), [`widget.getClasses()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-getClasses), [`widget.hasClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-hasClass), [`widget.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-applyStyle), [`widget.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeStyle), [`widget.checkStyleActive()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-checkStyleActive). + * Integration with the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) required an introduction of the [`CKEDITOR.style.toAllowedContent()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-toAllowedContentRules) method which can be implemented by the custom style handler and if exists, it is used by the [`CKEDITOR.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter) to translate a style to [allowed content rules](http://docs.ckeditor.com/#!/api/CKEDITOR.filter.allowedContentRules). +* [#11300](http://dev.ckeditor.com/ticket/11300): Various changes in the [Enhanced Image](http://ckeditor.com/addon/image2) plugin: + * Introduced the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option to configure the class of captioned images. + * Introduced the [`config.image2_alignClasses`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_alignClasses) option to configure the way images are aligned with CSS classes. + If this setting is defined, the editor produces classes instead of inline styles for aligned images. + * Default image caption can be translated (customized) with the `editor.lang.image2.captionPlaceholder` string. +* [#11341](http://dev.ckeditor.com/ticket/11341): [Enhanced Image](http://ckeditor.com/addon/image2) plugin: It is now possible to add a link to any image type. +* [#10202](http://dev.ckeditor.com/ticket/10202): Introduced wildcard support in the [Allowed Content Rules](http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules) format. +* [#10276](http://dev.ckeditor.com/ticket/10276): Introduced blacklisting in the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). +* [#10480](http://dev.ckeditor.com/ticket/10480): Introduced code snippets with code highlighting. There are two versions available so far — the default [Code Snippet](http://ckeditor.com/addon/codesnippet) which uses the [highlight.js](http://highlightjs.org) library and the [Code Snippet GeSHi](http://ckeditor.com/addon/codesnippetgeshi) which uses the [GeSHi](http://qbnz.com/highlighter/) library. +* [#11737](http://dev.ckeditor.com/ticket/11737): Introduced an option to prevent [filtering](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) of an element that matches custom criteria (see [`filter.addElementCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addElementCallback)). +* [#11532](http://dev.ckeditor.com/ticket/11532): Introduced the [`editor.addContentsCss()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-addContentsCss) method that can be used for [adding custom CSS files](http://docs.ckeditor.com/#!/guide/plugin_sdk_styles). +* [#11536](http://dev.ckeditor.com/ticket/11536): Added the [`CKEDITOR.tools.htmlDecode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-htmlDecode) method for decoding HTML entities. +* [#11225](http://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-property-transparentImageData) property which contains transparent image data to be used in CSS or as image source. + +Other Changes: + +* [#11377](http://dev.ckeditor.com/ticket/11377): Unified internal representation of empty anchors using the [fake objects](http://ckeditor.com/addon/fakeobjects). +* [#11422](http://dev.ckeditor.com/ticket/11422): Removed Firefox 3.x, Internet Explorer 6 and Opera 12.x leftovers in code. +* [#5217](http://dev.ckeditor.com/ticket/5217): Setting data (including switching between modes) creates a new undo snapshot. Besides that: + * Introduced the [`editable.status`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-property-status) property. + * Introduced a new `forceUpdate` option for the [`editor.lockSnapshot`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-lockSnapshot) event. + * Fixed: Selection not being unlocked in inline editor after setting data ([#11500](http://dev.ckeditor.com/ticket/11500)). +* The [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin was updated to the latest version. + +Fixed Issues: + +* [#10190](http://dev.ckeditor.com/ticket/10190): Fixed: Removing block style with [`editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-removeStyle) should result in a paragraph and not a div. +* [#11727](http://dev.ckeditor.com/ticket/11727): Fixed: The editor tries to select a non-editable image which was clicked. + +## CKEditor 4.3.5 + +New Features: + +* Added new translation: Tatar. + +Fixed Issues: + +* [#11677](http://dev.ckeditor.com/ticket/11677): Fixed: Undo/Redo keystrokes are blocked in the source mode. +* [#11717](http://dev.ckeditor.com/ticket/11717): [Document Properties](http://ckeditor.com/addon/docprops) plugin requires the [Color Dialog](http://ckeditor.com/addon/colordialog) plugin to work. + +## CKEditor 4.3.4 + +Fixed Issues: + +* [#11597](http://dev.ckeditor.com/ticket/11597): [IE11] Fixed: Error thrown when trying to open the [preview](http://ckeditor.com/addon/preview) using the keyboard. +* [#11544](http://dev.ckeditor.com/ticket/11544): [Placeholders](http://ckeditor.com/addon/placeholder) will no longer be upcasted in parents not accepting `<span>` elements. +* [#8663](http://dev.ckeditor.com/ticket/8663): Fixed [`element.renameNode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-renameNode) not clearing the [`element.getName()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-getName) cache. +* [#11574](http://dev.ckeditor.com/ticket/11574): Fixed: *Backspace* destroying the DOM structure if an inline editable is placed in a list item. +* [#11603](http://dev.ckeditor.com/ticket/11603): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) attaches to tables outside the editable. +* [#9205](http://dev.ckeditor.com/ticket/9205), [#7805](http://dev.ckeditor.com/ticket/7805), [#8216](http://dev.ckeditor.com/ticket/8216): Fixed: `{cke_protected_1}` appearing in data in various cases where HTML comments are placed next to `"` or `'`. +* [#11635](http://dev.ckeditor.com/ticket/11635): Fixed: Some attributes are not protected before the content is passed through the fix bin. +* [#11660](http://dev.ckeditor.com/ticket/11660): [IE] Fixed: Table content is lost when some extra markup is inside the table. +* [#11641](http://dev.ckeditor.com/ticket/11641): Fixed: Switching between modes in the classic editor removes content styles for the inline editor. +* [#11568](http://dev.ckeditor.com/ticket/11568): Fixed: [Styles](http://ckeditor.com/addon/stylescombo) drop-down list is not enabled on selection change. + +## CKEditor 4.3.3 + +Fixed Issues: + +* [#11500](http://dev.ckeditor.com/ticket/11500): [Webkit/Blink] Fixed: Selection lost when setting data in another inline editor. Additionally, [`selection.removeAllRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-removeAllRanges) is now scoped to selection's [root](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-property-root). +* [#11104](http://dev.ckeditor.com/ticket/11104): [IE] Fixed: Various issues with scrolling and selection when focusing widgets. +* [#11487](http://dev.ckeditor.com/ticket/11487): Moving mouse over the [Enhanced Image](http://ckeditor.com/addon/image2) widget will no longer change the value returned by the [`editor.checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method. +* [#8673](http://dev.ckeditor.com/ticket/8673): [WebKit] Fixed: Cannot select and remove the [Page Break](http://ckeditor.com/addon/pagebreak). +* [#11413](http://dev.ckeditor.com/ticket/11413): Fixed: Incorrect [`editor.execCommand()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand) behavior. +* [#11438](http://dev.ckeditor.com/ticket/11438): Splitting table cells vertically is no longer changing table structure. +* [#8899](http://dev.ckeditor.com/ticket/8899): Fixed: Links in the [About CKEditor](http://ckeditor.com/addon/about) dialog window now open in a new browser window or tab. +* [#11490](http://dev.ckeditor.com/ticket/11490): Fixed: [Menu button](http://ckeditor.com/addon/menubutton) panel not showing in the source mode. +* [#11417](http://dev.ckeditor.com/ticket/11417): The [`widget.doubleclick`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-event-doubleclick) event is not canceled anymore after editing was triggered. +* [#11253](http://dev.ckeditor.com/ticket/11253): [IE] Fixed: Clipped upload button in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window. +* [#11359](http://dev.ckeditor.com/ticket/11359): Standardized the way anchors are discovered by the [Link](http://ckeditor.com/addon/link) plugin. +* [#11058](http://dev.ckeditor.com/ticket/11058): [IE8] Fixed: Error when deleting a table row. +* [#11508](http://dev.ckeditor.com/ticket/11508): Fixed: [`htmlDataProcessor`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlDataProcessor) discovering protected attributes within other attributes' values. +* [#11533](http://dev.ckeditor.com/ticket/11533): Widgets: Avoid recurring upcasts if the DOM structure was modified during an upcast. +* [#11400](http://dev.ckeditor.com/ticket/11400): Fixed: The [`domObject.removeAllListeners()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.domObject-method-removeAllListeners) method does not remove custom listeners completely. +* [#11493](http://dev.ckeditor.com/ticket/11493): Fixed: The [`selection.getRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-getRanges) method does not override cached ranges when used with the `onlyEditables` argument. +* [#11390](http://dev.ckeditor.com/ticket/11390): [IE] All [XML](http://ckeditor.com/addon/xml) plugin [methods](http://docs.ckeditor.com/#!/api/CKEDITOR.xml) now work in IE10+. +* [#11542](http://dev.ckeditor.com/ticket/11542): [IE11] Fixed: Blurry toolbar icons when Right-to-Left UI language is set. +* [#11504](http://dev.ckeditor.com/ticket/11504): Fixed: When [`config.fullPage`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fullPage) is set to `true`, entities are not encoded in editor output. +* [#11004](http://dev.ckeditor.com/ticket/11004): Integrated [Enhanced Image](http://ckeditor.com/addon/image2) dialog window with [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). +* [#11439](http://dev.ckeditor.com/ticket/11439): Fixed: Properties get cloned in the Cell Properties dialog window if multiple cells are selected. + +## CKEditor 4.3.2 + +Fixed Issues: + +* [#11331](http://dev.ckeditor.com/ticket/11331): A menu button will have a changed label when selected instead of using the `aria-pressed` attribute. +* [#11177](http://dev.ckeditor.com/ticket/11177): Widget drag handler improvements: + * [#11176](http://dev.ckeditor.com/ticket/11176): Fixed: Initial position is not updated when the widget data object is empty. + * [#11001](http://dev.ckeditor.com/ticket/11001): Fixed: Multiple synchronous layout recalculations are caused by initial drag handler positioning causing performance issues. + * [#11161](http://dev.ckeditor.com/ticket/11161): Fixed: Drag handler is not repositioned in various situations. + * [#11281](http://dev.ckeditor.com/ticket/11281): Fixed: Drag handler and mask are duplicated after widget reinitialization. +* [#11207](http://dev.ckeditor.com/ticket/11207): [Firefox] Fixed: Misplaced [Enhanced Image](http://ckeditor.com/addon/image2) resizer in the inline editor. +* [#11102](http://dev.ckeditor.com/ticket/11102): `CKEDITOR.template` improvements: + * [#11102](http://dev.ckeditor.com/ticket/11102): Added newline character support. + * [#11216](http://dev.ckeditor.com/ticket/11216): Added "\\'" substring support. +* [#11121](http://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when the editor is loaded in a hidden iframe. +* [#11350](http://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-contentsCss) is affected by [`CKEDITOR.getUrl()`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl). +* [#11097](http://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](http://ckeditor.com/addon/autogrow) plugin performance when dealing with very big tables. +* [#11290](http://dev.ckeditor.com/ticket/11290): Removed redundant code in the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin. +* [#11133](http://dev.ckeditor.com/ticket/11133): [Page Break](http://ckeditor.com/addon/pagebreak) becomes editable if pasted. +* [#11126](http://dev.ckeditor.com/ticket/11126): Fixed: Native Undo executed once the bottom of the snapshot stack is reached. +* [#11131](http://dev.ckeditor.com/ticket/11131): [Div Editing Area](http://ckeditor.com/addon/divarea): Fixed: Error thrown when switching to source mode if the selection was in widget's nested editable. +* [#11139](http://dev.ckeditor.com/ticket/11139): [Div Editing Area](http://ckeditor.com/addon/divarea): Fixed: Elements Path is not cleared after switching to source mode. +* [#10778](http://dev.ckeditor.com/ticket/10778): Fixed a bug with range enlargement. The range no longer expands to visible whitespace. +* [#11146](http://dev.ckeditor.com/ticket/11146): [IE] Fixed: Preview window switches Internet Explorer to Quirks Mode. +* [#10762](http://dev.ckeditor.com/ticket/10762): [IE] Fixed: JavaScript code displayed in preview window's URL bar. +* [#11186](http://dev.ckeditor.com/ticket/11186): Introduced the [`widgets.repository.addUpcastCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-addUpcastCallback) method that allows to block upcasting given element to a widget. +* [#11307](http://dev.ckeditor.com/ticket/11307): Fixed: Paste as Plain Text conflict with the [MooTools](http://mootools.net) library. +* [#11140](http://dev.ckeditor.com/ticket/11140): [IE11] Fixed: Anchors are not draggable. +* [#11379](http://dev.ckeditor.com/ticket/11379): Changed default contents `line-height` to unitless values to avoid huge text overlapping (like in [#9696](http://dev.ckeditor.com/ticket/9696)). +* [#10787](http://dev.ckeditor.com/ticket/10787): [Firefox] Fixed: Broken replacement of text while pasting into `div`-based editor. +* [#10884](http://dev.ckeditor.com/ticket/10884): Widgets integration with the [Show Blocks](http://ckeditor.com/addon/showblocks) plugin. +* [#11021](http://dev.ckeditor.com/ticket/11021): Fixed: An error thrown when selecting entire editable contents while fake selection is on. +* [#11086](http://dev.ckeditor.com/ticket/11086): [IE8] Re-enable inline widgets drag&drop in Internet Explorer 8. +* [#11372](http://dev.ckeditor.com/ticket/11372): Widgets: Special characters encoded twice in nested editables. +* [#10068](http://dev.ckeditor.com/ticket/10068): Fixed: Support for protocol-relative URLs. +* [#11283](http://dev.ckeditor.com/ticket/11283): [Enhanced Image](http://ckeditor.com/addon/image2): A `<div>` element with `text-align: center` and an image inside is not recognised correctly. +* [#11196](http://dev.ckeditor.com/ticket/11196): [Accessibility Instructions](http://ckeditor.com/addon/a11yhelp): Allowed additional keyboard button labels to be translated in the dialog window. + +## CKEditor 4.3.1 + +**Important Notes:** + +* To match the naming convention, the `language` button is now `Language` ([#11201](http://dev.ckeditor.com/ticket/11201)). +* [Enhanced Image](http://ckeditor.com/addon/image2) button, context menu, command, and icon names match those of the [Image](http://ckeditor.com/addon/image) plugin ([#11222](http://dev.ckeditor.com/ticket/11222)). + +Fixed Issues: + +* [#11244](http://dev.ckeditor.com/ticket/11244): Changed: The [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method now fires the [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-event-checkWidgets) event, so from CKEditor 4.3.1 it is preferred to use the method rather than fire the event. +* [#11171](http://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) and [`editor.insertText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText) methods do not call the [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method. +* [#11085](http://dev.ckeditor.com/ticket/11085): [IE8] Replaced preview generated by the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) widget with a placeholder. +* [#11044](http://dev.ckeditor.com/ticket/11044): Enhanced WAI-ARIA support for the [Language](http://ckeditor.com/addon/language) plugin drop-down menu. +* [#11075](http://dev.ckeditor.com/ticket/11075): With drop-down menu button focused, pressing the *Down Arrow* key will now open the menu and focus its first option. +* [#11165](http://dev.ckeditor.com/ticket/11165): Fixed: The [File Browser](http://ckeditor.com/addon/filebrowser) plugin cannot be removed from the editor. +* [#11159](http://dev.ckeditor.com/ticket/11159): [IE9-10] [Enhanced Image](http://ckeditor.com/addon/image2): Fixed buggy discovery of image dimensions. +* [#11101](http://dev.ckeditor.com/ticket/11101): Drop-down lists no longer break when given double quotes. +* [#11077](http://dev.ckeditor.com/ticket/11077): [Enhanced Image](http://ckeditor.com/addon/image2): Empty undo step recorded when resizing the image. +* [#10853](http://dev.ckeditor.com/ticket/10853): [Enhanced Image](http://ckeditor.com/addon/image2): Widget has paragraph wrapper when de-captioning unaligned image. +* [#11198](http://dev.ckeditor.com/ticket/11198): Widgets: Drag handler is not fully visible when an inline widget is in a heading. +* [#11132](http://dev.ckeditor.com/ticket/11132): [Firefox] Fixed: Caret is lost after drag and drop of an inline widget. +* [#11182](http://dev.ckeditor.com/ticket/11182): [IE10-11] Fixed: Editor crashes (IE11) or works with minor issues (IE10) if a page is loaded in Quirks Mode. See [`env.quirks`](http://docs.ckeditor.com/#!/api/CKEDITOR.env-property-quirks) for more details. +* [#11204](http://dev.ckeditor.com/ticket/11204): Added `figure` and `figcaption` styles to the `contents.css` file so [Enhanced Image](http://ckeditor.com/addon/image2) looks nicer. +* [#11202](http://dev.ckeditor.com/ticket/11202): Fixed: No newline in [BBCode](http://ckeditor.com/addon/bbcode) mode. +* [#10890](http://dev.ckeditor.com/ticket/10890): Fixed: Error thrown when pressing the *Delete* key in a list item. +* [#10055](http://dev.ckeditor.com/ticket/10055): [IE8-10] Fixed: *Delete* pressed on a selected image causes the browser to go back. +* [#11183](http://dev.ckeditor.com/ticket/11183): Fixed: Inserting a horizontal rule or a table in multiple row selection causes a browser crash. Additionally, the [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) method does not insert the element into every range of a selection any more. +* [#11042](http://dev.ckeditor.com/ticket/11042): Fixed: Selection made on an element containing a non-editable element was not auto faked. +* [#11125](http://dev.ckeditor.com/ticket/11125): Fixed: Keyboard navigation through menu and drop-down items will now cycle. +* [#11011](http://dev.ckeditor.com/ticket/11011): Fixed: The [`editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) method removes attributes from nested elements. +* [#11179](http://dev.ckeditor.com/ticket/11179): Fixed: [`editor.destroy()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-destroy) does not cleanup content generated by the [Table Resize](http://ckeditor.com/addon/tableresize) plugin for inline editors. +* [#11237](http://dev.ckeditor.com/ticket/11237): Fixed: Table border attribute value is deleted when pasting content from Microsoft Word. +* [#11250](http://dev.ckeditor.com/ticket/11250): Fixed: HTML entities inside the `<textarea>` element are not encoded. +* [#11260](http://dev.ckeditor.com/ticket/11260): Fixed: Initially disabled buttons are not read by JAWS as disabled. +* [#11200](http://dev.ckeditor.com/ticket/11200): Added [Clipboard](http://ckeditor.com/addon/clipboard) plugin as a dependency for [Widget](http://ckeditor.com/addon/widget) to fix drag and drop. + ## CKEditor 4.3 New Features: @@ -66,15 +336,15 @@ New Features: * [Widget plugin](http://ckeditor.com/addon/widget) introducing the [Widget API](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget). * New [`editor.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) and [`editor.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-shiftEnterMode) properties – normalized versions of [`config.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) and [`config.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode). * Dynamic editor settings. Starting from CKEditor 4.3 Beta, *Enter* mode values and [content filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) instances may be changed dynamically (for example when the caret was placed in an element in which editor features should be adjusted). When you are implementing a new editor feature, you should base its behavior on [dynamic](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) or [static](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) *Enter* mode values depending on whether this feature works in selection context or globally on editor content. - * Dynamic *Enter* mode values – [`editor.setActiveEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) and [`editor.activeShiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeShiftEnterMode). - * Dynamic content filter instances – [`editor.setActiveFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveFilter) method, [`editor.activeFilterChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeFilterChange) event, and [`editor.activeFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter) property. - * "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-fake) method. - * Default [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter-method-addRules) method. + * Dynamic *Enter* mode values – [`editor.setActiveEnterMode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) and [`editor.activeShiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeShiftEnterMode). + * Dynamic content filter instances – [`editor.setActiveFilter()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveFilter) method, [`editor.activeFilterChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeFilterChange) event, and [`editor.activeFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter) property. + * "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-fake) method. + * Default [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules()`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter-method-addRules) method. * Dozens of new methods were introduced – most interesting ones: - * [`document.find`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-find), - * [`document.findOne`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-findOne), - * [`editable.insertElementIntoRange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertElementIntoRange), - * [`range.moveToClosestEditablePosition`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-moveToClosestEditablePosition), + * [`document.find()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-find), + * [`document.findOne()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-findOne), + * [`editable.insertElementIntoRange()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertElementIntoRange), + * [`range.moveToClosestEditablePosition()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-moveToClosestEditablePosition), * New methods for [`htmlParser.node`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.node) and [`htmlParser.element`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.element). * [#10659](http://dev.ckeditor.com/ticket/10659): New [Enhanced Image](http://ckeditor.com/addon/image2) plugin that introduces a widget with integrated image captions, an option to center images, and dynamic "click and drag" resizing. * [#10664](http://dev.ckeditor.com/ticket/10664): New [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin that introduces the MathJax widget. @@ -99,13 +369,13 @@ Fixed Issues: * [#10308](http://dev.ckeditor.com/ticket/10308): [IE10] Fixed: Unspecified error when deleting a row. * [#10945](http://dev.ckeditor.com/ticket/10945): [Chrome] Fixed: Clicking with a mouse inside the editor does not show the caret. * [#10912](http://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked. -* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal`](http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal) not handling paths including file name specified. -* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-isArray) not working cross frame. +* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal()`](http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal) not handling paths including file name specified. +* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-isArray) not working cross frame. * [#10910](http://dev.ckeditor.com/ticket/10910): [IE9] Fixed JavaScript error thrown in Compatibility Mode when clicking and/or typing in the editing area. * [#10868](http://dev.ckeditor.com/ticket/10868): [IE8] Prevent the browser from crashing when applying the Inline Quotation style. * [#10915](http://dev.ckeditor.com/ticket/10915): Fixed: Invalid CSS filter in the Kama skin. * [#10914](http://dev.ckeditor.com/ticket/10914): Plugins [Indent List](http://ckeditor.com/addon/indentlist) and [Indent Block](http://ckeditor.com/addon/indentblock) are now included in the build configuration. -* [#10812](http://dev.ckeditor.com/ticket/10812): Fixed [`range#createBookmark2`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](http://dev.ckeditor.com/ticket/10850), [#10842](http://dev.ckeditor.com/ticket/10842). +* [#10812](http://dev.ckeditor.com/ticket/10812): Fixed [`range.createBookmark2()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](http://dev.ckeditor.com/ticket/10850), [#10842](http://dev.ckeditor.com/ticket/10842). * [#10951](http://dev.ckeditor.com/ticket/10951): Reviewed and optimized focus handling on panels (combo, menu buttons, color buttons, and context menu) to enhance accessibility. Fixed [#10705](http://dev.ckeditor.com/ticket/10705), [#10706](http://dev.ckeditor.com/ticket/10706) and [#10707](http://dev.ckeditor.com/ticket/10707). * [#10704](http://dev.ckeditor.com/ticket/10704): Fixed a JAWS issue with the Select Color dialog window title not being announced. * [#10753](http://dev.ckeditor.com/ticket/10753): The floating toolbar in inline instances now has a dedicated accessibility label. diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/LICENSE.md b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/LICENSE.md index d447c67..b6e0b9c 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/LICENSE.md +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/LICENSE.md @@ -2,7 +2,7 @@ Software License Agreement ========================== CKEditor - The text editor for Internet - http://ckeditor.com -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. Licensed under the terms of any of the following licenses at your choice: diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/README.md b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/README.md index 378c267..c5a55cd 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/README.md +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/README.md @@ -1,7 +1,7 @@ CKEditor 4 ========== -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. http://ckeditor.com - See LICENSE.md for license information. CKEditor is a text editor to be used inside web pages. It's not a replacement diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/adapters/jquery.js b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/adapters/jquery.js index 2851ea4..3ec908b 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/adapters/jquery.js +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/adapters/jquery.js @@ -1,5 +1,5 @@ /* - Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ (function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(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,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b= diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/build-config.js b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/build-config.js index 860ab93..6c22e8b 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/build-config.js +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/build-config.js @@ -1,14 +1,25 @@ - -/** - * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.html or http://ckeditor.com/license +/** + * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license */ /** * This file was added automatically by CKEditor builder. - * You may re-use it at any time at http://ckeditor.com/builder to build CKEditor again. - * - * NOTE: + * You may re-use it at any time to build CKEditor again. + * + * If you would like to build CKEditor online again + * (for example to upgrade), visit one the following links: + * + * (1) http://ckeditor.com/builder + * Visit online builder to build CKEditor from scratch. + * + * (2) http://ckeditor.com/builder/e6b8a045f8f984a69463975ca3e6524a + * Visit online builder to build CKEditor, starting with the same setup as before. + * + * (3) http://ckeditor.com/builder/download/e6b8a045f8f984a69463975ca3e6524a + * Straight download link to the latest version of CKEditor (Optimized) with the same setup as before. + * + * NOTE: * This file is not used by CKEditor, you may remove it. * Changing this file will not change your CKEditor configuration. */ @@ -17,27 +28,33 @@ var CKBUILDER_CONFIG = { skin: 'moono', preset: 'full', ignore: [ - 'dev', + '.bender', + '.DS_Store', '.gitignore', '.gitattributes', + '.idea', + '.mailmap', + 'bender.js', + 'bender-err.log', + 'bender-out.log', + 'dev', + 'node_modules', + 'package.json', 'README.md', - '.mailmap' + 'tests' ], plugins : { - 'about' : 1, 'a11yhelp' : 1, - 'dialogadvtab' : 1, + 'about' : 1, 'basicstyles' : 1, 'bidi' : 1, 'blockquote' : 1, 'clipboard' : 1, 'colorbutton' : 1, 'colordialog' : 1, - 'templates' : 1, 'contextmenu' : 1, + 'dialogadvtab' : 1, 'div' : 1, - 'resize' : 1, - 'toolbar' : 1, 'elementspath' : 1, 'enterkey' : 1, 'entities' : 1, @@ -46,16 +63,14 @@ var CKBUILDER_CONFIG = { 'flash' : 1, 'floatingspace' : 1, 'font' : 1, - 'forms' : 1, 'format' : 1, + 'forms' : 1, 'horizontalrule' : 1, 'htmlwriter' : 1, 'iframe' : 1, - 'wysiwygarea' : 1, 'image' : 1, 'indentblock' : 1, 'indentlist' : 1, - 'smiley' : 1, 'justify' : 1, 'language' : 1, 'link' : 1, @@ -65,103 +80,96 @@ var CKBUILDER_CONFIG = { 'maximize' : 1, 'newpage' : 1, 'pagebreak' : 1, - 'pastetext' : 1, 'pastefromword' : 1, + 'pastetext' : 1, 'preview' : 1, 'print' : 1, 'removeformat' : 1, + 'resize' : 1, 'save' : 1, + 'scayt' : 1, 'selectall' : 1, 'showblocks' : 1, 'showborders' : 1, + 'smiley' : 1, 'sourcearea' : 1, 'specialchar' : 1, - 'scayt' : 1, 'stylescombo' : 1, 'tab' : 1, 'table' : 1, 'tabletools' : 1, + 'templates' : 1, + 'toolbar' : 1, 'undo' : 1, 'wsc' : 1, - 'dialog' : 1, - 'dialogui' : 1, - 'panelbutton' : 1, - 'button' : 1, - 'floatpanel' : 1, - 'panel' : 1, - 'menu' : 1, - 'popup' : 1, - 'fakeobjects' : 1, - 'richcombo' : 1, - 'listblock' : 1, - 'indent' : 1, - 'menubutton' : 1 + 'wysiwygarea' : 1 }, languages : { 'af' : 1, - 'sq' : 1, 'ar' : 1, - 'eu' : 1, + 'bg' : 1, 'bn' : 1, 'bs' : 1, - 'bg' : 1, 'ca' : 1, - 'zh-cn' : 1, - 'zh' : 1, - 'hr' : 1, 'cs' : 1, + 'cy' : 1, 'da' : 1, - 'nl' : 1, + 'de' : 1, + 'el' : 1, 'en' : 1, 'en-au' : 1, 'en-ca' : 1, 'en-gb' : 1, 'eo' : 1, + 'es' : 1, 'et' : 1, - 'fo' : 1, + 'eu' : 1, + 'fa' : 1, 'fi' : 1, + 'fo' : 1, 'fr' : 1, 'fr-ca' : 1, 'gl' : 1, - 'ka' : 1, - 'de' : 1, - 'el' : 1, 'gu' : 1, 'he' : 1, 'hi' : 1, + 'hr' : 1, 'hu' : 1, - 'is' : 1, 'id' : 1, + 'is' : 1, 'it' : 1, 'ja' : 1, + 'ka' : 1, 'km' : 1, 'ko' : 1, 'ku' : 1, - 'lv' : 1, 'lt' : 1, + 'lv' : 1, 'mk' : 1, - 'ms' : 1, 'mn' : 1, - 'no' : 1, + 'ms' : 1, 'nb' : 1, - 'fa' : 1, + 'nl' : 1, + 'no' : 1, 'pl' : 1, - 'pt-br' : 1, 'pt' : 1, + 'pt-br' : 1, 'ro' : 1, 'ru' : 1, - 'sr' : 1, - 'sr-latn' : 1, 'si' : 1, 'sk' : 1, 'sl' : 1, - 'es' : 1, + 'sq' : 1, + 'sr' : 1, + 'sr-latn' : 1, 'sv' : 1, 'th' : 1, 'tr' : 1, + 'tt' : 1, 'ug' : 1, 'uk' : 1, 'vi' : 1, - 'cy' : 1 + 'zh' : 1, + 'zh-cn' : 1 } }; \ No newline at end of file diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/ckeditor.js b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/ckeditor.js index af665c1..56477e0 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/ckeditor.js +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/ckeditor.js @@ -1,564 +1,576 @@ /* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license +Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license */ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"DAED",version:"4.3",revision:"d2184ac",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var e=document.getElementsByTagName("script"),a=0;a<e.length;a++){var d=e[a].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(d){b=d[1];break}}-1==b.indexOf(":/")&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+b:location.href.match(/^[^\?]*\/(?:)/)[0]+ -b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(b){-1==b.indexOf(":/")&&0!==b.indexOf("/")&&(b=this.basePath+b);this.timestamp&&("/"!=b.charAt(b.length-1)&&!/[&?]t=/.test(b))&&(b+=(0<=b.indexOf("?")?"&":"?")+"t="+this.timestamp);return b},domReady:function(){function b(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",b, -!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",b),e())}catch(a){}}function e(){for(var e;e=a.shift();)e()}var a=[];return function(e){a.push(e);"complete"===document.readyState&&setTimeout(b,1);if(1==a.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);e=!1;try{e= -!window.frameElement}catch(d){}if(document.documentElement.doScroll&&e){var j=function(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(j,1);return}b()};j()}}}}()},d=window.CKEDITOR_GETURL;if(d){var b=a.getUrl;a.getUrl=function(c){return d.call(a,c)||b.call(a,c)}}return a}()); -CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var d=CKEDITOR.event.prototype,b;for(b in d)a[b]==void 0&&(a[b]=d[b])},CKEDITOR.event.prototype=function(){function a(a){var e=d(this);return e[a]||(e[a]=new b(a))}var d=function(b){b=b.getPrivate&&b.getPrivate()||b._||(b._={});return b.events||(b.events={})},b=function(b){this.name=b;this.listeners=[]};b.prototype={getListenerIndex:function(b){for(var e=0,a=this.listeners;e<a.length;e++)if(a[e].fn==b)return e;return-1}}; -return{define:function(b,e){var f=a.call(this,b);CKEDITOR.tools.extend(f,e,true)},on:function(b,e,f,d,n){function j(a,g,l,u){a={name:b,sender:this,editor:a,data:g,listenerData:d,stop:l,cancel:u,removeListener:k};return e.call(f,a)===false?false:a.data}function k(){u.removeListener(b,e)}var l=a.call(this,b);if(l.getListenerIndex(e)<0){l=l.listeners;f||(f=this);isNaN(n)&&(n=10);var u=this;j.fn=e;j.priority=n;for(var s=l.length-1;s>=0;s--)if(l[s].priority<=n){l.splice(s+1,0,j);return{removeListener:k}}l.unshift(j)}return{removeListener:k}}, -once:function(){var b=arguments[1];arguments[1]=function(e){e.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,e=function(){b=1},a=0,h=function(){a=1};return function(n,j,k){var l=d(this)[n],n=b,u=a;b=a=0;if(l){var s=l.listeners;if(s.length)for(var s=s.slice(0),t,g=0;g<s.length;g++){if(l.errorProof)try{t=s[g].call(this, -k,j,e,h)}catch(r){}else t=s[g].call(this,k,j,e,h);t===false?a=1:typeof t!="undefined"&&(j=t);if(b||a)break}}j=a?false:typeof j=="undefined"?true:j;b=n;a=u;return j}}(),fireOnce:function(b,e,a){e=this.fire(b,e,a);delete d(this)[b];return e},removeListener:function(b,e){var a=d(this)[b];if(a){var h=a.getListenerIndex(e);h>=0&&a.listeners.splice(h,1)}},removeAllListeners:function(){var b=d(this),e;for(e in b)delete b[e]},hasListeners:function(b){return(b=d(this)[b])&&b.listeners.length>0}}}()); -CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,d,this)},CKEDITOR.editor.prototype.fireOnce=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); -CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),d=window.opera,b={ie:a.indexOf("trident/")>-1,opera:!!d&&d.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var e=document.domain,b=window.location.hostname;return e!=b&&e!="["+b+"]"},secure:location.protocol== -"https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var c=0;if(b.ie){c=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks&&c<10}if(b.gecko){var e=a.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");c=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}b.opera&&(c=parseFloat(d.version()));b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); -b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=b.iOS&&c>=534||!b.mobile&&(b.ie&&c>6||b.gecko&&c>=10801||b.opera&&c>=9.5||b.air&&c>=1||b.webkit&&c>=522||false);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&c>10;b.needsNbspFiller=b.ie&&c<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.opera?"opera":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";if(b.ie){b.cssClass=b.cssClass+(" cke_browser_ie"+ -(b.quirks||b.version<7?"6":b.version));if(b.quirks)b.cssClass=b.cssClass+" cke_browser_iequirks"}if(b.gecko)if(c<10900)b.cssClass=b.cssClass+" cke_browser_gecko18";else if(c<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}()); +(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E6FD",version:"4.4.3",revision:"fd4f17c",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var d=document.getElementsByTagName("script"),e=0;e<d.length;e++){var b=d[e].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(b){a=b[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,2)&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+ +a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&("/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a))&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded", +a,!1),d()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),d())}catch(e){}}function d(){for(var a;a=e.shift();)a()}var e=[];return function(d){e.push(d);"complete"===document.readyState&&setTimeout(a,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);d=!1;try{d= +!window.frameElement}catch(b){}if(document.documentElement.doScroll&&d){var c=function(){try{document.documentElement.doScroll("left")}catch(d){setTimeout(c,1);return}a()};c()}}}}()},c=window.CKEDITOR_GETURL;if(c){var b=a.getUrl;a.getUrl=function(f){return c.call(a,f)||b.call(a,f)}}return a}()); +CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var c=CKEDITOR.event.prototype,b;for(b in c)a[b]==void 0&&(a[b]=c[b])},CKEDITOR.event.prototype=function(){function a(a){var d=c(this);return d[a]||(d[a]=new b(a))}var c=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var d=0,e=this.listeners;d<e.length;d++)if(e[d].fn==a)return d;return-1}}; +return{define:function(b,d){var e=a.call(this,b);CKEDITOR.tools.extend(e,d,true)},on:function(b,d,e,c,n){function h(a,m,o,p){a={name:b,sender:this,editor:a,data:m,listenerData:c,stop:o,cancel:p,removeListener:i};return d.call(e,a)===false?false:a.data}function i(){p.removeListener(b,d)}var m=a.call(this,b);if(m.getListenerIndex(d)<0){m=m.listeners;e||(e=this);isNaN(n)&&(n=10);var p=this;h.fn=d;h.priority=n;for(var s=m.length-1;s>=0;s--)if(m[s].priority<=n){m.splice(s+1,0,h);return{removeListener:i}}m.unshift(h)}return{removeListener:i}}, +once:function(){var a=arguments[1];arguments[1]=function(d){d.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,d=function(){a=1},e=0,b=function(){e=1};return function(n,h,i){var m=c(this)[n],n=a,p=e;a=e=0;if(m){var s=m.listeners;if(s.length)for(var s=s.slice(0),x,q=0;q<s.length;q++){if(m.errorProof)try{x=s[q].call(this, +i,h,d,b)}catch(o){}else x=s[q].call(this,i,h,d,b);x===false?e=1:typeof x!="undefined"&&(h=x);if(a||e)break}}h=e?false:typeof h=="undefined"?true:h;a=n;e=p;return h}}(),fireOnce:function(a,d,e){d=this.fire(a,d,e);delete c(this)[a];return d},removeListener:function(a,d){var e=c(this)[a];if(e){var b=e.getListenerIndex(d);b>=0&&e.listeners.splice(b,1)}},removeAllListeners:function(){var a=c(this),d;for(d in a)delete a[d]},hasListeners:function(a){return(a=c(this)[a])&&a.listeners.length>0}}}()); +CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,c){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,c,this)},CKEDITOR.editor.prototype.fireOnce=function(a,c){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); +CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),c={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,e=window.location.hostname;return a!=e&&a!="["+e+"]"},secure:location.protocol== +"https:"};c.gecko=navigator.product=="Gecko"&&!c.webkit&&!c.ie;if(c.webkit)a.indexOf("chrome")>-1?c.chrome=true:c.safari=true;var b=0;if(c.ie){b=c.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;c.ie9Compat=b==9;c.ie8Compat=b==8;c.ie7Compat=b==7;c.ie6Compat=b<7||c.quirks}if(c.gecko){var f=a.match(/rv:([\d\.]+)/);if(f){f=f[1].split(".");b=f[0]*1E4+(f[1]||0)*100+(f[2]||0)*1}}c.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));c.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1])); +c.version=b;c.isCompatible=c.iOS&&b>=534||!c.mobile&&(c.ie&&b>6||c.gecko&&b>=2E4||c.air&&b>=1||c.webkit&&b>=522||false);c.hidpi=window.devicePixelRatio>=2;c.needsBrFiller=c.gecko||c.webkit||c.ie&&b>10;c.needsNbspFiller=c.ie&&b<11;c.cssClass="cke_browser_"+(c.ie?"ie":c.gecko?"gecko":c.webkit?"webkit":"unknown");if(c.quirks)c.cssClass=c.cssClass+" cke_browser_quirks";if(c.ie)c.cssClass=c.cssClass+(" cke_browser_ie"+(c.quirks?"6 cke_browser_iequirks":c.version));if(c.air)c.cssClass=c.cssClass+" cke_browser_air"; +if(c.iOS)c.cssClass=c.cssClass+" cke_browser_ios";if(c.hidpi)c.cssClass=c.cssClass+" cke_hidpi";return c}()); "unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= -CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},d*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; -(function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var e=0;e<b.length;e++)if(b[e]!=a[e])return false;return true},clone:function(b){var a;if(b&&b instanceof Array){a=[];for(var e=0;e<b.length;e++)a[e]=CKEDITOR.tools.clone(b[e]);return a}if(b===null||typeof b!="object"|| -b instanceof String||b instanceof Number||b instanceof Boolean||b instanceof Date||b instanceof RegExp)return b;a=new b.constructor;for(e in b)a[e]=CKEDITOR.tools.clone(b[e]);return a},capitalize:function(b,a){return b.charAt(0).toUpperCase()+(a?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var a=arguments.length,e,f;if(typeof(e=arguments[a-1])=="boolean")a--;else if(typeof(e=arguments[a-2])=="boolean"){f=arguments[a-1];a=a-2}for(var d=1;d<a;d++){var n=arguments[d],j;for(j in n)if(e=== -true||b[j]==void 0)if(!f||j in f)b[j]=n[j]}return b},prototypedCopy:function(b){var a=function(){};a.prototype=b;return new a},copy:function(b){var a={},e;for(e in b)a[e]=b[e];return a},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isEmpty:function(b){for(var a in b)if(b.hasOwnProperty(a))return false;return true},cssVendorPrefix:function(b,a,e){if(e)return d+b+":"+a+";"+b+":"+a;e={};e[b]=a;e[d+b]=a;return e},cssStyleToDomStyle:function(){var b=document.createElement("div").style, -a=typeof b.cssFloat!="undefined"?"cssFloat":typeof b.styleFloat!="undefined"?"styleFloat":"float";return function(e){return e=="float"?a:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){for(var b=[].concat(b),a,e=[],f=0;f<b.length;f++)if(a=b[f])/@import|[{}]/.test(a)?e.push("<style>"+a+"</style>"):e.push('<link type="text/css" rel=stylesheet href="'+a+'">');return e.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(/</g, -"<")},htmlEncodeAttr:function(b){return b.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},htmlDecodeAttr:function(b){return b.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var e=a(b);e.prototype=b.prototype;return e},setTimeout:function(b,a,e,f,d){d||(d=window);e||(e=d);return d.setTimeout(function(){f?b.apply(e,[].concat(f)): -b.apply(e)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var e=0,f=b.length;e<f;e++){if(a(b[e]))return e}else{if(b.indexOf)return b.indexOf(a);e=0;for(f=b.length;e<f;e++)if(b[e]===a)return e}return-1},search:function(b, -a){var e=CKEDITOR.tools.indexOf(b,a);return e>=0?b[e]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,e=b.base,f=b.privates||b._,d=b.proto,b=b.statics;!a&&(a=function(){e&&this.base.apply(this,arguments)});if(f)var n=a,a=function(){var e=this._||(this._={}),a;for(a in f){var b=f[a];e[a]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}n.apply(this,arguments)};if(e){a.prototype=this.prototypedCopy(e.prototype);a.prototype.constructor=a;a.base= -e;a.baseProto=e.prototype;a.prototype.base=function(){this.base=e.prototype.base;e.apply(this,arguments);this.base=arguments.callee}}d&&this.extend(a.prototype,d,true);b&&this.extend(a,b,true);return a},addFunction:function(b,c){return a.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var c=a[b];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(e){c= -CKEDITOR.tools.trim(e+"")+"px";return a.test(c)?c:e||""}}(),convertToPx:function(){var a;return function(c){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(c)){a.setStyle("width",c);return a.$.clientWidth}return c}}(),repeat:function(a,c){return Array(c+1).join(a)},tryThese:function(){for(var a,c=0,e=arguments.length;c<e;c++){var f= -arguments[c];try{a=f();break}catch(d){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var c=arguments,e=this;window.setTimeout(function(){a.apply(e,c)},0)}},normalizeCssText:function(a,c){var e=[],f,d=CKEDITOR.tools.parseCssText(a,true,c);for(f in d)e.push(f+":"+d[f]);e.sort();return e.length?e.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,e,b,d){a= -[e,b,d];for(e=0;e<3;e++)a[e]=("0"+parseInt(a[e],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,c,e){var f={};if(e){e=new CKEDITOR.dom.element("span");e.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(e.getAttribute("style")||"")}if(!a||a==";")return f;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,b){if(c){e=e.toLowerCase();e=="font-family"&&(b=b.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));b=CKEDITOR.tools.trim(b)}f[e]= -b});return f},writeCssText:function(a,c){var e,f=[];for(e in a)f.push(e+":"+a[e]);c&&f.sort();return f.join("; ")},objectCompare:function(a,c,e){var f;if(!a&&!c)return true;if(!a||!c)return false;for(f in a)if(a[f]!=c[f])return false;if(!e)for(f in c)if(a[f]!=c[f])return false;return true},objectKeys:function(a){var c=[],e;for(e in a)c.push(e);return c},convertArrayToObject:function(a,c){var e={};arguments.length==1&&(c=true);for(var f=0,d=a.length;f<d;++f)e[a[f]]=c;return e},fixDomain:function(){for(var a;;)try{a= -window.parent.document.domain;break}catch(c){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,c){function e(){d=(new Date).getTime();f=false;c()}var f,d=0;return{input:function(){if(!f){var c=(new Date).getTime()-d;c<a?f=setTimeout(e,a-c):e()}},reset:function(){f&&clearTimeout(f);f=d=0}}},enableHtml5Elements:function(a,c){for(var e=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer", -"header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],f=e.length,d;f--;){d=a.createElement(e[f]);c&&a.appendChild(d)}}}})(); -CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,d=function(a,e){for(var b=CKEDITOR.tools.clone(a),f=1;f<arguments.length;f++){var e=arguments[f],c;for(c in e)delete b[c]}return b},b={},c={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},f={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},n={"#":1},j={center:1,dir:1,noframes:1}; -a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},n,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,e,b,j);d={a:d(b,{a:1,button:1}),abbr:b,address:c, -area:h,article:a({style:1},c),aside:a({style:1},c),audio:a({source:1,track:1},c),b:b,base:h,bdi:b,bdo:b,blockquote:c,body:c,br:h,button:d(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:a({style:1},c),dl:{dt:1,dd:1},dt:c,em:b,embed:h,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},f),header:c,hgroup:{h1:1, -h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,body:1},c,f),i:b,iframe:n,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:c,link:h,map:c,mark:b,menu:a({li:1},c),meta:h,meter:d(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:n,output:b,p:b,param:h,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:n,section:a({style:1},c),select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:n, -sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:n,tfoot:{tr:1},th:c,thead:{tr:1},time:d(b,{time:1}),title:n,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:h,acronym:b,applet:a({param:1},c),basefont:h,big:b,center:c,dialog:h,dir:{li:1},font:b,isindex:h,noframes:c,strike:b,tt:b};a(d,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,j),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1, +CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; +(function(){var a=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,f=/>/g,d=/</g,e=/"/g,g=/&/g,n=/>/g,h=/</g,i=/"/g;CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,d){if(!a&&!d)return true;if(!a||!d||a.length!=d.length)return false;for(var e=0;e<a.length;e++)if(a[e]!=d[e])return false;return true},clone:function(a){var d;if(a&&a instanceof Array){d=[];for(var e=0;e<a.length;e++)d[e]=CKEDITOR.tools.clone(a[e]); +return d}if(a===null||typeof a!="object"||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===a)return a;d=new a.constructor;for(e in a)d[e]=CKEDITOR.tools.clone(a[e]);return d},capitalize:function(a,d){return a.charAt(0).toUpperCase()+(d?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var d=arguments.length,e,b;if(typeof(e=arguments[d-1])=="boolean")d--;else if(typeof(e=arguments[d-2])=="boolean"){b=arguments[d-1]; +d=d-2}for(var c=1;c<d;c++){var o=arguments[c],f;for(f in o)if(e===true||a[f]==void 0)if(!b||f in b)a[f]=o[f]}return a},prototypedCopy:function(a){var d=function(){};d.prototype=a;return new d},copy:function(a){var d={},e;for(e in a)d[e]=a[e];return d},isArray:function(a){return Object.prototype.toString.call(a)=="[object Array]"},isEmpty:function(a){for(var d in a)if(a.hasOwnProperty(d))return false;return true},cssVendorPrefix:function(a,d,e){if(e)return c+a+":"+d+";"+a+":"+d;e={};e[a]=d;e[c+a]= +d;return e},cssStyleToDomStyle:function(){var a=document.createElement("div").style,d=typeof a.cssFloat!="undefined"?"cssFloat":typeof a.styleFloat!="undefined"?"styleFloat":"float";return function(a){return a=="float"?d:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){for(var a=[].concat(a),d,e=[],b=0;b<a.length;b++)if(d=a[b])/@import|[{}]/.test(d)?e.push("<style>"+d+"</style>"):e.push('<link type="text/css" rel=stylesheet href="'+d+'">');return e.join("")}, +htmlEncode:function(a){return(""+a).replace(b,"&").replace(f,">").replace(d,"<")},htmlDecode:function(a){return a.replace(g,"&").replace(n,">").replace(h,"<")},htmlEncodeAttr:function(a){return a.replace(e,""").replace(d,"<").replace(f,">")},htmlDecodeAttr:function(a){return a.replace(i,'"').replace(h,"<").replace(n,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,d){var e=d(a);e.prototype= +a.prototype;return e},setTimeout:function(a,d,e,b,c){c||(c=window);e||(e=c);return c.setTimeout(function(){b?a.apply(e,[].concat(b)):a.apply(e)},d||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(d){return d.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(d){return d.replace(a,"")}}(),indexOf:function(a,d){if(typeof d=="function")for(var e=0,b=a.length;e<b;e++){if(d(a[e]))return e}else{if(a.indexOf)return a.indexOf(d); +e=0;for(b=a.length;e<b;e++)if(a[e]===d)return e}return-1},search:function(a,d){var e=CKEDITOR.tools.indexOf(a,d);return e>=0?a[e]:null},bind:function(a,d){return function(){return a.apply(d,arguments)}},createClass:function(a){var d=a.$,e=a.base,b=a.privates||a._,c=a.proto,a=a.statics;!d&&(d=function(){e&&this.base.apply(this,arguments)});if(b)var o=d,d=function(){var a=this._||(this._={}),d;for(d in b){var e=b[d];a[d]=typeof e=="function"?CKEDITOR.tools.bind(e,this):e}o.apply(this,arguments)};if(e){d.prototype= +this.prototypedCopy(e.prototype);d.prototype.constructor=d;d.base=e;d.baseProto=e.prototype;d.prototype.base=function(){this.base=e.prototype.base;e.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(d.prototype,c,true);a&&this.extend(d,a,true);return d},addFunction:function(d,e){return a.push(function(){return d.apply(e||this,arguments)})-1},removeFunction:function(d){a[d]=null},callFunction:function(d){var e=a[d];return e&&e.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a= +/^-?\d+\.?\d*px$/,d;return function(e){d=CKEDITOR.tools.trim(e+"")+"px";return a.test(d)?d:e||""}}(),convertToPx:function(){var a;return function(d){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(d)){a.setStyle("width",d);return a.$.clientWidth}return d}}(),repeat:function(a,d){return Array(d+1).join(a)},tryThese:function(){for(var a, +d=0,e=arguments.length;d<e;d++){var b=arguments[d];try{a=b();break}catch(c){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var d=arguments,e=this;window.setTimeout(function(){a.apply(e,d)},0)}},normalizeCssText:function(a,d){var e=[],b,c=CKEDITOR.tools.parseCssText(a,true,d);for(b in c)e.push(b+":"+c[b]);e.sort();return e.length?e.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, +function(a,d,e,b){a=[d,e,b];for(d=0;d<3;d++)a[d]=("0"+parseInt(a[d],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,d,e){var b={};if(e){e=new CKEDITOR.dom.element("span");e.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(e.getAttribute("style")||"")}if(!a||a==";")return b;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,m){if(d){e=e.toLowerCase();e=="font-family"&&(m=m.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")); +m=CKEDITOR.tools.trim(m)}b[e]=m});return b},writeCssText:function(a,d){var e,b=[];for(e in a)b.push(e+":"+a[e]);d&&b.sort();return b.join("; ")},objectCompare:function(a,d,e){var b;if(!a&&!d)return true;if(!a||!d)return false;for(b in a)if(a[b]!=d[b])return false;if(!e)for(b in d)if(a[b]!=d[b])return false;return true},objectKeys:function(a){var d=[],e;for(e in a)d.push(e);return d},convertArrayToObject:function(a,d){var e={};arguments.length==1&&(d=true);for(var b=0,c=a.length;b<c;++b)e[a[b]]=d; +return e},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(d){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,d){function e(){c=(new Date).getTime();b=false;d()}var b,c=0;return{input:function(){if(!b){var d=(new Date).getTime()-c;d<a?b=setTimeout(e,a-d):e()}},reset:function(){b&&clearTimeout(b);b=c=0}}},enableHtml5Elements:function(a,d){for(var e=["abbr","article","aside","audio","bdi","canvas","data", +"datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],b=e.length,c;b--;){c=a.createElement(e[b]);d&&a.appendChild(c)}},checkIfAnyArrayItemMatches:function(a,d){for(var e=0,b=a.length;e<b;++e)if(a[e].match(d))return true;return false},checkIfAnyObjectPropertyMatches:function(a,d){for(var e in a)if(e.match(d))return true;return false},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=="}})(); +CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,c=function(a,d){for(var e=CKEDITOR.tools.clone(a),b=1;b<arguments.length;b++){var d=arguments[b],c;for(c in d)delete e[c]}return e},b={},f={},d={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},e={command:1,link:1,meta:1,noscript:1,script:1,style:1},g={},n={"#":1},h={center:1,dir:1,noframes:1}; +a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},n,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(f,d,b,h);c={a:c(b,{a:1,button:1}),abbr:b,address:f, +area:g,article:a({style:1},f),aside:a({style:1},f),audio:a({source:1,track:1},f),b:b,base:g,bdi:b,bdo:b,blockquote:f,body:f,br:g,button:c(b,{a:1,button:1}),canvas:b,caption:f,cite:b,code:b,col:g,colgroup:{col:1},command:g,datalist:a({option:1},b),dd:f,del:b,details:a({summary:1},f),dfn:b,div:a({style:1},f),dl:{dt:1,dd:1},dt:f,em:b,embed:g,fieldset:a({legend:1},f),figcaption:f,figure:a({figcaption:1},f),footer:f,form:f,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},e),header:f,hgroup:{h1:1, +h2:1,h3:1,h4:1,h5:1,h6:1},hr:g,html:a({head:1,body:1},f,e),i:b,iframe:n,img:g,input:g,ins:b,kbd:b,keygen:g,label:b,legend:b,li:f,link:g,map:f,mark:b,menu:a({li:1},f),meta:g,meter:c(b,{meter:1}),nav:f,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:n,output:b,p:b,param:g,pre:b,progress:c(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:n,section:a({style:1},f),select:{optgroup:1,option:1},small:b,source:g,span:b,strong:b,style:n, +sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:f,textarea:n,tfoot:{tr:1},th:f,thead:{tr:1},time:c(b,{time:1}),title:n,tr:{th:1,td:1},track:g,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},f),wbr:g,acronym:b,applet:a({param:1},f),basefont:g,big:b,center:f,dialog:g,dir:{li:1},font:b,isindex:g,noframes:f,strike:b,tt:b};a(c,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},d,h),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1, div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1, -wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},d.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1, -small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return d}(); +wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},c.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1, +small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return c}(); CKEDITOR.dom.event=function(a){this.$=a}; -CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var d=this.$;d.preventDefault?d.preventDefault():d.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var a= +CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var c=this.$;c.preventDefault?c.preventDefault():c.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var a= this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2; CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(a){if(a)this.$=a}; -CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(c){typeof CKEDITOR!="undefined"&&a.fire(b,new CKEDITOR.dom.event(c))}};return{getPrivate:function(){var a;if(!(a=this.getCustomData("_")))this.setCustomData("_",a={});return a},on:function(d){var b=this.getCustomData("_cke_nativeListeners");if(!b){b={};this.setCustomData("_cke_nativeListeners",b)}if(!b[d]){b=b[d]=a(this,d);this.$.addEventListener?this.$.addEventListener(d,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&& -this.$.attachEvent("on"+d,b)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),c=b&&b[a];if(c){this.$.removeEventListener?this.$.removeEventListener(a,c,false):this.$.detachEvent&&this.$.detachEvent("on"+a,c);delete b[a]}}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var c=a[b];this.$.detachEvent? -this.$.detachEvent("on"+b,c):this.$.removeEventListener&&this.$.removeEventListener(b,c,false);delete a[b]}}}}(); -(function(a){var d={};CKEDITOR.on("reset",function(){d={}});a.equals=function(a){try{return a&&a.$===this.$}catch(c){return false}};a.setCustomData=function(a,c){var e=this.getUniqueId();(d[e]||(d[e]={}))[a]=c;return this};a.getCustomData=function(a){var c=this.$["data-cke-expando"];return(c=c&&d[c])&&a in c?c[a]:null};a.removeCustomData=function(a){var c=this.$["data-cke-expando"],c=c&&d[c],e,f;if(c){e=c[a];f=a in c;delete c[a]}return f?e:null};a.clearCustomData=function(){this.removeAllListeners(); -var a=this.$["data-cke-expando"];a&&delete d[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)})(CKEDITOR.dom.domObject.prototype); +CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(f){typeof CKEDITOR!="undefined"&&a.fire(b,new CKEDITOR.dom.event(f))}};return{getPrivate:function(){var a;if(!(a=this.getCustomData("_")))this.setCustomData("_",a={});return a},on:function(c){var b=this.getCustomData("_cke_nativeListeners");if(!b){b={};this.setCustomData("_cke_nativeListeners",b)}if(!b[c]){b=b[c]=a(this,c);this.$.addEventListener?this.$.addEventListener(c,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&& +this.$.attachEvent("on"+c,b)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),f=b&&b[a];if(f){this.$.removeEventListener?this.$.removeEventListener(a,f,false):this.$.detachEvent&&this.$.detachEvent("on"+a,f);delete b[a]}}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var f=a[b];this.$.detachEvent? +this.$.detachEvent("on"+b,f):this.$.removeEventListener&&this.$.removeEventListener(b,f,false);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(); +(function(a){var c={};CKEDITOR.on("reset",function(){c={}});a.equals=function(a){try{return a&&a.$===this.$}catch(c){return false}};a.setCustomData=function(a,f){var d=this.getUniqueId();(c[d]||(c[d]={}))[a]=f;return this};a.getCustomData=function(a){var f=this.$["data-cke-expando"];return(f=f&&c[f])&&a in f?f[a]:null};a.removeCustomData=function(a){var f=this.$["data-cke-expando"],f=f&&c[f],d,e;if(f){d=f[a];e=a in f;delete f[a]}return e?d:null};a.clearCustomData=function(){this.removeAllListeners(); +var a=this.$["data-cke-expando"];a&&delete c[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)})(CKEDITOR.dom.domObject.prototype); CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11; CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16; -CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,d){a.append(this,d);return a},clone:function(a,d){var b=this.$.cloneNode(a),c=function(e){e["data-cke-expando"]&&(e["data-cke-expando"]=false);if(e.nodeType==CKEDITOR.NODE_ELEMENT){d||e.removeAttribute("id",false);if(a)for(var e=e.childNodes,b=0;b<e.length;b++)c(e[b])}};c(b);return new CKEDITOR.dom.node(b)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$, -a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var e=c.parentNode;e&&d.unshift(this.getIndex.call({$:c},a));c=e}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){var d=this.$,b=-1, -c;if(!this.$.parentNode)return b;do if(!a||!(d!=this.$&&d.nodeType==CKEDITOR.NODE_TEXT&&(c||!d.nodeValue))){b++;c=d.nodeType==CKEDITOR.NODE_TEXT}while(d=d.previousSibling);return b},getNextSourceNode:function(a,d,b){if(b&&!b.call)var c=b,b=function(a){return!a.equals(c)};var a=!a&&this.getFirst&&this.getFirst(),e;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getNext()}for(;!a&&(e=(e||this).getParent());){if(b&&b(e,true)===false)return null;a=e.getNext()}return!a|| -b&&b(a)===false?null:d&&d!=a.type?a.getNextSourceNode(false,d,b):a},getPreviousSourceNode:function(a,d,b){if(b&&!b.call)var c=b,b=function(a){return!a.equals(c)};var a=!a&&this.getLast&&this.getLast(),e;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getPrevious()}for(;!a&&(e=(e||this).getParent());){if(b&&b(e,true)===false)return null;a=e.getPrevious()}return!a||b&&b(a)===false?null:d&&a.type!=d?a.getPreviousSourceNode(false,d,b):a},getPrevious:function(a){var d= -this.$,b;do b=(d=d.previousSibling)&&d.nodeType!=10&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getNext:function(a){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getParent:function(a){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||a&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(d):null},getParents:function(a){var d=this,b=[];do b[a?"push":"unshift"](d);while(d=d.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this; -if(a.contains&&a.contains(this))return a;var d=this.contains?this:this.getParent();do if(d.contains(a))return d;while(d=d.getParent());return null},getPosition:function(a){var d=this.$,b=a.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(d.contains){if(d.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(d))return CKEDITOR.POSITION_IS_CONTAINED+ -CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in d)return d.sourceIndex<0||b.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:d.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var d=this.getAddress(),a=a.getAddress(),b=Math.min(d.length,a.length),c=0;c<=b-1;c++)if(d[c]!=a[c]){if(c<b)return d[c]<a[c]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return d.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+ -CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,d){var b=this.$,c;if(!d)b=b.parentNode;for(;b;){if(b.nodeName&&(c=b.nodeName.toLowerCase(),typeof a=="string"?c==a:c in a))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(e){b=null}}return null},hasAscendant:function(a,d){var b=this.$;if(!d)b=b.parentNode;for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return true;b=b.parentNode}return false},move:function(a,d){a.append(this.remove(),d)},remove:function(a){var d=this.$,b=d.parentNode; -if(b){if(a)for(;a=d.firstChild;)b.insertBefore(d.removeChild(a),d);b.removeChild(d)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(d){if(d.length<b){a.split(b-d.length);this.$.removeChild(this.$.firstChild)}}else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a= -this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(d){if(d.length<b){a.split(d.length);this.$.lastChild.parentNode.removeChild(this.$.lastChild)}}else{a.remove();continue}}break}if(CKEDITOR.env.needsBrFiller)(a=this.$.lastChild)&&(a.type==1&&a.nodeName.toLowerCase()=="br")&&a.parentNode.removeChild(a)},isReadOnly:function(){var a=this;this.type!=CKEDITOR.NODE_ELEMENT&&(a=this.getParent());if(a&&typeof a.$.isContentEditable!="undefined")return!(a.$.isContentEditable|| +CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,c){a.append(this,c);return a},clone:function(a,c){var b=this.$.cloneNode(a),f=function(d){d["data-cke-expando"]&&(d["data-cke-expando"]=false);if(d.nodeType==CKEDITOR.NODE_ELEMENT){c||d.removeAttribute("id",false);if(a)for(var d=d.childNodes,e=0;e<d.length;e++)f(d[e])}};f(b);return new CKEDITOR.dom.node(b)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$, +a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var c=[],b=this.getDocument().$.documentElement,f=this.$;f&&f!=b;){var d=f.parentNode;d&&c.unshift(this.getIndex.call({$:f},a));f=d}return c},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){var c=this.$,b=-1, +f;if(!this.$.parentNode)return b;do if(!a||!(c!=this.$&&c.nodeType==CKEDITOR.NODE_TEXT&&(f||!c.nodeValue))){b++;f=c.nodeType==CKEDITOR.NODE_TEXT}while(c=c.previousSibling);return b},getNextSourceNode:function(a,c,b){if(b&&!b.call)var f=b,b=function(a){return!a.equals(f)};var a=!a&&this.getFirst&&this.getFirst(),d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getNext()}for(;!a&&(d=(d||this).getParent());){if(b&&b(d,true)===false)return null;a=d.getNext()}return!a|| +b&&b(a)===false?null:c&&c!=a.type?a.getNextSourceNode(false,c,b):a},getPreviousSourceNode:function(a,c,b){if(b&&!b.call)var f=b,b=function(a){return!a.equals(f)};var a=!a&&this.getLast&&this.getLast(),d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getPrevious()}for(;!a&&(d=(d||this).getParent());){if(b&&b(d,true)===false)return null;a=d.getPrevious()}return!a||b&&b(a)===false?null:c&&a.type!=c?a.getPreviousSourceNode(false,c,b):a},getPrevious:function(a){var c= +this.$,b;do b=(c=c.previousSibling)&&c.nodeType!=10&&new CKEDITOR.dom.node(c);while(b&&a&&!a(b));return b},getNext:function(a){var c=this.$,b;do b=(c=c.nextSibling)&&new CKEDITOR.dom.node(c);while(b&&a&&!a(b));return b},getParent:function(a){var c=this.$.parentNode;return c&&(c.nodeType==CKEDITOR.NODE_ELEMENT||a&&c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(c):null},getParents:function(a){var c=this,b=[];do b[a?"push":"unshift"](c);while(c=c.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this; +if(a.contains&&a.contains(this))return a;var c=this.contains?this:this.getParent();do if(c.contains(a))return c;while(c=c.getParent());return null},getPosition:function(a){var c=this.$,b=a.$;if(c.compareDocumentPosition)return c.compareDocumentPosition(b);if(c==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(c.contains){if(c.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(c))return CKEDITOR.POSITION_IS_CONTAINED+ +CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in c)return c.sourceIndex<0||b.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:c.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var c=this.getAddress(),a=a.getAddress(),b=Math.min(c.length,a.length),f=0;f<=b-1;f++)if(c[f]!=a[f]){if(f<b)return c[f]<a[f]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return c.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+ +CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,c){var b=this.$,f;if(!c)b=b.parentNode;for(;b;){if(b.nodeName&&(f=b.nodeName.toLowerCase(),typeof a=="string"?f==a:f in a))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(d){b=null}}return null},hasAscendant:function(a,c){var b=this.$;if(!c)b=b.parentNode;for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return true;b=b.parentNode}return false},move:function(a,c){a.append(this.remove(),c)},remove:function(a){var c=this.$,b=c.parentNode; +if(b){if(a)for(;a=c.firstChild;)b.insertBefore(c.removeChild(a),c);b.removeChild(c)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var c=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(c){if(c.length<b){a.split(b-c.length);this.$.removeChild(this.$.firstChild)}}else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a= +this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var c=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(c){if(c.length<b){a.split(c.length);this.$.lastChild.parentNode.removeChild(this.$.lastChild)}}else{a.remove();continue}}break}if(CKEDITOR.env.needsBrFiller)(a=this.$.lastChild)&&(a.type==1&&a.nodeName.toLowerCase()=="br")&&a.parentNode.removeChild(a)},isReadOnly:function(){var a=this;this.type!=CKEDITOR.NODE_ELEMENT&&(a=this.getParent());if(a&&typeof a.$.isContentEditable!="undefined")return!(a.$.isContentEditable|| a.data("cke-editable"));for(;a;){if(a.data("cke-editable"))break;if(a.getAttribute("contentEditable")=="false")return true;if(a.getAttribute("contentEditable")=="true")break;a=a.getParent()}return!a}});CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject; -CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,d=a.compatMode=="CSS1Compat";return{width:(d?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(d?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop|| +CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,c=a.compatMode=="CSS1Compat";return{width:(c?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(c?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop|| a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}});CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject; -CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var d=new CKEDITOR.dom.element("link");d.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(d)}},appendStyleText:function(a){if(this.$.createStyleSheet){var d=this.$.createStyleSheet("");d.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return d|| -b.$.sheet},createElement:function(a,d){var b=new CKEDITOR.dom.element(a,this);if(d){d.attributes&&b.setAttributes(d.attributes);d.styles&&b.setStyles(d.styles)}return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,d){for(var b=this.$.documentElement,c= -0;b&&c<a.length;c++){var e=a[c];if(d)for(var f=-1,h=0;h<b.childNodes.length;h++){var n=b.childNodes[h];if(!(d===true&&n.nodeType==3&&n.previousSibling&&n.previousSibling.nodeType==3)){f++;if(f==e){b=n;break}}}else b=b.childNodes[e]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,d){if((!CKEDITOR.env.ie||document.documentMode>8)&&d)a=d+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a= +CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var c=new CKEDITOR.dom.element("link");c.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(c)}},appendStyleText:function(a){if(this.$.createStyleSheet){var c=this.$.createStyleSheet("");c.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return c|| +b.$.sheet},createElement:function(a,c){var b=new CKEDITOR.dom.element(a,this);if(c){c.attributes&&b.setAttributes(c.attributes);c.styles&&b.setStyles(c.styles)}return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,c){for(var b=this.$.documentElement,f= +0;b&&f<a.length;f++){var d=a[f];if(c)for(var e=-1,g=0;g<b.childNodes.length;g++){var n=b.childNodes[g];if(!(c===true&&n.nodeType==3&&n.previousSibling&&n.previousSibling.nodeType==3)){e++;if(e==d){b=n;break}}}else b=b.childNodes[d]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,c){if((!CKEDITOR.env.ie||document.documentMode>8)&&c)a=c+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a= a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+ ")();<\/script>"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");if(!a){a=this.$.createDocumentFragment();CKEDITOR.tools.enableHtml5Elements(a,true);this.setCustomData("html5ShivFrag",a)}return a}});CKEDITOR.dom.nodeList=function(a){this.$=a}; -CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){if(a<0||a>=this.$.length)return null;return(a=this.$[a])?new CKEDITOR.dom.node(a):null}};CKEDITOR.dom.element=function(a,d){typeof a=="string"&&(a=(d?d.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.element.get=function(a){return(a=typeof a=="string"?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))}; -CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(a);return b.getFirst().remove()}; -CKEDITOR.dom.element.setMarker=function(a,d,b,c){var e=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),f=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[e]=d;f[b]=1;return d.setCustomData(b,c)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)}; -CKEDITOR.dom.element.clearMarkers=function(a,d,b){var c=d.getCustomData("list_marker_names"),e=d.getCustomData("list_marker_id"),f;for(f in c)d.removeCustomData(f);d.removeCustomData("list_marker_names");if(b){d.removeCustomData("list_marker_id");delete a[e]}}; -(function(){function a(a){var b=true;if(!a.$.id){a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber();b=false}return function(){b||a.removeAttribute("id")}}function d(a,b){return"#"+a.$.id+" "+b.split(/,\s*/).join(", #"+a.$.id+" ")}function b(a){for(var b=0,d=0,n=c[a].length;d<n;d++)b=b+(parseInt(this.getComputedStyle(c[a][d])||0,10)||0);return b}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(a){var b=this.$.className;b&&(RegExp("(?:^|\\s)"+a+"(?:\\s|$)", -"").test(b)||(b=b+(" "+a)));this.$.className=b||a},removeClass:function(a){var b=this.getAttribute("class");if(b){a=RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","i");if(a.test(b))(b=b.replace(a,"").replace(/^\s+/,""))?this.setAttribute("class",b):this.removeAttribute("class")}return this},hasClass:function(a){return RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(a,b){typeof a=="string"&&(a=this.getDocument().createElement(a));b?this.$.insertBefore(a.$,this.$.firstChild): -this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var b=new CKEDITOR.dom.element("div",this.getDocument());b.setHtml(a);b.moveChildren(this)}else this.setHtml(a)},appendText:function(a){this.$.text!=void 0?this.$.text=this.$.text+a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller||CKEDITOR.env.opera){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();if(!a||!a.is|| -!a.is("br")){a=CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br");CKEDITOR.env.gecko&&a.setAttribute("type","_moz");this.append(a)}}},breakParent:function(a){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);a=b.extractContents();b.insertNode(this.remove());a.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):b!= -a.$&&b.contains(a.$)}:function(a){return!!(this.$.compareDocumentPosition(a.$)&16)},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(true));return a.innerHTML}, -getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?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(d){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(a){CKEDITOR.dom.element.prototype.setText=this.$.innerText!=void 0?function(a){return this.$.innerText=a}:function(a){return this.$.textContent=a};return this.setText(a)},getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name; -case "tabindex":a=this.$.getAttribute(a,2);a!==0&&this.$.tabIndex===0&&(a=null);return a;case "checked":a=this.$.attributes.getNamedItem(a);return(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)}, -getComputedStyle:CKEDITOR.env.ie?function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]}:function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?b.getPropertyValue(a):""},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var a=this.$.tabIndex;a===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"), -10)!==0)&&(a=-1);return a}:CKEDITOR.env.webkit?function(){var a=this.$.tabIndex;if(a==void 0){a=parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode> -8)){var b=this.$.scopeName;b!="HTML"&&(a=b.toLowerCase()+":"+a)}return(this.getName=function(){return a})()},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(typeof arguments[0]=="object")return!!arguments[0][a];for(var b=0;b<arguments.length;b++)if(arguments[b]==a)return true;return false},isEditable:function(a){var b=this.getName();if(this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[b]||CKEDITOR.dtd.$empty[b]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())return false;if(a!==false){a=CKEDITOR.dtd[b]||CKEDITOR.dtd.span; -return!(!a||!a["#"])}return true},isIdentical:function(a){var b=this.clone(0,1),a=a.clone(0,1);b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(b.$.isEqualNode){b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText);a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);return b.$.isEqualNode(a.$)}b=b.getOuterHtml();a=a.getOuterHtml(); -if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var c=this.getParent();if(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)&&this.getComputedStyle("visibility")!="hidden",b,c;if(a&&(CKEDITOR.env.webkit||CKEDITOR.env.opera)){b=this.getWindow();if(!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 false;for(var a=this.getChildren(),b=0,c=a.count();b<c;b++){var d=a.getItem(b);if(!(d.type==CKEDITOR.NODE_ELEMENT&&d.data("cke-bookmark"))&&(d.type==CKEDITOR.NODE_ELEMENT&&!d.isEmptyInlineRemoveable()||d.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(d.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var a=this.$.attributes,b=0;b< -a.length;b++){var c=a[b];switch(c.nodeName){case "class":if(this.getAttribute("class"))return true;case "data-cke-expando":continue;default:if(c.specified)return true}}return false}:function(){var a=this.$.attributes,b=a.length,c={"data-cke-expando":1,_moz_dirty:1};return b>0&&(b>2||!c[a[0].nodeName]||b==2&&!c[a[1].nodeName])},hasAttribute:function(){function a(b){b=this.$.attributes.getNamedItem(b);return!(!b||!b.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(b){return b=="name"? -!!this.$.name:a.call(this,b)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$,a=a.$;if(c!=a){var d;if(b)for(;d=c.lastChild;)a.insertBefore(c.removeChild(d),a.firstChild);else for(;d=c.firstChild;)a.appendChild(c.removeChild(d))}},mergeSiblings:function(){function a(b,e,c){if(e&&e.type==CKEDITOR.NODE_ELEMENT){for(var d=[];e.data("cke-bookmark")||e.isEmptyInlineRemoveable();){d.push(e);e=c?e.getNext():e.getPrevious();if(!e||e.type!=CKEDITOR.NODE_ELEMENT)return}if(b.isIdentical(e)){for(var k= -c?b.getLast():b.getFirst();d.length;)d.shift().move(b,!c);e.moveChildren(b,!c);e.remove();k&&k.type==CKEDITOR.NODE_ELEMENT&&k.mergeSiblings()}}}return function(b){if(b===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)? -function(b,c){b=="class"?this.$.className=c:b=="style"?this.$.style.cssText=c:b=="tabindex"?this.$.tabIndex=c:b=="checked"?this.$.checked=c:b=="contenteditable"?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if(b=="src"&&c.match(/^http:\/\//))try{a.apply(this,arguments)}catch(d){}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.ie6Compat)?function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b= -this.$.style;if(!b.removeProperty&&(a=="border"||a=="margin"||a=="padding")){var c=["top","left","right","bottom"],d;a=="border"&&(d=["color","style","width"]);for(var b=[],j=0;j<c.length;j++)if(d)for(var k=0;k<d.length;k++)b.push([a,c[j],d[k]].join("-"));else b.push([a,c[j]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}else{b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a));this.$.style.cssText||this.removeAttribute("style")}},setStyle:function(a, -b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){a=Math.round(a*100);this.setStyle("filter",a>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable", -"on");for(var a,b=this.getElementsByTag("*"),c=0,d=b.count();c<d;c++){a=b.getItem(c);a.setAttribute("unselectable","on")}}},getPositionedAncestor:function(){for(var a=this;a.getName()!="html";){if(a.getComputedStyle("position")!="static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,d=this.getDocument(),j=d.getBody(),k=d.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var l=this.$.getBoundingClientRect(),u=d.$.documentElement,s=u.clientTop|| -j.$.clientTop||0,t=u.clientLeft||j.$.clientLeft||0,g=true;if(CKEDITOR.env.ie){g=d.getDocumentElement().contains(this);d=d.getBody().contains(this);g=k&&d||!k&&g}if(g){b=l.left+(!k&&u.scrollLeft||j.$.scrollLeft);b=b-t;c=l.top+(!k&&u.scrollTop||j.$.scrollTop);c=c-s}}else{j=this;for(d=null;j&&!(j.getName()=="body"||j.getName()=="html");){b=b+(j.$.offsetLeft-j.$.scrollLeft);c=c+(j.$.offsetTop-j.$.scrollTop);if(!j.equals(this)){b=b+(j.$.clientLeft||0);c=c+(j.$.clientTop||0)}for(;d&&!d.equals(j);){b=b- -d.$.scrollLeft;c=c-d.$.scrollTop;d=d.getParent()}d=j;j=(l=j.$.offsetParent)?new CKEDITOR.dom.element(l):null}}if(a){j=this.getWindow();d=a.getWindow();if(!j.equals(d)&&j.$.frameElement){a=(new CKEDITOR.dom.element(j.$.frameElement)).getDocumentPosition(a);b=b+a.x;c=c+a.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!k){b=b+(this.$.clientLeft?1:0);c=c+(this.$.clientTop?1:0)}return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do{(b.$.clientWidth&&b.$.clientWidth< -b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1);if(b.is("html")){var c=b.getWindow();try{var d=c.$.frameElement;d&&(b=new CKEDITOR.dom.element(d))}catch(j){}}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var d,j,k,l;function u(b,c){if(/body|html/.test(a.getName()))a.getWindow().$.scrollBy(b,c);else{a.$.scrollLeft=a.$.scrollLeft+b;a.$.scrollTop=a.$.scrollTop+c}}function s(a,b){var e={x:0,y:0};if(!a.is(g?"body":"html")){var c= -a.$.getBoundingClientRect();e.x=c.left;e.y=c.top}c=a.getWindow();if(!c.equals(b)){c=s(CKEDITOR.dom.element.get(c.$.frameElement),b);e.x=e.x+c.x;e.y=e.y+c.y}return e}function t(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());k=a.getDocument();var g=k.$.compatMode=="BackCompat";a instanceof CKEDITOR.dom.window&&(a=g?k.getBody():k.getDocumentElement());k=a.getWindow();j=s(this,k);var r=s(a,k),w=this.$.offsetHeight;d=this.$.offsetWidth;var m=a.$.clientHeight,i= -a.$.clientWidth;k=j.x-t(this,"left")-r.x||0;l=j.y-t(this,"top")-r.y||0;d=j.x+d+t(this,"right")-(r.x+i)||0;j=j.y+w+t(this,"bottom")-(r.y+m)||0;if(l<0||j>0)u(0,b===true?l:b===false?j:l<0?l:j);if(c&&(k<0||d>0))u(k<0?k:d,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",true);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",true);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){for(var c=this.$.attributes,b=b||{},d=0;d<c.length;d++){var j=c[d],k=j.nodeName.toLowerCase(),l;if(!(k in b))if(k=="checked"&&(l=this.getAttribute(k)))a.setAttribute(k,l);else if(j.specified||CKEDITOR.env.ie&&j.nodeValue&&k=="value"){l=this.getAttribute(k);if(l===null)l=j.nodeValue;a.setAttribute(k,l)}}if(this.$.style.cssText!=="")a.$.style.cssText=this.$.style.cssText},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument(),a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a); -this.moveChildren(a);this.getParent()&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$}},getChild:function(){function a(b,c){var e=b.childNodes;if(c>=0&&c<e.length)return e[c]}return function(b){var c=this.$;if(b.slice)for(;b.length>0&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")|| +CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){if(a<0||a>=this.$.length)return null;return(a=this.$[a])?new CKEDITOR.dom.node(a):null}};CKEDITOR.dom.element=function(a,c){typeof a=="string"&&(a=(c?c.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.element.get=function(a){return(a=typeof a=="string"?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))}; +CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,c){var b=new CKEDITOR.dom.element("div",c);b.setHtml(a);return b.getFirst().remove()}; +CKEDITOR.dom.element.setMarker=function(a,c,b,f){var d=c.getCustomData("list_marker_id")||c.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),e=c.getCustomData("list_marker_names")||c.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[d]=c;e[b]=1;return c.setCustomData(b,f)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var c in a)CKEDITOR.dom.element.clearMarkers(a,a[c],1)}; +CKEDITOR.dom.element.clearMarkers=function(a,c,b){var f=c.getCustomData("list_marker_names"),d=c.getCustomData("list_marker_id"),e;for(e in f)c.removeCustomData(e);c.removeCustomData("list_marker_names");if(b){c.removeCustomData("list_marker_id");delete a[d]}}; +(function(){function a(a){var e=true;if(!a.$.id){a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber();e=false}return function(){e||a.removeAttribute("id")}}function c(a,e){return"#"+a.$.id+" "+e.split(/,\s*/).join(", #"+a.$.id+" ")}function b(a){for(var e=0,b=0,c=f[a].length;b<c;b++)e=e+(parseInt(this.getComputedStyle(f[a][b])||0,10)||0);return e}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(a){var e=this.$.className;e&&(RegExp("(?:^|\\s)"+a+"(?:\\s|$)", +"").test(e)||(e=e+(" "+a)));this.$.className=e||a;return this},removeClass:function(a){var e=this.getAttribute("class");if(e){a=RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","i");if(a.test(e))(e=e.replace(a,"").replace(/^\s+/,""))?this.setAttribute("class",e):this.removeAttribute("class")}return this},hasClass:function(a){return RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(a,e){typeof a=="string"&&(a=this.getDocument().createElement(a));e?this.$.insertBefore(a.$,this.$.firstChild): +this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var e=new CKEDITOR.dom.element("div",this.getDocument());e.setHtml(a);e.moveChildren(this)}else this.setHtml(a)},appendText:function(a){this.$.text!=void 0?this.$.text=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();if(!a||!a.is||!a.is("br")){a=this.getDocument().createElement("br"); +CKEDITOR.env.gecko&&a.setAttribute("type","_moz");this.append(a)}}},breakParent:function(a){var e=new CKEDITOR.dom.range(this.getDocument());e.setStartAfter(this);e.setEndAfter(a);a=e.extractContents();e.insertNode(this.remove());a.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a){var e=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?e.contains(a.getParent().$):e!=a.$&&e.contains(a.$)}:function(a){return!!(this.$.compareDocumentPosition(a.$)&16)},focus:function(){function a(){try{this.$.focus()}catch(d){}} +return function(e){e?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(true));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&& +(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(a){try{var e=this.$;if(this.getParent())return e.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(e);e.innerHTML=a;b.removeChild(e);return a}catch(c){this.$.innerHTML="";e=new CKEDITOR.dom.element("body",this.getDocument());e.$.innerHTML=a;for(e=e.getChildren();e.count();)this.append(e.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(e){this.$[a?"textContent":"innerText"]=e}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":a=this.$.getAttribute(a,2);a!==0&&this.$.tabIndex===0&&(a=null);return a;case "checked":a=this.$.attributes.getNamedItem(a); +return(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]}: +function(a){var e=this.getWindow().$.getComputedStyle(this.$,null);return e?e.getPropertyValue(a):""},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var a=this.$.tabIndex;a===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(a=-1);return a}:CKEDITOR.env.webkit?function(){var a=this.$.tabIndex;if(a==void 0){a= +parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var e=this.$.scopeName;e!="HTML"&&(a=e.toLowerCase()+":"+a)}return(this.getName= +function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var e=this.$.firstChild;(e=e&&new CKEDITOR.dom.node(e))&&(a&&!a(e))&&(e=e.getNext(a));return e},getLast:function(a){var e=this.$.lastChild;(e=e&&new CKEDITOR.dom.node(e))&&(a&&!a(e))&&(e=e.getPrevious(a));return e},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][a];for(var e=0;e<arguments.length;e++)if(arguments[e]== +a)return true;return false},isEditable:function(a){var e=this.getName();if(this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[e]||CKEDITOR.dtd.$empty[e]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())return false;if(a!==false){a=CKEDITOR.dtd[e]||CKEDITOR.dtd.span;return!(!a||!a["#"])}return true},isIdentical:function(a){var e=this.clone(0,1),a=a.clone(0,1);e.removeAttributes(["_moz_dirty", +"data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(e.$.isEqualNode){e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText);a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);return e.$.isEqualNode(a.$)}e=e.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var b=this.getParent();if(b.type==CKEDITOR.NODE_ELEMENT){b= +b.clone();b.setHtml(e);e=b.getHtml();b.setHtml(a);a=b.getHtml()}}return e==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",e,b;if(a&&CKEDITOR.env.webkit){e=this.getWindow();if(!e.equals(CKEDITOR.document.getWindow())&&(b=e.$.frameElement))a=(new CKEDITOR.dom.element(b)).isVisible()}return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return false;for(var a=this.getChildren(),e=0,b=a.count();e< +b;e++){var c=a.getItem(e);if(!(c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-bookmark"))&&(c.type==CKEDITOR.NODE_ELEMENT&&!c.isEmptyInlineRemoveable()||c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,e=0;e<a.length;e++){var b=a[e];switch(b.nodeName){case "class":if(this.getAttribute("class"))return true;case "data-cke-expando":continue;default:if(b.specified)return true}}return false}: +function(){var a=this.$.attributes,e=a.length,b={"data-cke-expando":1,_moz_dirty:1};return e>0&&(e>2||!b[a[0].nodeName]||e==2&&!b[a[1].nodeName])},hasAttribute:function(){function a(d){var b=this.$.attributes.getNamedItem(d);if(this.getName()=="input")switch(d){case "class":return this.$.className.length>0;case "checked":return!!this.$.checked;case "value":d=this.getAttribute("type");return d=="checkbox"||d=="radio"?this.$.value!="on":!!this.$.value}return!b?false:b.specified}return CKEDITOR.env.ie? +CKEDITOR.env.version<8?function(e){return e=="name"?!!this.$.name:a.call(this,e)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,e){var b=this.$,a=a.$;if(b!=a){var c;if(e)for(;c=b.lastChild;)a.insertBefore(b.removeChild(c),a.firstChild);else for(;c=b.firstChild;)a.appendChild(b.removeChild(c))}},mergeSiblings:function(){function a(d,b,c){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var f=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){f.push(b); +b=c?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(d.isIdentical(b)){for(var i=c?d.getLast():d.getFirst();f.length;)f.shift().move(d,!c);b.moveChildren(d,!c);b.remove();i&&i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings()}}}return function(e){if(e===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);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(e,b){e=="class"?this.$.className=b:e=="style"?this.$.style.cssText=b:e=="tabindex"?this.$.tabIndex=b:e=="checked"?this.$.checked=b:e=="contenteditable"?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if(b=="src"&&c.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){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;b< +a.length;b++)this.removeAttribute(a[b]);else for(b in a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(!b.removeProperty&&(a=="border"||a=="margin"||a=="padding")){var c=["top","left","right","bottom"],f;a=="border"&&(f=["color","style","width"]);for(var b=[],h=0;h<c.length;h++)if(f)for(var i=0;i<f.length;i++)b.push([a,c[h],f[i]].join("-"));else b.push([a,c[h]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}else{b.removeProperty?b.removeProperty(a): +b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a));this.$.style.cssText||this.removeAttribute("style")}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){a=Math.round(a*100);this.setStyle("filter",a>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else 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,f=b.count();c<f;c++){a=b.getItem(c);a.setAttribute("unselectable","on")}}},getPositionedAncestor:function(){for(var a=this;a.getName()!="html";){if(a.getComputedStyle("position")!="static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,f=this.getDocument(),h=f.getBody(),i=f.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var m= +this.$.getBoundingClientRect(),p=f.$.documentElement,s=p.clientTop||h.$.clientTop||0,x=p.clientLeft||h.$.clientLeft||0,q=true;if(CKEDITOR.env.ie){q=f.getDocumentElement().contains(this);f=f.getBody().contains(this);q=i&&f||!i&&q}if(q){b=m.left+(!i&&p.scrollLeft||h.$.scrollLeft);b=b-x;c=m.top+(!i&&p.scrollTop||h.$.scrollTop);c=c-s}}else{h=this;for(f=null;h&&!(h.getName()=="body"||h.getName()=="html");){b=b+(h.$.offsetLeft-h.$.scrollLeft);c=c+(h.$.offsetTop-h.$.scrollTop);if(!h.equals(this)){b=b+(h.$.clientLeft|| +0);c=c+(h.$.clientTop||0)}for(;f&&!f.equals(h);){b=b-f.$.scrollLeft;c=c-f.$.scrollTop;f=f.getParent()}f=h;h=(m=h.$.offsetParent)?new CKEDITOR.dom.element(m):null}}if(a){h=this.getWindow();f=a.getWindow();if(!h.equals(f)&&h.$.frameElement){a=(new CKEDITOR.dom.element(h.$.frameElement)).getDocumentPosition(a);b=b+a.x;c=c+a.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!i){b=b+(this.$.clientLeft?1:0);c=c+(this.$.clientTop?1:0)}return{x:b,y:c}},scrollIntoView:function(a){var b= +this.getParent();if(b){do{(b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1);if(b.is("html")){var c=b.getWindow();try{var f=c.$.frameElement;f&&(b=new CKEDITOR.dom.element(f))}catch(h){}}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var f,h,i,m;function p(b,e){if(/body|html/.test(a.getName()))a.getWindow().$.scrollBy(b,e);else{a.$.scrollLeft=a.$.scrollLeft+b;a.$.scrollTop=a.$.scrollTop+e}} +function s(a,b){var d={x:0,y:0};if(!a.is(q?"body":"html")){var e=a.$.getBoundingClientRect();d.x=e.left;d.y=e.top}e=a.getWindow();if(!e.equals(b)){e=s(CKEDITOR.dom.element.get(e.$.frameElement),b);d.x=d.x+e.x;d.y=d.y+e.y}return d}function x(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());i=a.getDocument();var q=i.$.compatMode=="BackCompat";a instanceof CKEDITOR.dom.window&&(a=q?i.getBody():i.getDocumentElement());i=a.getWindow();h=s(this,i);var o=s(a,i),u=this.$.offsetHeight; +f=this.$.offsetWidth;var A=a.$.clientHeight,k=a.$.clientWidth;i=h.x-x(this,"left")-o.x||0;m=h.y-x(this,"top")-o.y||0;f=h.x+f+x(this,"right")-(o.x+k)||0;h=h.y+u+x(this,"bottom")-(o.y+A)||0;if(m<0||h>0)p(0,b===true?m:b===false?h:m<0?m:h);if(c&&(i<0||f>0))p(i<0?i:f,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",true);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",true);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){for(var c=this.$.attributes,b=b||{},f=0;f<c.length;f++){var h=c[f],i=h.nodeName.toLowerCase(),m;if(!(i in b))if(i=="checked"&&(m=this.getAttribute(i)))a.setAttribute(i,m);else if(!CKEDITOR.env.ie||this.hasAttribute(i)){m=this.getAttribute(i);if(m===null)m=h.nodeValue;a.setAttribute(i,m)}}if(this.$.style.cssText!=="")a.$.style.cssText=this.$.style.cssText},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument(),a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a); +this.moveChildren(a);this.getParent()&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,d){var c=b.childNodes;if(d>=0&&d<c.length)return c[d]}return function(b){var c=this.$;if(b.slice)for(;b.length>0&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")|| a.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(b===void 0)return this.getAttribute(a);b===false?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(){var a=CKEDITOR.instances,b,c;for(b in a){c=a[b];if(c.element.equals(this)&&c.elementMode!= -CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null},find:function(b){var c=a(this),b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(d(this,b)));c();return b},findOne:function(b){var c=a(this),b=this.$.querySelector(d(this,b));c();return b?new CKEDITOR.dom.element(b):null},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var d=a(this);if(d!==false)for(var c=this.getChildren(),j=0;j<c.count();j++){d=c.getItem(j);d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):(!b||d.type==b)&&a(d)}}});var c={width:["border-left-width", -"border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,d){if(typeof c=="number"){if(d&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,c){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(d=d-b.call(this,a));return d}})(); +CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null},find:function(b){var e=a(this),b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c(this,b)));e();return b},findOne:function(b){var e=a(this),b=this.$.querySelector(c(this,b));e();return b?new CKEDITOR.dom.element(b):null},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var f=a(this);if(f!==false)for(var c=this.getChildren(),h=0;h<c.count();h++){f=c.getItem(h);f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):(!b||f.type==b)&&a(f)}}});var f={width:["border-left-width", +"border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,f){if(typeof c=="number"){if(f&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,c){var f=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(f=f-b.call(this,a));return f}})(); CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a}; CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}); -(function(){function a(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var g,e=c.startContainer;g=c.endContainer;var l=c.startOffset,d=c.endOffset,i,f=this.guard,o=this.type,j=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var p=g.type==CKEDITOR.NODE_ELEMENT?g:g.getParent(),h=g.type==CKEDITOR.NODE_ELEMENT?g.getChild(d):g.getNext();this._.guardLTR=function(a,b){return(!b||!p.equals(a))&&(!h|| -!a.equals(h))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var k=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),n=e.type==CKEDITOR.NODE_ELEMENT?l?e.getChild(l-1):null:e.getPrevious();this._.guardRTL=function(a,b){return(!b||!k.equals(a))&&(!n||!a.equals(n))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var C=a?this._.guardRTL:this._.guardLTR;i=f?function(a,b){return C(a,b)===false?false:f(a,b)}:C;if(this.current)g=this.current[j](false,o,i);else{if(a)g.type== -CKEDITOR.NODE_ELEMENT&&(g=d>0?g.getChild(d-1):i(g,true)===false?null:g.getPreviousSourceNode(true,o,i));else{g=e;if(g.type==CKEDITOR.NODE_ELEMENT&&!(g=g.getChild(l)))g=i(e,true)===false?null:e.getNextSourceNode(true,o,i)}g&&i(g)===false&&(g=null)}for(;g&&!this._.end;){this.current=g;if(!this.evaluator||this.evaluator(g)!==false){if(!b)return g}else if(b&&this.evaluator)return false;g=g[j](false,o,i)}this.end();return this.current=null}function d(b){for(var c,e=null;c=a.call(this,b);)e=c;return e} -function b(a){if(k(a))return false;if(a.type==CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(l))a:{b=0;for(var c=a.getChildCount();b<c;++b)if(!k(a.getChild(b))){b=false;break a}b=true}if(b)return true}return false}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)}, -previous:function(){return a.call(this,1)},checkForward:function(){return a.call(this,0,1)!==false},checkBackward:function(){return a.call(this,1,1)!==false},lastForward:function(){return d.call(this)},lastBackward:function(){return d.call(this,1)},reset:function(){delete this.current;this._={}}}});var c={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},e={absolute:1, -fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return this.getComputedStyle("float")=="none"&&!(this.getComputedStyle("position")in e)&&c[this.getComputedStyle("display")]?true:!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a))};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&& -a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(e){var l,d;l=e&&e.type!=CKEDITOR.NODE_ELEMENT&&(d=e.getParent())&&c(d);l=a?l:l||c(e);return!!(b^l)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c=1;else{c.type==CKEDITOR.NODE_TEXT&& -(c=c.getParent());c=!c.$.offsetHeight}return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!h(a)&&!n(a)}return function(c){var e=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&f.test(c.getText());if(e){e=c.getParent();c=c.getNext(b);e=e.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())}return!!(a^e)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!= -CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var f=/^[\t\r\n ]*(?: |\xa0)$/,h=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),j=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(a){return function(b){b=h(b)||n(b)||j(b);return!!(a^b)}};var k=CKEDITOR.dom.walker.ignored(),l=function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(a){return function(c){return!!(a^ -b(c))}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(n(a)||h(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&f.test(a.getText()))?a:false}})(); -CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var d=a instanceof CKEDITOR.dom.document;this.document=d?a:a.getDocument();this.root=d?a.getBody():a}; -(function(){function a(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),e=CKEDITOR.dom.walker.bogus();return function(g){if(c(g)||b(g))return true;if(e(g)&&!a)return a=true;return g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(f)?false:true}}function d(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(e){return c(e)||b(e)?true:!a&&h(e)|| -e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&k(a)&&(b=a);return j(a)&&!(h(a)&&a.equals(b))})}}var c=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},e=function(a,b,c,e){a.optimizeBookmark();var g=a.startContainer,d=a.endContainer,f=a.startOffset,m=a.endOffset,i,q;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(m); -else if(d.getChildCount()>0)if(m>=d.getChildCount()){d=d.append(a.document.createText(""));q=true}else d=d.getChild(m);if(g.type==CKEDITOR.NODE_TEXT){g.split(f);g.equals(d)&&(d=g.getNext())}else if(f)if(f>=g.getChildCount()){g=g.append(a.document.createText(""));i=true}else g=g.getChild(f).getPrevious();else{g=g.append(a.document.createText(""),1);i=true}var f=g.getParents(),m=d.getParents(),o,j,p;for(o=0;o<f.length;o++){j=f[o];p=m[o];if(!j.equals(p))break}for(var h=c,k,n,C,x=o;x<f.length;x++){k= -f[x];h&&!k.equals(g)&&(n=h.append(k.clone()));for(k=k.getNext();k;){if(k.equals(m[x])||k.equals(d))break;C=k.getNext();if(b==2)h.append(k.clone(true));else{k.remove();b==1&&h.append(k)}k=C}h&&(h=n)}h=c;for(c=o;c<m.length;c++){k=m[c];b>0&&!k.equals(d)&&(n=h.append(k.clone()));if(!f[c]||k.$.parentNode!=f[c].$.parentNode)for(k=k.getPrevious();k;){if(k.equals(f[c])||k.equals(g))break;C=k.getPrevious();if(b==2)h.$.insertBefore(k.$.cloneNode(true),h.$.firstChild);else{k.remove();b==1&&h.$.insertBefore(k.$, -h.$.firstChild)}k=C}h&&(h=n)}if(b==2){j=a.startContainer;if(j.type==CKEDITOR.NODE_TEXT){j.$.data=j.$.data+j.$.nextSibling.data;j.$.parentNode.removeChild(j.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(j&&p&&(g.$.parentNode!=j.$.parentNode||d.$.parentNode!=p.$.parentNode)){b=p.getIndex();i&&p.$.parentNode==g.$.parentNode&&b--;if(e&&j.type==CKEDITOR.NODE_ELEMENT){e=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>', -a.document);e.insertAfter(j);j.mergeSiblings(false);a.moveToBookmark({startNode:e})}else a.setStart(p.getParent(),b)}a.collapse(true)}i&&g.remove();q&&d.$.parentNode&&d.remove()},f={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},h=CKEDITOR.dom.walker.bogus(),n=/^[\t\r\n ]*(?: |\xa0)$/,j=CKEDITOR.dom.walker.editable(),k=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype= +(function(){function a(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var d,e=c.startContainer;d=c.endContainer;var f=c.startOffset,m=c.endOffset,k,l=this.guard,j=this.type,v=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var g=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),r=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(m):d.getNext();this._.guardLTR=function(a,b){return(!b||!g.equals(a))&&(!r|| +!a.equals(r))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var h=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),i=e.type==CKEDITOR.NODE_ELEMENT?f?e.getChild(f-1):null:e.getPrevious();this._.guardRTL=function(a,b){return(!b||!h.equals(a))&&(!i||!a.equals(i))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var F=a?this._.guardRTL:this._.guardLTR;k=l?function(a,b){return F(a,b)===false?false:l(a,b)}:F;if(this.current)d=this.current[v](false,j,k);else{if(a)d.type== +CKEDITOR.NODE_ELEMENT&&(d=m>0?d.getChild(m-1):k(d,true)===false?null:d.getPreviousSourceNode(true,j,k));else{d=e;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(f)))d=k(e,true)===false?null:e.getNextSourceNode(true,j,k)}d&&k(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[v](false,j,k)}this.end();return this.current=null}function c(b){for(var d,c=null;d=a.call(this,b);)c=d;return c} +function b(a){if(i(a))return false;if(a.type==CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.is("hr")||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(m))a:{b=0;for(var d=a.getChildCount();b<d;++b)if(!i(a.getChild(b))){b=false;break a}b=true}if(b)return true}return false}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1}, +next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return a.call(this,0,1)!==false},checkBackward:function(){return a.call(this,1,1)!==false},lastForward:function(){return c.call(this)},lastBackward:function(){return c.call(this,1)},reset:function(){delete this.current;this._={}}}});var f={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1, +"table-caption":1},d={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return this.getComputedStyle("float")=="none"&&!(this.getComputedStyle("position")in d)&&f[this.getComputedStyle("display")]?true:!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a))};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark= +function(a,b){function d(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(c){var e,f;e=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(f=c.getParent())&&d(f);e=a?e:e||d(c);return!!(b^e)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var d;b&&b.type==CKEDITOR.NODE_TEXT&&(d=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^d)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(d){if(b(d))d= +1;else{d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());d=!d.$.offsetHeight}return!!(a^d)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(d){return!!(b^d.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!g(a)&&!n(a)}return function(d){var c=CKEDITOR.env.needsBrFiller?d.is&&d.is("br"):d.getText&&e.test(d.getText());if(c){c=d.getParent();d=d.getNext(b);c=c.isBlockBoundary()&&(!d||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary())}return!!(a^c)}};CKEDITOR.dom.walker.temp= +function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var e=/^[\t\r\n ]*(?: |\xa0)$/,g=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),h=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(a){return function(b){b=g(b)||n(b)||h(b);return!!(a^b)}};var i=CKEDITOR.dom.walker.ignored(),m=function(a){var b={},d;for(d in a)CKEDITOR.dtd[d]["#"]&&(b[d]=1);return b}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable= +function(a){return function(d){return!!(a^b(d))}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(n(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&e.test(a.getText()))?a:false}})(); +CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var c=a instanceof CKEDITOR.dom.document;this.document=c?a:a.getDocument();this.root=c?a.getBody():a}; +(function(){function a(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(true),c=CKEDITOR.dom.walker.bogus();return function(f){if(d(f)||b(f))return true;if(c(f)&&!a)return a=true;return f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(e)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(1);return function(c){return d(c)||b(c)?true:!a&&g(c)|| +c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&i(a)&&(b=a);return h(a)&&!(g(a)&&a.equals(b))})}}var f=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},d=function(a,b,d,c){a.optimizeBookmark();var e=a.startContainer,f=a.endContainer,u=a.startOffset,g=a.endOffset,k,l;if(f.type==CKEDITOR.NODE_TEXT)f=f.split(g); +else if(f.getChildCount()>0)if(g>=f.getChildCount()){f=f.append(a.document.createText(""));l=true}else f=f.getChild(g);if(e.type==CKEDITOR.NODE_TEXT){e.split(u);e.equals(f)&&(f=e.getNext())}else if(u)if(u>=e.getChildCount()){e=e.append(a.document.createText(""));k=true}else e=e.getChild(u).getPrevious();else{e=e.append(a.document.createText(""),1);k=true}var u=e.getParents(),g=f.getParents(),j,v,h;for(j=0;j<u.length;j++){v=u[j];h=g[j];if(!v.equals(h))break}for(var r=d,i,n,F,D=j;D<u.length;D++){i= +u[D];r&&!i.equals(e)&&(n=r.append(i.clone()));for(i=i.getNext();i;){if(i.equals(g[D])||i.equals(f))break;F=i.getNext();if(b==2)r.append(i.clone(true));else{i.remove();b==1&&r.append(i)}i=F}r&&(r=n)}r=d;for(d=j;d<g.length;d++){i=g[d];b>0&&!i.equals(f)&&(n=r.append(i.clone()));if(!u[d]||i.$.parentNode!=u[d].$.parentNode)for(i=i.getPrevious();i;){if(i.equals(u[d])||i.equals(e))break;F=i.getPrevious();if(b==2)r.$.insertBefore(i.$.cloneNode(true),r.$.firstChild);else{i.remove();b==1&&r.$.insertBefore(i.$, +r.$.firstChild)}i=F}r&&(r=n)}if(b==2){v=a.startContainer;if(v.type==CKEDITOR.NODE_TEXT){v.$.data=v.$.data+v.$.nextSibling.data;v.$.parentNode.removeChild(v.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(v&&h&&(e.$.parentNode!=v.$.parentNode||f.$.parentNode!=h.$.parentNode)){b=h.getIndex();k&&h.$.parentNode==e.$.parentNode&&b--;if(c&&v.type==CKEDITOR.NODE_ELEMENT){c=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>', +a.document);c.insertAfter(v);v.mergeSiblings(false);a.moveToBookmark({startNode:c})}else a.setStart(h.getParent(),b)}a.collapse(true)}k&&e.remove();l&&f.$.parentNode&&f.remove()},e={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},g=CKEDITOR.dom.walker.bogus(),n=/^[\t\r\n ]*(?: |\xa0)$/,h=CKEDITOR.dom.walker.editable(),i=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype= {clone:function(){var a=new CKEDITOR.dom.range(this.root);a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed|| -e(this,2,a);return a},deleteContents:function(a){this.collapsed||e(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,1,b,a);return b},createBookmark:function(a){var b,c,e,g,d=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){e="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",e+(d?"C":"S"))}if(!d){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id", -e+"E");g=this.clone();g.collapse();g.insertNode(c)}g=this.clone();g.collapse(true);g.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?e+(d?"C":"S"):b,endNode:a?e+"E":c,serializable:a,collapsed:d}},createBookmark2:function(){function a(b){var c=b.container,e=b.offset,g;g=c;var d=e;g=g.type!=CKEDITOR.NODE_ELEMENT||d===0||d==g.getChildCount()?0:g.getChild(d-1).type==CKEDITOR.NODE_TEXT&&g.getChild(d).type==CKEDITOR.NODE_TEXT; -if(g){c=c.getChild(e-1);e=c.getLength()}c.type==CKEDITOR.NODE_ELEMENT&&e>1&&(e=c.getChild(e-1).getIndex(true)+1);if(c.type==CKEDITOR.NODE_TEXT){g=c;for(d=0;(g=g.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;)d=d+g.getLength();e=e+d}b.container=c;b.offset=e}return function(b){var c=this.collapsed,e={container:this.startContainer,offset:this.startOffset},g={container:this.endContainer,offset:this.endOffset};if(b){a(e);c||a(g)}return{start:e.container.getAddress(b),end:c?null:g.container.getAddress(b), -startOffset:e.offset,endOffset:g.offset,normalized:b,collapsed:c,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,e=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);e?this.setEnd(e,a):this.collapse(true)}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();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}}, -getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,e=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT){g=a.getChildCount();if(g>c)a=a.getChild(c);else if(g<1)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){g=b.getChildCount();if(g>e)b=b.getChild(e).getPreviousSourceNode(true);else if(g<1)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,e=this.endContainer,c=c.equals(e)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(e);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,e=this.startOffset,g=this.collapsed; -if((!a||g)&&c&&c.type==CKEDITOR.NODE_TEXT){if(e)if(e>=c.getLength()){e=c.getIndex()+1;c=c.getParent()}else{var d=c.split(e),e=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(d,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{e=c.getIndex();c=c.getParent()}this.setStart(c,e);if(g){this.collapse(true);return}}c=this.endContainer;e=this.endOffset;if(!b&&!g&&c&&c.type==CKEDITOR.NODE_TEXT){if(e){e>=c.getLength()|| -c.split(e);e=c.getIndex()+1}else e=c.getIndex();c=c.getParent();this.setEnd(c,e)}},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var g=this.getCommonAncestor(),d=this.root,f,m,i,q,o,j=false,p,k;p=this.startContainer;k=this.startOffset;if(p.type==CKEDITOR.NODE_TEXT){if(k){p=!CKEDITOR.tools.trim(p.substring(0,k)).length&&p;j=!!p}if(p&& -!(q=p.getPrevious()))i=p.getParent()}else{k&&(q=p.getChild(k-1)||p.getLast());q||(i=p)}for(i=c(i);i||q;){if(i&&!q){!o&&i.equals(g)&&(o=true);if(e?i.isBlockBoundary():!d.contains(i))break;if(!j||i.getComputedStyle("display")!="inline"){j=false;o?f=i:this.setStartBefore(i)}q=i.getPrevious()}for(;q;){p=false;if(q.type==CKEDITOR.NODE_COMMENT)q=q.getPrevious();else{if(q.type==CKEDITOR.NODE_TEXT){k=q.getText();/[^\s\ufeff]/.test(k)&&(q=null);p=/[\s\ufeff]$/.test(k)}else if((q.$.offsetWidth>0||b&&q.is("br"))&& -!q.data("cke-bookmark"))if(j&&CKEDITOR.dtd.$removeEmpty[q.getName()]){k=q.getText();if(/[^\s\ufeff]/.test(k))q=null;else for(var h=q.$.getElementsByTagName("*"),n=0,C;C=h[n++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){q=null;break}q&&(p=!!k.length)}else q=null;p&&(j?o?f=i:i&&this.setStartBefore(i):j=true);if(q){p=q.getPrevious();if(!i&&!p){i=q;q=null;break}q=p}else i=null}}i&&(i=c(i.getParent()))}p=this.endContainer;k=this.endOffset;i=q=null;o=j=false;if(p.type==CKEDITOR.NODE_TEXT){p= -!CKEDITOR.tools.trim(p.substring(k)).length&&p;j=!(p&&p.getLength());if(p&&!(q=p.getNext()))i=p.getParent()}else(q=p.getChild(k))||(i=p);for(;i||q;){if(i&&!q){!o&&i.equals(g)&&(o=true);if(e?i.isBlockBoundary():!d.contains(i))break;if(!j||i.getComputedStyle("display")!="inline"){j=false;o?m=i:i&&this.setEndAfter(i)}q=i.getNext()}for(;q;){p=false;if(q.type==CKEDITOR.NODE_TEXT){k=q.getText();/[^\s\ufeff]/.test(k)&&(q=null);p=/^[\s\ufeff]/.test(k)}else if(q.type==CKEDITOR.NODE_ELEMENT){if((q.$.offsetWidth> -0||b&&q.is("br"))&&!q.data("cke-bookmark"))if(j&&CKEDITOR.dtd.$removeEmpty[q.getName()]){k=q.getText();if(/[^\s\ufeff]/.test(k))q=null;else{h=q.$.getElementsByTagName("*");for(n=0;C=h[n++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){q=null;break}}q&&(p=!!k.length)}else q=null}else p=1;p&&j&&(o?m=i:this.setEndAfter(i));if(q){p=q.getNext();if(!i&&!p){i=q;q=null;break}q=p}else i=null}i&&(i=c(i.getParent()))}if(f&&m){g=f.contains(m)?m:f;this.setStartBefore(g);this.setEndAfter(g)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:i= -new CKEDITOR.dom.range(this.root);d=this.root;i.setStartAt(d,CKEDITOR.POSITION_AFTER_START);i.setEnd(this.startContainer,this.startOffset);i=new CKEDITOR.dom.walker(i);var x,M,y=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),v=null,D=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(v){if(v.equals(a)){v=null;return}}else v=a;else if(v)return;var b=y(a);b||(x=a);return b},e=function(a){var b=D(a);!b&&(a.is&&a.is("br"))&& -(M=a);return b};i.guard=D;i=i.lastBackward();x=x||d;this.setStartAt(x,!x.is("br")&&(!i&&this.checkStartOfBlock()||i&&x.contains(i))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){i=this.clone();i=new CKEDITOR.dom.walker(i);var F=CKEDITOR.dom.walker.whitespaces(),z=CKEDITOR.dom.walker.bookmark();i.evaluator=function(a){return!F(a)&&!z(a)};if((i=i.previous())&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("br"))break}i=this.clone();i.collapse();i.setEndAt(d, -CKEDITOR.POSITION_BEFORE_END);i=new CKEDITOR.dom.walker(i);i.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:D;x=null;i=i.lastForward();x=x||d;this.setEndAt(x,!i&&this.checkEndOfBlock()||i&&x.contains(i)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);M&&this.setEndAfter(M)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,e=this.clone(),g=this.startContainer,d=this.endContainer,f=this.startOffset,m=this.endOffset,i=1,q=1;if(g&&g.type==CKEDITOR.NODE_TEXT)if(f)if(f>= -g.getLength())e.setStartAfter(g);else{e.setStartBefore(g);i=0}else e.setStartBefore(g);if(d&&d.type==CKEDITOR.NODE_TEXT)if(m)if(m>=d.getLength())e.setEndAfter(d);else{e.setEndAfter(d);q=0}else e.setEndBefore(d);var e=new CKEDITOR.dom.walker(e),o=CKEDITOR.dom.walker.bookmark();e.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var k;e.guard=function(b,e){if(o(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||e&&b.equals(k)|| -c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!e&&b.type==CKEDITOR.NODE_ELEMENT&&(k=b);return true};if(i)(g=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(q){e.reset();(e=e[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(e,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!i&& -!q)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);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(true)},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){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}c(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=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 c= -this.createBookmark(),e=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(e);e.trim();e.appendBogus();this.insertNode(e);this.moveToBookmark(c);return e},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=b.block,d=c.block,f=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!e){e=this.fixBlock(true,a);d= -(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}d||(d=this.fixBlock(false,a))}a=e&&this.checkStartOfBlock();b=d&&this.checkEndOfBlock();this.deleteContents();if(e&&e.equals(d))if(b){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(d,CKEDITOR.POSITION_AFTER_END);d=null}else if(a){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e=null}else{d=this.splitElement(e);e.is("ul","ol")||e.appendBogus()}return{previousBlock:e, -nextBlock:d,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:f}},splitElement:function(a){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(e){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||e.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(), -c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(),e=this[b?"endPath":"startPath"](),d=e.block||e.blockLimit,f;d&&!d.equals(e.root)&&!d.getFirst(a(d));){f=d.getParent();this[b?"setEndAt":"setStartAt"](d,CKEDITOR.POSITION_AFTER_END);d.remove(1);d=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(a, -b){var c=b==CKEDITOR.START,e=this.clone();e.collapse(c);e[c?"setStartAt":"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=d(c);return e[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var b=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.ltrim(b.substring(0,c));n.test(b)&&this.trim(0,1)}this.trim();b=new CKEDITOR.dom.elementPath(this.startContainer,this.root); -c=this.clone();c.collapse(true);c.setStartAt(b.block||b.blockLimit,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkBackward()},checkEndOfBlock:function(){var b=this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.rtrim(b.substring(c));n.test(b)&&this.trim(1,0)}this.trim();b=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(b.block||b.blockLimit,CKEDITOR.POSITION_BEFORE_END); -b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkForward()},getPreviousNode:function(a,b,c){var e=this.clone();e.collapse(1);e.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var e=this.clone();e.collapse();e.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type== -CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")=="false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(false)){this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var c= -0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&n.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable()){this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);c=1}else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); -else if(a.getAttribute("contenteditable")=="false"&&a.is(CKEDITOR.dtd.$block)){this.setStartBefore(a);this.setEndAfter(a);return true}var e=a,d=c,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(false)&&(f=e[b?"getLast":"getFirst"](k));!d&&!f&&(f=e[b?"getPrevious":"getNext"](k));a=f}return!!c},moveToClosestEditablePosition:function(a,b){var c=new CKEDITOR.dom.range(this.root),e=0,d,f=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];c.moveToPosition(a,f[b?0:1]);if(a.is(CKEDITOR.dtd.$block)){if(d= -c[b?"getNextEditableNode":"getPreviousEditableNode"]()){e=1;if(d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$block)&&d.getAttribute("contenteditable")=="false"){c.setStartAt(d,CKEDITOR.POSITION_BEFORE_START);c.setEndAt(d,CKEDITOR.POSITION_AFTER_END)}else c.moveToPosition(d,f[b?1:0])}}else e=1;e&&this.moveToRange(c);return!!e},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},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(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(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:b(),getPreviousEditableNode:b(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("<span> </span>",this.document),b,c,e,d=this.clone();d.optimize();if(e=d.startContainer.type==CKEDITOR.NODE_TEXT){c=d.startContainer.getText();b=d.startContainer.split(d.startOffset);a.insertAfter(d.startContainer)}else d.insertNode(a);a.scrollIntoView();if(e){d.startContainer.setText(c); +d(this,2,a);return a},deleteContents:function(a){this.collapsed||d(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,b,a);return b},createBookmark:function(a){var b,d,c,e,f=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){c="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",c+(f?"C":"S"))}if(!f){d=b.clone();d.setHtml(" ");a&&d.setAttribute("id", +c+"E");e=this.clone();e.collapse();e.insertNode(d)}e=this.clone();e.collapse(true);e.insertNode(b);if(d){this.setStartAfter(b);this.setEndBefore(d)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(f?"C":"S"):b,endNode:a?c+"E":d,serializable:a,collapsed:f}},createBookmark2:function(){function a(b){var d=b.container,c=b.offset,e;e=d;var f=c;e=e.type!=CKEDITOR.NODE_ELEMENT||f===0||f==e.getChildCount()?0:e.getChild(f-1).type==CKEDITOR.NODE_TEXT&&e.getChild(f).type==CKEDITOR.NODE_TEXT; +if(e){d=d.getChild(c-1);c=d.getLength()}d.type==CKEDITOR.NODE_ELEMENT&&c>1&&(c=d.getChild(c-1).getIndex(true)+1);if(d.type==CKEDITOR.NODE_TEXT){e=d;for(f=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)f=f+e.getLength();c=c+f}b.container=d;b.offset=c}return function(b){var d=this.collapsed,c={container:this.startContainer,offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};if(b){a(c);d||a(e)}return{start:c.container.getAddress(b),end:d?null:e.container.getAddress(b), +startOffset:c.offset,endOffset:e.offset,normalized:b,collapsed:d,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,c=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,d);c?this.setEnd(c,a):this.collapse(true)}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();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}}, +getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,d=this.startOffset,c=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT){e=a.getChildCount();if(e>d)a=a.getChild(d);else if(e<1)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){e=b.getChildCount();if(e>c)b=b.getChild(c).getPreviousSourceNode(true);else if(e<1)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,c=this.endContainer,d=d.equals(c)?a&&d.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(c);return b&&!d.is?d.getParent():d},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a): +this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var d=this.startContainer,c=this.startOffset,e=this.collapsed; +if((!a||e)&&d&&d.type==CKEDITOR.NODE_TEXT){if(c)if(c>=d.getLength()){c=d.getIndex()+1;d=d.getParent()}else{var f=d.split(c),c=d.getIndex()+1,d=d.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(f,this.endOffset-this.startOffset);else if(d.equals(this.endContainer))this.endOffset=this.endOffset+1}else{c=d.getIndex();d=d.getParent()}this.setStart(d,c);if(e){this.collapse(true);return}}d=this.endContainer;c=this.endOffset;if(!b&&!e&&d&&d.type==CKEDITOR.NODE_TEXT){if(c){c>=d.getLength()|| +d.split(c);c=d.getIndex()+1}else c=d.getIndex();d=d.getParent();this.setEnd(d,c)}},enlarge:function(a,b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var c=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var f=this.getCommonAncestor(),u=this.root,i,k,l,j,v,g=false,r,h;r=this.startContainer;var n=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(n){r=!CKEDITOR.tools.trim(r.substring(0, +n)).length&&r;g=!!r}if(r&&!(j=r.getPrevious()))l=r.getParent()}else{n&&(j=r.getChild(n-1)||r.getLast());j||(l=r)}for(l=d(l);l||j;){if(l&&!j){!v&&l.equals(f)&&(v=true);if(e?l.isBlockBoundary():!u.contains(l))break;if(!g||l.getComputedStyle("display")!="inline"){g=false;v?i=l:this.setStartBefore(l)}j=l.getPrevious()}for(;j;){r=false;if(j.type==CKEDITOR.NODE_COMMENT)j=j.getPrevious();else{if(j.type==CKEDITOR.NODE_TEXT){h=j.getText();c.test(h)&&(j=null);r=/[\s\ufeff]$/.test(h)}else if((j.$.offsetWidth> +0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(g&&CKEDITOR.dtd.$removeEmpty[j.getName()]){h=j.getText();if(c.test(h))j=null;else for(var n=j.$.getElementsByTagName("*"),F=0,D;D=n[F++];)if(!CKEDITOR.dtd.$removeEmpty[D.nodeName.toLowerCase()]){j=null;break}j&&(r=!!h.length)}else j=null;r&&(g?v?i=l:l&&this.setStartBefore(l):g=true);if(j){r=j.getPrevious();if(!l&&!r){l=j;j=null;break}j=r}else l=null}}l&&(l=d(l.getParent()))}r=this.endContainer;n=this.endOffset;l=j=null;v=g=false;var L=function(a,b){var d= +new CKEDITOR.dom.range(u);d.setStart(a,b);d.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);var d=new CKEDITOR.dom.walker(d),e;for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=d.next();){if(e.type!=CKEDITOR.NODE_TEXT)return false;h=e!=a?e.getText():e.substring(b);if(c.test(h))return false}return true};if(r.type==CKEDITOR.NODE_TEXT)if(CKEDITOR.tools.trim(r.substring(n)).length)g=true;else{g=!r.getLength();if(n==r.getLength()){if(!(j=r.getNext()))l=r.getParent()}else L(r, +n)&&(l=r.getParent())}else(j=r.getChild(n))||(l=r);for(;l||j;){if(l&&!j){!v&&l.equals(f)&&(v=true);if(e?l.isBlockBoundary():!u.contains(l))break;if(!g||l.getComputedStyle("display")!="inline"){g=false;v?k=l:l&&this.setEndAfter(l)}j=l.getNext()}for(;j;){r=false;if(j.type==CKEDITOR.NODE_TEXT){h=j.getText();L(j,0)||(j=null);r=/^[\s\ufeff]/.test(h)}else if(j.type==CKEDITOR.NODE_ELEMENT){if((j.$.offsetWidth>0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(g&&CKEDITOR.dtd.$removeEmpty[j.getName()]){h=j.getText(); +if(c.test(h))j=null;else{n=j.$.getElementsByTagName("*");for(F=0;D=n[F++];)if(!CKEDITOR.dtd.$removeEmpty[D.nodeName.toLowerCase()]){j=null;break}}j&&(r=!!h.length)}else j=null}else r=1;r&&g&&(v?k=l:this.setEndAfter(l));if(j){r=j.getNext();if(!l&&!r){l=j;j=null;break}j=r}else l=null}l&&(l=d(l.getParent()))}if(i&&k){f=i.contains(k)?k:i;this.setStartBefore(f);this.setEndAfter(f)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:l=new CKEDITOR.dom.range(this.root);u= +this.root;l.setStartAt(u,CKEDITOR.POSITION_AFTER_START);l.setEnd(this.startContainer,this.startOffset);l=new CKEDITOR.dom.walker(l);var J,w,z=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),t=null,E=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(t){if(t.equals(a)){t=null;return}}else t=a;else if(t)return;var b=z(a);b||(J=a);return b},e=function(a){var b=E(a);!b&&(a.is&&a.is("br"))&&(w=a);return b};l.guard=E;l=l.lastBackward(); +J=J||u;this.setStartAt(J,!J.is("br")&&(!l&&this.checkStartOfBlock()||l&&J.contains(l))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone();l=new CKEDITOR.dom.walker(l);var y=CKEDITOR.dom.walker.whitespaces(),C=CKEDITOR.dom.walker.bookmark();l.evaluator=function(a){return!y(a)&&!C(a)};if((l=l.previous())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}l=this.clone();l.collapse();l.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);l=new CKEDITOR.dom.walker(l); +l.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:E;J=t=w=null;l=l.lastForward();J=J||u;this.setEndAt(J,!l&&this.checkEndOfBlock()||l&&J.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);w&&this.setEndAfter(w)}},shrink:function(a,b,d){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,c=this.clone(),e=this.startContainer,f=this.endContainer,u=this.startOffset,g=this.endOffset,k=1,l=1;if(e&&e.type==CKEDITOR.NODE_TEXT)if(u)if(u>=e.getLength())c.setStartAfter(e);else{c.setStartBefore(e); +k=0}else c.setStartBefore(e);if(f&&f.type==CKEDITOR.NODE_TEXT)if(g)if(g>=f.getLength())c.setEndAfter(f);else{c.setEndAfter(f);l=0}else c.setEndBefore(f);var c=new CKEDITOR.dom.walker(c),j=CKEDITOR.dom.walker.bookmark();c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var v;c.guard=function(b,c){if(j(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(v)||d===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()|| +b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!c&&b.type==CKEDITOR.NODE_ELEMENT&&(v=b);return true};if(k)(e=c[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(l){c.reset();(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!k&&!l)}},insertNode:function(a){this.optimizeBookmark();this.trim(false, +true);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(true)},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){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}f(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}f(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+ +1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,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)}f(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)}f(this)},fixBlock:function(a,b){var d=this.createBookmark(),c=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(c); +c.trim();c.appendBogus();this.insertNode(c);this.moveToBookmark(d);return c},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),c=b.block,e=d.block,f=null;if(!b.blockLimit.equals(d.blockLimit))return null;if(a!="br"){if(!c){c=this.fixBlock(true,a);e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}e||(e=this.fixBlock(false,a))}a=c&&this.checkStartOfBlock();b=e&&this.checkEndOfBlock(); +this.deleteContents();if(c&&c.equals(e))if(b){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);e=null}else if(a){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c=null}else{e=this.splitElement(c);c.is("ul","ol")||c.appendBogus()}return{previousBlock:c,nextBlock:e,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:f}},splitElement:function(a){if(!this.collapsed)return null; +this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),d=a.clone(false);b.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(c){return function(a){return b(a)||(d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||c.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var d=this.createBookmark(), +c=this[b?"endPath":"startPath"](),e=c.block||c.blockLimit,f;e&&!e.equals(c.root)&&!e.getFirst(a(e));){f=e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=f}this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt": +"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var b=this.startContainer,d=this.startOffset;if(CKEDITOR.env.ie&&d&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.ltrim(b.substring(0,d));n.test(b)&&this.trim(0,1)}this.trim();b=new CKEDITOR.dom.elementPath(this.startContainer,this.root);d=this.clone();d.collapse(true);d.setStartAt(b.block||b.blockLimit, +CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(d);b.evaluator=a();return b.checkBackward()},checkEndOfBlock:function(){var b=this.endContainer,d=this.endOffset;if(CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.rtrim(b.substring(d));n.test(b)&&this.trim(1,0)}this.trim();b=new CKEDITOR.dom.elementPath(this.endContainer,this.root);d=this.clone();d.collapse(false);d.setEndAt(b.block||b.blockLimit,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(d);b.evaluator=a();return b.checkForward()}, +getPreviousNode:function(a,b,d){var c=this.clone();c.collapse(1);c.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var c=this.clone();c.collapse();c.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(b,d){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")== +"false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(d)||b.equals(d)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(false)){this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var d=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&& +this.checkEndOfBlock()&&n.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(a.getAttribute("contenteditable")=="false"&& +a.is(CKEDITOR.dtd.$block)){this.setStartBefore(a);this.setEndAfter(a);return true}var c=a,e=d,f=void 0;c.type==CKEDITOR.NODE_ELEMENT&&c.isEditable(false)&&(f=c[b?"getLast":"getFirst"](i));!e&&!f&&(f=c[b?"getPrevious":"getNext"](i));a=f}return!!d},moveToClosestEditablePosition:function(a,b){var d=new CKEDITOR.dom.range(this.root),c=0,e,f=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];d.moveToPosition(a,f[b?0:1]);if(a.is(CKEDITOR.dtd.$block)){if(e=d[b?"getNextEditableNode":"getPreviousEditableNode"]()){c= +1;if(e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)&&e.getAttribute("contenteditable")=="false"){d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START);d.setEndAt(e,CKEDITOR.POSITION_AFTER_END)}else d.moveToPosition(e,f[b?1:0])}}else c=1;c&&this.moveToRange(d);return!!c},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},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(false,true),d=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return d(a)&&b(a)};var c=a.next();a.reset();return c&&c.equals(a.previous())?c:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer; +return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:b(),getPreviousEditableNode:b(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("<span> </span>",this.document),b,d,c,e=this.clone();e.optimize();if(c=e.startContainer.type==CKEDITOR.NODE_TEXT){d=e.startContainer.getText();b=e.startContainer.split(e.startOffset);a.insertAfter(e.startContainer)}else e.insertNode(a);a.scrollIntoView();if(c){e.startContainer.setText(d); b.remove()}a.remove()}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict"; -(function(){function a(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function d(a,b,c){for(a=a.getNextSourceNode(b,null,c);!f(a);)a=a.getNextSourceNode(b,null,c);return a}function b(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function c(a,e,d,f){a:{f==void 0&&(f=b(d));for(var h;h=f.shift();)if(h.getDtd().p){f={element:h,remaining:f}; -break a}f=null}if(!f)return 0;if((h=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!h.check(e))return c(a,e,d,f.remaining);e=new CKEDITOR.dom.range(f.element);e.selectNodeContents(f.element);e=e.createIterator();e.enlargeBr=a.enlargeBr;e.enforceRealBlocks=a.enforceRealBlocks;e.activeFilter=e.filter=h;a._.nestedEditable={element:f.element,container:d,remaining:f.remaining,iterator:e};return 1}var e=/^[\r\n\t ]+$/,f=CKEDITOR.dom.walker.bookmark(false,true),h=CKEDITOR.dom.walker.whitespaces(true), -n=function(a){return f(a)&&h(a)};a.prototype={getNextParagraph:function(a){var b,h,u,s,t,a=a||"p";if(this._.nestedEditable){if(b=this._.nestedEditable.iterator.getNextParagraph(a)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return b}this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(a)}this._.nestedEditable= -null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var g=this.range.clone();g.shrink(CKEDITOR.SHRINK_ELEMENT,true);h=g.endContainer.hasAscendant("pre",true)||g.startContainer.hasAscendant("pre",true);g.enlarge(this.forceBrBreak&&!h||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!g.collapsed){h=new CKEDITOR.dom.walker(g.clone());var r=CKEDITOR.dom.walker.bookmark(true,true);h.evaluator=r;this._.nextNode=h.next();h=new CKEDITOR.dom.walker(g.clone()); -h.evaluator=r;h=h.previous();this._.lastNode=h.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){r=this.range.clone();r.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(r.checkEndOfBlock()){r=new CKEDITOR.dom.elementPath(r.endContainer,r.root);this._.lastNode=(r.block||r.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!g.root.contains(this._.lastNode)){this._.lastNode= -this._.docEndMarker=g.document.createText("");this._.lastNode.insertAfter(h)}g=null}this._.started=1;h=g}r=this._.nextNode;g=this._.lastNode;for(this._.nextNode=null;r;){var w=0,m=r.hasAscendant("pre"),i=r.type!=CKEDITOR.NODE_ELEMENT,q=0;if(i)r.type==CKEDITOR.NODE_TEXT&&e.test(r.getText())&&(i=0);else{var o=r.getName();if(CKEDITOR.dtd.$block[o]&&r.getAttribute("contenteditable")=="false"){b=r;c(this,a,b);break}else if(r.isBlockBoundary(this.forceBrBreak&&!m&&{br:1})){if(o=="br")i=1;else if(!h&&!r.getChildCount()&& -o!="hr"){b=r;u=r.equals(g);break}if(h){h.setEndAt(r,CKEDITOR.POSITION_BEFORE_START);if(o!="br")this._.nextNode=r}w=1}else{if(r.getFirst()){if(!h){h=this.range.clone();h.setStartAt(r,CKEDITOR.POSITION_BEFORE_START)}r=r.getFirst();continue}i=1}}if(i&&!h){h=this.range.clone();h.setStartAt(r,CKEDITOR.POSITION_BEFORE_START)}u=(!w||i)&&r.equals(g);if(h&&!w)for(;!r.getNext(n)&&!u;){o=r.getParent();if(o.isBlockBoundary(this.forceBrBreak&&!m&&{br:1})){w=1;i=0;u||o.equals(g);h.setEndAt(o,CKEDITOR.POSITION_BEFORE_END); -break}r=o;i=1;u=r.equals(g);q=1}i&&h.setEndAt(r,CKEDITOR.POSITION_AFTER_END);r=d(r,q,g);if((u=!r)||w&&h)break}if(!b){if(!h){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}b=new CKEDITOR.dom.elementPath(h.startContainer,h.root);r=b.blockLimit;w={div:1,th:1,td:1};b=b.block;if(!b&&r&&!this.enforceRealBlocks&&w[r.getName()]&&h.checkStartOfBlock()&&h.checkEndOfBlock()&&!r.equals(h.root))b=r;else if(!b||this.enforceRealBlocks&&b.getName()=="li"){b=this.range.document.createElement(a); -h.extractContents().appendTo(b);b.trim();h.insertNode(b);s=t=true}else if(b.getName()!="li"){if(!h.checkStartOfBlock()||!h.checkEndOfBlock()){b=b.clone(false);h.extractContents().appendTo(b);b.trim();t=h.splitBlock();s=!t.wasStartOfBlock;t=!t.wasEndOfBlock;h.insertNode(b)}}else if(!u)this._.nextNode=b.equals(g)?null:d(h.getBoundaryNodes().endNode,1,g)}if(s)(s=b.getPrevious())&&s.type==CKEDITOR.NODE_ELEMENT&&(s.getName()=="br"?s.remove():s.getLast()&&s.getLast().$.nodeName.toLowerCase()=="br"&&s.getLast().remove()); -if(t)(s=b.getLast())&&s.type==CKEDITOR.NODE_ELEMENT&&s.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||s.getPrevious(f)||s.getNext(f))&&s.remove();if(!this._.nextNode)this._.nextNode=u||b.equals(g)||!g?null:d(b,1,g);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); -CKEDITOR.command=function(a,d){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&a.focus();return this.fire("exec")===false?true:d.exec.call(this,a,b)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&& -this.disable();return this.fire("refresh",{editor:a,path:b})===false?true:d.refresh&&d.refresh.apply(this,arguments)!==false};var b;this.checkAllowed=function(c){return!c&&typeof b=="boolean"?b:b=a.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)}; +(function(){function a(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function c(a,b,d){for(a=a.getNextSourceNode(b,null,d);!e(a);)a=a.getNextSourceNode(b,null,d);return a}function b(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function f(a,d,c,e){a:{e==void 0&&(e=b(c));for(var g;g=e.shift();)if(g.getDtd().p){e={element:g,remaining:e}; +break a}e=null}if(!e)return 0;if((g=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!g.check(d))return f(a,d,c,e.remaining);d=new CKEDITOR.dom.range(e.element);d.selectNodeContents(e.element);d=d.createIterator();d.enlargeBr=a.enlargeBr;d.enforceRealBlocks=a.enforceRealBlocks;d.activeFilter=d.filter=g;a._.nestedEditable={element:e.element,container:c,remaining:e.remaining,iterator:d};return 1}var d=/^[\r\n\t ]+$/,e=CKEDITOR.dom.walker.bookmark(false,true),g=CKEDITOR.dom.walker.whitespaces(true), +n=function(a){return e(a)&&g(a)};a.prototype={getNextParagraph:function(a){var b,g,p,s,x,a=a||"p";if(this._.nestedEditable){if(b=this._.nestedEditable.iterator.getNextParagraph(a)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return b}this.activeFilter=this.filter;if(f(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(a)}this._.nestedEditable= +null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var q=this.range.clone();q.shrink(CKEDITOR.SHRINK_ELEMENT,true);g=q.endContainer.hasAscendant("pre",true)||q.startContainer.hasAscendant("pre",true);q.enlarge(this.forceBrBreak&&!g||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!q.collapsed){g=new CKEDITOR.dom.walker(q.clone());var o=CKEDITOR.dom.walker.bookmark(true,true);g.evaluator=o;this._.nextNode=g.next();g=new CKEDITOR.dom.walker(q.clone()); +g.evaluator=o;g=g.previous();this._.lastNode=g.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){o=this.range.clone();o.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(o.checkEndOfBlock()){o=new CKEDITOR.dom.elementPath(o.endContainer,o.root);this._.lastNode=(o.block||o.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!q.root.contains(this._.lastNode)){this._.lastNode= +this._.docEndMarker=q.document.createText("");this._.lastNode.insertAfter(g)}q=null}this._.started=1;g=q}o=this._.nextNode;q=this._.lastNode;for(this._.nextNode=null;o;){var u=0,A=o.hasAscendant("pre"),k=o.type!=CKEDITOR.NODE_ELEMENT,l=0;if(k)o.type==CKEDITOR.NODE_TEXT&&d.test(o.getText())&&(k=0);else{var j=o.getName();if(CKEDITOR.dtd.$block[j]&&o.getAttribute("contenteditable")=="false"){b=o;f(this,a,b);break}else if(o.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){if(j=="br")k=1;else if(!g&&!o.getChildCount()&& +j!="hr"){b=o;p=o.equals(q);break}if(g){g.setEndAt(o,CKEDITOR.POSITION_BEFORE_START);if(j!="br")this._.nextNode=o}u=1}else{if(o.getFirst()){if(!g){g=this.range.clone();g.setStartAt(o,CKEDITOR.POSITION_BEFORE_START)}o=o.getFirst();continue}k=1}}if(k&&!g){g=this.range.clone();g.setStartAt(o,CKEDITOR.POSITION_BEFORE_START)}p=(!u||k)&&o.equals(q);if(g&&!u)for(;!o.getNext(n)&&!p;){j=o.getParent();if(j.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){u=1;k=0;p||j.equals(q);g.setEndAt(j,CKEDITOR.POSITION_BEFORE_END); +break}o=j;k=1;p=o.equals(q);l=1}k&&g.setEndAt(o,CKEDITOR.POSITION_AFTER_END);o=c(o,l,q);if((p=!o)||u&&g)break}if(!b){if(!g){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}b=new CKEDITOR.dom.elementPath(g.startContainer,g.root);o=b.blockLimit;u={div:1,th:1,td:1};b=b.block;if(!b&&o&&!this.enforceRealBlocks&&u[o.getName()]&&g.checkStartOfBlock()&&g.checkEndOfBlock()&&!o.equals(g.root))b=o;else if(!b||this.enforceRealBlocks&&b.getName()=="li"){b=this.range.document.createElement(a); +g.extractContents().appendTo(b);b.trim();g.insertNode(b);s=x=true}else if(b.getName()!="li"){if(!g.checkStartOfBlock()||!g.checkEndOfBlock()){b=b.clone(false);g.extractContents().appendTo(b);b.trim();x=g.splitBlock();s=!x.wasStartOfBlock;x=!x.wasEndOfBlock;g.insertNode(b)}}else if(!p)this._.nextNode=b.equals(q)?null:c(g.getBoundaryNodes().endNode,1,q)}if(s)(s=b.getPrevious())&&s.type==CKEDITOR.NODE_ELEMENT&&(s.getName()=="br"?s.remove():s.getLast()&&s.getLast().$.nodeName.toLowerCase()=="br"&&s.getLast().remove()); +if(x)(s=b.getLast())&&s.type==CKEDITOR.NODE_ELEMENT&&s.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||s.getPrevious(e)||s.getNext(e))&&s.remove();if(!this._.nextNode)this._.nextNode=p||b.equals(q)||!q?null:c(b,1,q);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); +CKEDITOR.command=function(a,c){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&a.focus();return this.fire("exec")===false?true:c.exec.call(this,a,b)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&& +this.disable();return this.fire("refresh",{editor:a,path:b})===false?true:c.refresh&&c.refresh.apply(this,arguments)!==false};var b;this.checkAllowed=function(c){return!c&&typeof b=="boolean"?b:b=a.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,c,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!c.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||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return false;this.previousState=this.state;this.state=a;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF? this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3; CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]}; -(function(){function a(a,b,c,g,i){var f=b.name;if((g||typeof a.elements!="function"||a.elements(f))&&(!a.match||a.match(b))){if(g=!i){a:if(a.nothingRequired)g=true;else{if(i=a.requiredClasses){f=b.classes;for(g=0;g<i.length;++g)if(CKEDITOR.tools.indexOf(f,i[g])==-1){g=false;break a}}g=e(b.styles,a.requiredStyles)&&e(b.attributes,a.requiredAttributes)}g=!g}if(!g){if(!a.propertiesOnly)c.valid=true;if(!c.allAttributes)c.allAttributes=d(a.attributes,b.attributes,c.validAttributes);if(!c.allStyles)c.allStyles= -d(a.styles,b.styles,c.validStyles);if(!c.allClasses){a=a.classes;b=b.classes;g=c.validClasses;if(a)if(a===true)b=true;else{for(var i=0,f=b.length,m;i<f;++i){m=b[i];g[m]||(g[m]=a(m))}b=false}else b=false;c.allClasses=b}}}}function d(a,b,c){if(!a)return false;if(a===true)return true;for(var e in b)c[e]||(c[e]=a(e,b[e]));return false}function b(a,b){if(!a)return false;if(a===true)return a;if(typeof a=="string"){a=p(a);return a=="*"?true:CKEDITOR.tools.convertArrayToObject(a.split(b))}if(CKEDITOR.tools.isArray(a))return a.length? -CKEDITOR.tools.convertArrayToObject(a):false;var c={},e=0,d;for(d in a){c[d]=a[d];e++}return e?c:false}function c(b){if(b._.filterFunction)return b._.filterFunction;var c=/^cke:(object|embed|param)$/,e=/^(object|embed|param)$/;return b._.filterFunction=function(d,g,i,f,m,q,h){var o=d.name,p,t=false;if(m)d.name=o=o.replace(c,"$1");if(i=i&&i[o]){j(d);for(o=0;o<i.length;++o)r(b,d,i[o]);k(d)}if(g){var o=d.name,i=g.elements[o],B=g.generic,g={valid:false,validAttributes:{},validClasses:{},validStyles:{}, -allAttributes:false,allClasses:false,allStyles:false};if(!i&&!B){f.push(d);return true}j(d);if(i){o=0;for(p=i.length;o<p;++o)a(i[o],d,g,true,q)}if(B){o=0;for(p=B.length;o<p;++o)a(B[o],d,g,false,q)}if(!g.valid){f.push(d);return true}q=g.validAttributes;o=g.validStyles;i=g.validClasses;p=d.attributes;var B=d.styles,E=p["class"],n=p.style,w,L,C=[],s=[],u=/^data-cke-/,I=false;delete p.style;delete p["class"];if(!g.allAttributes)for(w in p)if(!q[w])if(u.test(w)){if(w!=(L=w.replace(/^data-cke-saved-/,""))&& -!q[L]){delete p[w];I=true}}else{delete p[w];I=true}if(g.allStyles){if(n)p.style=n}else{for(w in B)o[w]?C.push(w+":"+B[w]):I=true;if(C.length)p.style=C.sort().join("; ")}if(g.allClasses)E&&(p["class"]=E);else{for(w in i)i[w]&&s.push(w);s.length&&(p["class"]=s.sort().join(" "));E&&s.length<E.split(/\s+/).length&&(I=true)}I&&(t=true);if(!h&&!l(d)){f.push(d);return true}}if(m)d.name=d.name.replace(e,"cke:$1");return t}}function e(a,b){if(!b)return true;for(var c=0;c<b.length;++c)if(!(b[c]in a))return false; -return true}function f(a){if(!a)return{};for(var a=a.split(/\s*,\s*/).sort(),b={};a.length;)b[a.shift()]=L;return b}function h(a){for(var b,c,e,d,g={},i=1,a=p(a);b=a.match(x);){if(c=b[2]){e=n(c,"styles");d=n(c,"attrs");c=n(c,"classes")}else e=d=c=null;g["$"+i++]={elements:b[1],classes:c,styles:e,attributes:d};a=a.slice(b[0].length)}return g}function n(a,b){var c=a.match(M[b]);return c?p(c[1]):null}function j(a){if(!a.styles)a.styles=CKEDITOR.tools.parseCssText(a.attributes.style||"",1);if(!a.classes)a.classes= -a.attributes["class"]?a.attributes["class"].split(/\s+/):[]}function k(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,true))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function l(a){switch(a.name){case "a":if(!a.children.length&&!a.attributes.name)return false;break;case "img":if(!a.attributes.src)return false}return true}function u(a){return!a?false:a===true?true:function(b){return b in a}}function s(){return new CKEDITOR.htmlParser.element("br")} -function t(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||o.$block[a.name])}function g(a,b,c){var e=a.name;if(o.$empty[e]||!a.children.length)if(e=="hr"&&b=="br")a.replaceWith(s());else{a.parent&&c.push({check:"it",el:a.parent});a.remove()}else if(o.$block[e]||e=="tr")if(b=="br"){if(a.previous&&!t(a.previous)){b=s();b.insertBefore(a)}if(a.next&&!t(a.next)){b=s();b.insertAfter(a)}a.replaceWithChildren()}else{var e=a.children,d;b:{d=o[b];for(var g=0,i=e.length,f;g<i;++g){f=e[g];if(f.type== -CKEDITOR.NODE_ELEMENT&&!d[f.name]){d=false;break b}}d=true}if(d){a.name=b;a.attributes={};c.push({check:"parent-down",el:a})}else{d=a.parent;for(var g=d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||d.name=="body",m,i=e.length;i>0;){f=e[--i];if(g&&(f.type==CKEDITOR.NODE_TEXT||f.type==CKEDITOR.NODE_ELEMENT&&o.$inline[f.name])){if(!m){m=new CKEDITOR.htmlParser.element(b);m.insertAfter(a);c.push({check:"parent-down",el:m})}m.add(f,0)}else{m=null;f.insertAfter(a);d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(f.type== -CKEDITOR.NODE_ELEMENT&&!o[d.name][f.name])&&c.push({check:"el-up",el:f})}}a.remove()}}else if(e=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function r(a,b,c){var e,d;for(e=0;e<c.length;++e){d=c[e];if((!d.check||a.check(d.check,false))&&(!d.left||d.left(b))){d.right(b,y);break}}}function w(a,b){var c=b.getDefinition(),e=c.attributes,d=c.styles,g,i,f,m;if(a.name!=c.element)return false;for(g in e)if(g=="class"){c=e[g].split(/\s+/);for(f=a.classes.join("|");m= -c.pop();)if(f.indexOf(m)==-1)return false}else if(a.attributes[g]!=e[g])return false;for(i in d)if(a.styles[i]!=d[i])return false;return true}function m(a,b){var c,e;if(typeof a=="string")c=a;else if(a instanceof CKEDITOR.style)e=a;else{c=a[0];e=a[1]}return[{element:c,left:e,right:function(a,c){c.transform(a,b)}}]}function i(a){return function(b){return w(b,a)}}function q(a){return function(b,c){c[a](b)}}var o=CKEDITOR.dtd,B=CKEDITOR.tools.copy,p=CKEDITOR.tools.trim,L="cke-test",E=["","p","br","div"]; -CKEDITOR.filter=function(a){this.allowedContent=[];this.disabled=false;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={rules:{},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=true;var b=a.config.allowedContent;if(b===true)this.disabled=true;else{if(!b)this.customConfig=false;this.allow(b,"config",1);this.allow(a.config.extraAllowedContent,"extra",1);this.allow(E[a.enterMode]+" "+E[a.shiftEnterMode], -"default",1)}}else{this.customConfig=false;this.allow(a,"default",1)}};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(a,c,e){if(this.disabled||this.customConfig&&!e||!a)return false;this._.cachedChecks={};var d,g;if(typeof a=="string")a=h(a);else if(a instanceof CKEDITOR.style){g=a.getDefinition();e={};a=g.attributes;e[g.element]=g={styles:g.styles,requiredStyles:g.styles&&CKEDITOR.tools.objectKeys(g.styles)};if(a){a=B(a);g.classes=a["class"]?a["class"].split(/\s+/):null;g.requiredClasses= -g.classes;delete a["class"];g.attributes=a;g.requiredAttributes=a&&CKEDITOR.tools.objectKeys(a)}a=e}else if(CKEDITOR.tools.isArray(a)){for(d=0;d<a.length;++d)g=this.allow(a[d],c,e);return g}var i,e=[];for(i in a){g=a[i];g=typeof g=="boolean"?{}:typeof g=="function"?{match:g}:B(g);if(i.charAt(0)!="$")g.elements=i;if(c)g.featureName=c.toLowerCase();var f=g;f.elements=b(f.elements,/\s+/)||null;f.propertiesOnly=f.propertiesOnly||f.elements===true;var m=/\s*,\s*/,o=void 0;for(o in I){f[o]=b(f[o],m)||null; -var q=f,p=C[o],r=b(f[C[o]],m),t=f[o],j=[],k=true,w=void 0;r?k=false:r={};for(w in t)if(w.charAt(0)=="!"){w=w.slice(1);j.push(w);r[w]=true;k=false}for(;w=j.pop();){t[w]=t["!"+w];delete t["!"+w]}q[p]=(k?false:r)||null}f.match=f.match||null;this.allowedContent.push(g);e.push(g)}c=this._.rules;i=c.elements||{};a=c.generic||[];g=0;for(f=e.length;g<f;++g){m=B(e[g]);o=m.classes===true||m.styles===true||m.attributes===true;q=m;p=void 0;for(p in I)q[p]=u(q[p]);r=true;for(p in C){p=C[p];q[p]=CKEDITOR.tools.objectKeys(q[p]); -q[p]&&(r=false)}q.nothingRequired=r;if(m.elements===true||m.elements===null){m.elements=u(m.elements);a[o?"unshift":"push"](m)}else{q=m.elements;delete m.elements;for(d in q)if(i[d])i[d][o?"unshift":"push"](m);else i[d]=[m]}}c.elements=i;c.generic=a.length?a:null;return true},applyTo:function(a,b,e,d){if(this.disabled)return false;var i=[],f=!e&&this._.rules,m=this._.transformations,q=c(this),p=this.editor&&this.editor.config.protectedSource,h=false;a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if(a.attributes["data-cke-filter"]== -"off")return false;if(!b||!(a.name=="span"&&~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-")))q(a,f,m,i,b)&&(h=true)}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var e=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var d,g,z;if(p)for(g=0;g<p.length;++g)if((z=e.match(p[g]))&&z[0].length==e.length){c=true;break a}e=CKEDITOR.htmlParser.fragment.fromHtml(e);e.children.length==1&&(d=e.children[0]).type==CKEDITOR.NODE_ELEMENT&& -q(d,f,m,c,b);c=!c.length}c||i.push(a)}},null,true);i.length&&(h=true);for(var r,a=[],d=E[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];e=i.pop();)e.type==CKEDITOR.NODE_ELEMENT?g(e,d,a):e.remove();for(;r=a.pop();){e=r.el;if(e.parent)switch(r.check){case "it":o.$removeEmpty[e.name]&&!e.children.length?g(e,d,a):l(e)||g(e,d,a);break;case "el-up":e.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!o[e.parent.name][e.name]&&g(e,d,a);break;case "parent-down":e.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&& -!o[e.parent.name][e.name]&&g(e.parent,d,a)}}return h},checkFeature:function(a){if(this.disabled||!a)return true;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=true},addContentForms:function(a){if(!this.disabled&&a){var b,c,e=[],d;for(b=0;b<a.length&&!d;++b){c=a[b];if((typeof c=="string"||c instanceof CKEDITOR.style)&&this.check(c))d=c}if(d){for(b=0;b<a.length;++b)e.push(m(a[b],d));this.addTransformations(e)}}},addFeature:function(a){if(this.disabled|| -!a)return true;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return this.customConfig&&a.requiredContent?this.check(a.requiredContent):true},addTransformations:function(a){var b,c;if(!this.disabled&&a){var e=this._.transformations,d;for(d=0;d<a.length;++d){b=a[d];var g=void 0,f=void 0,m=void 0,o=void 0,p=void 0,h=void 0;c=[];for(f=0;f<b.length;++f){m=b[f];if(typeof m=="string"){m= -m.split(/\s*:\s*/);o=m[0];p=null;h=m[1]}else{o=m.check;p=m.left;h=m.right}if(!g){g=m;g=g.element?g.element:o?o.match(/^([a-z0-9]+)/i)[0]:g.left.getDefinition().element}p instanceof CKEDITOR.style&&(p=i(p));c.push({check:o==g?null:o,left:p,right:typeof h=="string"?q(h):h})}b=g;e[b]||(e[b]=[]);e[b].push(c)}}},check:function(a,b,e){if(this.disabled)return true;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,e))return true;return false}var g,i;if(typeof a=="string"){i=a+"<"+ -(b===false?"0":"1")+(e?"1":"0")+">";if(i in this._.cachedChecks)return this._.cachedChecks[i];d=h(a).$1;g=d.styles;var m=d.classes;d.name=d.elements;d.classes=m=m?m.split(/\s*,\s*/):[];d.styles=f(g);d.attributes=f(d.attributes);d.children=[];m.length&&(d.attributes["class"]=m.join(" "));if(g)d.attributes.style=CKEDITOR.tools.writeCssText(d.styles);g=d}else{d=a.getDefinition();g=d.styles;m=d.attributes||{};if(g){g=B(g);m.style=CKEDITOR.tools.writeCssText(g,true)}else g={};g={name:d.element,attributes:m, -classes:m["class"]?m["class"].split(/\s+/):[],styles:g,children:[]}}var m=CKEDITOR.tools.clone(g),o=[],p;if(b!==false&&(p=this._.transformations[g.name])){for(d=0;d<p.length;++d)r(this,g,p[d]);k(g)}c(this)(m,this._.rules,b===false?false:this._.transformations,o,false,!e,!e);b=o.length>0?false:CKEDITOR.tools.objectCompare(g.attributes,m.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[i]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV, -br:CKEDITOR.ENTER_BR};return function(c,e){var d=a.slice(),g;if(this.check(E[c]))return c;for(e||(d=d.reverse());g=d.pop();)if(this.check(g))return b[g];return CKEDITOR.ENTER_BR}}()};var I={styles:1,attributes:1,classes:1},C={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},x=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,M={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},y=CKEDITOR.filter.transformationsTools= -{sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var e=a.attributes[b];if(e){/^\d+$/.test(e)&&(e=e+"px");a.styles[c]=e}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var e=a.styles[b],d=e&&e.match(/^(\d+)(?:\.\d*)?px$/);d?a.attributes[c]=d[1]:e==L&&(a.attributes[c]= -L)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:w,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),e=c.styles,d=c.attributes,g,i,f,m;a.name=c.element;for(g in d)if(g== -"class"){c=a.classes.join("|");for(f=d[g].split(/\s+/);m=f.pop();)c.indexOf(m)==-1&&a.classes.push(m)}else a.attributes[g]=d[g];for(i in e)a.styles[i]=e[i]}}}})(); +(function(){function a(a,b,d,c,e){var f,o,a=[];for(f in b){o=b[f];o=typeof o=="boolean"?{}:typeof o=="function"?{match:o}:L(o);if(f.charAt(0)!="$")o.elements=f;if(d)o.featureName=d.toLowerCase();var j=o;j.elements=g(j.elements,/\s+/)||null;j.propertiesOnly=j.propertiesOnly||j.elements===true;var k=/\s*,\s*/,l=void 0;for(l in t){j[l]=g(j[l],k)||null;var v=j,r=E[l],y=g(j[E[l]],k),q=j[l],w=[],u=true,h=void 0;y?u=false:y={};for(h in q)if(h.charAt(0)=="!"){h=h.slice(1);w.push(h);y[h]=true;u=false}for(;h= +w.pop();){q[h]=q["!"+h];delete q["!"+h]}v[r]=(u?false:y)||null}j.match=j.match||null;c.push(o);a.push(o)}for(var b=e.elements,e=e.generic,i,d=0,c=a.length;d<c;++d){f=L(a[d]);o=f.classes===true||f.styles===true||f.attributes===true;j=f;l=r=k=void 0;for(k in t)j[k]=A(j[k]);v=true;for(l in E){k=E[l];r=j[k];y=[];q=void 0;for(q in r)q.indexOf("*")>-1?y.push(RegExp("^"+q.replace(/\*/g,".*")+"$")):y.push(q);r=y;if(r.length){j[k]=r;v=false}}j.nothingRequired=v;j.noProperties=!(j.attributes||j.classes||j.styles); +if(f.elements===true||f.elements===null)e[o?"unshift":"push"](f);else{j=f.elements;delete f.elements;for(i in j)if(b[i])b[i][o?"unshift":"push"](f);else b[i]=[f]}}}function c(a,d,c,e){if(!a.match||a.match(d))if(e||n(a,d)){if(!a.propertiesOnly)c.valid=true;if(!c.allAttributes)c.allAttributes=b(a.attributes,d.attributes,c.validAttributes);if(!c.allStyles)c.allStyles=b(a.styles,d.styles,c.validStyles);if(!c.allClasses){a=a.classes;d=d.classes;e=c.validClasses;if(a)if(a===true)a=true;else{for(var f=0, +o=d.length,j;f<o;++f){j=d[f];e[j]||(e[j]=a(j))}a=false}else a=false;c.allClasses=a}}}function b(a,b,d){if(!a)return false;if(a===true)return true;for(var c in b)d[c]||(d[c]=a(c));return false}function f(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return false;c.hadInvalidAttribute=d(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=d(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var e=false,f=a===true,o=b.length;o--;)if(f||a(b[o])){b.splice(o,1);e= +true}a=e}else a=false;c.hadInvalidClass=a||c.hadInvalidClass}}function d(a,b){if(!a)return false;var d=false,c=a===true,e;for(e in b)if(c||a(e)){delete b[e];d=true}return d}function e(a,b,d){if(a.disabled||a.customConfig&&!d||!b)return false;a._.cachedChecks={};return true}function g(a,b){if(!a)return false;if(a===true)return a;if(typeof a=="string"){a=J(a);return a=="*"?true:CKEDITOR.tools.convertArrayToObject(a.split(b))}if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a): +false;var d={},c=0,e;for(e in a){d[e]=a[e];c++}return c?d:false}function n(a,b){if(a.nothingRequired)return true;var d,c,e,f;if(e=a.requiredClasses){f=b.classes;for(d=0;d<e.length;++d){c=e[d];if(typeof c=="string"){if(CKEDITOR.tools.indexOf(f,c)==-1)return false}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,c))return false}}return h(b.styles,a.requiredStyles)&&h(b.attributes,a.requiredAttributes)}function h(a,b){if(!b)return true;for(var d=0,c;d<b.length;++d){c=b[d];if(typeof c=="string"){if(!(c in +a))return false}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,c))return false}return true}function i(a){if(!a)return{};for(var a=a.split(/\s*,\s*/).sort(),b={};a.length;)b[a.shift()]=w;return b}function m(a){for(var b,d,c,e,f={},o=1,a=J(a);b=a.match(y);){if(d=b[2]){c=p(d,"styles");e=p(d,"attrs");d=p(d,"classes")}else c=e=d=null;f["$"+o++]={elements:b[1],classes:d,styles:c,attributes:e};a=a.slice(b[0].length)}return f}function p(a,b){var d=a.match(C[b]);return d?J(d[1]):null}function s(a){var b= +a.styleBackup=a.attributes.style,d=a.classBackup=a.attributes["class"];if(!a.styles)a.styles=CKEDITOR.tools.parseCssText(b||"",1);if(!a.classes)a.classes=d?d.split(/\s+/):[]}function x(a,b,d,e){var j=0,k;if(e.toHtml)b.name=b.name.replace(ba,"$1");if(e.doCallbacks&&a.elementCallbacks){a:for(var l=a.elementCallbacks,g=0,r=l.length,y;g<r;++g)if(y=l[g](b)){k=y;break a}if(k)return k}if(e.doTransform)if(k=a._.transformations[b.name]){s(b);for(l=0;l<k.length;++l)v(a,b,k[l]);o(b)}if(e.doFilter){a:{l=b.name; +g=a._;a=g.allowedRules.elements[l];k=g.allowedRules.generic;l=g.disallowedRules.elements[l];g=g.disallowedRules.generic;r=e.skipRequired;y={valid:false,validAttributes:{},validClasses:{},validStyles:{},allAttributes:false,allClasses:false,allStyles:false,hadInvalidAttribute:false,hadInvalidClass:false,hadInvalidStyle:false};var q,w;if(!a&&!k)a=null;else{s(b);if(l){q=0;for(w=l.length;q<w;++q)if(f(l[q],b,y)===false){a=null;break a}}if(g){q=0;for(w=g.length;q<w;++q)f(g[q],b,y)}if(a){q=0;for(w=a.length;q< +w;++q)c(a[q],b,y,r)}if(k){q=0;for(w=k.length;q<w;++q)c(k[q],b,y,r)}a=y}}if(!a){d.push(b);return D}if(!a.valid){d.push(b);return D}w=a.validAttributes;var h=a.validStyles;k=a.validClasses;var l=b.attributes,E=b.styles,g=b.classes,r=b.classBackup,i=b.styleBackup,t,z,C=[];y=[];var I=/^data-cke-/;q=false;delete l.style;delete l["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(t in l)if(!w[t])if(I.test(t)){if(t!=(z=t.replace(/^data-cke-saved-/,""))&&!w[z]){delete l[t];q=true}}else{delete l[t]; +q=true}if(!a.allStyles||a.hadInvalidStyle){for(t in E)a.allStyles||h[t]?C.push(t+":"+E[t]):q=true;if(C.length)l.style=C.sort().join("; ")}else if(i)l.style=i;if(!a.allClasses||a.hadInvalidClass){for(t=0;t<g.length;++t)(a.allClasses||k[g[t]])&&y.push(g[t]);y.length&&(l["class"]=y.sort().join(" "));r&&y.length<r.split(/\s+/).length&&(q=true)}else r&&(l["class"]=r);q&&(j=D);if(!e.skipFinalValidation&&!u(b)){d.push(b);return D}}if(e.toHtml)b.name=b.name.replace(ca,"cke:$1");return j}function q(a){var b= +[],d;for(d in a)d.indexOf("*")>-1&&b.push(d.replace(/\*/g,".*"));return b.length?RegExp("^(?:"+b.join("|")+")$"):null}function o(a){var b=a.attributes,d;delete b.style;delete b["class"];if(d=CKEDITOR.tools.writeCssText(a.styles,true))b.style=d;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function u(a){switch(a.name){case "a":if(!a.children.length&&!a.attributes.name)return false;break;case "img":if(!a.attributes.src)return false}return true}function A(a){if(!a)return false;if(a===true)return true; +var b=q(a);return function(d){return d in a||b&&d.match(b)}}function k(){return new CKEDITOR.htmlParser.element("br")}function l(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||F.$block[a.name])}function j(a,b,d){var c=a.name;if(F.$empty[c]||!a.children.length)if(c=="hr"&&b=="br")a.replaceWith(k());else{a.parent&&d.push({check:"it",el:a.parent});a.remove()}else if(F.$block[c]||c=="tr")if(b=="br"){if(a.previous&&!l(a.previous)){b=k();b.insertBefore(a)}if(a.next&&!l(a.next)){b=k();b.insertAfter(a)}a.replaceWithChildren()}else{var c= +a.children,e;b:{e=F[b];for(var f=0,o=c.length,j;f<o;++f){j=c[f];if(j.type==CKEDITOR.NODE_ELEMENT&&!e[j.name]){e=false;break b}}e=true}if(e){a.name=b;a.attributes={};d.push({check:"parent-down",el:a})}else{e=a.parent;for(var f=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||e.name=="body",g,o=c.length;o>0;){j=c[--o];if(f&&(j.type==CKEDITOR.NODE_TEXT||j.type==CKEDITOR.NODE_ELEMENT&&F.$inline[j.name])){if(!g){g=new CKEDITOR.htmlParser.element(b);g.insertAfter(a);d.push({check:"parent-down",el:g})}g.add(j,0)}else{g= +null;j.insertAfter(a);e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(j.type==CKEDITOR.NODE_ELEMENT&&!F[e.name][j.name])&&d.push({check:"el-up",el:j})}}a.remove()}}else if(c=="style")a.remove();else{a.parent&&d.push({check:"it",el:a.parent});a.replaceWithChildren()}}function v(a,b,d){var c,e;for(c=0;c<d.length;++c){e=d[c];if((!e.check||a.check(e.check,false))&&(!e.left||e.left(b))){e.right(b,G);break}}}function I(a,b){var d=b.getDefinition(),c=d.attributes,e=d.styles,f,o,j,k;if(a.name!=d.element)return false; +for(f in c)if(f=="class"){d=c[f].split(/\s+/);for(j=a.classes.join("|");k=d.pop();)if(j.indexOf(k)==-1)return false}else if(a.attributes[f]!=c[f])return false;for(o in e)if(a.styles[o]!=e[o])return false;return true}function r(a,b){var d,c;if(typeof a=="string")d=a;else if(a instanceof CKEDITOR.style)c=a;else{d=a[0];c=a[1]}return[{element:d,left:c,right:function(a,d){d.transform(a,b)}}]}function O(a){return function(b){return I(b,a)}}function S(a){return function(b,d){d[a](b)}}var F=CKEDITOR.dtd, +D=1,L=CKEDITOR.tools.copy,J=CKEDITOR.tools.trim,w="cke-test",z=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=false;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a; +this.customConfig=true;var b=a.config.allowedContent;if(b===true)this.disabled=true;else{if(!b)this.customConfig=false;this.allow(b,"config",1);this.allow(a.config.extraAllowedContent,"extra",1);this.allow(z[a.enterMode]+" "+z[a.shiftEnterMode],"default",1);this.disallow(a.config.disallowedContent)}}else{this.customConfig=false;this.allow(a,"default",1)}};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,d,c){if(!e(this,b,c))return false;var f,o;if(typeof b=="string")b=m(b); +else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),d,c);f=b.getDefinition();b={};c=f.attributes;b[f.element]=f={styles:f.styles,requiredStyles:f.styles&&CKEDITOR.tools.objectKeys(f.styles)};if(c){c=L(c);f.classes=c["class"]?c["class"].split(/\s+/):null;f.requiredClasses=f.classes;delete c["class"];f.attributes=c;f.requiredAttributes=c&&CKEDITOR.tools.objectKeys(c)}}else if(CKEDITOR.tools.isArray(b)){for(f=0;f<b.length;++f)o=this.allow(b[f], +d,c);return o}a(this,b,d,this.allowedContent,this._.allowedRules);return true},applyTo:function(a,b,d,c){if(this.disabled)return false;var e=this,f=[],o=this.editor&&this.editor.config.protectedSource,k,l=false,g={doFilter:!d,doTransform:true,doCallbacks:true,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if(a.attributes["data-cke-filter"]=="off")return false;if(!b||!(a.name=="span"&&~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))){k=x(e,a,f,g);if(k&D)l= +true;else if(k&2)return false}}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var d;a:{var c=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));d=[];var j,v,r;if(o)for(v=0;v<o.length;++v)if((r=c.match(o[v]))&&r[0].length==c.length){d=true;break a}c=CKEDITOR.htmlParser.fragment.fromHtml(c);c.children.length==1&&(j=c.children[0]).type==CKEDITOR.NODE_ELEMENT&&x(e,j,d,g);d=!d.length}d||f.push(a)}},null,true);f.length&&(l=true);for(var v,a=[],c=z[c||(this.editor? +this.editor.enterMode:CKEDITOR.ENTER_P)];d=f.pop();)d.type==CKEDITOR.NODE_ELEMENT?j(d,c,a):d.remove();for(;v=a.pop();){d=v.el;if(d.parent)switch(v.check){case "it":F.$removeEmpty[d.name]&&!d.children.length?j(d,c,a):u(d)||j(d,c,a);break;case "el-up":d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!F[d.parent.name][d.name]&&j(d,c,a);break;case "parent-down":d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!F[d.parent.name][d.name]&&j(d.parent,c,a)}}return l},checkFeature:function(a){if(this.disabled|| +!a)return true;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=true},disallow:function(b){if(!e(this,b,true))return false;typeof b=="string"&&(b=m(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return true},addContentForms:function(a){if(!this.disabled&&a){var b,d,c=[],e;for(b=0;b<a.length&&!e;++b){d=a[b];if((typeof d=="string"||d instanceof CKEDITOR.style)&&this.check(d))e=d}if(e){for(b=0;b<a.length;++b)c.push(r(a[b], +e));this.addTransformations(c)}}},addElementCallback:function(a){if(!this.elementCallbacks)this.elementCallbacks=[];this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return true;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):true},addTransformations:function(a){var b, +d;if(!this.disabled&&a){var c=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var f=void 0,o=void 0,j=void 0,k=void 0,l=void 0,g=void 0;d=[];for(o=0;o<b.length;++o){j=b[o];if(typeof j=="string"){j=j.split(/\s*:\s*/);k=j[0];l=null;g=j[1]}else{k=j.check;l=j.left;g=j.right}if(!f){f=j;f=f.element?f.element:k?k.match(/^([a-z0-9]+)/i)[0]:f.left.getDefinition().element}l instanceof CKEDITOR.style&&(l=O(l));d.push({check:k==f?null:k,left:l,right:typeof g=="string"?S(g):g})}b=f;c[b]||(c[b]=[]);c[b].push(d)}}}, +check:function(a,b,d){if(this.disabled)return true;if(CKEDITOR.tools.isArray(a)){for(var c=a.length;c--;)if(this.check(a[c],b,d))return true;return false}var e,f;if(typeof a=="string"){f=a+"<"+(b===false?"0":"1")+(d?"1":"0")+">";if(f in this._.cachedChecks)return this._.cachedChecks[f];c=m(a).$1;e=c.styles;var j=c.classes;c.name=c.elements;c.classes=j=j?j.split(/\s*,\s*/):[];c.styles=i(e);c.attributes=i(c.attributes);c.children=[];j.length&&(c.attributes["class"]=j.join(" "));if(e)c.attributes.style= +CKEDITOR.tools.writeCssText(c.styles);e=c}else{c=a.getDefinition();e=c.styles;j=c.attributes||{};if(e){e=L(e);j.style=CKEDITOR.tools.writeCssText(e,true)}else e={};e={name:c.element,attributes:j,classes:j["class"]?j["class"].split(/\s+/):[],styles:e,children:[]}}var j=CKEDITOR.tools.clone(e),k=[],l;if(b!==false&&(l=this._.transformations[e.name])){for(c=0;c<l.length;++c)v(this,e,l[c]);o(e)}x(this,j,k,{doFilter:true,doTransform:b!==false,skipRequired:!d,skipFinalValidation:!d});b=k.length>0?false: +CKEDITOR.tools.objectCompare(e.attributes,j.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[f]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(d,c){var e=a.slice(),f;if(this.check(z[d]))return d;for(c||(e=e.reverse());f=e.pop();)if(this.check(f))return b[f];return CKEDITOR.ENTER_BR}}()};var t={styles:1,attributes:1,classes:1},E={styles:"requiredStyles",attributes:"requiredAttributes", +classes:"requiredClasses"},y=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,C={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},ba=/^cke:(object|embed|param)$/,ca=/^(object|embed|param)$/,G=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a, +b,d){d=d||b;if(!(d in a.styles)){var c=a.attributes[b];if(c){/^\d+$/.test(c)&&(c=c+"px");a.styles[d]=c}}delete a.attributes[b]},lengthToAttribute:function(a,b,d){d=d||b;if(!(d in a.attributes)){var c=a.styles[b],e=c&&c.match(/^(\d+)(?:\.\d*)?px$/);e?a.attributes[d]=e[1]:c==w&&(a.attributes[d]=w)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in +a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:I,transform:function(a,b){if(typeof b=="string")a.name=b;else{var d=b.getDefinition(),c=d.styles,e=d.attributes,f,j,o,k;a.name=d.element;for(f in e)if(f=="class"){d=a.classes.join("|");for(o=e[f].split(/\s+/);k=o.pop();)d.indexOf(k)==-1&&a.classes.push(k)}else a.attributes[f]=e[f];for(j in c)a.styles[j]=c[j]}}}})(); (function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);if(a)this.currentActive=a;if(!this.hasFocus&&!this._.locked){(a=CKEDITOR.currentInstance)&&a.focusManager.blur(1);this.hasFocus=true;(a=this._.editor.container)&&a.addClass("cke_focus");this._.editor.fire("focus")}}, -lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function d(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?d.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;d.call(this)},b,this)}},add:function(a,d){var b=a.getCustomData("focusmanager");if(!b|| -b!=this){b&&b.remove(a);var b="focus",c="blur";if(d)if(CKEDITOR.env.ie){b="focusin";c="focusout"}else CKEDITOR.event.useCapture=1;var e={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,e.focus,this);a.on(c,e.blur,this);if(d)CKEDITOR.event.useCapture=0;a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",e)}},remove:function(a){a.removeCustomData("focusmanager");var d=a.removeCustomData("focusmanager_handlers");a.removeListener("blur", -d.blur);a.removeListener("focus",d.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this}; -(function(){var a,d=function(b){var b=b.data,e=b.getKeystroke(),d=this.keystrokes[e],h=this._.editor;a=h.fire("key",{keyCode:e})===false;if(!a){d&&(a=h.execCommand(d,{from:"keystrokeHandler"})!==false);a||(a=!!this.blockedKeystrokes[e])}a&&b.preventDefault(true);return!a},b=function(b){if(a){a=false;b.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",d,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})(); -(function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,d,b){if(!a||!CKEDITOR.lang.languages[a])a=this.detect(d, -a);this[a]?b(a,this[a]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),function(){this[a].dir=this.rtl[a]?"rtl":"ltr";b(a,this[a])},this)},detect:function(a,d){var b=this.languages,d=d||navigator.userLanguage||navigator.language||a,c=d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=c[1],c=c[2];b[e+"-"+c]?e=e+"-"+c:b[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||a}}})(); -CKEDITOR.scriptLoader=function(){var a={},d={};return{load:function(b,c,e,f){var h=typeof b=="string";h&&(b=[b]);e||(e=CKEDITOR);var n=b.length,j=[],k=[],l=function(a){c&&(h?c.call(e,a):c.call(e,j,k))};if(n===0)l(true);else{var u=function(a,b){(b?j:k).push(a);if(--n<=0){f&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");l(b)}},s=function(b,c){a[b]=1;var e=d[b];delete d[b];for(var g=0;g<e.length;g++)e[g](b,c)},t=function(b){if(a[b])u(b,true);else{var e=d[b]||(d[b]=[]);e.push(u);if(!(e.length> -1)){var g=new CKEDITOR.dom.element("script");g.setAttributes({type:"text/javascript",src:b});if(c)if(CKEDITOR.env.ie&&CKEDITOR.env.version<11)g.$.onreadystatechange=function(){if(g.$.readyState=="loaded"||g.$.readyState=="complete"){g.$.onreadystatechange=null;s(b,true)}};else{g.$.onload=function(){setTimeout(function(){s(b,true)},0)};g.$.onerror=function(){s(b,false)}}g.appendTo(CKEDITOR.document.getHead())}}};f&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var g=0;g<n;g++)t(b[g])}}, -queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(e,d){var h=this;c.push({scriptUrl:e,callback:function(){d&&d.apply(this,arguments);c.shift();a.call(h)}});c.length==1&&a.call(this)}}()}}();CKEDITOR.resourceManager=function(a,d){this.basePath=a;this.fileName=d;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}}; -CKEDITOR.resourceManager.prototype={add:function(a,d){if(this.registered[a])throw'[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.';var b=this.registered[a]=d||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var d=this.externals[a];return CKEDITOR.getUrl(d&&d.dir||this.basePath+a+"/")},getFilePath:function(a){var d=this.externals[a]; -return CKEDITOR.getUrl(this.getPath(a)+(d?d.file:this.fileName+".js"))},addExternal:function(a,d,b){for(var a=a.split(","),c=0;c<a.length;c++){var e=a[c];b||(d=d.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[e]={dir:d,file:b||this.fileName+".js"}}},load:function(a,d,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,e=this.registered,f=[],h={},n={},j=0;j<a.length;j++){var k=a[j];if(k)if(!c[k]&&!e[k]){var l=this.getFilePath(k);f.push(l);l in h||(h[l]=[]);h[l].push(k)}else n[k]= -this.get(k)}CKEDITOR.scriptLoader.load(f,function(a,e){if(e.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+h[e[0]].join(",")+'" was not found at "'+e[0]+'".';for(var f=0;f<a.length;f++)for(var g=h[a[f]],r=0;r<g.length;r++){var j=g[r];n[j]=this.get(j);c[j]=1}d.call(b,n)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"); -CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var d={};return function(b,c,e){var f={},h=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(f,a);var b=[],l;for(l in a){var n=a[l],s=n&&n.requires;if(!d[l]){if(n.icons)for(var t=n.icons.split(","),g=t.length;g--;)CKEDITOR.skin.addIcon(t[g],n.path+"icons/"+(CKEDITOR.env.hidpi&&n.hidpi?"hidpi/":"")+t[g]+".png");d[l]=1}if(s){s.split&&(s=s.split(","));for(n=0;n<s.length;n++)f[s[n]]||b.push(s[n])}}if(b.length)h.call(this, -b);else{for(l in f){n=f[l];if(n.onLoad&&!n.onLoad._called){n.onLoad()===false&&delete f[l];n.onLoad._called=1}}c&&c.call(e||window,f)}},this)};h.call(this,b)}});CKEDITOR.plugins.setLang=function(a,d,b){var c=this.get(a),a=c.langEntries||(c.langEntries={}),c=c.lang||(c.lang=[]);c.split&&(c=c.split(","));CKEDITOR.tools.indexOf(c,d)==-1&&c.push(d);a[d]=b};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this}; -CKEDITOR.ui.prototype={add:function(a,d,b){b.name=a.toLowerCase();var c=this.items[a]={type:d,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(c,b)},get:function(a){return this.instances[a]},create:function(a){var d=this.items[a],b=d&&this._.handlers[d.type],c=d&&d.command&&this.editor.getCommand(d.command),b=b&&b.create.apply(this,d.args);this.instances[a]=b;c&&c.uiItems.push(b);if(b&&!b.type)b.type=d.type;return b},addHandler:function(a,d){this._.handlers[a]= -d},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}};CKEDITOR.event.implementOn(CKEDITOR.ui); -(function(){function a(a,c,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(c!==void 0){if(c instanceof CKEDITOR.dom.element){if(!f)throw Error("One of the element modes must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(f==CKEDITOR.ELEMENT_MODE_INLINE?c.is(CKEDITOR.dtd.$editable)||c.is("textarea"):f==CKEDITOR.ELEMENT_MODE_REPLACE? -!c.is(CKEDITOR.dtd.$nonBodyContent):1))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');this.element=c;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||d();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this); -this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",b);this.on("selectionChange",function(a){e(this,a.data.path)});this.on("activeFilterChange",function(){e(this,this.elementPath(),true)});this.on("mode",b);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){h(this,a)},0,this)}function d(){do var a="editor"+ -++s;while(CKEDITOR.instances[a]);return a}function b(){var a=this.commands,b;for(b in a)c(this,a[b])}function c(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function e(a,b,c){if(b){var e,d,f=a.commands;for(d in f){e=f[d];(c||e.contextSensitive)&&e.refresh(a,b)}}}function f(a){var b=a.config.customConfig;if(!b)return false;var b=CKEDITOR.getUrl(b),c=t[b]||(t[b]={});if(c.fn){c.fn.call(a,a.config);(CKEDITOR.getUrl(a.config.customConfig)==b|| -!f(a))&&a.fireOnce("customConfigLoaded")}else CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};f(a)});return true}function h(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,true);delete a.config.on}c=a.config;a.readOnly=!(!c.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled"):a.element.isReadOnly():a.elementMode== -CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.hasAttribute("disabled")));a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):false;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;if(c.skin)CKEDITOR.skinName=c.skin;a.fireOnce("configLoaded");a.dataProcessor= -new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);n(a)});if(b&&b.customConfig!=void 0)a.config.customConfig=b.customConfig;f(a)||a.fireOnce("customConfigLoaded")}function n(a){CKEDITOR.skin.loadPart("editor",function(){j(a)})}function j(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var e=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title=typeof e=="string"||e===false?e:[a.lang.editor,a.name].join(", ");if(CKEDITOR.env.gecko&& -CKEDITOR.env.version<10900&&a.lang.dir=="rtl")a.lang.dir="ltr";if(!a.config.contentsLangDirection)a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");k(a)})}function k(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);l(a)})}function l(a){var b=a.config,c=b.plugins,e=b.extraPlugins,d=b.removePlugins;if(e)var f=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)", -"g"),c=c.replace(f,""),c=c+(","+e);if(d)var o=RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(o,"");CKEDITOR.env.air&&(c=c+",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var e=[],d=[],i=[];a.plugins=c;for(var f in c){var m=c[f],q=m.lang,h=null,t=m.requires,v;CKEDITOR.tools.isArray(t)&&(t=t.join(","));if(t&&(v=t.match(o)))for(;t=v.pop();)CKEDITOR.tools.setTimeout(function(a,b){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+ -b+'" plugin.');},0,null,[t,f]);if(q&&!a.lang[f]){q.split&&(q=q.split(","));if(CKEDITOR.tools.indexOf(q,a.langCode)>=0)h=a.langCode;else{h=a.langCode.replace(/-.*/,"");h=h!=a.langCode&&CKEDITOR.tools.indexOf(q,h)>=0?h:CKEDITOR.tools.indexOf(q,"en")>=0?"en":q[0]}if(!m.langEntries||!m.langEntries[h])i.push(CKEDITOR.getUrl(m.path+"lang/"+h+".js"));else{a.lang[f]=m.langEntries[h];h=null}}d.push(h);e.push(m)}CKEDITOR.scriptLoader.load(i,function(){for(var c=["beforeInit","init","afterInit"],i=0;i<c.length;i++)for(var f= -0;f<e.length;f++){var m=e[f];i===0&&(d[f]&&m.lang&&m.langEntries)&&(a.lang[m.name]=m.langEntries[d[f]]);if(m[c[i]])m[c[i]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(f=0;f<a.config.blockedKeystrokes.length;f++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[f]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function u(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData(); -this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return true}return false}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var s=0,t={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var e=new CKEDITOR.command(this,b);this.mode&&c(this,e);return this.commands[a]=e},_attachToForm:function(){var a=this,b=a.element,c=new CKEDITOR.dom.element(b.$.form);if(b.is("textarea")&&c){var e=function(c){a.updateElement(); -a._.required&&(!b.getValue()&&a.fire("required")===false)&&c.data.preventDefault()};c.on("submit",e);if(c.$.submit&&c.$.submit.call&&c.$.submit.apply)c.$.submit=CKEDITOR.tools.override(c.$.submit,function(a){return function(){e();a.apply?a.apply(this):a()}});a.on("destroy",function(){c.removeListener("submit",e)})}},destroy:function(a){this.fire("beforeDestroy");!a&&u.call(this);this.editable(null);this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed", -null,this)},elementPath:function(a){return(a=a||this.getSelection().getStartElement())?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),e={name:a,commandData:b,command:c};if(c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",e)!==true){e.returnValue=c.exec(e.commandData);if(!c.async&&this.fire("afterCommandExec",e)!==true)return e.returnValue}return false}, -getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;if(typeof b!="string")b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"";b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");if(typeof a!="string"){var b=this.element;b&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a=b.is("textarea")?b.getValue():b.getHtml())}return a}, -loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){if(b)this.on("dataReady",function(a){a.removeListener();b.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=a==void 0||a;if(this.readOnly!=a){this.readOnly=a;this.keystrokeHandler.blockedKeystrokes[8]=+a;this.editable().setReadOnly(a);this.fire("readOnly")}},insertHtml:function(a,b){this.fire("insertHtml",{dataValue:a,mode:b})}, -insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this.status=="ready"&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return u.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c, -e,d=b.length;d--;){c=b[d];e=0;if(CKEDITOR.tools.isArray(c)){e=c[1];c=c[0]}e?a[c]=e:delete a[c]}},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){if(!a)a=this.filter;if(this.activeFilter!==a){this.activeFilter=a;this.fire("activeFilterChange");a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,true))}},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR: -a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b){this.activeEnterMode=a;this.activeShiftEnterMode=b;this.fire("activeEnterModeChange")}}})})();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3; +lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function c(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?c.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;c.call(this)},b,this)}},add:function(a,c){var b=a.getCustomData("focusmanager");if(!b|| +b!=this){b&&b.remove(a);var b="focus",f="blur";if(c)if(CKEDITOR.env.ie){b="focusin";f="focusout"}else CKEDITOR.event.useCapture=1;var d={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,d.focus,this);a.on(f,d.blur,this);if(c)CKEDITOR.event.useCapture=0;a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",d)}},remove:function(a){a.removeCustomData("focusmanager");var c=a.removeCustomData("focusmanager_handlers");a.removeListener("blur", +c.blur);a.removeListener("focus",c.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this}; +(function(){var a,c=function(b){var b=b.data,d=b.getKeystroke(),c=this.keystrokes[d],g=this._.editor;a=g.fire("key",{keyCode:d,domEvent:b})===false;if(!a){c&&(a=g.execCommand(c,{from:"keystrokeHandler"})!==false);a||(a=!!this.blockedKeystrokes[d])}a&&b.preventDefault(true);return!a},b=function(b){if(a){a=false;b.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",c,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})(); +(function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,c,b){if(!a||!CKEDITOR.lang.languages[a])a=this.detect(c, +a);var f=this,c=function(){f[a].dir=f.rtl[a]?"rtl":"ltr";b(a,f[a])};this[a]?c():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),c,this)},detect:function(a,c){var b=this.languages,c=c||navigator.userLanguage||navigator.language||a,f=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=f[1],f=f[2];b[d+"-"+f]?d=d+"-"+f:b[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(a){return a};return d||a}}})(); +CKEDITOR.scriptLoader=function(){var a={},c={};return{load:function(b,f,d,e){var g=typeof b=="string";g&&(b=[b]);d||(d=CKEDITOR);var n=b.length,h=[],i=[],m=function(a){f&&(g?f.call(d,a):f.call(d,h,i))};if(n===0)m(true);else{var p=function(a,b){(b?h:i).push(a);if(--n<=0){e&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");m(b)}},s=function(b,d){a[b]=1;var e=c[b];delete c[b];for(var f=0;f<e.length;f++)e[f](b,d)},x=function(b){if(a[b])p(b,true);else{var d=c[b]||(c[b]=[]);d.push(p);if(!(d.length> +1)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:b});if(f)if(CKEDITOR.env.ie&&CKEDITOR.env.version<11)e.$.onreadystatechange=function(){if(e.$.readyState=="loaded"||e.$.readyState=="complete"){e.$.onreadystatechange=null;s(b,true)}};else{e.$.onload=function(){setTimeout(function(){s(b,true)},0)};e.$.onerror=function(){s(b,false)}}e.appendTo(CKEDITOR.document.getHead())}}};e&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var q=0;q<n;q++)x(b[q])}}, +queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(d,e){var g=this;c.push({scriptUrl:d,callback:function(){e&&e.apply(this,arguments);c.shift();a.call(g)}});c.length==1&&a.call(this)}}()}}();CKEDITOR.resourceManager=function(a,c){this.basePath=a;this.fileName=c;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}}; +CKEDITOR.resourceManager.prototype={add:function(a,c){if(this.registered[a])throw'[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.';var b=this.registered[a]=c||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var c=this.externals[a];return CKEDITOR.getUrl(c&&c.dir||this.basePath+a+"/")},getFilePath:function(a){var c=this.externals[a]; +return CKEDITOR.getUrl(this.getPath(a)+(c?c.file:this.fileName+".js"))},addExternal:function(a,c,b){for(var a=a.split(","),f=0;f<a.length;f++){var d=a[f];b||(c=c.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[d]={dir:c,file:b||this.fileName+".js"}}},load:function(a,c,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var f=this.loaded,d=this.registered,e=[],g={},n={},h=0;h<a.length;h++){var i=a[h];if(i)if(!f[i]&&!d[i]){var m=this.getFilePath(i);e.push(m);m in g||(g[m]=[]);g[m].push(i)}else n[i]= +this.get(i)}CKEDITOR.scriptLoader.load(e,function(a,d){if(d.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+g[d[0]].join(",")+'" was not found at "'+d[0]+'".';for(var e=0;e<a.length;e++)for(var q=g[a[e]],o=0;o<q.length;o++){var u=q[o];n[u]=this.get(u);f[u]=1}c.call(b,n)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"); +CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var c={};return function(b,f,d){var e={},g=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(e,a);var b=[],n;for(n in a){var p=a[n],s=p&&p.requires;if(!c[n]){if(p.icons)for(var x=p.icons.split(","),q=x.length;q--;)CKEDITOR.skin.addIcon(x[q],p.path+"icons/"+(CKEDITOR.env.hidpi&&p.hidpi?"hidpi/":"")+x[q]+".png");c[n]=1}if(s){s.split&&(s=s.split(","));for(p=0;p<s.length;p++)e[s[p]]||b.push(s[p])}}if(b.length)g.call(this, +b);else{for(n in e){p=e[n];if(p.onLoad&&!p.onLoad._called){p.onLoad()===false&&delete e[n];p.onLoad._called=1}}f&&f.call(d||window,e)}},this)};g.call(this,b)}});CKEDITOR.plugins.setLang=function(a,c,b){var f=this.get(a),a=f.langEntries||(f.langEntries={}),f=f.lang||(f.lang=[]);f.split&&(f=f.split(","));CKEDITOR.tools.indexOf(f,c)==-1&&f.push(c);a[c]=b};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this}; +CKEDITOR.ui.prototype={add:function(a,c,b){b.name=a.toLowerCase();var f=this.items[a]={type:c,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(f,b)},get:function(a){return this.instances[a]},create:function(a){var c=this.items[a],b=c&&this._.handlers[c.type],f=c&&c.command&&this.editor.getCommand(c.command),b=b&&b.create.apply(this,c.args);this.instances[a]=b;f&&f.uiItems.push(b);if(b&&!b.type)b.type=c.type;return b},addHandler:function(a,c){this._.handlers[a]= +c},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}};CKEDITOR.event.implementOn(CKEDITOR.ui); +(function(){function a(a,e,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(e!==void 0){if(e instanceof CKEDITOR.dom.element){if(!f)throw Error("One of the element modes must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(f==CKEDITOR.ELEMENT_MODE_INLINE?e.is(CKEDITOR.dtd.$editable)||e.is("textarea"):f==CKEDITOR.ELEMENT_MODE_REPLACE? +!e.is(CKEDITOR.dtd.$nonBodyContent):1))throw Error('The specified element mode is not supported on element: "'+e.getName()+'".');this.element=e;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(e.getId()||e.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||c();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this); +this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",b);this.on("selectionChange",function(a){d(this,a.data.path)});this.on("activeFilterChange",function(){d(this,this.elementPath(),true)});this.on("mode",b);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){g(this,a)},0,this)}function c(){do var a="editor"+ +++s;while(CKEDITOR.instances[a]);return a}function b(){var a=this.commands,b;for(b in a)f(this,a[b])}function f(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function d(a,b,d){if(b){var c,e,f=a.commands;for(e in f){c=f[e];(d||c.contextSensitive)&&c.refresh(a,b)}}}function e(a){var b=a.config.customConfig;if(!b)return false;var b=CKEDITOR.getUrl(b),d=x[b]||(x[b]={});if(d.fn){d.fn.call(a,a.config);(CKEDITOR.getUrl(a.config.customConfig)==b|| +!e(a))&&a.fireOnce("customConfigLoaded")}else CKEDITOR.scriptLoader.queue(b,function(){d.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};e(a)});return true}function g(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var d in b.on)a.on(d,b.on[d]);CKEDITOR.tools.extend(a.config,b,true);delete a.config.on}d=a.config;a.readOnly=!(!d.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled"):a.element.isReadOnly():a.elementMode== +CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.hasAttribute("disabled")));a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):false;a.tabIndex=d.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:d.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:d.shiftEnterMode;if(d.skin)CKEDITOR.skinName=d.skin;a.fireOnce("configLoaded");a.dataProcessor= +new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);n(a)});if(b&&b.customConfig!=void 0)a.config.customConfig=b.customConfig;e(a)||a.fireOnce("customConfigLoaded")}function n(a){CKEDITOR.skin.loadPart("editor",function(){h(a)})}function h(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,d){var c=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(d);a.title=typeof c=="string"||c===false?c:[a.lang.editor,a.name].join(", ");if(!a.config.contentsLangDirection)a.config.contentsLangDirection= +a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");i(a)})}function i(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);m(a)})}function m(a){var b=a.config,d=b.plugins,c=b.extraPlugins,e=b.removePlugins;if(c)var f=RegExp("(?:^|,)(?:"+c.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),d=d.replace(f,""),d=d+(","+c);if(e)var j=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),d=d.replace(j,"");CKEDITOR.env.air&& +(d=d+",adobeair");CKEDITOR.plugins.load(d.split(","),function(d){var c=[],e=[],f=[];a.plugins=d;for(var k in d){var l=d[k],g=l.lang,h=null,u=l.requires,w;CKEDITOR.tools.isArray(u)&&(u=u.join(","));if(u&&(w=u.match(j)))for(;u=w.pop();)CKEDITOR.tools.setTimeout(function(a,b){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+b+'" plugin.');},0,null,[u,k]);if(g&&!a.lang[k]){g.split&&(g=g.split(","));if(CKEDITOR.tools.indexOf(g,a.langCode)>= +0)h=a.langCode;else{h=a.langCode.replace(/-.*/,"");h=h!=a.langCode&&CKEDITOR.tools.indexOf(g,h)>=0?h:CKEDITOR.tools.indexOf(g,"en")>=0?"en":g[0]}if(!l.langEntries||!l.langEntries[h])f.push(CKEDITOR.getUrl(l.path+"lang/"+h+".js"));else{a.lang[k]=l.langEntries[h];h=null}}e.push(h);c.push(l)}CKEDITOR.scriptLoader.load(f,function(){for(var d=["beforeInit","init","afterInit"],f=0;f<d.length;f++)for(var j=0;j<c.length;j++){var k=c[j];f===0&&(e[j]&&k.lang&&k.langEntries)&&(a.lang[k.name]=k.langEntries[e[j]]); +if(k[d[f]])k[d[f]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(j=0;j<a.config.blockedKeystrokes.length;j++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[j]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function p(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b): +a.setHtml(b);return true}return false}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var s=0,x={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var d=new CKEDITOR.command(this,b);this.mode&&f(this,d);return this.commands[a]=d},_attachToForm:function(){var a=this,b=a.element,d=new CKEDITOR.dom.element(b.$.form);if(b.is("textarea")&&d){var c=function(d){a.updateElement();a._.required&&(!b.getValue()&&a.fire("required")===false)&&d.data.preventDefault()}; +d.on("submit",c);if(d.$.submit&&d.$.submit.call&&d.$.submit.apply)d.$.submit=CKEDITOR.tools.override(d.$.submit,function(a){return function(){c();a.apply?a.apply(this):a()}});a.on("destroy",function(){d.removeListener("submit",c)})}},destroy:function(a){this.fire("beforeDestroy");!a&&p.call(this);this.editable(null);this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection(); +if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var d=this.getCommand(a),c={name:a,commandData:b,command:d};if(d&&d.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",c)!==false){c.returnValue=d.exec(c.commandData);if(!d.async&&this.fire("afterCommandExec",c)!==false)return c.returnValue}return false},getCommand:function(a){return this.commands[a]}, +getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;if(typeof b!="string")b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"";b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");if(typeof a!="string"){var b=this.element;b&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a=b.is("textarea")?b.getValue():b.getHtml())}return a},loadSnapshot:function(a){this.fire("loadSnapshot", +a)},setData:function(a,b,d){var c=true,e=b;if(b&&typeof b=="object"){d=b.internal;e=b.callback;c=!b.noSnapshot}!d&&c&&this.fire("saveSnapshot");if(e||!d)this.once("dataReady",function(a){!d&&c&&this.fire("saveSnapshot");e&&e.call(a.editor)});a={dataValue:a};!d&&this.fire("setData",a);this._.data=a.dataValue;!d&&this.fire("afterSetData",a)},setReadOnly:function(a){a=a==void 0||a;if(this.readOnly!=a){this.readOnly=a;this.keystrokeHandler.blockedKeystrokes[8]=+a;this.editable().setReadOnly(a);this.fire("readOnly")}}, +insertHtml:function(a,b){this.fire("insertHtml",{dataValue:a,mode:b})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this.status=="ready"&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return p.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])? +arguments[0]:[[].slice.call(arguments,0)],d,c,e=b.length;e--;){d=b[e];c=0;if(CKEDITOR.tools.isArray(d)){c=d[1];d=d[0]}c?a[d]=c:delete a[d]}},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){if(!a)a=this.filter;if(this.activeFilter!==a){this.activeFilter=a;this.fire("activeFilterChange");a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,true))}},setActiveEnterMode:function(a, +b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b){this.activeEnterMode=a;this.activeShiftEnterMode=b;this.fire("activeEnterModeChange")}}})})();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3; CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}}; -(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,e,f=0,h;c=this._.htmlPartsRegex.exec(b);){e=c.index;if(e>f){f=b.substring(f,e);if(h)h.push(f);else this.onText(f)}f= -this._.htmlPartsRegex.lastIndex;if(e=c[1]){e=e.toLowerCase();if(h&&CKEDITOR.dtd.$cdata[e]){this.onCDATA(h.join(""));h=null}if(!h){this.onTagClose(e);continue}}if(h)h.push(c[0]);else if(e=c[3]){e=e.toLowerCase();if(!/="/.test(e)){var n={},j;c=c[4];var k=!!(c&&c.charAt(c.length-1)=="/");if(c)for(;j=a.exec(c);){var l=j[1].toLowerCase();j=j[2]||j[3]||j[4]||"";n[l]=!j&&d[l]?l:CKEDITOR.tools.htmlDecodeAttr(j)}this.onTagOpen(e,n,k);!h&&CKEDITOR.dtd.$cdata[e]&&(h=[])}}else if(e=c[2])this.onComment(e)}if(b.length> -f)this.onText(b.substring(f,b.length))}}})(); -CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("<",a)},openTagClose:function(a,d){d?this._.output.push(" />"):this._.output.push(">")},attribute:function(a,d){typeof d=="string"&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'="',d,'"')},closeTag:function(a){this._.output.push("</",a,">")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("<\!--",a,"--\>")},write:function(a){this._.output.push(a)}, -reset:function(){this._.output=[];this._.indent=false},getHtml:function(a){var d=this._.output.join("");a&&this.reset();return d}}});"use strict"; -(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,d=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(d,1);this.parent=null},replaceWith:function(a){var d=this.parent.children,b=CKEDITOR.tools.indexOf(d,this),c=a.previous=this.previous,e=a.next=this.next;c&&(c.next=a);e&&(e.previous=a);d[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var d=a.parent.children, -b=CKEDITOR.tools.indexOf(d,a),c=a.next;d.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var d=a.parent.children,b=CKEDITOR.tools.indexOf(d,a);d.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var d=typeof a=="function"?a:typeof a=="string"?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&& -b.type==CKEDITOR.NODE_ELEMENT;){if(d(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:false}}; -CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,d){var b=this.value;if(!(b=a.onComment(d,b,this))){this.remove();return false}if(typeof b!="string"){this.replaceWith(b);return false}this.value=b;return true},writeHtml:function(a,d){d&&this.filter(d);a.comment(this.value)}});"use strict"; -(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,d){if(!(this.value=a.onText(d,this.value,this))){this.remove();return false}},writeHtml:function(a,d){d&&this.filter(d);a.text(this.value)}})})();"use strict"; +(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,c={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var f,d,e=0,g;f=this._.htmlPartsRegex.exec(b);){d=f.index;if(d>e){e=b.substring(e,d);if(g)g.push(e);else this.onText(e)}e= +this._.htmlPartsRegex.lastIndex;if(d=f[1]){d=d.toLowerCase();if(g&&CKEDITOR.dtd.$cdata[d]){this.onCDATA(g.join(""));g=null}if(!g){this.onTagClose(d);continue}}if(g)g.push(f[0]);else if(d=f[3]){d=d.toLowerCase();if(!/="/.test(d)){var n={},h;f=f[4];var i=!!(f&&f.charAt(f.length-1)=="/");if(f)for(;h=a.exec(f);){var m=h[1].toLowerCase();h=h[2]||h[3]||h[4]||"";n[m]=!h&&c[m]?m:CKEDITOR.tools.htmlDecodeAttr(h)}this.onTagOpen(d,n,i);!g&&CKEDITOR.dtd.$cdata[d]&&(g=[])}}else if(d=f[2])this.onComment(d)}if(b.length> +e)this.onText(b.substring(e,b.length))}}})(); +CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("<",a)},openTagClose:function(a,c){c?this._.output.push(" />"):this._.output.push(">")},attribute:function(a,c){typeof c=="string"&&(c=CKEDITOR.tools.htmlEncodeAttr(c));this._.output.push(" ",a,'="',c,'"')},closeTag:function(a){this._.output.push("</",a,">")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("<\!--",a,"--\>")},write:function(a){this._.output.push(a)}, +reset:function(){this._.output=[];this._.indent=false},getHtml:function(a){var c=this._.output.join("");a&&this.reset();return c}}});"use strict"; +(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,c=CKEDITOR.tools.indexOf(a,this),b=this.previous,f=this.next;b&&(b.next=f);f&&(f.previous=b);a.splice(c,1);this.parent=null},replaceWith:function(a){var c=this.parent.children,b=CKEDITOR.tools.indexOf(c,this),f=a.previous=this.previous,d=a.next=this.next;f&&(f.next=a);d&&(d.previous=a);c[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var c=a.parent.children, +b=CKEDITOR.tools.indexOf(c,a),f=a.next;c.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;f&&(f.previous=this);this.parent=a.parent},insertBefore:function(a){var c=a.parent.children,b=CKEDITOR.tools.indexOf(c,a);c.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var c=typeof a=="function"?a:typeof a=="string"?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&& +b.type==CKEDITOR.NODE_ELEMENT;){if(c(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:false}}; +CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,c){var b=this.value;if(!(b=a.onComment(c,b,this))){this.remove();return false}if(typeof b!="string"){this.replaceWith(b);return false}this.value=b;return true},writeHtml:function(a,c){c&&this.filter(c);a.comment(this.value)}});"use strict"; +(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,c){if(!(this.value=a.onText(c,this.value,this))){this.remove();return false}},writeHtml:function(a,c){c&&this.filter(c);a.text(this.value)}})})();"use strict"; (function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false}}; -(function(){function a(a){return a.attributes["data-cke-survive"]?false:a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(e,f,h){function n(a){var b;if(r.length>0)for(var c=0;c<r.length;c++){var e= -r[c],d=e.name,i=CKEDITOR.dtd[d],g=m.name&&CKEDITOR.dtd[m.name];if((!g||g[d])&&(!a||!i||i[a]||!CKEDITOR.dtd[a])){if(!b){j();b=1}e=e.clone();e.parent=m;m=e;r.splice(c,1);c--}else if(d==m.name){l(m,m.parent,1);c--}}}function j(){for(;w.length;)l(w.shift(),m)}function k(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var b=a.children.length,c=a.children[b-1],e;if(c&&c.type==CKEDITOR.NODE_TEXT)(e=CKEDITOR.tools.rtrim(c.value))?c.value=e:a.children.length=b-1}}function l(b,c,e){var c=c||m||g, -d=m;if(b.previous===void 0){if(u(c,b)){m=c;t.onTagOpen(h,{});b.returnPoint=c=m}k(b);(!a(b)||b.children.length)&&c.add(b);b.name=="pre"&&(q=false);b.name=="textarea"&&(i=false)}if(b.returnPoint){m=b.returnPoint;delete b.returnPoint}else m=e?c:d}function u(a,b){if((a==g||a.name=="body")&&h&&(!a.name||CKEDITOR.dtd[a.name][h])){var c,e;return(c=b.attributes&&(e=b.attributes["data-cke-real-element-type"])?e:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}} -function s(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||a=="dt"&&b=="dd"||a=="dd"&&b=="dt":false}var t=new CKEDITOR.htmlParser,g=f instanceof CKEDITOR.htmlParser.element?f:typeof f=="string"?new CKEDITOR.htmlParser.element(f):new CKEDITOR.htmlParser.fragment,r=[],w=[],m=g,i=g.name=="textarea",q=g.name=="pre";t.onTagOpen=function(e,g,f,h){g=new CKEDITOR.htmlParser.element(e,g);if(g.isUnknown&&f)g.isEmpty=true;g.isOptionalClose=h;if(a(g))r.push(g);else{if(e=="pre")q= -true;else{if(e=="br"&&q){m.add(new CKEDITOR.htmlParser.text("\n"));return}e=="textarea"&&(i=true)}if(e=="br")w.push(g);else{for(;;){h=(f=m.name)?CKEDITOR.dtd[f]||(m._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!g.isUnknown&&!m.isUnknown&&!h[e])if(m.isOptionalClose)t.onTagClose(f);else if(e in b&&f in b){f=m.children;(f=f[f.length-1])&&f.name=="li"||l(f=new CKEDITOR.htmlParser.element("li"),m);!g.returnPoint&&(g.returnPoint=m);m=f}else if(e in CKEDITOR.dtd.$listItem&&!s(e,f))t.onTagOpen(e== -"li"?"ul":"dl",{},0,1);else if(f in d&&!s(e,f)){!g.returnPoint&&(g.returnPoint=m);m=m.parent}else{f in CKEDITOR.dtd.$inline&&r.unshift(m);if(m.parent)l(m,m.parent,1);else{g.isOrphan=1;break}}else break}n(e);j();g.parent=m;g.isEmpty?l(g):m=g}}};t.onTagClose=function(a){for(var b=r.length-1;b>=0;b--)if(a==r[b].name){r.splice(b,1);return}for(var c=[],e=[],d=m;d!=g&&d.name!=a;){d._.isBlockLike||e.unshift(d);c.push(d);d=d.returnPoint||d.parent}if(d!=g){for(b=0;b<c.length;b++){var i=c[b];l(i,i.parent)}m= -d;d._.isBlockLike&&j();l(d,d.parent);if(d==m)m=m.parent;r=r.concat(e)}a=="body"&&(h=false)};t.onText=function(a){if((!m._.hasInlineStarted||w.length)&&!q&&!i){a=CKEDITOR.tools.ltrim(a);if(a.length===0)return}var e=m.name,g=e?CKEDITOR.dtd[e]||(m._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!i&&!g["#"]&&e in d){t.onTagOpen(e in b?"li":e=="dl"?"dd":e=="table"?"tr":e=="tr"?"td":"");t.onText(a)}else{j();n();!q&&!i&&(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a); -if(u(m,a))this.onTagOpen(h,{},0,1);m.add(a)}};t.onCDATA=function(a){m.add(new CKEDITOR.htmlParser.cdata(a))};t.onComment=function(a){j();n();m.add(new CKEDITOR.htmlParser.comment(a))};t.parse(e);for(j();m!=g;)l(m,m.parent,1);k(g);return g};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=b>0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length=== -0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,false,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)this.children[b].filter(a, -c)===false&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var d=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,false,d);b=0;c=this.children;for(d=c.length;b<d;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var d=a(this);if(d!==false)for(var c=this.children,j=0;j<c.length;j++){d=c[j];d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):(!b||d.type==b)&&a(d)}},getFilterContext:function(a){return a|| +(function(){function a(a){return a.attributes["data-cke-survive"]?false:a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var c=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},f=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(e,g,n){function h(a){var b;if(u.length>0)for(var d=0;d<u.length;d++){var c=u[d],e=c.name,f=CKEDITOR.dtd[e],j=k.name&&CKEDITOR.dtd[k.name];if((!j||j[e])&&(!a||!f||f[a]||!CKEDITOR.dtd[a])){if(!b){i();b=1}c=c.clone();c.parent=k;k=c;u.splice(d,1);d--}else if(e==k.name){p(k,k.parent,1);d--}}}function i(){for(;A.length;)p(A.shift(),k)}function m(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var b=a.children.length,d=a.children[b-1],c;if(d&&d.type==CKEDITOR.NODE_TEXT)(c=CKEDITOR.tools.rtrim(d.value))? +d.value=c:a.children.length=b-1}}function p(b,d,c){var d=d||k||o,e=k;if(b.previous===void 0){if(s(d,b)){k=d;q.onTagOpen(n,{});b.returnPoint=d=k}m(b);(!a(b)||b.children.length)&&d.add(b);b.name=="pre"&&(j=false);b.name=="textarea"&&(l=false)}if(b.returnPoint){k=b.returnPoint;delete b.returnPoint}else k=c?d:e}function s(a,b){if((a==o||a.name=="body")&&n&&(!a.name||CKEDITOR.dtd[a.name][n])){var d,c;return(d=b.attributes&&(c=b.attributes["data-cke-real-element-type"])?c:b.name)&&d in CKEDITOR.dtd.$inline&& +!(d in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function x(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||a=="dt"&&b=="dd"||a=="dd"&&b=="dt":false}var q=new CKEDITOR.htmlParser,o=g instanceof CKEDITOR.htmlParser.element?g:typeof g=="string"?new CKEDITOR.htmlParser.element(g):new CKEDITOR.htmlParser.fragment,u=[],A=[],k=o,l=o.name=="textarea",j=o.name=="pre";q.onTagOpen=function(d,e,g,o){e=new CKEDITOR.htmlParser.element(d,e);if(e.isUnknown&&g)e.isEmpty= +true;e.isOptionalClose=o;if(a(e))u.push(e);else{if(d=="pre")j=true;else{if(d=="br"&&j){k.add(new CKEDITOR.htmlParser.text("\n"));return}d=="textarea"&&(l=true)}if(d=="br")A.push(e);else{for(;;){o=(g=k.name)?CKEDITOR.dtd[g]||(k._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):f;if(!e.isUnknown&&!k.isUnknown&&!o[d])if(k.isOptionalClose)q.onTagClose(g);else if(d in b&&g in b){g=k.children;(g=g[g.length-1])&&g.name=="li"||p(g=new CKEDITOR.htmlParser.element("li"),k);!e.returnPoint&&(e.returnPoint=k); +k=g}else if(d in CKEDITOR.dtd.$listItem&&!x(d,g))q.onTagOpen(d=="li"?"ul":"dl",{},0,1);else if(g in c&&!x(d,g)){!e.returnPoint&&(e.returnPoint=k);k=k.parent}else{g in CKEDITOR.dtd.$inline&&u.unshift(k);if(k.parent)p(k,k.parent,1);else{e.isOrphan=1;break}}else break}h(d);i();e.parent=k;e.isEmpty?p(e):k=e}}};q.onTagClose=function(a){for(var b=u.length-1;b>=0;b--)if(a==u[b].name){u.splice(b,1);return}for(var d=[],c=[],e=k;e!=o&&e.name!=a;){e._.isBlockLike||c.unshift(e);d.push(e);e=e.returnPoint||e.parent}if(e!= +o){for(b=0;b<d.length;b++){var f=d[b];p(f,f.parent)}k=e;e._.isBlockLike&&i();p(e,e.parent);if(e==k)k=k.parent;u=u.concat(c)}a=="body"&&(n=false)};q.onText=function(a){if((!k._.hasInlineStarted||A.length)&&!j&&!l){a=CKEDITOR.tools.ltrim(a);if(a.length===0)return}var b=k.name,e=b?CKEDITOR.dtd[b]||(k._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):f;if(!l&&!e["#"]&&b in c){q.onTagOpen(d[b]||"");q.onText(a)}else{i();h();!j&&!l&&(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a); +if(s(k,a))this.onTagOpen(n,{},0,1);k.add(a)}};q.onCDATA=function(a){k.add(new CKEDITOR.htmlParser.cdata(a))};q.onComment=function(a){i();h();k.add(new CKEDITOR.htmlParser.comment(a))};q.parse(e);for(i();k!=o;)p(k,k.parent,1);m(o);return o};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var d=b>0?this.children[b-1]:null;if(d){if(a._.isBlockLike&&d.type==CKEDITOR.NODE_TEXT){d.value=CKEDITOR.tools.rtrim(d.value);if(d.value.length=== +0){this.children.pop();this.add(a);return}}d.next=a}a.previous=d;a.parent=this;this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,false,b)},filterChildren:function(a,b,d){if(this.childrenFilteredBy!=a.id){d=this.getFilterContext(d);if(b&&!this.parent)a.onRoot(d,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)this.children[b].filter(a, +d)===false&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,d){var c=this.getFilterContext();if(d&&!this.parent&&b)b.onRoot(c,this);b&&this.filterChildren(b,false,c);b=0;d=this.children;for(c=d.length;b<c;b++)d[b].writeHtml(a)},forEach:function(a,b,d){if(!d&&(!b||this.type==b))var c=a(this);if(c!==false)for(var d=this.children,f=0;f<d.length;f++){c=d[f];c.type==CKEDITOR.NODE_ELEMENT?c.forEach(a,b):(!b||c.type==b)&&a(c)}},getFilterContext:function(a){return a|| {}}}})();"use strict"; -(function(){function a(){this.rules=[]}function d(b,c,e,d){var h,n;for(h in c){(n=b[h])||(n=b[h]=new a);n.add(c[h],e,d)}}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},proto:{addRules:function(a,c){var e;if(typeof c=="number")e=c;else if(c&&"priority"in -c)e=c.priority;typeof e!="number"&&(e=10);typeof c!="object"&&(c={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,e,c);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,e,c);a.elements&&d(this.elementsRules,a.elements,e,c);a.attributes&&d(this.attributesRules,a.attributes,e,c);a.text&&this.textRules.add(a.text,e,c);a.comment&&this.commentRules.add(a.comment,e,c);a.root&&this.rootRules.add(a.root,e,c)},applyTo:function(a){a.filter(this)},onElementName:function(a,c){return this.elementNameRules.execOnName(a, -c)},onAttributeName:function(a,c){return this.attributeNameRules.execOnName(a,c)},onText:function(a,c){return this.textRules.exec(a,c)},onComment:function(a,c,e){return this.commentRules.exec(a,c,e)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var e=[this.elementsRules["^"],this.elementsRules[c.name],this.elementsRules.$],d,h=0;h<3;h++)if(d=e[h]){d=d.exec(a,c,this);if(d===false)return null;if(d&&d!=c)return this.onNode(a,d);if(c.parent&&!c.name)break}return c}, -onNode:function(a,c){var e=c.type;return e==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):e==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):e==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,e,d){return(e=this.attributesRules[e])?e.exec(a,d,c,this):d}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,e){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:e})},addMany:function(a, -c,e){for(var d=[this.findIndex(c),0],h=0,n=a.length;h<n;h++)d.push({value:a[h],priority:c,options:e});this.rules.splice.apply(this.rules,d)},findIndex:function(a){for(var c=this.rules,e=c.length-1;e>=0&&a<c[e].priority;)e--;return e+1},exec:function(a,c){var e=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,d=Array.prototype.slice.call(arguments,1),h=this.rules,n=h.length,j,k,l,u;for(u=0;u<n;u++){if(e){j=c.type;k=c.name}l=h[u];if(!a.nonEditable||l.options.applyToAll){l= -l.value.apply(null,d);if(l===false)return l;if(e){if(l&&(l.name!=k||l.type!=j))return l}else if(typeof l!="string")return l;l!=void 0&&(d[0]=c=l)}}return c},execOnName:function(a,c){for(var e=0,d=this.rules,h=d.length,n;c&&e<h;e++){n=d[e];if(!a.nonEditable||n.options.applyToAll)c=c.replace(n.value[0],n.value[1])}return c}}})(); -(function(){function a(a,d){function g(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function m(a,e){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var i=[],m=b(d),z,h;if(m)for(q(m,1)&&i.push(m);m;){if(f(m)&&(z=c(m))&&q(z))if((h=c(z))&&!f(h))i.push(z);else{g(t).insertAfter(z);z.remove()}m=m.previous}for(m=0;m<i.length;m++)i[m].remove();if(i=CKEDITOR.env.opera&&!a||(typeof e=="function"?e(d)!== -false:e))if(!t&&!CKEDITOR.env.needsBrFiller&&d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)i=false;else if(!t&&!CKEDITOR.env.needsBrFiller&&(document.documentMode>7||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem))i=false;else{i=b(d);i=!i||d.name=="form"&&i.name=="input"}i&&d.add(g(a))}}}function q(a,b){if((!t||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var c;if(a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(w))){if(c.index){(new CKEDITOR.htmlParser.text(a.value.substring(0, -c.index))).insertBefore(a);a.value=c[0]}if(!CKEDITOR.env.needsBrFiller&&t&&(!b||a.parent.name in v))return true;if(!t)if((c=a.previous)&&c.name=="br"||!c||f(c))return true}return false}var p={elements:{}},t=d=="html",v=CKEDITOR.tools.extend({},o),j;for(j in v)"#"in i[j]||delete v[j];for(j in v)p.elements[j]=m(t,a.config.fillEmptyBlocks!==false);p.root=m(t);p.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in -d)delete d["data-cke-bogus"];else{for(d=b.next;d&&e(d);)d=d.next;var i=c(b);!d&&f(b.parent)?h(b.parent,g(a)):f(d)&&(i&&!f(i))&&g(a).insertBefore(d)}}}}(t);return p}function d(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&& -a.attributes["data-cke-bookmark"]}function f(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in o||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function n(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function j(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}} -function k(a){return a.replace(I,function(a,b,c){return"<"+b+c.replace(C,function(a,b){if(!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1){a=a.slice(1);return" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a}return a})+">"})}function l(a,b){return a.replace(b,function(a,b,c){a.indexOf("<textarea")===0&&(a=b+t(c).replace(/</g,"<").replace(/>/g,">")+"</textarea>");return"<cke:encoded>"+encodeURIComponent(a)+"</cke:encoded>"})}function u(a){return a.replace(y,function(a,b){return decodeURIComponent(b)})} -function s(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+m+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function t(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function g(a,b){var c=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function r(a, -b){for(var c=[],e=b.config.protectedSource,d=b._.dataStore||(b._.dataStore={id:1}),i=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,e=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(e),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),g=0;g<e.length;g++)a=a.replace(e[g],function(a){a=a.replace(i,function(a,b,e){return c[e]});return/cke_temp(comment)?/.test(a)?a:"<\!--{cke_temp}"+(c.push(a)-1)+"--\>"});a=a.replace(i,function(a,b,e){return"<\!--"+ -m+(b?"{C}":"")+encodeURIComponent(c[e]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/(['"]).*?\1/g,function(a){return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){d[d.id]=decodeURIComponent(b);return"{cke_protected_"+d.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(b){var c,e,i=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(B);c.addRules(p,{applyToAll:true}); -c.addRules(a(b,"data"),{applyToAll:true});e.addRules(L);e.addRules(E,{applyToAll:true});e.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,c=r(c,b),c=l(c,M),c=k(c),c=l(c,x),c=c.replace(v,"$1cke:$2"),c=c.replace(F,"<cke:$1$2></cke:$1>"),c=CKEDITOR.env.opera?c:c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),e=a.context||b.editable().getName(),i;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";c="<pre>"+c+"</pre>";i=1}e=b.document.createElement(e); -e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," ");i&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(D,"$1$2");c=u(c);c=t(c);a.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,a.fixForBody===false?false:d(a.enterMode,b.config.autoParagraph))},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(i.dataFilter, -true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=s(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,d(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(i.htmlFilter, -true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,e=i.writer;e.reset();c.writeChildrenHtml(e);c=e.getHtml(true);c=t(c);c=g(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,e){var d=this.editor,i,g,f;if(b&&typeof b=="object"){i=b.context;c=b.fixForBody;e=b.dontFilter;g=b.filter;f=b.enterMode}else i=b;!i&&i!==null&&(i=d.editable().getName()); -return d.fire("toHtml",{dataValue:a,context:i,fixForBody:c,dontFilter:e,filter:g||d.filter,enterMode:f||d.enterMode}).dataValue},toDataFormat:function(a,b){var c,e,d;if(b){c=b.context;e=b.filter;d=b.enterMode}!c&&c!==null&&(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:e||this.editor.filter,context:c,enterMode:d||this.editor.enterMode}).dataValue}};var w=/(?: |\xa0)$/,m="{cke_protected}",i=CKEDITOR.dtd,q=["caption","colgroup","col","thead","tfoot", -"tbody"],o=CKEDITOR.tools.extend({},i.$blockLimit,i.$block),B={elements:{input:n,textarea:n}},p={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},L={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;if(c)a.attributes.width=c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},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 false;for(var c=["name","href","src"],e,d=0;d<c.length;d++){e="data-cke-saved-"+c[d];e in b&&delete b[c[d]]}}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,e;if(a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type){c=CKEDITOR.tools.indexOf(q,a.name);e=CKEDITOR.tools.indexOf(q,b.name)}if(!(c>-1&&e>-1&&c!=e)){c=a.parent?a.getIndex(): --1;e=b.parent?b.getIndex():-1}return c>e?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&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];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b= -a.children[0];!b&&h(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:j,textarea:j},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)E.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};var I=/<(a|area|img|input|source)\b([^>]*)>/gi,C=/\s(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,x=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, -M=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,y=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,v=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,D=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,F=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict"; -CKEDITOR.htmlParser.element=function(a,d){this.name=a;this.attributes=d||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}; -CKEDITOR.htmlParser.cssStyle=function(a){var d={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,e){c=="font-family"&&(e=e.replace(/["']/g,""));d[c.toLowerCase()]=e});return{rules:d,populate:function(a){var c=this.toString();if(c)a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c},toString:function(){var a=[],c; -for(c in d)d[c]&&a.push(c,":",d[c],";");return a.join("")}}}; -(function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&(typeof a=="string"?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,h,n,b=d.getFilterContext(b);if(b.off)return true; -if(!d.parent)a.onRoot(b,d);for(;;){h=d.name;if(!(n=a.onElementName(b,h))){this.remove();return false}d.name=n;if(!(d=a.onElement(b,d))){this.remove();return false}if(d!==this){this.replaceWith(d);return false}if(d.name==h)break;if(d.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(d);return false}if(!d.name){this.replaceWithChildren();return false}}h=d.attributes;var j,k;for(j in h){k=j;for(n=h[j];;)if(k=a.onAttributeName(b,j))if(k!=j){delete h[j];j=k}else break;else{delete h[j];break}k&&((n=a.onAttribute(b, -d,k,n))===false?delete h[k]:h[k]=n)}d.isEmpty||this.filterChildren(a,false,b);return true},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var f=this.name,h=[],n=this.attributes,j,k;a.openTag(f,n);for(j in n)h.push([j,n[j]]);a.sortAttributes&&h.sort(d);j=0;for(k=h.length;j<k;j++){n=h[j];a.attribute(n[0],n[1])}a.openTagClose(f,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(f)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a= -this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;typeof b!="function"&&(b=a(b));for(var e=0,d=this.children.length;e<d;++e)if(b(this.children[e]))return this.children[e];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){for(var a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children,b=0, -d=a.length;b<d;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),d=this.clone(),h=0;h<b.length;++h)b[h].parent=d;d.children=b;if(b[0])b[0].previous=null;if(a>0)this.children[a-1].next=null;this.parent.add(d,this.getIndex()+1);return d},removeClass:function(a){var b=this.attributes["class"];if(b)(b=CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+ -"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable=="false"&&b.push("nonEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),d=0;d<b.length;d=d+2)a[b[d]]=b[d+ -1];return a}},true)})();(function(){var a={};CKEDITOR.template=function(d){if(a[d])this.output=a[d];else{var b=d.replace(/'/g,"\\'").replace(/{([^}]+)}/g,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[d]=Function("data","buffer","return buffer?buffer.push('"+b+"'):['"+b+"'].join('');")}}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document); +(function(){function a(){this.rules=[]}function c(b,c,d,e){var g,n;for(g in c){(n=b[g])||(n=b[g]=new a);n.add(c[g],d,e)}}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},proto:{addRules:function(a,f){var d;if(typeof f=="number")d=f;else if(f&&"priority"in +f)d=f.priority;typeof d!="number"&&(d=10);typeof f!="object"&&(f={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,d,f);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,d,f);a.elements&&c(this.elementsRules,a.elements,d,f);a.attributes&&c(this.attributesRules,a.attributes,d,f);a.text&&this.textRules.add(a.text,d,f);a.comment&&this.commentRules.add(a.comment,d,f);a.root&&this.rootRules.add(a.root,d,f)},applyTo:function(a){a.filter(this)},onElementName:function(a,c){return this.elementNameRules.execOnName(a, +c)},onAttributeName:function(a,c){return this.attributeNameRules.execOnName(a,c)},onText:function(a,c,d){return this.textRules.exec(a,c,d)},onComment:function(a,c,d){return this.commentRules.exec(a,c,d)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var d=[this.elementsRules["^"],this.elementsRules[c.name],this.elementsRules.$],e,g=0;g<3;g++)if(e=d[g]){e=e.exec(a,c,this);if(e===false)return null;if(e&&e!=c)return this.onNode(a,e);if(c.parent&&!c.name)break}return c}, +onNode:function(a,c){var d=c.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,d,e){return(d=this.attributesRules[d])?d.exec(a,e,c,this):e}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,d){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:d})},addMany:function(a, +c,d){for(var e=[this.findIndex(c),0],g=0,n=a.length;g<n;g++)e.push({value:a[g],priority:c,options:d});this.rules.splice.apply(this.rules,e)},findIndex:function(a){for(var c=this.rules,d=c.length-1;d>=0&&a<c[d].priority;)d--;return d+1},exec:function(a,c){var d=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,e=Array.prototype.slice.call(arguments,1),g=this.rules,n=g.length,h,i,m,p;for(p=0;p<n;p++){if(d){h=c.type;i=c.name}m=g[p];if(!(a.nonEditable&&!m.options.applyToAll|| +a.nestedEditable&&m.options.excludeNestedEditable)){m=m.value.apply(null,e);if(m===false||d&&m&&(m.name!=i||m.type!=h))return m;m!=void 0&&(e[0]=c=m)}}return c},execOnName:function(a,c){for(var d=0,e=this.rules,g=e.length,n;c&&d<g;d++){n=e[d];!(a.nonEditable&&!n.options.applyToAll||a.nestedEditable&&n.options.excludeNestedEditable)&&(c=c.replace(n.value[0],n.value[1]))}return c}}})(); +(function(){function a(a,c){function l(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function o(a,d){return function(c){if(c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var j=[],k=b(c),o,g;if(k)for(r(k,1)&&j.push(k);k;){if(e(k)&&(o=f(k))&&r(o))if((g=f(o))&&!e(g))j.push(o);else{l(v).insertAfter(o);o.remove()}k=k.previous}for(k=0;k<j.length;k++)j[k].remove();if(j=(typeof d=="function"?d(c):d)!==false)if(!v&&!CKEDITOR.env.needsBrFiller&& +c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)j=false;else if(!v&&!CKEDITOR.env.needsBrFiller&&(document.documentMode>7||c.name in CKEDITOR.dtd.tr||c.name in CKEDITOR.dtd.$listItem))j=false;else{j=b(c);j=!j||c.name=="form"&&j.name=="input"}j&&c.add(l(a))}}}function r(a,b){if((!v||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var d;if(a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(u))){if(d.index){(new CKEDITOR.htmlParser.text(a.value.substring(0, +d.index))).insertBefore(a);a.value=d[0]}if(!CKEDITOR.env.needsBrFiller&&v&&(!b||a.parent.name in h))return true;if(!v)if((d=a.previous)&&d.name=="br"||!d||e(d))return true}return false}var w={elements:{}},v=c=="html",h=CKEDITOR.tools.extend({},j),t;for(t in h)"#"in k[t]||delete h[t];for(t in h)w.elements[t]=o(v,a.config.fillEmptyBlocks);w.root=o(v,false);w.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.attributes;if("data-cke-bogus"in c||"data-cke-eol"in +c)delete c["data-cke-bogus"];else{for(c=b.next;c&&d(c);)c=c.next;var j=f(b);!c&&e(b.parent)?g(b.parent,l(a)):e(c)&&(j&&!e(j))&&l(a).insertBefore(c)}}}}(v);return w}function c(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function f(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&& +a.attributes["data-cke-bookmark"]}function e(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in j||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function g(a,b){var d=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(d){d.next=b;b.previous=d}}function n(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function h(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}} +function i(a){return a.replace(S,function(a,b,d){return"<"+b+d.replace(F,function(a,b){return D.test(b)&&d.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function m(a,b){return a.replace(b,function(a,b,d){a.indexOf("<textarea")===0&&(a=b+x(d).replace(/</g,"<").replace(/>/g,">")+"</textarea>");return"<cke:encoded>"+encodeURIComponent(a)+"</cke:encoded>"})}function p(a){return a.replace(w,function(a,b){return decodeURIComponent(b)})}function s(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g, +function(a){return"<\!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function x(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function q(a,b){var d=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function o(a,b){for(var d=[],c=b.config.protectedSource,e=b._.dataStore||(b._.dataStore= +{id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,c=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(c),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(d.push(a)-1)+"--\>"}),j=0;j<c.length;j++)a=a.replace(c[j],function(a){a=a.replace(f,function(a,b,c){return d[c]});return/cke_temp(comment)?/.test(a)?a:"<\!--{cke_temp}"+(d.push(a)-1)+"--\>"});a=a.replace(f,function(a,b,c){return"<\!--"+A+(b?"{C}":"")+encodeURIComponent(d[c]).replace(/--/g, +"%2D%2D")+"--\>"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g,function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,e){return"<"+d+c+">"+q(x(e),b)+"</"+d+">"})}CKEDITOR.htmlDataProcessor=function(b){var d,e,f=this;this.editor=b;this.dataFilter=d=new CKEDITOR.htmlParser.filter; +this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(v);d.addRules(I,{applyToAll:true});d.addRules(a(b,"data"),{applyToAll:true});e.addRules(r);e.addRules(O,{applyToAll:true});e.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,d=a.dataValue,d=o(d,b),d=m(d,J),d=i(d),d=m(d,L),d=d.replace(z,"$1cke:$2"),d=d.replace(E,"<cke:$1$2></cke:$1>"),d=d.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),d=d.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi, +"$1data-cke-"+CKEDITOR.rnd+"-$2"),e=a.context||b.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";d="<pre>"+d+"</pre>";f=1}e=b.document.createElement(e);e.setHtml("a"+d);d=e.getHtml().substr(1);d=d.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(d=d.replace(/^<pre>|<\/pre>$/gi,""));d=d.replace(t,"$1$2");d=p(d);d=x(d);a.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.context,a.fixForBody===false?false:c(a.enterMode,b.config.autoParagraph))},null,null, +5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(true);a.dataValue=s(b)},null,null,15);b.on("toDataFormat",function(a){var d=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^<br *\/?>/i, +""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.data.context,c(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var d=a.data.dataValue,c=f.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(true);d=x(d);d=q(d,b);a.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype= +{toHtml:function(a,b,d,c){var e=this.editor,f,j,k;if(b&&typeof b=="object"){f=b.context;d=b.fixForBody;c=b.dontFilter;j=b.filter;k=b.enterMode}else f=b;!f&&f!==null&&(f=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:f,fixForBody:d,dontFilter:c,filter:j||e.filter,enterMode:k||e.enterMode}).dataValue},toDataFormat:function(a,b){var d,c,e;if(b){d=b.context;c=b.filter;e=b.enterMode}!d&&d!==null&&(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a, +filter:c||this.editor.filter,context:d,enterMode:e||this.editor.enterMode}).dataValue}};var u=/(?: |\xa0)$/,A="{cke_protected}",k=CKEDITOR.dtd,l=["caption","colgroup","col","thead","tfoot","tbody"],j=CKEDITOR.tools.extend({},k.$blockLimit,k.$block),v={elements:{input:n,textarea:n}},I={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},r={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var d=b.attributes.width,b=b.attributes.height;if(d)a.attributes.width= +d;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},O={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 false;for(var d=["name","href","src"],c,e=0;e<d.length;e++){c="data-cke-saved-"+d[e];c in b&&delete b[d[e]]}}return a},table:function(a){a.children.slice(0).sort(function(a, +b){var d,c;if(a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type){d=CKEDITOR.tools.indexOf(l,a.name);c=CKEDITOR.tools.indexOf(l,b.name)}if(!(d>-1&&c>-1&&d!=c)){d=a.parent?a.getIndex():-1;c=b.parent?b.getIndex():-1}return d>c?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&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];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];!b&&g(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:h,textarea:h},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)O.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})}; +var S=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/^(href|src|name)$/i,L=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,J=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,w=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,z=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,t=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,E=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict"; +CKEDITOR.htmlParser.element=function(a,c){this.name=a;this.attributes=c||{};this.children=[];var b=a||"",f=b.match(/^cke:(.*)/);f&&(b=f[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}; +CKEDITOR.htmlParser.cssStyle=function(a){var c={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,f,d){f=="font-family"&&(d=d.replace(/["']/g,""));c[f.toLowerCase()]=d});return{rules:c,populate:function(a){var c=this.toString();if(c)a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c},toString:function(){var a=[],f; +for(f in c)c[f]&&a.push(f,":",c[f],";");return a.join("")}}}; +(function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&(typeof a=="string"?b.name==a:b.name in a)}}var c=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var c=this,g,n,b=c.getFilterContext(b);if(b.off)return true; +if(!c.parent)a.onRoot(b,c);for(;;){g=c.name;if(!(n=a.onElementName(b,g))){this.remove();return false}c.name=n;if(!(c=a.onElement(b,c))){this.remove();return false}if(c!==this){this.replaceWith(c);return false}if(c.name==g)break;if(c.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(c);return false}if(!c.name){this.replaceWithChildren();return false}}g=c.attributes;var h,i;for(h in g){i=h;for(n=g[h];;)if(i=a.onAttributeName(b,h))if(i!=h){delete g[h];h=i}else break;else{delete g[h];break}i&&((n=a.onAttribute(b, +c,i,n))===false?delete g[i]:g[i]=n)}c.isEmpty||this.filterChildren(a,false,b);return true},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var e=this.name,g=[],n=this.attributes,h,i;a.openTag(e,n);for(h in n)g.push([h,n[h]]);a.sortAttributes&&g.sort(c);h=0;for(i=g.length;h<i;h++){n=g[h];a.attribute(n[0],n[1])}a.openTagClose(e,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(e)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a= +this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;typeof b!="function"&&(b=a(b));for(var d=0,c=this.children.length;d<c;++d)if(b(this.children[d]))return this.children[d];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){for(var a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children,b=0, +c=a.length;b<c;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),c=this.clone(),g=0;g<b.length;++g)b[g].parent=c;c.children=b;if(b[0])b[0].previous=null;if(a>0)this.children[a-1].next=null;this.parent.add(c,this.getIndex()+1);return c},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+ +a}},removeClass:function(a){var b=this.attributes["class"];if(b)(b=CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false,nestedEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable== +"false"?b.push("nonEditable",true):a.nonEditable&&(!a.nestedEditable&&this.attributes.contenteditable=="true")&&b.push("nestedEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),c=0;c<b.length;c=c+2)a[b[c]]=b[c+1];return a}},true)})(); +(function(){var a={},c=/{([^}]+)}/g,b=/([\\'])/g,f=/\n/g,d=/\r/g;CKEDITOR.template=function(e){if(a[e])this.output=a[e];else{var g=e.replace(b,"\\$1").replace(f,"\\n").replace(d,"\\r").replace(c,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[e]=Function("data","buffer","return buffer?buffer.push('"+g+"'):['"+g+"'].join('');")}}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document); CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on("focus",function(){if(CKEDITOR.currentInstance!=a){CKEDITOR.currentInstance=a;CKEDITOR.fire("currentInstance")}});a.on("blur",function(){if(CKEDITOR.currentInstance==a){CKEDITOR.currentInstance=null;CKEDITOR.fire("currentInstance")}});CKEDITOR.fire("instance",null,a)};CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]}; -(function(){var a={};CKEDITOR.addTemplate=function(d,b){var c=a[d];if(c)return c;c={name:d,source:b};CKEDITOR.fire("template",c);return a[d]=new CKEDITOR.template(c.source)};CKEDITOR.getTemplate=function(d){return a[d]}})();(function(){var a=[];CKEDITOR.addCss=function(d){a.push(d)};CKEDITOR.getCss=function(){return a.join("\n")}})();CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")});CKEDITOR.TRISTATE_ON=1;CKEDITOR.TRISTATE_OFF=2; +(function(){var a={};CKEDITOR.addTemplate=function(c,b){var f=a[c];if(f)return f;f={name:c,source:b};CKEDITOR.fire("template",f);return a[c]=new CKEDITOR.template(f.source)};CKEDITOR.getTemplate=function(c){return a[c]}})();(function(){var a=[];CKEDITOR.addCss=function(c){a.push(c)};CKEDITOR.getCss=function(){return a.join("\n")}})();CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")});CKEDITOR.TRISTATE_ON=1;CKEDITOR.TRISTATE_OFF=2; CKEDITOR.TRISTATE_DISABLED=0; -(function(){CKEDITOR.inline=function(a,d){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(d,a,CKEDITOR.ELEMENT_MODE_INLINE),c=a.is("textarea")?a:null;if(c){b.setData(c.getValue(),null,true);a=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!b.readOnly+'" class="cke_textarea_inline">'+c.getValue()+"</div>",CKEDITOR.document); -a.insertAfter(c);c.hide();c.$.form&&b._attachToForm()}else b.setData(a.getHtml(),null,true);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){if(c){b.container.clearCustomData();b.container.remove();c.show()}b.element.clearCustomData();delete b.element});return b}; -CKEDITOR.inlineAll=function(){var a,d,b;for(b in CKEDITOR.dtd.$editable)for(var c=CKEDITOR.document.getElementsByTag(b),e=0,f=c.count();e<f;e++){a=c.getItem(e);if(a.getAttribute("contenteditable")=="true"){d={element:a,config:{}};CKEDITOR.fire("inline",d)!==false&&CKEDITOR.inline(a,d.config)}}};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor"; -(function(){function a(a,c,h,n){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var j=new CKEDITOR.editor(c,a,n);if(n==CKEDITOR.ELEMENT_MODE_REPLACE){a.setStyle("visibility","hidden");j._.required=a.hasAttribute("required");a.removeAttribute("required")}h&&j.setData(h,null,true);j.on("loaded",function(){b(j);n==CKEDITOR.ELEMENT_MODE_REPLACE&&(j.config.autoUpdateElement&& -a.$.form)&&j._attachToForm();j.setMode(j.config.startupMode,function(){j.resetDirty();j.status="ready";j.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,j)})});j.on("destroy",d);return j}function d(){var a=this.container,b=this.element;if(a){a.clearCustomData();a.remove()}if(b){b.clearCustomData();if(this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){b.show();this._.required&&b.setAttribute("required","required")}delete this.element}}function b(a){var b=a.name,d=a.element,n=a.elementMode, -j=a.fire("uiSpace",{space:"top",html:""}).html,k=a.fire("uiSpace",{space:"bottom",html:""}).html;c||(c=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>')); -b=CKEDITOR.dom.element.createFromHtml(c.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:[a.lang.editor,a.name].join(", "),topHtml:j?'<span id="'+a.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+j+"</span>":"",contentId:a.ui.spaceId("contents"),bottomHtml:k?'<span id="'+a.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+k+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(n==CKEDITOR.ELEMENT_MODE_REPLACE){d.hide(); -b.insertAfter(d)}else d.append(b);a.container=b;j&&a.ui.space("top").unselectable();k&&a.ui.space("bottom").unselectable();d=a.config.width;n=a.config.height;d&&b.setStyle("width",CKEDITOR.tools.cssLength(d));n&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(n));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,c){return a(b,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,c,d){return a(b, -c,d,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var c=null,d=a[b];if(d.name||d.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(d.className))continue}else if(typeof arguments[0]=="function"){c={};if(arguments[0](d,c)===false)continue}this.replace(d,c)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode= -function(a,b){var c=this,d=this._.modes;if(!(a==c.mode||!d||!d[a])){c.fire("beforeSetMode",a);if(c.mode){var j=c.checkDirty();c._.previousMode=c.mode;c.fire("beforeModeUnload");c.editable(0);c.ui.space("contents").setHtml("");c.mode=""}this._.modes[a](function(){c.mode=a;j!==void 0&&!j&&c.resetDirty();setTimeout(function(){c.fire("mode");b&&b.call(c)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,c,d){var j=this.container,k=this.ui.space("contents"),l=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement, -d=d?j.getChild(1):j;d.setSize("width",a,true);l&&(l.style.width="1%");k.setStyle("height",Math.max(b-(c?0:(d.$.offsetHeight||0)-(k.$.clientHeight||0)),0)+"px");l&&(l.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};var c;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg"; -(function(){function a(a){var b=a.editor,e=a.data.path,f=e.blockLimit,m=a.data.selection,i=m.getRanges()[0],q;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(m=d(m,e)){m.appendBogus();q=CKEDITOR.env.ie}if(b.config.autoParagraph!==false&&b.activeEnterMode!=CKEDITOR.ENTER_BR&&b.editable().equals(f)&&!e.block&&i.collapsed&&!i.getCommonAncestor().isReadOnly()){e=i.clone();e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);f=new CKEDITOR.dom.walker(e);f.guard=function(a){return!c(a)||a.type== -CKEDITOR.NODE_COMMENT||a.isReadOnly()};if(!f.checkForward()||e.checkStartOfBlock()&&e.checkEndOfBlock()){b=i.fixBlock(true,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p");if(!CKEDITOR.env.needsBrFiller)(b=b.getFirst(c))&&(b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?: |\xa0)$/))&&b.remove();q=1;a.cancel()}}q&&i.select()}function d(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,e=d&&d.getLast(c);if(d&&d.isBlockBoundary()&&(!e||!(e.type==CKEDITOR.NODE_ELEMENT&& -e.isBlockBoundary()))&&!d.is("pre")&&!d.getBogus())return d}function b(a){var b=a.data.getTarget();if(b.is("input")){b=b.getAttribute("type");(b=="submit"||b=="reset")&&a.data.preventDefault()}}function c(a){return l(a)&&u(a)}function e(a,b){return function(c){var d=CKEDITOR.dom.element.get(c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget);(!d||!b.equals(d)&&!b.contains(d))&&a.call(this,c)}}function f(a){var b,d=a.getRanges()[0],e=a.root,m={table:1,ul:1,ol:1,dl:1};if(d.startPath().contains(m)){var a= -function(a){return function(d,e){e&&(d.type==CKEDITOR.NODE_ELEMENT&&d.is(m))&&(b=d);if(!e&&c(d)&&(!a||!j(d)))return false}},i=d.clone();i.collapse(1);i.setStartAt(e,CKEDITOR.POSITION_AFTER_START);e=new CKEDITOR.dom.walker(i);e.guard=a();e.checkBackward();if(b){i=d.clone();i.collapse();i.setEndAt(b,CKEDITOR.POSITION_AFTER_END);e=new CKEDITOR.dom.walker(i);e.guard=a(true);b=false;e.checkForward();return b}}return null}function h(a){a.editor.focus();a.editor.fire("saveSnapshot")}function n(a,b){var c= -a.editor;!b&&c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},0)}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.hasFocus=false;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus){a=this.editor._.previousActive||this.getDocument().getActive();if(this.contains(a)){a.focus();return}}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive": -"focus"]()}catch(b){if(!CKEDITOR.env.ie)throw b;}if(CKEDITOR.env.safari&&!this.isInline()){a=CKEDITOR.document.getActive();a.equals(this.getWindow().getFrame())||this.getWindow().focus()}},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);if(CKEDITOR.env.ie&&/^focus|blur$/.exec(a)){a=a=="focus"?"focusin":"focusout";b=e(b,this);c[0]=a;c[1]=b}return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a,b,c,d,e,i){!this._.listeners&&(this._.listeners=[]);var f=Array.prototype.slice.call(arguments, -1),f=a.on.apply(a,f);this._.listeners.push(f);return f},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,b):this.removeAttribute(c)}},attachClass:function(a){var b=this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}},changeAttr:function(a,b){var c=this.getAttribute(a); -if(b!==c){!this._.attrChanges&&(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,b){h(this);s(this,b||"html",a)},insertText:function(a){h(this);var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:b.activeEnterMode,b=c==CKEDITOR.ENTER_BR,d=CKEDITOR.tools,a=d.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"    "),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var e=/\n{2}/g; -if(e.test(a))var i="<"+c+">",f="</"+c+">",a=i+a.replace(e,function(){return f+i})+f}a=a.replace(/\n/g,"<br>");b||(a=a.replace(RegExp("<br>(?=</"+c+">)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");s(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(), -i=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return false;b.deleteContents(1);var f,h;if(i)for(;(f=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[f.getName()])&&(!h||!h[e]);)if(f.getName()in CKEDITOR.dtd.span)b.splitElement(f);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(f);b.collapse(true);f.remove()}else b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){var b=this.editor,d=b.activeEnterMode,b=b.getSelection(), -e=b.getRanges(),m=a.getName(),m=CKEDITOR.dtd.$block[m],i,f,o;h(this);for(var k=e.length;k--;){o=e[k];i=!k&&a||a.clone(1);this.insertElementIntoRange(i,o)&&!f&&(f=i)}if(f){o.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);if(m)if((a=f.getNext(function(a){return c(a)&&!j(a)}))&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$block))a.getDtd()["#"]?o.moveToElementEditStart(a):o.moveToElementEditEnd(f);else if(!a&&d!=CKEDITOR.ENTER_BR){a=o.fixBlock(true,d==CKEDITOR.ENTER_DIV?"div":"p");o.moveToElementEditStart(a)}}b.selectRanges([o]); -n(this,CKEDITOR.env.opera)},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a= -this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==false&&(b=b.replace(k,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b= -a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE|| -a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(a){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?a.cancel():this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus= -true;a.once("contentDom",function(){a.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var e=a.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);var h=CKEDITOR.getCss();if(h){e=d.getHead();if(!e.getCustomData("stylesheet")){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",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});var m={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.keyCode, -d;if(c in m){var e=a.getSelection(),b=e.getRanges()[0],g=b.startPath(),h,j,k,c=c==8;if(e=f(e)){a.fire("saveSnapshot");b.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove();b.select();a.fire("saveSnapshot");d=1}else if(b.collapsed)if((h=g.block)&&(k=h[c?"getPrevious":"getNext"](l))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("table")&&b[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove();b["moveToElementEdit"+(c?"End":"Start")](k); -b.select();a.fire("saveSnapshot");d=1}else if(g.blockLimit&&g.blockLimit.is("td")&&(j=g.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(j,c?CKEDITOR.START:CKEDITOR.END)&&(k=j[c?"getPrevious":"getNext"](l))){a.fire("saveSnapshot");b["moveToElementEdit"+(c?"End":"Start")](k);b.checkStartOfBlock()&&b.checkEndOfBlock()?k.remove():b.select();a.fire("saveSnapshot");d=1}else if((j=g.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(j,c?CKEDITOR.START:CKEDITOR.END))d=1}return!d});a.blockless&& -(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in m&&!this.getFirst(c)){this.appendBogus();b=a.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return false;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);!CKEDITOR.env.ie&&!CKEDITOR.env.opera&&this.attachListener(this,"mousedown", -function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(k,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(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()})}}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref"); -b.removeCustomData("stylesheet").remove()}}delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var j=CKEDITOR.dom.walker.bogus(),k=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,l=CKEDITOR.dom.walker.whitespaces(true),u=CKEDITOR.dom.walker.bookmark(false, -true);CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})}); -CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml('<span id="'+d+'" class="cke_voice_label">'+this.lang.common.editorHelp+"</span>");c.append(e);a.changeAttr("aria-describedby", -d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var s=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,i,m,h,p=[],v=d.range.startContainer;e=d.range.startPath();for(var v=f[v.getName()],j=0,o=c.getChildren(),k=o.count(),l=-1,n=-1,s=0,r=e.contains(f.$list);j<k;++j){e=o.getItem(j);if(a(e)){m=e.getName();if(r&&m in CKEDITOR.dtd.$list)p=p.concat(b(e,d));else{h=!!v[m];if(m=="br"&&e.data("cke-eol")&& -(!j||j==k-1)){s=(i=j?p[j-1].node:o.getItem(j+1))&&(!a(i)||!i.is("br"));i=i&&a(i)&&f.$block[i.getName()]}l==-1&&!h&&(l=j);h||(n=j);p.push({isElement:1,isLineBreak:s,isBlock:e.isBlockBoundary(),hasBlockSibling:i,node:e,name:m,allowed:h});i=s=0}}else p.push({isElement:0,node:e,allowed:1})}if(l>-1)p[l].firstNotAllowed=1;if(n>-1)p[n].lastNotAllowed=1;return p}function d(b,c){var e=[],i=b.getChildren(),m=i.count(),g,h=0,p=f[c],j=!b.is(f.$inline)||b.is("br");for(j&&e.push(" ");h<m;h++){g=i.getItem(h);a(g)&& -!g.is(p)?e=e.concat(d(g,c)):e.push(g)}j&&e.push(" ");return e}function e(b){return b&&a(b)&&(b.is(f.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function m(b,c,d,e){var i=b.clone(),g,f;i.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);if((g=(new CKEDITOR.dom.walker(i)).next())&&a(g)&&h[g.getName()]&&(f=g.getPrevious())&&a(f)&&!f.getParent().equals(b.startContainer)&&d.contains(f)&&e.contains(g)&&g.isIdentical(f)){g.moveChildren(f);g.remove();m(b,c,d,e)}}function i(b,c){function d(b,c){if(c.isBlock&&c.isElement&& -!c.node.is("br")&&a(b)&&b.is("br")){b.remove();return 1}}var e=c.endContainer.getChild(c.endOffset),i=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);if(i&&d(i,b[0])){c.setEnd(c.endContainer,c.endOffset-1);c.collapse()}}var f=CKEDITOR.dtd,h={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},j={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},p=CKEDITOR.tools.extend({},f.$inline);delete p.br;return function(h,o,k){var l=h.editor;h.getDocument();var s=l.getSelection().getRanges()[0], -u=false;if(o=="unfiltered_html"){o="html";u=true}if(!s.checkReadOnly()){var y=(new CKEDITOR.dom.elementPath(s.startContainer,s.root)).blockLimit||s.root,o={type:o,dontFilter:u,editable:h,editor:l,range:s,blockLimit:y,mergeCandidates:[],zombies:[]},l=o.range,u=o.mergeCandidates,v,D,F,z;if(o.type=="text"&&l.shrink(CKEDITOR.SHRINK_ELEMENT,true,false)){v=CKEDITOR.dom.element.createFromHtml("<span> </span>",l.document);l.insertNode(v);l.setStartAfter(v)}D=new CKEDITOR.dom.elementPath(l.startContainer); -o.endPath=F=new CKEDITOR.dom.elementPath(l.endContainer);if(!l.collapsed){var y=F.block||F.blockLimit,X=l.getCommonAncestor();y&&(!y.equals(X)&&!y.contains(X)&&l.checkEndOfBlock())&&o.zombies.push(y);l.deleteContents()}for(;(z=a(l.startContainer)&&l.startContainer.getChild(l.startOffset-1))&&a(z)&&z.isBlockBoundary()&&D.contains(z);)l.moveToPosition(z,CKEDITOR.POSITION_BEFORE_END);m(l,o.blockLimit,D,F);if(v){l.setEndBefore(v);l.collapse();v.remove()}v=l.startPath();if(y=v.contains(e,false,1)){l.splitElement(y); -o.inlineStylesRoot=y;o.inlineStylesPeak=v.lastElement}v=l.createBookmark();(y=v.startNode.getPrevious(c))&&a(y)&&e(y)&&u.push(y);(y=v.startNode.getNext(c))&&a(y)&&e(y)&&u.push(y);for(y=v.startNode;(y=y.getParent())&&e(y);)u.push(y);l.moveToBookmark(v);if(v=k){v=o.range;if(o.type=="text"&&o.inlineStylesRoot){z=o.inlineStylesPeak;l=z.getDocument().createText("{cke-peak}");for(u=o.inlineStylesRoot.getParent();!z.equals(u);){l=l.appendTo(z.clone());z=z.getParent()}k=l.getOuterHtml().split("{cke-peak}").join(k)}z= -o.blockLimit.getName();if(/^\s+|\s+$/.test(k)&&"span"in CKEDITOR.dtd[z])var O='<span data-cke-marker="1"> </span>',k=O+k+O;k=o.editor.dataProcessor.toHtml(k,{context:null,fixForBody:false,dontFilter:o.dontFilter,filter:o.editor.activeFilter,enterMode:o.editor.activeEnterMode});z=v.document.createElement("body");z.setHtml(k);if(O){z.getFirst().remove();z.getLast().remove()}if((O=v.startPath().block)&&!(O.getChildCount()==1&&O.getBogus()))a:{var G;if(z.getChildCount()==1&&a(G=z.getFirst())&&G.is(j)){O= -G.getElementsByTag("*");v=0;for(u=O.count();v<u;v++){l=O.getItem(v);if(!l.is(p))break a}G.moveChildren(G.getParent(1));G.remove()}}o.dataWrapper=z;v=k}if(v){G=o.range;var O=G.document,A,k=o.blockLimit;v=0;var J;z=[];var H,P,u=l=0,K,R;D=G.startContainer;var y=o.endPath.elements[0],S;F=y.getPosition(D);X=!!y.getCommonAncestor(D)&&F!=CKEDITOR.POSITION_IDENTICAL&&!(F&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);D=b(o.dataWrapper,o);for(i(D,G);v<D.length;v++){F=D[v];if(A=F.isLineBreak){A= -G;K=k;var N=void 0,U=void 0;if(F.hasBlockSibling)A=1;else{N=A.startContainer.getAscendant(f.$block,1);if(!N||!N.is({div:1,p:1}))A=0;else{U=N.getPosition(K);if(U==CKEDITOR.POSITION_IDENTICAL||U==CKEDITOR.POSITION_CONTAINS)A=0;else{K=A.splitElement(N);A.moveToPosition(K,CKEDITOR.POSITION_AFTER_START);A=1}}}}if(A)u=v>0;else{A=G.startPath();if(!F.isBlock&&o.editor.config.autoParagraph!==false&&(o.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&o.editor.editable().equals(A.blockLimit)&&!A.block)&&(P=o.editor.activeEnterMode!= -CKEDITOR.ENTER_BR&&o.editor.config.autoParagraph!==false?o.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":false)){P=O.createElement(P);P.appendBogus();G.insertNode(P);CKEDITOR.env.needsBrFiller&&(J=P.getBogus())&&J.remove();G.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END)}if((A=G.startPath().block)&&!A.equals(H)){if(J=A.getBogus()){J.remove();z.push(A)}H=A}F.firstNotAllowed&&(l=1);if(l&&F.isElement){A=G.startContainer;for(K=null;A&&!f[A.getName()][F.name];){if(A.equals(k)){A=null;break}K=A; -A=A.getParent()}if(A){if(K){R=G.splitElement(K);o.zombies.push(R);o.zombies.push(K)}}else{K=k.getName();S=!v;A=v==D.length-1;K=d(F.node,K);for(var N=[],U=K.length,Y=0,$=void 0,aa=0,ba=-1;Y<U;Y++){$=K[Y];if($==" "){if(!aa&&(!S||Y)){N.push(new CKEDITOR.dom.text(" "));ba=N.length}aa=1}else{N.push($);aa=0}}A&&ba==N.length&&N.pop();S=N}}if(S){for(;A=S.pop();)G.insertNode(A);S=0}else G.insertNode(F.node);if(F.lastNotAllowed&&v<D.length-1){(R=X?y:R)&&G.setEndAt(R,CKEDITOR.POSITION_AFTER_START);l=0}G.collapse()}}o.dontMoveCaret= -u;o.bogusNeededBlocks=z}J=o.range;var V;R=o.bogusNeededBlocks;for(S=J.createBookmark();H=o.zombies.pop();)if(H.getParent()){P=J.clone();P.moveToElementEditStart(H);P.removeEmptyBlocksAtEnd()}if(R)for(;H=R.pop();)CKEDITOR.env.needsBrFiller?H.appendBogus():H.append(J.document.createText(" "));for(;H=o.mergeCandidates.pop();)H.mergeSiblings();J.moveToBookmark(S);if(!o.dontMoveCaret){for(H=a(J.startContainer)&&J.startContainer.getChild(J.startOffset-1);H&&a(H)&&!H.is(f.$empty);){if(H.isBlockBoundary())J.moveToPosition(H, -CKEDITOR.POSITION_BEFORE_END);else{if(e(H)&&H.getHtml().match(/(\s| )$/g)){V=null;break}V=J.clone();V.moveToPosition(H,CKEDITOR.POSITION_BEFORE_END)}H=H.getLast(c)}V&&J.moveToRange(V)}s.select();n(h)}}}()})(); -(function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function d(){u=true;if(!l){b.call(this);l=CKEDITOR.tools.setTimeout(b, -200,this)}}function b(){l=null;if(u){CKEDITOR.tools.setTimeout(a,0,this);u=false}}function c(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,d=a.getPreviousNode(s,null,c),e=a.getNextNode(s,null,c);return b(d)||b(e,1)||!d&&!e&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function e(a){return a.getCustomData("cke-fillingChar")} -function f(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var d,e=a.getDocument().getSelection().getNative(),g=e&&e.type!="None"&&e.getRangeAt(0);if(c.getLength()>1&&g&&g.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];g=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;g&&d[1]--;var f;g=e;if(!g.isCollapsed){f=g.getRangeAt(0);f.setStart(g.anchorNode,g.anchorOffset);f.setEnd(g.focusNode,g.focusOffset);f=f.collapsed}f&&d.unshift(d.pop())}}c.setText(h(c.getText())); -if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}function h(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function n(a,b,c){var d=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var e=a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);else{var g=new CKEDITOR.dom.range(a);g.moveToElementEditStart(a);var f=a.getDocument().$.createRange();f.setStart(g.startContainer.$, -g.startOffset);f.collapse(1);b.removeAllRanges();b.addRange(f)}c&&a.focus();d.removeListener();e&&e.removeListener()}function j(a){var b=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"> </div>',a.document);a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(),d=a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START); -d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function k(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),g=e[0];if(e.length==1&&g.collapsed)if((d=g[d<38?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getAttribute("contenteditable")=="false"){a.getSelection().fake(d);c.data.preventDefault();c.cancel()}}}} -var l,u,s=CKEDITOR.dom.walker.invisible(1),t=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!(e=d.moveToClosestEditablePosition(b.selected,a)))e=d.moveToClosestEditablePosition(b.selected,!a);e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();if(!e){d.moveToElementEditablePosition(c.editable()); -c.getSelection().selectRanges([d])}c.fire("saveSnapshot");return false}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=e.getSelection();a&&a.removeAllRanges()}var e=b.editor;e.on("contentDom",function(){var b=e.document,c=CKEDITOR.document,i=e.editable(),m=b.getBody(),h=b.getDocumentElement(),j=i.isInline(),l,n;CKEDITOR.env.gecko&&i.attachListener(i,"focus",function(a){a.removeListener();if(l!==0)if((a=e.getSelection().getNative())&& -a.isCollapsed&&a.anchorNode==i.$){a=e.createRange();a.moveToElementEditStart(i);a.select()}},null,null,-2);i.attachListener(i,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){l&&CKEDITOR.env.webkit&&(l=e._.previousActive&&e._.previousActive.equals(b.getActive()));e.unlockSelection(l);l=0},null,null,-1);i.attachListener(i,"mousedown",function(){l=0});if(CKEDITOR.env.ie||CKEDITOR.env.opera||j){var s=function(){n=new CKEDITOR.dom.selection(e.getSelection());n.lock()};g?i.attachListener(i,"beforedeactivate", -s,null,null,-1):i.attachListener(e,"selectionCheck",s,null,null,-1);i.attachListener(i,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){e.lockSelection(n);l=1},null,null,-1);i.attachListener(i,"mousedown",function(){l=0})}if(CKEDITOR.env.ie&&!j){var r;i.attachListener(i,"mousedown",function(a){if(a.data.$.button==2){a=e.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)r=e.window.getScrollPosition()}});i.attachListener(i,"mouseup",function(a){if(a.data.$.button==2&&r){e.document.$.documentElement.scrollLeft= -r.x;e.document.$.documentElement.scrollTop=r.y}r=null});if(b.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)h.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=m.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}e.setEndPoint(g.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function d(){h.removeListener("mousemove",b);c.removeListener("mouseup",d);h.removeListener("mouseup",d);e.select()}a=a.data;if(a.getTarget().is("html")&& -a.$.y<h.$.clientHeight&&a.$.x<h.$.clientWidth){var e=m.$.createTextRange();try{e.moveToPoint(a.$.x,a.$.y)}catch(i){}var g=e.duplicate();h.on("mousemove",b);c.on("mouseup",d);h.on("mouseup",d)}});if(CKEDITOR.env.version>7&&CKEDITOR.env.version<11){h.on("mousedown",function(a){if(a.data.getTarget().is("html")){c.on("mouseup",v);h.on("mouseup",v)}});var v=function(){c.removeListener("mouseup",v);h.removeListener("mouseup",v);var a=CKEDITOR.document.$.selection,d=a.createRange();a.type!="None"&&d.parentElement().ownerDocument== -b.$&&d.select()}}}}i.attachListener(i,"selectionchange",a,e);i.attachListener(i,"keyup",d,e);i.attachListener(i,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(j?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var D;i.attachListener(i,"mousedown",function(){D=1});i.attachListener(b.getDocumentElement(),"mouseup",function(){D&&d.call(e);D=0})}else i.attachListener(CKEDITOR.env.ie?i:b.getDocumentElement(),"mouseup",d,e);CKEDITOR.env.webkit&& -i.attachListener(b,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:f(i)}},null,null,-1);i.attachListener(i,"keydown",k(e),null,null,-1)});e.on("contentDomUnload",e.forceNextSelectionCheck,e);e.on("dataReady",function(){delete e._.fakeSelection;delete e._.hiddenSelectionContainer;e.selectionChange(1)});e.on("loadSnapshot",function(){var a=e.editable().getLast(function(a){return a.type==CKEDITOR.NODE_ELEMENT});a&&a.hasAttribute("data-cke-hidden-sel")&& -a.remove()},null,null,100);CKEDITOR.env.ie9Compat&&e.on("beforeDestroy",c,null,null,9);CKEDITOR.env.webkit&&e.on("setData",c);e.on("contentDomUnload",function(){e.unlockSelection()});e.on("key",function(a){if(e.mode=="wysiwyg"){var b=e.getSelection();if(b.isFake){var c=t[a.data.keyCode];if(c)return c({editor:e,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady",function(a){var b=a.editor;if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=b.editable(), -c=e(a);c&&(c.getCustomData("ready")?f(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){f(b.editable())},null,null,-1);var c,d,a=function(){var a=b.editable();if(a)if(a=e(a)){var g=b.document.$.defaultView.getSelection();g.type=="Caret"&&g.anchorNode==a.$&&(d=1);c=a.getText();a.setText(h(c))}},g=function(){var a=b.editable();if(a)if(a=e(a)){a.setText(c);if(d){b.document.$.defaultView.getSelection().setPosition(a.$,a.getLength());d=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage", -g);b.on("beforeGetData",a,null,null,0);b.on("getData",g)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:d).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if((this._.savedSelection||this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&& -a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection;return true}return false};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable? -this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var g=typeof window.getSelection!="function",r=1;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:r++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=a=c?a:this.document.getBody();this.isLocked= -0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}b=g?this.document.$.selection:this.document.getWindow().$.getSelection();if(CKEDITOR.env.webkit)(b.type=="None"&&this.document.getActive().equals(a)||b.type=="Caret"&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&n(a,b);else if(CKEDITOR.env.gecko)b&&(this.document.getActive().equals(a)&&b.anchorNode&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&n(a,b,true);else if(CKEDITOR.env.ie){var d; -try{d=this.document.getActive()}catch(e){}if(g)b.type=="None"&&(d&&d.equals(this.document.getDocumentElement()))&&n(a,null,true);else{(b=b&&b.anchorNode)&&(b=new CKEDITOR.dom.node(b));d&&(d.equals(this.document.getDocumentElement())&&b&&(a.equals(b)||a.contains(b)))&&n(a,null,true)}}d=this.getNative();var f,h;if(d)if(d.getRangeAt)f=(h=d.rangeCount&&d.getRangeAt(0))&&new CKEDITOR.dom.node(h.commonAncestorContainer);else{try{h=d.createRange()}catch(j){}f=h&&CKEDITOR.dom.element.get(h.item&&h.item(0)|| -h.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 w={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype= -{getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=g?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:g?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache; -if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset-c.startOffset==1&&w[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=g?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c); -var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,g,f,h=b.duplicate(),m=0,j=e.length-1,k=-1,v,l;m<=j;){k=Math.floor((m+j)/2);g=e[k];h.moveToElementText(g);v=h.compareEndPoints("StartToStart",b);if(v>0)j=k-1;else if(v<0)m=k+1;else return{container:d,offset:a(g)}}if(k==-1||k==e.length-1&&v<0){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h){g=e[e.length-1];return g.nodeType!=CKEDITOR.NODE_TEXT? -{container:d,offset:e.length}:{container:g,offset:g.nodeValue.length}}for(d=e.length;h>0&&d>0;){f=e[--d];if(f.nodeType==CKEDITOR.NODE_TEXT){l=f;h=h-f.nodeValue.length}}return{container:l,offset:-h}}h.collapse(v>0?true:false);h.setEndPoint(v>0?"StartToStart":"EndToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:d,offset:a(g)+(v>0?0:1)};for(;h>0;)try{f=g[v>0?"previousSibling":"nextSibling"];if(f.nodeType==CKEDITOR.NODE_TEXT){h=h-f.nodeValue.length;l=f}g=f}catch(q){return{container:d, -offset:a(g)}}return{container:l,offset:v>0?-h:l.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d== -CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var i=c.item(e),g=i.parentNode,f=0,a=new CKEDITOR.dom.range(this.root);f<g.childNodes.length&&g.childNodes[f]!=i;f++);a.setStart(new CKEDITOR.dom.node(g),f);a.setEnd(new CKEDITOR.dom.node(g),f+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),e.startOffset); -b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache;if(c.ranges&&!b)return c.ranges;if(!c.ranges)c.ranges=new CKEDITOR.dom.rangeList(a.call(this));if(b)for(var d=c.ranges,e=0;e<d.length;e++){var g=d[e];g.getCommonAncestor().isReadOnly()&&d.splice(e,1);if(!g.collapsed){if(g.startContainer.isReadOnly())for(var b=g.startContainer,f;b;){if((f=b.type==CKEDITOR.NODE_ELEMENT)&&b.is("body")||!b.isReadOnly())break;f&&b.getAttribute("contentEditable")== -"false"&&g.setStartAfter(b);b=b.getParent()}b=g.startContainer;f=g.endContainer;var h=g.startOffset,j=g.endOffset,k=g.clone();b&&b.type==CKEDITOR.NODE_TEXT&&(h>=b.getLength()?k.setStartAfter(b):k.setStartBefore(b));f&&f.type==CKEDITOR.NODE_TEXT&&(j?k.setEndAfter(f):k.setEndBefore(f));b=new CKEDITOR.dom.walker(k);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=g.clone();g.setEndBefore(a);g.collapsed&&d.splice(e--,1);if(!(a.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a); -b.collapsed||d.splice(e+1,0,b)}return true}return false};b.next()}}return c.ranges}}(),getStartElement:function(){var a=this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount(): -b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)}, -function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&w[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=g?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement(); -this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection&&this.rev==a._.fakeSelection.rev){delete a._.fakeSelection; -var b=a._.hiddenSelectionContainer;if(b){a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot")}delete a._.hiddenSelectionContainer}this.rev=r++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){this.reset();if(a.length)if(this.isLocked){var b=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();!b.equals(this.root)&&b.focus()}else if(a.length==1&&!a[0].collapsed&&(b= -a[0].getEnclosedNode())&&b.type==CKEDITOR.NODE_ELEMENT&&b.getAttribute("contenteditable")=="false")this.fake(b);else{if(g){var d=CKEDITOR.dom.walker.whitespaces(true),e=/\ufeff|\u00a0/,h={table:1,tbody:1,tr:1};if(a.length>1){b=a[a.length-1];a[0].setEnd(b.endContainer,b.endOffset)}var b=a[0],a=b.collapsed,j,k,l,n=b.getEnclosedNode();if(n&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in w&&(!n.is("a")||!n.getText()))try{l=n.$.createControlRange();l.addElement(n.$);l.select();return}catch(s){}(b.startContainer.type== -CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in h||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in h)&&b.shrink(CKEDITOR.NODE_ELEMENT,true);l=b.createBookmark();var h=l.startNode,r;if(!a)r=l.endNode;l=b.document.$.body.createTextRange();l.moveToElementText(h.$);l.moveStart("character",1);if(r){e=b.document.$.body.createTextRange();e.moveToElementText(r.$);l.setEndPoint("EndToEnd",e);l.moveEnd("character",-1)}else{j=h.getNext(d);k=h.hasAscendant("pre");j=!(j&&j.getText&& -j.getText().match(e))&&(k||!h.hasPrevious()||h.getPrevious().is&&h.getPrevious().is("br"));k=b.document.createElement("span");k.setHtml("");k.insertBefore(h);j&&b.document.createText("").insertBefore(h)}b.setStartBefore(h);h.remove();if(a){if(j){l.moveStart("character",-1);l.select();b.document.$.selection.clear()}else l.select();b.moveToPosition(k,CKEDITOR.POSITION_BEFORE_START);k.remove()}else{b.setEndBefore(r);r.remove();l.select()}}else{r=this.getNative();if(!r)return;if(CKEDITOR.env.opera){b= -this.document.$.createRange();b.selectNodeContents(this.root.$);r.addRange(b)}this.removeAllRanges();for(l=0;l<a.length;l++){if(l<a.length-1){b=a[l];e=a[l+1];k=b.clone();k.setStart(b.endContainer,b.endOffset);k.setEnd(e.startContainer,e.startOffset);if(!k.collapsed){k.shrink(CKEDITOR.NODE_ELEMENT,true);j=k.getCommonAncestor();k=k.getEnclosedNode();if(j.isReadOnly()||k&&k.isReadOnly()){e.setStart(b.startContainer,b.startOffset);a.splice(l--,1);continue}}}b=a[l];e=this.document.$.createRange();j=b.startContainer; -if(CKEDITOR.env.opera&&b.collapsed&&j.type==CKEDITOR.NODE_ELEMENT){k=j.getChild(b.startOffset-1);d=j.getChild(b.startOffset);if(!k&&!d&&j.is(CKEDITOR.dtd.$removeEmpty)||k&&k.type==CKEDITOR.NODE_ELEMENT||d&&d.type==CKEDITOR.NODE_ELEMENT){b.insertNode(this.document.createText(""));b.collapse(1)}}if(b.collapsed&&CKEDITOR.env.webkit&&c(b)){j=this.root;f(j,false);k=j.getDocument().createText("​");j.setCustomData("cke-fillingChar",k);b.insertNode(k);if((j=k.getNext())&&!k.getPrevious()&&j.type==CKEDITOR.NODE_ELEMENT&& -j.getName()=="br"){f(this.root);b.moveToPosition(j,CKEDITOR.POSITION_BEFORE_START)}else b.moveToPosition(k,CKEDITOR.POSITION_AFTER_END)}e.setStart(b.startContainer.$,b.startOffset);try{e.setEnd(b.endContainer.$,b.endOffset)}catch(t){if(t.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0){b.collapse(1);e.setEnd(b.endContainer.$,b.endOffset)}else throw t;}r.addRange(e)}}this.reset();this.root.fire("selectionchange")}},fake:function(a){var b=this.root.editor;this.reset();j(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root); -d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=r++;b._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a}, -createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c=0;c<a.length;c++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[c]);b.push(d)}a.isFake?this.fake(b[0].getEnclosedNode()):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return!a.length?null:a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&& -this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){var a=this.getNative();try{a&&a[g?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}})();"use strict"; -CKEDITOR.editor.prototype.attachStyleStateChange=function(a,d){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(a){for(var d=0;d<b.length;d++){var f=b[d],h=f.style.checkActive(a.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;f.fn.call(this,h)}})}b.push({style:a,fn:d})};CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3; -(function(){function a(a,b){for(var c,d;a=a.getParent();){if(a.equals(b))break;if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");e=="false"?c=a:e=="true"&&(d=1)}}return c}function d(b){var e=b.document;if(b.collapsed){e=w(this,e);b.insertNode(e);b.moveToPosition(e,CKEDITOR.POSITION_BEFORE_END)}else{var g=this.element,f=this._.definition,h,i=f.ignoreReadonly,j=i||f.includeReadonly;j==void 0&&(j=b.root.getCustomData("cke_includeReadonly"));var k=CKEDITOR.dtd[g]; -if(!k){h=true;k=CKEDITOR.dtd.span}b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var l=b.createBookmark(),m=l.startNode,n=l.endNode,o=m,p;if(!i){var r=b.getCommonAncestor(),i=a(m,r),r=a(n,r);i&&(o=i.getNextSourceNode(true));r&&(n=r)}for(o.getPosition(n)==CKEDITOR.POSITION_FOLLOWING&&(o=0);o;){i=false;if(o.equals(n)){o=null;i=true}else{var s=o.type==CKEDITOR.NODE_ELEMENT?o.getName():null,r=s&&o.getAttribute("contentEditable")=="false",q=s&&o.getAttribute("data-nostyle");if(s&&o.data("cke-bookmark")){o= -o.getNextSourceNode(true);continue}if(r&&j&&CKEDITOR.dtd.$block[s])for(var u=o,x=c(u),B=void 0,E=x.length,I=0,u=E&&new CKEDITOR.dom.range(u.getDocument());I<E;++I){var B=x[I],L=CKEDITOR.filter.instances[B.data("cke-filter")];if(L?L.check(this):1){u.selectNodeContents(B);d.call(this,u)}}x=s?!k[s]||q?0:r&&!j?0:(o.getPosition(n)|M)==M&&(!f.childRule||f.childRule(o)):1;if(x)if((x=o.getParent())&&((x.getDtd()||CKEDITOR.dtd.span)[g]||h)&&(!f.parentRule||f.parentRule(x))){if(!p&&(!s||!CKEDITOR.dtd.$removeEmpty[s]|| -(o.getPosition(n)|M)==M)){p=b.clone();p.setStartBefore(o)}s=o.type;if(s==CKEDITOR.NODE_TEXT||r||s==CKEDITOR.NODE_ELEMENT&&!o.getChildCount()){for(var s=o,W;(i=!s.getNext(C))&&(W=s.getParent(),k[W.getName()])&&(W.getPosition(m)|y)==y&&(!f.childRule||f.childRule(W));)s=W;p.setEndAfter(s)}}else i=true;else i=true;o=o.getNextSourceNode(q||r)}if(i&&p&&!p.collapsed){for(var i=w(this,e),r=i.hasAttributes(),q=p.getCommonAncestor(),s={},x={},B={},E={},T,Q,Z;i&&q;){if(q.getName()==g){for(T in f.attributes)if(!E[T]&& -(Z=q.getAttribute(Q)))i.getAttribute(T)==Z?x[T]=1:E[T]=1;for(Q in f.styles)if(!B[Q]&&(Z=q.getStyle(Q)))i.getStyle(Q)==Z?s[Q]=1:B[Q]=1}q=q.getParent()}for(T in x)i.removeAttribute(T);for(Q in s)i.removeStyle(Q);r&&!i.hasAttributes()&&(i=null);if(i){p.extractContents().appendTo(i);p.insertNode(i);t.call(this,i);i.mergeSiblings();CKEDITOR.env.ie||i.$.normalize()}else{i=new CKEDITOR.dom.element("span");p.extractContents().appendTo(i);p.insertNode(i);t.call(this,i);i.remove(true)}p=null}}b.moveToBookmark(l); -b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,true)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(k.getParent()),e=null,g=null,f=0;f<a.elements.length;f++){var h=a.elements[f];if(h==a.block||h==a.blockLimit)break;l.checkElementRemovable(h)&&(e=h)}for(f=0;f<c.elements.length;f++){h=c.elements[f];if(h==c.block||h==c.blockLimit)break;l.checkElementRemovable(h)&&(g=h)}g&&k.breakParent(g);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE, -1);var c=a.createBookmark(),d=c.startNode;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,h=0,i;h<e.elements.length&&(i=e.elements[h]);h++){if(i==e.block||i==e.blockLimit)break;if(this.checkElementRemovable(i)){var j;if(a.collapsed&&(a.checkBoundaryOfElement(i,CKEDITOR.END)||(j=a.checkBoundaryOfElement(i,CKEDITOR.START)))){f=i;f.match=j?"start":"end"}else{i.mergeSiblings();i.is(this.element)?s.call(this,i):g(i,q(this)[i.getName()])}}}if(f){i=d;for(h=0;;h++){j=e.elements[h]; -if(j.equals(f))break;else if(j.match)continue;else j=j.clone();j.append(i);i=j}i[f.match=="start"?"insertBefore":"insertAfter"](f)}}else{var k=c.endNode,l=this;b();for(e=d;!e.equals(k);){f=e.getNextSourceNode();if(e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)){e.getName()==this.element?s.call(this,e):g(e,q(this)[e.getName()]);if(f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)){b();f=d.getNext()}}e=f}}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,true)}function c(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")== -"true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function e(a){var b=a.getEnclosedNode()||a.getCommonAncestor(false,true);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&m(a,this)}function f(a){var b=a.getCommonAncestor(true,true);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&& -a.removeStyle(e)}}function h(a){var b=a.createBookmark(true),c=a.createIterator();c.enforceRealBlocks=true;if(this._.enterMode)c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e=a.document,g;d=c.getNextParagraph();)if(!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)){g=w(this,e,d);j(d,g)}a.moveToBookmark(b)}function n(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=true;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)if(this.checkElementRemovable(d))if(d.is("pre")){(e= -this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e);j(d,e)}else s.call(this,d);a.moveToBookmark(b)}function j(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var d=b&&b.is("pre"),e=a.is("pre"),g=!d&&e;if(d&&!e){e=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=l(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g, -" ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var f=a.getDocument().createElement("div");f.append(e);e.$.outerHTML="<pre>"+g+"</pre>";e.copyAttributes(f.getFirst());e=f.getFirst().remove()}else e.setHtml(g);b=e}else g?b=u(c?[a.getHtml()]:k(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;if((h=c.getPrevious(x))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")){d=l(h.getHtml(),/\n$/,"")+"\n\n"+l(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="<pre>"+d+"</pre>":c.setHtml(d);h.remove()}}else c&& -r(b)}function k(a){a.getName();var b=[];l(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"</pre>"+c+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function l(a,b,c){var d="",e="",a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function u(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument())); -for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=l(e,/^[ \t]*\n/,""),e=l(e,/\n$/,""),e=l(e,/^[ \t]+|[ \t]+$/g,function(a,b){return a.length==1?" ":b?" "+CKEDITOR.tools.repeat(" ",a.length-1):CKEDITOR.tools.repeat(" ",a.length-1)+" "}),e=e.replace(/\n/g,"<br>"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var g=b.clone();g.setHtml(e);c.append(g)}else b.setHtml(e)}return c||b}function s(a){var b=this._.definition, -c=b.attributes,b=b.styles,d=q(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),f;for(f in c)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=o(f,c[f]))){e=a.hasAttribute(f);a.removeAttribute(f)}for(var h in b)if(!(this._.definition.fullMatch&&a.getStyle(h)!=o(h,b[h],true))){e=e||!!a.getStyle(h);a.removeStyle(h)}g(a,d,p[a.getName()]);e&&(this._.definition.alwaysRemoveElement?r(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()? -r(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function t(a){for(var b=q(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||s.call(this,d)}for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||g(d,b[f])}}}function g(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],g;if(g=a.getAttribute(e)){var f=b[d][1];(f===null||f.test&&f.test(g)||typeof f=="string"&& -g==f)&&a.removeAttribute(e)}}c||r(a)}function r(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(x),d=a.getNext(x);c&&(c.type==CKEDITOR.NODE_TEXT||!c.isBlockBoundary({br:1}))&&a.append("br",1);d&&(d.type==CKEDITOR.NODE_TEXT||!d.isBlockBoundary({br:1}))&&a.append("br");a.remove(true)}else{c=a.getFirst();d=a.getLast();a.remove(true);if(c){c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings();d&&(!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT)&&d.mergeSiblings()}}}function w(a, -b,c){var d;d=a.element;d=="*"&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=m(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function m(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function i(a,b){for(var c in a)a[c]=a[c].replace(I,function(a,c){return b[c]})}function q(a){if(a._.overrides)return a._.overrides; -var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],g,f;if(typeof e=="string")g=e.toLowerCase();else{g=e.element?e.element.toLowerCase():a.element;f=e.attributes}e=b[g]||(b[g]={});if(f){var e=e.attributes=e.attributes||[],h;for(h in f)e.push([h.toLowerCase(),f[h]])}}}return b}function o(a,b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a,b);return d[c?"getStyle":"getAttribute"](a)}function B(a, -b){for(var c=a.document,d=a.getRanges(),e=b?this.removeFromRange:this.applyToRange,g,f=d.createIterator();g=f.getNextRange();)e.call(this,g);a.selectRanges(d);c.removeCustomData("doc_processing_style")}var p={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},L={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1, -th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},E=/\s*(?:;\s*|$)/,I=/#\((.+?)\)/g,C=CKEDITOR.dom.walker.bookmark(0,1),x=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){var c=a.attributes;if(c&&c.style){a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style));delete c.style}if(b){a=CKEDITOR.tools.clone(a);i(a.attributes,b);i(a.styles,b)}c=this.element=a.element?typeof a.element=="string"?a.element.toLowerCase():a.element:"*";this.type=a.type||(p[c]?CKEDITOR.STYLE_BLOCK: -L[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);if(typeof this.element=="object")this.type=CKEDITOR.STYLE_OBJECT;this._={definition:a}};CKEDITOR.editor.prototype.applyStyle=function(a){a.checkApplicable(this.elementPath())&&B.call(a,this.getSelection())};CKEDITOR.editor.prototype.removeStyle=function(a){a.checkApplicable(this.elementPath())&&B.call(a,this.getSelection(),1)};CKEDITOR.style.prototype={apply:function(a){B.call(this,a.getSelection())},remove:function(a){B.call(this,a.getSelection(), -1)},applyToRange:function(a){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?d:this.type==CKEDITOR.STYLE_BLOCK?h:this.type==CKEDITOR.STYLE_OBJECT?e:null).call(this,a)},removeFromRange:function(a){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?n:this.type==CKEDITOR.STYLE_OBJECT?f:null).call(this,a)},applyToObject:function(a){m(a,this)},checkActive:function(a){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block|| -a.blockLimit,true);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var b=a.elements,c=0,d;c<b.length;c++){d=b[c];if(!(this.type==CKEDITOR.STYLE_INLINE&&(d==a.block||d==a.blockLimit))){if(this.type==CKEDITOR.STYLE_OBJECT){var e=d.getName();if(!(typeof this.element=="string"?e==this.element:e in this.element))continue}if(this.checkElementRemovable(d,true))return true}}}return false},checkApplicable:function(a,b){if(b&&!b.check(this))return false;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element); -case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return true},checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return false;var d=a.getName();if(typeof this.element=="string"?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return true;if(d=c._AC)c=d;else{var d={},e=0,g=c.attributes;if(g)for(var f in g){e++;d[f]=g[f]}if(f=CKEDITOR.style.getStyleText(c)){d.style||e++;d.style=f}d._length=e;c=c._AC=d}if(c._length){for(var h in c)if(h!= -"_length"){e=a.getAttribute(h)||"";if(h=="style")a:{d=c[h];typeof d=="string"&&(d=CKEDITOR.tools.parseCssText(d));typeof e=="string"&&(e=CKEDITOR.tools.parseCssText(e,true));f=void 0;for(f in d)if(!(f in e&&(e[f]==d[f]||d[f]=="inherit"||e[f]=="inherit"))){d=false;break a}d=true}else d=c[h]==e;if(d){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b){if(this.checkElementMatch(a,b))return true;var c=q(this)[a.getName()];if(c){var d; -if(!(c=c.attributes))return true;for(var e=0;e<c.length;e++){d=c[e][0];if(d=a.getAttribute(d)){var g=c[e][1];if(g===null||typeof g=="string"&&d==g||g.test(d))return true}}}return false},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;d=="bdo"&&(d="span");var c=["<",d],e=b.attributes;if(e)for(var g in e)c.push(" ",g,'="',e[g],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style="',e,'"');c.push(">",a||b.name,"</",d,">");return c.join("")},getDefinition:function(){return this._.definition}}; -CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(E,";"));for(var e in b){var g=b[e],f=(e+":"+g).replace(E,";");g=="inherit"?d=d+f:c=c+f}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d};var M=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,y=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})(); -CKEDITOR.styleCommand=function(a,d){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,d,true)};CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet); -CKEDITOR.loadStylesSet=function(a,d,b){CKEDITOR.stylesSet.addExternal(a,d,"");CKEDITOR.stylesSet.load(a,b)}; -CKEDITOR.editor.prototype.getStylesSet=function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var d=this,b=d.config.stylesCombo_stylesSet||d.config.stylesSet;if(b===false)a(null);else if(b instanceof Array){d._.stylesDefinitions=b;a(b)}else{b||(b="default");var b=b.split(":"),c=b[0];CKEDITOR.stylesSet.addExternal(c,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(c,function(b){d._.stylesDefinitions=b[c];a(d._.stylesDefinitions)})}}}; -CKEDITOR.dom.comment=function(a,d){typeof a=="string"&&(a=(d?d.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}});"use strict"; -(function(){var a={},d={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(d[b]=1);CKEDITOR.dom.elementPath=function(b,e){var f=null,h=null,n=[],j=b,k,e=e||b.getDocument().getBody();do if(j.type==CKEDITOR.NODE_ELEMENT){n.push(j);if(!this.lastElement){this.lastElement=j;if(j.is(CKEDITOR.dtd.$object)||j.getAttribute("contenteditable")=="false")continue}if(j.equals(e))break;if(!h){k=j.getName(); -j.getAttribute("contenteditable")=="true"?h=j:!f&&d[k]&&(f=j);if(a[k]){var l;if(l=!f){if(k=k=="div"){a:{k=j.getChildren();l=0;for(var u=k.count();l<u;l++){var s=k.getItem(l);if(s.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[s.getName()]){k=true;break a}}k=false}k=!k}l=k}l?f=j:h=j}}}while(j=j.getParent());h||(h=e);this.block=f;this.blockLimit=h;this.root=e;this.elements=n}})(); -CKEDITOR.dom.elementPath.prototype={compare:function(a){var d=this.elements,a=a&&a.elements;if(!a||d.length!=a.length)return false;for(var b=0;b<d.length;b++)if(!d[b].equals(a[b]))return false;return true},contains:function(a,d,b){var c;typeof a=="string"&&(c=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?c=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?c=function(b){return CKEDITOR.tools.indexOf(a,b.getName())>-1}:typeof a=="function"?c=a:typeof a=="object"&&(c= -function(b){return b.getName()in a});var e=this.elements,f=e.length;d&&f--;if(b){e=Array.prototype.slice.call(e,0);e.reverse()}for(d=0;d<f;d++)if(c(e[d]))return e[d];return null},isContextFor:function(a){var d;if(a in CKEDITOR.dtd.$block){d=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit;return!!d.getDtd()[a]}return true},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}}; -CKEDITOR.dom.text=function(a,d){typeof a=="string"&&(a=(d?d.$:document).createTextNode(a));this.$=a};CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node; -CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var d=this.$.parentNode,b=d.childNodes.length,c=this.getLength(),e=this.getDocument(),f=new CKEDITOR.dom.text(this.$.splitText(a),e);if(d.childNodes.length==b)if(a>=c){f=e.createText("");f.insertAfter(this)}else{a=e.createText("");a.insertAfter(f);a.remove()}return f},substring:function(a, -d){return typeof d!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}}); -(function(){function a(a,c,d){var f=a.serializable,h=c[d?"endContainer":"startContainer"],n=d?"endOffset":"startOffset",j=f?c.document.getById(a.startNode):a.startNode,a=f?c.document.getById(a.endNode):a.endNode;if(h.equals(j.getPrevious())){c.startOffset=c.startOffset-h.getLength()-a.getPrevious().getLength();h=a.getNext()}else if(h.equals(a.getPrevious())){c.startOffset=c.startOffset-h.getLength();h=a.getNext()}h.equals(j.getParent())&&c[n]++;h.equals(a.getParent())&&c[n]++;c[d?"endContainer":"startContainer"]= -h;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,d)};var d={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],f;return{getNextRange:function(h){f=f==void 0?0:f+1;var n=a[f];if(n&&a.length>1){if(!f)for(var j=a.length-1;j>=0;j--)d.unshift(a[j].createBookmark(true));if(h)for(var k=0;a[f+k+1];){for(var l=n.document,h=0,j=l.getById(d[k].endNode),l=l.getById(d[k+ -1].startNode);;){j=j.getNextSourceNode(false);if(l.equals(j))h=1;else if(c(j)||j.type==CKEDITOR.NODE_ELEMENT&&j.isBlockBoundary())continue;break}if(!h)break;k++}for(n.moveToBookmark(d.shift());k--;){j=a[++f];j.moveToBookmark(d.shift());n.setEnd(j.endContainer,j.endOffset)}}return n}}},createBookmarks:function(b){for(var c=[],d,f=0;f<this.length;f++){c.push(d=this[f].createBookmark(b,true));for(var h=f+1;h<this.length;h++){this[h]=a(d,this[h]);this[h]=a(d,this[h],true)}}return c},createBookmarks2:function(a){for(var c= +(function(){CKEDITOR.inline=function(a,c){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(c,a,CKEDITOR.ELEMENT_MODE_INLINE),f=a.is("textarea")?a:null;if(f){b.setData(f.getValue(),null,true);a=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!b.readOnly+'" class="cke_textarea_inline">'+f.getValue()+"</div>",CKEDITOR.document); +a.insertAfter(f);f.hide();f.$.form&&b._attachToForm()}else b.setData(a.getHtml(),null,true);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){if(f){b.container.clearCustomData();b.container.remove();f.show()}b.element.clearCustomData();delete b.element});return b}; +CKEDITOR.inlineAll=function(){var a,c,b;for(b in CKEDITOR.dtd.$editable)for(var f=CKEDITOR.document.getElementsByTag(b),d=0,e=f.count();d<e;d++){a=f.getItem(d);if(a.getAttribute("contenteditable")=="true"){c={element:a,config:{}};CKEDITOR.fire("inline",c)!==false&&CKEDITOR.inline(a,c.config)}}};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor"; +(function(){function a(a,e,f,n){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var h=new CKEDITOR.editor(e,a,n);if(n==CKEDITOR.ELEMENT_MODE_REPLACE){a.setStyle("visibility","hidden");h._.required=a.hasAttribute("required");a.removeAttribute("required")}f&&h.setData(f,null,true);h.on("loaded",function(){b(h);n==CKEDITOR.ELEMENT_MODE_REPLACE&&(h.config.autoUpdateElement&& +a.$.form)&&h._attachToForm();h.setMode(h.config.startupMode,function(){h.resetDirty();h.status="ready";h.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,h)})});h.on("destroy",c);return h}function c(){var a=this.container,b=this.element;if(a){a.clearCustomData();a.remove()}if(b){b.clearCustomData();if(this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){b.show();this._.required&&b.setAttribute("required","required")}delete this.element}}function b(a){var b=a.name,c=a.element,n=a.elementMode, +h=a.fire("uiSpace",{space:"top",html:""}).html,i=a.fire("uiSpace",{space:"bottom",html:""}).html;f||(f=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>')); +b=CKEDITOR.dom.element.createFromHtml(f.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:[a.lang.editor,a.name].join(", "),topHtml:h?'<span id="'+a.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+h+"</span>":"",contentId:a.ui.spaceId("contents"),bottomHtml:i?'<span id="'+a.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+i+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(n==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide(); +b.insertAfter(c)}else c.append(b);a.container=b;h&&a.ui.space("top").unselectable();i&&a.ui.space("bottom").unselectable();c=a.config.width;n=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));n&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(n));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,c){return a(b,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,c,f){return a(b, +c,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var c=null,f=a[b];if(f.name||f.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(f.className))continue}else if(typeof arguments[0]=="function"){c={};if(arguments[0](f,c)===false)continue}this.replace(f,c)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode= +function(a,b){var c=this,f=this._.modes;if(!(a==c.mode||!f||!f[a])){c.fire("beforeSetMode",a);if(c.mode){var h=c.checkDirty(),f=c._.previousModeData,i,m=0;c.fire("beforeModeUnload");c.editable(0);c._.previousMode=c.mode;c._.previousModeData=i=c.getData(1);if(c.mode=="source"&&f==i){c.fire("lockSnapshot",{forceUpdate:true});m=1}c.ui.space("contents").setHtml("");c.mode=""}else c._.previousModeData=c.getData(1);this._.modes[a](function(){c.mode=a;h!==void 0&&!h&&c.resetDirty();m?c.fire("unlockSnapshot"): +a=="wysiwyg"&&c.fire("saveSnapshot");setTimeout(function(){c.fire("mode");b&&b.call(c)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,c,f){var h=this.container,i=this.ui.space("contents"),m=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,f=f?h.getChild(1):h;f.setSize("width",a,true);m&&(m.style.width="1%");i.setStyle("height",Math.max(b-(c?0:(f.$.offsetHeight||0)-(i.$.clientHeight||0)),0)+"px");m&&(m.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable= +function(a){return a?this.ui.space("contents"):this.container};var f;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg"; +(function(){function a(a){var b=a.editor,d=a.data.path,e=d.blockLimit,l=a.data.selection,j=l.getRanges()[0],g;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(l=c(l,d)){l.appendBogus();g=CKEDITOR.env.ie}if(b.config.autoParagraph!==false&&b.activeEnterMode!=CKEDITOR.ENTER_BR&&b.editable().equals(e)&&!d.block&&j.collapsed&&!j.getCommonAncestor().isReadOnly()){d=j.clone();d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);e=new CKEDITOR.dom.walker(d);e.guard=function(a){return!f(a)||a.type== +CKEDITOR.NODE_COMMENT||a.isReadOnly()};if(!e.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock()){b=j.fixBlock(true,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p");if(!CKEDITOR.env.needsBrFiller)(b=b.getFirst(f))&&(b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?: |\xa0)$/))&&b.remove();g=1;a.cancel()}}g&&j.select()}function c(a,b){if(a.isFake)return 0;var c=b.block||b.blockLimit,d=c&&c.getLast(f);if(c&&c.isBlockBoundary()&&(!d||!(d.type==CKEDITOR.NODE_ELEMENT&& +d.isBlockBoundary()))&&!c.is("pre")&&!c.getBogus())return c}function b(a){var b=a.data.getTarget();if(b.is("input")){b=b.getAttribute("type");(b=="submit"||b=="reset")&&a.data.preventDefault()}}function f(a){return p(a)&&s(a)}function d(a,b){return function(c){var d=CKEDITOR.dom.element.get(c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget);(!d||!b.equals(d)&&!b.contains(d))&&a.call(this,c)}}function e(a){var b,c=a.getRanges()[0],d=a.root,e={table:1,ul:1,ol:1,dl:1};if(c.startPath().contains(e)){var a= +function(a){return function(c,d){d&&(c.type==CKEDITOR.NODE_ELEMENT&&c.is(e))&&(b=c);if(!d&&f(c)&&(!a||!i(c)))return false}},j=c.clone();j.collapse(1);j.setStartAt(d,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(j);d.guard=a();d.checkBackward();if(b){j=c.clone();j.collapse();j.setEndAt(b,CKEDITOR.POSITION_AFTER_END);d=new CKEDITOR.dom.walker(j);d.guard=a(true);b=false;d.checkForward();return b}}return null}function g(a){a.editor.focus();a.editor.fire("saveSnapshot")}function n(a){var b= +a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function h(a,b,c){for(var d=a.getCommonAncestor(b),b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&a.getChildCount()==1;)b=a;b.remove()}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=false;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus){a=this.editor._.previousActive|| +this.getDocument().getActive();if(this.contains(a)){a.focus();return}}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(b){if(!CKEDITOR.env.ie)throw b;}if(CKEDITOR.env.safari&&!this.isInline()){a=CKEDITOR.document.getActive();a.equals(this.getWindow().getFrame())||this.getWindow().focus()}},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);if(CKEDITOR.env.ie&&/^focus|blur$/.exec(a)){a=a=="focus"?"focusin":"focusout";b=d(b,this);c[0]= +a;c[1]=b}return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a,b,c,d,e,f){!this._.listeners&&(this._.listeners=[]);var g=Array.prototype.slice.call(arguments,1),g=a.on.apply(a,g);this._.listeners.push(g);return g},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,b):this.removeAttribute(c)}},attachClass:function(a){var b= +this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}},changeAttr:function(a,b){var c=this.getAttribute(a);if(b!==c){!this._.attrChanges&&(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,b){g(this);x(this,b||"html",a)},insertText:function(a){g(this);var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:b.activeEnterMode, +b=c==CKEDITOR.ENTER_BR,d=CKEDITOR.tools,a=d.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"    "),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var e=/\n{2}/g;if(e.test(a))var f="<"+c+">",v="</"+c+">",a=f+a.replace(e,function(){return v+f})+v}a=a.replace(/\n/g,"<br>");b||(a=a.replace(RegExp("<br>(?=</"+c+">)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");x(this,"text",a)},insertElement:function(a, +b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return false;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&q(b);var g,h;if(f)for(;(g=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[g.getName()])&&(!h||!h[e]);)if(g.getName()in CKEDITOR.dtd.span)b.splitElement(g);else if(b.checkStartOfBlock()&& +b.checkEndOfBlock()){b.setStartBefore(g);b.collapse(true);g.remove()}else b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){g(this);var b=this.editor,c=b.activeEnterMode,b=b.getSelection(),d=b.getRanges()[0],e=a.getName(),e=CKEDITOR.dtd.$block[e];if(this.insertElementIntoRange(a,d)){d.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(e)if((e=a.getNext(function(a){return f(a)&&!i(a)}))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block))e.getDtd()["#"]? +d.moveToElementEditStart(e):d.moveToElementEditEnd(a);else if(!e&&c!=CKEDITOR.ENTER_BR){e=d.fixBlock(true,c==CKEDITOR.ENTER_DIV?"div":"p");d.moveToElementEditStart(e)}}b.selectRanges([d]);n(this)},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);if(this.status=="unloaded")this.status="ready";this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable", +!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==false&&(b=b.replace(m,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data= +this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a, +"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus= +false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var c=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var d=a.config.contentsLangDirection;this.getDirection(1)!= +d&&this.changeAttr("dir",d);var k=CKEDITOR.getCss();if(k){d=c.getHead();if(!d.getCustomData("stylesheet")){k=c.appendStyleText(k);k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement);d.setCustomData("stylesheet",k);k.data("cke-temp",1)}}d=c.getCustomData("stylesheet_ref")||0;c.setCustomData("stylesheet_ref",d+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a"); +b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});var l={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.domEvent.getKey(),d;if(c in l){var b=a.getSelection(),f,k=b.getRanges()[0],g=k.startPath(),h,i,m,c=c==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(f=b.getSelectedElement())||(f=e(b))){a.fire("saveSnapshot");k.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove();k.select();a.fire("saveSnapshot");d=1}else if(k.collapsed)if((h=g.block)&&(m= +h[c?"getPrevious":"getNext"](p))&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("table")&&k[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");k[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove();k["moveToElementEdit"+(c?"End":"Start")](m);k.select();a.fire("saveSnapshot");d=1}else if(g.blockLimit&&g.blockLimit.is("td")&&(i=g.blockLimit.getAscendant("table"))&&k.checkBoundaryOfElement(i,c?CKEDITOR.START:CKEDITOR.END)&&(m=i[c?"getPrevious":"getNext"](p))){a.fire("saveSnapshot");k["moveToElementEdit"+ +(c?"End":"Start")](m);k.checkStartOfBlock()&&k.checkEndOfBlock()?m.remove():k.select();a.fire("saveSnapshot");d=1}else if((i=g.contains(["td","th","caption"]))&&k.checkBoundaryOfElement(i,c?CKEDITOR.START:CKEDITOR.END))d=1}return!d});a.blockless&&(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in l&&!this.getFirst(f)){this.appendBogus();b=a.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this, +"dblclick",function(b){if(a.readOnly)return false;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")&&!c.isReadOnly()){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b= +b.data.getTarget();if(!b.getOuterHtml().replace(m,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){b=b.data.domEvent.getKey();if(b in l){var c=b==8,d=a.getSelection().getRanges()[0], +b=d.startPath();if(d.collapsed){var e;a:{var f=b.block;if(f)if(d[c?"checkStartOfBlock":"checkEndOfBlock"]())if(!d.moveToClosestEditablePosition(f,!c)||!d.collapsed)e=false;else{if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var k=d.startContainer.getChild(d.startOffset-(c?1:0));if(k&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("hr")){a.fire("saveSnapshot");k.remove();e=true;break a}}if((d=d.startPath().block)&&(!d||!d.contains(f))){a.fire("saveSnapshot");var g;(g=(c?d:f).getBogus())&&g.remove();e=a.getSelection(); +g=e.createBookmarks();(c?f:d).moveChildren(c?d:f,false);b.lastElement.mergeSiblings();h(f,d,!c);e.selectBookmarks(g);e=true}}else e=false;else e=false}if(!e)return}else{c=d;e=b.block;g=c.endPath().block;if(!e||!g||e.equals(g))b=false;else{a.fire("saveSnapshot");(f=e.getBogus())&&f.remove();c.deleteContents();if(g.getParent()){g.moveChildren(e,false);b.lastElement.mergeSiblings();h(e,g,true)}c=a.getSelection().getRanges()[0];c.collapse(1);c.select();b=true}if(!b)return}a.getSelection().scrollIntoView(); +a.fire("saveSnapshot");return false}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}}this.editor.fire("contentDomUnload"); +delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var i=CKEDITOR.dom.walker.bogus(),m=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,p=CKEDITOR.dom.walker.whitespaces(true),s=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded", +function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated", +function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d)if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('<span id="'+e+'" class="cke_voice_label">'+d+"</span>");c.append(d);a.changeAttr("aria-describedby",e)}}})}); +CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var x=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,j,k,l=[],r=d.range.startContainer;e=d.range.startPath();for(var r=g[r.getName()],h=0,i=c.getChildren(),m=i.count(),n=-1,q=-1,p=0,s=e.contains(g.$list);h<m;++h){e=i.getItem(h);if(a(e)){j=e.getName();if(s&&j in CKEDITOR.dtd.$list)l=l.concat(b(e,d));else{k=!!r[j];if(j=="br"&&e.data("cke-eol")&& +(!h||h==m-1)){p=(f=h?l[h-1].node:i.getItem(h+1))&&(!a(f)||!f.is("br"));f=f&&a(f)&&g.$block[f.getName()]}n==-1&&!k&&(n=h);k||(q=h);l.push({isElement:1,isLineBreak:p,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:j,allowed:k});f=p=0}}else l.push({isElement:0,node:e,allowed:1})}if(n>-1)l[n].firstNotAllowed=1;if(q>-1)l[q].lastNotAllowed=1;return l}function c(b,d){var e=[],f=b.getChildren(),j=f.count(),k,l=0,r=g[d],h=!b.is(g.$inline)||b.is("br");for(h&&e.push(" ");l<j;l++){k=f.getItem(l);a(k)&& +!k.is(r)?e=e.concat(c(k,d)):e.push(k)}h&&e.push(" ");return e}function d(b){return b&&a(b)&&(b.is(g.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function e(b,c,d,f){var j=b.clone(),k,g;j.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);if((k=(new CKEDITOR.dom.walker(j)).next())&&a(k)&&h[k.getName()]&&(g=k.getPrevious())&&a(g)&&!g.getParent().equals(b.startContainer)&&d.contains(g)&&f.contains(k)&&k.isIdentical(g)){k.moveChildren(g);k.remove();e(b,c,d,f)}}function j(b,c){function d(b,c){if(c.isBlock&&c.isElement&& +!c.node.is("br")&&a(b)&&b.is("br")){b.remove();return 1}}var e=c.endContainer.getChild(c.endOffset),f=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);if(f&&d(f,b[0])){c.setEnd(c.endContainer,c.endOffset-1);c.collapse()}}var g=CKEDITOR.dtd,h={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},r={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},i=CKEDITOR.tools.extend({},g.$inline);delete i.br;return function(h,m,q){var p=h.editor;h.getDocument();var s=p.getSelection().getRanges()[0], +w=false;if(m=="unfiltered_html"){m="html";w=true}if(!s.checkReadOnly()){var z=(new CKEDITOR.dom.elementPath(s.startContainer,s.root)).blockLimit||s.root,m={type:m,dontFilter:w,editable:h,editor:p,range:s,blockLimit:z,mergeCandidates:[],zombies:[]},p=m.range,w=m.mergeCandidates,t,E,y,C;if(m.type=="text"&&p.shrink(CKEDITOR.SHRINK_ELEMENT,true,false)){t=CKEDITOR.dom.element.createFromHtml("<span> </span>",p.document);p.insertNode(t);p.setStartAfter(t)}E=new CKEDITOR.dom.elementPath(p.startContainer); +m.endPath=y=new CKEDITOR.dom.elementPath(p.endContainer);if(!p.collapsed){var z=y.block||y.blockLimit,I=p.getCommonAncestor();z&&(!z.equals(I)&&!z.contains(I)&&p.checkEndOfBlock())&&m.zombies.push(z);p.deleteContents()}for(;(C=a(p.startContainer)&&p.startContainer.getChild(p.startOffset-1))&&a(C)&&C.isBlockBoundary()&&E.contains(C);)p.moveToPosition(C,CKEDITOR.POSITION_BEFORE_END);e(p,m.blockLimit,E,y);if(t){p.setEndBefore(t);p.collapse();t.remove()}t=p.startPath();if(z=t.contains(d,false,1)){p.splitElement(z); +m.inlineStylesRoot=z;m.inlineStylesPeak=t.lastElement}t=p.createBookmark();(z=t.startNode.getPrevious(f))&&a(z)&&d(z)&&w.push(z);(z=t.startNode.getNext(f))&&a(z)&&d(z)&&w.push(z);for(z=t.startNode;(z=z.getParent())&&d(z);)w.push(z);p.moveToBookmark(t);if(t=q){t=m.range;if(m.type=="text"&&m.inlineStylesRoot){C=m.inlineStylesPeak;p=C.getDocument().createText("{cke-peak}");for(w=m.inlineStylesRoot.getParent();!C.equals(w);){p=p.appendTo(C.clone());C=C.getParent()}q=p.getOuterHtml().split("{cke-peak}").join(q)}C= +m.blockLimit.getName();if(/^\s+|\s+$/.test(q)&&"span"in CKEDITOR.dtd[C])var x='<span data-cke-marker="1"> </span>',q=x+q+x;q=m.editor.dataProcessor.toHtml(q,{context:null,fixForBody:false,dontFilter:m.dontFilter,filter:m.editor.activeFilter,enterMode:m.editor.activeEnterMode});C=t.document.createElement("body");C.setHtml(q);if(x){C.getFirst().remove();C.getLast().remove()}if((x=t.startPath().block)&&!(x.getChildCount()==1&&x.getBogus()))a:{var G;if(C.getChildCount()==1&&a(G=C.getFirst())&&G.is(r)){x= +G.getElementsByTag("*");t=0;for(w=x.count();t<w;t++){p=x.getItem(t);if(!p.is(i))break a}G.moveChildren(G.getParent(1));G.remove()}}m.dataWrapper=C;t=q}if(t){G=m.range;var x=G.document,B,q=m.blockLimit;t=0;var K;C=[];var H,Q,w=p=0,M,T;E=G.startContainer;var z=m.endPath.elements[0],U;y=z.getPosition(E);I=!!z.getCommonAncestor(E)&&y!=CKEDITOR.POSITION_IDENTICAL&&!(y&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);E=b(m.dataWrapper,m);for(j(E,G);t<E.length;t++){y=E[t];if(B=y.isLineBreak){B= +G;M=q;var N=void 0,W=void 0;if(y.hasBlockSibling)B=1;else{N=B.startContainer.getAscendant(g.$block,1);if(!N||!N.is({div:1,p:1}))B=0;else{W=N.getPosition(M);if(W==CKEDITOR.POSITION_IDENTICAL||W==CKEDITOR.POSITION_CONTAINS)B=0;else{M=B.splitElement(N);B.moveToPosition(M,CKEDITOR.POSITION_AFTER_START);B=1}}}}if(B)w=t>0;else{B=G.startPath();if(!y.isBlock&&m.editor.config.autoParagraph!==false&&(m.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&m.editor.editable().equals(B.blockLimit)&&!B.block)&&(Q=m.editor.activeEnterMode!= +CKEDITOR.ENTER_BR&&m.editor.config.autoParagraph!==false?m.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":false)){Q=x.createElement(Q);Q.appendBogus();G.insertNode(Q);CKEDITOR.env.needsBrFiller&&(K=Q.getBogus())&&K.remove();G.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END)}if((B=G.startPath().block)&&!B.equals(H)){if(K=B.getBogus()){K.remove();C.push(B)}H=B}y.firstNotAllowed&&(p=1);if(p&&y.isElement){B=G.startContainer;for(M=null;B&&!g[B.getName()][y.name];){if(B.equals(q)){B=null;break}M=B; +B=B.getParent()}if(B){if(M){T=G.splitElement(M);m.zombies.push(T);m.zombies.push(M)}}else{M=q.getName();U=!t;B=t==E.length-1;M=c(y.node,M);for(var N=[],W=M.length,X=0,Z=void 0,$=0,aa=-1;X<W;X++){Z=M[X];if(Z==" "){if(!$&&(!U||X)){N.push(new CKEDITOR.dom.text(" "));aa=N.length}$=1}else{N.push(Z);$=0}}B&&aa==N.length&&N.pop();U=N}}if(U){for(;B=U.pop();)G.insertNode(B);U=0}else G.insertNode(y.node);if(y.lastNotAllowed&&t<E.length-1){(T=I?z:T)&&G.setEndAt(T,CKEDITOR.POSITION_AFTER_START);p=0}G.collapse()}}m.dontMoveCaret= +w;m.bogusNeededBlocks=C}K=m.range;var P;T=m.bogusNeededBlocks;for(U=K.createBookmark();H=m.zombies.pop();)if(H.getParent()){Q=K.clone();Q.moveToElementEditStart(H);Q.removeEmptyBlocksAtEnd()}if(T)for(;H=T.pop();)CKEDITOR.env.needsBrFiller?H.appendBogus():H.append(K.document.createText(" "));for(;H=m.mergeCandidates.pop();)H.mergeSiblings();K.moveToBookmark(U);if(!m.dontMoveCaret){for(H=a(K.startContainer)&&K.startContainer.getChild(K.startOffset-1);H&&a(H)&&!H.is(g.$empty);){if(H.isBlockBoundary())K.moveToPosition(H, +CKEDITOR.POSITION_BEFORE_END);else{if(d(H)&&H.getHtml().match(/(\s| )$/g)){P=null;break}P=K.clone();P.moveToPosition(H,CKEDITOR.POSITION_BEFORE_END)}H=H.getLast(f)}P&&K.moveToRange(P)}s.select();n(h)}}}(),q=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return false;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c); +a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;b-- >0;){d=a.getItem(b);if(!CKEDITOR.tools.trim(d.getHtml())){d.appendBogus();CKEDITOR.env.ie&&(CKEDITOR.env.version<9&&d.getChildCount())&&d.getFirst().remove()}}}return function(d){var e=d.startContainer,f=e.getAscendant("table",1),g=false;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();if(!f){f=d.clone();f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);f=a(f).lastForward();g=true}f|| +(f=e);if(f.is("table")){d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START);d.collapse(true);f.remove()}else{f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",g));f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",g));(e=f.getBogus())&&e.remove();d.moveToPosition(f,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}()})(); +(function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function c(){s=true;if(!p){b.call(this);p=CKEDITOR.tools.setTimeout(b, +200,this)}}function b(){p=null;if(s){CKEDITOR.tools.setTimeout(a,0,this);s=false}}function f(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,d=a.getPreviousNode(x,null,c),e=a.getNextNode(x,null,c);return b(d)||b(e,1)||!d&&!e&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function d(a){return a.getCustomData("cke-fillingChar")} +function e(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var d,e=a.getDocument().getSelection().getNative(),f=e&&e.type!="None"&&e.getRangeAt(0);if(c.getLength()>1&&f&&f.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];f=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;f&&d[1]--;var h;f=e;if(!f.isCollapsed){h=f.getRangeAt(0);h.setStart(f.anchorNode,f.anchorOffset);h.setEnd(f.focusNode,f.focusOffset);h=h.collapsed}h&&d.unshift(d.pop())}}c.setText(g(c.getText())); +if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}function g(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function n(a,b,c){var d=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var e=a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);else{var f=new CKEDITOR.dom.range(a);f.moveToElementEditStart(a);var g=a.getDocument().$.createRange();g.setStart(f.startContainer.$, +f.startOffset);g.collapse(1);b.removeAllRanges();b.addRange(g)}c&&a.focus();d.removeListener();e&&e.removeListener()}function h(a){var b=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"> </div>',a.document);a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(1),d=a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START); +d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function i(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];if(e.length==1&&f.collapsed)if((d=f[d<38?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getAttribute("contenteditable")=="false"){a.getSelection().fake(d);c.data.preventDefault();c.cancel()}}}} +function m(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=c.startContainer,e;d;){if((e=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly())break;e&&d.getAttribute("contentEditable")=="false"&&c.setStartAfter(d);d=d.getParent()}d=c.startContainer;e=c.endContainer;var f=c.startOffset,g=c.endOffset,h=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(f>=d.getLength()?h.setStartAfter(d):h.setStartBefore(d)); +e&&e.type==CKEDITOR.NODE_TEXT&&(g?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);if(!(d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(d);e.collapsed||a.splice(b+1,0,e)}return true}return false};d.next()}}return a}var p,s,x=CKEDITOR.dom.walker.invisible(1),q=function(){function a(b){return function(a){var c=a.editor.createRange(); +c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!(e=d.moveToClosestEditablePosition(b.selected,a)))e=d.moveToClosestEditablePosition(b.selected,!a);e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();if(!e){d.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([d])}c.fire("saveSnapshot");return false}}var c=a(),d=a(1);return{37:c, +38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function d(){var a=f.getSelection();a&&a.removeAllRanges()}var f=b.editor;f.on("contentDom",function(){var b=f.document,d=CKEDITOR.document,g=f.editable(),k=b.getBody(),l=b.getDocumentElement(),h=g.isInline(),m,n;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();if(m!==0)if((a=f.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$){a=f.createRange();a.moveToElementEditStart(g);a.select()}}, +null,null,-2);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){m&&CKEDITOR.env.webkit&&(m=f._.previousActive&&f._.previousActive.equals(b.getActive()));f.unlockSelection(m);m=0},null,null,-1);g.attachListener(g,"mousedown",function(){m=0});if(CKEDITOR.env.ie||h){var q=function(){n=new CKEDITOR.dom.selection(f.getSelection());n.lock()};o?g.attachListener(g,"beforedeactivate",q,null,null,-1):g.attachListener(f,"selectionCheck",q,null,null,-1);g.attachListener(g,CKEDITOR.env.webkit? +"DOMFocusOut":"blur",function(){f.lockSelection(n);m=1},null,null,-1);g.attachListener(g,"mousedown",function(){m=0})}if(CKEDITOR.env.ie&&!h){var w;g.attachListener(g,"mousedown",function(a){if(a.data.$.button==2){a=f.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)w=f.window.getScrollPosition()}});g.attachListener(g,"mouseup",function(a){if(a.data.$.button==2&&w){f.document.$.documentElement.scrollLeft=w.x;f.document.$.documentElement.scrollTop=w.y}w=null});if(b.$.compatMode!= +"BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)l.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=k.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}e.setEndPoint(g.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function c(){l.removeListener("mousemove",b);d.removeListener("mouseup",c);l.removeListener("mouseup",c);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<l.$.clientHeight&&a.$.x<l.$.clientWidth){var e=k.$.createTextRange(); +try{e.moveToPoint(a.$.x,a.$.y)}catch(f){}var g=e.duplicate();l.on("mousemove",b);d.on("mouseup",c);l.on("mouseup",c)}});if(CKEDITOR.env.version>7&&CKEDITOR.env.version<11){l.on("mousedown",function(a){if(a.data.getTarget().is("html")){d.on("mouseup",z);l.on("mouseup",z)}});var z=function(){d.removeListener("mouseup",z);l.removeListener("mouseup",z);var a=CKEDITOR.document.$.selection,c=a.createRange();a.type!="None"&&c.parentElement().ownerDocument==b.$&&c.select()}}}}g.attachListener(g,"selectionchange", +a,f);g.attachListener(g,"keyup",c,f);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){f.forceNextSelectionCheck();f.selectionChange(1)});if(h&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var t;g.attachListener(g,"mousedown",function(){t=1});g.attachListener(b.getDocumentElement(),"mouseup",function(){t&&c.call(f);t=0})}else g.attachListener(CKEDITOR.env.ie?g:b.getDocumentElement(),"mouseup",c,f);CKEDITOR.env.webkit&&g.attachListener(b,"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:e(g)}}, +null,null,-1);g.attachListener(g,"keydown",i(f),null,null,-1)});f.on("setData",function(){f.unlockSelection();CKEDITOR.env.webkit&&d()});f.on("contentDomUnload",function(){f.unlockSelection()});if(CKEDITOR.env.ie9Compat)f.on("beforeDestroy",d,null,null,9);f.on("dataReady",function(){delete f._.fakeSelection;delete f._.hiddenSelectionContainer;f.selectionChange(1)});f.on("loadSnapshot",function(){var a=f.editable().getLast(function(a){return a.type==CKEDITOR.NODE_ELEMENT});a&&a.hasAttribute("data-cke-hidden-sel")&& +a.remove()},null,null,100);f.on("key",function(a){if(f.mode=="wysiwyg"){var b=f.getSelection();if(b.isFake){var c=q[a.data.keyCode];if(c)return c({editor:f,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady",function(a){var b=a.editor;if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=b.editable(),c=d(a);c&&(c.getCustomData("ready")?e(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){e(b.editable())},null,null,-1);var c, +f,a=function(){var a=b.editable();if(a)if(a=d(a)){var e=b.document.$.defaultView.getSelection();e.type=="Caret"&&e.anchorNode==a.$&&(f=1);c=a.getText();a.setText(g(c))}},h=function(){var a=b.editable();if(a)if(a=d(a)){a.setText(c);if(f){b.document.$.defaultView.getSelection().setPosition(a.$,a.getLength());f=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",h);b.on("beforeGetData",a,null,null,0);b.on("getData",h)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:c).call(this)};CKEDITOR.editor.prototype.getSelection= +function(a){if((this._.savedSelection||this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection; +return true}return false};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var o= +typeof window.getSelection!="function",u=1;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:u++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=a=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}b=o?this.document.$.selection:this.document.getWindow().$.getSelection(); +if(CKEDITOR.env.webkit)(b.type=="None"&&this.document.getActive().equals(a)||b.type=="Caret"&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&n(a,b);else if(CKEDITOR.env.gecko)b&&(this.document.getActive().equals(a)&&b.anchorNode&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&n(a,b,true);else if(CKEDITOR.env.ie){var d;try{d=this.document.getActive()}catch(e){}if(o)b.type=="None"&&(d&&d.equals(this.document.getDocumentElement()))&&n(a,null,true);else{(b=b&&b.anchorNode)&&(b=new CKEDITOR.dom.node(b)); +d&&(d.equals(this.document.getDocumentElement())&&b&&(a.equals(b)||a.contains(b)))&&n(a,null,true)}}d=this.getNative();var f,g;if(d)if(d.getRangeAt)f=(g=d.rangeCount&&d.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer);else{try{g=d.createRange()}catch(h){}f=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.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 A={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.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=o?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:o?function(){var a= +this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&& +d.nodeType==1&&c.endOffset-c.startOffset==1&&A[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=o?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,g,k=b.duplicate(),j=0,h=e.length-1,w=-1,i,t;j<=h;){w=Math.floor((j+h)/2);f=e[w];k.moveToElementText(f);i=k.compareEndPoints("StartToStart", +b);if(i>0)h=w-1;else if(i<0)j=w+1;else return{container:d,offset:a(f)}}if(w==-1||w==e.length-1&&i<0){k.moveToElementText(d);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!k){f=e[e.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length}}for(d=e.length;k>0&&d>0;){g=e[--d];if(g.nodeType==CKEDITOR.NODE_TEXT){t=g;k=k-g.nodeValue.length}}return{container:t,offset:-k}}k.collapse(i>0?true:false);k.setEndPoint(i> +0?"StartToStart":"EndToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;if(!k)return{container:d,offset:a(f)+(i>0?0:1)};for(;k>0;)try{g=f[i>0?"previousSibling":"nextSibling"];if(g.nodeType==CKEDITOR.NODE_TEXT){k=k-g.nodeValue.length;t=g}f=g}catch(m){return{container:d,offset:a(f)}}return{container:t,offset:i>0?-k:t.nodeValue.length+k}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root); +d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var f=c.item(e),g=f.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<g.childNodes.length&&g.childNodes[k]!=f;k++);a.setStart(new CKEDITOR.dom.node(g),k);a.setEnd(new CKEDITOR.dom.node(g), +k+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;if(!d)c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this));return!b?d:m(new CKEDITOR.dom.rangeList(d.slice()))}}(),getStartElement:function(){var a= +this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent(); +b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&(!(c=a.getEnclosedNode())|| +!(c.type==CKEDITOR.NODE_ELEMENT&&A[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=o?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel= +null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection&&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}this.rev=u++},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,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,c,d=0;d<a.length;++d){c=a[d];if(c.endContainer.equals(b))c.endOffset=Math.min(c.endOffset,b.getChildCount())}if(a.length)if(this.isLocked){var g= +CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();!g.equals(this.root)&&g.focus()}else{var h;a:{var i,m;if(a.length==1&&!(m=a[0]).collapsed&&(h=m.getEnclosedNode())&&h.type==CKEDITOR.NODE_ELEMENT){m=m.clone();m.shrink(CKEDITOR.SHRINK_ELEMENT,true);if((i=m.getEnclosedNode())&&i.type==CKEDITOR.NODE_ELEMENT)h=i;if(h.getAttribute("contenteditable")=="false")break a}h=void 0}if(h)this.fake(h);else{if(o){m=CKEDITOR.dom.walker.whitespaces(true);i=/\ufeff|\u00a0/;b={table:1,tbody:1, +tr:1};if(a.length>1){h=a[a.length-1];a[0].setEnd(h.endContainer,h.endOffset)}h=a[0];var a=h.collapsed,n,q,p;if((c=h.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in A&&(!c.is("a")||!c.getText()))try{p=c.$.createControlRange();p.addElement(c.$);p.select();return}catch(s){}if(h.startContainer.type==CKEDITOR.NODE_ELEMENT&&h.startContainer.getName()in b||h.endContainer.type==CKEDITOR.NODE_ELEMENT&&h.endContainer.getName()in b){h.shrink(CKEDITOR.NODE_ELEMENT,true);a=h.collapsed}p=h.createBookmark(); +b=p.startNode;if(!a)g=p.endNode;p=h.document.$.body.createTextRange();p.moveToElementText(b.$);p.moveStart("character",1);if(g){i=h.document.$.body.createTextRange();i.moveToElementText(g.$);p.setEndPoint("EndToEnd",i);p.moveEnd("character",-1)}else{n=b.getNext(m);q=b.hasAscendant("pre");n=!(n&&n.getText&&n.getText().match(i))&&(q||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));q=h.document.createElement("span");q.setHtml("");q.insertBefore(b);n&&h.document.createText("").insertBefore(b)}h.setStartBefore(b); +b.remove();if(a){if(n){p.moveStart("character",-1);p.select();h.document.$.selection.clear()}else p.select();h.moveToPosition(q,CKEDITOR.POSITION_BEFORE_START);q.remove()}else{h.setEndBefore(g);g.remove();p.select()}}else{g=this.getNative();if(!g)return;this.removeAllRanges();for(p=0;p<a.length;p++){if(p<a.length-1){n=a[p];q=a[p+1];i=n.clone();i.setStart(n.endContainer,n.endOffset);i.setEnd(q.startContainer,q.startOffset);if(!i.collapsed){i.shrink(CKEDITOR.NODE_ELEMENT,true);h=i.getCommonAncestor(); +i=i.getEnclosedNode();if(h.isReadOnly()||i&&i.isReadOnly()){q.setStart(n.startContainer,n.startOffset);a.splice(p--,1);continue}}}h=a[p];q=this.document.$.createRange();if(h.collapsed&&CKEDITOR.env.webkit&&f(h)){n=this.root;e(n,false);i=n.getDocument().createText("​");n.setCustomData("cke-fillingChar",i);h.insertNode(i);if((n=i.getNext())&&!i.getPrevious()&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()=="br"){e(this.root);h.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START)}else h.moveToPosition(i,CKEDITOR.POSITION_AFTER_END)}q.setStart(h.startContainer.$, +h.startOffset);try{q.setEnd(h.endContainer.$,h.endOffset)}catch(w){if(w.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0){h.collapse(1);q.setEnd(h.endContainer.$,h.endOffset)}else throw w;}g.addRange(q)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a){var b=this.root.editor;this.reset();h(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT; +c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=u++;b._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b= +[],c=0;c<a.length;c++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[c]);b.push(d)}a.isFake?this.fake(b[0].getEnclosedNode()):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return!a.length?null:a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative(); +try{a&&a[o?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}})();"use strict";CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3; +(function(){function a(a,b){for(var c,d;a=a.getParent();){if(a.equals(b))break;if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");e=="false"?c=a:e=="true"&&(d=1)}}return c}function c(b){var d=b.document;if(b.collapsed){d=u(this,d);b.insertNode(d);b.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END)}else{var e=this.element,g=this._.definition,h,i=g.ignoreReadonly,j=i||g.includeReadonly;j==void 0&&(j=b.root.getCustomData("cke_includeReadonly"));var k=CKEDITOR.dtd[e]; +if(!k){h=true;k=CKEDITOR.dtd.span}b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var m=b.createBookmark(),l=m.startNode,n=m.endNode,p=l,q;if(!i){var o=b.getCommonAncestor(),i=a(l,o),o=a(n,o);i&&(p=i.getNextSourceNode(true));o&&(n=o)}for(p.getPosition(n)==CKEDITOR.POSITION_FOLLOWING&&(p=0);p;){i=false;if(p.equals(n)){p=null;i=true}else{var s=p.type==CKEDITOR.NODE_ELEMENT?p.getName():null,o=s&&p.getAttribute("contentEditable")=="false",r=s&&p.getAttribute("data-nostyle");if(s&&p.data("cke-bookmark")){p= +p.getNextSourceNode(true);continue}if(o&&j&&CKEDITOR.dtd.$block[s])for(var v=p,A=f(v),D=void 0,I=A.length,O=0,v=I&&new CKEDITOR.dom.range(v.getDocument());O<I;++O){var D=A[O],S=CKEDITOR.filter.instances[D.data("cke-filter")];if(S?S.check(this):1){v.selectNodeContents(D);c.call(this,v)}}A=s?!k[s]||r?0:o&&!j?0:(p.getPosition(n)|L)==L&&(!g.childRule||g.childRule(p)):1;if(A)if((A=p.getParent())&&((A.getDtd()||CKEDITOR.dtd.span)[e]||h)&&(!g.parentRule||g.parentRule(A))){if(!q&&(!s||!CKEDITOR.dtd.$removeEmpty[s]|| +(p.getPosition(n)|L)==L)){q=b.clone();q.setStartBefore(p)}s=p.type;if(s==CKEDITOR.NODE_TEXT||o||s==CKEDITOR.NODE_ELEMENT&&!p.getChildCount()){for(var s=p,P;(i=!s.getNext(F))&&(P=s.getParent(),k[P.getName()])&&(P.getPosition(l)|J)==J&&(!g.childRule||g.childRule(P));)s=P;q.setEndAfter(s)}}else i=true;else i=true;p=p.getNextSourceNode(r||o)}if(i&&q&&!q.collapsed){for(var i=u(this,d),o=i.hasAttributes(),r=q.getCommonAncestor(),s={},A={},D={},I={},V,R,Y;i&&r;){if(r.getName()==e){for(V in g.attributes)if(!I[V]&& +(Y=r.getAttribute(R)))i.getAttribute(V)==Y?A[V]=1:I[V]=1;for(R in g.styles)if(!D[R]&&(Y=r.getStyle(R)))i.getStyle(R)==Y?s[R]=1:D[R]=1}r=r.getParent()}for(V in A)i.removeAttribute(V);for(R in s)i.removeStyle(R);o&&!i.hasAttributes()&&(i=null);if(i){q.extractContents().appendTo(i);q.insertNode(i);x.call(this,i);i.mergeSiblings();CKEDITOR.env.ie||i.$.normalize()}else{i=new CKEDITOR.dom.element("span");q.extractContents().appendTo(i);q.insertNode(i);x.call(this,i);i.remove(true)}q=null}}b.moveToBookmark(m); +b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,true)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(j.getParent()),e=null,f=null,g=0;g<a.elements.length;g++){var h=a.elements[g];if(h==a.block||h==a.blockLimit)break;k.checkElementRemovable(h)&&(e=h)}for(g=0;g<c.elements.length;g++){h=c.elements[g];if(h==c.block||h==c.blockLimit)break;k.checkElementRemovable(h)&&(f=h)}f&&j.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE, +1);var c=a.createBookmark(),d=c.startNode;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,g=0,h;g<e.elements.length&&(h=e.elements[g]);g++){if(h==e.block||h==e.blockLimit)break;if(this.checkElementRemovable(h)){var i;if(a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(i=a.checkBoundaryOfElement(h,CKEDITOR.START)))){f=h;f.match=i?"start":"end"}else{h.mergeSiblings();h.is(this.element)?s.call(this,h):q(h,l(this)[h.getName()])}}}if(f){h=d;for(g=0;;g++){i=e.elements[g]; +if(i.equals(f))break;else if(i.match)continue;else i=i.clone();i.append(h);h=i}h[f.match=="start"?"insertBefore":"insertAfter"](f)}}else{var j=c.endNode,k=this;b();for(e=d;!e.equals(j);){f=e.getNextSourceNode();if(e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)){e.getName()==this.element?s.call(this,e):q(e,l(this)[e.getName()]);if(f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)){b();f=d.getNext()}}e=f}}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,true)}function f(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")== +"true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function d(a){var b=a.getEnclosedNode()||a.getCommonAncestor(false,true);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&A(a,this)}function e(a){var b=a.getCommonAncestor(true,true);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&& +a.removeStyle(e)}}function g(a){var b=a.createBookmark(true),c=a.createIterator();c.enforceRealBlocks=true;if(this._.enterMode)c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e=a.document,f;d=c.getNextParagraph();)if(!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)){f=u(this,e,d);h(d,f)}a.moveToBookmark(b)}function n(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=true;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)if(this.checkElementRemovable(d))if(d.is("pre")){(e= +this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e);h(d,e)}else s.call(this,d);a.moveToBookmark(b)}function h(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var d=b&&b.is("pre"),e=a.is("pre"),f=!d&&e;if(d&&!e){e=b;(f=a.getBogus())&&f.remove();f=a.getHtml();f=m(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g, +" ");f=f.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="<pre>"+f+"</pre>";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(f);b=e}else f?b=p(c?[a.getHtml()]:i(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;if((h=c.getPrevious(D))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")){d=m(h.getHtml(),/\n$/,"")+"\n\n"+m(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="<pre>"+d+"</pre>":c.setHtml(d);h.remove()}}else c&& +o(b)}function i(a){a.getName();var b=[];m(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"</pre>"+c+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function m(a,b,c){var d="",e="",a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function p(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument())); +for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=m(e,/^[ \t]*\n/,""),e=m(e,/\n$/,""),e=m(e,/^[ \t]+|[ \t]+$/g,function(a,b){return a.length==1?" ":b?" "+CKEDITOR.tools.repeat(" ",a.length-1):CKEDITOR.tools.repeat(" ",a.length-1)+" "}),e=e.replace(/\n/g,"<br>"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function s(a,b){var c=this._.definition, +d=c.attributes,c=c.styles,e=l(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),g;for(g in d)if(!((g=="class"||this._.definition.fullMatch)&&a.getAttribute(g)!=j(g,d[g]))&&!(b&&g.slice(0,5)=="data-")){f=a.hasAttribute(g);a.removeAttribute(g)}for(var h in c)if(!(this._.definition.fullMatch&&a.getStyle(h)!=j(h,c[h],true))){f=f||!!a.getStyle(h);a.removeStyle(h)}q(a,e,I[a.getName()]);f&&(this._.definition.alwaysRemoveElement?o(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode== +CKEDITOR.ENTER_BR&&!a.hasAttributes()?o(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function x(a){for(var b=l(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||s.call(this,d,true)}for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||q(d,b[f])}}}function q(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],f;if(f=a.getAttribute(e)){var g=b[d][1];(g===null|| +g.test&&g.test(f)||typeof g=="string"&&f==g)&&a.removeAttribute(e)}}c||o(a)}function o(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(D),d=a.getNext(D);c&&(c.type==CKEDITOR.NODE_TEXT||!c.isBlockBoundary({br:1}))&&a.append("br",1);d&&(d.type==CKEDITOR.NODE_TEXT||!d.isBlockBoundary({br:1}))&&a.append("br");a.remove(true)}else{c=a.getFirst();d=a.getLast();a.remove(true);if(c){c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings();d&&(!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT)&& +d.mergeSiblings()}}}function u(a,b,c){var d;d=a.element;d=="*"&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=A(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function A(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function k(a,b){for(var c in a)a[c]=a[c].replace(S,function(a, +c){return b[c]})}function l(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],f,g;if(typeof e=="string")f=e.toLowerCase();else{f=e.element?e.element.toLowerCase():a.element;g=e.attributes}e=b[f]||(b[f]={});if(g){var e=e.attributes=e.attributes||[],h;for(h in g)e.push([h.toLowerCase(),g[h]])}}}return b}function j(a,b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a, +b);return d[c?"getStyle":"getAttribute"](a)}function v(a,b,c){for(var d=a.document,e=a.getRanges(),b=b?this.removeFromRange:this.applyToRange,f,g=e.createIterator();f=g.getNextRange();)b.call(this,f,c);a.selectRanges(e);d.removeCustomData("doc_processing_style")}var I={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},r= +{a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},O=/\s*(?:;\s*|$)/,S=/#\((.+?)\)/g,F=CKEDITOR.dom.walker.bookmark(0,1),D=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if(typeof a.type=="string")return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;if(c&&c.style){a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style));delete c.style}if(b){a=CKEDITOR.tools.clone(a);k(a.attributes, +b);k(a.styles,b)}c=this.element=a.element?typeof a.element=="string"?a.element.toLowerCase():a.element:"*";this.type=a.type||(I[c]?CKEDITOR.STYLE_BLOCK:r[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);if(typeof this.element=="object")this.type=CKEDITOR.STYLE_OBJECT;this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return v.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode; +v.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return v.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode;v.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?g:this.type==CKEDITOR.STYLE_OBJECT?d:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange= +this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?n:this.type==CKEDITOR.STYLE_OBJECT?e:null;return this.removeFromRange(a)},applyToObject:function(a){A(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,true,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,e;d<c.length;d++){e=c[d];if(!(this.type==CKEDITOR.STYLE_INLINE&&(e==a.block||e==a.blockLimit))){if(this.type== +CKEDITOR.STYLE_OBJECT){var f=e.getName();if(!(typeof this.element=="string"?f==this.element:f in this.element))continue}if(this.checkElementRemovable(e,true,b))return true}}}return false},checkApplicable:function(a,b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return false;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return true},checkElementMatch:function(a,b){var c=this._.definition; +if(!a||!c.ignoreReadonly&&a.isReadOnly())return false;var d=a.getName();if(typeof this.element=="string"?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return true;if(d=c._AC)c=d;else{var d={},e=0,f=c.attributes;if(f)for(var g in f){e++;d[g]=f[g]}if(g=CKEDITOR.style.getStyleText(c)){d.style||e++;d.style=g}d._length=e;c=c._AC=d}if(c._length){for(var h in c)if(h!="_length"){e=a.getAttribute(h)||"";if(h=="style")a:{d=c[h];typeof d=="string"&&(d=CKEDITOR.tools.parseCssText(d));typeof e== +"string"&&(e=CKEDITOR.tools.parseCssText(e,true));g=void 0;for(g in d)if(!(g in e&&(e[g]==d[g]||d[g]=="inherit"||e[g]=="inherit"))){d=false;break a}d=true}else d=c[h]==e;if(d){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return true;if(b=l(this)[a.getName()]){var d;if(!(b=b.attributes))return true;for(c=0;c<b.length;c++){d=b[c][0];if(d=a.getAttribute(d)){var e=b[c][1];if(e===null||typeof e== +"string"&&d==e||e.test(d))return true}}}return false},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;d=="bdo"&&(d="span");var c=["<",d],e=b.attributes;if(e)for(var f in e)c.push(" ",f,'="',e[f],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style="',e,'"');c.push(">",a||b.name,"</",d,">");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"", +d="";c.length&&(c=c.replace(O,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(O,";");f=="inherit"?d=d+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,true);return this.customHandlers[a.type]=b}; +var L=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,J=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(a,c){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,c,true)};CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)}; +CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(a,c,b){CKEDITOR.stylesSet.addExternal(a,c,"");CKEDITOR.stylesSet.load(a,b)}; +CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,c){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(a){for(var c=0;c<b.length;c++){var e=b[c],g=e.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;e.fn.call(this,g)}})}b.push({style:a,fn:c})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions); +else{var c=this,b=c.config.stylesCombo_stylesSet||c.config.stylesSet;if(b===false)a(null);else if(b instanceof Array){c._.stylesDefinitions=b;a(b)}else{b||(b="default");var b=b.split(":"),f=b[0];CKEDITOR.stylesSet.addExternal(f,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(f,function(b){c._.stylesDefinitions=b[f];a(c._.stylesDefinitions)})}}}}); +CKEDITOR.dom.comment=function(a,c){typeof a=="string"&&(a=(c?c.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}});"use strict"; +(function(){var a={},c={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(c[b]=1);CKEDITOR.dom.elementPath=function(b,d){var e=null,g=null,n=[],h=b,i,d=d||b.getDocument().getBody();do if(h.type==CKEDITOR.NODE_ELEMENT){n.push(h);if(!this.lastElement){this.lastElement=h;if(h.is(CKEDITOR.dtd.$object)||h.getAttribute("contenteditable")=="false")continue}if(h.equals(d))break;if(!g){i=h.getName(); +h.getAttribute("contenteditable")=="true"?g=h:!e&&c[i]&&(e=h);if(a[i]){var m;if(m=!e){if(i=i=="div"){a:{i=h.getChildren();m=0;for(var p=i.count();m<p;m++){var s=i.getItem(m);if(s.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[s.getName()]){i=true;break a}}i=false}i=!i}m=i}m?e=h:g=h}}}while(h=h.getParent());g||(g=d);this.block=e;this.blockLimit=g;this.root=d;this.elements=n}})(); +CKEDITOR.dom.elementPath.prototype={compare:function(a){var c=this.elements,a=a&&a.elements;if(!a||c.length!=a.length)return false;for(var b=0;b<c.length;b++)if(!c[b].equals(a[b]))return false;return true},contains:function(a,c,b){var f;typeof a=="string"&&(f=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?f=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?f=function(b){return CKEDITOR.tools.indexOf(a,b.getName())>-1}:typeof a=="function"?f=a:typeof a=="object"&&(f= +function(b){return b.getName()in a});var d=this.elements,e=d.length;c&&e--;if(b){d=Array.prototype.slice.call(d,0);d.reverse()}for(c=0;c<e;c++)if(f(d[c]))return d[c];return null},isContextFor:function(a){var c;if(a in CKEDITOR.dtd.$block){c=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit;return!!c.getDtd()[a]}return true},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}}; +CKEDITOR.dom.text=function(a,c){typeof a=="string"&&(a=(c?c.$:document).createTextNode(a));this.$=a};CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node; +CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var c=this.$.parentNode,b=c.childNodes.length,f=this.getLength(),d=this.getDocument(),e=new CKEDITOR.dom.text(this.$.splitText(a),d);if(c.childNodes.length==b)if(a>=f){e=d.createText("");e.insertAfter(this)}else{a=d.createText("");a.insertAfter(e);a.remove()}return e},substring:function(a, +c){return typeof c!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,c)}}); +(function(){function a(a,c,d){var e=a.serializable,g=c[d?"endContainer":"startContainer"],n=d?"endOffset":"startOffset",h=e?c.document.getById(a.startNode):a.startNode,a=e?c.document.getById(a.endNode):a.endNode;if(g.equals(h.getPrevious())){c.startOffset=c.startOffset-g.getLength()-a.getPrevious().getLength();g=a.getNext()}else if(g.equals(a.getPrevious())){c.startOffset=c.startOffset-g.getLength();g=a.getNext()}g.equals(h.getParent())&&c[n]++;g.equals(a.getParent())&&c[n]++;c[d?"endContainer":"startContainer"]= +g;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,c)};var c={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],e;return{getNextRange:function(g){e=e==void 0?0:e+1;var n=a[e];if(n&&a.length>1){if(!e)for(var h=a.length-1;h>=0;h--)d.unshift(a[h].createBookmark(true));if(g)for(var i=0;a[e+i+1];){for(var m=n.document,g=0,h=m.getById(d[i].endNode),m=m.getById(d[i+ +1].startNode);;){h=h.getNextSourceNode(false);if(m.equals(h))g=1;else if(c(h)||h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary())continue;break}if(!g)break;i++}for(n.moveToBookmark(d.shift());i--;){h=a[++e];h.moveToBookmark(d.shift());n.setEnd(h.endContainer,h.endOffset)}}return n}}},createBookmarks:function(b){for(var c=[],d,e=0;e<this.length;e++){c.push(d=this[e].createBookmark(b,true));for(var g=e+1;g<this.length;g++){this[g]=a(d,this[g]);this[g]=a(d,this[g],true)}}return c},createBookmarks2:function(a){for(var c= [],d=0;d<this.length;d++)c.push(this[d].createBookmark2(a));return c},moveToBookmarks:function(a){for(var c=0;c<this.length;c++)this[c].moveToBookmark(a[c])}}})(); -(function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function d(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,f;e<c.length;e++){f=c[e];if(d.ie&&(f.replace(/^ie/,"")==d.version||d.quirks&&f=="iequirks"))f="ie";if(d[f]){b=b+("_"+c[e]);break}}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){if(!f[a]){CKEDITOR.document.appendStyleSheet(d(a));f[a]=1}b&&b()} -function c(a){var b=a.getById(h);if(!b){b=a.getHead().append("style");b.setAttribute("id",h);b.setAttribute("type","text/css")}return b}function e(a,b,c){var d,e,g;if(CKEDITOR.env.webkit){b=b.split("}").slice(0,-1);for(e=0;e<b.length;e++)b[e]=b[e].split("{")}for(var f=0;f<a.length;f++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){g=b[e][1];for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);a[f].$.sheet.addRule(b[e][0],g)}else{g=b;for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&& -CKEDITOR.env.version<11?a[f].$.styleSheet.cssText=a[f].$.styleSheet.cssText+g:a[f].$.innerHTML=a[f].$.innerHTML+g}}var f={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a, -b,c,d,e){var f;if(a){a=a.toLowerCase();b&&(f=this.icons[a+"-rtl"]);f||(f=this.icons[a])}a=c||f&&f.path||"";d=d||f&&f.offset;e=e||f&&f.bgsize||"16px";return a&&"background-image:url("+CKEDITOR.getUrl(a)+");background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){var c=CKEDITOR.skin.chameleon,d=[[j,a]];this.uiColor=a;e([b],c(this, -"editor"),d);e(n,c(this,"panel"),d)}).call(this,a)}});var h="cke_ui_color",n=[],j=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor,a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);n.push(a);var d=b.getUiColor();d&&e([a],CKEDITOR.skin.chameleon(b,"panel"),[[j,d]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})(); -(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=false;else{var a=CKEDITOR.dom.element.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=a.getComputedStyle("border-top-color")==a.getComputedStyle("border-right-color")}catch(d){CKEDITOR.env.hc=false}a.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); -CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var b=0;b<a.length;b++){CKEDITOR.editor.prototype.constructor.apply(a[b][0],a[b][1]);CKEDITOR.add(a[b][0])}}})();/* - Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +(function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function c(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,f;e<c.length;e++){f=c[e];if(d.ie&&(f.replace(/^ie/,"")==d.version||d.quirks&&f=="iequirks"))f="ie";if(d[f]){b=b+("_"+c[e]);break}}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){if(!e[a]){CKEDITOR.document.appendStyleSheet(c(a));e[a]=1}b&&b()} +function f(a){var b=a.getById(g);if(!b){b=a.getHead().append("style");b.setAttribute("id",g);b.setAttribute("type","text/css")}return b}function d(a,b,c){var d,e,f;if(CKEDITOR.env.webkit){b=b.split("}").slice(0,-1);for(e=0;e<b.length;e++)b[e]=b[e].split("{")}for(var g=0;g<a.length;g++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){f=b[e][1];for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);a[g].$.sheet.addRule(b[e][0],f)}else{f=b;for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&& +CKEDITOR.env.version<11?a[g].$.styleSheet.cssText=a[g].$.styleSheet.cssText+f:a[g].$.innerHTML=a[g].$.innerHTML+f}}var e={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(c(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a, +b,c,d,e){var f;if(a){a=a.toLowerCase();b&&(f=this.icons[a+"-rtl"]);f||(f=this.icons[a])}a=c||f&&f.path||"";d=d||f&&f.offset;e=e||f&&f.bgsize||"16px";return a&&"background-image:url("+CKEDITOR.getUrl(a)+");background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=f(CKEDITOR.document);return(this.setUiColor=function(a){var c=CKEDITOR.skin.chameleon,e=[[h,a]];this.uiColor=a;d([b],c(this, +"editor"),e);d(n,c(this,"panel"),e)}).call(this,a)}});var g="cke_ui_color",n=[],h=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor,a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=f(a);n.push(a);var c=b.getUiColor();c&&d([a],CKEDITOR.skin.chameleon(b,"panel"),[[h,c]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})(); +(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=false;else{var a=CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var c=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!!(c&&c==b)}catch(f){CKEDITOR.env.hc=false}a.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc"; +CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(c=0;c<a.length;c++){CKEDITOR.editor.prototype.constructor.apply(a[c][0],a[c][1]);CKEDITOR.add(a[c][0])}}})();/* + Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -CKEDITOR.skin.name="moono";CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8,opera"; +CKEDITOR.skin.name="moono";CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8"; CKEDITOR.skin.chameleon=function(){var b=function(){return function(b,e){for(var a=b.match(/[^#]./g),c=0;3>c;c++){var f=a,h=c,d;d=parseInt(a[c],16);d=("0"+(0>e?0|d*(1+e):0|d+(255-d)*e).toString(16)).slice(-2);f[h]=d}return"#"+a.join("")}}(),c=function(){var b=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");return function(c, a){return b.output({from:c,to:a})}}(),f={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "), panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; return function(g,e){var a=g.uiColor,a={id:"."+g.id,defaultBorder:b(a,-0.1),defaultGradient:c(b(a,0.9),a),lightGradient:c(b(a,1),b(a,0.7)),mediumGradient:c(b(a,0.8),b(a,0.5)),ckeButtonOn:c(b(a,0.6),b(a,0.7)),ckeResizer:b(a,-0.4),ckeToolbarSeparator:b(a,0.5),ckeColorauto:b(a,0.8),dialogBody:b(a,0.7),dialogTabSelected:c("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:b(a,-0.6),elementsPathBg:a,menubuttonIcon:b(a,0.5),menubuttonIconHover:b(a,0.3)};return f[e].output(a).replace(/\[/g, -"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var i=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;d<arguments.length;d++)a.push(arguments[d]);a.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,a);return this._},r={build:function(b,a,d){return new CKEDITOR.ui.dialog.textInput(b,a,d)}},l={build:function(b,a,d){return new CKEDITOR.ui.dialog[a.type](b,a,d)}},n={isChanged:function(){return this.getValue()!= +"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var h=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;d<arguments.length;d++)a.push(arguments[d]);a.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,a);return this._},r={build:function(b,a,d){return new CKEDITOR.ui.dialog.textInput(b,a,d)}},l={build:function(b,a,d){return new CKEDITOR.ui.dialog[a.type](b,a,d)}},n={isChanged:function(){return this.getValue()!= this.getInitValue()},reset:function(b){this.setValue(this.getInitValue(),b)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},o=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,a){this._.domOnChangeRegistered||(b.on("load",function(){this.getInputElement().on("change",function(){b.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})}, -this)},this),this._.domOnChangeRegistered=!0);this.on("change",a)}},!0),s=/^on([A-Z]\w+)/,p=function(b){for(var a in b)(s.test(a)||"title"==a||"type"==a)&&delete b[a];return b};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,a,d,e){if(!(4>arguments.length)){var c=i.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null,{role:"presentation"},function(){var f=[],d=a.required?" cke_required":"";"horizontal"!= -a.labelLayout?f.push('<label class="cke_dialog_ui_labeled_label'+d+'" ',' id="'+c.labelId+'"',c.inputId?' for="'+c.inputId+'"':"",(a.labelStyle?' style="'+a.labelStyle+'"':"")+">",a.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',a.controlStyle?' style="'+a.controlStyle+'"':"",' role="radiogroup" aria-labelledby="'+c.labelId+'">',e.call(this,b,a),"</div>"):(d={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+d+'" id="'+c.labelId+ -'" for="'+c.inputId+'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(a.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(a.controlStyle?' style="'+a.controlStyle+'"':"")+">"+e.call(this,b,a)+"</span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,f));return f.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){i.call(this,a);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+ -a.type,id:e,type:a.type};a.validate&&(this.validate=a.validate);a.maxLength&&(c.maxlength=a.maxLength);a.size&&(c.size=a.size);a.inputStyle&&(c.style=a.inputStyle);var f=this,h=!1;b.on("load",function(){f.getInputElement().on("keydown",function(a){a.data.getKeystroke()==13&&(h=true)});f.getInputElement().on("keyup",function(a){if(a.data.getKeystroke()==13&&h){b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0);h=false}},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this, -b,a,d,function(){var b=['<div class="cke_dialog_ui_input_',a.type,'" role="presentation"'];a.width&&b.push('style="width:'+a.width+'" ');b.push("><input ");c["aria-labelledby"]=this._.labelId;this._.required&&(c["aria-required"]=this._.required);for(var d in c)b.push(d+'="'+c[d]+'" ');b.push(" /></div>");return b.join("")})}},textarea:function(b,a,d){if(!(3>arguments.length)){i.call(this,a);var e=this,c=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",f={};a.validate&&(this.validate=a.validate); -f.rows=a.rows||5;f.cols=a.cols||20;f["class"]="cke_dialog_ui_input_textarea "+(a["class"]||"");"undefined"!=typeof a.inputStyle&&(f.style=a.inputStyle);a.dir&&(f.dir=a.dir);CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){f["aria-labelledby"]=this._.labelId;this._.required&&(f["aria-required"]=this._.required);var a=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',c,'" '],b;for(b in f)a.push(b+'="'+CKEDITOR.tools.htmlEncode(f[b])+'" ');a.push(">",CKEDITOR.tools.htmlEncode(e._["default"]), -"</textarea></div>");return a.join("")})}},checkbox:function(b,a,d){if(!(3>arguments.length)){var e=i.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),d=[],h=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};p(c);if(a["default"])g.checked= -"checked";if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,d,"input",null,g);d.push(' <label id="',h,'" for="',g.id,'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(a.label),"</label>");return d.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){i.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.valdiate);var e=[],c=this;CKEDITOR.ui.dialog.labeledElement.call(this, -b,a,d,function(){for(var d=[],h=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k<a.items.length;k++){var j=a.items[k],i=j[2]!==void 0?j[2]:j[0],l=j[1]!==void 0?j[1]:j[0],m=CKEDITOR.tools.getNextId()+"_radio_input",n=m+"_label",m=CKEDITOR.tools.extend({},a,{id:m,title:null,type:null},true),i=CKEDITOR.tools.extend({},m,{title:i},true),o={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:l,"aria-labelledby":n},q=[];if(c._["default"]==l)o.checked="checked";p(m);p(i);if(typeof m.inputStyle!= -"undefined")m.style=m.inputStyle;m.keyboardFocusable=true;e.push(new CKEDITOR.ui.dialog.uiElement(b,m,q,"input",null,o));q.push(" ");new CKEDITOR.ui.dialog.uiElement(b,i,q,"label",null,{id:n,"for":o.id},j[0]);d.push(q.join(""))}new CKEDITOR.ui.dialog.hbox(b,e,d,h);return h.join("")});this._.children=e}},button:function(b,a,d){if(arguments.length){"function"==typeof a&&(a=a(b.getParentEditor()));i.call(this,a,{disabled:a.disabled||!1});CKEDITOR.event.implementOn(this);var e=this;b.on("load",function(){var a= -this.getElement();(function(){a.on("click",function(a){e.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(e.click(),a.data.preventDefault())})})();a.unselectable()},this);var c=CKEDITOR.tools.extend({},a);delete c.style;var f=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"a",null,{style:a.style,href:"javascript:void(0)",title:a.label,hidefocus:"true","class":a["class"],role:"button","aria-labelledby":f},'<span id="'+f+ -'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(a.label)+"</span>")}},select:function(b,a,d){if(!(3>arguments.length)){var e=i.call(this,a);a.validate&&(this.validate=a.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),d=[],h=[],g={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};d.push('<div class="cke_dialog_ui_input_', -a.type,'" role="presentation"');a.width&&d.push('style="width:'+a.width+'" ');d.push(">");if(a.size!=void 0)g.size=a.size;if(a.multiple!=void 0)g.multiple=a.multiple;p(c);for(var k=0,j;k<a.items.length&&(j=a.items[k]);k++)h.push('<option value="',CKEDITOR.tools.htmlEncode(j[1]!==void 0?j[1]:j[0]).replace(/"/g,"""),'" /> ',CKEDITOR.tools.htmlEncode(j[0]));if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;e.select=new CKEDITOR.ui.dialog.uiElement(b,c,d,"select",null,g,h.join(""));d.push("</div>"); -return d.join("")})}},file:function(b,a,d){if(!(3>arguments.length)){void 0===a["default"]&&(a["default"]="");var e=CKEDITOR.tools.extend(i.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="', -e.frameId,'" title="',a.label,'" src="javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"></iframe>');return b.join("")})}},fileButton:function(b,a,d){if(!(3>arguments.length)){i.call(this,a);var e=this;a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),f=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d= -a["for"];if(!f||f.call(this,c)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(e,c,f){if(!(3>arguments.length)){var h=[],g=c.html;"<"!=g.charAt(0)&&(g="<span>"+g+"</span>");var k=c.focus;if(k){var j=this.focus;this.focus=function(){("function"== -typeof k?k:j).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,c,h,"span",null,null,"");h=h.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);f.push([g[1]," ",h[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,e,c){var f=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,e,"fieldset",null,null,function(){var a=[];f&&a.push("<legend"+ -(c.labelStyle?' style="'+c.labelStyle+'"':"")+">"+f+"</legend>");for(var b=0;b<d.length;b++)a.push(d[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(b){var a=CKEDITOR.document.getById(this._.labelId);1>a.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b= +this)},this),this._.domOnChangeRegistered=!0);this.on("change",a)}},!0),s=/^on([A-Z]\w+)/,p=function(b){for(var a in b)(s.test(a)||"title"==a||"type"==a)&&delete b[a];return b};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,a,d,f){if(!(4>arguments.length)){var c=h.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var e={role:a.role||"presentation"};a.includeLabel&&(e["aria-labelledby"]=c.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null, +e,function(){var e=[],g=a.required?" cke_required":"";if(a.labelLayout!="horizontal")e.push('<label class="cke_dialog_ui_labeled_label'+g+'" ',' id="'+c.labelId+'"',c.inputId?' for="'+c.inputId+'"':"",(a.labelStyle?' style="'+a.labelStyle+'"':"")+">",a.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',a.controlStyle?' style="'+a.controlStyle+'"':"",' role="presentation">',f.call(this,b,a),"</div>");else{g={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+ +g+'" id="'+c.labelId+'" for="'+c.inputId+'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(a.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(a.controlStyle?' style="'+a.controlStyle+'"':"")+">"+f.call(this,b,a)+"</span>"}]};CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,g,e)}return e.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+ +a.type,id:f,type:a.type};a.validate&&(this.validate=a.validate);a.maxLength&&(c.maxlength=a.maxLength);a.size&&(c.size=a.size);a.inputStyle&&(c.style=a.inputStyle);var e=this,k=!1;b.on("load",function(){e.getInputElement().on("keydown",function(a){a.data.getKeystroke()==13&&(k=true)});e.getInputElement().on("keyup",function(a){if(a.data.getKeystroke()==13&&k){b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0);k=false}},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this, +b,a,d,function(){var b=['<div class="cke_dialog_ui_input_',a.type,'" role="presentation"'];a.width&&b.push('style="width:'+a.width+'" ');b.push("><input ");c["aria-labelledby"]=this._.labelId;this._.required&&(c["aria-required"]=this._.required);for(var e in c)b.push(e+'="'+c[e]+'" ');b.push(" /></div>");return b.join("")})}},textarea:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this,c=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",e={};a.validate&&(this.validate=a.validate); +e.rows=a.rows||5;e.cols=a.cols||20;e["class"]="cke_dialog_ui_input_textarea "+(a["class"]||"");"undefined"!=typeof a.inputStyle&&(e.style=a.inputStyle);a.dir&&(e.dir=a.dir);CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){e["aria-labelledby"]=this._.labelId;this._.required&&(e["aria-required"]=this._.required);var a=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',c,'" '],b;for(b in e)a.push(b+'="'+CKEDITOR.tools.htmlEncode(e[b])+'" ');a.push(">",CKEDITOR.tools.htmlEncode(f._["default"]), +"</textarea></div>");return a.join("")})}},checkbox:function(b,a,d){if(!(3>arguments.length)){var f=h.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),e=[],d=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":d};p(c);if(a["default"])g.checked= +"checked";if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;f.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,e,"input",null,g);e.push(' <label id="',d,'" for="',g.id,'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(a.label),"</label>");return e.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.valdiate);var f=[],c=this;a.role="radiogroup"; +a.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){for(var e=[],d=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",i=0;i<a.items.length;i++){var j=a.items[i],h=j[2]!==void 0?j[2]:j[0],l=j[1]!==void 0?j[1]:j[0],m=CKEDITOR.tools.getNextId()+"_radio_input",n=m+"_label",m=CKEDITOR.tools.extend({},a,{id:m,title:null,type:null},true),h=CKEDITOR.tools.extend({},m,{title:h},true),o={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:l,"aria-labelledby":n},q=[];if(c._["default"]== +l)o.checked="checked";p(m);p(h);if(typeof m.inputStyle!="undefined")m.style=m.inputStyle;m.keyboardFocusable=true;f.push(new CKEDITOR.ui.dialog.uiElement(b,m,q,"input",null,o));q.push(" ");new CKEDITOR.ui.dialog.uiElement(b,h,q,"label",null,{id:n,"for":o.id},j[0]);e.push(q.join(""))}new CKEDITOR.ui.dialog.hbox(b,f,e,d);return d.join("")});this._.children=f}},button:function(b,a,d){if(arguments.length){"function"==typeof a&&(a=a(b.getParentEditor()));h.call(this,a,{disabled:a.disabled||!1});CKEDITOR.event.implementOn(this); +var f=this;b.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){f.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(f.click(),a.data.preventDefault())})})();a.unselectable()},this);var c=CKEDITOR.tools.extend({},a);delete c.style;var e=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"a",null,{style:a.style,href:"javascript:void(0)",title:a.label,hidefocus:"true","class":a["class"],role:"button", +"aria-labelledby":e},'<span id="'+e+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(a.label)+"</span>")}},select:function(b,a,d){if(!(3>arguments.length)){var f=h.call(this,a);a.validate&&(this.validate=a.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),e=[],d=[],g={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId}; +e.push('<div class="cke_dialog_ui_input_',a.type,'" role="presentation"');a.width&&e.push('style="width:'+a.width+'" ');e.push(">");if(a.size!=void 0)g.size=a.size;if(a.multiple!=void 0)g.multiple=a.multiple;p(c);for(var i=0,j;i<a.items.length&&(j=a.items[i]);i++)d.push('<option value="',CKEDITOR.tools.htmlEncode(j[1]!==void 0?j[1]:j[0]).replace(/"/g,"""),'" /> ',CKEDITOR.tools.htmlEncode(j[0]));if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;f.select=new CKEDITOR.ui.dialog.uiElement(b, +c,e,"select",null,g,d.join(""));e.push("</div>");return e.join("")})}},file:function(b,a,d){if(!(3>arguments.length)){void 0===a["default"]&&(a["default"]="");var f=CKEDITOR.tools.extend(h.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="', +f.frameId,'" title="',a.label,'" src="javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"></iframe>');return b.join("")})}},fileButton:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this;a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),e=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d= +a["for"];if(!e||e.call(this,c)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(f,c,e){if(!(3>arguments.length)){var k=[],g=c.html;"<"!=g.charAt(0)&&(g="<span>"+g+"</span>");var i=c.focus;if(i){var j=this.focus;this.focus=function(){("function"== +typeof i?i:j).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,f,c,k,"span",null,null,"");k=k.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);e.push([g[1]," ",k[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,f,c){var e=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"fieldset",null,null,function(){var a=[];e&&a.push("<legend"+ +(c.labelStyle?' style="'+c.labelStyle+'"':"")+">"+e+"</legend>");for(var b=0;b<d.length;b++)a.push(d[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(b){var a=CKEDITOR.document.getById(this._.labelId);1>a.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b= CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:o},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):!1},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()}, isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, focus:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){!b&&(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype= -CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;e.$.text=b;e.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(e.$):c.add(e.$,null):c.add(e.$,d);return this},remove:function(b){this.getInputElement().$.remove(b);return this},clear:function(){for(var b=this.getInputElement().$;0< +CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;f.$.text=b;f.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(f.$):c.add(f.$,null):c.add(f.$,d);return this},remove:function(b){this.getInputElement().$.remove(b);return this},clear:function(){for(var b=this.getInputElement().$;0< b.length;)b.remove(0);return this},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,a){this.getInputElement().$.checked=b;!a&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b,a){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return o.onChange.apply(this, -arguments);b.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",a);return null}},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,a){for(var d=this._.children,e,c=0;c<d.length&&(e=d[c]);c++)e.getElement().$.checked=e.getValue()==b;!a&&this.fire("change",{value:b})}, +arguments);b.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",a);return null}},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,a){for(var d=this._.children,f,c=0;c<d.length&&(f=d[c]);c++)f.getElement().$.checked=f.getValue()==b;!a&&this.fire("change",{value:b})}, getValue:function(){for(var b=this._.children,a=0;a<b.length;a++)if(b[a].getElement().$.checked)return b[a].getValue();return null},accessKeyUp:function(){var b=this._.children,a;for(a=0;a<b.length;a++)if(b[a].getElement().$.checked){b[a].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(b,a){if(CKEDITOR.env.ie)b.on("load",function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&& this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this),this.on("change",a);else return o.onChange.apply(this,arguments);return null}}},n,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,n,{getInputElement:function(){var b=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<b.$.forms.length?new CKEDITOR.dom.element(b.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit(); -return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var a=/^on([A-Z]\w+)/,d,e=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},c;for(c in b)if(d=c.match(a))this.eventProcessors[c]?this.eventProcessors[c].call(this,this._.dialog,b[c]):e(this,this._.dialog,d[1].toLowerCase(),b[c]);return this},reset:function(){function b(){d.$.open();var b="";e.size&&(b=e.size-(CKEDITOR.env.ie?7:0));var i=a.frameId+"_input"; -d.$.write(['<html dir="'+g+'" lang="'+k+'"><head><title>','
diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/README.md b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/README.md index 0f51958..1231d91 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/README.md +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/README.md @@ -1,7 +1,7 @@ CKEditor SCAYT Plugin ===================== -This plugin brings Spell Check As You Type (SCAYT) into CKEditor. +This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+. SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. diff --git a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/options.js b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/options.js index 82bf80b..aec9a1c 100644 --- a/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/options.js +++ b/djangocms_text_ckeditor/static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/options.js @@ -1,20 +1,17 @@ -/* - Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. - For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add("scaytcheck",function(j){function w(){return"undefined"!=typeof document.forms["optionsbar_"+a]?document.forms["optionsbar_"+a].options:[]}function x(b,a){if(b){var e=b.length;if(void 0==e)b.checked=b.value==a.toString();else for(var d=0;d'+b+"
")}function o(b){f.getById("dic_message_"+a).setHtml(''+b+"")} -function p(b){for(var b=(""+b).split(","),a=0,e=b.length;a
\t
\t
\t\t\t\t\t
\t
\t\t\t\t\t
\t
\t\t\t\t
\t
\t\t\t\t\t
'}]},{id:"langs",label:g.languagesTab,elements:[{type:"html",id:"langs", -html:'
\t
\t
'}]},{id:"dictionaries",label:g.dictionariesTab,elements:[{type:"html",style:"",id:"dictionaries",html:'
\t
\t
Dictionary name
\t\t\t\t\t
\t\t\t\t\t\t
\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t
'}]},{id:"about", -label:g.aboutTab,elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'
'}]}],B={title:g.title,minWidth:360,minHeight:220,onShow:function(){var b=this;b.data=j.fire("scaytDialog",{});b.options=b.data.scayt_control.option();b.chosed_lang=b.sLang=b.data.scayt_control.sLang;if(!b.data||!b.data.scayt||!b.data.scayt_control)alert("Error loading application service"),b.hide();else{var a=0;s?b.data.scayt.getCaption(j.langCode||"en",function(e){0'+h["button_"+d[c]]+"");f.getById("dic_info_"+a).setHtml(h.dic_info)}if(1== -l[0])for(c in v)d="label_"+v[c],g=f.getById(d+"_"+a),"undefined"!=typeof g&&("undefined"!=typeof h[d]&&"undefined"!=typeof k.options[v[c]])&&(g.setHtml(h[d]),g.getParent().$.style.display="block");d='

'+h.version+window.scayt.getAboutInfo().version.toString()+"

"+h.about_throwt_copy+"

";f.getById("scayt_about_"+a).setHtml(d);d=function(a,b){var c=f.createElement("label");c.setAttribute("for","cke_option"+a);c.setStyle("display", -"inline");c.setHtml(b[a]);k.sLang==a&&(k.chosed_lang=a);var d=f.createElement("div"),e=CKEDITOR.dom.element.createFromHtml('');e.on("click",function(){this.$.checked=true;k.chosed_lang=a});d.append(e);d.append(c);return{lang:b[a],code:a,radio:d}};if(1==l[1]){for(c in e.rtl)i[i.length]=d(c,e.ltr);for(c in e.ltr)i[i.length]=d(c,e.ltr);i.sort(function(a, -b){return b.lang>a.lang?-1:1});e=f.getById("scayt_lcol_"+a);d=f.getById("scayt_rcol_"+a);for(c=0;c

'+g.getLocal("version")+g.getVersion()+"

"+g.getLocal("text_copyrights")+"

",l=CKEDITOR.document,i={isChanged:function(){return null===this.newLang||this.currentLang===this.newLang?!1:!0},currentLang:g.getLang(),newLang:null,reset:function(){this.currentLang=g.getLang();this.newLang=null},id:"lang"},k=[{id:"options",label:g.getLocal("tab_options"),onShow:function(){},elements:[{type:"vbox", +id:"scaytOptions",children:function(){var a=g.getApplicationConfig(),e=[],b={"ignore-all-caps-words":"label_allCaps","ignore-domain-names":"label_ignoreDomainNames","ignore-words-with-mixed-cases":"label_mixedCase","ignore-words-with-numbers":"label_mixedWithDigits"},d;for(d in a){var c={type:"checkbox"};c.id=d;c.label=g.getLocal(b[d]);e.push(c)}return e}(),onShow:function(){this.getChild();for(var a=f.scayt,e=0;e
',onShow:function(){var a=f.scayt.getLang();l.getById("scaytLang_"+a).$.checked=!0}}]}]},{id:"dictionaries",label:g.getLocal("tab_dictionaries"), +elements:[{type:"vbox",id:"rightCol_col__left",children:[{type:"html",id:"dictionaryNote",html:""},{type:"text",id:"dictionaryName",label:g.getLocal("label_fieldNameDic")||"Dictionary name",onShow:function(a){var e=a.sender,b=f.scayt;setTimeout(function(){e.getContentElement("dictionaries","dictionaryNote").getElement().setText("");null!=b.getUserDictionaryName()&&""!=b.getUserDictionaryName()&&e.getContentElement("dictionaries","dictionaryName").setValue(b.getUserDictionaryName())},0)}},{type:"hbox", +id:"notExistDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"createDic",label:g.getLocal("btn_createDic"),title:g.getLocal("btn_createDic"),onClick:function(){var a=this.getDialog(),e=j,b=f.scayt,d=a.getContentElement("dictionaries","dictionaryName").getValue();b.createUserDictionary(d,function(c){c.error||e.toggleDictionaryButtons.call(a,!0);c.dialog=a;c.command="create";c.name=d;f.fire("scaytUserDictionaryAction",c)},function(c){c.dialog=a;c.command="create"; +c.name=d;f.fire("scaytUserDictionaryActionError",c)})}},{type:"button",id:"restoreDic",label:g.getLocal("btn_restoreDic"),title:g.getLocal("btn_restoreDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,b=j,d=a.getContentElement("dictionaries","dictionaryName").getValue();e.restoreUserDictionary(d,function(c){c.dialog=a;c.error||b.toggleDictionaryButtons.call(a,!0);c.command="restore";c.name=d;f.fire("scaytUserDictionaryAction",c)},function(c){c.dialog=a;c.command="restore";c.name=d;f.fire("scaytUserDictionaryActionError", +c)})}}]},{type:"hbox",id:"existDic",align:"left",style:"width:auto;",widths:["50%","50%"],children:[{type:"button",id:"removeDic",label:g.getLocal("btn_deleteDic"),title:g.getLocal("btn_deleteDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,b=j,d=a.getContentElement("dictionaries","dictionaryName"),c=d.getValue();e.removeUserDictionary(c,function(e){d.setValue("");e.error||b.toggleDictionaryButtons.call(a,!1);e.dialog=a;e.command="remove";e.name=c;f.fire("scaytUserDictionaryAction",e)},function(b){b.dialog= +a;b.command="remove";b.name=c;f.fire("scaytUserDictionaryActionError",b)})}},{type:"button",id:"renameDic",label:g.getLocal("btn_renameDic"),title:g.getLocal("btn_renameDic"),onClick:function(){var a=this.getDialog(),e=f.scayt,b=a.getContentElement("dictionaries","dictionaryName").getValue();e.renameUserDictionary(b,function(d){d.dialog=a;d.command="rename";d.name=b;f.fire("scaytUserDictionaryAction",d)},function(d){d.dialog=a;d.command="rename";d.name=b;f.fire("scaytUserDictionaryActionError",d)})}}]}, +{type:"html",id:"dicInfo",html:'
'+g.getLocal("text_descriptionDic")+"
"}]}]},{id:"about",label:g.getLocal("tab_about"),elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'
'+k+"
"}]}];f.on("scaytUserDictionaryAction",function(a){var e=a.data.dialog,b=e.getContentElement("dictionaries","dictionaryNote").getElement(),d=a.editor.scayt,c;void 0===a.data.error?(c=d.getLocal("message_success_"+ +a.data.command+"Dic"),c=c.replace("%s",a.data.name),b.setText(c),SCAYT.$(b.$).css({color:"blue"})):(""===a.data.name?b.setText(d.getLocal("message_info_emptyDic")):(c=d.getLocal("message_error_"+a.data.command+"Dic"),c=c.replace("%s",a.data.name),b.setText(c)),SCAYT.$(b.$).css({color:"red"}),null!=d.getUserDictionaryName()&&""!=d.getUserDictionaryName()?e.getContentElement("dictionaries","dictionaryName").setValue(d.getUserDictionaryName()):e.getContentElement("dictionaries","dictionaryName").setValue(""))}); +f.on("scaytUserDictionaryActionError",function(a){var e=a.data.dialog,b=e.getContentElement("dictionaries","dictionaryNote").getElement(),d=a.editor.scayt,c;""===a.data.name?b.setText(d.getLocal("message_info_emptyDic")):(c=d.getLocal("message_error_"+a.data.command+"Dic"),c=c.replace("%s",a.data.name),b.setText(c));SCAYT.$(b.$).css({color:"red"});null!=d.getUserDictionaryName()&&""!=d.getUserDictionaryName()?e.getContentElement("dictionaries","dictionaryName").setValue(d.getUserDictionaryName()): +e.getContentElement("dictionaries","dictionaryName").setValue("")});var j={title:g.getLocal("text_title"),resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:340,minHeight:260,onLoad:function(){if(0!=f.config.scayt_uiTabs[1]){var a=j,e=a.getLangBoxes.call(this);e.getParent().setStyle("white-space","normal");a.renderLangList(e);this.definition.minWidth=this.getSize().width;this.resize(this.definition.minWidth,this.definition.minHeight)}},onCancel:function(){i.reset()},onHide:function(){f.unlockSelection()}, +onShow:function(){f.fire("scaytDialogShown",this);if(0!=f.config.scayt_uiTabs[2]){var a=f.scayt,e=this.getContentElement("dictionaries","dictionaryName"),b=this.getContentElement("dictionaries","existDic").getElement().getParent(),d=this.getContentElement("dictionaries","notExistDic").getElement().getParent();b.hide();d.hide();null!=a.getUserDictionaryName()&&""!=a.getUserDictionaryName()?(this.getContentElement("dictionaries","dictionaryName").setValue(a.getUserDictionaryName()),b.show()):(e.setValue(""), +d.show())}},onOk:function(){var a=j,e=f.scayt;this.getContentElement("options","scaytOptions");a=a.getChangedOption.call(this);e.commitOption({changedOptions:a})},toggleDictionaryButtons:function(a){var e=this.getContentElement("dictionaries","existDic").getElement().getParent(),b=this.getContentElement("dictionaries","notExistDic").getElement().getParent();a?(e.show(),b.hide()):(e.hide(),b.show())},getChangedOption:function(){var a={};if(1==f.config.scayt_uiTabs[0])for(var e=this.getContentElement("options", +"scaytOptions").getChild(),b=0;b'),g=new CKEDITOR.dom.element("label"),h=f.scayt;b.setStyles({"white-space":"normal",position:"relative"}); +c.on("click",function(a){i.newLang=a.sender.getValue()});g.appendText(a);g.setAttribute("for",d);b.append(c);b.append(g);e===h.getLang()&&(c.setAttribute("checked",!0),c.setAttribute("defaultChecked","defaultChecked"));return b},renderLangList:function(a){var e=a.find("#left-col-"+f.name).getItem(0),a=a.find("#right-col-"+f.name).getItem(0),b=g.getLangList(),d={},c=[],i=0,h;for(h in b.ltr)d[h]=b.ltr[h];for(h in b.rtl)d[h]=b.rtl[h];for(h in d)c.push([h,d[h]]);c.sort(function(a,b){var c=0;a[1]>b[1]? +c=1:a[1]l&&(l=e)}return l}function o(a){return function(){var e=this.getValue(),e=!!(CKEDITOR.dialog.validate.integer()(e)&&0"+g.widthPx}]},e,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:function(a){var b=a.getAttribute("noWrap");("nowrap"==a.getStyle("white-space")||b)&&this.setValue("no")},commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}}, -e,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[d.notSet,""],[d.alignLeft,"left"],[d.alignCenter,"center"],[d.alignRight,"right"]],setup:function(a){var b=a.getAttribute("align");this.setValue(a.getStyle("text-align")||b||"")},commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");a.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[d.notSet,""],[d.alignTop,"top"],[d.alignMiddle,"middle"],[d.alignBottom, -"bottom"],[c.alignBaseline,"baseline"]],setup:function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}this.setValue(a||b||"")},commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]},e,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]], -setup:function(a){this.setValue(a.getName())},commit:function(a){a.renameNode(this.getValue())}},e,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:h.integer(c.invalidRowSpan),setup:function(a){(a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a&&this.setValue(a)},commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:h.integer(c.invalidColSpan), -setup:function(a){(a=parseInt(a.getAttribute("colSpan"),10))&&1!=a&&this.setValue(a)},commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},e,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:function(a){var b=a.getAttribute("bgColor");this.setValue(a.getStyle("background-color")||b)},commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()): -a.removeStyle("background-color");a.removeAttribute("bgColor")}},i?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){f.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:e]},e,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:function(a){var b= -a.getAttribute("borderColor");this.setValue(a.getStyle("border-color")||b)},commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},i?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(k?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){f.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info", -"borderColor").setValue(a);this.focus()},this)}}:e]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells[0])},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d"+h.widthPx}]},f,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:d(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")|| +b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},f,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[e.notSet,""],[e.alignLeft,"left"],[e.alignCenter,"center"],[e.alignRight,"right"],[e.alignJustify,"justify"]],setup:d(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align"); +a.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:d(function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]}, +f,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:d(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},f,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:i.integer(c.invalidRowSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()): +a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:i.integer(c.invalidColSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},f,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:d(function(a){var b=a.getAttribute("bgColor"); +return a.getStyle("background-color")||b}),commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()):a.removeStyle("background-color");a.removeAttribute("bgColor")}},k?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:f]},f, +{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:d(function(a){var b=a.getAttribute("borderColor");return a.getStyle("border-color")||b}),commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},k?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(m?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align", +"bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","borderColor").setValue(a);this.focus()},this)}}:f]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells)},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d
'),d='';a.image&&b&&(d+='');d+='