Removed Redactor and replaced it with Redactor II
authorAlexander Ebert <ebert@woltlab.com>
Tue, 27 Oct 2015 18:09:58 +0000 (19:09 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 27 Oct 2015 18:09:58 +0000 (19:09 +0100)
68 files changed:
com.woltlab.wcf/templates/wysiwyg.tpl
wcfsetup/install/files/js/3rdParty/redactor/README.md [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ar.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/az.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ba.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/bg.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/by.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ca.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/cs.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/da.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/de.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/el.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/eo.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/es.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/es_ar.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/fa.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/fi.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/fr.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ge.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/he.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/hr.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/hu.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/id.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/it.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ja.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ko.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/lt.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/lv.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/mk.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/nl.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/no_NB.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/pl.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/pt_br.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/pt_pt.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ro.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ru.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/sk.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/sl.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/sq.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/sr-cir.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/sr-lat.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/sv.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/th.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/tr.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/ua.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/vi.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/zh_cn.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/languages/zh_tw.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/table.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wautosave.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontfamily.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wupload.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/redactor.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor/redactor.min.js [deleted file]
wcfsetup/install/files/js/3rdParty/redactor2/README.md [new file with mode: 0644]
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js [new file with mode: 0644]
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabDropdown.js [new file with mode: 0644]
wcfsetup/install/files/js/3rdParty/redactor2/redactor.js [new file with mode: 0644]
wcfsetup/install/files/js/3rdParty/redactor2/redactor.min.js [new file with mode: 0644]
wcfsetup/install/files/style/ui/dropdown.scss
wcfsetup/install/files/style/ui/redactor.scss

index b051d40b4377c5bf43ed718e56cfdb570093f090..da1773e6f7cf4152fc4675b6e98a7548d461f599 100644 (file)
 <script data-relocate="true">
-var __REDACTOR_ICON_PATH = '{@$__wcf->getPath()}icon/';
-var __REDACTOR_BUTTONS = [ {implode from=$__wcf->getBBCodeHandler()->getButtonBBCodes() item=__bbcode}{ icon: '{$__bbcode->wysiwygIcon}', label: '{$__bbcode->buttonLabel|language}', name: '{$__bbcode->bbcodeTag}' }{/implode} ];
-var __REDACTOR_SMILIES = { {implode from=$__wcf->getSmileyCache()->getCategorySmilies() item=smiley}'{@$smiley->smileyCode|encodeJS}': '{@$smiley->getURL()|encodeJS}'{/implode} };
-var __REDACTOR_BBCODES = [ {implode from=$__wcf->getBBCodeHandler()->getBBCodes() item=__bbcode}'{@$__bbcode->bbcodeTag}'{/implode} ];
-var __REDACTOR_SOURCE_BBCODES = [ {implode from=$__wcf->getBBCodeHandler()->getSourceBBCodes() item=__bbcode}'{@$__bbcode->bbcodeTag}'{/implode} ];
-var __REDACTOR_CODE_HIGHLIGHTERS = { {implode from=$__wcf->getBBCodeHandler()->getHighlighters() item=__highlighter}'{@$__highlighter}': '{lang}wcf.bbcode.code.{@$__highlighter}.title{/lang}'{/implode} };
-var __REDACTOR_AMD_DEPENDENCIES = { };
-
-require(['Language', 'WoltLab/WCF/Bbcode/FromHtml', 'WoltLab/WCF/Bbcode/ToHtml'], function(Language, BbcodeFromHTML, BbcodeToHTML) {
-       __REDACTOR_AMD_DEPENDENCIES = {
-               BbcodeFromHTML: BbcodeFromHTML,
-               BbcodeToHTML: BbcodeToHTML
-       };
-       
-       Language.addObject({
-               'wcf.attachment.dragAndDrop.dropHere': '{lang}wcf.attachment.dragAndDrop.dropHere{/lang}',
-               'wcf.attachment.dragAndDrop.dropNow': '{lang}wcf.attachment.dragAndDrop.dropNow{/lang}',
-               'wcf.bbcode.button.fontColor': '{lang}wcf.bbcode.button.fontColor{/lang}',
-               'wcf.bbcode.button.fontFamily': '{lang}wcf.bbcode.button.fontFamily{/lang}',
-               'wcf.bbcode.button.fontSize': '{lang}wcf.bbcode.button.fontSize{/lang}',
-               'wcf.bbcode.button.image': '{lang}wcf.bbcode.button.image{/lang}',
-               'wcf.bbcode.button.redo': '{lang}wcf.bbcode.button.redo{/lang}',
-               'wcf.bbcode.button.subscript': '{lang}wcf.bbcode.button.subscript{/lang}',
-               'wcf.bbcode.button.superscript': '{lang}wcf.bbcode.button.superscript{/lang}',
-               'wcf.bbcode.button.toggleBBCode': '{lang}wcf.bbcode.button.toggleBBCode{/lang}',
-               'wcf.bbcode.button.toggleHTML': '{lang}wcf.bbcode.button.toggleHTML{/lang}',
-               'wcf.bbcode.button.undo': '{lang}wcf.bbcode.button.undo{/lang}',
-               'wcf.bbcode.code': '{lang}wcf.bbcode.code{/lang}',
-               'wcf.bbcode.code.edit': '{lang}wcf.bbcode.code.edit{/lang}',
-               'wcf.bbcode.code.filename': '{lang}wcf.bbcode.code.filename{/lang}',
-               'wcf.bbcode.code.filename.description': '{lang}wcf.bbcode.code.filename.description{/lang}',
-               'wcf.bbcode.code.highlighter': '{lang}wcf.bbcode.code.highlighter{/lang}',
-               'wcf.bbcode.code.highlighter.description': '{lang}wcf.bbcode.code.highlighter.description{/lang}',
-               'wcf.bbcode.code.highlighter.none': '{lang}wcf.bbcode.code.highlighter.none{/lang}',
-               'wcf.bbcode.code.insert': '{lang}wcf.bbcode.code.insert{/lang}',
-               'wcf.bbcode.code.lineNumber': '{lang}wcf.bbcode.code.lineNumber{/lang}',
-               'wcf.bbcode.code.lineNumber.description': '{lang}wcf.bbcode.code.lineNumber.description{/lang}',
-               'wcf.bbcode.code.settings': '{lang}wcf.bbcode.code.settings{/lang}',
-               'wcf.bbcode.image.source': '{lang}wcf.bbcode.image.source{/lang}',
-               'wcf.bbcode.quote.edit': '{lang}wcf.bbcode.quote.edit{/lang}',
-               'wcf.bbcode.quote.edit.author': '{lang}wcf.bbcode.quote.edit.author{/lang}',
-               'wcf.bbcode.quote.edit.link': '{lang}wcf.bbcode.quote.edit.link{/lang}',
-               'wcf.bbcode.quote.insert': '{lang}wcf.bbcode.quote.insert{/lang}',
-               'wcf.bbcode.quote.title.clickToSet': '{lang}wcf.bbcode.quote.title.clickToSet{/lang}',
-               'wcf.bbcode.quote.title.javascript': '{lang}wcf.bbcode.quote.title.javascript{/lang}',
-               'wcf.global.noSelection': '{lang}wcf.global.noSelection{/lang}',
-               'wcf.message.autosave.prompt': '{lang}wcf.message.autosave.prompt{/lang}',
-               'wcf.message.autosave.prompt.confirm': '{lang}wcf.message.autosave.prompt.confirm{/lang}',
-               'wcf.message.autosave.prompt.discard': '{lang}wcf.message.autosave.prompt.discard{/lang}',
-               'wcf.message.autosave.restored': '{lang}wcf.message.autosave.restored{/lang}',
-               'wcf.message.autosave.restored.confirm': '{lang}wcf.message.autosave.restored.confirm{/lang}',
-               'wcf.message.autosave.restored.revert': '{lang}wcf.message.autosave.restored.revert{/lang}',
-               'wcf.message.autosave.restored.revert.confirmMessage': '{lang}wcf.message.autosave.restored.revert.confirmMessage{/lang}',
-               'wcf.message.autosave.restored.version': '{lang __literal=true}wcf.message.autosave.restored.version{/lang}',
-               'wcf.message.autosave.saved': '{lang}wcf.message.autosave.saved{/lang}'
-       });
+(function() {
+       var buttons = ['format', 'wcfSeparator', 'bold', 'italic', 'underline', 'deleted', 'wcfSeparator', 'lists', 'image', 'link'];
        
-       var $editorName = '{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}';
-       var $callbackIdentifier = 'Redactor_' + $editorName;
+       var elementId = '{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}';
+       var callbackIdentifier = 'Redactor2_' + elementId;
        
-       WCF.System.Dependency.Manager.setup($callbackIdentifier, function() {
-               var $textarea = $('#' + $editorName);
-               var $buttons = [ ];
-               
-               {include file='wysiwygToolbar'}
+       WCF.System.Dependency.Manager.setup(callbackIdentifier, function() {
+               var element = elById(elementId);
+               var autosave = elData(element, 'autosave') || '';
+               if (autosave) {
+                       element.removeAttribute('data-autosave');
+               }
                
-               var $autosave = $textarea.data('autosave');
-               var $autosaveLastEditTime = ($autosave && $textarea.data('autosaveLastEditTime')) ? (parseInt($textarea.data('autosaveLastEditTime')) || 0) : 0;
-               var $autosavePrompt = ($autosave && $textarea.data('autosavePrompt')) ? true : false;
-               var $config = {
-                       autosave: false,
-                       buttons: $buttons,
-                       convertImageLinks: false,
-                       convertUrlLinks: false,
-                       convertVideoLinks: false,
-                       direction: '{lang}wcf.global.pageDirection{/lang}',
-                       lang: '{@$__wcf->getLanguage()->getFixedLanguageCode()}',
-                       linebreaks: true,
-                       maxHeight: 500,
-                       minHeight: 200,
-                       plugins: [ 'wutil', 'wautosave', 'wmonkeypatch', 'wbutton', 'wbbcode', 'wfontcolor', 'wfontfamily', 'wfontsize' ],
-                       removeEmpty: false,
-                       replaceDivs: false,
-                       source: true,
-                       tabifier: false,
-                       toolbarFixed: false,
+               var config = {
+                       buttons: buttons,
+                       plugins: ['WoltLabButton', 'WoltLabDropdown'],
                        woltlab: {
-                               autosave: {
-                                       active: ($autosave) ? true : false,
-                                       key: ($autosave) ? '{@$__wcf->getAutosavePrefix()}_' + $autosave : '',
-                                       lastEditTime: $autosaveLastEditTime,
-                                       prefix: '{@$__wcf->getAutosavePrefix()}',
-                                       prompt: $autosavePrompt,
-                                       saveOnInit: {if !$errorField|empty}true{else}false{/if}
-                               },
-                               originalValue: $textarea.val()
+                               autosave: autosave
                        }
                };
                
-               {if $__wcf->getBBCodeHandler()->isAvailableBBCode('table')}
-                       $config.plugins.splice(2, 0, 'table');
-               {/if}
-               
-               // TODO: is this still required?
-               if ($.browser.iOS) {
-                       // using a zero-width space breaks iOS' detection of the start of a sentence, causing the first word to be lowercased
-                       $config.emptyHtml = '<p><br></p>';
-               }
-               
-               {if MODULE_ATTACHMENT && !$attachmentHandler|empty && $attachmentHandler->canUpload()}
-                       $config.plugins.push('wupload');
-                       $config.woltlab.attachmentUrl = '{link controller='Attachment' id=987654321}{/link}';
-                       $config.woltlab.attachmentThumbnailUrl = '{link controller='Attachment' id=987654321}thumbnail=1{/link}';
-               {/if}
+               $(element).redactor(config);
+       });
                
-               {event name='javascriptInit'}
+       head.load([
+               '{@$__wcf->getPath()}js/3rdParty/redactor2/redactor.js?v={@LAST_UPDATE_TIME}',
                
-               // clear textarea before init
-               $textarea.val('');
+               {* WoltLab *}
+               '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabButton.js?v={@LAST_UPDATE_TIME}',
+               '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabDropdown.js?v={@LAST_UPDATE_TIME}'
                
-               $textarea.redactor($config);
-       });
+               ], function() {
+                       WCF.System.Dependency.Manager.invoke(callbackIdentifier);
+               }
+       );
+})();
+</script>
+
+{*
+<script data-relocate="true">
+var __REDACTOR_ICON_PATH = '{@$__wcf->getPath()}icon/';
+var __REDACTOR_BUTTONS = [ {implode from=$__wcf->getBBCodeHandler()->getButtonBBCodes() item=__bbcode}{ icon: '{$__bbcode->wysiwygIcon}', label: '{$__bbcode->buttonLabel|language}', name: '{$__bbcode->bbcodeTag}' }{/implode} ];
+var __REDACTOR_SMILIES = { {implode from=$__wcf->getSmileyCache()->getCategorySmilies() item=smiley}'{@$smiley->smileyCode|encodeJS}': '{@$smiley->getURL()|encodeJS}'{/implode} };
+var __REDACTOR_BBCODES = [ {implode from=$__wcf->getBBCodeHandler()->getBBCodes() item=__bbcode}'{@$__bbcode->bbcodeTag}'{/implode} ];
+var __REDACTOR_SOURCE_BBCODES = [ {implode from=$__wcf->getBBCodeHandler()->getSourceBBCodes() item=__bbcode}'{@$__bbcode->bbcodeTag}'{/implode} ];
+var __REDACTOR_CODE_HIGHLIGHTERS = { {implode from=$__wcf->getBBCodeHandler()->getHighlighters() item=__highlighter}'{@$__highlighter}': '{lang}wcf.bbcode.code.{@$__highlighter}.title{/lang}'{/implode} };
+var __REDACTOR_AMD_DEPENDENCIES = { };
+
+require(['Language', 'WoltLab/WCF/Bbcode/FromHtml', 'WoltLab/WCF/Bbcode/ToHtml'], function(Language, BbcodeFromHTML, BbcodeToHTML) {
+__REDACTOR_AMD_DEPENDENCIES = {
+BbcodeFromHTML: BbcodeFromHTML,
+BbcodeToHTML: BbcodeToHTML
+};
+
+Language.addObject({
+'wcf.attachment.dragAndDrop.dropHere': '{lang}wcf.attachment.dragAndDrop.dropHere{/lang}',
+'wcf.attachment.dragAndDrop.dropNow': '{lang}wcf.attachment.dragAndDrop.dropNow{/lang}',
+'wcf.bbcode.button.fontColor': '{lang}wcf.bbcode.button.fontColor{/lang}',
+'wcf.bbcode.button.fontFamily': '{lang}wcf.bbcode.button.fontFamily{/lang}',
+'wcf.bbcode.button.fontSize': '{lang}wcf.bbcode.button.fontSize{/lang}',
+'wcf.bbcode.button.image': '{lang}wcf.bbcode.button.image{/lang}',
+'wcf.bbcode.button.redo': '{lang}wcf.bbcode.button.redo{/lang}',
+'wcf.bbcode.button.subscript': '{lang}wcf.bbcode.button.subscript{/lang}',
+'wcf.bbcode.button.superscript': '{lang}wcf.bbcode.button.superscript{/lang}',
+'wcf.bbcode.button.toggleBBCode': '{lang}wcf.bbcode.button.toggleBBCode{/lang}',
+'wcf.bbcode.button.toggleHTML': '{lang}wcf.bbcode.button.toggleHTML{/lang}',
+'wcf.bbcode.button.undo': '{lang}wcf.bbcode.button.undo{/lang}',
+'wcf.bbcode.code': '{lang}wcf.bbcode.code{/lang}',
+'wcf.bbcode.code.edit': '{lang}wcf.bbcode.code.edit{/lang}',
+'wcf.bbcode.code.filename': '{lang}wcf.bbcode.code.filename{/lang}',
+'wcf.bbcode.code.filename.description': '{lang}wcf.bbcode.code.filename.description{/lang}',
+'wcf.bbcode.code.highlighter': '{lang}wcf.bbcode.code.highlighter{/lang}',
+'wcf.bbcode.code.highlighter.description': '{lang}wcf.bbcode.code.highlighter.description{/lang}',
+'wcf.bbcode.code.highlighter.none': '{lang}wcf.bbcode.code.highlighter.none{/lang}',
+'wcf.bbcode.code.insert': '{lang}wcf.bbcode.code.insert{/lang}',
+'wcf.bbcode.code.lineNumber': '{lang}wcf.bbcode.code.lineNumber{/lang}',
+'wcf.bbcode.code.lineNumber.description': '{lang}wcf.bbcode.code.lineNumber.description{/lang}',
+'wcf.bbcode.code.settings': '{lang}wcf.bbcode.code.settings{/lang}',
+'wcf.bbcode.image.source': '{lang}wcf.bbcode.image.source{/lang}',
+'wcf.bbcode.quote.edit': '{lang}wcf.bbcode.quote.edit{/lang}',
+'wcf.bbcode.quote.edit.author': '{lang}wcf.bbcode.quote.edit.author{/lang}',
+'wcf.bbcode.quote.edit.link': '{lang}wcf.bbcode.quote.edit.link{/lang}',
+'wcf.bbcode.quote.insert': '{lang}wcf.bbcode.quote.insert{/lang}',
+'wcf.bbcode.quote.title.clickToSet': '{lang}wcf.bbcode.quote.title.clickToSet{/lang}',
+'wcf.bbcode.quote.title.javascript': '{lang}wcf.bbcode.quote.title.javascript{/lang}',
+'wcf.global.noSelection': '{lang}wcf.global.noSelection{/lang}',
+'wcf.message.autosave.prompt': '{lang}wcf.message.autosave.prompt{/lang}',
+'wcf.message.autosave.prompt.confirm': '{lang}wcf.message.autosave.prompt.confirm{/lang}',
+'wcf.message.autosave.prompt.discard': '{lang}wcf.message.autosave.prompt.discard{/lang}',
+'wcf.message.autosave.restored': '{lang}wcf.message.autosave.restored{/lang}',
+'wcf.message.autosave.restored.confirm': '{lang}wcf.message.autosave.restored.confirm{/lang}',
+'wcf.message.autosave.restored.revert': '{lang}wcf.message.autosave.restored.revert{/lang}',
+'wcf.message.autosave.restored.revert.confirmMessage': '{lang}wcf.message.autosave.restored.revert.confirmMessage{/lang}',
+'wcf.message.autosave.restored.version': '{lang __literal=true}wcf.message.autosave.restored.version{/lang}',
+'wcf.message.autosave.saved': '{lang}wcf.message.autosave.saved{/lang}'
+});
+
+var $editorName = '{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}';
+var $callbackIdentifier = 'Redactor_' + $editorName;
+
+WCF.System.Dependency.Manager.setup($callbackIdentifier, function() {
+var $textarea = $('#' + $editorName);
+var $buttons = [ ];
+
+{include file='wysiwygToolbar'}
+
+var $autosave = $textarea.data('autosave');
+var $autosaveLastEditTime = ($autosave && $textarea.data('autosaveLastEditTime')) ? (parseInt($textarea.data('autosaveLastEditTime')) || 0) : 0;
+var $autosavePrompt = ($autosave && $textarea.data('autosavePrompt')) ? true : false;
+var $config = {
+       autosave: false,
+       buttons: $buttons,
+       convertImageLinks: false,
+       convertUrlLinks: false,
+       convertVideoLinks: false,
+       direction: '{lang}wcf.global.pageDirection{/lang}',
+       lang: '{@$__wcf->getLanguage()->getFixedLanguageCode()}',
+       linebreaks: true,
+       maxHeight: 500,
+       minHeight: 200,
+       plugins: [ 'wutil', 'wautosave', 'wmonkeypatch', 'wbutton', 'wbbcode', 'wfontcolor', 'wfontfamily', 'wfontsize' ],
+       removeEmpty: false,
+       replaceDivs: false,
+       source: true,
+       tabifier: false,
+       toolbarFixed: false,
+       woltlab: {
+               autosave: {
+                       active: ($autosave) ? true : false,
+                       key: ($autosave) ? '{@$__wcf->getAutosavePrefix()}_' + $autosave : '',
+                       lastEditTime: $autosaveLastEditTime,
+                       prefix: '{@$__wcf->getAutosavePrefix()}',
+                       prompt: $autosavePrompt,
+                       saveOnInit: {if !$errorField|empty}true{else}false{/if}
+               },
+               originalValue: $textarea.val()
+       }
+};
+
+{if $__wcf->getBBCodeHandler()->isAvailableBBCode('table')}
+       $config.plugins.splice(2, 0, 'table');
+{/if}
+
+// TODO: is this still required?
+if ($.browser.iOS) {
+       // using a zero-width space breaks iOS' detection of the start of a sentence, causing the first word to be lowercased
+       $config.emptyHtml = '<p><br></p>';
+}
+
+{if MODULE_ATTACHMENT && !$attachmentHandler|empty && $attachmentHandler->canUpload()}
+       $config.plugins.push('wupload');
+       $config.woltlab.attachmentUrl = '{link controller='Attachment' id=987654321}{/link}';
+       $config.woltlab.attachmentThumbnailUrl = '{link controller='Attachment' id=987654321}thumbnail=1{/link}';
+{/if}
+
+{event name='javascriptInit'}
+
+// clear textarea before init
+$textarea.val('');
+
+$textarea.redactor($config);
+});
+
+head.load([
+'{@$__wcf->getPath()}js/3rdParty/redactor/redactor{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@LAST_UPDATE_TIME}',
+{if $__wcf->getLanguage()->getFixedLanguageCode() != 'en'}'{@$__wcf->getPath()}js/3rdParty/redactor/languages/{@$__wcf->getLanguage()->getFixedLanguageCode()}.js?v={@LAST_UPDATE_TIME}',{/if}
+{if !ENABLE_DEBUG_MODE}
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wcombined.min.js?v={@LAST_UPDATE_TIME}'
+{else}
+       {* official *}{*
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/table.js?v={@LAST_UPDATE_TIME}',
        
-       head.load([
-               '{@$__wcf->getPath()}js/3rdParty/redactor/redactor{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@LAST_UPDATE_TIME}',
-               {if $__wcf->getLanguage()->getFixedLanguageCode() != 'en'}'{@$__wcf->getPath()}js/3rdParty/redactor/languages/{@$__wcf->getLanguage()->getFixedLanguageCode()}.js?v={@LAST_UPDATE_TIME}',{/if}
-               {if !ENABLE_DEBUG_MODE}
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wcombined.min.js?v={@LAST_UPDATE_TIME}'
-               {else}
-                       {* official *}
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/table.js?v={@LAST_UPDATE_TIME}',
-                       
-                       {* WoltLab *}
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wautosave.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wbbcode.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wbutton.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wfontcolor.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wfontfamily.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wfontsize.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wmonkeypatch.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wutil.js?v={@LAST_UPDATE_TIME}',
-                       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wupload.js?v={@LAST_UPDATE_TIME}'
-               {/if}
-               {event name='javascriptFiles'}
-       ], function() {
-               WCF.System.Dependency.Manager.invoke($callbackIdentifier);
-       });
+       {* WoltLab *}{*
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wautosave.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wbbcode.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wbutton.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wfontcolor.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wfontfamily.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wfontsize.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wmonkeypatch.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wutil.js?v={@LAST_UPDATE_TIME}',
+       '{@$__wcf->getPath()}js/3rdParty/redactor/plugins/wupload.js?v={@LAST_UPDATE_TIME}'
+{/if}
+{event name='javascriptFiles'}
+], function() {
+WCF.System.Dependency.Manager.invoke($callbackIdentifier);
+});
 });
 </script>
+*}
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/README.md b/wcfsetup/install/files/js/3rdParty/redactor/README.md
deleted file mode 100644 (file)
index 564ad44..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-About Redactor
---------------
-
-Redactor is a WYSIWYG-editor created by Imperavi LLC., Copyright (c) 2009-2014. You can make use of Redactor in any plugin or application for WCF 2.1 free of charge. You are not allowed to extract or re-use the editor (in entirety or in potions) for any other use unless you own a license for Redactor.
-
-Please see http://imperavi.com/redactor/license/ for more information.
-
-Redactor is **NOT** free software!
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ar.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ar.js
deleted file mode 100644 (file)
index 7e56fa0..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ar'] = {
-       html: 'كود HTML',
-       video: 'إدراج فيديو...',
-       image: 'إدراج صورة...',
-       table: 'جدول',
-       link: 'رابط',
-       link_insert: 'إدراج رابط...',
-       link_edit: 'تحرير الرابط',
-       unlink: 'إزالة الرابط',
-       formatting: 'التنسيق',
-       paragraph: 'نص عادي',
-       quote: 'اقتباس',
-       code: 'كود',
-       header1: 'العنوان 1',
-       header2: 'العنوان 2',
-       header3: 'العنوان 3',
-       header4: 'العنوان 4',
-       header5: '5 العنوان',
-       bold:  'متين',
-       italic: 'مائل',
-       fontcolor: 'لون الخط',
-       backcolor: 'لون الخلفية',
-       unorderedlist: 'قائمة منقطة',
-       orderedlist: 'قائمة رقمية',
-       outdent: 'أزل المسافة البادئة',
-       indent: 'أضف المسافة البادئة',
-       cancel: 'إلغاء',
-       insert: 'إدراج',
-       save: 'حفظ',
-       _delete: 'حذف',
-       insert_table: 'إدراج جدول...',
-       insert_row_above: 'إضافة صف للأعلى',
-       insert_row_below: 'إضافة صف للأسفل',
-       insert_column_left: 'إضافة عمود لليسار',
-       insert_column_right: 'إضافة عمود لليمين',
-       delete_column: 'حذف العمود',
-       delete_row: 'حذف الصف',
-       delete_table: 'حذف الجدول',
-       rows: 'الصفوف',
-       columns: 'الأعمدة',
-       add_head: 'إضافة رأس',
-       delete_head: 'حذف رأس',
-       title: 'العنوان',
-       image_position: 'الموضع',
-       none: 'بدون',
-       left: 'يسار',
-       right: 'يمين',
-       image_web_link: 'رابط الصورة',
-       text: 'نص',
-       mailto: 'بريد الكتروني',
-       web: 'رابط',
-       video_html_code: 'كود الفيديو',
-       file: 'إدراج ملف...',
-       upload: 'تحميل',
-       download: 'تنزيل',
-       choose: 'اختيار',
-       or_choose: 'أو اختيار',
-       drop_file_here: 'اسحب الملف هنا',
-       align_left:     'محاذاة النص الى اليسار',
-       align_center: 'محاذاة النص الى الوسط',
-       align_right: 'محاذاة النص الى اليمين',
-       align_justify: 'ضبط النص',
-       horizontalrule: 'إدراج خط فاصل',
-       fullscreen: 'ملء الشاشة',
-       deleted: 'محذوف',
-       anchor: 'مرساة',
-       link_new_tab: 'فتح الرابط في تبويب جديد',
-       underline: 'مسطر',
-       alignment: 'محاذاة',
-       filename: 'الاسم (اختياري)',
-       edit: 'تحرير',
-       center: 'توسيط'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/az.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/az.js
deleted file mode 100644 (file)
index bf89261..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['az'] = {
-       html: 'HTML',
-       video: 'Video əlavə...',
-       image: 'Şəkil əlavə...',
-       table: 'Cədvəl',
-       link: 'Link',
-       link_insert: 'Link əlavə...',
-       link_edit: 'Edit link',
-       unlink: 'Linki sil',
-       formatting: 'Format',
-       paragraph: 'Paraqraf',
-       quote: 'Sitat',
-       code: 'Kod',
-       header1: 'Başlıq 1',
-       header2: 'Başlıq 2',
-       header3: 'Başlıq 3',
-       header4: 'Başlıq 4',
-       header5: 'Başlıq 5',
-       bold:  'Qalın',
-       italic: 'Kursiv',
-       fontcolor: 'Yazı Rəngi',
-       backcolor: 'Fon rəngi',
-       unorderedlist: 'Sırasız List',
-       orderedlist: 'Sıralı List',
-       outdent: 'Abzası geri al',
-       indent: 'Abzas',
-       cancel: 'Ləğv et',
-       insert: 'Əlavə et',
-       save: 'Yadda saxla',
-       _delete: 'Sil',
-       insert_table: 'Cədvəl əlavə et...',
-       insert_row_above: 'Yuxarıya sətir əlavə et',
-       insert_row_below: 'Aşağıya sətir əlavə et',
-       insert_column_left: 'Sola sütun əlavə et',
-       insert_column_right: 'Sağa sütun əlavə et',
-       delete_column: 'Sütunu sil',
-       delete_row: 'Sətiri sil',
-       delete_table: 'Cədvəli sil',
-       rows: 'Sətirlər',
-       columns: 'Sütunlar',
-       add_head: 'Başlıq əlavə et',
-       delete_head: 'Başlığı sil',
-       title: 'Başlıq',
-       image_position: 'Mövqe',
-       none: 'Heç biri',
-       left: 'Sol',
-       right: 'Sağ',
-       image_web_link: 'Şəklin Veb Link',
-       text: 'Yazı',
-       mailto: 'E-poçt',
-       web: 'URL',
-       video_html_code: 'Video Embed Kodu',
-       file: 'Fayl əlavə et...',
-       upload: 'Yüklə',
-       download: 'Endir',
-       choose: 'Seç',
-       or_choose: 'Vəya seç',
-       drop_file_here: 'Faylı buraya at',
-       align_left:     'Yazıyı sola yanaşdır',
-       align_center: 'Yazıyı ortala',
-       align_right: 'Yazıyı sağa yanaşdır',
-       align_justify: 'Yazının kənarlarını düzləşdir',
-       horizontalrule: 'Üfuqi xətt əlavə et',
-       deleted: 'Silindi',
-       anchor: 'Anchor',
-       link_new_tab: 'Linki yeni tabda aç',
-       underline: 'Altıxətli',
-       alignment: 'Düzləndirmə',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ba.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ba.js
deleted file mode 100644 (file)
index 977a393..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ba'] = {
-       html: 'HTML',
-       video: 'Ubaci video',
-       image: 'Ubaci fotografiju',
-       table: 'Tabela',
-       link: 'Veza',
-       link_insert: 'Ubaci vezu ...',
-       link_edit: 'Edit link',
-       unlink: 'Ukloni vezu',
-       formatting: 'Stilovi',
-       paragraph: 'Paragraf',
-       quote: 'Citat',
-       code: 'Izvorni kod',
-       header1: 'Zaglavlje 1',
-       header2: 'Zaglavlje 2',
-       header3: 'Zaglavlje 3',
-       header4: 'Zaglavlje 4',
-       header5: 'Zaglavlje 5',
-       bold: 'Podebljaj',
-       italic: 'Nakosi',
-       fontcolor: 'Boja slova',
-       backcolor: 'Boja pozadine',
-       unorderedlist: 'Nesortirana lista',
-       orderedlist: 'Sortirana lista',
-       outdent: 'Izvuci',
-       indent: 'Uvuci',
-       redo: 'Korak naprijed',
-       undo: 'Korak nazad',
-       cut: 'Izreži',
-       cancel: 'Odustani',
-       insert: 'Ubaci',
-       save: 'Sačuvaj',
-       _delete: 'Izbriši',
-       insert_table: 'Ubaci tabelu',
-       insert_row_above: 'Dodaj red iznad',
-       insert_row_below: 'Dodaj red ispod',
-       insert_column_left: 'Dodaj kolonu lijevo',
-       insert_column_right: 'Dodaj kolonu desno',
-       delete_column: 'Izbriši kolonu',
-       delete_row: 'Izbriši red',
-       delete_table: 'Izbriši tabelu',
-       rows: 'Red',
-       columns: 'Kolona',
-       add_head: 'Dodaj zaglavlje',
-       delete_head: 'Ukloni zaglavlje',
-       title: 'Naslov',
-       image_position: 'Pozicija',
-       none: 'Bez',
-       left: 'Lijevo',
-       right: 'Desno',
-       image_web_link: 'Web adresa fotografije',
-       text: 'Tekst',
-       mailto: 'Email',
-       web: 'Web adresa',
-       video_html_code: 'Video kod',
-       file: 'Datoteka',
-       upload: 'Pošalji',
-       download: 'Preuzmi',
-       choose: 'Odaberi',
-       or_choose: 'Ili odaberi',
-       drop_file_here: 'Prevuci datoteku ovdje',
-       align_left:     'Poravnaj lijevo',
-       align_center: 'Centriraj',
-       align_right: 'Poravnaj desno',
-       align_justify: 'Od ruba do ruba',
-       horizontalrule: 'Ubaci horizontalnu liniju',
-       fullscreen: 'Prikaz preko čitavog ekrana',
-       deleted: 'Izbrisano',
-       anchor: 'Sidro',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/bg.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/bg.js
deleted file mode 100644 (file)
index 8c7695b..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['bg'] = {
-       html: 'HTML',
-       video: 'Видео',
-       image: 'Изображение',
-       table: 'Таблица',
-       link: 'Връзка',
-       link_insert: 'Вкарай връзка ...',
-       link_edit: 'Edit link',
-       unlink: 'Премахни връзка',
-       formatting: 'Стилове',
-       paragraph: 'Параграф',
-       quote: 'Цитат',
-       code: 'Код',
-       header1: 'Заглавие 1',
-       header2: 'Заглавие 2',
-       header3: 'Заглавие 3',
-       header4: 'Заглавие 4',
-       header5: 'Заглавие 5',
-       bold:  'Удебели',
-       italic: 'Наклони',
-       fontcolor: 'Цвят на текста',
-       backcolor: 'Цвят на фона',
-       unorderedlist: 'Неподреден списък',
-       orderedlist: 'Подреден списък',
-       outdent: 'Вкарай навътре',
-       indent: 'Изкарай навън',
-       cancel: 'Отказ',
-       insert: 'Вкарай',
-       save: 'Запази',
-       _delete: 'Премахни',
-       insert_table: 'Вкарай таблица',
-       insert_row_above: 'Добави ред отгоре',
-       insert_row_below: 'Добави ред отдолу',
-       insert_column_left: 'Добави колона отляво',
-       insert_column_right: 'Добави колона отдясно',
-       delete_column: 'Премахни колоната',
-       delete_row: 'Премахни реда',
-       delete_table: 'Премахни таблицата',
-       rows: 'Редове',
-       columns: 'Колони',
-       add_head: 'Добави заглавен ред',
-       delete_head: 'Премахни заглавен ред',
-       title: 'Заглавие',
-       image_view: 'Виж изображението',
-       image_position: 'Позиция',
-       left: 'Ляво',
-       right: 'Дясно',
-       image_web_link: 'Уеб връзка',
-       text: 'Текст',
-       mailto: 'Имейл',
-       web: 'Адрес',
-       video_html_code: 'Код за вграждане на видео',
-       file: 'Файл',
-       upload: 'Качи',
-       download: 'Свали',
-       choose: 'Избор',
-       or_choose: 'Или избери',
-       drop_file_here: 'Провлачете файлове тук',
-       align_left:     'Подравни в ляво',
-       align_center: 'Центрирай',
-       align_right: 'Подравни в дясно',
-       align_justify: 'Подравни двустранно',
-       horizontalrule: 'Хоризонтална линия',
-       fullscreen: 'Цял екран',
-       deleted: 'Зачеркни',
-       none: 'Няма',
-       anchor: 'Котва',
-       link_new_tab: 'Отваряне в нов таб',
-       underline: 'Подчертай',
-       alignment: 'Подравняване',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/by.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/by.js
deleted file mode 100644 (file)
index 8f88e19..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['by'] = {
-    html: 'Код',
-    video: 'Відэа',
-    image: 'Малюнак',
-    table: 'Табліца',
-    link: 'Спасылка',
-    link_insert: 'Уставіць спасылку ...',
-    link_edit: 'Edit link',
-    unlink: 'Выдаліць спасылку',
-    formatting: 'Стылі',
-    paragraph: 'Звычайны тэкст',
-    quote: 'Цытата',
-    code: 'Код',
-    header1: 'Загаловак 1',
-    header2: 'Загаловак 2',
-    header3: 'Загаловак 3',
-    header4: 'Загаловак 4',
-    header5: 'Загаловак 5',
-    bold: 'Паўтлусты',
-    italic: 'Нахільны',
-    fontcolor: 'Колер тэксту',
-    backcolor: 'Заліванне тэксту',
-    unorderedlist: 'Звычайны спіс',
-    orderedlist: 'Нумараваны спіс',
-    outdent: 'Паменьшыць водступ',
-    indent: 'Павялічыць водступ',
-    cancel: 'Адмяніць',
-    insert: 'Уставіць',
-    save: 'Захаваць',
-    _delete: 'Выдаліць',
-    insert_table: 'Уставіць табліцу',
-    insert_row_above: 'Дадаць радок зверху',
-    insert_row_below: 'Дадаць радок знізу',
-    insert_column_left: 'Дадаць слупок злева',
-    insert_column_right: 'Дадаць слупок справа',
-    delete_column: 'Выдаліць слупок',
-    delete_row: 'Выдаліць радок',
-    delete_table: 'Выдаліць табліцу',
-    rows: 'Радкі',
-    columns: 'Стаўбцы',
-    add_head: 'Дадаць загаловак',
-    delete_head: 'Выдаліць загаловак',
-    title: 'Падказка',
-    image_view: 'Запампаваць малюнак',
-    image_position: 'Абцяканне тэкстам',
-    none: 'Няма',
-    left: 'Злева',
-    right: 'Справа',
-    image_web_link: 'Спасылка на малюнак',
-    text: 'Тэкст',
-    mailto: 'Эл. пошта ',
-    web: 'URL',
-    video_html_code: 'Код відэа роліка',
-    file: 'Файл',
-    upload: 'Загрузіць',
-    download: 'Запампаваць',
-    choose: 'Выбраць',
-    or_choose: 'Ці іншае',
-    drop_file_here: 'Перацягніце файл сюды',
-    align_left: 'Па левым краі',
-    align_center: 'Па цэнтры',
-    align_right: 'Па правым краі',
-    align_justify: 'Выраўнаваць тэкст па шырыні',
-    horizontalrule: 'Гарызантальная лінейка',
-    fullscreen: 'Ва ўвесь экран',
-    deleted: 'Закрэслены',
-    anchor: 'Anchor',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ca.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ca.js
deleted file mode 100644 (file)
index 4ca4631..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ca'] = {
-       html: 'HTML',
-       video: 'Inserta Vídeo...',
-       image: 'Inserta Imatge...',
-       table: 'Taula',
-       link: 'Enllaç',
-       link_insert: 'Inserta Enllaç ...',
-       link_edit: 'Edit link',
-       unlink: 'Elimina enllaç',
-       formatting: 'Formateja',
-       paragraph: 'Paràgraf',
-       quote: 'Cita',
-       code: 'Codi',
-       header1: 'Capçalera 1',
-       header2: 'Capçalera 2',
-       header3: 'Capçalera 3',
-       header4: 'Capçalera 4',
-       header5: 'Capçalera 5',
-       bold:  'Negreta',
-       italic: 'Cursiva',
-       fontcolor: 'Color de la lletra',
-       backcolor: 'Color del fons',
-       unorderedlist: 'Llista sense ordenar',
-       orderedlist: 'Llista ordenada',
-       outdent: 'Treure indentació',
-       indent: 'Indentar',
-       cancel: 'Cancel·lar',
-       insert: 'Insertar',
-       save: 'Desar',
-       _delete: 'Eliminar',
-       insert_table: 'Insertar Taula...',
-       insert_row_above: 'Insertar fila superior',
-       insert_row_below: 'Insertar fila inferior',
-       insert_column_left: 'Insertar columna a l\'esquerra',
-       insert_column_right: 'Insertar columna a la dreta',
-       delete_column: 'Eliminar Columna',
-       delete_row: 'Eliminar Fila',
-       delete_table: 'Eliminar Taula',
-       rows: 'Files',
-       columns: 'Columnes',
-       add_head: 'Incloure capçalera',
-       delete_head: 'Eliminar capçalera',
-       title: 'Títol',
-       image_position: 'Posició',
-       none: 'Cap',
-       left: 'Esquerra',
-       right: 'Dreta',
-       image_web_link: 'Enllaç web a imatge',
-       text: 'Text',
-       mailto: 'Direcció de correu',
-       web: 'URL',
-       video_html_code: 'Codi de vídeo inserit',
-       file: 'Insertar Fitxer...',
-       upload: 'Pujar',
-       download: 'Descarregar',
-       choose: 'Escull',
-       or_choose: 'O escull',
-       drop_file_here: 'Arrosega el fitxer fins aquí',
-       align_left:     'Alinear a l\'esquerra',
-       align_center: 'Alinear al centre',
-       align_right: 'Alinear a la dreta',
-       align_justify: 'Justificar',
-       horizontalrule: 'Insertar línia horitzontal',
-       deleted: 'Eliminar',
-       anchor: 'Àncora',
-       link_new_tab: 'Obrir enllaç en una nova pestanya',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/cs.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/cs.js
deleted file mode 100644 (file)
index c45d599..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['cs'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Obrázek',
-       table: 'Tabulka',
-       link: 'Odkaz',
-       link_insert: 'Vložit odkaz ...',
-       link_edit: 'Upravit odkaz',
-       unlink: 'Odstranit odkaz',
-       formatting: 'Styly',
-       paragraph: 'Odstavec',
-       quote: 'Citace',
-       code: 'Kód',
-       header1: 'Nadpis 1',
-       header2: 'Nadpis 2',
-       header3: 'Nadpis 3',
-       header4: 'Nadpis 4',
-       header5: 'Nadpis 5',
-       format: 'Formát',
-       bold:  'Tučné',
-       italic: 'Kurzíva',
-       superscript: 'Horní index',
-       strikethrough: 'Přeškrtnuté',
-       fontcolor: 'Barva písma',
-       backcolor: 'Barva pozadí',
-       removeformat: 'Odstranit formátování',
-       cleanformatting: 'Odstranit styly',
-       lists: 'Seznamy',
-       unorderedlist: 'Seznam s odrážkami',
-       orderedlist: 'Číslovaný seznam',
-       outdent: 'Zmenšit odsazení',
-       indent: 'Zvětšit odsazení',
-       redo: 'Vpřed',
-       undo: 'Zpět',
-       cut: 'Vyjmout',
-       cancel: 'Zrušit',
-       insert: 'Vložit',
-       save: 'Uložit',
-       _delete: 'Smazat',
-       insert_table: 'Vložit tabulku',
-       insert_row_above: 'Přidat řádek nahoru',
-       insert_row_below: 'Přidat řádek dolu',
-       insert_column_left: 'Přidat sloupec vlevo',
-       insert_column_right: 'Přidat sloupec vpravo',
-       delete_column: 'Smazat sloupec',
-       delete_row: 'Smazat řádek',
-       delete_table: 'Smazat tabulku',
-       rows: 'Řádky',
-       columns: 'Sloupce',
-       add_head: 'Přidat záhlaví',
-       delete_head: 'Smazat záhlaví',
-       title: 'Titulek',
-       image_view: 'Zobrazit obrázek',
-       image_position: 'Zarovnání',
-       none: 'Žádné',
-       left: 'Vlevo',
-       right: 'Vpravo',
-       image_web_link: 'Odkaz na obrázek',
-       text: 'Text',
-       mailto: 'Email',
-       web: 'URL adresa',
-       video_html_code: 'Zkopírujte kód pro vložení videa do stránky',
-       file: 'Soubor',
-       upload: 'Nahrát',
-       download: 'Stáhnout',
-       choose: 'Vybrat',
-       or_choose: 'nebo',
-       drop_file_here: 'Přetáhněte soubor do tohoto okna',
-       align_left:     'Zarovnat vlevo',
-       align_center: 'Zarovnat na střed',
-       align_right: 'Zarovnat vpravo',
-       align_justify: 'Zarovnat do bloku',
-       horizontalrule: 'Vodorovná čára',
-       fullscreen: 'Celá obrazovka',
-       deleted: 'Přeškrtnuté',
-       none: 'Žádná',
-       anchor: 'Záložka',
-       link_new_tab: 'Otevírat odkaz v novém okně',
-       underline: 'Podtržené',
-       alignment: 'Zarovnání',
-       filename: 'Název (volitelné)',
-       edit: 'Upravit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/da.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/da.js
deleted file mode 100644 (file)
index 7b5451c..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['da'] = {
-    html: 'HTML',
-    video: 'Indsæt Video...',
-    image: 'Indsæt Billede...',
-    table: 'Tabel',
-    link: 'Hyperlink',
-    link_insert: 'Indsæt Hyperlink ...',
-    link_edit: 'Edit link',
-    unlink: 'Fjern Hyperlink',
-    formatting: 'Formatering',
-    paragraph: 'Paragraf',
-    quote: 'Citat',
-    code: 'Kode',
-    header1: 'Overskrift 1',
-    header2: 'Overskrift 2',
-    header3: 'Overskrift 3',
-    header4: 'Overskrift 4',
-    header5: 'Overskrift 5',
-    bold:  'Fed',
-    italic: 'Kursiv',
-    fontcolor: 'Skriftfarve',
-    backcolor: 'Baggrundsfarve',
-    unorderedlist: 'Opstilling Med Punkttegn',
-    orderedlist: 'Opstilling Med Tal',
-    outdent: 'Formindsk Indrykning',
-    indent: 'Forøg Indrykning',
-    cancel: 'Fortryd',
-    insert: 'Indsæt',
-    save: 'Gem',
-    _delete: 'Slet',
-    insert_table: 'Indsæt Tabel...',
-    insert_row_above: 'Indsæt Række Over',
-    insert_row_below: 'Indsæt Række Under',
-    insert_column_left: 'Indsæt Kolonne Venstre',
-    insert_column_right: 'Indsæt Kolonne Højre',
-    delete_column: 'Slet Kolonne',
-    delete_row: 'Slet Række',
-    delete_table: 'Slet Tabel',
-    rows: 'Rækker',
-    columns: 'Kolonner',
-    add_head: 'Indsæt Hoved',
-    delete_head: 'Slet Hoved',
-    title: 'Titel',
-    image_position: 'Placering',
-    none: 'Ingen',
-    left: 'Venstre',
-    right: 'Højre',
-    image_web_link: 'Billede Web Hyperlink',
-    text: 'Tekst',
-    mailto: 'Email',
-    web: 'URL',
-    video_html_code: 'Video Indlejringskode',
-    file: 'Indsæt Fil...',
-    upload: 'Upload',
-    download: 'Download',
-    choose: 'Vælg',
-    or_choose: 'Eller vælg',
-    drop_file_here: 'Træk fil her',
-    align_left: 'Venstrejuster',
-    align_center: 'Centrer',
-    align_right: 'Højrejuster',
-    align_justify: 'Juster',
-    horizontalrule: 'Indsæt Vandret Linje',
-    fullscreen: 'Fuldskærm',
-    deleted: 'Slettet',
-    anchor: 'Anchor',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/de.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/de.js
deleted file mode 100644 (file)
index dbdc1b2..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['de'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Bild einfügen',
-       table: 'Tabelle',
-       link: 'Link',
-       link_insert: 'Link einfügen ...',
-       link_edit: 'Link bearbeiten',
-       unlink: 'Link entfernen',
-       formatting: 'Formatvorlagen',
-       paragraph: 'Absatz',
-       quote: 'Zitat',
-       code: 'Code',
-       header1: 'Überschrift 1',
-       header2: 'Überschrift 2',
-       header3: 'Überschrift 3',
-    header4: 'Überschrift 4',
-    header5: 'Überschrift 5',
-       bold:  'Fett',
-       italic: 'Kursiv',
-       fontcolor: 'Schriftfarbe',
-       backcolor: 'Texthervorhebungsfarbe',
-       unorderedlist: 'Aufzählungszeichen',
-       orderedlist: 'Nummerierung',
-       outdent: 'Einzug verkleinern',
-       indent: 'Einzug vergrößern',
-       redo: 'Wiederholen',
-       undo: 'Rückgängig',
-       cut: 'Ausschneiden',
-       cancel: 'Abbrechen',
-       insert: 'Einfügen',
-       save: 'Speichern',
-       _delete: 'Löschen',
-       insert_table: 'Tabelle einfügen',
-       insert_row_above: 'Zeile oberhalb einfügen',
-       insert_row_below: 'Zeile unterhalb einfügen',
-       insert_column_left: 'Spalte links einfügen',
-       insert_column_right: 'Spalte rechts einfügen',
-       delete_column: 'Spalte löschen',
-       delete_row: 'Zeile löschen',
-       delete_table: 'Tabelle löschen',
-       rows: 'Zeilen',
-       columns: 'Spalten',
-       add_head: 'Titel einfügen',
-       delete_head: 'Titel entfernen',
-       title: 'Title',
-       image_view: 'Bilder',
-       image_position: 'Textumbruch',
-       none: 'Keine',
-       left: 'Links',
-       right: 'Rechts',
-       image_web_link: 'Bilder-Link',
-       text: 'Text',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Video-Einbettungscode',
-       file: 'Datei',
-       upload: 'Hochladen',
-       download: 'Download',
-       choose: 'Auswählen',
-       or_choose: 'Oder, wählen Sie eine Datei aus',
-       drop_file_here: 'Ziehen Sie eine Datei hier hin',
-       align_left:     'Linksbündig',
-       align_center: 'Mitte',
-       align_right: 'Rechtsbündig',
-       align_justify: 'Blocksatz',
-       horizontalrule: 'Horizontale Linie',
-       fullscreen: 'Vollbild',
-       deleted: 'Durchgestrichen',
-       anchor: 'Anker',
-       link_new_tab: 'Link in neuem Tab öffnen',
-       underline: 'Unterstrichen',
-       alignment: 'Ausrichtung',
-       filename: 'Name (optional)',
-       edit: 'Bearbeiten',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/el.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/el.js
deleted file mode 100644 (file)
index 509460f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['el'] = {
-       html: 'HTML',
-       video: 'Εισαγωγή βίντεο...',
-       image: 'Εισαγωγή εικόνας...',
-       table: 'Πίνακας',
-       link: 'Σύνδεσμος',
-       link_insert: 'Εισαγωγή συνδέσμου...',
-       link_edit: 'Τροποποίηση συνδέσμου',
-       unlink: 'Ακύρωση συνδέσμου',
-       formatting: 'Μορφοποίηση',
-       paragraph: 'Παράγραφος',
-       quote: 'Παράθεση',
-       code: 'Κώδικας',
-       header1: 'Κεφαλίδα 1',
-       header2: 'Κεφαλίδα 2',
-       header3: 'Κεφαλίδα 3',
-       header4: 'Κεφαλίδα 4',
-       header5: 'Κεφαλίδα 5',
-       bold:  'Έντονα',
-       italic: 'Πλάγια',
-       fontcolor: 'Χρώμα γραμματοσειράς',
-       backcolor: 'Χρώμα επισήμανσης κειμένου',
-       unorderedlist: 'Κουκκίδες',
-       orderedlist: 'Αρίθμηση',
-       outdent: 'Μείωση εσοχής',
-       indent: 'Αύξηση εσοχής',
-       cancel: 'Ακύρωση',
-       insert: 'Εισαγωγή',
-       save: 'Αποθήκευση',
-       _delete: 'Διαγραφή',
-       insert_table: 'Εισαγωγή πίνακα...',
-       insert_row_above: 'Προσθήκη γραμμής επάνω',
-       insert_row_below: 'Προσθήκη γραμμής κάτω',
-       insert_column_left: 'Προσθήκη στήλης αριστερά',
-       insert_column_right: 'Προσθήκη στήλης δεξιά',
-       delete_column: 'Διαγραφή στήλης',
-       delete_row: 'Διαγραφή σειράς',
-       delete_table: 'Διαγραφή πίνακα',
-       rows: 'Γραμμές',
-       columns: 'Στήλες',
-       add_head: 'Προσθήκη κεφαλίδας',
-       delete_head: 'Διαγραφή κεφαλίδας',
-       title: 'Τίτλος',
-       image_position: 'Θέση',
-       none: 'Καμία',
-       left: 'Αριστερά',
-       right: 'Δεξιά',
-       image_web_link: 'Υπερσύνδεσμος εικόνας',
-       text: 'Κείμενο',
-       mailto: 'Email',
-       web: 'Διεύθυνση URL',
-       video_html_code: 'Κώδικας ενσωμάτωσης βίντεο',
-       file: 'Εισαγωγή αρχείου...',
-       upload: 'Ανέβασμα',
-       download: 'Κατέβασμα',
-       choose: 'Επέλεξε',
-       or_choose: 'ή επέλεξε',
-       drop_file_here: 'Σύρατε αρχεία εδώ',
-       align_left:     'Στοίχιση αριστερά',
-       align_center: 'Στοίχιση στο κέντρο',
-       align_right: 'Στοίχιση δεξιά',
-       align_justify: 'Πλήρης στοίχιση',
-       horizontalrule: 'Εισαγωγή οριζόντιας γραμμής',
-       deleted: 'Διαγράφηκε',
-       anchor: 'Άγκυρα',
-       link_new_tab: 'Άνοιγμα συνδέσμου σε νέα καρτέλα',
-       underline: 'Υπογράμμιση',
-       alignment: 'Στοίχιση',
-       filename: 'Όνομα (προαιρετικό)',
-       edit: 'Τροποποίηση',
-       center: 'Κέντρο',
-};
-})( jQuery );
-
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/eo.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/eo.js
deleted file mode 100644 (file)
index 7532276..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['eo'] = {
-       html: 'HTML', // substantive
-       video: 'Enŝovu videon...', // imperative
-       image: 'Enŝovu bildon...', // imperative
-       table: 'Tabelo', // substantive
-       link: 'Ligu', // imperative
-       link_insert: 'Enŝovu ligilon ...', // imperative
-       link_edit: 'Edit link',
-       unlink: 'Malligu', // imperative
-       formatting: 'Tekstaranĝo', // substantive
-       paragraph: 'Paragrafo', // substantive
-       quote: 'Citaĵo', // substantive
-       code: 'Kodo', // substantive
-       header1: 'Kapo 1', // substantive
-       header2: 'Kapo 2', // substantive
-       header3: 'Kapo 3', // substantive
-       header4: 'Kapo 4', // substantive
-       header5: 'Kapo 5', // substantive
-       bold:  'Grasa', // adjective
-       italic: 'Kursiva', // adjective
-       fontcolor: 'Tipara koloro', // substantive
-       backcolor: 'Fona koloro', // substantive
-       unorderedlist: 'Malorda listo', // substantive
-       orderedlist: 'Orda listo', // substantive
-       outdent: 'Malkrommarĝenu', // imperative
-       indent: 'Krommarĝenu', // imperative
-       cancel: 'Rezignu', // imperative
-       insert: 'Enŝovu', // imperative
-       save: 'Konservu',       // imperative
-       _delete: 'Forigu', // imperative
-       insert_table: 'Enŝovu tabelon...', // imperative
-       insert_row_above: 'Enŝovu vicon supren', // imperative
-       insert_row_below: 'Enŝovu vicon malsupren', // imperative
-       insert_column_left: 'Enŝovu kolumnon maldekstren', // imperative
-       insert_column_right: 'Enŝovu kolumnon dekstren', // imperative
-       delete_column: 'Forigu kolumnon', // imperative
-       delete_row: 'Forigu vicon', // imperative
-       delete_table: 'Forigu tabelon', // imperative
-       rows: 'Vicoj', // substantive (plural)
-       columns: 'Kolumnoj', // substantive (plural)
-       add_head: 'Enŝovu kapon', // imperative
-       delete_head: 'Forigu kapon', // imperative
-       title: 'Titolo', // substantive
-       image_position: 'Bildloko', // substantive
-       none: 'Neniu', // determiner
-       left: 'Maldekstra', // adjective
-       right: 'Dekstra', // adjective
-       image_web_link: 'Bilda hiperligilo', // substantive
-       text: 'Teksto', // substantive
-       mailto: 'Retpoŝto', // substantive
-       web: 'URL', // substantive
-       video_html_code: 'Videa enkorpigita kodo', // substantive
-       file: 'Enŝovu dosieron...', // imperative
-       upload: 'Alŝutu', // imperative
-       download: 'Elŝutu', // imperative
-       choose: 'Elektu', // imperative
-       or_choose: 'Aŭ elektu', // imperative
-       drop_file_here: 'Demetu dosieron ĉi tien', // imperative
-       align_left:     'Ĝisrandigu maldekstren', // imperative
-       align_center: 'Centrigu', // imperative
-       align_right: 'Ĝisrandigu dekstren', // imperative
-       align_justify: 'Ĝisrandigu', // imperative
-       horizontalrule: 'Enŝovu horizontalan linion', // imperative
-       fullscreen: 'Plenekrana', // adjective
-       deleted: 'Foriga', // adjective
-       anchor: 'Ankro', // substantive
-       link_new_tab: 'Malfermu hiperligilon en novan langeton', // imperative
-       underline: 'Substrekita', // adjective
-       alignment: 'Ĝisrandigo', // substantive
-       filename: 'Dosiernomo (fakultativa)', // substantive
-       edit: 'Redaktu', // imperative
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/es.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/es.js
deleted file mode 100644 (file)
index cbf3b61..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['es'] = {
-       html: 'HTML',
-       video: 'Insertar video...',
-       image: 'Insertar imagen...',
-       table: 'Tabla',
-       link: 'Enlace',
-       link_insert: 'Insertar enlace ...',
-       link_edit: 'Editar enlace',
-       unlink: 'Desenlazar',
-       formatting: 'Estilos',
-       paragraph: 'Texto normal',
-       quote: 'Cita',
-       code: 'Código',
-       header1: 'Cabecera 1',
-       header2: 'Cabecera 2',
-       header3: 'Cabecera 3',
-       header4: 'Cabecera 4',
-       header5: 'Cabecera 5',
-       bold:  'Negrita',
-       italic: 'Itálica',
-       fontcolor: 'Color de fuente',
-       backcolor: 'Color de fondo',
-       unorderedlist: 'Lista desordenada',
-       orderedlist: 'Lista ordenada',
-       outdent: 'Disminuir sangrado',
-       indent: 'Aumentar sangrado',
-       cancel: 'Cancelar',
-       insert: 'Insertar',
-       save: 'Guardar',
-       _delete: 'Borrar',
-       insert_table: 'Insertar tabla...',
-       insert_row_above: 'Añadir fila encima',
-       insert_row_below: 'Añadir fila debajo',
-       insert_column_left: 'Añadir columna a la izquierda',
-       insert_column_right: 'Añadir column a la derecha',
-       delete_column: 'Borrar columna',
-       delete_row: 'Borrar fila',
-       delete_table: 'Borrar tabla',
-       rows: 'Filas',
-       columns: 'Columnas',
-       add_head: 'Añadir cabecera',
-       delete_head: 'Borrar cabecera',
-       title: 'Título',
-       image_position: 'Posición',
-       none: 'Ninguna',
-       left: 'Izquierda',
-       right: 'Derecha',
-       image_web_link: 'Enlace web de la imágen',
-       text: 'Texto',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Código de inserción de video',
-       file: 'Insertar archivo...',
-       upload: 'Cargar',
-       download: 'Descargar',
-       choose: 'Elegir',
-       or_choose: 'O elegir',
-       drop_file_here: 'Arrastra y suelta el archivo aqui',
-       align_left:     'Alinear texto a la izquierda',
-       align_center: 'Centrar texto',
-       align_right: 'Alinear texto a la derecha',
-       align_justify: 'Justificar texto',
-       horizontalrule: 'Insertar línea horizontal',
-       deleted: 'Borrado',
-       anchor: 'Anchor',
-       link_new_tab: 'Abrir enlace en una nueva pestaña',
-       underline: 'Subrayado',
-       alignment: 'Alineación',
-       filename: 'Nombre (opcional)',
-       edit: 'Editar',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/es_ar.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/es_ar.js
deleted file mode 100644 (file)
index 90bafe6..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['es_ar'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Imágen',
-       table: 'Tabla',
-       link: 'Enlace',
-       link_insert: 'Insertar enlace ...',
-       link_edit: 'Edit link',
-       unlink: 'Eliminar enlace',
-       formatting: 'Estilos',
-       paragraph: 'Párrafo',
-       quote: 'Comillas',
-       code: 'Código',
-       header1: 'Cabecera 1',
-       header2: 'Cabecera 2',
-       header3: 'Cabecera 3',
-       header4: 'Cabecera 4',
-       header5: 'Cabecera 5',
-       bold:  'Negrita',
-       italic: 'Itálica',
-       fontcolor: 'Color fuente',
-       backcolor: 'Color fondo',
-       unorderedlist: 'Lista sin orden',
-       orderedlist: 'Lista ordenada',
-       outdent: 'Disminuir sangría',
-       indent: 'Aumentar sangría',
-       cancel: 'Cancelar',
-       insert: 'Agregar',
-       save: 'Guardar',
-       _delete: 'Eliminar',
-       insert_table: 'Agregar tabla',
-       insert_row_above: 'Agregar fila arriba',
-       insert_row_below: 'Agregar fila debajo',
-       insert_column_left: 'Agregar columna a la izquierda',
-       insert_column_right: 'Agregar column a la derecha',
-       delete_column: 'Eliminar columna',
-       delete_row: 'Eliminar fila',
-       delete_table: 'Eliminar tabla',
-       rows: 'Filas',
-       columns: 'Columnas',
-       add_head: 'Agregar encabezado',
-       delete_head: 'Eliminar encabezado',
-       title: 'Título',
-       image_position: 'Posición',
-       none: 'ninguna',
-       left: 'izquierda',
-       right: 'derecha',
-       image_web_link: 'Enlace de imagen web',
-       text: 'Texto',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Código embebido del video',
-       file: 'Archivo',
-       upload: 'Cargar',
-       download: 'Descargar',
-       choose: 'Seleccionar',
-       or_choose: 'O seleccionar',
-       drop_file_here: 'Soltar el archivo aquí',
-       align_left:     'Alinear a la izquierda',
-       align_center: 'Alinear al centro',
-       align_right: 'Alinear a la derecha',
-       align_justify: 'Justificar',
-       horizontalrule: 'Trazo horizontal',
-       fullscreen: 'Pantalla completa',
-       deleted: 'Eliminado',
-       anchor: 'Anclaje',
-       link_new_tab: 'Abrir enlace en otra pestaña',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/fa.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/fa.js
deleted file mode 100644 (file)
index e627455..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['fa'] = {
-       html: 'اچ تی ام ال',
-       video: 'درج ویدیو...',
-       image: 'درج تصویر',
-       table: 'جدول',
-       link: 'پیوند',
-       link_insert: 'درج پیوند ...',
-       link_edit: 'Edit link',
-       unlink: 'از بین بردن پیوند',
-       formatting: 'فالب بندی',
-       paragraph: 'پراگراف',
-       quote: 'نقل قول',
-       code: 'کد',
-       header1: 'سرامد 1',
-       header2: 'سرامد 2',
-       header3: 'سرامد 3',
-       header4: 'سرامد 4',
-       header5: 'سرامد 5',
-       bold:  'درشت',
-       italic: 'خمیده',
-       fontcolor: 'رنگ قلم',
-       backcolor: 'رنگ ضمینه',
-       unorderedlist: 'فهرست نامرتب',
-       orderedlist: 'فهرست مرتب شده',
-       outdent: 'بیرو رفتگی',
-       indent: 'تو رفتگی',
-       cancel: 'انصراف',
-       insert: 'درج',
-       save: 'ذخیره',
-       _delete: 'حذف',
-       insert_table: 'درج جدول ..',
-       insert_row_above: 'سطر جدید در بالا',
-       insert_row_below: 'سطر جدید در پائین',
-       insert_column_left: 'ستون جدید در سمت چپ',
-       insert_column_right: 'ستون جدید در سمت راست',
-       delete_column: 'حذف ستون',
-       delete_row: 'حذف سطر',
-       delete_table: 'حذف جدول',
-       rows: 'سطرها',
-       columns: 'ستونها',
-       add_head: 'درج سر ستون ',
-       delete_head: 'حذف سرستون',
-       title: 'عنوان',
-       image_position: 'موقعیت',
-       none: 'هیچیک',
-       left: 'چپ',
-       right: 'راست',
-       image_web_link: 'آدرس تصویر در اینترنت',
-       text: 'متن',
-       mailto: 'ایمیل',
-       web: 'آدرس',
-       video_html_code: 'کد نمایش ویدئو',
-       file: 'درج فایل ....',
-       upload: 'بارگزاری',
-       download: 'بارگیری',
-       choose: 'انتخاب کنید',
-       or_choose: 'یا انتخاب کنید',
-       drop_file_here: 'این فایل ها حذف شوند',
-       align_left:     'چپ جین',
-       align_center: 'وسط چین',
-       align_right: 'راست چین',
-       align_justify: 'کشیده',
-       horizontalrule: 'درج خط جدا کننده',
-       fullscreen: 'نمایش کامل',
-       deleted: 'حذف شده',
-       anchor: 'قلاب',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/fi.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/fi.js
deleted file mode 100644 (file)
index 6b4bb7f..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['fi'] = {
-       html: 'HTML',
-       video: 'Lisää video',
-       image: 'Lisää kuva',
-       table: 'Taulukko',
-       link: 'Linkki',
-       link_insert: 'Lisää linkki',
-       link_edit: 'Muokkaa linkkiä',
-       unlink: 'Poista linkki',
-       formatting: 'Tyylit',
-       paragraph: 'Normaaliteksti',
-       quote: 'Lainaus',
-       code: 'Koodi',
-       header1: 'Otsikko 1',
-       header2: 'Otsikko 2',
-       header3: 'Otsikko 3',
-       header4: 'Otsikko 4',
-       header5: 'Otsikko 5',
-       bold:  'Lihavointi',
-       italic: 'Kursivointi',
-       fontcolor: 'Tekstin väri',
-       backcolor: 'Taustaväri',
-       unorderedlist: 'Luettelo luettelomerkein',
-       orderedlist: 'Numeroitu luettelo',
-       outdent: 'Vähennä sisennystä',
-       indent: 'Lisää sisennystä',
-       cancel: 'Peru',
-       insert: 'Lisää',
-       save: 'Tallenna',
-       _delete: 'Poista',
-       insert_table: 'Lisää taulukko',
-       insert_row_above: 'Lisää rivi ylle',
-       insert_row_below: 'Lisää rivi alle',
-       insert_column_left: 'Lisää sarake vasemmalle',
-       insert_column_right: 'Lisää sarake oikealle',
-       delete_column: 'Poista sarake',
-       delete_row: 'Poista rivi',
-       delete_table: 'Poista taulukko',
-       rows: 'Rivit',
-       columns: 'Sarakkeet',
-       add_head: 'Lisää otsikkorivi',
-       delete_head: 'Poista otsikkorivi',
-       title: 'Kuvateksti',
-       image_position: 'Kuvan sijainti',
-       none: 'oletus',
-       left: 'vasen',
-       right: 'oikea',
-       image_web_link: 'Kuvan URL-osoite',
-       text: 'Teksti',
-       mailto: 'Sähköposti',
-       web: 'URL-osoite',
-       video_html_code: 'Videon upotuskoodi',
-       file: 'Lisää tiedosto',
-       upload: 'Lähetä',
-       download: 'Lataa',
-       choose: 'Valitse',
-       or_choose: 'tai valitse',
-       drop_file_here: 'Vedä ja pudota kuva tähän',
-       align_left:     'Tasaa vasemmalle',
-       align_center: 'Keskitä',
-       align_right: 'Tasaa oikealle',
-       align_justify: 'Tasaa molemmat reunat',
-       horizontalrule: 'Lisää vaakaviiva',
-       deleted: 'Poistettu',
-       anchor: 'Ankkuri',
-       link_new_tab: 'Avaa linkki uudessa välilehdessä',
-       underline: 'Alleviivaa',
-       alignment: 'Tasaus',
-       filename: 'Nimi (valinnainen)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/fr.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/fr.js
deleted file mode 100644 (file)
index 396b223..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['fr'] = {
-       html: 'Code HTML',
-       video: 'Insérer une vidéo...',
-       image: 'Insérer une image...',
-       table: 'Tableau',
-       link: 'Lien',
-       link_insert: 'Insérer un lien...',
-       link_edit: 'Modifier le lien',
-       unlink: 'Supprimer le lien',
-       formatting: 'Styles',
-       paragraph: 'Paragraphe',
-       quote: 'Citation',
-       code: 'Code',
-       header1: 'Titre 1',
-       header2: 'Titre 2',
-       header3: 'Titre 3',
-       header4: 'Titre 4',
-       header5: 'Titre 5',
-       bold:  'Gras',
-       italic: 'Italique',
-       fontcolor: 'Couleur du texte',
-       backcolor: 'Couleur d\'arrière plan du texte',
-       unorderedlist: 'Liste à puces',
-       orderedlist: 'Liste numérotée',
-       outdent: 'Diminuer le retrait',
-       indent: 'Augmenter le retrait',
-       cancel: 'Annuler',
-       insert: 'Insérer',
-       save: 'Enregistrer',
-       _delete: 'Supprimer',
-       insert_table: 'Insérer un tableau...',
-       insert_row_above: 'Ajouter une rangée au-dessus',
-       insert_row_below: 'Ajouter une rangée en-dessous',
-       insert_column_left: 'Ajouter une colonne à gauche',
-       insert_column_right: 'Ajouter une colonne à droite',
-       delete_column: 'Supprimer la colonne',
-       delete_row: 'Supprimer la rangée',
-       delete_table: 'Supprimer le tableau',
-       rows: 'Rangées',
-       columns: 'Colonnes',
-       add_head: 'Ajouter un en-tête',
-       delete_head: 'Supprimer l\'en-tête',
-       title: 'Titre',
-       image_position: 'Position',
-       none: 'Aucun',
-       left: 'Gauche',
-       right: 'Droite',
-       image_web_link: 'Adresse URL de l\'image',
-       text: 'Texte',
-       mailto: 'Courriel',
-       web: 'Adresse URL',
-       video_html_code: 'Code d\'intégration du video',
-       file: 'Insérer un fichier...',
-       upload: 'Téléverser',
-       download: 'Télécharger',
-       choose: 'Choisir',
-       or_choose: 'Ou choisissez',
-       drop_file_here: 'Déposez le fichier ici',
-       align_left:     'Aligner à gauche',
-       align_center: 'Aligner au centre',
-       align_right: 'Aligner à droite',
-       align_justify: 'Justifier',
-       horizontalrule: 'Insérer une ligne horizontale',
-       deleted: 'Supprimé',
-       anchor: 'Ancre',
-       link_new_tab: 'Ouvrir le lien dans un nouvel onglet',
-       underline: 'Souligner',
-       alignment: 'Alignement',
-       filename: 'Nom de fichier (optionnel)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ge.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ge.js
deleted file mode 100644 (file)
index 88fcddf..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ge'] = {
-       html: 'HTML კოდი',
-       video: 'ვიდეოს ჩასმა',
-       image: 'სურათის ჩასმა',
-       table: 'ცხრილი',
-       link: 'ბმული',
-       link_insert: 'ბმულის ჩასმა',
-       link_edit: 'ბმულის რედაქტირება',
-       unlink: 'ბმულის გაუქმება',
-       formatting: 'ტექსტის ფორმატირება',
-       paragraph: 'პარაგრაფი',
-       quote: 'ციტატა',
-       code: 'კოდი',
-       header1: 'სათაური 1',
-       header2: 'სათაური 2',
-       header3: 'სათაური 3',
-       header4: 'სათაური 4',
-       header5: 'სათაური 5',
-       bold:  'მსხვილი',
-       italic: 'დახრილი',
-       fontcolor: 'ტექსტის ფერი',
-       backcolor: 'ფონის ფერი',
-       unorderedlist: 'დაუნომრავი სია',
-       orderedlist: 'დანომრილი სია',
-       outdent: 'ტექსტის გამოწევა',
-       indent: 'ტექსტის შეწევა',
-       cancel: 'გაუქმება',
-       insert: 'ჩასმა',
-       save: 'შენახვა',
-       _delete: 'წაშლა',
-       insert_table: 'ცხრილის ჩასმა',
-       insert_row_above: 'რიგის ზემოდან დამატება',
-       insert_row_below: 'რიგის ქვემოდან დამატება',
-       insert_column_left: 'სვეტის მარცხნიდან დამატება',
-       insert_column_right: 'სვეტის მარჯვნიდან დამატება',
-       delete_column: 'სვეტის წაშლა',
-       delete_row: 'რიგის წაშლა',
-       delete_table: 'ცხრილის წაშლა',
-       rows: 'რიგი',
-       columns: 'სვეტი',
-       add_head: 'სათაურის დამატება',
-       delete_head: 'სათაურის წაშლა',
-       title: 'სათაური',
-       image_position: 'მდებარეობა',
-       none: 'არსად',
-       left: 'მარცხნივ',
-       right: 'მარჯვნივ',
-       image_web_link: 'სურათის ვებ-მისამართი',
-       text: 'ტექსტი',
-       mailto: 'ელ. მისამართი',
-       web: 'მისამართი',
-       video_html_code: 'ვიდეოს HTML Embed კოდი',
-       file: 'ფაილის ჩასმა',
-       upload: 'ატვირთვა',
-       download: 'ჩამოტვირთვა',
-       choose: 'არჩევა',
-       or_choose: 'ან აირჩიეთ',
-       drop_file_here: 'ჩააგდეთ ფაილი აქ',
-       align_left:     'მარცხენა მხრიდან',
-       align_center: 'ცენტრში',
-       align_right: 'მარჯვენა მხრიდან',
-       align_justify: 'ორივე მხრიდან',
-       horizontalrule: 'ჰორიზონტალური ხაზის ჩასმა',
-       deleted: 'ხაზგადასმული',
-       anchor: 'ბმული',
-       link_new_tab: 'ახალ ფანჯარაში გასხნა',
-       underline: 'ხაზგასმული',
-       alignment: 'ტექსტის გასწორება',
-       filename: 'სახელი (არასავალდებულო)',
-       edit: 'რედაქტირება',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/he.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/he.js
deleted file mode 100644 (file)
index 7fc1939..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['he'] = {
-       html: 'HTML',
-       video: 'הכנס וידאו...',
-       image: 'הכנס תמונה...',
-       table: 'טבלה',
-       link: 'קישור',
-       link_insert: 'הכנס קישור',
-       link_edit: 'Edit link',
-       unlink: 'הסרת קישור',
-       formatting: 'עיצוב',
-       paragraph: 'פסקה',
-       quote: 'ציטוט',
-       code: 'קוד',
-       header1: 'כותרת 1',
-       header2: 'כותרת 2',
-       header3: 'כותרת 3',
-       header4: 'כותרת 4',
-       header5: 'כותרת 5',
-       bold:  'מודגש',
-       italic: 'מוטה',
-       fontcolor: 'צבע גופן',
-       backcolor: 'צבע רקע',
-       unorderedlist: 'רשימת תבליטים',
-       orderedlist: 'רשימה ממוספרת',
-       outdent: 'הזחה החוצה',
-       indent: 'הזחה פנימה',
-       cancel: 'ביטול',
-       insert: 'הכנס',
-       save: 'שמור',
-       _delete: 'מחק',
-       insert_table: 'הכנס טבלה...',
-       insert_row_above: 'הוסף שורה מעל',
-       insert_row_below: 'הוסף שורה מתחת',
-       insert_column_left: 'הוסף עמודה משמאל',
-       insert_column_right: 'הוסף עמודה מימין',
-       delete_column: 'מחק עמודה',
-       delete_row: 'מחק שורה',
-       delete_table: 'מחק טבלה',
-       rows: 'שורות',
-       columns: 'עמודות',
-       add_head: 'הוסף Head',
-       delete_head: 'מחק Head',
-       title: 'כותרת',
-       image_position: 'מיקום',
-       none: 'ריק',
-       left: 'שמאל',
-       right: 'ימין',
-       image_web_link: 'קישור תמונה',
-       text: 'טקסט',
-       mailto: 'דואר אלקטרוני',
-       web: 'URL',
-       video_html_code: 'קוד הטבעת וידאו',
-       file: 'הכנס קובץ...',
-       upload: 'טען',
-       download: 'הורד',
-       choose: 'בחר',
-       or_choose: 'או בחר',
-       drop_file_here: 'שחרר קובץ כאן',
-       align_left:     'ישר טקסט לשמאל',
-       align_center: 'מרכז טקסט',
-       align_right: 'ישר טקסט לימין',
-       align_justify: 'ישור דו צידי',
-       horizontalrule: 'הכנס קו הפרדה אופקי',
-       deleted: 'נמחק',
-       anchor: 'עוגן',
-       link_new_tab: 'פתח קישור בלשונית חדשה',
-       underline: 'קו תחתון',
-       alignment: 'יישור',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/hr.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/hr.js
deleted file mode 100644 (file)
index d534735..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function($) {
-       $.Redactor.opts.langs['hr'] = {
-               html: 'HTML',
-               video: 'Umetni video',
-               image: 'Umetni sliku',
-               table: 'Tablica',
-               link: 'Poveznica',
-               link_insert: 'Umetni poveznicu',
-               link_edit: 'Uredi poveznicu',
-               unlink: 'Ukloni poveznicu',
-               formatting: 'Ure&#273ivanje',
-               paragraph: 'Paragraf',
-               quote: 'Umetni citat',
-               code: 'Izvorni k&ocirc;d',
-               header1: 'Zaglavlje 1',
-               header2: 'Zaglavlje 2',
-               header3: 'Zaglavlje 3',
-               header4: 'Zaglavlje 4',
-               header5: 'Zaglavlje 5',
-               bold: 'Podebljaj',
-               italic: 'Nakosi',
-               fontcolor: 'Boja slova',
-               backcolor: 'Boja pozadine',
-               unorderedlist: 'Nesortirana lista',
-               orderedlist: 'Sortirana lista',
-               outdent: 'Izvuci',
-               indent: 'Uvuci',
-               cancel: 'Odustani',
-               insert: 'Umetni',
-               save: 'Spremi',
-               _delete: 'Izbri&scaron;i',
-               insert_table: 'Umetni tablicu',
-               insert_row_above: 'Dodaj redak iznad',
-               insert_row_below: 'Dodaj redak ispod',
-               insert_column_left: 'Dodaj stupac lijevo',
-               insert_column_right: 'Dodaj stupac desno',
-               delete_column: 'Ukloni stupac',
-               delete_row: 'Ukloni redak',
-               delete_table: 'Ukloni tablicu',
-               rows: 'Redaka',
-               columns: 'Stupaca',
-               add_head: 'Dodaj zaglavlje',
-               delete_head: 'Ukloni zaglavlje',
-               title: 'Naslov',
-               image_position: 'Poravnanje',
-               none: 'Nema',
-               left: 'lijevo',
-               right: 'desno',
-               center: 'centriraj',
-               image_web_link: 'Internet adresa slike',
-               text: 'Tekst',
-               mailto: 'Email',
-               web: 'Internet adresa',
-               video_html_code: 'Video k&ocirc;d',
-               file: 'Umetni datoteku',
-               upload: 'Po&scaron;alji datoteku',
-               download: 'Preuzmi datoteku',
-               choose: 'Odaberi',
-               or_choose: 'ili ru&#269no odaberi',
-               drop_file_here: 'Povuci datoteku ovdje',
-               align_left: 'Poravnaj lijevo',
-               align_center: 'Centriraj',
-               align_right: 'Poravnaj desno',
-               align_justify: 'Od ruba do ruba',
-               horizontalrule: 'Umetni horizontalnu crtu',
-               deleted: 'Precrtaj',
-               anchor: 'Sidro',
-               link_new_tab: 'Otvori u novom prozoru',
-               underline: 'Podvuci',
-               alignment: 'Poravnanje',
-               filename: 'Naziv (neobavezno)',
-               edit: 'Uredi',
-               fullscreen: 'Cijeli zaslon'
-       };
-})(jQuery);
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/hu.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/hu.js
deleted file mode 100644 (file)
index fbab73f..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['hu'] = {
-       html: 'HTML',
-       video: 'Videó',
-       image: 'Kép',
-       table: 'Tábla',
-       link: 'Link',
-       link_insert: 'Link beszúrás ...',
-       link_edit: 'Edit link',
-       unlink: 'Link megszüntetés',
-       formatting: 'Stílusok',
-       paragraph: 'Bekezdés',
-       quote: 'Idézet',
-       code: 'Kód',
-       header1: 'Címsor 1',
-       header2: 'Címsor 2',
-       header3: 'Címsor 3',
-       header4: 'Címsor 4',
-       header5: 'Címsor 5',
-       bold:  'Félkövér',
-       italic: 'Dőlt',
-       fontcolor: 'Szöveg szine',
-       backcolor: 'Szöveg hátterének szine',
-       unorderedlist: 'Nem számozott lista',
-       orderedlist: 'Számozott lista',
-       outdent: 'Outdent',
-       indent: 'Indent',
-       cancel: 'Mégsem',
-       insert: 'Beszurás',
-       save: 'Mentés',
-       _delete: 'Törlés',
-       insert_table: 'Táblázat beszúrása',
-       insert_row_above: 'Sor beszúrása az aktuális sor fölé',
-       insert_row_below: 'Sor beszúrása ez alá',
-       insert_column_left: 'Oszlop beszúrása ettöl balra',
-       insert_column_right: 'Oszlop hozzáadása ettöl jobbra',
-       delete_column: 'Oszlop törlése',
-       delete_row: 'Sor törlése',
-       delete_table: 'Táblázat törlése',
-       rows: 'Sorok',
-       columns: 'Oszlopok',
-       add_head: 'Fejrész hozzáadása',
-       delete_head: 'Fejrész törlése',
-       title: 'Felira',
-       image_view: 'Kép megnézése',
-       image_position: 'Pozició',
-       none: 'nincs',
-       left: 'bal',
-       right: 'jobb',
-       image_web_link: 'Link a képre',
-       text: 'Szöveg',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Videó embed code',
-       file: 'File',
-       upload: 'Feltöltés',
-       download: 'Letöltés',
-       choose: 'Válassz',
-       or_choose: 'Vagy válassz',
-       drop_file_here: 'Ide dobd a file-t',
-       align_left:     'Balra igazítás',
-       align_center: 'Középre igazítás',
-       align_right: 'Jobbra igazítás',
-       align_justify: 'Sorkizárt',
-       horizontalrule: 'Horizontális vonal',
-       fullscreen: 'Teljes képernyős',
-       deleted: 'Törölt',
-       anchor: 'Horgony',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/id.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/id.js
deleted file mode 100644 (file)
index d67b146..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['id'] = {
-    html: 'HTML',
-    video: 'Sisipkan Video...',
-    image: 'Sisipkan Gambar...',
-    table: 'Tabel',
-    link: 'Tautan',
-    link_insert: 'Sisipkan Tautan ...',
-    link_edit: 'Edit link',
-    unlink: 'Hapus Tautan',
-    formatting: 'Format',
-    paragraph: 'Paragraf',
-    quote: 'Kutipan',
-    code: 'Kode',
-    header1: 'Header 1',
-    header2: 'Header 2',
-    header3: 'Header 3',
-    header4: 'Header 4',
-    header5: 'Header 5',
-    bold:  'Tebal',
-    italic: 'Miring',
-    fontcolor: 'Warna Huruf',
-    backcolor: 'Warna Latar',
-    unorderedlist: 'Daftar tak berurutan',
-    orderedlist: 'Daftar berurutan',
-    outdent: 'Tulisan diluar',
-    indent: 'Tulisan masuk',
-    cancel: 'Batal',
-    insert: 'Sisipkan',
-    save: 'Simpan',
-    _delete: 'Hapus',
-    insert_table: 'Sisipkan Tabel...',
-    insert_row_above: 'Tambahkan Baris di atas',
-    insert_row_below: 'Tambahkan Baris di bawah',
-    insert_column_left: 'Tambahkan Kolom di kiri',
-    insert_column_right: 'Tambahkan Kolom di kanan',
-    delete_column: 'Hapus Kolom',
-    delete_row: 'Hapus Baris',
-    delete_table: 'Hapus Tabel',
-    rows: 'Baris',
-    columns: 'Kolom',
-    add_head: 'Tambahkan Head',
-    delete_head: 'Hapus Head',
-    title: 'Judul',
-    image_position: 'Posisi',
-    none: 'Kosong',
-    left: 'Kiri',
-    right: 'Kanan',
-    image_web_link: 'Tautan Gambar Web',
-    text: 'Teks',
-    mailto: 'Email',
-    web: 'URL',
-    video_html_code: 'Kode pelekatan video',
-    file: 'Sisipkan Berkas...',
-    upload: 'Unggah',
-    download: 'Unduh',
-    choose: 'Pilih',
-    or_choose: 'Atau pilih',
-    drop_file_here: 'Letakkan berkas disini',
-    align_left:        'Rata Kiri',
-    align_center: 'Rata Tengah',
-    align_right: 'Rata Kanan',
-    align_justify: 'Rata Kiri dan Kanan',
-    horizontalrule: 'Sisipkan garis horizontal',
-    fullscreen: 'Layar penuh',
-    deleted: 'Coret',
-    anchor: 'Jangkar',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/it.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/it.js
deleted file mode 100644 (file)
index 2f85764..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['it'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Immagine',
-       table: 'Tabella',
-       link: 'Collegamento',
-       link_insert: 'Inserisci un collegamento ...',
-       link_edit: 'Modifica link',
-       unlink: 'Rimuovi il collegamento',
-       formatting: 'Stili',
-       paragraph: 'Paragrafo',
-       quote: 'Citazione',
-       code: 'Codice',
-       header1: 'H1',
-       header2: 'H2',
-       header3: 'H3',
-       header4: 'H4',
-       header5: 'H5',
-       bold:  'Grassetto',
-       italic: 'Corsivo',
-       superscript: 'Apice',
-       strikethrough: 'Barrato',
-       fontcolor: 'Colore del font',
-       backcolor: 'Colore di sfondo',
-       unorderedlist: 'Elenco puntato',
-       orderedlist: 'Elenco numerato',
-       outdent: 'Rimuovi rientro',
-       indent: 'Aumenta rientro',
-       cancel: 'Annulla',
-       insert: 'Inserisci',
-       save: 'Salva',
-       _delete: 'rimuovi',
-       insert_table: 'Inserisci tabella',
-       insert_row_above: 'Inserisci una riga sopra',
-       insert_row_below: 'Inserisci una riga sotto',
-       insert_column_left: 'Aggiungi una colonna a sinistra',
-       insert_column_right: 'Aggiungi una colonna a destra',
-       delete_column: 'Cancella colonna',
-       delete_row: 'Cancella riga',
-       delete_table: 'Cancella tabella',
-       rows: 'Righe',
-       columns: 'Colonne',
-       add_head: 'Aggiungi head',
-       delete_head: 'Cancella head',
-       title: 'Titolo',
-       image_position: 'Posizione',
-       none: 'Nessuno',
-       left: 'Sinistra',
-       right: 'Destra',
-       image_web_link: 'URL immagine',
-       text: 'Testo',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Codice da incorporare',
-       file: 'File',
-       upload: 'Upload',
-       download: 'Download',
-       choose: 'Scegli',
-       or_choose: 'O Scegli',
-       drop_file_here: 'Trascina il file qui',
-       align_left:     'Allinea a sinistra',
-       align_center: 'Allinea al centro',
-       align_right: 'Allinea a destra',
-       align_justify: 'Giustifica',
-       horizontalrule: 'Riga orizzonatale',
-       fullscreen: 'Schermo intero',
-       deleted: 'Cancellato',
-       anchor: 'Ancora',
-       link_new_tab: 'Apri link in una nuova tab',
-       underline: 'Sottolineato',
-       alignment: 'Allineamento',
-       filename: 'Nome (opzionale)',
-       edit: 'Modifica',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ja.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ja.js
deleted file mode 100644 (file)
index 42fe92b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ja'] = {
-       html: 'HTML',
-       video: 'ビデオ',
-       image: 'イメージ',
-       table: 'テーブル',
-       link: 'リンク',
-       link_insert: 'リンクの挿入 ...',
-       link_edit: 'Edit link',
-       unlink: 'リンクを外す',
-       formatting: 'スタイル',
-       paragraph: '段落',
-       quote: '引用',
-       code: 'コード',
-       header1: 'ヘッダー 1',
-       header2: 'ヘッダー 2',
-       header3: 'ヘッダー 3',
-       header4: 'ヘッダー 4',
-       header5: 'ヘッダー 5',
-       bold:  '太字',
-       italic: 'イタリック',
-       fontcolor: 'フォント色',
-       backcolor: '背景色',
-       unorderedlist: '番号なしリスト',
-       orderedlist: '番号つきリスト',
-       outdent: '字上げ(逆インデント)',
-       indent: '字下げ(インデント)',
-       cancel: 'キャンセル',
-       insert: '挿入',
-       save: '保存',
-       _delete: '削除',
-       insert_table: 'テーブルの挿入',
-       insert_row_above: '列を上に追加',
-       insert_row_below: '列を下に追加',
-       insert_column_left: '行を左に追加',
-       insert_column_right: '行を右に追加',
-       delete_column: '行を削除',
-       delete_row: '列を削除',
-       delete_table: 'テーブルを削除',
-       rows: '列',
-       columns: '行',
-       add_head: 'テーブルヘッダの追加',
-       delete_head: 'テーブルヘッダの削除',
-       title: 'タイトル',
-       image_position: 'イメージの位置',
-       none: '無し',
-       left: '左',
-       right: '右',
-       image_web_link: 'イメージへのリンク',
-       text: 'テキスト',
-       mailto: 'メール',
-       web: 'URL',
-       video_html_code: 'ビデオ埋め込みコード',
-       file: 'ファイル',
-       upload: 'アップロード',
-       download: 'ダウンロード',
-       choose: '選択',
-       or_choose: 'または選択',
-       drop_file_here: 'ファイルをここにドロップ',
-       align_left:     '左揃え',
-       align_center: '中央揃え',
-       align_right: '右揃え',
-       align_justify: '均等割り付け',
-       horizontalrule: '水平線',
-       fullscreen: '全画面',
-       deleted: '打消し',
-       anchor: 'アンカー',
-       link_new_tab: '新しいタブでリンクを開く',
-       underline: 'アンダーライン',
-       alignment: '行揃え',
-       filename: '名前(オプション)',
-       edit: '編集',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ko.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ko.js
deleted file mode 100644 (file)
index f6ca3a3..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ko'] = {
-       html: 'HTML',
-       video: '비디오',
-       image: '이미지',
-       table: '표',
-       link: '링크',
-       link_insert: '링크 삽입',
-       link_edit: '링크 편집',
-       unlink: '링크 삭제',
-       formatting: '스타일',
-       paragraph: '단락',
-       quote: '인용',
-       code: '코드',
-       header1: '헤더 1',
-       header2: '헤더 2',
-       header3: '헤더 3',
-       header4: '헤더 4',
-       header5: '헤더 5',
-       bold:  '굵게',
-       italic: '기울임꼴',
-       fontcolor: '글자색',
-       backcolor: '배경색',
-       unorderedlist: '글머리기호',
-       orderedlist: '번호매기기',
-       outdent: '내어쓰기',
-       indent: '들여쓰기',
-       cancel: '취소',
-       insert: '삽입',
-       save: '저장',
-       _delete: '삭제',
-       insert_table: '표 삽입',
-       insert_row_above: '열을 위에 추가',
-       insert_row_below: '열을 아래에 추가',
-       insert_column_left: '행을 왼쪽에 추가',
-       insert_column_right: '행을 오른쪽에 추가',
-       delete_column: '컬럼 삭제',
-       delete_row: '행 삭제',
-       delete_table: '표 삭제',
-       rows: '행',
-       columns: '열',
-       add_head: '표 헤더 추가',
-       delete_head: '표 헤더 체거',
-       title: '제목',
-       image_position: '이미지 위치',
-       none: '없음',
-       left: '왼쪽',
-       right: '오른쪽',
-       image_web_link: '이미지 링크',
-       text: '텍스트',
-       mailto: '메일',
-       web: 'URL',
-       video_html_code: '비디오 삽입(embed) 코드',
-       file: '파일',
-       upload: '업로드',
-       download: '다운로드',
-       choose: '선택',
-       or_choose: '또는 선택',
-       drop_file_here: '파일을 여기에 떨굼',
-       align_left:     '왼쪽정렬',
-       align_center: '가운데정렬',
-       align_right: '오른쪽정렬',
-       align_justify: '가지런히정렬',
-       horizontalrule: '수평선',
-       fullscreen: '전체화면',
-       deleted: '취소선',
-       anchor: '링크',
-       link_new_tab: '새로운 탭에서 링크 열기',
-       underline: '밑줄',
-       alignment: '정렬',
-       filename: '파일명 (선택)',
-       edit: '편집',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/lt.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/lt.js
deleted file mode 100644 (file)
index d664887..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['lt'] = {
-       html: 'HTML',
-       video: 'Įkelti video...',
-       image: 'Įkelti paveiksliuką...',
-       table: 'Lentelė',
-       link: 'Nuoroda',
-       link_insert: 'Įtraukti nuorodą ...',
-       link_edit: 'Edit link',
-       unlink: 'Panaikinti nuorodą',
-       formatting: 'Formatavimas',
-       paragraph: 'Paragrafas',
-       quote: 'Citata',
-       code: 'Išnaša',
-       header1: 'Antraštė 1',
-       header2: 'Antraštė 2',
-       header3: 'Antraštė 3',
-       header4: 'Antraštė 4',
-       header5: 'Antraštė 5',
-       bold:  'Ryškus',
-       italic: 'Pasviras',
-       fontcolor: 'Teksto spalva',
-       backcolor: 'Fono spalva',
-       unorderedlist: 'Sąrašas',
-       orderedlist: 'Numeruotas sąrašas',
-       outdent: 'Pritraukti',
-       indent: 'Atitraukti',
-       cancel: 'Atšaukti',
-       insert: 'Įterpti',
-       save: 'Išsaugoti',
-       _delete: 'Ištrinti',
-       insert_table: 'Įtraukti lentelę...',
-       insert_row_above: 'Įterpti eilutę virš',
-       insert_row_below: 'Įterpti eilutę po',
-       insert_column_left: 'Įterpti stulpelį kairiau',
-       insert_column_right: 'Įterpti stulpelį dešiniau',
-       delete_column: 'Ištrinti stulpelį',
-       delete_row: 'Ištrinti eilutę',
-       delete_table: 'Ištrinti lentelę',
-       rows: 'Eilutės',
-       columns: 'Stulpeliai',
-       add_head: 'Įterpti rubriką',
-       delete_head: 'Ištrinti rubriką',
-       title: 'Pavadinimas',
-       image_position: 'Pozicija',
-       none: 'Nėra',
-       left: 'Kairė',
-       right: 'Dešinė',
-       image_web_link: 'Nuoroda į paveiksliuką',
-       text: 'Tekstas',
-       mailto: 'El. paštas',
-       web: 'Nuoroda',
-       video_html_code: 'Video įterpimo kodas',
-       file: 'Įterpti bylą...',
-       upload: 'Įkelti',
-       download: 'Parsisiųsti',
-       choose: 'Pasirinkti',
-       or_choose: 'Arba pasirinkti',
-       drop_file_here: 'Mesti failą čia',
-       align_left:     'Lygiuoti iš kairės',
-       align_center: 'Centruoti',
-       align_right: 'Lygiuoti iš dešinės',
-       align_justify: 'Išlyginti eilutes',
-       horizontalrule: 'Įterpti horizontalią liniją',
-       deleted: 'Ištrinta',
-       anchor: 'Žymė',
-       link_new_tab: 'Atidaryti nuorodą naujame lange',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/lv.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/lv.js
deleted file mode 100644 (file)
index 8533097..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['lv'] = {
-       html: 'HTML кods',
-       video: 'Video',
-       image: 'Attēls',
-       table: 'Tabula',
-       link: 'Saite',
-       link_insert: 'Iekļaut saiti ...',
-       link_edit: 'Edit link',
-       unlink: 'Noņemt saiti',
-       formatting: 'Stili',
-       paragraph: 'Vienkāršs teksts',
-       quote: 'Citāts',
-       code: 'Kods',
-       header1: 'Virsraksts 1',
-       header2: 'Virsraksts 2',
-       header3: 'Virsraksts 3',
-       header4: 'Virsraksts 4',
-       header5: 'Virsraksts 5',
-       bold:  'Pustrekns',
-       italic: 'Slīps',
-       fontcolor: 'Teksta krāsa',
-       backcolor: 'Fona krāsa',
-       unorderedlist: 'Parasts saraksts',
-       orderedlist: 'Numurēts saraksts',
-       outdent: 'Samazināt atkāpi',
-       indent: 'Palielināt atkāpi',
-       cancel: 'Atcelt',
-       insert: 'Iespraust',
-       save: 'Saglabāt',
-       _delete: 'Dzēst',
-       insert_table: 'Iespraust tabulu',
-       insert_row_above: 'Pievienot rindu no augšas',
-       insert_row_below: 'Pievienot rindu no apakšas',
-       insert_column_left: 'Pievienot stabiņu no kreisās puses',
-       insert_column_right: 'Pievienot stabiņu no labās puses',
-       delete_column: 'Dzēst stabiņu',
-       delete_row: 'Dzēst rindu',
-       delete_table: 'Dzēst tabulu',
-       rows: 'Rindas',
-       columns: 'Stabiņi',
-       add_head: 'Pievienot virsrakstu',
-       delete_head: 'Dzēst virsrakstu',
-       title: 'Uzvedne',
-       image_position: 'Аttēla apliece',
-       none: 'nav',
-       left: 'pa kreisi',
-       right: 'pa labi',
-       image_web_link: 'vai saite uz attēlu',
-       text: 'Teksts',
-       mailto: 'E-pasts',
-       web: 'URL',
-       video_html_code: 'Videoklipu kods',
-       file: 'Fails',
-       upload: 'Augšupielāde',
-       download: 'Lejupielāde',
-       choose: 'Izvēlieties',
-       or_choose: 'Vai izvēlieties',
-       drop_file_here: 'Vilkt failu uz šejieni',
-       align_left:     'Izlīdzināt pa labi',
-       align_center: 'Izlīdzināt pa kreisi',
-       align_right: 'Izlīdzināt pret centru',
-       align_justify: 'Izlīdzināt malas',
-       horizontalrule: 'Horizontāla līnija',
-       fullscreen: 'Pa visu ekrānu',
-    anchor: 'Anchor',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/mk.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/mk.js
deleted file mode 100644 (file)
index dbddc97..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['mk'] = {
-       html: 'HTML',
-       video: 'Внеси видео...',
-       image: 'Внеси слика...',
-       table: 'Табела',
-       link: 'Линк',
-       link_insert: 'Внеси линк ...',
-       link_edit: 'Edit link',
-       unlink: 'Избриши линк',
-       formatting: 'Форматирање',
-       paragraph: 'Параграф',
-       quote: 'Цитат',
-       code: 'Код',
-       header1: 'Заглавие 1',
-       header2: 'Заглавие 2',
-       header3: 'Заглавие 3',
-       header4: 'Заглавие 4',
-       header5: 'Заглавие 5',
-       bold:  'Болдирано',
-       italic: 'Италик',
-       fontcolor: 'Боја на фонт',
-       backcolor: 'Боја на позадина',
-       unorderedlist: 'Неподредена листа',
-       orderedlist: 'Подредена листа',
-       outdent: 'Нанадвор',
-       indent: 'Навнатре',
-       cancel: 'Откажи',
-       insert: 'Внеси',
-       save: 'Зачувај',
-       _delete: 'Избриши',
-       insert_table: 'Внеси табела...',
-       insert_row_above: 'Додај ред над',
-       insert_row_below: 'Додај ред под',
-       insert_column_left: 'Додај колона лево',
-       insert_column_right: 'Додај колона десно',
-       delete_column: 'Избриши колона',
-       delete_row: 'Избриши ред',
-       delete_table: 'Избриши табела',
-       rows: 'Редови',
-       columns: 'Колони',
-       add_head: 'Додај наслов',
-       delete_head: 'Избриши наслов',
-       title: 'Наслов',
-       image_position: 'Позиција',
-       none: 'Не позиционирај',
-       left: 'Лево',
-       right: 'Десно',
-       image_web_link: 'Слика од линк',
-       text: 'Текст',
-       mailto: 'Е-маил',
-       web: 'URL',
-       video_html_code: 'Код за видео',
-       file: 'Внеси фајл...',
-       upload: 'Качи на сервер',
-       download: 'Симни',
-       choose: 'Одбери',
-       or_choose: 'Или одбери',
-       drop_file_here: 'Спушти фајл тука',
-       align_left:     'Порамни текст на лево',
-       align_center: 'Центрирај текст',
-       align_right: 'Порамни текст на десно',
-       align_justify: 'Израмни текси',
-       horizontalrule: 'Внеси хоризонтална линија',
-       deleted: 'Избришано',
-       anchor: 'Локален линк',
-       link_new_tab: 'Отвори линк во нов таб',
-       underline: 'Подвлечи',
-       alignment: 'Порамнување',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/nl.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/nl.js
deleted file mode 100644 (file)
index ffba8c2..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['nl'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Afbeelding',
-       table: 'Tabel',
-       link: 'Link',
-       link_insert: 'Link invoegen...',
-       link_edit: 'Edit link',
-       unlink: 'Link ontkoppelen',
-       formatting: 'Stijlen',
-       paragraph: 'Paragraaf',
-       quote: 'Citaat',
-       code: 'Code',
-       header1: 'Kop 1',
-       header2: 'Kop 2',
-       header3: 'Kop 3',
-       header4: 'Kop 4',
-       header5: 'Kop 5',
-       bold:  'Vet',
-       italic: 'Cursief',
-       fontcolor: 'Tekstkleur',
-       backcolor: 'Achtergrondkleur',
-       unorderedlist: 'Ongeordende lijst',
-       orderedlist: 'Geordende lijst',
-       outdent: 'Uitspringen',
-       indent: 'Inspringen',
-       redo: 'Opnieuw maken',
-       undo: 'Ongedaan maken',
-       cut: 'Knippen',
-       cancel: 'Annuleren',
-       insert: 'Invoegen',
-       save: 'Opslaan',
-       _delete: 'Verwijderen',
-       insert_table: 'Tabel invoegen',
-       insert_row_above: 'Rij hierboven invoegen',
-       insert_row_below: 'Rij hieronder invoegen',
-       insert_column_left: 'Kolom links toevoegen',
-       insert_column_right: 'Kolom rechts toevoegen',
-       delete_column: 'Verwijder kolom',
-       delete_row: 'Verwijder rij',
-       delete_table: 'Verwijder tabel',
-       rows: 'Rijen',
-       columns: 'Kolommen',
-       add_head: 'Titel toevoegen',
-       delete_head: 'Titel verwijderen',
-       title: 'Titel',
-       image_position: 'Positie',
-       none: 'geen',
-       left: 'links',
-       right: 'rechts',
-       image_web_link: 'Afbeelding link',
-       text: 'Tekst',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Video embed code',
-       file: 'Bestand',
-       upload: 'Uploaden',
-       download: 'Downloaden',
-       choose: 'Kies',
-       or_choose: 'Of kies',
-       drop_file_here: 'Sleep bestand hier',
-       align_left:     'Links uitlijnen',
-       align_center: 'Centreren',
-       align_right: 'Rechts uitlijnen',
-       align_justify: 'Uitvullen',
-       horizontalrule: 'Horizontale lijn',
-       fullscreen: 'Volledig scherm',
-       deleted: 'Verwijderd',
-       anchor: 'Anker',
-       link_new_tab: 'Open link in nieuw tabblad',
-       underline: 'Onderstrepen',
-       alignment: 'Uitlijning',
-       filename: 'Naam (optioneel)',
-       edit: 'Bewerk',
-       center: 'Center'
-};
-})( jQuery );
-
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/no_NB.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/no_NB.js
deleted file mode 100644 (file)
index fa76a41..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-       $.Redactor.opts.langs['no_NB'] = {
-               html: 'HTML',
-               video: 'Sett inn video...',
-               image: 'Sett inn bilde...',
-               table: 'Tabell',
-               link: 'Link',
-               link_insert: 'Sett inn link...',
-               link_edit: 'Rediger link',
-               unlink: 'Fjern link',
-               formatting: 'Formatering',
-               paragraph: 'Avsnitt',
-               quote: 'Sitat',
-               code: 'Kode',
-               header1: 'Overskrift 1',
-               header2: 'Overskrift 2',
-               header3: 'Overskrift 3',
-               header4: 'Overskrift 4',
-               header5: 'Overskrift 5',
-               bold: 'Fet',
-               italic: 'Kursiv',
-               fontcolor: 'Tekstfarge',
-               backcolor: 'Bakgrunsfarge',
-               unorderedlist: 'Usortert liste',
-               orderedlist: 'Sortert liste',
-               outdent: 'Redusere innrykk',
-               indent: 'Innrykk',
-               cancel: 'Avbryt',
-               insert: 'Sett inn',
-               save: 'Lagre',
-               _delete: 'Slett',
-               insert_table: 'Sett inn tabell...',
-               insert_row_above: 'Legg til rad over',
-               insert_row_below: 'Legg til rad under',
-               insert_column_left: 'Legg til kolonne venstre',
-               insert_column_right: 'Legg til kolonne h&oslash;yre',
-               delete_column: 'Slett kolonne',
-               delete_row: 'Slett rad',
-               delete_table: 'Slett tabell',
-               rows: 'Rader',
-               columns: 'Kolonner',
-               add_head: 'Legg til tabellhode',
-               delete_head: 'Slett tabellhode',
-               title: 'Tittel',
-               image_position: 'Plassering',
-               none: 'Ingen',
-               left: 'Venstre',
-               right: 'H&oslash;yre',
-               image_web_link: 'Bildelink',
-               text: 'Tekst',
-               mailto: 'E-Post',
-               web: 'URL',
-               video_html_code: 'Kode for innbyggingsvideo',
-               file: 'Sett inn fil...',
-               upload: 'Last opp',
-               download: 'Last ned',
-               choose: 'Velg',
-               or_choose: 'Eller velg',
-               drop_file_here: 'Slipp filen her',
-               align_left: 'Venstrejuster',
-               align_center: 'Midtjuster',
-               align_right: 'H&oslash;yrejuster',
-               align_justify: 'Balansert',
-               horizontalrule: 'Sett inn horisontal linje',
-               deleted: 'Slettet',
-               anchor: 'Anker',
-               link_new_tab: '&Aring;pne link i ny fane',
-               underline: 'Understreking',
-               alignment: 'Justering',
-               filename: 'Filnavn (valgfritt)',
-               edit: 'Endre',
-               center: 'Midten'
-       };
-})(jQuery);
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/pl.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/pl.js
deleted file mode 100644 (file)
index af7a35a..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['pl'] = {
-       html: 'Źródło',
-       video: 'Wideo',
-       image: 'Obrazek',
-       table: 'Tabela',
-       link: 'Link',
-       link_insert: 'Wstaw link ...',
-       link_edit: 'Edit link',
-       unlink: 'Usuń link',
-       formatting: 'Style',
-       paragraph: 'Zwykły tekst',
-       quote: 'Cytat',
-       code: 'Kod źródłowy',
-       header1: 'Nagłówek 1',
-       header2: 'Nagłówek 2',
-       header3: 'Nagłówek 3',
-       header4: 'Nagłówek 4',
-       header5: 'Nagłówek 5',
-       bold:  'Pogrubiony',
-       italic: 'Pochylony',
-       fontcolor: 'Kolor tekstu',
-       backcolor: 'Kolor tła',
-       unorderedlist: 'Wypunktowanie',
-       orderedlist: 'Numeracja',
-       outdent: 'Zwiększ wcięcie',
-       indent: 'Zmniejsz wcięcie',
-       cancel: 'Anuluj',
-       insert: 'Wstaw',
-       save: 'Zachowaj',
-       _delete: 'Usuń',
-       insert_table: 'Wstaw tabele',
-       insert_row_above: 'Dodaj wiersz na górze',
-       insert_row_below: 'Dodaj wiersz na dole',
-       insert_column_left: 'Dodaj kolumnę po lewej',
-       insert_column_right: 'Dodaj kolumnę po prawej',
-       delete_column: 'Usuń kolumnę',
-       delete_row: 'Usuń wiersz',
-       delete_table: 'Usuń tabele',
-       rows: 'Wiersze',
-       columns: 'Kolumny',
-       add_head: 'Dodaj nagłówek',
-       delete_head: 'Usuń nagłówek',
-       title: 'Wskazówka',
-       image_position: 'Obramowanie',
-       none: 'nie ma',
-       left: 'od lewej',
-       right: 'od prawej',
-       image_web_link: 'albo link do obrazku',
-       text: 'Tekst',
-       mailto: 'Poczta e-mail',
-       web: 'URL',
-       video_html_code: 'Kod źródłowy pliku wideo',
-       file: 'Plik',
-       upload: 'Wgraj na serwer',
-       download: 'Pobierz',
-       choose: 'Wybierz z listy',
-       or_choose: 'lub wybierz',
-       drop_file_here: 'Przenieś plik tutaj',
-       align_left:     'Tekst do lewej',
-       align_center: 'Wyśrodkuj',
-       align_right: 'Tekst do prawej',
-       align_justify: 'Wyjustuj',
-       horizontalrule: 'Linia pozioma',
-       fullscreen: 'Pełny ekran',
-       deleted: 'Usunięty',
-    anchor: 'Kotwica',
-       link_new_tab: 'Otwórz link w nowym oknie',
-       underline: 'Pokdreślony',
-       alignment: 'Wyrównanie',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/pt_br.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/pt_br.js
deleted file mode 100644 (file)
index e987143..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['pt_br'] = {
-       html: 'Ver HTML',
-       video: 'V&iacute;deo',
-       image: 'Imagem',
-       table: 'Tabela',
-       link: 'Link',
-       link_insert: 'Inserir link...',
-       link_edit: 'Edit link',
-       unlink: 'Remover link',
-       formatting: 'Estilos',
-       paragraph: 'Par&aacute;grafo',
-       quote: 'Cita&ccedil;&atilde;o',
-       code: 'C&oacute;digo',
-       header1: 'T&iacute;tulo 1',
-       header2: 'T&iacute;tulo 2',
-       header3: 'T&iacute;tulo 3',
-       header4: 'T&iacute;tulo 4',
-       header5: 'T&iacute;tulo 5',
-       bold:  'Negrito',
-       italic: 'It&aacute;lico',
-       fontcolor: 'Cor da fonte',
-       backcolor: 'Cor do fundo',
-       unorderedlist: 'Lista n&atilde;o ordenada',
-       orderedlist: 'Lista ordenada',
-       outdent: 'Remover identa&ccedil;&atilde;o',
-       indent: 'Identar',
-       cancel: 'Cancelar',
-       insert: 'Inserir',
-       save: 'Salvar',
-       _delete: 'Remover',
-       insert_table: 'Inserir tabela',
-       add_cell: 'Adicionar coluna',
-       delete_cell: 'Remover coluna',
-       add_row: 'Adicionar linha',
-       delete_row: 'Remover linha',
-       thead: 'Cabe&ccedil;alho',
-       delete_table: 'Remover tabela',
-       insert_row_above: 'Adicionar linha acima',
-       insert_row_below: 'Adicionar linha abaixo',
-       insert_column_left: 'Adicionar coluna &agrave; esquerda',
-       insert_column_right: 'Adicionar coluna da direita',
-       delete_column: 'Remover Coluna',
-       delete_row: 'Remover linha',
-       delete_table: 'Remover tabela',
-       rows: 'Linhas',
-       columns: 'Colunas',
-       add_head: 'Adicionar cabe&ccedil;alho',
-       delete_head: 'Remover cabe&ccedil;alho',
-       title: 'T&iacute;tulo',
-       image_position: 'Posi&ccedil;&atilde;o',
-       none: 'Nenhum',
-       left: 'Esquerda',
-       right: 'Direita',
-       image_web_link: 'Link para uma imagem',
-       text: 'Texto',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'C&oacute;digo de incorpora&ccedil;&atilde;o',
-       file: 'Arquivo',
-       upload: 'Upload',
-       download: 'Download',
-       choose: 'Escolha',
-       or_choose: 'Ou escolha',
-       drop_file_here: 'Arraste um arquivo at&eacute; aqui',
-       align_left:     'Alinhar a esquerda',
-       align_center: 'Centralizar',
-       align_right: 'Alinhar a direita',
-       align_justify: 'Justificar',
-       horizontalrule: 'Linha horizontal',
-       fullscreen: 'Tela cheia',
-       deleted: 'Removido',
-    anchor: '&Acirc;nchora',
-       link_new_tab: 'Abrir link em nova janela/aba',
-       underline: 'Underline',
-       alignment: 'Alinhamento',
-       filename: 'Nome (opcional)',
-       edit: 'Editar',
-       center: 'Center'
-};
-})( jQuery );
-
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/pt_pt.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/pt_pt.js
deleted file mode 100644 (file)
index a3e54d1..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['pt_pt'] = {
-       html: 'HTML',
-       video: 'Inserir Video...',
-       image: 'Inserir Imagem...',
-       table: 'Tabela',
-       link: 'Hiperligação',
-       link_insert: 'Inserir Hiperligação ...',
-       link_edit: 'Edit link',
-       unlink: 'Remover Hiperligação',
-       formatting: 'Formatação',
-       paragraph: 'Parágrafo',
-       quote: 'Citar',
-       code: 'Código',
-       header1: 'Cabeçalho 1',
-       header2: 'Cabeçalho 2',
-       header3: 'Cabeçalho 3',
-       header4: 'Cabeçalho 4',
-       header5: 'Cabeçalho 5',
-       bold:  'Negrito',
-       italic: 'Itálico',
-       fontcolor: 'Cor da Fonte',
-       backcolor: 'Cor de Fundo',
-       unorderedlist: 'Lista Não Ordenada',
-       orderedlist: 'Lista Ordenada',
-       outdent: 'Remover Identação',
-       indent: 'Identar',
-       cancel: 'Cancelar',
-       insert: 'Inserir',
-       save: 'Guardar',
-       _delete: 'Eliminar',
-       insert_table: 'Inserir Tabela...',
-       insert_row_above: 'Adicionar Linha Acima',
-       insert_row_below: 'Adicionar Linha Abaixo',
-       insert_column_left: 'Adicionar Coluna à Esquerda',
-       insert_column_right: 'Adicionar Coluna à Direita',
-       delete_column: 'Eliminar Coluna',
-       delete_row: 'Eliminar Linha',
-       delete_table: 'Eliminar Tabela',
-       rows: 'Linhas',
-       columns: 'Colunas',
-       add_head: 'Adicionar Cabeçalho',
-       delete_head: 'Eliminar Cabeçalho',
-       title: 'Título',
-       image_position: 'Posição',
-       none: 'Nenhum',
-       left: 'Esquerda',
-       right: 'Direita',
-       image_web_link: 'Url de Imagem',
-       text: 'Texto',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Código de Incorporação de Vídeo',
-       file: 'Inserir Ficheiro...',
-       upload: 'Upload',
-       download: 'Download',
-       choose: 'Escolha',
-       or_choose: 'Ou escolha',
-       drop_file_here: 'Largue o ficheiro aqui',
-       align_left:     'Alinhar à esquerda',
-       align_center: 'Centrar',
-       align_right: 'Alinhar à direita',
-       align_justify: 'Justificar',
-       horizontalrule: 'Inserir Linha Horizontal',
-       deleted: 'Eliminado',
-       anchor: 'Âncora',
-       link_new_tab: 'Abrir hiperligação em novo separador',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ro.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ro.js
deleted file mode 100644 (file)
index f17b56a..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ro'] = {
-       html: 'HTML',
-       video: 'Adauga video...',
-       image: 'Adauga imagine...',
-       table: 'Tabel',
-       link: 'Legatura web',
-       link_insert: 'Adauga legatura web...',
-       link_edit: 'Edit link',
-       unlink: 'Elimina legatura web',
-       formatting: 'Formatare',
-       paragraph: 'Paragraf',
-       quote: 'Citat',
-       code: 'Cod',
-       header1: 'Titlu 1',
-       header2: 'Titlu 2',
-       header3: 'Titlu 3',
-       header4: 'Titlu 4',
-       header5: 'Titlu 5',
-       bold:  'Aldin (Bold)',
-       italic: 'Cursiv (Italic)',
-       fontcolor: 'Culoare font',
-       backcolor: 'Culoare de fundal',
-       unorderedlist: 'Lista neordonata',
-       orderedlist: 'Lista ordonata',
-       outdent: 'Redu indentarea',
-       indent: 'Mareste indentarea',
-       cancel: 'Renunta',
-       insert: 'Adauga',
-       save: 'Salveaza',
-       _delete: 'Sterge',
-       insert_table: 'Adauga tabel...',
-       insert_row_above: 'Adauga linie deasupra',
-       insert_row_below: 'Adauga linie dedesupt',
-       insert_column_left: 'Adauga coloana la stanga',
-       insert_column_right: 'Adauga coloana la dreapta',
-       delete_column: 'Sterge coloana',
-       delete_row: 'Sterge linie',
-       delete_table: 'Sterge tabela',
-       rows: 'Linii',
-       columns: 'Coloane',
-       add_head: 'Adauga cap tabel',
-       delete_head: 'Sterge cap tabel',
-       title: 'Titlu',
-       image_position: 'Pozitie',
-       none: 'None',
-       left: 'Stanga',
-       right: 'Dreapta',
-       image_web_link: 'Legatura web imagine',
-       text: 'Text',
-       mailto: 'Adresa email',
-       web: 'Legatura web',
-       video_html_code: 'Cod adaugare video',
-       file: 'Adauga fisier...',
-       upload: 'Incarca',
-       download: 'Descarca',
-       choose: 'Alege',
-       or_choose: 'sau alege din computer',
-       drop_file_here: 'Trage fisierele aici',
-       align_left:     'Aliniere la stanga',
-       align_center: 'Centrat',
-       align_right: 'Aliniere la dreapta',
-       align_justify: 'Aliniere la margini',
-       horizontalrule: 'Adauga rigla orizontala',
-       fullscreen: 'Afisare pe tot ecranul',
-       deleted: 'Taiat (Sters)',
-       anchor: 'Ancora',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ru.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ru.js
deleted file mode 100644 (file)
index ed3980f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ru'] = {
-       html: 'Код',
-       video: 'Видео',
-       image: 'Изображение',
-       table: 'Таблица',
-       link: 'Ссылка',
-       link_insert: 'Вставить ссылку ...',
-       link_edit: 'Изменить ссылку',
-       unlink: 'Удалить ссылку',
-       formatting: 'Форматирование',
-       paragraph: 'Обычный текст',
-       quote: 'Цитата',
-       code: 'Код',
-       header1: 'Заголовок 1',
-       header2: 'Заголовок 2',
-       header3: 'Заголовок 3',
-       header4: 'Заголовок 4',
-       header5: 'Заголовок 5',
-       bold:  'Полужирный',
-       italic: 'Наклонный',
-       fontcolor: 'Цвет текста',
-       backcolor: 'Заливка текста',
-       unorderedlist: 'Обычный список',
-       orderedlist: 'Нумерованный список',
-       outdent: 'Уменьшить отступ',
-       indent: 'Увеличить отступ',
-       cancel: 'Отменить',
-       insert: 'Вставить',
-       save: 'Сохранить',
-       _delete: 'Удалить',
-       insert_table: 'Вставить таблицу',
-       insert_row_above: 'Добавить строку сверху',
-       insert_row_below: 'Добавить строку снизу',
-       insert_column_left: 'Добавить столбец слева',
-       insert_column_right: 'Добавить столбец справа',
-       delete_column: 'Удалить столбец',
-       delete_row: 'Удалить строку',
-       delete_table: 'Удалить таблицу',
-       rows: 'Строки',
-       columns: 'Столбцы',
-       add_head: 'Добавить заголовок',
-       delete_head: 'Удалить заголовок',
-       title: 'Подсказка',
-       image_position: 'Обтекание текстом',
-       none: 'Нет',
-       left: 'Cлева',
-       right: 'Cправа',
-       image_web_link: 'Cсылка на изображение',
-       text: 'Текст',
-       mailto: 'Эл. почта',
-       web: 'URL',
-       video_html_code: 'Код видео ролика',
-       file: 'Файл',
-       upload: 'Загрузить',
-       download: 'Скачать',
-       choose: 'Выбрать',
-       or_choose: 'Или выберите',
-       drop_file_here: 'Перетащите файл сюда',
-       align_left:     'По левому краю',
-       align_center: 'По центру',
-       align_right: 'По правому краю',
-       align_justify: 'Выровнять текст по ширине',
-       horizontalrule: 'Горизонтальная линейка',
-       fullscreen: 'Во весь экран',
-       deleted: 'Зачеркнутый',
-       anchor: 'Якорь',
-       link_new_tab: 'Открывать в новой вкладке',
-       underline: 'Подчеркнутый',
-       alignment: 'Выравнивание',
-       filename: 'Название (необязательно)',
-       edit: 'Ред.',
-       center: 'По центру'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/sk.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/sk.js
deleted file mode 100644 (file)
index 675ee0c..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['sk'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Obrázok',
-       table: 'Tabulka',
-       link: 'Odkaz',
-       link_insert: 'Vložiť odkaz ...',
-       link_edit: 'Edit link',
-       unlink: 'Odstrániť odkaz',
-       formatting: 'Štýl',
-       paragraph: 'Odstavec',
-       quote: 'Citácia',
-       code: 'Kód',
-       header1: 'Nadpis 1',
-       header2: 'Nadpis 2',
-       header3: 'Nadpis 3',
-       header4: 'Nadpis 4',
-       header5: 'Nadpis 5',
-       bold:  'Tučné',
-       italic: 'Kurzíva',
-       fontcolor: 'Farba písma',
-       backcolor: 'Farba pozadia',
-       unorderedlist: 'Zoznam s odrážkami',
-       orderedlist: 'Číslovaný zoznam',
-       outdent: 'Zmenšiť odsadenie',
-       indent: 'Zväčšiť odsadenie',
-       cancel: 'Zrušiť',
-       insert: 'Vložiť',
-       save: 'Uložiť',
-       _delete: 'Smazať',
-       insert_table: 'Vložiť tabulku',
-       insert_row_above: 'Pridať riadok hore',
-       insert_row_below: 'Pridať riadok dole',
-       insert_column_left: 'Pridať stĺpec vľavo',
-       insert_column_right: 'Pridať stľpec vpravo',
-       delete_column: 'Zmazať stľpec',
-       delete_row: 'Zmazať riadok',
-       delete_table: 'Zmazať tabulku',
-       rows: 'Riadky',
-       columns: 'Stľpce',
-       add_head: 'Pridať záhlavie',
-       delete_head: 'Zmazať záhlavie',
-       title: 'Titulok',
-       image_position: 'Pozícia',
-       none: 'žiadny',
-       left: 'vľavo',
-       right: 'vpravo',
-       image_web_link: 'Odkaz na obrázok',
-       text: 'Text',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Kód pre vloženie videa na stránku',
-       file: 'Súbor',
-       upload: 'Nahrát',
-       download: 'Stiahnúť',
-       choose: 'Vybrať',
-       or_choose: 'alebo',
-       drop_file_here: 'Pretiahnite súbor sem',
-       align_left:     'Zarovnať vľavo',
-       align_center: 'Zarovnať na stred',
-       align_right: 'Zarovnať vpravo',
-       align_justify: 'Zarovnať do bloku',
-       horizontalrule: 'Vodorovná  čiara',
-       fullscreen: 'Celá obrazovka',
-       deleted: 'Prečiarknuté',
-       anchor: 'Záložka',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/sl.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/sl.js
deleted file mode 100644 (file)
index 13050ef..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['sl'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Slika',
-       table: 'Tabela',
-       link: 'Povezava',
-       link_insert: 'Vstavi povezavo...',
-       link_edit: 'Edit link',
-       unlink: 'Odstrani povezavo',
-       formatting: 'Stili',
-       paragraph: 'Odstavek',
-       quote: 'Citat',
-       code: 'HTML koda',
-       header1: 'Naslov 1',
-       header2: 'Naslov 2',
-       header3: 'Naslov 3',
-       header4: 'Naslov 4',
-       header5: 'Naslov 5',
-       bold: 'Odebeljeno',
-       italic: 'Poševno',
-       fontcolor: 'Barva pisave',
-       backcolor: 'Barva ozadja',
-       unorderedlist: 'Nesortirana lista',
-       orderedlist: 'Sortirana lista',
-       outdent: 'Pomik levo',
-       indent: 'Pomik desno',
-       redo: 'Naprej',
-       undo: 'Nazaj',
-       cut: 'Izreži',
-       cancel: 'Prekini',
-       insert: 'Vstavi',
-       save: 'Shrani',
-       _delete: 'Izbriši',
-       insert_table: 'Vstavi tabelo',
-       insert_row_above: 'Dodaj vrstico nad',
-       insert_row_below: 'Dodaj vrstico pod',
-       insert_column_left: 'Dodaj stolpec levo',
-       insert_column_right: 'Dodaj stolpec desno',
-       delete_column: 'Izbriši stolpec',
-       delete_row: 'Izbriši vrstivo',
-       delete_table: 'Izbriši tabelo',
-       rows: 'Vrstic',
-       columns: 'Stolpcev',
-       add_head: 'Dodaj naslov',
-       delete_head: 'Odstrani naslov',
-       title: 'Naslov',
-       image_position: 'Poravnava',
-       none: 'brez',
-       left: 'levo',
-       right: 'desno',
-       image_web_link: 'Povezava do slike',
-       text: 'Besedilo',
-       mailto: 'Email',
-       web: 'WEB povezava',
-       video_html_code: 'Koda videa',
-       file: 'Datoteka',
-       upload: 'Pošalji',
-       download: 'Prenesi',
-       choose: 'Izberi',
-       or_choose: 'ali izberi',
-       drop_file_here: 'Povleci datoteko sem',
-       align_left:     'Poravnaj levo',
-       align_center: 'Centriraj',
-       align_right: 'Poravnaj desno',
-       align_justify: 'Od roba do roba',
-       horizontalrule: 'Horizontalna crta',
-       fullscreen: 'Čez cel ekran',
-       deleted: 'Izbrisano',
-       anchor: 'Sidro',
-       link_new_tab: 'Odpri povezavo v novem oknu/tabu',
-       underline: 'Podčrtano',
-       alignment: 'Poravnava',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/sq.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/sq.js
deleted file mode 100644 (file)
index 6a39a17..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['sq'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Fotografi',
-       table: 'Tabel&euml;',
-       link: 'Link',
-       link_insert: 'Lidh linq ...',
-       link_edit: 'Edit link',
-       unlink: 'Hiq linkun',
-       formatting: 'Stilet',
-       paragraph: 'Paragraf',
-       quote: 'Kuot&euml;',
-       code: 'Kod',
-       header1: 'Header 1',
-       header2: 'Header 2',
-       header3: 'Header 3',
-       header4: 'Header 4',
-       header5: 'Header 5',
-       bold:  'Te trasha / Bold',
-       italic: 'Kursive / Italic',
-       fontcolor: 'Ngjyra e shkronjave',
-       backcolor: 'Ngjyra e mbrapavis&euml; s&euml; shkronjave',
-       unorderedlist: 'Liste pa renditje',
-       orderedlist: 'Liste me renditje',
-       outdent: 'Outdent',
-       indent: 'Indent',
-       redo: 'Rib&euml;j',
-       undo: 'Zhb&euml;j',
-       cut: 'Cut',
-       cancel: 'Anulo',
-       insert: 'Insert',
-       save: 'Ruaje',
-       _delete: 'Fshije',
-       insert_table: 'Shto tabel&euml;',
-       insert_row_above: 'Shto rresht sip&euml;r',
-       insert_row_below: 'Shto rresht p&euml;rfundi',
-       insert_column_left: 'Shto kolon&euml; majtas',
-       insert_column_right: 'Shto kolon&euml; djathtas',
-       delete_column: 'Fshije kolon&euml;n',
-       delete_row: 'Fshije rreshtin',
-       delete_table: 'Fshije tabel&euml;n',
-       rows: 'Rreshta',
-       columns: 'Kolona',
-       add_head: 'Shto titujt e tabel&euml;s',
-       delete_head: 'Fshije titujt e tabel&euml;s',
-       title: 'Titulli',
-       image_position: 'Pozita',
-       none: 'Normale',
-       left: 'Majtas',
-       right: 'Djathtas',
-       image_web_link: 'Linku i fotografis&euml; n&euml; internet',
-       text: 'Teksti',
-       mailto: 'Email',
-       web: 'URL',
-       video_html_code: 'Video embed code',
-       file: 'Fajll',
-       upload: 'Ngarko',
-       download: 'Shkarko',
-       choose: 'Zgjedh',
-       or_choose: 'Ose zgjedh',
-       drop_file_here: 'Gjuaje fajllin k&euml;tu',
-       align_left:     'Rreshtoje majtas',
-       align_center: 'Rreshtoje n&euml; mes',
-       align_right: 'Rreshtoje djathtas',
-       align_justify: 'Rreshtoje t&euml; gjithin njejt',
-       horizontalrule: 'Viz&euml; horizontale',
-       fullscreen: 'Pamje e plot&euml;',
-       deleted: 'E fshir&euml;',
-       anchor: 'Anchor',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/sr-cir.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/sr-cir.js
deleted file mode 100644 (file)
index 64520a8..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['sr-cir'] = {
-       html: 'ХТМЛ',
-       video: 'Убаци видео',
-       image: 'Убаци фотографију',
-       table: 'Табела',
-       link: 'Веза',
-       link_insert: 'Убаци везу ...',
-       link_edit: 'Edit link',
-       unlink: 'Уклони везу',
-       formatting: 'Стилови',
-       paragraph: 'Параграф',
-       quote: 'Цитат',
-       code: 'Изворни код',
-       header1: 'Заглавље 1',
-       header2: 'Заглавље 2',
-       header3: 'Заглавље 3',
-       header4: 'Заглавље 4',
-       header5: 'Заглавље 5',
-       bold: 'Подебљај',
-       italic: 'Накоси',
-       fontcolor: 'Боја слова',
-       backcolor: 'Боја позадине',
-       unorderedlist: 'Несортирана листа',
-       orderedlist: 'Сортирана листа',
-       outdent: 'Извуци',
-       indent: 'Увуци',
-       redo: 'Корак напред',
-       undo: 'Корак назад',
-       cut: 'Изрежи',
-       cancel: 'Одустани',
-       insert: 'Убаци',
-       save: 'Сачувај',
-       _delete: 'Избриши',
-       insert_table: 'Убаци табелу',
-       insert_row_above: 'Додај ред изнад',
-       insert_row_below: 'Додај ред испод',
-       insert_column_left: 'Додај колону лево',
-       insert_column_right: 'Додај колону десно',
-       delete_column: 'Избриши колону',
-       delete_row: 'Избриши ред',
-       delete_table: 'Избриши табелу',
-       rows: 'Ред',
-       columns: 'Колона',
-       add_head: 'Додај заглавље',
-       delete_head: 'Уклони заглавље',
-       title: 'Наслов',
-       image_position: 'Позиција',
-       none: 'Без',
-       left: 'Лево',
-       right: 'Десно',
-       image_web_link: 'Веб адреса фотографије',
-       text: 'Текст',
-       mailto: 'Емаил',
-       web: 'Веб адреса',
-       video_html_code: 'Видео код',
-       file: 'Датотека',
-       upload: 'Пошаљи',
-       download: 'Преузми',
-       choose: 'Одабери',
-       or_choose: 'Или одабери',
-       drop_file_here: 'Превуци датотеку овде',
-       align_left:     'Поравнај лево',
-       align_center: 'Центрирај',
-       align_right: 'Поравнај десно',
-       align_justify: 'Од руба до руба',
-       horizontalrule: 'Убаци хоризонталну линију',
-       fullscreen: 'Прикажи преко читавог екрана',
-       deleted: 'Избрисано',
-       anchor: 'Сидро',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/sr-lat.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/sr-lat.js
deleted file mode 100644 (file)
index fc216e6..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['sr-lat'] = {
-       html: 'HTML',
-       video: 'Ubaci video',
-       image: 'Ubaci fotografiju',
-       table: 'Tabela',
-       link: 'Veza',
-       link_insert: 'Ubaci vezu ...',
-       link_edit: 'Edit link',
-       unlink: 'Ukloni vezu',
-       formatting: 'Stilovi',
-       paragraph: 'Paragraf',
-       quote: 'Citat',
-       code: 'Izvorni kod',
-       header1: 'Zaglavlje 1',
-       header2: 'Zaglavlje 2',
-       header3: 'Zaglavlje 3',
-       header4: 'Zaglavlje 4',
-       header5: 'Zaglavlje 5',
-       bold: 'Podebljaj',
-       italic: 'Nakosi',
-       fontcolor: 'Boja slova',
-       backcolor: 'Boja pozadine',
-       unorderedlist: 'Nesortirana lista',
-       orderedlist: 'Sortirana lista',
-       outdent: 'Izvuci',
-       indent: 'Uvuci',
-       redo: 'Korak napred',
-       undo: 'Korak nazad',
-       cut: 'Izreži',
-       cancel: 'Odustani',
-       insert: 'Ubaci',
-       save: 'Sačuvaj',
-       _delete: 'Izbriši',
-       insert_table: 'Ubaci tabelu',
-       insert_row_above: 'Dodaj red iznad',
-       insert_row_below: 'Dodaj red ispod',
-       insert_column_left: 'Dodaj kolonu levo',
-       insert_column_right: 'Dodaj kolonu desno',
-       delete_column: 'Izbriši kolonu',
-       delete_row: 'Izbriši red',
-       delete_table: 'Izbriši tabelu',
-       rows: 'Red',
-       columns: 'Kolona',
-       add_head: 'Dodaj zaglavlje',
-       delete_head: 'Ukloni zaglavlje',
-       title: 'Naslov',
-       image_position: 'Pozicija',
-       none: 'Bez',
-       left: 'Levo',
-       right: 'Desno',
-       image_web_link: 'Web adresa fotografije',
-       text: 'Tekst',
-       mailto: 'Email',
-       web: 'Web adresa',
-       video_html_code: 'Video kod',
-       file: 'Datoteka',
-       upload: 'Pošalji',
-       download: 'Preuzmi',
-       choose: 'Odaberi',
-       or_choose: 'Ili odaberi',
-       drop_file_here: 'Prevuci datoteku ovde',
-       align_left:     'Poravnaj levo',
-       align_center: 'Centriraj',
-       align_right: 'Poravnaj desno',
-       align_justify: 'Od ruba do ruba',
-       horizontalrule: 'Ubaci horizontalnu liniju',
-       fullscreen: 'Prikaz preko čitavog ekrana',
-       deleted: 'Izbrisano',
-       anchor: 'Sidro',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/sv.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/sv.js
deleted file mode 100644 (file)
index 50712af..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(function ($) {
-    $.Redactor.opts.langs['sv'] = {
-        _delete: 'Tag Bort',
-        add_head: 'Lägg Till Tabellhuvud',
-        align_center: 'Centerjustera',
-        align_justify: 'Marginaljustering',
-        align_left: 'Vänsterjustera',
-        align_right: 'Högerjustera',
-        alignment: 'Justering',
-        anchor: 'Ankare',
-        backcolor: 'Bakgrundsfärg',
-        bold:  'Fet',
-        cancel: 'Ångra',
-        choose: 'Välj',
-        code: 'Kod',
-        columns: 'Kolumner',
-        delete_column: 'Tag Bort Kolumn',
-        delete_head: 'Tag Bort Tabellhuvud',
-        delete_row: 'Tag Bort Rad',
-        delete_table: 'Tag Bort Tabell',
-        deleted: 'Överstruken',
-        download: 'Nedladdning',
-        drop_file_here: 'Släpp Fil Här',
-        edit: 'Ändra',
-        file: 'Infoga Fil...',
-        filename: 'Namn (valfritt)',
-        fontcolor: 'Typsnittsfärg',
-        formatting: 'Formatering',
-        fullscreen: 'Fullskärm',
-        header1: 'Rubrik 1',
-        header2: 'Rubrik 2',
-        header3: 'Rubrik 3',
-        header4: 'Rubrik 4',
-        header5: 'Rubrik 5',
-        horizontalrule: 'Infoga Horisontell Linje',
-        html: 'HTML',
-        image: 'Infoga Bild...',
-        image_position: 'Position',
-        image_web_link: 'Bildlänk',
-        indent: 'Öka indentering',
-        insert: 'Infoga',
-        insert_column_left: 'Lägg Till Vänsterkolumn',
-        insert_column_right: 'Lägg Till Högerkolumn',
-        insert_row_above: 'Lägg Till Rad Ovanför',
-        insert_row_below: 'Lägg Till Rad Under',
-        insert_table: 'Infoga Tabell...',
-        italic: 'Kursiv',
-        left: 'Vänster',
-        link: 'Länk',
-        link_edit: 'Ändra länk',
-        link_insert: 'Infoga Länk...',
-        link_new_tab: 'Öppna länk i ny flik',
-        mailto: 'E-post',
-        none: 'Ingen',
-        or_choose: 'Eller Välj',
-        orderedlist: 'Ordnad Lista',
-        outdent: 'Minska Indentering',
-        paragraph: 'Paragraf',
-        quote: 'Citat',
-        right: 'Höger',
-        rows: 'Rader',
-        save: 'Spara',
-        table: 'Tabell',
-        text: 'Text',
-        title: 'Titel',
-        underline: 'Understryk',
-        unlink: 'Tag Bort Länk',
-        unorderedlist: 'Oordnad Lista',
-        upload: 'Uppladdning',
-        video: 'Infoga Video...',
-        video_html_code: 'Kod För Inbäddad Video',
-        web: 'Webbadress',
-               center: 'Center'
-    };
-})( jQuery );
-
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/th.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/th.js
deleted file mode 100644 (file)
index fd9f42c..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['th'] = {
-       html: 'HTML',
-       video: 'ใส่วีดีโอ...',
-       image: 'แนบรูป...',
-       table: 'ตาราง',
-       link: 'ลิงค์',
-       link_insert: 'ใส่ลิงค์ ...',
-       link_edit: 'Edit link',
-       unlink: 'ลบลิงค์',
-       formatting: 'รูปแบบ',
-       paragraph: 'ย่อหน้า',
-       quote: 'ข้อความ',
-       code: 'โค้ด',
-       header1: 'หัวข้อ 1',
-       header2: 'หัวข้อ 2',
-       header3: 'หัวข้อ 3',
-       header4: 'หัวข้อ 4',
-       header5: 'หัวข้อ 5',
-       bold:  'ตัวหน้า',
-       italic: 'ตัวเอียง',
-       fontcolor: 'สีตัวอักษร',
-       backcolor: 'สีพื้นหลัง',
-       unorderedlist: 'รายการแบบไม่มีลำดับ',
-       orderedlist: 'รายการแบบมีลำดับ',
-       outdent: 'เลื่อนออก',
-       indent: 'เลื่อนเข้า',
-       cancel: 'ยกเลิก',
-       insert: 'แนบ',
-       save: 'บันทึก',
-       _delete: 'ลบ',
-       insert_table: 'ใส่ตาราง...',
-       insert_row_above: 'แทรกแถวใหม่ด้านบน',
-       insert_row_below: 'แทรกแถวใหม่ด้านล่าง',
-       insert_column_left: 'แทรกคอลัมน์ทางซ้าย',
-       insert_column_right: 'แทรกคอลัมน์ทางขวา',
-       delete_column: 'ลบคอลัมน์',
-       delete_row: 'ลบแถว',
-       delete_table: 'ลบตาราง',
-       rows: 'แถว',
-       columns: 'คอลัมน์',
-       add_head: 'ใส่หัวข้อ',
-       delete_head: 'ลบหัวข้อ',
-       title: 'หัวเรื่อง',
-       image_position: 'ตำแหน่งรูป',
-       none: 'ปรกติ',
-       left: 'ซ้าย',
-       right: 'ขวา',
-       image_web_link: 'ลิงค์รูปภาพ',
-       text: 'ตัวอักษร',
-       mailto: 'อีเมล',
-       web: 'เว็บไซต์',
-       video_html_code: 'โค้ดวีดีโอ',
-       file: 'แนบไฟล์...',
-       upload: 'อัพโหลด',
-       download: 'ดาวน์โหลด',
-       choose: 'เลือก',
-       or_choose: 'หรือเลือกไฟล์',
-       drop_file_here: 'ลากไฟล์มาวางที่นี่',
-       align_left:     'จัดตัวอักษรชิดซ้าย',
-       align_center: 'จัดตัวอักษรกึ่งกลาง',
-       align_right: 'จัดตัวอักษรชิดขวา',
-       align_justify: 'จัดตัวอักษรแบบพอดีกรอบ',
-       horizontalrule: 'ใส่เส้นแบ่งหน้า',
-       deleted: 'ขีดออก',
-       anchor: 'เชื่อมโยง',
-       link_new_tab: 'เปิดลิงค์ในแทปใหม่',
-       underline: 'เส้นใต้',
-       alignment: 'การจัดวาง',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/tr.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/tr.js
deleted file mode 100644 (file)
index 4cce63d..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['tr'] = {
-       html: 'HTML',
-       video: 'Video',
-       image: 'Görsel',
-       table: 'Tablo',
-       link: 'Bağlantı',
-       link_insert: 'Bağlantı Ekle ...',
-       link_edit: 'Bağlantıyı Düzenle',
-       unlink: 'Bağlantı Kaldır',
-       formatting: 'Biçimlendirme',
-       paragraph: 'Paragraf',
-       quote: 'Alıntı',
-       code: 'Kod',
-       header1: 'Başlık 1',
-       header2: 'Başlık 2',
-       header3: 'Başlık 3',
-       header4: 'Başlık 4',
-       header5: 'Başlık 5',
-       bold:  'Kalın',
-       italic: 'Eğik',
-       fontcolor: 'Yazı rengi',
-       backcolor: 'Arkaplan rengi',
-       unorderedlist: 'Sırasız liste',
-       orderedlist: 'Sıralı liste',
-       outdent: 'Girintiyi azalt',
-       indent: 'Girintiyi artır',
-       cancel: 'İptal',
-       insert: 'Ekle',
-       save: 'Kaydet',
-       _delete: 'Sil',
-       insert_table: 'Tablo ekle',
-       insert_row_above: 'Üste satır ekle',
-       insert_row_below: 'Alta satır ekle',
-       insert_column_left: 'Sola sütun ekle',
-       insert_column_right: 'Sağa sütun ekle',
-       delete_column: 'Sütun sil',
-       delete_row: 'Satır sil',
-       delete_table: 'Tablo sil',
-       rows: 'Satırlar',
-       columns: 'Sütunlar',
-       add_head: 'Başlık ekle',
-       delete_head: 'Başlık sil',
-       title: 'Başlık',
-       image_position: 'Pozisyon',
-       none: 'hiçbiri',
-       left: 'sol',
-       right: 'sağ',
-       image_web_link: 'Görselin web bağlantısı',
-       text: 'Metin',
-       mailto: 'E-Posta',
-       web: 'URL',
-       video_html_code: 'Video embed kodu',
-       file: 'Dosya',
-       upload: 'Yükle',
-       download: 'İndir',
-       choose: 'Seç',
-       or_choose: 'Veya seç',
-       drop_file_here: 'Dosyayı buraya bırak',
-       align_left:     'Sola hizala',
-       align_center: 'Ortala',
-       align_right: 'Sağa hizala',
-       align_justify: 'Satır uzunluğuna ayarla',
-       horizontalrule: 'Yatay çizgi',
-       fullscreen: 'Tam ekran',
-       deleted: 'Silindi',
-       anchor: 'Çapa',
-       link_new_tab: 'Bağlantıyı yeni pencerede aç',
-       underline: 'Altı çizili',
-       alignment: 'Hizalama',
-       filename: 'Dosya Adı (isteğe bağlı)',
-       edit: 'Düzenle',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/ua.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/ua.js
deleted file mode 100644 (file)
index 157fe57..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['ua'] = {
-       html: 'Код',
-       video: 'Відео',
-       image: 'Зображення',
-       table: 'Таблиця',
-       link: 'Посилання',
-       link_insert: 'Вставити посилання ...',
-       link_edit: 'Edit link',
-       unlink: 'Видалити посилання',
-       formatting: 'Стилі',
-       paragraph: 'Звичайний текст',
-       quote: 'Цитата',
-       code: 'Код',
-       header1: 'Заголовок 1',
-       header2: 'Заголовок 2',
-       header3: 'Заголовок 3',
-       header4: 'Заголовок 4',
-       header5: 'Заголовок 5',
-       bold:  'Жирний',
-       italic: 'Похилий',
-       fontcolor: 'Колір тексту',
-       backcolor: 'Заливка тексту',
-       unorderedlist: 'Звичайний список',
-       orderedlist: 'Нумерований список',
-       outdent: 'Зменшити відступ',
-       indent: 'Збільшити відступ',
-       cancel: 'Скасувати',
-       insert: 'Вставити',
-       save: 'Зберегти',
-       _delete: 'Видалити',
-       insert_table: 'Вставити таблицю',
-       insert_row_above: 'Додати рядок зверху',
-       insert_row_below: 'Додати рядок знизу',
-       insert_column_left: 'Додати стовпець ліворуч',
-       insert_column_right: 'Додати стовпець праворуч',
-       delete_column: 'Видалити стовпець',
-       delete_row: 'Видалити рядок',
-       delete_table: 'Видалити таблицю',
-       rows: 'Рядки',
-       columns: 'Стовпці',
-       add_head: 'Додати заголовок',
-       delete_head: 'Видалити заголовок',
-       title: 'Підказка',
-       image_view: 'Завантажити зображення',
-       image_position: 'Обтікання текстом',
-       none: 'ні',
-       left: 'ліворуч',
-       right: 'праворуч',
-       image_web_link: 'Посилання на зображення',
-       text: 'Текст',
-       mailto: 'Ел. пошта',
-       web: 'URL',
-       video_html_code: 'Код відео ролика',
-       file: 'Файл',
-       upload: 'Завантажити',
-       download: 'Завантажити',
-       choose: 'Вибрати',
-       or_choose: 'Або виберіть',
-       drop_file_here: 'Перетягніть файл сюди',
-       align_left:     'По лівому краю',
-       align_center: 'По центру',
-       align_right: 'По правому краю',
-       align_justify: 'Вирівняти текст по ширині',
-       horizontalrule: 'Горизонтальная лінійка',
-       fullscreen: 'На весь екран',
-       deleted: 'Закреслений',
-    anchor: 'Anchor',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/vi.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/vi.js
deleted file mode 100644 (file)
index 0dc45e4..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['vi'] = {
-       html: 'Xem HTML',
-       video: 'Chèn Video...',
-       image: 'Chèn hình ảnh...',
-       table: 'Tạo bảng',
-       link: 'Đường dẫn',
-       link_insert: 'Thêm đường dẫn ...',
-       link_edit: 'Edit link',
-       unlink: 'Loại bỏ đường dẫn',
-       formatting: 'Định dạng văn bản',
-       paragraph: 'Đoạn văn',
-       quote: 'Trích dẫn',
-       code: 'Chèn mã',
-       header1: 'Tiêu đề 1',
-       header2: 'Tiêu đề 2',
-       header3: 'Tiêu đề 3',
-       header4: 'Tiêu đề 4',
-       header5: 'Tiêu đề 5',
-       bold:  'In đậm',
-       italic: 'In nghiêng',
-       fontcolor: 'Màu chữ',
-       backcolor: 'Đánh dấu đoạn văn',
-       unorderedlist: 'Sắp xếp theo danh sách',
-       orderedlist: 'Sắp xếp theo thứ tự',
-       outdent: 'Bỏ thụt đầu dòng',
-       indent: 'Thụt đầu dòng',
-       cancel: 'Hủy bỏ',
-       insert: 'Chèn',
-       save: 'Lưu lại',
-       _delete: 'Xóa',
-       insert_table: 'Chèn bảng...',
-       insert_row_above: 'Thêm hàng bên trên',
-       insert_row_below: 'Thêm hàng bên dưới',
-       insert_column_left: 'Thêm cột trái',
-       insert_column_right: 'Thêm cột phải',
-       delete_column: 'Xóa cột',
-       delete_row: 'Xóa hàng',
-       delete_table: 'Xóa bảng',
-       rows: 'Hàng',
-       columns: 'Cột',
-       add_head: 'Thêm tiêu đề bảng',
-       delete_head: 'Xóa tiêu đề bảng',
-       title: 'Tiêu đề',
-       image_position: 'Vị trí',
-       none: 'Không thay đổi',
-       left: 'Trái',
-       right: 'Phải',
-       image_web_link: 'Đường dẫn link ảnh',
-       text: 'Văn bản',
-       mailto: 'Email',
-       web: 'Đường dẫn',
-       video_html_code: 'Mã nhúng video',
-       file: 'Tập tin đính kèm...',
-       upload: 'Tải lên',
-       download: 'Tải xuống',
-       choose: 'Lựa Chọn',
-       or_choose: 'Chọn từ máy tính',
-       drop_file_here: 'Kéo thả hình ảnh vào đây',
-       align_left:     'Căn trái',
-       align_center: 'Căn giữa',
-       align_right: 'Căn phải',
-       align_justify: 'Dàn đều trang',
-       horizontalrule: 'Chèn thanh ngang',
-       deleted: 'Xóa',
-       anchor: 'Liên kết',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/zh_cn.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/zh_cn.js
deleted file mode 100644 (file)
index 663347e..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['zh_cn'] = {
-       html: 'HTML代码',
-       video: '视频',
-       image: '图片',
-       table: '表格',
-       link: '链接',
-       link_insert: '插入链接',
-       link_edit: 'Edit link',
-       unlink: '取消链接',
-       formatting: '样式',
-       paragraph: '段落',
-       quote: '引用',
-       code: '代码',
-       header1: '一级标题',
-       header2: '二级标题',
-       header3: '三级标题',
-       header4: '四级标题',
-       header5: 'Header 5',
-       bold:  '粗体',
-       italic: '斜体',
-       fontcolor: '字体颜色',
-       backcolor: '背景颜色',
-       unorderedlist: '项目编号',
-       orderedlist: '数字编号',
-       outdent: '减少缩进',
-       indent: '增加缩进',
-       cancel: '取消',
-       insert: '插入',
-       save: '保存',
-       _delete: '删除',
-       insert_table: '插入表格',
-       insert_row_above: '在上方插入',
-       insert_row_below: '在下方插入',
-       insert_column_left: '在左侧插入',
-       insert_column_right: '在右侧插入',
-       delete_column: '删除整列',
-       delete_row: '删除整行',
-       delete_table: '删除表格',
-       rows: '行',
-       columns: '列',
-       add_head: '添加标题',
-       delete_head: '删除标题',
-       title: '标题',
-       image_position: '位置',
-       none: '无',
-       left: '左',
-       right: '右',
-       image_web_link: '图片网页链接',
-       text: '文本',
-       mailto: '邮箱',
-       web: '网址',
-       video_html_code: '视频嵌入代码',
-       file: '文件',
-       upload: '上传',
-       download: '下载',
-       choose: '选择',
-       or_choose: '或选择',
-       drop_file_here: '将文件拖拽至此区域',
-       align_left:     '左对齐',
-       align_center: '居中',
-       align_right: '右对齐',
-       align_justify: '两端对齐',
-       horizontalrule: '水平线',
-       fullscreen: '全屏',
-       deleted: '删除',
-       anchor: '锚点',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/languages/zh_tw.js b/wcfsetup/install/files/js/3rdParty/redactor/languages/zh_tw.js
deleted file mode 100644 (file)
index 413bfdf..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-(function ($) {
-$.Redactor.opts.langs['zh_tw'] = {
-       html: 'HTML',
-       video: '插入影片',
-       image: '插入圖片',
-       table: '表格',
-       link: '連結',
-       link_insert: '插入連結',
-       link_edit: 'Edit link',
-       unlink: '移除連結',
-       formatting: '樣式',
-       paragraph: '段落',
-       quote: '引用',
-       code: '原始碼',
-       header1: '標題 1',
-       header2: '標題 2',
-       header3: '標題 3',
-       header4: '標題 4',
-       header5: '標題 5',
-       bold:  '將文字變成粗體',
-       italic: '將文字變成斜體',
-       fontcolor: '選擇文字顏色',
-       backcolor: '選擇文字底色',
-       unorderedlist: '項目列表',
-       orderedlist: '編號列表',
-       outdent: '減少縮排',
-       indent: '增加縮排',
-       cancel: '取消',
-       insert: '插入',
-       save: '儲存',
-       _delete: '刪除',
-       insert_table: '插入表格',
-       insert_row_above: '加入上方橫列',
-       insert_row_below: '加入下方橫列',
-       insert_column_left: '加入左方直欄',
-       insert_column_right: '加入右方直欄',
-       delete_column: '刪除整欄',
-       delete_row: '刪除整列',
-       delete_table: '刪除表格',
-       rows: '橫列',
-       columns: '直欄',
-       add_head: '加入表格標題',
-       delete_head: '刪除表格標題',
-       title: '標題',
-       image_position: '位置',
-       none: '無',
-       left: '靠左',
-       right: '靠右',
-       image_web_link: '連結',
-       text: '內文',
-       mailto: 'Email',
-       web: '網址',
-       video_html_code: '嵌入影片的原始碼',
-       file: '插入文件',
-       upload: '上傳',
-       download: '下載',
-       choose: '選擇',
-       or_choose: '或選擇',
-       drop_file_here: '將文件拖曳至此',
-       align_left:     '將文字對齊至左側',
-       align_center: '將文字置中',
-       align_right: '將文字對齊至右側',
-       align_justify: '對齊至兩側',
-       horizontalrule: '插入水平線',
-       fullscreen: '全銀幕',
-       deleted: '刪除線',
-       anchor: '錨點',
-       link_new_tab: 'Open link in new tab',
-       underline: 'Underline',
-       alignment: 'Alignment',
-       filename: 'Name (optional)',
-       edit: 'Edit',
-       center: 'Center'
-};
-})( jQuery );
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/table.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/table.js
deleted file mode 100644 (file)
index dfc4831..0000000
+++ /dev/null
@@ -1,330 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-RedactorPlugins.table = function()
-{
-       return {
-               getTemplate: function()
-               {
-                       return String()
-                       + '<section id="redactor-modal-table-insert">'
-                               + '<label>' + this.lang.get('rows') + '</label>'
-                               + '<input type="text" size="5" value="2" id="redactor-table-rows" />'
-                               + '<label>' + this.lang.get('columns') + '</label>'
-                               + '<input type="text" size="5" value="3" id="redactor-table-columns" />'
-                       + '</section>';
-               },
-               init: function()
-               {
-
-                       var dropdown = {};
-
-                       dropdown.insert_table = { title: this.lang.get('insert_table'), func: this.table.show };
-                       dropdown.insert_row_above = { title: this.lang.get('insert_row_above'), func: this.table.addRowAbove };
-                       dropdown.insert_row_below = { title: this.lang.get('insert_row_below'), func: this.table.addRowBelow };
-                       dropdown.insert_column_left = { title: this.lang.get('insert_column_left'), func: this.table.addColumnLeft };
-                       dropdown.insert_column_right = { title: this.lang.get('insert_column_right'), func: this.table.addColumnRight };
-                       dropdown.add_head = { title: this.lang.get('add_head'), func: this.table.addHead };
-                       dropdown.delete_head = { title: this.lang.get('delete_head'), func: this.table.deleteHead };
-                       dropdown.delete_column = { title: this.lang.get('delete_column'), func: this.table.deleteColumn };
-                       dropdown.delete_row = { title: this.lang.get('delete_row'), func: this.table.deleteRow };
-                       dropdown.delete_table = { title: this.lang.get('delete_table'), func: this.table.deleteTable };
-
-                       this.observe.addButton('td', 'table');
-                       this.observe.addButton('th', 'table');
-
-                       var button = this.button.addBefore('link', 'table', this.lang.get('table'));
-                       this.button.addDropdown(button, dropdown);
-               },
-               show: function()
-               {
-                       this.modal.addTemplate('table', this.table.getTemplate());
-
-                       this.modal.load('table', this.lang.get('insert_table'), 300);
-                       this.modal.createCancelButton();
-
-                       var button = this.modal.createActionButton(this.lang.get('insert'));
-                       button.on('click', this.table.insert);
-
-                       this.selection.save();
-                       this.modal.show();
-
-                       $('#redactor-table-rows').focus();
-
-               },
-               insert: function()
-               {
-
-                       var rows = $('#redactor-table-rows').val(),
-                               columns = $('#redactor-table-columns').val(),
-                               $tableBox = $('<div>'),
-                               tableId = Math.floor(Math.random() * 99999),
-                               $table = $('<table id="table' + tableId + '"><tbody></tbody></table>'),
-                               i, $row, z, $column;
-
-                       for (i = 0; i < rows; i++)
-                       {
-                               $row = $('<tr>');
-
-                               for (z = 0; z < columns; z++)
-                               {
-                                       $column = $('<td>' + this.opts.invisibleSpace + '</td>');
-
-                                       // set the focus to the first td
-                                       if (i === 0 && z === 0)
-                                       {
-                                               $column.append(this.selection.getMarker());
-                                       }
-
-                                       $($row).append($column);
-                               }
-
-                               $table.append($row);
-                       }
-
-                       $tableBox.append($table);
-                       var html = $tableBox.html();
-
-
-                       this.modal.close();
-                       this.selection.restore();
-
-                       if (this.table.getTable()) return;
-
-                       this.buffer.set();
-
-                       var current = this.selection.getBlock() || this.selection.getCurrent();
-                       if (current && current.tagName != 'BODY')
-                       {
-                               if (current.tagName == 'LI') current = $(current).closest('ul, ol');
-                               $(current).after(html);
-                       }
-                       else
-                       {
-                               this.insert.html(html);
-                       }
-
-                       this.selection.restore();
-
-                       var table = this.$editor.find('#table' + tableId);
-
-                       if (!this.opts.linebreaks && (this.utils.browser('mozilla') || this.utils.browser('msie')))
-                       {
-                               var $next = table.next();
-                               if ($next.length === 0)
-                               {
-                                        table.after(this.opts.emptyHtml);
-                               }
-                       }
-
-                       this.observe.buttons();
-
-                       table.find('span.redactor-selection-marker').remove();
-                       table.removeAttr('id');
-
-                       this.code.sync();
-                       this.core.setCallback('insertedTable', table);
-               },
-               getTable: function()
-               {
-                       var $table = $(this.selection.getParent()).closest('table');
-
-                       if (!this.utils.isRedactorParent($table)) return false;
-                       if ($table.size() === 0) return false;
-
-                       return $table;
-               },
-               restoreAfterDelete: function($table)
-               {
-                       this.selection.restore();
-                       $table.find('span.redactor-selection-marker').remove();
-                       this.code.sync();
-               },
-               deleteTable: function()
-               {
-                       var $table = this.table.getTable();
-                       if (!$table) return;
-
-                       this.buffer.set();
-
-
-                       var $next = $table.next();
-                       if (!this.opts.linebreaks && $next.length !== 0)
-                       {
-                               this.caret.setStart($next);
-                       }
-                       else
-                       {
-                               this.caret.setAfter($table);
-                       }
-
-
-                       $table.remove();
-
-                       this.code.sync();
-               },
-               deleteRow: function()
-               {
-                       var $table = this.table.getTable();
-                       if (!$table) return;
-
-                       var $current = $(this.selection.getCurrent());
-
-                       this.buffer.set();
-
-                       var $current_tr = $current.closest('tr');
-                       var $focus_tr = $current_tr.prev().length ? $current_tr.prev() : $current_tr.next();
-                       if ($focus_tr.length)
-                       {
-                               var $focus_td = $focus_tr.children('td, th').first();
-                               if ($focus_td.length) $focus_td.prepend(this.selection.getMarker());
-                       }
-
-                       $current_tr.remove();
-                       this.table.restoreAfterDelete($table);
-               },
-               deleteColumn: function()
-               {
-                       var $table = this.table.getTable();
-                       if (!$table) return;
-
-                       this.buffer.set();
-
-                       var $current = $(this.selection.getCurrent());
-                       var $current_td = $current.closest('td, th');
-                       var index = $current_td[0].cellIndex;
-
-                       $table.find('tr').each($.proxy(function(i, elem)
-                       {
-                               var $elem = $(elem);
-                               var focusIndex = index - 1 < 0 ? index + 1 : index - 1;
-                               if (i === 0) $elem.find('td, th').eq(focusIndex).prepend(this.selection.getMarker());
-
-                               $elem.find('td, th').eq(index).remove();
-
-                       }, this));
-
-                       this.table.restoreAfterDelete($table);
-               },
-               addHead: function()
-               {
-                       var $table = this.table.getTable();
-                       if (!$table) return;
-
-                       this.buffer.set();
-
-                       if ($table.find('thead').size() !== 0)
-                       {
-                               this.table.deleteHead();
-                               return;
-                       }
-
-                       var tr = $table.find('tr').first().clone();
-                       tr.find('td').html(this.opts.invisibleSpace);
-                       $thead = $('<thead></thead>').append(tr);
-                       $table.prepend($thead);
-
-                       this.code.sync();
-
-               },
-               deleteHead: function()
-               {
-                       var $table = this.table.getTable();
-                       if (!$table) return;
-
-                       var $thead = $table.find('thead');
-                       if ($thead.size() === 0) return;
-
-                       this.buffer.set();
-
-                       $thead.remove();
-                       this.code.sync();
-               },
-               addRowAbove: function()
-               {
-                       this.table.addRow('before');
-               },
-               addRowBelow: function()
-               {
-                       this.table.addRow('after');
-               },
-               addColumnLeft: function()
-               {
-                       this.table.addColumn('before');
-               },
-               addColumnRight: function()
-               {
-                       this.table.addColumn('after');
-               },
-               addRow: function(type)
-               {
-                       var $table = this.table.getTable();
-                       if (!$table) return;
-
-                       this.buffer.set();
-
-                       var $current = $(this.selection.getCurrent());
-                       var $current_tr = $current.closest('tr');
-                       var new_tr = $current_tr.clone();
-
-                       new_tr.find('th').replaceWith(function()
-                       {
-                               var $td = $('<td>');
-                               $td[0].attributes = this.attributes;
-
-                               return $td.append($(this).contents());
-                       });
-
-                       new_tr.find('td').html(this.opts.invisibleSpace);
-
-                       if (type == 'after')
-                       {
-                               $current_tr.after(new_tr);
-                       }
-                       else
-                       {
-                               $current_tr.before(new_tr);
-                       }
-
-                       this.code.sync();
-               },
-               addColumn: function (type)
-               {
-                       var $table = this.table.getTable();
-                       if (!$table) return;
-
-                       var index = 0;
-                       var current = $(this.selection.getCurrent());
-
-                       this.buffer.set();
-
-                       var $current_tr = current.closest('tr');
-                       var $current_td = current.closest('td, th');
-
-                       $current_tr.find('td, th').each($.proxy(function(i, elem)
-                       {
-                               if ($(elem)[0] === $current_td[0]) index = i;
-
-                       }, this));
-
-                       $table.find('tr').each($.proxy(function(i, elem)
-                       {
-                               var $current = $(elem).find('td, th').eq(index);
-
-                               var td = $current.clone();
-                               td.html(this.opts.invisibleSpace);
-
-                               if (type == 'after')
-                               {
-                                       $current.after(td);
-                               }
-                               else
-                               {
-                                       $current.before(td);
-                               }
-
-                       }, this));
-
-                       this.code.sync();
-               }
-       };
-};
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wautosave.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wautosave.js
deleted file mode 100644 (file)
index 76eb202..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Provides a user storage-based background saving mechanism for Redactor.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wautosave = function() {
-       "use strict";
-       
-       var _didSave = false;
-       var _lastMessage = '';
-       var _notice = null;
-       var _noticePE = null;
-       var _paused = false;
-       var _textarea = null;
-       var _worker = null;
-       
-       return {
-               init: function() {
-                       _textarea = this.$textarea[0];
-                       
-                       if (this.wutil.getOption('woltlab.autosave').active) {
-                               this.wautosave.enable();
-                               
-                               if (this.wutil.getOption('woltlab.autosave').saveOnInit || this.$textarea.data('saveOnInit')) {
-                                       this.wutil.setOption('woltlab.autosaveOnce', true);
-                               }
-                               else {
-                                       this.wautosave.restore();
-                               }
-                       }
-                       
-                       // prevent Redactor's own autosave
-                       this.wutil.setOption('autosave', false);
-                       
-                       // disable autosave on destroy
-                       var mpDestroy = this.core.destroy;
-                       this.core.destroy = (function() {
-                               this.wautosave.disable();
-                               
-                               mpDestroy.call(this);
-                       }).bind(this);
-               },
-               
-               /**
-                * Enables automatic saving every 15 seconds.
-                * 
-                * @param       {string}        key     storage prefix key
-                */
-               enable: function(key) {
-                       if (!this.wutil.getOption('woltlab.autosave').active) {
-                               this.wutil.setOption('woltlab.autosave', {
-                                       active: true,
-                                       key: key
-                               });
-                       }
-                       
-                       if (_worker === null) {
-                               this.wautosave.purgeOutdated();
-                               
-                               _worker = new WCF.PeriodicalExecuter(this.wautosave.save.bind(this), 15 * 1000);
-                       }
-               },
-               
-               /**
-                * Saves current editor text to local browser storage.
-                * 
-                * @param       {boolean}       force           force save regardless when the last save occured
-                */
-               save: function(force) {
-                       if (force !== true) force = false;
-                       
-                       var content = this.wutil.getText();
-                       if (_lastMessage === content && !force) {
-                               return;
-                       }
-                       
-                       try {
-                               localStorage.setItem(this.wutil.getOption('woltlab.autosave').key, JSON.stringify({
-                                       content: content,
-                                       timestamp: Date.now()
-                               }));
-                               _lastMessage = content;
-                               _didSave = true;
-                               
-                               if (_noticePE === null) {
-                                       _noticePE = new WCF.PeriodicalExecuter((function(pe) {
-                                               if (_paused === true) {
-                                                       return;
-                                               }
-                                               
-                                               if (_didSave === false) {
-                                                       pe.stop();
-                                                       _noticePE = null;
-                                                       
-                                                       return;
-                                               }
-                                               
-                                               this.wautosave.showNotice('saved');
-                                               _didSave = false;
-                                       }).bind(this), 120 * 1000);
-                               }
-                       }
-                       catch (e) {
-                               console.debug("[wautosave.save] Unable to access local storage: " + e.message);
-                       }
-               },
-               
-               /**
-                * Disables automatic saving.
-                */
-               disable: function() {
-                       if (!this.wutil.getOption('woltlab.autosave').active) {
-                               return;
-                       }
-                       
-                       _worker.stop();
-                       _worker = null;
-                       
-                       this.wutil.setOption('woltlab.autosave', {
-                               active: false,
-                               key: ''
-                       });
-               },
-               
-               /**
-                * Attempts to purge saved text.
-                */
-               purge: function() {
-                       try {
-                               localStorage.removeItem(this.wutil.getOption('woltlab.autosave').key);
-                       }
-                       catch (e) {
-                               console.debug("[wautosave.purge] Unable to access local storage: " + e.message);
-                       }
-               },
-               
-               /**
-                * Attempts to restore a saved text.
-                * 
-                * @return      {boolean}       false if there was no content
-                */
-               restore: function() {
-                       var options = this.wutil.getOption('woltlab.autosave');
-                       var text = null;
-                       
-                       try {
-                               text = localStorage.getItem(options.key);
-                       }
-                       catch (e) {
-                               console.debug("[wutil.autosaveRestore] Unable to access local storage: " + e.message);
-                       }
-                       
-                       try {
-                               if (text !== null) text = JSON.parse(text);
-                       }
-                       catch (e) {
-                               text = null;
-                       }
-                       
-                       if (text === null || !text.content) {
-                               return false;
-                       }
-                       
-                       if (options.lastEditTime && (options.lastEditTime * 1000) > text.timestamp) {
-                               // stored message is older than last edit time, consider it tainted and discard
-                               this.wautosave.purge();
-                               
-                               return false;
-                       }
-                       
-                       if (options.prompt) {
-                               this.autosave.showNotice('prompt', text);
-                               
-                               return false;
-                       }
-                       
-                       if (this.wutil.inWysiwygMode()) {
-                               this.wutil.setOption('woltlab.originalValue', text.content);
-                       }
-                       else {
-                               _textarea.value = text.content;
-                       }
-                       
-                       this.wautosave.showNotice('restored', { timestamp: text.timestamp });
-                       
-                       return true;
-               },
-               
-               /**
-                * Displays a notice regarding the autosave feature.
-                * 
-                * @param       {string}        type    notification type
-                * @param       {object}        data    notification data
-                */
-               showNotice: function(type, data) {
-                       if (_notice === null) {
-                               _notice = $('<div class="redactorAutosaveNotice"><span class="redactorAutosaveMessage" /></div>');
-                               _notice.appendTo(this.$box);
-                               
-                               var resetNotice = (function(event) {
-                                       if (event !== null && event.originalEvent.propertyName !== 'opacity') {
-                                               return;
-                                       }
-                                       
-                                       if (_notice.hasClass('open') && event !== null) {
-                                               if (_notice.data('callbackOpen')) {
-                                                       _notice.data('callbackOpen')();
-                                               }
-                                       }
-                                       else {
-                                               if (_notice.data('callbackClose')) {
-                                                       _notice.data('callbackClose')();
-                                               }
-                                               
-                                               _notice.removeData('callbackClose');
-                                               _notice.removeData('callbackOpen');
-                                               
-                                               _notice.removeClass('redactorAutosaveNoticeIcons');
-                                               _notice.empty();
-                                               $('<span class="redactorAutosaveMessage" />').appendTo(_notice);
-                                       }
-                               }).bind(this);
-                               
-                               _notice.on('transitionend webkitTransitionEnd', resetNotice);
-                       }
-                       
-                       var message = '', uuid = '';
-                       switch (type) {
-                               case 'prompt':
-                                       $('<span class="icon icon16 fa-info blue jsTooltip" title="' + WCF.Language.get('wcf.message.autosave.restored.version', { date: new Date(data.timestamp).toLocaleString() }) + '"></span>').prependTo(_notice);
-                                       var accept = $('<span class="icon icon16 fa-check green pointer jsTooltip" title="' + WCF.Language.get('wcf.message.autosave.prompt.confirm') + '"></span>').appendTo(_notice);
-                                       var discard = $('<span class="icon icon16 fa-times red pointer jsTooltip" title="' + WCF.Language.get('wcf.message.autosave.prompt.discard') + '"></span>').appendTo(_notice);
-                                       
-                                       accept.click((function() {
-                                               this.wutil.replaceText(data.content);
-                                               
-                                               resetNotice(null);
-                                               
-                                               this.wautosave.showNotice('restored', data);
-                                       }).bind(this));
-                                       
-                                       discard.click((function() {
-                                               this.wautosave.purge();
-                                               
-                                               _notice.removeClass('open');
-                                       }).bind(this));
-                                       
-                                       message = WCF.Language.get('wcf.message.autosave.prompt');
-                                       _notice.addClass('redactorAutosaveNoticeIcons');
-                                       
-                                       uuid = WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'keydown_' + _textarea.id, (function(data) {
-                                               WCF.System.Event.removeListener('com.woltlab.wcf.redactor', 'keydown_' + _textarea.id, uuid);
-                                               
-                                               setTimeout(function() { _notice.removeClass('open'); }, 3000);
-                                       }).bind(this));
-                               break;
-                               
-                               case 'restored':
-                                       $('<span class="icon icon16 fa-info blue jsTooltip" title="' + WCF.Language.get('wcf.message.autosave.restored.version', { date: new Date(data.timestamp).toLocaleString() }) + '"></span>').prependTo(_notice);
-                                       var accept = $('<span class="icon icon16 fa-check green pointer jsTooltip" title="' + WCF.Language.get('wcf.message.autosave.restored.confirm') + '"></span>').appendTo(_notice);
-                                       var discard = $('<span class="icon icon16 fa-times red pointer jsTooltip" title="' + WCF.Language.get('wcf.message.autosave.restored.revert') + '"></span>').appendTo(_notice);
-                                       
-                                       accept.click(function() { _notice.removeClass('open'); });
-                                       
-                                       discard.click((function() {
-                                               WCF.System.Confirmation.show(WCF.Language.get('wcf.message.autosave.restored.revert.confirmMessage'), (function(action) {
-                                                       if (action === 'confirm') {
-                                                               this.wutil.reset();
-                                                               this.wautosave.purge();
-                                                               
-                                                               _notice.removeClass('open');
-                                                       }
-                                               }).bind(this));
-                                       }).bind(this));
-                                       
-                                       message = WCF.Language.get('wcf.message.autosave.restored');
-                                       _notice.addClass('redactorAutosaveNoticeIcons');
-                                       
-                                       uuid = WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'keydown_' + _textarea.id, (function(data) {
-                                               WCF.System.Event.removeListener('com.woltlab.wcf.redactor', 'keydown_' + _textarea.id, uuid);
-                                               
-                                               setTimeout(function() { accept.trigger('click'); }, 3000);
-                                       }).bind(this));
-                               break;
-                               
-                               case 'saved':
-                                       if (_notice.hasClass('open')) {
-                                               return;
-                                       }
-                                       
-                                       setTimeout(function() {
-                                               _notice.removeClass('open');
-                                       }, 2000);
-                                       
-                                       message = WCF.Language.get('wcf.message.autosave.saved');
-                               break;
-                       }
-                       
-                       _notice.children('span.redactorAutosaveMessage').text(message);
-                       _notice.addClass('open');
-                       
-                       if (type !== 'saved') {
-                               WCF.DOMNodeInsertedHandler.execute();
-                       }
-               },
-               
-               /**
-                * Automatically purges autosaved content older than 7 days.
-                */
-               purgeOutdated: function() {
-                       var lastChecked = 0;
-                       var prefix = this.wutil.getOption('woltlab.autosave').prefix;
-                       var master = prefix + '_wcf_master';
-                       
-                       try {
-                               lastChecked = localStorage.getItem(master);
-                       }
-                       catch (e) {
-                               console.debug("[wautosave.purgeOutdated] Unable to access local storage: " + e.message);
-                       }
-                       
-                       if (lastChecked === 0) {
-                               // unable to access local storage, skip check
-                               return;
-                       }
-                       
-                       // JavaScript timestamps are in miliseconds
-                       var oneWeekAgo = Date.now() - (7 * 24 * 3600 * 1000), value;
-                       if (lastChecked === null || lastChecked < oneWeekAgo) {
-                               var regExp = new RegExp('^' + prefix + '_');
-                               for (var key in localStorage) {
-                                       if (key.match(regExp) && key !== master) {
-                                               value = localStorage.getItem(key);
-                                               try {
-                                                       value = JSON.parse(value);
-                                               }
-                                               catch (e) {
-                                                       value = { timestamp: 0 };
-                                               }
-                                               
-                                               if (value === null || !value.timestamp || value.timestamp < oneWeekAgo) {
-                                                       try {
-                                                               localStorage.removeItem(key);
-                                                       }
-                                                       catch (e) {
-                                                               console.debug("[wautosave.purgeOutdated] Unable to access local storage: " + e.message);
-                                                       }
-                                               }
-                                       }
-                               }
-                               
-                               try {
-                                       localStorage.setItem(master, Date.now());
-                               }
-                               catch (e) {
-                                       console.debug("[wautosave.purgeOutdated] Unable to access local storage: " + e.message);
-                               }
-                       }
-               },
-               
-               /**
-                * Temporarily pauses autosave worker.
-                */
-               pause: function() {
-                       _paused = true;
-               },
-               
-               /**
-                * Resumes autosave worker.
-                */
-               resume: function() {
-                       _paused = false;
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js
deleted file mode 100644 (file)
index c7bf77b..0000000
+++ /dev/null
@@ -1,1316 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Provides the smiley button and modifies the source mode to transform HTML into BBCodes.
- * 
- * @author     Alexander Ebert, Marcel Werk
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wbbcode = function() {
-       "use strict";
-       
-       var $skipOnSyncReplacementOnce = false;
-       
-       return {
-               /**
-                * Initializes the RedactorPlugins.wbbcode plugin.
-                */
-               init: function() {
-                       var $identifier = this.$textarea.wcfIdentify();
-                       
-                       this.opts.initCallback = (function() {
-                               window.addEventListener('unload', (function(event) {
-                                       this.code.startSync();
-                                       
-                                       this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val()));
-                               }).bind(this));
-                               
-                               if ($.browser.msie) {
-                                       this.$editor.addClass('msie');
-                               }
-                               this.$textarea[0].setAttribute('data-is-dirty', true);
-                               // use stored editor contents
-                               var $content = $.trim(this.wutil.getOption('woltlab.originalValue'));
-                               if ($content.length) {
-                                       this.wutil.replaceText($content);
-                                       
-                                       // ensure that the caret is not within a quote tag
-                                       this.wutil.selectionEndOfEditor();
-                               }
-                               
-                               delete this.opts.woltlab.originalValue;
-                               
-                               $(document).trigger('resize');
-                               this.wutil.saveSelection();
-                               
-                               var editor = this.$editor[0], textarea = this.$textarea[0];
-                               setTimeout(function() {
-                                       if ($.browser.iOS && editor.scrollHeight === 0) {
-                                               // work-around for iOS 8 bug causing the browser to zoom in on tap
-                                               if (document.activeElement === editor || document.activeElement === textarea) {
-                                                       document.activeElement.blur();
-                                               }
-                                       }
-                               }, 10);
-                       }).bind(this);
-                       
-                       this.opts.pasteBeforeCallback = $.proxy(this.wbbcode._pasteBeforeCallback, this);
-                       this.opts.pasteCallback = $.proxy(this.wbbcode._pasteCallback, this);
-                       
-                       var $mpCleanOnSync = this.clean.onSync;
-                       this.clean.onSync = (function(html) {
-                               html = html.replace(/\u200C/g, '__wcf_zwnj__');
-                               html = html.replace(/\u200D/g, '__wcf_zwj__');
-                               
-                               if ($skipOnSyncReplacementOnce === true) {
-                                       $skipOnSyncReplacementOnce = false;
-                               }
-                               else {
-                                       html = html.replace(/<p><br([^>]+)?><\/p>/g, '<p>@@@wcf_empty_line@@@</p>');
-                               }
-                               
-                               html = $mpCleanOnSync.call(this, html);
-                               
-                               html = html.replace(/__wcf_zwnj__/g, '\u200C');
-                               return html.replace(/__wcf_zwj__/g, '\u200D');
-                       }).bind(this);
-                       
-                       if (this.wutil.getOption('woltlab.autosaveOnce')) {
-                               this.wutil.saveTextToStorage();
-                               delete this.opts.woltlab.autosaveOnce;
-                       }
-                       
-                       // we do not support table heads
-                       var $tableButton = this.button.get('table');
-                       if ($tableButton.length) {
-                               var $dropdown = $tableButton.data('dropdown');
-                               
-                               // remove head add/delete
-                               $dropdown.find('.redactor-dropdown-add_head').parent().remove();
-                               $dropdown.find('.redactor-dropdown-delete_head').parent().remove();
-                               
-                               // add visual divider
-                               $('<li class="dropdownDivider" />').insertBefore($dropdown.find('.redactor-dropdown-delete_table').parent());
-                               
-                               // toggle dropdown options
-                               $tableButton.click($.proxy(this.wbbcode._tableButtonClick, this));
-                       }
-                       
-                       // handle 'insert quote' button
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'insertBBCode_quote_' + $identifier, $.proxy(function(data) {
-                               data.cancel = true;
-                               
-                               this.wbbcode._handleInsertQuote();
-                       }, this));
-                       
-                       // handle 'insert code' button
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'insertBBCode_code_' + $identifier, $.proxy(function(data) {
-                               data.cancel = true;
-                               
-                               this.wbbcode._handleInsertCode(null, true);
-                       }, this));
-                       
-                       // handle keydown
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'keydown_' + $identifier, $.proxy(this.wbbcode._keydownCallback, this));
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'keyup_' + $identifier, $.proxy(this.wbbcode._keyupCallback, this));
-                       
-                       // disable automatic synchronization
-                       this.code.sync = function() { };
-                       
-                       // fix button label for source toggling
-                       var $tooltip = $('.redactor-toolbar-tooltip-html:not(.jsWbbcode)').addClass('jsWbbcode').text(WCF.Language.get('wcf.bbcode.button.toggleBBCode'));
-                       
-                       var $fixBR = function(editor) {
-                               var elements = editor[0].querySelectorAll('br:not(:empty)');
-                               for (var i = 0, length = elements.length; i < length; i++) {
-                                       elements[0].innerHTML = '';
-                               }
-                       };
-                       
-                       this.code.toggle = (function() {
-                               if (this.opts.visual) {
-                                       this.code.startSync();
-                                       
-                                       this.code.showCode();
-                                       this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val()));
-                                       
-                                       this.button.get('html').children('i').removeClass('fa-square-o').addClass('fa-square');
-                                       $tooltip.text(WCF.Language.get('wcf.bbcode.button.toggleHTML'));
-                               }
-                               else {
-                                       this.$textarea.val(this.wbbcode.convertToHtml(this.$textarea.val()));
-                                       this.code.offset = this.$textarea.val().length;
-                                       this.code.showVisual();
-                                       this.wutil.fixDOM();
-                                       this.wbbcode.fixBlockLevelElements();
-                                       this.wutil.selectionEndOfEditor();
-                                       this.wbbcode.observeQuotes();
-                                       this.wbbcode.observeCodeListings();
-                                       
-                                       this.button.get('html').children('i').removeClass('fa-square').addClass('fa-square-o');
-                                       $tooltip.text(WCF.Language.get('wcf.bbcode.button.toggleBBCode'));
-                                       this.wutil.fixDOM();
-                                       $fixBR(this.$editor);
-                                       
-                                       if (/ Edge\//.test(navigator.userAgent)) {
-                                               var editor = this.$editor[0];
-                                               window.dtdesign = editor;
-                                               if (editor.childElementCount > 1 && editor.children[0].innerHTML === '\u200b') {
-                                                       // strip empty newline created by Redactor's selection marker
-                                                       editor.removeChild(editor.children[0]);
-                                               }
-                                       }
-                                       
-                                       this.wutil.saveSelection();
-                               }
-                       }).bind(this);
-                       
-                       // insert a new line if user clicked into the editor and the last children is a quote (same behavior as arrow down)
-                       this.wutil.setOption('clickCallback', (function(event) {
-                               if (event.target === this.$editor[0]) {
-                                       if (this.$editor[0].lastElementChild && this.$editor[0].lastElementChild.tagName === 'BLOCKQUOTE') {
-                                               this.wutil.setCaretAfter($(this.$editor[0].lastElementChild));
-                                       }
-                               }
-                               
-                               setTimeout(this.wutil.saveSelection.bind(this), 10);
-                       }).bind(this));
-                       
-                       // drop ul to prevent being touched by this.clean.clearUnverifiedRemove()
-                       var $index = this.opts.verifiedTags.indexOf('ul');
-                       if ($index > -1) {
-                               this.opts.verifiedTags.splice($index, 1);
-                       }
-                       
-                       // reattach event listeners
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'observe_load_' + $identifier, (function(data) {
-                               this.wbbcode.observeCodeListings();
-                               this.wbbcode.observeQuotes();
-                       }).bind(this));
-                       
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'fixFormatting_' + $identifier, $.proxy(this.wbbcode.fixFormatting, this));
-                       
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'destroy_' + $identifier, (function() {
-                               this.wautosave.disable();
-                               this.wautosave.purge();
-                               this.core.destroy();
-                               
-                               WCF.System.Event.removeAllListeners('com.woltlab.wcf.messageOptionsInline', 'submit_' + $identifier);
-                               WCF.System.Event.removeAllListeners('com.woltlab.wcf.redactor', 'destroy_' + $identifier);
-                               
-                               WCF.System.Dependency.Manager.reset('Redactor_' + $identifier);
-                       }).bind(this));
-               },
-               
-               /**
-                * Toggles features within the table dropdown.
-                * 
-                * @param       object          event
-                */
-               _tableButtonClick: function(event) {
-                       var $button = $(event.currentTarget);
-                       if (!$button.hasClass('dropact')) {
-                               return;
-                       }
-                       
-                       var $current = this.selection.getBlock() || this.selection.getCurrent();
-                       var $dropdown = $button.data('dropdown');
-                       
-                       // within table
-                       $dropdown.children('li').show();
-                       var $insertTable = $dropdown.find('> li > .redactor-dropdown-insert_table').parent();
-                       if ($current.tagName == 'TD') {
-                               $insertTable.hide();
-                       }
-                       else {
-                               $insertTable.nextAll().hide();
-                       }
-               },
-               
-               /**
-                * Inserts a smiley, optionally trying to register a new smiley.
-                * 
-                * @param       string          smileyCode
-                * @param       string          smileyPath
-                * @param       boolean         registerSmiley
-                */
-               insertSmiley: function(smileyCode, smileyPath, registerSmiley) {
-                       if (registerSmiley) {
-                               this.wbbcode.registerSmiley(smileyCode, smileyPath);
-                       }
-                       
-                       if (this.opts.visual) {
-                               this.wutil.restoreSelection();
-                               
-                               var $parentBefore = null;
-                               if (window.getSelection().rangeCount && window.getSelection().getRangeAt(0).collapsed) {
-                                       $parentBefore = window.getSelection().getRangeAt(0).startContainer;
-                                       if ($parentBefore.nodeType === Node.TEXT_NODE) {
-                                               $parentBefore = $parentBefore.parentElement;
-                                       }
-                                       
-                                       if (!this.utils.isRedactorParent($parentBefore)) {
-                                               $parentBefore = null;
-                                       }
-                               }
-                               
-                               this.insert.html('<img src="' + smileyPath + '" class="smiley" alt="' + smileyCode + '" id="redactorSmiley">', false);
-                               
-                               var $smiley = document.getElementById('redactorSmiley');
-                               $smiley.removeAttribute('id');
-                               if ($parentBefore !== null) {
-                                       var $currentParent = window.getSelection().getRangeAt(0).startContainer;
-                                       if ($currentParent.nodeType === Node.TEXT_NODE) {
-                                               $currentParent = $currentParent.parentElement;
-                                       }
-                                       
-                                       // smiley has been inserted outside the original caret parent, move
-                                       if ($parentBefore !== $currentParent) {
-                                               $parentBefore.appendChild($smiley);
-                                       }
-                               }
-                               
-                               var $isSpace = function(sibling) {
-                                       if (sibling === null) return false;
-                                       
-                                       if ((sibling.nodeType === Node.ELEMENT_NODE && sibling.nodeName === 'SPAN') || sibling.nodeType === Node.TEXT_NODE) {
-                                               if (sibling.textContent === "\u00A0") {
-                                                       return true;
-                                               }
-                                       }
-                                       
-                                       return false;
-                               };
-                               
-                               // add spaces as paddings
-                               var $parent = $smiley.parentElement;
-                               if (!$isSpace($smiley.previousSibling)) {
-                                       var $node = document.createTextNode('\u00A0');
-                                       $parent.insertBefore($node, $smiley);
-                               }
-                               
-                               if (!$isSpace($smiley.nextSibling)) {
-                                       var $node = document.createTextNode('\u00A0');
-                                       if ($parent.lastChild === $smiley) {
-                                               $parent.appendChild($node);
-                                       }
-                                       else {
-                                               $parent.insertBefore($node, $smiley.nextSibling);
-                                       }
-                               }
-                               
-                               this.wutil.saveSelection();
-                       }
-                       else {
-                               this.wutil.insertAtCaret(' ' + smileyCode + ' ');
-                       }
-               },
-               
-               /**
-                * Registers a new smiley, returns false if the smiley code is already registered.
-                * 
-                * @param       string          smileyCode
-                * @param       string          smileyPath
-                * @return      boolean
-                */
-               registerSmiley: function(smileyCode, smileyPath) {
-                       if (__REDACTOR_SMILIES[smileyCode]) {
-                               return false;
-                       }
-                       
-                       __REDACTOR_SMILIES[smileyCode] = smileyPath;
-                       
-                       return true;
-               },
-               
-               /**
-                * Converts source contents from HTML into BBCode.
-                * 
-                * @param       string          message
-                */
-               convertFromHtml: function(message) {
-                       var obj = { html: message };
-                       
-                       /** @deprecated legacy event */
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'beforeConvertFromHtml', obj);
-                       
-                       /** @deprecated legacy event */
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'convertFromHtml', obj);
-                       
-                       obj.html = __REDACTOR_AMD_DEPENDENCIES.BbcodeFromHTML.convert(obj.html);
-                       
-                       /** @deprecated legacy event */
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'afterConvertFromHtml', obj);
-                       
-                       return obj.html;
-               },
-               
-               /**
-                * Converts source contents from BBCode to HTML.
-                * 
-                * @param       string          message
-                */
-               convertToHtml: function(message) {
-                       var obj = { data: message };
-                       
-                       /** @deprecated legacy event */
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'beforeConvertToHtml', obj);
-                       
-                       obj.data = __REDACTOR_AMD_DEPENDENCIES.BbcodeToHTML.convert(obj.data, {
-                               attachments: {
-                                       images: this.wbbcode._getImageAttachments(),
-                                       thumbnailUrl: this.wutil.getOption('woltlab.attachmentThumbnailUrl'),
-                                       url: this.wutil.getOption('woltlab.attachmentUrl')
-                               }
-                       });
-                       
-                       /** @deprecated legacy event */
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'afterConvertToHtml', obj);
-                       
-                       return obj.data;
-               },
-               
-               /**
-                * Converts certain HTML elements prior to paste in order to preserve formattings.
-                * 
-                * @param       string          html
-                * @return      string
-                */
-               _pasteBeforeCallback: function(html) {
-                       var container = document.createElement('div');
-                       container.innerHTML = html;
-                       document.body.appendChild(container);
-                       
-                       // handle <h1> ... <h6> tags
-                       var defaultSizes = {
-                               1: 24,
-                               2: 22,
-                               3: 18,
-                               4: 14,
-                               5: 12,
-                               6: 10
-                       }, element, elements, size, styles;
-                       for (var i = 1; i <= 6; i++) {
-                               elements = container.getElementsByTagName('H' + i);
-                               while (elements.length) {
-                                       element = elements[0];
-                                       size = defaultSizes[i];
-                                       
-                                       if (element.style.fontSize) {
-                                               styles = window.getComputedStyle(element);
-                                               size = Math.round(styles.getPropertyValue('font-size').replace(/px$/, ''));
-                                               
-                                               if (size > 24) size = 24;
-                                               else if (size > 22) size = 22;
-                                               else if (size > 18) size = 22;
-                                               else if (size > 14) size = 14;
-                                               else if (size > 12) size = 14;
-                                               else if (size > 10) size = 12;
-                                               else size = 10;
-                                       }
-                                       
-                                       element.outerHTML = '<span style="font-size: ' + size + 'pt" data-verified="redactor" rel="font-size: ' + size + 'pt">' + element.innerHTML + '</span>';
-                               }
-                       }
-                       
-                       document.body.removeChild(container);
-                       
-                       // remove CSS classes from certain elements
-                       elements = container.querySelectorAll('div,p,span');
-                       for (var i = 0, length = elements.length; i < length; i++) {
-                               if (elements[0].className) elements[0].className = '';
-                       }
-                       
-                       // drop <wbr>
-                       elements = container.getElementsByTagName('WBR');
-                       while (elements.length) {
-                               elements[0].parentNode.removeChild(elements[0]);
-                       }
-                       
-                       return container.innerHTML;
-               },
-               
-               /**
-                * Restores and fixes formatting before inserting pasted HTML into the editor.
-                * 
-                * @param       string          html
-                * @return      string
-                */
-               _pasteCallback: function(html) {
-                       // strip background-color
-                       html = html.replace(/style="([^"]+)"/, function(match, inlineStyles) {
-                               var $parts = inlineStyles.split(';');
-                               var $styles = [ ];
-                               for (var $i = 0, $length = $parts.length; $i < $length; $i++) {
-                                       var $part = $parts[$i];
-                                       if (!$part.match(/^\s*background-color/)) {
-                                               $styles.push($part);
-                                       }
-                               }
-                               
-                               return 'style="' + $styles.join(';') + '"';
-                       });
-                       
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'afterPaste', { html: html });
-                       
-                       return html;
-               },
-               
-               /**
-                * Inserts an attachment with live preview.
-                * 
-                * @param       integer         attachmentID
-                * @param       boolean         insertFull
-                */
-               insertAttachment: function(attachmentID, insertFull) {
-                       attachmentID = parseInt(attachmentID);
-                       var $attachmentUrl = this.wutil.getOption('woltlab.attachment' + (!insertFull ? 'Thumbnail' : '') + 'Url');
-                       var $imageAttachments = this.wbbcode._getImageAttachments();
-                       
-                       if ($attachmentUrl && $imageAttachments[attachmentID] !== undefined) {
-                               var $style = '';
-                               if (insertFull) {
-                                       $style = ' style="width: ' + $imageAttachments[attachmentID].width + 'px; max-height: ' + $imageAttachments[attachmentID].height + 'px; max-width: ' + $imageAttachments[attachmentID].width + 'px;"';
-                               }
-                               
-                               this.wutil.insertDynamic(
-                                       '<img src="' + $attachmentUrl.replace(/987654321/, attachmentID) + '" class="redactorEmbeddedAttachment' + (!insertFull ? ' redactorDisableResize' : '') + '" data-attachment-id="' + attachmentID + '"' + $style + ' />',
-                                       '[attach=' + attachmentID + (insertFull ? ',none,' + $imageAttachments[attachmentID].width : '') + '][/attach]'
-                               );
-                       }
-                       else {
-                               this.wutil.insertDynamic('[attach=' + attachmentID + '][/attach]');
-                       }
-               },
-               
-               /**
-                * Removes an attachment from WYSIWYG view.
-                * 
-                * @param       integer         attachmentID
-                */
-               removeAttachment: function(attachmentID) {
-                       if (!this.opts.visual) {
-                               // we're not going to mess with the code view
-                               return;
-                       }
-                       
-                       this.$editor.find('img.redactorEmbeddedAttachment').each(function(index, attachment) {
-                               var $attachment = $(attachment);
-                               if ($attachment.data('attachmentID') == attachmentID) {
-                                       $attachment.remove();
-                               }
-                       });
-               },
-               
-               /**
-                * Returns a list of attachments representing an image.
-                * 
-                * @return      object
-                */
-               _getImageAttachments: function() {
-                       // WCF.Attachment.Upload may have no been initialized yet, fallback to static data
-                       var $imageAttachments = this.wutil.getOption('woltlab.attachmentImages') || [ ];
-                       if ($imageAttachments.length) {
-                               delete this.opts.attachmentImages;
-                               
-                               return $imageAttachments;
-                       }
-                       
-                       var $data = {
-                               imageAttachments: { }
-                       };
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'getImageAttachments_' + this.$textarea.wcfIdentify(), $data);
-                       
-                       return $data.imageAttachments;
-               },
-               
-               /**
-                * Handles up/down/delete/backspace key for quote boxes.
-                * 
-                * @param       object          data
-                */
-               _keydownCallback: function(data) {
-                       switch (data.event.which) {
-                               case $.ui.keyCode.BACKSPACE:
-                               case $.ui.keyCode.DELETE:
-                               case $.ui.keyCode.DOWN:
-                               case $.ui.keyCode.ENTER:
-                               case $.ui.keyCode.UP:
-                               case $.ui.keyCode.RIGHT:
-                               case 83: // [S]
-                                       // handle keys
-                               break;
-                               
-                               default:
-                                       return;
-                               break;
-                       }
-                       
-                       this.selection.get();
-                       var current = this.selection.getCurrent();
-                       var $parent = this.selection.getParent();
-                       $parent = ($parent) ? $($parent) : $parent;
-                       var $quote = ($parent) ? $parent.closest('blockquote.quoteBox', this.$editor.get()[0]) : { length: 0 };
-                       
-                       switch (data.event.which) {
-                               // backspace key
-                               case $.ui.keyCode.BACKSPACE:
-                                       if (this.wutil.isCaret()) {
-                                               var $preventAndSelectQuote = false;
-                                               
-                                               if ($quote.length) {
-                                                       // check if quote is empty
-                                                       var $isEmpty = true;
-                                                       for (var $i = 0; $i < $quote[0].children.length; $i++) {
-                                                               var $child = $quote[0].children[$i];
-                                                               if ($child.tagName === 'DIV') {
-                                                                       if ($child.textContent.replace(/\u200b/, '').length) {
-                                                                               $isEmpty = false;
-                                                                               break;
-                                                                       }
-                                                               }
-                                                       }
-                                                       
-                                                       if ($isEmpty) {
-                                                               $preventAndSelectQuote = true;
-                                                       }
-                                                       else {
-                                                               // check if caret is at the start of the quote
-                                                               var range = (this.selection.implicitRange === null) ? this.range : this.selection.implicitRange;
-                                                               if (range.startOffset === 0) {
-                                                                       var element = range.startContainer, prev;
-                                                                       while ((element = element.parentNode) !== null) {
-                                                                               prev = element.previousSibling;
-                                                                               if (prev !== null) {
-                                                                                       if (prev.nodeType === Node.ELEMENT_NODE && prev.nodeName === 'HEADER') {
-                                                                                               $preventAndSelectQuote = true;
-                                                                                       }
-                                                                                       
-                                                                                       break;
-                                                                               }
-                                                                       }
-                                                               }                                                               
-                                                       }
-                                               }
-                                               else {
-                                                       var $range = (this.selection.implicitRange === null) ? this.range : this.selection.implicitRange;
-                                                       var $scope = $range.startContainer;
-                                                       if ($scope.nodeType === Node.TEXT_NODE) {
-                                                               if ($range.startOffset === 0 || ($range.startOffset === 1 && $scope.textContent === '\u200b')) {
-                                                                       if (!$scope.previousSibling) {
-                                                                               $scope = $scope.parentElement;
-                                                                       }
-                                                               }
-                                                       }
-                                                       
-                                                       if ($scope.nodeType === Node.ELEMENT_NODE) {
-                                                               var $previous = $scope.previousSibling;
-                                                               if ($previous && $previous.nodeType === Node.ELEMENT_NODE && $previous.tagName === 'BLOCKQUOTE') {
-                                                                       $quote = $previous;
-                                                                       $preventAndSelectQuote = true;
-                                                               }
-                                                       }
-                                               }
-                                               
-                                               if ($preventAndSelectQuote) {
-                                                       // expand selection and prevent delete
-                                                       var $selection = window.getSelection();
-                                                       if ($selection.rangeCount) $selection.removeAllRanges();
-                                                       
-                                                       var $quoteRange = document.createRange();
-                                                       $quoteRange.selectNode($quote[0] || $quote);
-                                                       $selection.addRange($quoteRange);
-                                                       
-                                                       data.cancel = true;
-                                               }
-                                       }
-                               break;
-                               
-                               // delete key
-                               case $.ui.keyCode.DELETE:
-                                       if (this.wutil.isCaret() && this.wutil.isEndOfElement(current)) {
-                                               var $next = current.nextElementSibling;
-                                               if ($next && $next.tagName === 'BLOCKQUOTE') {
-                                                       // expand selection and prevent delete
-                                                       var $selection = window.getSelection();
-                                                       if ($selection.rangeCount) $selection.removeAllRanges();
-                                                       
-                                                       var $quoteRange = document.createRange();
-                                                       $quoteRange.selectNode($next);
-                                                       $selection.addRange($quoteRange);
-                                                       
-                                                       data.cancel = true;
-                                               }
-                                       }
-                               break;
-                               
-                               // arrow down
-                               case $.ui.keyCode.DOWN:
-                                       var $current = $(current);
-                                       if ($current.next('blockquote').length) {
-                                               this.caret.setStart($current.next().children('div:first'));
-                                               
-                                               data.cancel = true;
-                                       }
-                                       else if ($parent) {
-                                               if ($parent.next('blockquote').length) {
-                                                       this.caret.setStart($parent.next().children('div:first'));
-                                                       
-                                                       data.cancel = true;
-                                               }
-                                               else if ($quote.length) {
-                                                       var $container = $current.closest('div', $quote[0]);
-                                                       if (!$container.next().length) {
-                                                               // check if there is an element after the quote
-                                                               if ($quote.next().length) {
-                                                                       this.caret.setStart($quote.next());
-                                                               }
-                                                               else {
-                                                                       this.wutil.setCaretAfter($quote);
-                                                               }
-                                                               
-                                                               data.cancel = true;
-                                                       }
-                                               } 
-                                       }
-                               break;
-                               
-                               // enter
-                               case $.ui.keyCode.ENTER:
-                                       if ($quote.length) {
-                                               // prevent Redactor's default behavior for <blockquote>
-                                               this.keydown.blockquote = false;
-                                               this.keydown.enterWithinBlockquote = true;
-                                       }
-                                       else if (current.nodeName === 'KBD') {
-                                               data.cancel = true;
-                                       }
-                               break;
-                               
-                               // arrow up
-                               case $.ui.keyCode.UP:
-                                       if (!$parent || !$quote.length) {
-                                               return;
-                                       }
-                                       
-                                       var $container = $(current).closest('div', $quote[0]);
-                                       var $prev = $container.prev();
-                                       if ($prev[0].tagName === 'DIV') {
-                                               return;
-                                       }
-                                       else if ($prev[0].tagName === 'BLOCKQUOTE') {
-                                               return;
-                                       }
-                                       
-                                       var $previousElement = $quote.prev();
-                                       if ($previousElement.length === 0) {
-                                               this.wutil.setCaretBefore($quote);
-                                       }
-                                       else {
-                                               if ($previousElement[0].tagName === 'BLOCKQUOTE') {
-                                                       // set focus to quote text rather than the element itself
-                                                       this.caret.sendEnd($previousElement.children('div:last'));
-                                               }
-                                               else {
-                                                       // focus is wrong if the previous element is empty (e.g. only a newline present)
-                                                       if ($.trim($previousElement.html()) == '') {
-                                                               $previousElement.html(this.opts.invisibleSpace);
-                                                       }
-                                                       
-                                                       this.caret.setEnd($previousElement);
-                                               }
-                                       }
-                                       
-                                       data.cancel = true;
-                               break;
-                               
-                               case $.ui.keyCode.RIGHT:
-                                       var range = window.getSelection().getRangeAt(0);
-                                       if (range.startContainer.nodeType === Node.TEXT_NODE && range.startContainer.length === range.startOffset) {
-                                               current = current.parentNode;
-                                               if (current.nodeName !== 'KBD') {
-                                                       return;
-                                               }
-                                               
-                                               var editor = this.$editor[0];
-                                               if (current.nextElementSibling === editor.lastElementChild) {
-                                                       current = current.nextElementSibling;
-                                                       if (current.textContent === '') {
-                                                               current.textContent = '\u200b';
-                                                       }
-                                               }
-                                               
-                                               if (current === editor.lastElementChild) {
-                                                       this.wutil.selectionEndOfEditor();
-                                               }
-                                       }
-                               break;
-                               
-                               // [S]
-                               case 83:
-                                       // not supported on mobile devices anyway
-                                       if ($.browser.mobile) {
-                                               return;
-                                       }
-                                       
-                                       var $submitEditor = false;
-                                       if (navigator.platform.match(/^Mac/)) {
-                                               if (data.event.ctrlKey && data.event.altKey) {
-                                                       $submitEditor = true;
-                                               }
-                                       }
-                                       else if (data.event.altKey && !data.event.ctrlKey) {
-                                               $submitEditor = true;
-                                       }
-                                       
-                                       if ($submitEditor) {
-                                               var $data = { cancel: false };
-                                               WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'submitEditor_' + this.$textarea.wcfIdentify(), $data);
-                                               
-                                               if ($data.cancel) {
-                                                       data.cancel = true;
-                                               }
-                                       }
-                               break;
-                       }
-               },
-               
-               /**
-                * Handles quote deletion.
-                * 
-                * @param       object          data
-                */
-               _keyupCallback: function(data) {
-                       switch (data.event.which) {
-                               case $.ui.keyCode.BACKSPACE:
-                               case $.ui.keyCode.DELETE:
-                                       // check for empty <blockquote>
-                                       this.$editor.find('blockquote').each(function(index, blockquote) {
-                                               var $blockquote = $(blockquote);
-                                               if (!$blockquote.children('header').length) {
-                                                       $blockquote.remove();
-                                               }
-                                       });
-                               break;
-                               
-                               case $.ui.keyCode.ENTER:
-                                       // fix markup for empty lines
-                                       for (var $i = 0, $length = this.$editor[0].children.length; $i < $length; $i++) {
-                                               var $child = this.$editor[0].children[$i];
-                                               if ($child.nodeType !== Node.ELEMENT_NODE || $child.tagName !== 'P') {
-                                                       // not a <p> element
-                                                       continue;
-                                               }
-                                               
-                                               if ($child.textContent.length > 0) {
-                                                       // element is non-empty
-                                                       continue;
-                                               }
-                                               
-                                               if ($child.children.length > 1 || $child.children[0].tagName === 'BR') {
-                                                       // element contains more than one children or it is just a <br>
-                                                       continue;
-                                               }
-                                               
-                                               // head all the way down to the most inner node
-                                               $child = $child.children[0];
-                                               while ($child.children.length === 1) {
-                                                       $child = $child.children[0];
-                                               }
-                                               
-                                               // check if node has no children and it is a <br>
-                                               if ($child.children.length === 0 && $child.tagName === 'BR') {
-                                                       var $parent = $child.parentNode;
-                                                       var $node = document.createTextNode('\u200b');
-                                                       $parent.appendChild($node);
-                                                       $parent.removeChild($child);
-                                               }
-                                       }
-                               break;
-                       }
-               },
-               
-               /**
-                * Initializes source editing for quotes.
-                */
-               observeQuotes: function() {
-                       this.$editor.find('.redactorQuoteEdit').off('click.wbbcode').on('click.wbbcode', $.proxy(this.wbbcode._observeQuotesClick, this));
-               },
-               
-               /**
-                * Handles clicks on the 'edit quote' link.
-                * 
-                * @param       object          event
-                */
-               _observeQuotesClick: function(event) {
-                       var $header = $(event.currentTarget).closest('header');
-                       var $tooltip = $('<span class="redactor-link-tooltip" />');
-                       
-                       $('<a href="#">' + WCF.Language.get('wcf.bbcode.quote.edit') + '</a>').click($.proxy(function(e) {
-                               e.preventDefault();
-                               
-                               this.wbbcode._openQuoteEditOverlay($(event.currentTarget).closest('blockquote.quoteBox'), false);
-                               $('.redactor-link-tooltip').remove();
-                       }, this)).appendTo($tooltip);
-                       
-                       var $offset = $header.offset();
-                       $tooltip.css({
-                               left: $offset.left + 'px',
-                               top: ($offset.top + 20) + 'px'
-                       });
-                       
-                       $('.redactor-link-tooltip').remove();
-                       $tooltip.appendTo(document.body);
-                       
-                       // prevent the cursor being placed in the quote header
-                       this.selection.remove();
-               },
-               
-               /**
-                * Initializes editing for code listings.
-                */
-               observeCodeListings: function() {
-                       this.$editor.find('.codeBox').each((function(index, codeBox) {
-                               var $codeBox = $(codeBox);
-                               var $editBox = $codeBox.find('.redactorEditCodeBox');
-                               if (!$editBox.length) {
-                                       $editBox = $('<div class="redactorEditCodeBox"><div>' + WCF.Language.get('wcf.bbcode.code.edit') + '</div></div>').insertAfter($codeBox.find('> div > div > h3'));
-                               }
-                               
-                               $editBox.off('click.wbbcode').on('click.wbbcode', (function() {
-                                       this.wbbcode._handleInsertCode($codeBox, false);
-                               }).bind(this));
-                       }).bind(this));
-               },
-               
-               /**
-                * Opens the quote source edit dialog.
-                * 
-                * @param       jQuery          quote
-                * @param       boolean         insertQuote
-                */
-               _openQuoteEditOverlay: function(quote, insertQuote) {
-                       this.modal.load('quote', WCF.Language.get('wcf.bbcode.quote.' + (insertQuote ? 'insert' : 'edit')), 400);
-                       
-                       var $button = this.modal.createActionButton(this.lang.get('save'));
-                       if (insertQuote) {
-                               this.selection.save();
-                               
-                               $button.click($.proxy(function() {
-                                       var $author = $('#redactorQuoteAuthor').val();
-                                       var $link = WCF.String.escapeHTML($('#redactorQuoteLink').val());
-                                       
-                                       this.selection.restore();
-                                       $skipOnSyncReplacementOnce = true;
-                                       var $html = this.selection.getHtml();
-                                       if (this.utils.isEmpty($html)) {
-                                               $html = '';
-                                       }
-                                       
-                                       var $quote = this.wbbcode.insertQuoteBBCode($author, $link, $html);
-                                       if ($quote !== null) {
-                                               // set caret inside the quote
-                                               if (!$html.length) {
-                                                       // careful, Firefox is stupid and replaces an empty div with br[type=_moz]
-                                                       if ($.browser.mozilla) {
-                                                               $quote.children('br[type=_moz]').replaceWith('<div>' + this.opts.invisibleSpace + '</div>');
-                                                       }
-                                                       
-                                                       this.caret.setStart($quote.children('div')[0]);
-                                               }
-                                       }
-                                       
-                                       this.modal.close();
-                               }, this));
-                       }
-                       else {
-                               $('#redactorQuoteAuthor').val(quote.data('author'));
-                               
-                               // do not use prop() here, an empty cite attribute would yield the page URL instead
-                               $('#redactorQuoteLink').val(WCF.String.unescapeHTML(quote.attr('cite')));
-                               
-                               $button.click($.proxy(function() {
-                                       var $author = $('#redactorQuoteAuthor').val();
-                                       quote.data('author', $author);
-                                       quote.attr('data-author', $author);
-                                       quote.prop('cite', WCF.String.escapeHTML($('#redactorQuoteLink').val()));
-                                       
-                                       this.wbbcode._updateQuoteHeader(quote);
-                                       
-                                       this.modal.close();
-                               }, this));
-                       }
-                       
-                       this.modal.show();
-               },
-               
-               /**
-                * Updates the quote's source.
-                * 
-                * @param       jQuery          quote
-                */
-               _updateQuoteHeader: function(quote) {
-                       var $author = quote.data('author');
-                       var $link = quote.attr('cite');
-                       if ($link) $link = WCF.String.escapeHTML($link);
-                       
-                       quote.find('> header > h3').empty().append(this.wbbcode._buildQuoteHeader($author, $link));     
-               },
-               
-               /**
-                * Inserts the quote BBCode.
-                * 
-                * @param       string          author
-                * @param       string          link
-                * @param       string          html
-                * @param       string          plainText
-                * @return      jQuery
-                */
-               insertQuoteBBCode: function(author, link, html, plainText) {
-                       var $openTag = '[quote]';
-                       var $closingTag = '[/quote]';
-                       
-                       if (author) {
-                               if (link) {
-                                       $openTag = "[quote='" + author + "','" + link + "']";
-                               }
-                               else {
-                                       $openTag = "[quote='" + author + "']";
-                               }
-                       }
-                       
-                       var $quote = null;
-                       if (this.wutil.inWysiwygMode()) {
-                               var $id = WCF.getUUID();
-                               var $html = '';
-                               if (plainText) {
-                                       $html = this.wbbcode.convertToHtml($openTag + plainText + $closingTag);
-                               }
-                               else {
-                                       $html = this.wbbcode.convertToHtml($openTag + $id + $closingTag);
-                                       $html = $html.replace($id, html.replace(/^<p>/, '').replace(/<\/p>$/, ''));
-                               }
-                               
-                               $html = $html.replace(/^<p>/, '').replace(/<\/p>$/, '');
-                               
-                               // assign a unique id in order to recognize the inserted quote
-                               $html = $html.replace(/<blockquote/, '<blockquote id="' + $id + '"');
-                               
-                               if (!window.getSelection().rangeCount) {
-                                       this.wutil.restoreSelection();
-                                       
-                                       if (!window.getSelection().rangeCount) {
-                                               this.$editor.focus();
-                                               
-                                               if (!window.getSelection().rangeCount) {
-                                                       this.wutil.selectionEndOfEditor();
-                                               }
-                                               
-                                               this.wutil.saveSelection();
-                                       }
-                               }
-                               
-                               window.getSelection().getRangeAt(0).deleteContents();
-                               
-                               this.wutil.restoreSelection();
-                               var $selection = window.getSelection().getRangeAt(0);
-                               var $current = $selection.startContainer;
-                               while ($current) {
-                                       var $parent = $current.parentNode;
-                                       if ($parent === this.$editor[0]) {
-                                               break;
-                                       }
-                                       
-                                       $current = $parent;
-                               }
-                               
-                               if ($current && $current.parentNode === this.$editor[0]) {
-                                       if ($current.innerHTML.length) {
-                                               if ($current.innerHTML === '\u200b') {
-                                                       this.caret.setEnd($current);
-                                               }
-                                               else {
-                                                       this.wutil.setCaretAfter($current);
-                                               }
-                                       }
-                               }
-                               
-                               this.insert.html($html, false);
-                               
-                               $quote = this.$editor.find('#' + $id);
-                               if ($quote.length) {
-                                       // quote may be empty if $innerHTML was empty, fix it
-                                       var $inner = $quote.find('> div');
-                                       if ($inner.length == 1) {
-                                               if ($inner[0].innerHTML === '') {
-                                                       $inner[0].innerHTML = this.opts.invisibleSpace;
-                                               }
-                                       }
-                                       else if ($.browser.mozilla) {
-                                               // Firefox on Mac OS X sometimes removes the "empty" div and replaces it with <br type="_moz">
-                                               var $br = $quote.find('> div > br[type=_moz]');
-                                               if ($br.length) {
-                                                       $('<div>' + this.opts.invisibleSpace + '</div>').insertBefore($br);
-                                                       $br.remove();
-                                               }
-                                       }
-                                       
-                                       $quote.removeAttr('id');
-                                       this.wutil.setCaretAfter($quote[0]);
-                                       
-                                       // inserting a quote can spawn an additional empty newline in front
-                                       var prev = $quote[0].previousElementSibling;
-                                       if (prev !== null && prev.nodeName === 'P' && prev.innerHTML === '\u200B') {
-                                               prev = prev.previousElementSibling;
-                                               if (prev !== null && prev.nodeName === 'P' && (prev.innerHTML === '\u200B' || prev.innerHTML === '<br>')) {
-                                                       prev.parentNode.removeChild(prev.nextElementSibling);
-                                               }
-                                       }
-                               }
-                               
-                               this.wbbcode.observeQuotes();
-                               this.wbbcode.fixBlockLevelElements();
-                               
-                               this.$toolbar.find('a.re-__wcf_quote').removeClass('redactor-button-disabled');
-                       }
-                       else {
-                               this.wutil.insertAtCaret($openTag + plainText + $closingTag);
-                       }
-                       
-                       this.wutil.saveSelection();
-                       
-                       return $quote;
-               },
-               
-               /**
-                * Builds the quote source HTML.
-                * 
-                * @param       string          author
-                * @param       string          link
-                * @return      string
-                */
-               _buildQuoteHeader: function(author, link) {
-                       var $header = '';
-                       // author is empty, check if link was provided and use it instead
-                       if (!author && link) {
-                               author = link;
-                               link = '';
-                       }
-                       
-                       if (author) {
-                               if (link) $header += '<a href="' + link + '" tabindex="-1">';
-                               
-                               $header += WCF.Language.get('wcf.bbcode.quote.title.javascript', { quoteAuthor: WCF.String.unescapeHTML(author) });
-                               
-                               if (link) $header += '</a>';
-                       }
-                       else {
-                               $header = '<small>' + WCF.Language.get('wcf.bbcode.quote.title.clickToSet') + '</small>';
-                       }
-                       
-                       return $header;
-               },
-               
-               _handleInsertQuote: function() {
-                       this.wbbcode._openQuoteEditOverlay(null, true);
-               },
-               
-               /**
-                * Opens the code edit dialog.
-                * 
-                * @param       jQuery          codeBox
-                * @param       boolean         isInsert
-                */
-               _handleInsertCode: function(codeBox, isInsert) {
-                       this.modal.load('code', WCF.Language.get('wcf.bbcode.code.' + (isInsert ? 'insert' : 'edit')), 400);
-                       
-                       var $button = this.modal.createActionButton(this.lang.get('save')).addClass('buttonPrimary');
-                       
-                       if (isInsert) {
-                               this.selection.get();
-                               var $selectedText = this.selection.getText();
-                               
-                               this.selection.save();
-                               this.modal.show();
-                               
-                               var $codeBox = $('#redactorCodeBox').focus();
-                               $codeBox.val($selectedText);
-                               
-                               $button.click($.proxy(function() {
-                                       var $codeBox = $('#redactorCodeBox');
-                                       var $filename = $('#redactorCodeFilename');
-                                       var $highlighter = $('#redactorCodeHighlighter');
-                                       var $lineNumber = $('#redactorCodeLineNumber');
-                                       
-                                       var $codeBoxContent = $codeBox.val().replace(/^\n+/, '').replace(/\n+$/, '');
-                                       if ($.trim($codeBoxContent).length === 0) {
-                                               if (!$codeBox.next('small.innerError').length) {
-                                                       $('<small class="innerError">' + WCF.Language.get('wcf.global.form.error.empty') + '</small>').insertAfter($codeBox);
-                                               }
-                                               
-                                               return;
-                                       }
-                                       
-                                       var $codeFilename = $.trim($filename.val().replace(/['"]/g, ''));
-                                       var $bbcode = '[code=' + $highlighter.val() + ',' + $lineNumber.val() + ($codeFilename.length ? ",'" + $codeFilename + "'" : '') + ']';
-                                       if ($bbcode.match(/\[code=([^,]+),(\d+)\]/)) {
-                                               // reverse line number and highlighter
-                                               $bbcode = '[code=' + RegExp.$2 + ',' + RegExp.$1 + ']';
-                                       }
-                                       
-                                       $bbcode += $codeBoxContent;
-                                       $bbcode += '[/code]';
-                                       
-                                       this.wutil.adjustSelectionForBlockElement();
-                                       this.wutil.saveSelection();
-                                       var $html = this.wbbcode.convertToHtml($bbcode);
-                                       
-                                       this.buffer.set();
-                                       
-                                       this.insert.html($html, false);
-                                       
-                                       // set caret after code listing
-                                       var $codeBox = this.$editor.find('.codeBox:not(.jsRedactorCodeBox)');
-                                       
-                                       this.wbbcode.observeCodeListings();
-                                       this.wbbcode.fixBlockLevelElements();
-                                       
-                                       // document.execCommand('insertHTML') seems to drop 'contenteditable="false"' for root element
-                                       $codeBox.attr('contenteditable', 'false');
-                                       this.wutil.setCaretAfter($codeBox[0]);
-                                       
-                                       this.modal.close();
-                               }, this));
-                       }
-                       else {
-                               var $deleteButton = this.modal.createActionButton(WCF.Language.get('wcf.global.button.delete'));
-                               $deleteButton.click((function() {
-                                       this.buffer.set();
-                                       
-                                       codeBox.remove();
-                                       
-                                       this.modal.close();
-                               }).bind(this));
-                               
-                               this.modal.show();
-                               
-                               var $codeBox = $('#redactorCodeBox').focus();
-                               var $filename = $('#redactorCodeFilename');
-                               var $highlighter = $('#redactorCodeHighlighter');
-                               var $lineNumber = $('#redactorCodeLineNumber');
-                               
-                               $highlighter.val(codeBox.data('highlighter'));
-                               $filename.val(codeBox.data('filename') || '');
-                               var $list = codeBox.find('> div > ol');
-                               $lineNumber.val(parseInt($list.prop('start')));
-                               
-                               var $code = '';
-                               $list.children('li').each(function(index, listItem) {
-                                       $code += $(listItem).text().replace(/^\u200b$/, '') + "\n";
-                               });
-                               $codeBox.val($code.replace(/^\n+/, '').replace(/\n+$/, ''));
-                               
-                               $button.click($.proxy(function() {
-                                       var $codeBoxContent = $codeBox.val().replace(/^\n+/, '').replace(/\n+$/, '');
-                                       if ($.trim($codeBoxContent).length === 0) {
-                                               if (!$codeBox.next('small.innerError').length) {
-                                                       $('<small class="innerError">' + WCF.Language.get('wcf.global.form.error.empty') + '</small>').insertAfter($codeBox);
-                                               }
-                                               
-                                               return;
-                                       }
-                                       
-                                       var $selectedHighlighter = $highlighter.val();
-                                       codeBox.data('highlighter', $selectedHighlighter);
-                                       codeBox.attr('data-highlighter', $selectedHighlighter);
-                                       
-                                       var $headline = __REDACTOR_CODE_HIGHLIGHTERS[$selectedHighlighter];
-                                       var $codeFilename = $.trim($filename.val().replace(/['"]/g, ''));
-                                       if ($codeFilename) {
-                                               $headline += ': ' + WCF.String.escapeHTML($codeFilename);
-                                               codeBox.data('filename', $codeFilename);
-                                               codeBox.attr('data-filename', $codeFilename);
-                                       }
-                                       else {
-                                               codeBox.removeAttr('data-filename');
-                                               codeBox.removeData('filename');
-                                       }
-                                       
-                                       codeBox.data('highlighter', $highlighter.val());
-                                       codeBox.find('> div > div > h3').html($headline);
-                                       
-                                       var $list = codeBox.find('> div > ol').empty();
-                                       var $start = parseInt($lineNumber.val());
-                                       $list.prop('start', ($start > 1 ? $start : 1));
-                                       
-                                       $codeBoxContent = $codeBoxContent.split('\n');
-                                       var $codeContent = '';
-                                       for (var $i = 0; $i < $codeBoxContent.length; $i++) {
-                                               $codeContent += '<li>' + WCF.String.escapeHTML($codeBoxContent[$i]) + '</li>';
-                                       }
-                                       $list.append($($codeContent));
-                                       
-                                       this.modal.close();
-                               }, this));
-                       }
-               },
-               
-               /**
-                * Inserting block-level elements (e.g. quotes or code bbcode) can lead to void paragraphs.
-                */
-               fixBlockLevelElements: function() {
-                       return;
-                       var $removeVoidElements = (function(referenceElement, position) {
-                               var $sibling = referenceElement[position];
-                               if ($sibling && $sibling.nodeType === Node.ELEMENT_NODE && $sibling.tagName === 'P') {
-                                       if (!$sibling.innerHTML.length) {
-                                               $sibling.parentElement.removeChild($sibling);
-                                       }
-                                       /*else if ($sibling.innerHTML === '\u200b') {
-                                               var $adjacentSibling = $sibling[position];
-                                               if ($adjacentSibling && $adjacentSibling.nodeType === Node.ELEMENT_NODE && $adjacentSibling.tagName === 'P' && $adjacentSibling.innerHTML.length) {
-                                                       $sibling.parentElement.removeChild($sibling);
-                                               }
-                                       }*/
-                               }
-                       }).bind(this);
-                       
-                       this.$editor.find('blockquote, .codeBox').each(function() {
-                               $removeVoidElements(this, 'previousElementSibling');
-                               $removeVoidElements(this, 'nextElementSibling');
-                       });
-               },
-               
-               /**
-                * Fixes incorrect formatting applied to element that should be left untouched.
-                * 
-                * @param       object          data
-                */
-               fixFormatting: function(data) {
-                       var $stripTextAlign = function(element) {
-                               element.style.removeProperty('text-align');
-                               
-                               for (var $i = 0; $i < element.children.length; $i++) {
-                                       $stripTextAlign(element.children[$i]);
-                               }
-                       };
-                       
-                       for (var $i = 0; $i < this.alignment.blocks.length; $i++) {
-                               var $block = this.alignment.blocks[$i];
-                               switch ($block.tagName) {
-                                       case 'BLOCKQUOTE':
-                                               $block.style.removeProperty('text-align');
-                                               $stripTextAlign($block.children[0]);
-                                       break;
-                                       
-                                       case 'DIV':
-                                               if (/\bcodeBox\b/.test($block.className)) {
-                                                       $stripTextAlign($block);
-                                               }
-                                       break;
-                               }
-                       }
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js
deleted file mode 100644 (file)
index a95d35a..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Provides custom BBCode buttons for Redactor.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wbutton = function() {
-       "use strict";
-       
-       return {
-               /**
-                * list of button names and their associated bbcode tag
-                * @var object<string>
-                */
-               _bbcodes: { },
-               
-               /**
-                * Initializes the RedactorPlugins.wbutton plugin.
-                */
-               init: function() {
-                       this._bbcodes = { };
-                       
-                       for (var $i = 0, $length = __REDACTOR_BUTTONS.length; $i < $length; $i++) {
-                               this.wbutton._addBBCodeButton(__REDACTOR_BUTTONS[$i]);
-                       }
-                       
-                       // this list contains overrides for built-in buttons, if a button is not present
-                       // Redactor's own icon will be used instead. This solves the problem of FontAwesome
-                       // not providing an icon for everything we need (especially the core stuff)
-                       var $faIcons = {
-                               'html': 'fa-square-o',
-                               'bold': 'fa-bold',
-                               'italic': 'fa-italic',
-                               'underline': 'fa-underline',
-                               'deleted': 'fa-strikethrough',
-                               'subscript': 'fa-subscript',
-                               'superscript': 'fa-superscript',
-                               'orderedlist': 'fa-list-ol',
-                               'unorderedlist': 'fa-list-ul',
-                               'outdent': 'fa-outdent',
-                               'indent': 'fa-indent',
-                               'link': 'fa-link',
-                               'alignment': 'fa-align-left',
-                               'table': 'fa-table'
-                       };
-                       
-                       var $buttonTitles = {
-                               'fontcolor': WCF.Language.get('wcf.bbcode.button.fontColor'),
-                               'fontfamily': WCF.Language.get('wcf.bbcode.button.fontFamily'),
-                               'fontsize': WCF.Language.get('wcf.bbcode.button.fontSize'),
-                               'image': WCF.Language.get('wcf.bbcode.button.image'),
-                               'subscript': WCF.Language.get('wcf.bbcode.button.subscript'),
-                               'superscript': WCF.Language.get('wcf.bbcode.button.superscript')
-                       };
-                       
-                       var $buttons = this.wutil.getOption('buttons');
-                       var $lastButton = '';
-                       for (var $i = 0, $length = $buttons.length; $i < $length; $i++) {
-                               var $button = $buttons[$i];
-                               if ($button == 'separator') {
-                                       this.button.get($lastButton).parent().addClass('separator');
-                                       
-                                       continue;
-                               }
-                               
-                               // check if button exists
-                               var $buttonObj = this.button.get($button);
-                               if ($buttonObj.length) {
-                                       if ($faIcons[$button]) {
-                                               this.button.setAwesome($button, $faIcons[$button]);
-                                       }
-                                       
-                                       // the 'table' button is added through the official plugin and is therefore misplaced
-                                       if ($button === 'table' && $lastButton) {
-                                               $buttonObj.parent().insertAfter(this.button.get($lastButton).parent());
-                                       }
-                               }
-                               else {
-                                       this.wbutton._addCoreButton($button, ($buttonTitles[$button] ? $buttonTitles[$button] : null), ($faIcons[$button] ? $faIcons[$button] : null), $lastButton);
-                               }
-                               
-                               $lastButton = $button;
-                       }
-                       
-                       // handle image insert
-                       this.button.addCallback(this.button.get('image'), $.proxy(this.wbutton.insertImage, this));
-                       
-                       // handle redo/undo buttons (for some reason not available on mobile, disabled for now)
-                       if (this.utils.isDesktop()) {
-                               var $undoButton = this.button.addAfter('html', 'undo', WCF.Language.get('wcf.bbcode.button.undo'));
-                               var $redoButton = this.button.addAfter('undo', 'redo', WCF.Language.get('wcf.bbcode.button.redo'));
-                               this.button.addCallback($undoButton, this.buffer.undo);
-                               this.button.addCallback($redoButton, this.buffer.redo);
-                               
-                               $redoButton.parent().addClass('separator');
-                       }
-                       
-               },
-               
-               /**
-                * Modifies an existing button belonging to Redactor.
-                * 
-                * @param       string          buttonName
-                * @param       string          buttonTitle
-                * @param       string          faIcon
-                * @param       string          insertAfter
-                */
-               _addCoreButton: function(buttonName, buttonTitle, faIcon, insertAfter) {
-                       var $buttonObj = { title: (buttonTitle === null ? buttonName : buttonTitle) };
-                       if (buttonName === 'subscript' || buttonName === 'superscript') {
-                               $buttonObj.command = buttonName;
-                       }
-                       
-                       var $button = this.button.build(buttonName, $buttonObj);
-                       $('<li />').append($button).insertAfter(this.button.get(insertAfter).parent());
-                       
-                       if (faIcon !== null) {
-                               this.button.setAwesome(buttonName, faIcon);
-                       }
-               },
-               
-               /**
-                * Adds a custom button.
-                * 
-                * @param       object<string>          data
-                */
-               _addBBCodeButton: function(data) {
-                       var $buttonName = '__wcf_' + data.name;
-                       var button = this.button.add($buttonName, data.label);
-                       if (data.name === 'tt') {
-                               var newButton = this.button.build($buttonName, { command: 'kbd', title: data.label });
-                               $('<li />').append(newButton).insertAfter(button.parent());
-                               button.parent().remove();
-                               button = newButton;
-                       }
-                       else {
-                               this.button.addCallback(button, this.wbutton._insertBBCode);
-                       }
-                       
-                       this._bbcodes[$buttonName] = {
-                               name: data.name,
-                               voidElement: (data.voidElement === true)
-                       };
-                       
-                       // FontAwesome class name
-                       if (data.icon.match(/^fa\-[a-z\-]+$/)) {
-                               this.button.setAwesome($buttonName, data.icon);
-                       }
-                       else {
-                               // image reference
-                               button.css('background-image', 'url(' + __REDACTOR_ICON_PATH + data.icon + ')');
-                       }
-               },
-               
-               /**
-                * Inserts the specified BBCode.
-                * 
-                * @param       string          buttonName
-                */
-               _insertBBCode: function(buttonName) {
-                       var $bbcode = this._bbcodes[buttonName].name;
-                       var $eventData = {
-                               buttonName: buttonName,
-                               cancel: false,
-                               redactor: this
-                       };
-                       
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'insertBBCode_' + $bbcode + '_' + this.$textarea.wcfIdentify(), $eventData);
-                       
-                       if ($eventData.cancel === false) {
-                               var $selectedHtml = this.selection.getHtml();
-                               $selectedHtml = $selectedHtml.replace(/<p>@@@wcf_empty_line@@@<\/p>/g, '<p><br></p>');
-                               
-                               this.buffer.set();
-                               
-                               if (this.utils.browser('mozilla') && !$selectedHtml.length) {
-                                       var $container = getSelection().getRangeAt(0).startContainer;
-                                       if ($container.nodeType === Node.ELEMENT_NODE && $container.tagName === 'P' && $container.innerHTML === '<br>') {
-                                               // <br> is not removed in Firefox, instead content gets inserted afterwards creating a leading empty line
-                                               $container.removeChild($container.children[0]);
-                                       }
-                               }
-                               
-                               if (this._bbcodes[buttonName].voidElement) {
-                                       this.insert.html($selectedHtml + this.selection.getMarkerAsHtml() + '[' + $bbcode + ']', false);
-                               }
-                               else {
-                                       this.insert.html('[' + $bbcode + ']' + $selectedHtml + this.selection.getMarkerAsHtml() + '[/' + $bbcode + ']', false);
-                               }
-                               
-                               this.selection.restore();
-                       }
-               },
-               
-               insertImage: function() {
-                       this.image.show();
-               },
-               
-               _insertImage: function() {
-                       var $source = $('#redactor-image-link-source');
-                       var $url = $source.val().trim();
-                       if ($url.length) {
-                               this.buffer.set();
-                               
-                               var $align = $('#redactor-image-align').val();
-                               var $style = '';
-                               if ($align === 'left' || $align === 'right') {
-                                       $style = ' style="float: ' + $align + '"';
-                               }
-                               
-                               this.insert.html('<img src="' + $url + '"' + $style + '>', false);
-                               
-                               this.modal.close();
-                               this.observe.images();
-                       }
-                       else if (!$source.next('small.innerError')) {
-                               $('<small class="innerError">' + WCF.Language.get('wcf.global.form.error.empty') + '</small>').insertAfter($source);
-                       }
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js
deleted file mode 100644 (file)
index 7de0d98..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// table.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.table=function(){return{getTemplate:function(){return String()+'<section id="redactor-modal-table-insert"><label>'+this.lang.get("rows")+'</label><input type="text" size="5" value="2" id="redactor-table-rows" /><label>'+this.lang.get("columns")+'</label><input type="text" size="5" value="3" id="redactor-table-columns" /></section>'},init:function(){var t={};t.insert_table={title:this.lang.get("insert_table"),func:this.table.show},t.insert_row_above={title:this.lang.get("insert_row_above"),func:this.table.addRowAbove},t.insert_row_below={title:this.lang.get("insert_row_below"),func:this.table.addRowBelow},t.insert_column_left={title:this.lang.get("insert_column_left"),func:this.table.addColumnLeft},t.insert_column_right={title:this.lang.get("insert_column_right"),func:this.table.addColumnRight},t.add_head={title:this.lang.get("add_head"),func:this.table.addHead},t.delete_head={title:this.lang.get("delete_head"),func:this.table.deleteHead},t.delete_column={title:this.lang.get("delete_column"),func:this.table.deleteColumn},t.delete_row={title:this.lang.get("delete_row"),func:this.table.deleteRow},t.delete_table={title:this.lang.get("delete_table"),func:this.table.deleteTable},this.observe.addButton("td","table"),this.observe.addButton("th","table");var e=this.button.addBefore("link","table",this.lang.get("table"));this.button.addDropdown(e,t)},show:function(){this.modal.addTemplate("table",this.table.getTemplate()),this.modal.load("table",this.lang.get("insert_table"),300),this.modal.createCancelButton();var t=this.modal.createActionButton(this.lang.get("insert"));t.on("click",this.table.insert),this.selection.save(),this.modal.show(),$("#redactor-table-rows").focus()},insert:function(){var t,e,i,a,s=$("#redactor-table-rows").val(),l=$("#redactor-table-columns").val(),n=$("<div>"),r=Math.floor(99999*Math.random()),o=$('<table id="table'+r+'"><tbody></tbody></table>');for(t=0;s>t;t++){for(e=$("<tr>"),i=0;l>i;i++)a=$("<td>"+this.opts.invisibleSpace+"</td>"),0===t&&0===i&&a.append(this.selection.getMarker()),$(e).append(a);o.append(e)}n.append(o);var d=n.html();if(this.modal.close(),this.selection.restore(),!this.table.getTable()){this.buffer.set();var h=this.selection.getBlock()||this.selection.getCurrent();h&&"BODY"!=h.tagName?("LI"==h.tagName&&(h=$(h).closest("ul, ol")),$(h).after(d)):this.insert.html(d),this.selection.restore();var c=this.$editor.find("#table"+r);if(!this.opts.linebreaks&&(this.utils.browser("mozilla")||this.utils.browser("msie"))){var b=c.next();0===b.length&&c.after(this.opts.emptyHtml)}this.observe.buttons(),c.find("span.redactor-selection-marker").remove(),c.removeAttr("id"),this.code.sync(),this.core.setCallback("insertedTable",c)}},getTable:function(){var t=$(this.selection.getParent()).closest("table");return this.utils.isRedactorParent(t)?0===t.size()?!1:t:!1},restoreAfterDelete:function(t){this.selection.restore(),t.find("span.redactor-selection-marker").remove(),this.code.sync()},deleteTable:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=t.next();this.opts.linebreaks||0===e.length?this.caret.setAfter(t):this.caret.setStart(e),t.remove(),this.code.sync()}},deleteRow:function(){var t=this.table.getTable();if(t){var e=$(this.selection.getCurrent());this.buffer.set();var i=e.closest("tr"),a=i.prev().length?i.prev():i.next();if(a.length){var s=a.children("td, th").first();s.length&&s.prepend(this.selection.getMarker())}i.remove(),this.table.restoreAfterDelete(t)}},deleteColumn:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=$(this.selection.getCurrent()),i=e.closest("td, th"),a=i[0].cellIndex;t.find("tr").each($.proxy(function(t,e){var i=$(e),s=0>a-1?a+1:a-1;0===t&&i.find("td, th").eq(s).prepend(this.selection.getMarker()),i.find("td, th").eq(a).remove()},this)),this.table.restoreAfterDelete(t)}},addHead:function(){var t=this.table.getTable();if(t){if(this.buffer.set(),0!==t.find("thead").size())return void this.table.deleteHead();var e=t.find("tr").first().clone();e.find("td").html(this.opts.invisibleSpace),$thead=$("<thead></thead>").append(e),t.prepend($thead),this.code.sync()}},deleteHead:function(){var t=this.table.getTable();if(t){var e=t.find("thead");0!==e.size()&&(this.buffer.set(),e.remove(),this.code.sync())}},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(t){var e=this.table.getTable();if(e){this.buffer.set();var i=$(this.selection.getCurrent()),a=i.closest("tr"),s=a.clone();s.find("th").replaceWith(function(){var t=$("<td>");return t[0].attributes=this.attributes,t.append($(this).contents())}),s.find("td").html(this.opts.invisibleSpace),"after"==t?a.after(s):a.before(s),this.code.sync()}},addColumn:function(t){var e=this.table.getTable();if(e){var i=0,a=$(this.selection.getCurrent());this.buffer.set();var s=a.closest("tr"),l=a.closest("td, th");s.find("td, th").each($.proxy(function(t,e){$(e)[0]===l[0]&&(i=t)},this)),e.find("tr").each($.proxy(function(e,a){var s=$(a).find("td, th").eq(i),l=s.clone();l.html(this.opts.invisibleSpace),"after"==t?s.after(l):s.before(l)},this)),this.code.sync()}}}};
-
-// wautosave.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wautosave=function(){"use strict";var e=!1,t="",a=null,s=null,o=!1,i=null,n=null;return{init:function(){i=this.$textarea[0],this.wutil.getOption("woltlab.autosave").active&&(this.wautosave.enable(),this.wutil.getOption("woltlab.autosave").saveOnInit||this.$textarea.data("saveOnInit")?this.wutil.setOption("woltlab.autosaveOnce",!0):this.wautosave.restore()),this.wutil.setOption("autosave",!1);var e=this.core.destroy;this.core.destroy=function(){this.wautosave.disable(),e.call(this)}.bind(this)},enable:function(e){this.wutil.getOption("woltlab.autosave").active||this.wutil.setOption("woltlab.autosave",{active:!0,key:e}),null===n&&(this.wautosave.purgeOutdated(),n=new WCF.PeriodicalExecuter(this.wautosave.save.bind(this),15e3))},save:function(a){a!==!0&&(a=!1);var i=this.wutil.getText();if(t!==i||a)try{localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,JSON.stringify({content:i,timestamp:Date.now()})),t=i,e=!0,null===s&&(s=new WCF.PeriodicalExecuter(function(t){if(o!==!0){if(e===!1)return t.stop(),void(s=null);this.wautosave.showNotice("saved"),e=!1}}.bind(this),12e4))}catch(e){console.debug("[wautosave.save] Unable to access local storage: "+e.message)}},disable:function(){this.wutil.getOption("woltlab.autosave").active&&(n.stop(),n=null,this.wutil.setOption("woltlab.autosave",{active:!1,key:""}))},purge:function(){try{localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)}catch(e){console.debug("[wautosave.purge] Unable to access local storage: "+e.message)}},restore:function(){var e=this.wutil.getOption("woltlab.autosave"),t=null;try{t=localStorage.getItem(e.key)}catch(e){console.debug("[wutil.autosaveRestore] Unable to access local storage: "+e.message)}try{null!==t&&(t=JSON.parse(t))}catch(e){t=null}return null!==t&&t.content?e.lastEditTime&&1e3*e.lastEditTime>t.timestamp?(this.wautosave.purge(),!1):e.prompt?(this.autosave.showNotice("prompt",t),!1):(this.wutil.inWysiwygMode()?this.wutil.setOption("woltlab.originalValue",t.content):i.value=t.content,this.wautosave.showNotice("restored",{timestamp:t.timestamp}),!0):!1},showNotice:function(e,t){if(null===a){a=$('<div class="redactorAutosaveNotice"><span class="redactorAutosaveMessage" /></div>'),a.appendTo(this.$box);var s=function(e){(null===e||"opacity"===e.originalEvent.propertyName)&&(a.hasClass("open")&&null!==e?a.data("callbackOpen")&&a.data("callbackOpen")():(a.data("callbackClose")&&a.data("callbackClose")(),a.removeData("callbackClose"),a.removeData("callbackOpen"),a.removeClass("redactorAutosaveNoticeIcons"),a.empty(),$('<span class="redactorAutosaveMessage" />').appendTo(a)))}.bind(this);a.on("transitionend webkitTransitionEnd",s)}var o="",n="";switch(e){case"prompt":$('<span class="icon icon16 fa-info blue jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.version",{date:new Date(t.timestamp).toLocaleString()})+'"></span>').prependTo(a);var l=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.confirm")+'"></span>').appendTo(a),c=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.discard")+'"></span>').appendTo(a);l.click(function(){this.wutil.replaceText(t.content),s(null),this.wautosave.showNotice("restored",t)}.bind(this)),c.click(function(){this.wautosave.purge(),a.removeClass("open")}.bind(this)),o=WCF.Language.get("wcf.message.autosave.prompt"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(e){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){a.removeClass("open")},3e3)}.bind(this));break;case"restored":$('<span class="icon icon16 fa-info blue jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.version",{date:new Date(t.timestamp).toLocaleString()})+'"></span>').prependTo(a);var l=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.confirm")+'"></span>').appendTo(a),c=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.revert")+'"></span>').appendTo(a);l.click(function(){a.removeClass("open")}),c.click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),function(e){"confirm"===e&&(this.wutil.reset(),this.wautosave.purge(),a.removeClass("open"))}.bind(this))}.bind(this)),o=WCF.Language.get("wcf.message.autosave.restored"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(e){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){l.trigger("click")},3e3)}.bind(this));break;case"saved":if(a.hasClass("open"))return;setTimeout(function(){a.removeClass("open")},2e3),o=WCF.Language.get("wcf.message.autosave.saved")}a.children("span.redactorAutosaveMessage").text(o),a.addClass("open"),"saved"!==e&&WCF.DOMNodeInsertedHandler.execute()},purgeOutdated:function(){var e=0,t=this.wutil.getOption("woltlab.autosave").prefix,a=t+"_wcf_master";try{e=localStorage.getItem(a)}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}if(0!==e){var s,o=Date.now()-6048e5;if(null===e||o>e){var i=new RegExp("^"+t+"_");for(var n in localStorage)if(n.match(i)&&n!==a){s=localStorage.getItem(n);try{s=JSON.parse(s)}catch(e){s={timestamp:0}}if(null===s||!s.timestamp||s.timestamp<o)try{localStorage.removeItem(n)}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}}try{localStorage.setItem(a,Date.now())}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}}}},pause:function(){o=!0},resume:function(){o=!1}}};
-
-// wbbcode.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wbbcode=function(){"use strict";var e=!1;return{init:function(){var t=this.$textarea.wcfIdentify();this.opts.initCallback=function(){window.addEventListener("unload",function(e){this.code.startSync(),this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val()))}.bind(this)),$.browser.msie&&this.$editor.addClass("msie"),this.$textarea[0].setAttribute("data-is-dirty",!0);var e=$.trim(this.wutil.getOption("woltlab.originalValue"));e.length&&(this.wutil.replaceText(e),this.wutil.selectionEndOfEditor()),delete this.opts.woltlab.originalValue,$(document).trigger("resize"),this.wutil.saveSelection();var t=this.$editor[0],i=this.$textarea[0];setTimeout(function(){$.browser.iOS&&0===t.scrollHeight&&(document.activeElement===t||document.activeElement===i)&&document.activeElement.blur()},10)}.bind(this),this.opts.pasteBeforeCallback=$.proxy(this.wbbcode._pasteBeforeCallback,this),this.opts.pasteCallback=$.proxy(this.wbbcode._pasteCallback,this);var i=this.clean.onSync;this.clean.onSync=function(t){return t=t.replace(/\u200C/g,"__wcf_zwnj__"),t=t.replace(/\u200D/g,"__wcf_zwj__"),e===!0?e=!1:t=t.replace(/<p><br([^>]+)?><\/p>/g,"<p>@@@wcf_empty_line@@@</p>"),t=i.call(this,t),t=t.replace(/__wcf_zwnj__/g,"‌"),t.replace(/__wcf_zwj__/g,"‍")}.bind(this),this.wutil.getOption("woltlab.autosaveOnce")&&(this.wutil.saveTextToStorage(),delete this.opts.woltlab.autosaveOnce);var a=this.button.get("table");if(a.length){var o=a.data("dropdown");o.find(".redactor-dropdown-add_head").parent().remove(),o.find(".redactor-dropdown-delete_head").parent().remove(),$('<li class="dropdownDivider" />').insertBefore(o.find(".redactor-dropdown-delete_table").parent()),a.click($.proxy(this.wbbcode._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+t,$.proxy(function(e){e.cancel=!0,this.wbbcode._handleInsertQuote()},this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_code_"+t,$.proxy(function(e){e.cancel=!0,this.wbbcode._handleInsertCode(null,!0)},this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+t,$.proxy(this.wbbcode._keydownCallback,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keyup_"+t,$.proxy(this.wbbcode._keyupCallback,this)),this.code.sync=function(){};var n=$(".redactor-toolbar-tooltip-html:not(.jsWbbcode)").addClass("jsWbbcode").text(WCF.Language.get("wcf.bbcode.button.toggleBBCode")),r=function(e){for(var t=e[0].querySelectorAll("br:not(:empty)"),i=0,a=t.length;a>i;i++)t[0].innerHTML=""};this.code.toggle=function(){if(this.opts.visual)this.code.startSync(),this.code.showCode(),this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val())),this.button.get("html").children("i").removeClass("fa-square-o").addClass("fa-square"),n.text(WCF.Language.get("wcf.bbcode.button.toggleHTML"));else{if(this.$textarea.val(this.wbbcode.convertToHtml(this.$textarea.val())),this.code.offset=this.$textarea.val().length,this.code.showVisual(),this.wutil.fixDOM(),this.wbbcode.fixBlockLevelElements(),this.wutil.selectionEndOfEditor(),this.wbbcode.observeQuotes(),this.wbbcode.observeCodeListings(),this.button.get("html").children("i").removeClass("fa-square").addClass("fa-square-o"),n.text(WCF.Language.get("wcf.bbcode.button.toggleBBCode")),this.wutil.fixDOM(),r(this.$editor),/ Edge\//.test(navigator.userAgent)){var e=this.$editor[0];window.dtdesign=e,e.childElementCount>1&&"​"===e.children[0].innerHTML&&e.removeChild(e.children[0])}this.wutil.saveSelection()}}.bind(this),this.wutil.setOption("clickCallback",function(e){e.target===this.$editor[0]&&this.$editor[0].lastElementChild&&"BLOCKQUOTE"===this.$editor[0].lastElementChild.tagName&&this.wutil.setCaretAfter($(this.$editor[0].lastElementChild)),setTimeout(this.wutil.saveSelection.bind(this),10)}.bind(this));var l=this.opts.verifiedTags.indexOf("ul");l>-1&&this.opts.verifiedTags.splice(l,1),WCF.System.Event.addListener("com.woltlab.wcf.redactor","observe_load_"+t,function(e){this.wbbcode.observeCodeListings(),this.wbbcode.observeQuotes()}.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","fixFormatting_"+t,$.proxy(this.wbbcode.fixFormatting,this))},_tableButtonClick:function(e){var t=$(e.currentTarget);if(t.hasClass("dropact")){var i=this.selection.getBlock()||this.selection.getCurrent(),a=t.data("dropdown");a.children("li").show();var o=a.find("> li > .redactor-dropdown-insert_table").parent();"TD"==i.tagName?o.hide():o.nextAll().hide()}},insertSmiley:function(e,t,i){if(i&&this.wbbcode.registerSmiley(e,t),this.opts.visual){this.wutil.restoreSelection();var a=null;window.getSelection().rangeCount&&window.getSelection().getRangeAt(0).collapsed&&(a=window.getSelection().getRangeAt(0).startContainer,a.nodeType===Node.TEXT_NODE&&(a=a.parentElement),this.utils.isRedactorParent(a)||(a=null)),this.insert.html('<img src="'+t+'" class="smiley" alt="'+e+'" id="redactorSmiley">',!1);var o=document.getElementById("redactorSmiley");if(o.removeAttribute("id"),null!==a){var n=window.getSelection().getRangeAt(0).startContainer;n.nodeType===Node.TEXT_NODE&&(n=n.parentElement),a!==n&&a.appendChild(o)}var r=function(e){return null===e?!1:(e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName||e.nodeType===Node.TEXT_NODE)&&" "===e.textContent?!0:!1},l=o.parentElement;if(!r(o.previousSibling)){var s=document.createTextNode(" ");l.insertBefore(s,o)}if(!r(o.nextSibling)){var s=document.createTextNode(" ");l.lastChild===o?l.appendChild(s):l.insertBefore(s,o.nextSibling)}this.wutil.saveSelection()}else this.wutil.insertAtCaret(" "+e+" ")},registerSmiley:function(e,t){return __REDACTOR_SMILIES[e]?!1:(__REDACTOR_SMILIES[e]=t,!0)},convertFromHtml:function(e){var t={html:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",t),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",t),t.html=__REDACTOR_AMD_DEPENDENCIES.BbcodeFromHTML.convert(t.html),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertFromHtml",t),t.html},convertToHtml:function(e){var t={data:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertToHtml",t),t.data=__REDACTOR_AMD_DEPENDENCIES.BbcodeToHTML.convert(t.data,{attachments:{images:this.wbbcode._getImageAttachments(),thumbnailUrl:this.wutil.getOption("woltlab.attachmentThumbnailUrl"),url:this.wutil.getOption("woltlab.attachmentUrl")}}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",t),t.data},_pasteBeforeCallback:function(e){var t=document.createElement("div");t.innerHTML=e,document.body.appendChild(t);for(var i,a,o,n,r={1:24,2:22,3:18,4:14,5:12,6:10},l=1;6>=l;l++)for(a=t.getElementsByTagName("H"+l);a.length;)i=a[0],o=r[l],i.style.fontSize&&(n=window.getComputedStyle(i),o=Math.round(n.getPropertyValue("font-size").replace(/px$/,"")),o=o>24?24:o>22?22:o>18?22:o>14?14:o>12?14:o>10?12:10),i.outerHTML='<span style="font-size: '+o+'pt" data-verified="redactor" rel="font-size: '+o+'pt">'+i.innerHTML+"</span>";document.body.removeChild(t),a=t.querySelectorAll("div,p,span");for(var l=0,s=a.length;s>l;l++)a[0].className&&(a[0].className="");for(a=t.getElementsByTagName("WBR");a.length;)a[0].parentNode.removeChild(a[0]);return t.innerHTML},_pasteCallback:function(e){return e=e.replace(/style="([^"]+)"/,function(e,t){for(var i=t.split(";"),a=[],o=0,n=i.length;n>o;o++){var r=i[o];r.match(/^\s*background-color/)||a.push(r)}return'style="'+a.join(";")+'"'}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:e}),e},insertAttachment:function(e,t){e=parseInt(e);var i=this.wutil.getOption("woltlab.attachment"+(t?"":"Thumbnail")+"Url"),a=this.wbbcode._getImageAttachments();if(i&&void 0!==a[e]){var o="";t&&(o=' style="width: '+a[e].width+"px; max-height: "+a[e].height+"px; max-width: "+a[e].width+'px;"'),this.wutil.insertDynamic('<img src="'+i.replace(/987654321/,e)+'" class="redactorEmbeddedAttachment'+(t?"":" redactorDisableResize")+'" data-attachment-id="'+e+'"'+o+" />","[attach="+e+(t?",none,"+a[e].width:"")+"][/attach]")}else this.wutil.insertDynamic("[attach="+e+"][/attach]")},removeAttachment:function(e){this.opts.visual&&this.$editor.find("img.redactorEmbeddedAttachment").each(function(t,i){var a=$(i);a.data("attachmentID")==e&&a.remove()})},_getImageAttachments:function(){var e=this.wutil.getOption("woltlab.attachmentImages")||[];if(e.length)return delete this.opts.attachmentImages,e;var t={imageAttachments:{}};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$textarea.wcfIdentify(),t),t.imageAttachments},_keydownCallback:function(e){switch(e.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:case $.ui.keyCode.DOWN:case $.ui.keyCode.ENTER:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case 83:break;default:return}this.selection.get();var t=this.selection.getCurrent(),i=this.selection.getParent();i=i?$(i):i;var a=i?i.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(e.event.which){case $.ui.keyCode.BACKSPACE:if(this.wutil.isCaret()){var o=!1;if(a.length){for(var n=!0,r=0;r<a[0].children.length;r++){var l=a[0].children[r];if("DIV"===l.tagName&&l.textContent.replace(/\u200b/,"").length){n=!1;break}}if(n)o=!0;else{var s=null===this.selection.implicitRange?this.range:this.selection.implicitRange;if(0===s.startOffset)for(var c,d=s.startContainer;null!==(d=d.parentNode);)if(c=d.previousSibling,null!==c){c.nodeType===Node.ELEMENT_NODE&&"HEADER"===c.nodeName&&(o=!0);break}}}else{var h=null===this.selection.implicitRange?this.range:this.selection.implicitRange,u=h.startContainer;if(u.nodeType===Node.TEXT_NODE&&(0===h.startOffset||1===h.startOffset&&"​"===u.textContent)&&(u.previousSibling||(u=u.parentElement)),u.nodeType===Node.ELEMENT_NODE){var v=u.previousSibling;v&&v.nodeType===Node.ELEMENT_NODE&&"BLOCKQUOTE"===v.tagName&&(a=v,o=!0)}}if(o){var m=window.getSelection();m.rangeCount&&m.removeAllRanges();var g=document.createRange();g.selectNode(a[0]||a),m.addRange(g),e.cancel=!0}}break;case $.ui.keyCode.DELETE:if(this.wutil.isCaret()&&this.wutil.isEndOfElement(t)){var f=t.nextElementSibling;if(f&&"BLOCKQUOTE"===f.tagName){var m=window.getSelection();m.rangeCount&&m.removeAllRanges();var g=document.createRange();g.selectNode(f),m.addRange(g),e.cancel=!0}}break;case $.ui.keyCode.DOWN:var b=$(t);if(b.next("blockquote").length)this.caret.setStart(b.next().children("div:first")),e.cancel=!0;else if(i)if(i.next("blockquote").length)this.caret.setStart(i.next().children("div:first")),e.cancel=!0;else if(a.length){var p=b.closest("div",a[0]);p.next().length||(a.next().length?this.caret.setStart(a.next()):this.wutil.setCaretAfter(a),e.cancel=!0)}break;case $.ui.keyCode.ENTER:a.length?(this.keydown.blockquote=!1,this.keydown.enterWithinBlockquote=!0):"KBD"===t.nodeName&&(e.cancel=!0);break;case $.ui.keyCode.UP:if(!i||!a.length)return;var p=$(t).closest("div",a[0]),w=p.prev();if("DIV"===w[0].tagName)return;if("BLOCKQUOTE"===w[0].tagName)return;var C=a.prev();0===C.length?this.wutil.setCaretBefore(a):"BLOCKQUOTE"===C[0].tagName?this.caret.sendEnd(C.children("div:last")):(""==$.trim(C.html())&&C.html(this.opts.invisibleSpace),this.caret.setEnd(C)),e.cancel=!0;break;case $.ui.keyCode.RIGHT:var s=window.getSelection().getRangeAt(0);if(s.startContainer.nodeType===Node.TEXT_NODE&&s.startContainer.length===s.startOffset){if(t=t.parentNode,"KBD"!==t.nodeName)return;var E=this.$editor[0];t.nextElementSibling===E.lastElementChild&&(t=t.nextElementSibling,""===t.textContent&&(t.textContent="​")),t===E.lastElementChild&&this.wutil.selectionEndOfEditor()}break;case 83:if($.browser.mobile)return;var y=!1;if(navigator.platform.match(/^Mac/)?e.event.ctrlKey&&e.event.altKey&&(y=!0):e.event.altKey&&!e.event.ctrlKey&&(y=!0),y){var T={cancel:!1};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","submitEditor_"+this.$textarea.wcfIdentify(),T),T.cancel&&(e.cancel=!0)}}},_keyupCallback:function(e){switch(e.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:this.$editor.find("blockquote").each(function(e,t){var i=$(t);i.children("header").length||i.remove()});break;case $.ui.keyCode.ENTER:for(var t=0,i=this.$editor[0].children.length;i>t;t++){var a=this.$editor[0].children[t];if(a.nodeType===Node.ELEMENT_NODE&&"P"===a.tagName&&!(a.textContent.length>0||a.children.length>1||"BR"===a.children[0].tagName)){for(a=a.children[0];1===a.children.length;)a=a.children[0];if(0===a.children.length&&"BR"===a.tagName){var o=a.parentNode,n=document.createTextNode("​");o.appendChild(n),o.removeChild(a)}}}}},observeQuotes:function(){this.$editor.find(".redactorQuoteEdit").off("click.wbbcode").on("click.wbbcode",$.proxy(this.wbbcode._observeQuotesClick,this))},_observeQuotesClick:function(e){var t=$(e.currentTarget).closest("header"),i=$('<span class="redactor-link-tooltip" />');$('<a href="#">'+WCF.Language.get("wcf.bbcode.quote.edit")+"</a>").click($.proxy(function(t){t.preventDefault(),this.wbbcode._openQuoteEditOverlay($(e.currentTarget).closest("blockquote.quoteBox"),!1),$(".redactor-link-tooltip").remove()},this)).appendTo(i);var a=t.offset();i.css({left:a.left+"px",top:a.top+20+"px"}),$(".redactor-link-tooltip").remove(),i.appendTo(document.body),this.selection.remove()},observeCodeListings:function(){this.$editor.find(".codeBox").each(function(e,t){var i=$(t),a=i.find(".redactorEditCodeBox");a.length||(a=$('<div class="redactorEditCodeBox"><div>'+WCF.Language.get("wcf.bbcode.code.edit")+"</div></div>").insertAfter(i.find("> div > div > h3"))),a.off("click.wbbcode").on("click.wbbcode",function(){this.wbbcode._handleInsertCode(i,!1)}.bind(this))}.bind(this))},_openQuoteEditOverlay:function(t,i){this.modal.load("quote",WCF.Language.get("wcf.bbcode.quote."+(i?"insert":"edit")),400);var a=this.modal.createActionButton(this.lang.get("save"));i?(this.selection.save(),a.click($.proxy(function(){var t=$("#redactorQuoteAuthor").val(),i=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.selection.restore(),e=!0;var a=this.selection.getHtml();this.utils.isEmpty(a)&&(a="");var o=this.wbbcode.insertQuoteBBCode(t,i,a);null!==o&&(a.length||($.browser.mozilla&&o.children("br[type=_moz]").replaceWith("<div>"+this.opts.invisibleSpace+"</div>"),this.caret.setStart(o.children("div")[0]))),this.modal.close()},this))):($("#redactorQuoteAuthor").val(t.data("author")),$("#redactorQuoteLink").val(WCF.String.unescapeHTML(t.attr("cite"))),a.click($.proxy(function(){var e=$("#redactorQuoteAuthor").val();t.data("author",e),t.attr("data-author",e),t.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val())),this.wbbcode._updateQuoteHeader(t),this.modal.close()},this))),this.modal.show()},_updateQuoteHeader:function(e){var t=e.data("author"),i=e.attr("cite");i&&(i=WCF.String.escapeHTML(i)),e.find("> header > h3").empty().append(this.wbbcode._buildQuoteHeader(t,i))},insertQuoteBBCode:function(e,t,i,a){var o="[quote]",n="[/quote]";e&&(o=t?"[quote='"+e+"','"+t+"']":"[quote='"+e+"']");var r=null;if(this.wutil.inWysiwygMode()){var l=WCF.getUUID(),s="";a?s=this.wbbcode.convertToHtml(o+a+n):(s=this.wbbcode.convertToHtml(o+l+n),s=s.replace(l,i.replace(/^<p>/,"").replace(/<\/p>$/,""))),s=s.replace(/^<p>/,"").replace(/<\/p>$/,""),s=s.replace(/<blockquote/,'<blockquote id="'+l+'"'),window.getSelection().rangeCount||(this.wutil.restoreSelection(),window.getSelection().rangeCount||(this.$editor.focus(),window.getSelection().rangeCount||this.wutil.selectionEndOfEditor(),this.wutil.saveSelection())),window.getSelection().getRangeAt(0).deleteContents(),this.wutil.restoreSelection();for(var c=window.getSelection().getRangeAt(0),d=c.startContainer;d;){var h=d.parentNode;if(h===this.$editor[0])break;d=h}if(d&&d.parentNode===this.$editor[0]&&d.innerHTML.length&&("​"===d.innerHTML?this.caret.setEnd(d):this.wutil.setCaretAfter(d)),this.insert.html(s,!1),r=this.$editor.find("#"+l),r.length){var u=r.find("> div");if(1==u.length)""===u[0].innerHTML&&(u[0].innerHTML=this.opts.invisibleSpace);else if($.browser.mozilla){var v=r.find("> div > br[type=_moz]");v.length&&($("<div>"+this.opts.invisibleSpace+"</div>").insertBefore(v),v.remove())}r.removeAttr("id"),this.wutil.setCaretAfter(r[0]);var m=r[0].previousElementSibling;null!==m&&"P"===m.nodeName&&"​"===m.innerHTML&&(m=m.previousElementSibling,null===m||"P"!==m.nodeName||"​"!==m.innerHTML&&"<br>"!==m.innerHTML||m.parentNode.removeChild(m.nextElementSibling))}this.wbbcode.observeQuotes(),this.wbbcode.fixBlockLevelElements(),this.$toolbar.find("a.re-__wcf_quote").removeClass("redactor-button-disabled")}else this.wutil.insertAtCaret(o+a+n);return this.wutil.saveSelection(),r},_buildQuoteHeader:function(e,t){var i="";return!e&&t&&(e=t,t=""),e?(t&&(i+='<a href="'+t+'" tabindex="-1">'),i+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(e)}),t&&(i+="</a>")):i="<small>"+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+"</small>",i},_handleInsertQuote:function(){this.wbbcode._openQuoteEditOverlay(null,!0)},_handleInsertCode:function(e,t){this.modal.load("code",WCF.Language.get("wcf.bbcode.code."+(t?"insert":"edit")),400);var i=this.modal.createActionButton(this.lang.get("save")).addClass("buttonPrimary");if(t){this.selection.get();var a=this.selection.getText();this.selection.save(),this.modal.show();var o=$("#redactorCodeBox").focus();o.val(a),i.click($.proxy(function(){var e=$("#redactorCodeBox"),t=$("#redactorCodeFilename"),i=$("#redactorCodeHighlighter"),a=$("#redactorCodeLineNumber"),o=e.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(o).length)return void(e.next("small.innerError").length||$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(e));var n=$.trim(t.val().replace(/['"]/g,"")),r="[code="+i.val()+","+a.val()+(n.length?",'"+n+"'":"")+"]";r.match(/\[code=([^,]+),(\d+)\]/)&&(r="[code="+RegExp.$2+","+RegExp.$1+"]"),r+=o,r+="[/code]",this.wutil.adjustSelectionForBlockElement(),this.wutil.saveSelection();var l=this.wbbcode.convertToHtml(r);this.buffer.set(),this.insert.html(l,!1);var e=this.$editor.find(".codeBox:not(.jsRedactorCodeBox)");this.wbbcode.observeCodeListings(),this.wbbcode.fixBlockLevelElements(),e.attr("contenteditable","false"),this.wutil.setCaretAfter(e[0]),this.modal.close()},this))}else{var n=this.modal.createActionButton(WCF.Language.get("wcf.global.button.delete"));n.click(function(){this.buffer.set(),e.remove(),this.modal.close()}.bind(this)),this.modal.show();var o=$("#redactorCodeBox").focus(),r=$("#redactorCodeFilename"),l=$("#redactorCodeHighlighter"),s=$("#redactorCodeLineNumber");l.val(e.data("highlighter")),r.val(e.data("filename")||"");var c=e.find("> div > ol");s.val(parseInt(c.prop("start")));var d="";c.children("li").each(function(e,t){d+=$(t).text().replace(/^\u200b$/,"")+"\n"}),o.val(d.replace(/^\n+/,"").replace(/\n+$/,"")),i.click($.proxy(function(){var t=o.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(t).length)return void(o.next("small.innerError").length||$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(o));var i=l.val();e.data("highlighter",i),e.attr("data-highlighter",i);var a=__REDACTOR_CODE_HIGHLIGHTERS[i],n=$.trim(r.val().replace(/['"]/g,""));n?(a+=": "+WCF.String.escapeHTML(n),e.data("filename",n),e.attr("data-filename",n)):(e.removeAttr("data-filename"),e.removeData("filename")),e.data("highlighter",l.val()),e.find("> div > div > h3").html(a);var c=e.find("> div > ol").empty(),d=parseInt(s.val());c.prop("start",d>1?d:1),t=t.split("\n");for(var h="",u=0;u<t.length;u++)h+="<li>"+WCF.String.escapeHTML(t[u])+"</li>";c.append($(h)),this.modal.close()},this))}},fixBlockLevelElements:function(){return},fixFormatting:function(e){for(var t=function(e){e.style.removeProperty("text-align");for(var i=0;i<e.children.length;i++)t(e.children[i])},i=0;i<this.alignment.blocks.length;i++){var a=this.alignment.blocks[i];switch(a.tagName){case"BLOCKQUOTE":a.style.removeProperty("text-align"),t(a.children[0]);break;case"DIV":/\bcodeBox\b/.test(a.className)&&t(a)}}}}};
-
-// wbutton.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wbutton=function(){"use strict";return{_bbcodes:{},init:function(){this._bbcodes={};for(var t=0,e=__REDACTOR_BUTTONS.length;e>t;t++)this.wbutton._addBBCodeButton(__REDACTOR_BUTTONS[t]);for(var n={html:"fa-square-o",bold:"fa-bold",italic:"fa-italic",underline:"fa-underline",deleted:"fa-strikethrough",subscript:"fa-subscript",superscript:"fa-superscript",orderedlist:"fa-list-ol",unorderedlist:"fa-list-ul",outdent:"fa-outdent",indent:"fa-indent",link:"fa-link",alignment:"fa-align-left",table:"fa-table"},i={fontcolor:WCF.Language.get("wcf.bbcode.button.fontColor"),fontfamily:WCF.Language.get("wcf.bbcode.button.fontFamily"),fontsize:WCF.Language.get("wcf.bbcode.button.fontSize"),image:WCF.Language.get("wcf.bbcode.button.image"),subscript:WCF.Language.get("wcf.bbcode.button.subscript"),superscript:WCF.Language.get("wcf.bbcode.button.superscript")},a=this.wutil.getOption("buttons"),o="",t=0,e=a.length;e>t;t++){var s=a[t];if("separator"!=s){var r=this.button.get(s);r.length?(n[s]&&this.button.setAwesome(s,n[s]),"table"===s&&o&&r.parent().insertAfter(this.button.get(o).parent())):this.wbutton._addCoreButton(s,i[s]?i[s]:null,n[s]?n[s]:null,o),o=s}else this.button.get(o).parent().addClass("separator")}if(this.button.addCallback(this.button.get("image"),$.proxy(this.wbutton.insertImage,this)),this.utils.isDesktop()){var l=this.button.addAfter("html","undo",WCF.Language.get("wcf.bbcode.button.undo")),u=this.button.addAfter("undo","redo",WCF.Language.get("wcf.bbcode.button.redo"));this.button.addCallback(l,this.buffer.undo),this.button.addCallback(u,this.buffer.redo),u.parent().addClass("separator")}},_addCoreButton:function(t,e,n,i){var a={title:null===e?t:e};("subscript"===t||"superscript"===t)&&(a.command=t);var o=this.button.build(t,a);$("<li />").append(o).insertAfter(this.button.get(i).parent()),null!==n&&this.button.setAwesome(t,n)},_addBBCodeButton:function(t){var e="__wcf_"+t.name,n=this.button.add(e,t.label);if("tt"===t.name){var i=this.button.build(e,{command:"kbd",title:t.label});$("<li />").append(i).insertAfter(n.parent()),n.parent().remove(),n=i}else this.button.addCallback(n,this.wbutton._insertBBCode);this._bbcodes[e]={name:t.name,voidElement:t.voidElement===!0},t.icon.match(/^fa\-[a-z\-]+$/)?this.button.setAwesome(e,t.icon):n.css("background-image","url("+__REDACTOR_ICON_PATH+t.icon+")")},_insertBBCode:function(t){var e=this._bbcodes[t].name,n={buttonName:t,cancel:!1,redactor:this};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$textarea.wcfIdentify(),n),n.cancel===!1){var i=this.selection.getHtml();if(i=i.replace(/<p>@@@wcf_empty_line@@@<\/p>/g,"<p><br></p>"),this.buffer.set(),this.utils.browser("mozilla")&&!i.length){var a=getSelection().getRangeAt(0).startContainer;a.nodeType===Node.ELEMENT_NODE&&"P"===a.tagName&&"<br>"===a.innerHTML&&a.removeChild(a.children[0])}this._bbcodes[t].voidElement?this.insert.html(i+this.selection.getMarkerAsHtml()+"["+e+"]",!1):this.insert.html("["+e+"]"+i+this.selection.getMarkerAsHtml()+"[/"+e+"]",!1),this.selection.restore()}},insertImage:function(){this.image.show()},_insertImage:function(){var t=$("#redactor-image-link-source"),e=t.val().trim();if(e.length){this.buffer.set();var n=$("#redactor-image-align").val(),i="";("left"===n||"right"===n)&&(i=' style="float: '+n+'"'),this.insert.html('<img src="'+e+'"'+i+">",!1),this.modal.close(),this.observe.images()}else t.next("small.innerError")||$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t)}}};
-
-// wfontcolor.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontcolor=function(){"use strict";return{init:function(){var o=this.button.addDropdown(this.button.get("fontcolor"));this.wfontcolor._createDropdown(o)},_createDropdown:function(o){for(var F=["#000000","#800000","#8B4513","#2F4F4F","#008080","#000080","#4B0082","#696969","#B22222","#A52A2A","#DAA520","#006400","#40E0D0","#0000CD","#800080","#808080","#FF0000","#FF8C00","#FFD700","#008000","#00FFFF","#0000FF","#EE82EE","#A9A9A9","#FFA07A","#FFA500","#FFFF00","#00FF00","#AFEEEE","#ADD8E6","#DDA0DD","#D3D3D3","#FFF0F5","#FAEBD7","#FFFFE0","#F0FFF0","#F0FFFF","#F0F8FF","#E6E6FA","#FFFFFF"],t=$('<li class="redactorColorPallet" />'),r=0,n=F.length;n>r;r++){var e=F[r],l=$('<a href="#" title="'+e+'" />').data("color",e).css("background-color",e);t.append(l),l.click($.proxy(this.wfontcolor._onColorPick,this))}var i=$('<a href="#" />').html(this.lang.get("none")).data("color","none");i.click($.proxy(this.wfontcolor._onColorPick,this)),t.appendTo(o),$('<li class="dropdownDivider" />').appendTo(o),i.appendTo(o),i.wrap("<li />")},_onColorPick:function(o){o.preventDefault();var F=$(o.currentTarget).data("color");"none"===F?this.inline.removeStyleRule("color"):this.inline.format("span","style","color: "+F+";")}}};
-
-// wfontfamily.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontfamily=function(){"use strict";return{init:function(){var a=this.button.addDropdown(this.button.get("fontfamily"));this.wfontfamily._createDropdown(a)},_createDropdown:function(a){var e={Arial:"Arial, Helvetica, sans-serif","Comic Sans MS":"Comic Sans MS, cursive","Courier New":"Consolas, Courier New, Courier, monospace",Georgia:"Georgia, serif","Lucida Sans Unicode":"Lucida Sans Unicode, Lucida Grande, sans-serif",Tahoma:"Tahoma, Geneva, sans-serif","Times New Roman":"Times New Roman, Times, serif","Trebuchet MS":"Trebuchet MS, Helvetica, sans-serif",Verdana:"Verdana, Geneva, sans-serif"},i=this;$.each(e,function(e,n){var o=$('<li><a href="#">'+e+"</a></li>").appendTo(a),r=o.children("a").data("fontFamily",n).css("font-family",n);r.click(function(a){a.preventDefault(),i.inline.format("span","style","font-family: "+$(this).data("fontFamily")+";")})}),$('<li class="dropdownDivider" />').appendTo(a);var n=$('<li><a href="#">'+this.lang.get("none")+"</a></li>").appendTo(a);n.children("a").click(function(a){a.preventDefault(),i.inline.removeStyleRule("font-family")})}}};
-
-// wfontsize.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontsize=function(){"use strict";return{init:function(){var t=this.button.addDropdown(this.button.get("fontsize"));this.wfontsize._createDropdown(t)},_createDropdown:function(t){for(var n=[8,10,12,14,18,24,36],e=this,i=0;i<n.length;i++){var o=n[i],a=$('<li><a href="#">'+o+"</a></li>").appendTo(t),r=a.children("a").data("fontSize",o).css("font-size",o+"pt");o>18&&r.css("line-height","1em"),r.click(function(t){t.preventDefault(),e.inline.format("span","style","font-size: "+$(this).data("fontSize")+"pt;")})}$('<li class="dropdownDivider" />').appendTo(t);var a=$('<li><a href="#">'+this.opts.curLang.none+"</a></li>").appendTo(t);a.children("a").click(function(t){t.preventDefault(),e.inline.removeStyleRule("font-size")})}}};
-
-// wmonkeypatch.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wmonkeypatch=function(){"use strict";return{init:function(){this.wmonkeypatch.alignment(),this.wmonkeypatch.button(),this.wmonkeypatch.caret(),this.wmonkeypatch.clean(),this.wmonkeypatch.code(),this.wmonkeypatch.dropdown(),this.wmonkeypatch.image(),this.wmonkeypatch.indent(),this.wmonkeypatch.inline(),this.wmonkeypatch.insert(),this.wmonkeypatch.keydown(),this.wmonkeypatch.keyup(),this.wmonkeypatch.link(),this.wmonkeypatch.modal(),this.wmonkeypatch.paste(),this.wmonkeypatch.observe(),this.wmonkeypatch.selection(),this.wmonkeypatch.utils(),this.wmonkeypatch.rebuildTemplates(),this.wmonkeypatch.bindEvents(),this.wmonkeypatch.fixWebKit()},bindEvents:function(){function e(e){var t=o(e),i=window.getComputedStyle(e);return{bottom:t.top+e.offsetHeight+parseInt(i.marginBottom),top:t.top-parseInt(i.marginTop)}}var t=this.$textarea.wcfIdentify();this.wutil.setOption("keydownCallback",function(e){var i={cancel:!1,event:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+t,i),i.cancel?!1:!0}),this.wutil.setOption("keyupCallback",function(e){this.wutil.saveSelection();var i={cancel:!1,event:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+t,i),i.cancel?!1:!0}.bind(this)),this.opts.activeButtons&&(this.$editor.off("mouseup.redactor keyup.redactor focus.redactor"),this.$editor.on("mouseup.redactor keyup.redactor focus.redactor",$.proxy(this.observe.buttons,this)),this.$editor.on("keyup.redactor",$.proxy(this.keyup.init,this)));var i=!1;this.$editor.on("mousedown.wmonkeypatch",function(){i=!0}.bind(this)),$(document).on("mouseup.wmonkeypatch",function(){i&&(i=!1,this.wutil.saveSelection())}.bind(this));var n=function(e){return"BLOCKQUOTE"===e.nodeName?!0:"DIV"===e.nodeName&&e.classList.contains("codeBox")?!0:!1},o=function(e){var t=e.getBoundingClientRect();return{left:t.left+document.body.scrollLeft,top:t.top+document.body.scrollTop}},a=function(e,t){var i;if(t)if(i=e.previousSibling,null===i){var n=this.utils.createSpaceElement();e.parentNode.insertBefore(n,e),this.caret.setEnd(n)}else this.caret[i.nodeType===Node.ELEMENT_NODE&&"BR"===i.nodeName?"setBefore":"setAfter"](i);else if(i=e.nextSibling,null===i||i===e.nextElementSibling&&"BR"===i.nodeName){var n=this.utils.createSpaceElement();null===e.nextSibling?e.parentNode.appendChild(n):e.parentNode.insertBefore(n,e.nextSibling),this.caret.setAfter(n)}else this.caret.setBefore(i)}.bind(this),s=this.$editor[0];this.$editor.on("click.wmonkeypatch",function(t){var i=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null;if(t.target===s){for(var r,l,d=0,c=s.childElementCount;c>d;d++)if(l=s.children[d],n(l)&&(r=e(l),!(t.pageY>r.bottom))){if(t.pageY<r.top)break;if(t.pageY>=r.top&&t.pageY<=r.bottom){for(var h=t.pageY-r.top,u=r.bottom-r.top,m=u/2>=h,p=l[m?"previousSibling":"nextSibling"];null!==p;){if(p.nodeType===Node.TEXT_NODE&&""!==p.textContent)return;if(p.nodeType===Node.ELEMENT_NODE&&!n(p))return;p=p[m?"previousSibling":"nextSibling"]}a(l,m)}}if(i=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null,null!==i){var f=i.startContainer;f.nodeType===Node.TEXT_NODE&&(f=f.parentNode),"KBD"===f.nodeName&&(f.nextElementSibling===s.lastElementChild?"SPAN"===s.lastElementChild.nodeName&&""===s.lastElementChild.textContent&&s.removeChild(s.lastElementChild):f.nextSibling===f.nextElementSibling&&("KBD"===f.nextElementSibling.nodeName||"BR"===f.nextElementSibling.nodeName)&&a(f,!1),f===s.lastElementChild&&a(f,!1))}return!1}if("LI"===t.target.nodeName){var g=!1;if(null!==i&&i.collapsed)for(var b=i.startContainer;null!==b&&b!==s;){if("LI"===b.nodeName){g=!0;break}b=b.parentNode}if(!g||null===i){var v=document.createTextNode("​"),w=t.target.children[0];w.appendChild(v),this.caret.setEnd(w)}}else if("BLOCKQUOTE"===t.target.nodeName&&null!==i&&i.collapsed){for(var y=null,b=i.startContainer;null!==b&&b!==s;){if("BLOCKQUOTE"===b.nodeName){y=b;break}b=b.parentNode}null!==y&&y!==t.target&&(t.pageY<=o(y).top?a(y,!0):a(y,!1))}}.bind(this))},alignment:function(){var e=this.alignment.setBlocks;this.alignment.setBlocks=function(t){e.call(this,t),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","fixFormatting_"+this.$textarea.wcfIdentify())}.bind(this)},button:function(){var e=this.button.addDropdown;this.button.addDropdown=function(t,i){var n=e.call(this,t,i);return i||n.addClass("dropdownMenu"),n}.bind(this)},caret:function(){this.caret.set=function(e,t,i,n){if(this.utils.browser("msie")||(this.utils.isMobile()&&this.utils.browser("webkit")&&navigator.userAgent.match(/(iPad|iPhone|iPod)/i)?document.activeElement!==this.$editor[0]&&this.$editor.focus():this.$editor.focus()),e=e[0]||e,i=i[0]||i,this.utils.isBlockTag(e.tagName)&&""===e.innerHTML&&(e.innerHTML=this.opts.invisibleSpace),"BR"==e.tagName&&this.opts.linebreaks===!1){var o=$(this.opts.emptyHtml)[0];$(e).replaceWith(o),e=o,i=e}this.selection.get();try{this.range.setStart(e,t),this.range.setEnd(i,n)}catch(e){}this.selection.addRange()}.bind(this),this.caret.setOffset=function(e,t){"undefined"==typeof t&&(t=e),this.focus.isFocused()||this.focus.setStart();for(var i,n=document.createRange(),o=document.getSelection(),a=0,s=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);i=s.nextNode();)if(a+=i.nodeValue.length,(a>e||e===t&&a===e)&&(n.setStart(i,i.nodeValue.length+e-a),e=1/0),a>=t){n.setEnd(i,i.nodeValue.length+t-a);break}o.removeAllRanges(),o.addRange(n)}.bind(this)},clean:function(){var e=function(e){return e=e.replace(/\u201D/g,"__wcf_preserve_character_1__"),e=e.replace(/\u201C/g,"__wcf_preserve_character_2__"),e=e.replace(/\u2018/g,"__wcf_preserve_character_3__"),e=e.replace(/\u2019/g,"__wcf_preserve_character_4__")},t=function(e){return e=e.replace(/__wcf_preserve_character_1__/g,"”"),e=e.replace(/__wcf_preserve_character_2__/g,"“"),e=e.replace(/__wcf_preserve_character_3__/g,"‘"),e=e.replace(/__wcf_preserve_character_4__/g,"’")},i=this.clean.onPaste;this.clean.onPaste=function(n,o){return this.opts.replaceDivs=!0,n=e(n),n=i.call(this,n,o),this.opts.replaceDivs=!1,t(n)}.bind(this),this.clean.onPasteRemoveEmpty=function(e){return e.replace(/<br\s?\/?>$/i,"")};var n=this.clean.removeSpaces;this.clean.removeSpaces=function(e){return e=e.replace(/\u200C/g,"__wcf_zwnj__"),e=e.replace(/\u200D/g,"__wcf_zwj__"),e=n.call(this,e),e=e.replace(/__wcf_zwnj__/g,"‌"),e.replace(/__wcf_zwj__/g,"‍")};var o=this.clean.onSet;this.clean.onSet=function(i){return i=e(i),i=o.call(this,i),t(i)}.bind(this)},code:function(){var e=this.code.startSync;this.code.startSync=function(){this.code.syncCode=void 0,e.call(this)}.bind(this);var t=this.code.textareaIndenting;this.code.textareaIndenting=function(e){return 9!==e.keyCode||e.ctrlKey?!0:t.call(this,e)}.bind(this);var i=this.code.showCode;this.code.showCode=function(){var e=this.$editor.innerHeight(),t=null;this.$textarea.is(":visible")||(t=this.$textarea.parentsUntil(":visible").last(),t.show()),i.call(this),this.$textarea[0].style.setProperty("height",e+"px"),null!==t&&t.hide()}.bind(this)},dropdown:function(){this.dropdown.build=function(e,t,i){t.addClass("dropdownMenu"),$.each(i,function(e,i){if("dropdownDivider"==e)$('<li class="dropdownDivider" />').appendTo(t);else{var n=$("<li />"),o=$('<a href="#" class="redactor-dropdown-'+e+'">'+i.title+"</a>");o.on("click",$.proxy(function(t){t.preventDefault();var n="func",o=i.func;i.command?(n="command",o=i.command):i.dropdown&&(n="dropdown",o=i.dropdown),this.button.onClick(t,e,n,o),this.dropdown.hideAll()},this)),o.appendTo(n),n.appendTo(t)}}.bind(this))}.bind(this);var e=this.dropdown.show;this.dropdown.show=$.proxy(function(i,n){var o=this.button.get(n).data("dropdown");t(o),$.browser.iOS&&this.wutil.saveSelection(),e.call(this,i,n),o.off("mouseover mouseout")},this);var t=function(e){if(!e.hasClass("dropdownMenu")){e.addClass("dropdownMenu");for(var t=e.children("a").detach(),i=0;i<t.length;i++){var n=$("<li />").appendTo(e);n.append(t[i])}}}},image:function(){var e=this.image.setEditable;this.image.setEditable=function(t){t.hasClass("smiley")||(t.off("click.redactor touchstart.redactor"),e.call(this,t))}.bind(this);var t=this.image.loadEditableControls;this.image.loadEditableControls=function(e){if("redactor-image-box"===e[0].parentNode.id)return $("#redactor-image-resizer",this.$editor[0]);var i=t.call(this,e);return e.hasClass("redactorDisableResize")&&i!==!1&&i.hide(),i}.bind(this),this.image.show=function(){this.modal.load("image",this.lang.get("image"),0);var e=this.modal.createActionButton(this.lang.get("insert"));e.click($.proxy(this.wbutton._insertImage,this)),$("#redactorImageLinkHrefContainer").hide(),this.selection.save(),this.modal.show()}.bind(this),this.image.showEdit=function(e){this.modal.load("imageEdit",this.lang.get("edit"),0),this.image.buttonSave=this.modal.createActionButton(this.lang.get("save")),this.image.buttonSave.click(function(){this.image.update(e)}.bind(this));var t=e.closest("a",this.$editor[0]);$("#redactor-image-link-source").val(e.attr("src")),$("#redactor-image-link-href").val(t.length?t.attr("href"):""),$("#redactor-image-align").val(e.css("float")),this.modal.show(),setTimeout(function(){$(".redactor-link-tooltip").remove()},1)}.bind(this),this.image.update=function(e){this.image.hideResize(),this.buffer.set(),e.attr("src",$("#redactor-image-link-source").val()),this.image.setFloating(e);var t=$("#redactor-image-link-href").val().trim(),i=e.closest("a",this.$editor[0]);if(i.length)if(""===t){i=i[0];for(var n=i.children.length,o=i.parentNode;n--;)o.insertBefore(i.children[0],i);o.removeChild(i)}else i.attr("href",t);else""!==t&&(i=document.createElement("a"),i.href=t,e[0].parentNode.insertBefore(i,e[0]),i.appendChild(e[0]));this.modal.close(),this.observe.images()}.bind(this)},indent:function(){var e=this.indent.increase;this.indent.increase=function(){var t=this.selection.getBlock();t&&"LI"===t.tagName&&t.parentElement.firstChild!==t&&e.call(this)}.bind(this)},inline:function(){var e=this.inline.format;this.inline.format=function(t,i,n){$.browser.iOS&&this.wutil.restoreSelection(),e.call(this,t,i,n)}.bind(this);var t=this.inline.removeStyleRule;this.inline.removeStyleRule=function(e){$.browser.iOS&&this.wuil.restoreSelection(),t.call(this,e)}.bind(this)},insert:function(){var e=$.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"),t=function(e){var t=this.$editor.html();this.utils.isEmpty(t)?(this.$editor.focus(),this.wutil.selectionEndOfEditor()):document.activeElement!==this.$editor[0]&&this.wutil.restoreSelection()}.bind(this),i=function(){for(var e=!1,t=this.$editor[0].querySelector('span:not([data-verified="redactor"])'),i=0,n=t.length;n>i;i++)t[i].outerHTML=t[i].innerHTML,e=!0;e&&this.wutil.saveSelection()}.bind(this),n=this.insert.html;if(this.insert.html=function(o,a){t(o),n.call(this,o,a),this.wutil.saveSelection(),e&&setTimeout(function(){i()},10)}.bind(this),navigator.userAgent.match(/safari/i)){var o=this.insert.execHtml;this.insert.execHtml=function(e){try{o.call(this,e)}catch(e){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+e.message)}}.bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=!1;var e=this.keydown.onTab;this.keydown.onTab=function(t,i){var n=this.selection.getBlock();return n&&"LI"===n.nodeName?e.call(this,t,i):!0}.bind(this);var t=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=function(){this.keydown.enterWithinBlockquote?this.keydown.enterWithinBlockquote=!1:t.call(this)}.bind(this);var i=this.keydown.setupBuffer;this.keydown.setupBuffer=function(e,t){return!this.keydown.ctrl||89!==t||e.shiftKey||e.altKey||0===this.opts.rebuffer.length?void i.call(this,e,t):(e.preventDefault(),void this.buffer.redo())}.bind(this)},keyup:function(){var e=this.keyup.replaceToParagraph;this.keyup.replaceToParagraph=function(t){"DIV"===this.keyup.current.nodeName&&this.keyup.current.parentNode&&"BLOCKQUOTE"===this.keyup.current.parentNode.nodeName||e.call(this,t)}.bind(this)},link:function(){var e=this.link.insert;this.link.insert=function(){e.call(this),this.selection.get();var t=this.selection.getCurrent();t.nodeType===Node.TEXT_NODE&&(t=t.parentNode),"A"===t.nodeName&&this.caret.setAfter(t)}.bind(this)},modal:function(){this.modal.dialog=null;var e=this.modal.addTemplate;this.modal.addTemplate=function(t,i){"table"!==t&&e.call(this,t,i)}.bind(this),this.modal.build=function(){},this.modal.load=function(e,t,i){this.modal.templateName=e,this.modal.title=t,this.modal.dialog=$("<div />").hide().appendTo(document.body),this.modal.dialog.html(this.modal.getTemplate(this.modal.templateName)),this.$modalFooter=null}.bind(this),this.modal.show=function(){this.modal.dialog.wcfDialog({onClose:$.proxy(this.modal.close,this),title:this.modal.title}),this.modal.dialog.find("input:first").focus()}.bind(this);var t=this.modal.createButton;this.modal.createButton=function(e,i){return null===this.$modalFooter&&(this.$modalFooter=$('<div class="formSubmit" />').appendTo(this.modal.dialog),this.modal.dialog.addClass("dialogForm")),t.call(this,e,i)}.bind(this),this.modal.close=function(){if(null!==this.modal.dialog){try{this.modal.dialog.wcfDialog("close")}catch(e){}finally{if(this.modal.dialog){var e=this.modal.dialog.parents(".dialogContainer:eq(0)");e.length&&setTimeout(function(){e.remove()},500)}}this.modal.dialog=null}}.bind(this),this.modal.createCancelButton=function(){return $()},this.modal.createDeleteButton=function(){return $()}},observe:function(){var e=function(e,t,i,n,o,a){var s=this.$toolbar.find(i);if(e&&0!=e.closest(t,this.$editor[0]).length)s[n?"removeClass":"addClass"](o);else{if(a&&!this.opts.visual)return;s[n?"addClass":"removeClass"](o)}}.bind(this),t=this.observe.buttons;this.observe.buttons=function(i,n){t.call(this,i,n);var o=this.selection.getCurrent();o!==!1&&(o.nodeType===Node.TEXT_NODE&&(o=o.parentNode),o!==this.$editor[0]&&(o=$(o),e(o,"ul, ol","a.re-indent, a.re-outdent",!0,"redactor-button-disabled"),e(o,"kbd","a.re-__wcf_tt",!1,"redactor-act"),e(o,"blockquote.quoteBox","a.re-__wcf_quote",!1,"redactor-button-disabled",!0),e(o,"sub","a.re-subscript",!1,"redactor-act"),e(o,"sup","a.re-superscript",!1,"redactor-act")))}.bind(this);var i=this.observe.load;this.observe.load=function(){i.call(this),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","observe_load_"+this.$textarea.wcfIdentify())}.bind(this);var n=this.observe.showTooltip;this.observe.showTooltip=function(e){var t=$(e.target);t.hasClass("redactorQuoteEdit")||n.call(this,e)}.bind(this)},paste:function(){var e=this.paste.createPasteBox;this.paste.createPasteBox=function(){if($.browser.iOS){var t=0;if(window.getSelection().rangeCount){var i=window.getSelection().getRangeAt(0).endContainer;i.nodeType!==Node.ELEMENT_NODE&&(i=i.parentElement),i=$(i),t=$(i).offset().top}else t=$(window).scrollTop();this.$pasteBox=$("<div>").html("").attr("contenteditable","true").css({position:"fixed",top:t+"px",fontSize:"16px"}),this.$box.parent().append(this.$pasteBox),this.$pasteBox.focus()}else e.call(this)}.bind(this);var t=function(){var e=window.getSelection();if(e.rangeCount){var t=e.getRangeAt(0);if(t.collapsed){var i=t.startContainer;if(i.nodeType===Node.ELEMENT_NODE&&"DIV"===i.tagName){var n=i.parentNode;if(null!==n&&"BLOCKQUOTE"===n.tagName&&n.classList.contains("quoteBox")){var o=t.startContainer.childNodes[t.startContainer.childNodes.length-1],a=document.createRange();a.setStart(t.startContainer.childNodes[0],0),a.setEnd(o,o.length),a.collapse(!1),e.removeAllRanges(),e.addRange(a)}}}}},i=this.paste.insert;this.paste.insert=function(e){t(),i.call(this,e),setTimeout(function(){if(this.wutil.fixDOM(),$.browser.msie)getSelection().getRangeAt(0).collapse(!1);else if($.browser.mozilla){var e=getSelection().getRangeAt(0);e.startContainer===this.$editor[0]&&e.endContainer===this.$editor[0]&&this.wutil.selectionEndOfEditor()}this.wutil.saveSelection()}.bind(this),20)}.bind(this)},selection:function(){this.selection.implicitRange=null;var e=function(e,t){var i=t.nextSibling;null!==i&&i.nodeType===Node.TEXT_NODE&&0===i.length&&$(i).remove();var n=null;("selection-marker-1"===t.id&&!this.$editor.find("#selection-marker-2").length||"nodes-marker-1"===t.id&&!this.$editor.find("#nodes-marker-2").length)&&(n=t.previousSibling),t.innerHTML.length?t.outerHTML=t.innerHTML:t.parentNode.removeChild(t),null!==n?(this.selection.implicitRange=document.createRange(),this.selection.implicitRange.setStart(n,n.length),this.selection.implicitRange.setEnd(n,n.length)):this.selection.implicitRange=null}.bind(this);this.selection.removeMarkers=function(){this.$editor.find("span.redactor-selection-marker").each(e)}.bind(this),this.selection.removeNodesMarkers=function(){$(document).find("span.redactor-nodes-marker").each(e),this.$editor.find("span.redactor-nodes-marker").each(e)}.bind(this)},utils:function(){this.utils.removeEmpty=function(e,t){}},rebuildTemplates:function(){this.opts.modal.image='<fieldset id="redactor-modal-image-edit"><dl><dt><label for="redactor-image-link-source">'+WCF.Language.get("wcf.bbcode.image.source")+'</label></dt><dd><input type="text" id="redactor-image-link-source" class="long"  /></dd></dl><dl id="redactorImageLinkHrefContainer"><dt><label for="redactor-image-link-href">'+this.lang.get("link")+'</label></dt><dd><input type="text" id="redactor-image-link-href" class="long"  /></dd></dl><dl><dt><label for="redactor-image-align">'+this.opts.curLang.image_position+'</label></dt><dd><select id="redactor-image-align"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+this.lang.get("left")+'</option><option value="right">'+this.lang.get("right")+"</option></select></dd></dl></fieldset>",this.opts.modal.imageEdit=this.opts.modal.image,this.opts.modal.link='<fieldset id="redactor-modal-link"><dl><dt><label for="redactor-link-url">URL</label></dt><dd><input type="url" id="redactor-link-url" class="long" /></dd></dl><dl><dt><label for="redactor-link-url-text">'+this.lang.get("text")+'</label></dt><dd><input type="text" id="redactor-link-url-text" class="long" /></dd></dl></fieldset>',this.opts.modal.quote='<fieldset><dl><dt><label for="redactorQuoteAuthor">'+WCF.Language.get("wcf.bbcode.quote.edit.author")+'</label></dt><dd><input type="text" id="redactorQuoteAuthor" class="long" /></dd></dl><dl><dt><label for="redactorQuoteLink">'+WCF.Language.get("wcf.bbcode.quote.edit.link")+'</label></dt><dd><input type="text" id="redactorQuoteLink" class="long" /></dd></dl></fieldset>';var e="";$.each(__REDACTOR_CODE_HIGHLIGHTERS,function(t,i){return"plain"===t?!0:void(e+='<option value="'+t+'">'+i+"</option>")}),this.opts.modal.code="<fieldset><legend>"+WCF.Language.get("wcf.bbcode.code.settings")+'</legend><dl><dt><label for="redactorCodeHighlighter">'+WCF.Language.get("wcf.bbcode.code.highlighter")+'</label></dt><dd><select id="redactorCodeHighlighter"><option value="plain">'+WCF.Language.get("wcf.bbcode.code.highlighter.none")+"</option>"+e+"</select><small>"+WCF.Language.get("wcf.bbcode.code.highlighter.description")+'</small></dd></dl><dl><dt><label for="redactorCodeLineNumber">'+WCF.Language.get("wcf.bbcode.code.lineNumber")+'</label></dt><dd><input type="number" id="redactorCodeLineNumber" min="1" max="99999" value="1" /><small>'+WCF.Language.get("wcf.bbcode.code.lineNumber.description")+'</small></dd></dl><dl><dt><label for="redactorCodeFilename">'+WCF.Language.get("wcf.bbcode.code.filename")+'</label></dt><dd><input type="text" id="redactorCodeFilename" value="" class="long" /><small>'+WCF.Language.get("wcf.bbcode.code.filename.description")+"</small></dd></dl></fieldset><fieldset><legend>"+WCF.Language.get("wcf.bbcode.code")+'</legend><dl class="wide"><dt></dt><dd><textarea id="redactorCodeBox" class="long monospace" rows="12" /></dd></dl></fieldset>',this.opts.modal.table='<fieldset id="redactor-modal-table-insert"><dl><dt><label for="redactor-table-rows">'+this.lang.get("rows")+'</label></dt><dd><input type="number" size="5" value="2" min="1" id="redactor-table-rows" class="tiny" /></dd></dl><dl><dt><label for="redactor-table-columns">'+this.lang.get("columns")+'</label></dt><dd><input type="number" size="5" value="3" min="1" id="redactor-table-columns" class="tiny" /></dd></dl></fieldset>'},fixWebKit:function(){return}}};
-
-// wupload.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wupload=function(){"use strict";return{_boundGlobalUploadEvents:!1,_dropArea:{},_timer:null,_isDragging:!1,_isFile:!1,init:function(){var t=".redactor_"+this.$textarea.wcfIdentify();$(document).on("dragover"+t,$.proxy(this.wupload._dragOver,this)),$(document).on("dragleave"+t,$.proxy(this.wupload._dragLeave,this)),$(document).on("drop"+t,function(t){t.preventDefault(),this.wupload._revertDropArea(void 0,this.$textarea.wcfIdentify())}.bind(this)),this.wupload._boundGlobalUploadEvents||(this.wupload._boundGlobalUploadEvents=!0,$(document).on("dragend",function(t){t.preventDefault()})),WCF.System.Event.addListener("com.woltlab.wcf.attachment","autoInsert_"+this.$textarea.wcfIdentify(),$.proxy(this.wupload.insertPastedImageAttachment,this))},_dragOver:function(t){if(t=t.originalEvent,this.$editor.is(":visible")&&t.dataTransfer&&t.dataTransfer.types){var e=!1;for(var a in t.dataTransfer)if(/^moz/.test(a)){e=!0;break}if(this.wupload._isFile=!1,e)"application/x-moz-file"===t.dataTransfer.types[0]&&(this.wupload._isFile=!0);else for(var i=0;i<t.dataTransfer.types.length;i++)if("Files"===t.dataTransfer.types[i]){this.wupload._isFile=!0;break}if(this.wupload._isFile){if(this.wupload._isFile=!0,t.preventDefault(),!this.wupload._isDragging){var r=this.$textarea.wcfIdentify();void 0===this.wupload._dropArea[r]&&(this.wupload._dropArea[r]=$('<div class="redactorDropArea">'+WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")+"</div>").hide().appendTo(document.body),this.wupload._dropArea[r].on("dragover",$.proxy(this.wupload._hoverDropArea,this)).on("dragleave",$.proxy(this.wupload._revertDropArea,this)).on("drop",$.proxy(this.wupload._drop,this)));var o=this.wutil.inWysiwygMode()?this.$editor.getDimensions("outer"):this.$textarea.getDimensions("outer"),s=this.wutil.inWysiwygMode()?this.$editor.getOffsets("offset"):this.$textarea.getOffsets("offset");this.wupload._dropArea[r].css({height:o.height+"px",left:s.left+"px",lineHeight:o.height+"px",top:s.top+"px",width:o.width+"px"}).show(),this.wupload._isDragging=!0}t.preventDefault()}}},_hoverDropArea:function(t){this.wupload._dropArea[this.$textarea.wcfIdentify()].addClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropNow"))},_revertDropArea:function(t,e){if(this.wupload._isFile){var a=e||this.$textarea.wcfIdentify();this.wupload._dropArea[a].removeClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")),e&&this.wupload._dropArea[a].hide()}},_dragLeave:function(){this.wupload._isDragging&&this.wupload._isFile&&(null===this.wupload._timer?this.wupload._timer=new WCF.PeriodicalExecuter(function(t){t.stop(),this.wupload._isDragging||this.wupload._dropArea[this.$textarea.wcfIdentify()].hide()}.bind(this),100):this.wupload._timer.resume(),this.wupload._isDragging=!1)},_drop:function(t){if(this.wupload._isFile&&(t=t.originalEvent||t,t.dataTransfer&&t.dataTransfer.files.length)){t.preventDefault();var e=this.$textarea.wcfIdentify();this.wupload._revertDropArea(void 0,e);for(var a=0;a<t.dataTransfer.files.length;a++)WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+e,{file:t.dataTransfer.files[a]})}},pasteClipboardUploadMozilla:function(){this.$editor.find("img[data-mozilla-paste-image]").each($.proxy(function(t,e){var a=$(e),i=a.prop("src").split(","),r=i[0].split(";")[0].split(":")[1],o=i[1],s={blob:WCF.base64toBlob(o,r),uploadID:null};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+this.$textarea.wcfIdentify(),s),a.replaceWith('<span class="redactor-pastedImageFromClipboard-'+s.uploadID+'" />')},this))},insertPastedImageAttachment:function(t){var e=this.$editor.find("span.redactor-pastedImageFromClipboard-"+t.uploadID);e.before(t.attachment),e.remove()}}};
-
-// wutil.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wutil=function(){"use strict";var t=null,e=null,n=null;return{_autosaveWorker:null,init:function(){t=this.$editor[0],n=this.$textarea[0],this.$textarea.parents("form").submit($.proxy(this.wutil.submit,this))},saveSelection:function(t){var n=window.getSelection();n.rangeCount?e=n.getRangeAt(0):t&&(e=null)},restoreSelection:function(){if(document.activeElement!==t&&t.focus(),null!==e){var n=window.getSelection();n.removeAllRanges(),n.addRange(e),e=null}},clearSelection:function(){e=null},getSelection:function(){return e},insertAtCaret:function(t){if(this.opts.visual)return console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode."),!1;n.focus();var e=this.$textarea.getCaret();-1==e&&console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.");var i=n.value;return i=i.substr(0,e)+t+i.substr(e),n.value=i,!0},insertDynamic:function(t,e){this.wutil.inWysiwygMode()?this.insert.html(t,!1):((void 0===e||null===e)&&(e=t),this.wutil.insertAtCaret(e))},setOption:function(t,e){-1!==t.indexOf(".")?(t=t.split(".",2),this.opts[t[0]][t[1]]=e):this.opts[t]=e},getOption:function(t){if(-1!==t.indexOf(".")){if(t=t.split(".",2),this.opts[t[0]][t[1]])return this.opts[t[0]][t[1]]}else if(this.opts[t])return this.opts[t];return null},inPlainMode:function(){return!this.opts.visual},inWysiwygMode:function(){return this.opts.visual},replaceRangesWith:function(t){getSelection().removeAllRanges(),getSelection().addRange(t)},getText:function(){return this.wutil.inWysiwygMode()&&(this.code.startSync(),n.value=this.wbbcode.convertFromHtml(n.value).trim()),n.value.trim()},isEmptyEditor:function(){return this.opts.visual?this.utils.isEmpty(t.innerHTML):""===n.value.trim()},submit:function(){this.wutil.inWysiwygMode()&&(this.code.startSync(),n=this.wbbcode.convertFromHtml(n.value).trim()),this.wautosave.purge()},reset:function(){this.opts.visual&&(t.innerHTML="",this.wutil.saveSelection()),n.value="",WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:n.id})},autosaveEnable:function(t){this.wautosave.enable(t)},saveTextToStorage:function(t){this.wautosave.save(t)},autosaveDisable:function(){return this.wautosave.disable()},autosavePurge:function(){this.wautosave.purge()},autosaveRestore:function(){return this.wautosave.restore()},autosaveShowNotice:function(t,e){this.wautosave.showNotice(t,e)},autosavePurgeOutdated:function(){this.wautosave.purgeOutdated()},autosavePause:function(){this.wautosave.pause()},autosaveResume:function(){this.wautosave.resume()},buttonReplace:function(t,e,n,i,o){var r=this.buttonGet(t),s=this.buttonAddAfter(t,e,n,i,o);return r.parent().hasClass("separator")&&s.parent().addClass("separator"),r.parent().remove(),s},removeZeroWidthSpace:function(t){return t.replace(/\u200b/g,"")},getSource:function(){return this.$textarea},getName:function(){return n.id},selectionEndOfEditor:function(){var e=t.lastElementChild;if(null===e||"BLOCKQUOTE"===e.nodeName||"DIV"===e.nodeName&&e.classList.contains("codeBox")||"KBD"===e.nodeName){var n=this.utils.createSpaceElement();t.appendChild(n),this.caret.setEnd(n),this.wutil.saveSelection()}else this.focus.setEnd()},adjustSelectionForBlockElement:function(){if(document.activeElement!==t&&this.wutil.restoreSelection(),window.getSelection().rangeCount){var e=window.getSelection().getRangeAt(0);if(e.collapsed){var n=e.startContainer;if(n.nodeType===Node.TEXT_NODE&&n.parentNode&&n.parentNode.parentNode===t)return;for(;n&&n!==t;)n=n.parentNode;n.parentNode===t?this.caret.setAfter(n):this.wutil.selectionEndOfEditor()}}},isCaret:function(){return this.selection.get(),this.range.collapsed},isEndOfElement:function(t){var e=this.selection.implicitRange;if(null===e&&(this.selection.get(),e=this.range),!this.wutil.isCaret())return!1;if(e.endContainer.nodeType===Node.TEXT_NODE&&e.endOffset<e.endContainer.length)return!1;if(!this.wutil.isNodeWithin(e.endContainer,t))return!1;for(var n=e.endContainer;n!==t;){if(n.nextSibling)return!1;n=n.parentNode}return!0},isNodeWithin:function(e,n){for(;e&&e!==t;){if(e===n)return!0;e=e.parentNode}return!1},containsTag:function(t,e){if(t.nodeType===Node.ELEMENT_NODE){if(t.nodeName===e)return!0}else if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var n=0,i=t.childElementCount;i>n;n++)if(this.wutil.containsTag(t.childNodes[n],e))return!0;return!1},replaceText:function(t){var e=$(document),i=e.scrollTop(),o=!1;this.wutil.inWysiwygMode()&&(this.code.toggle(),o=!0),n.value=t,o&&(this.code.toggle(),e.scrollTop(i)),e.trigger("resize")},setCaretBefore:function(t){this.caret.setBefore(t)},setCaretAfter:function(t){this.caret.setAfter(t)},_setCaret:function(t,e){this.caret[e?"setBefore":"setAfter"](t)},fixDOM:function(){for(var e,n=t.querySelectorAll("li:empty"),i=0,o=n.length;o>i;i++)e=n[i].parentNode,e.childElementCount>1&&e.removeChild(n[i]);for(n=t.getElementsByTagName("INPUT");n.length;)n[0].parentNode.removeChild(n[0])}}};
-
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js
deleted file mode 100644 (file)
index ac3dae5..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Provides a text color picker, this is actually a heavily modified version of Imperavi's 'fontcolor' plugin.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wfontcolor = function() {
-       "use strict";
-       
-       return {
-               /**
-                * Initializes the RedactorPlugins.wfontcolor plugin.
-                */
-               init: function() {
-                       var $dropdown = this.button.addDropdown(this.button.get('fontcolor'));
-                       this.wfontcolor._createDropdown($dropdown);
-               },
-               
-               /**
-                * Creates the font color dropdown.
-                * 
-                * @param       jQuery          dropdown
-                */
-               _createDropdown: function(dropdown) {
-                       var $colors = [
-                               '#000000', '#800000', '#8B4513', '#2F4F4F', '#008080', '#000080', '#4B0082', '#696969',
-                               '#B22222', '#A52A2A', '#DAA520', '#006400', '#40E0D0', '#0000CD', '#800080', '#808080',
-                               '#FF0000', '#FF8C00', '#FFD700', '#008000', '#00FFFF', '#0000FF', '#EE82EE', '#A9A9A9',
-                               '#FFA07A', '#FFA500', '#FFFF00', '#00FF00', '#AFEEEE', '#ADD8E6', '#DDA0DD', '#D3D3D3',
-                               '#FFF0F5', '#FAEBD7', '#FFFFE0', '#F0FFF0', '#F0FFFF', '#F0F8FF', '#E6E6FA', '#FFFFFF'
-                       ];
-                       
-                       var $container = $('<li class="redactorColorPallet" />');
-                       for (var $i = 0, $length = $colors.length; $i < $length; $i++) {
-                               var $color = $colors[$i];
-                               
-                               var $swatch = $('<a href="#" title="' + $color + '" />').data('color', $color).css('background-color', $color);
-                               $container.append($swatch);
-                               $swatch.click($.proxy(this.wfontcolor._onColorPick, this));
-                       }
-                       
-                       var $elNone = $('<a href="#" />').html(this.lang.get('none')).data('color', 'none');
-                       $elNone.click($.proxy(this.wfontcolor._onColorPick, this));
-                       
-                       $container.appendTo(dropdown);
-                       $('<li class="dropdownDivider" />').appendTo(dropdown);
-                       $elNone.appendTo(dropdown);
-                       $elNone.wrap('<li />');
-               },
-               
-               /**
-                * Handles click on a specific text color.
-                * 
-                * @param       object          event
-                */
-               _onColorPick: function(event) {
-                       event.preventDefault();
-                       
-                       var $color = $(event.currentTarget).data('color');
-                       if ($color === 'none') {
-                               this.inline.removeStyleRule('color');
-                       }
-                       else {
-                               this.inline.format('span', 'style', 'color: ' + $color + ';');
-                       }
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontfamily.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontfamily.js
deleted file mode 100644 (file)
index 8cfa247..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Provides a font family picker, this is actually a heavily modified version of Imperavi's 'fontfamily' plugin.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wfontfamily = function() {
-       "use strict";
-       
-       return {
-               /**
-                * Initializes the RedactorPlugins.wfontsize plugin.
-                */
-               init: function () {
-                       var $dropdown = this.button.addDropdown(this.button.get('fontfamily'));
-                       this.wfontfamily._createDropdown($dropdown);
-               },
-               
-               /**
-                * Creates the font family dropdown.
-                * 
-                * @param       jQuery          dropdown
-                */
-               _createDropdown: function(dropdown) {
-                       var $fonts = {
-                               'Arial': "Arial, Helvetica, sans-serif",
-                               'Comic Sans MS': "Comic Sans MS, cursive",
-                               'Courier New': "Consolas, Courier New, Courier, monospace",
-                               'Georgia': "Georgia, serif",
-                               'Lucida Sans Unicode': "Lucida Sans Unicode, Lucida Grande, sans-serif",
-                               'Tahoma': "Tahoma, Geneva, sans-serif",
-                               'Times New Roman': "Times New Roman, Times, serif",
-                               'Trebuchet MS': "Trebuchet MS, Helvetica, sans-serif",
-                               'Verdana': "Verdana, Geneva, sans-serif"
-                       };
-                       var self = this;
-                       $.each($fonts, function(title, fontFamily) {
-                               var $listItem = $('<li><a href="#">' + title + '</a></li>').appendTo(dropdown);
-                               var $item = $listItem.children('a').data('fontFamily', fontFamily).css('font-family', fontFamily);
-                               $item.click(function(event) {
-                                       event.preventDefault();
-                                       
-                                       self.inline.format('span', 'style', 'font-family: ' + $(this).data('fontFamily') + ';');
-                               });
-                       });
-                       
-                       $('<li class="dropdownDivider" />').appendTo(dropdown);
-                       var $listItem = $('<li><a href="#">' + this.lang.get('none') + '</a></li>').appendTo(dropdown);
-                       $listItem.children('a').click(function(event) {
-                               event.preventDefault();
-                               
-                               self.inline.removeStyleRule('font-family');
-                       });
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js
deleted file mode 100644 (file)
index 5063654..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Provides a font size picker, this is actually a heavily modified version of Imperavi's 'fontsize' plugin.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wfontsize = function() {
-       "use strict";
-       
-       return {
-               /**
-                * Initializes the RedactorPlugins.wfontsize plugin.
-                */
-               init: function () {
-                       var $dropdown = this.button.addDropdown(this.button.get('fontsize'));
-                       this.wfontsize._createDropdown($dropdown);
-               },
-               
-               /**
-                * Creates the font size dropdown.
-                * 
-                * @param       jQuery          dropdown
-                */
-               _createDropdown: function(dropdown) {
-                       var $fontSizes = [ 8, 10, 12, 14, 18, 24, 36 ];
-                       var self = this;
-                       for (var $i = 0; $i < $fontSizes.length; $i++) {
-                               var $fontSize = $fontSizes[$i];
-                               var $listItem = $('<li><a href="#">' + $fontSize + '</a></li>').appendTo(dropdown);
-                               var $item = $listItem.children('a').data('fontSize', $fontSize).css('font-size', $fontSize + 'pt');
-                               if ($fontSize > 18) {
-                                       $item.css('line-height', '1em');
-                               }
-                               
-                               $item.click(function(event) {
-                                       event.preventDefault();
-                                       
-                                       self.inline.format('span', 'style', 'font-size: ' + $(this).data('fontSize') + 'pt;');
-                               });
-                       }
-                       
-                       $('<li class="dropdownDivider" />').appendTo(dropdown);
-                       var $listItem = $('<li><a href="#">' + this.opts.curLang.none + '</a></li>').appendTo(dropdown);
-                       $listItem.children('a').click(function(event) {
-                               event.preventDefault();
-                               
-                               self.inline.removeStyleRule('font-size');
-                       });
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js
deleted file mode 100644 (file)
index 6c5ac20..0000000
+++ /dev/null
@@ -1,1335 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * This plugin makes liberally use of dumb monkey patching to adjust Redactor for our needs. In
- * general this is a collection of methods whose side-effects cannot be prevented in any other
- * way or a work-around would cause a giant pile of boilerplates.
- * 
- * ATTENTION!
- * This plugin partially contains code taken from Redactor, Copyright (c) 2009-2015 Imperavi LLC.
- * Under no circumstances you are allowed to use potions or entire code blocks for use anywhere
- * except when directly working with WoltLab Community Framework.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH, 2009-2015 Imperavi LLC.
- * @license    http://imperavi.com/redactor/license/
- */
-RedactorPlugins.wmonkeypatch = function() {
-       "use strict";
-       
-       return {
-               /**
-                * Initializes the RedactorPlugins.wmonkeypatch plugin.
-                */
-               init: function() {
-                       // module overrides
-                       this.wmonkeypatch.alignment();
-                       this.wmonkeypatch.button();
-                       this.wmonkeypatch.caret();
-                       this.wmonkeypatch.clean();
-                       this.wmonkeypatch.code();
-                       this.wmonkeypatch.dropdown();
-                       this.wmonkeypatch.image();
-                       this.wmonkeypatch.indent();
-                       this.wmonkeypatch.inline();
-                       this.wmonkeypatch.insert();
-                       this.wmonkeypatch.keydown();
-                       this.wmonkeypatch.keyup();
-                       this.wmonkeypatch.link();
-                       this.wmonkeypatch.modal();
-                       this.wmonkeypatch.paste();
-                       this.wmonkeypatch.observe();
-                       this.wmonkeypatch.selection();
-                       this.wmonkeypatch.utils();
-                       
-                       // templates
-                       this.wmonkeypatch.rebuildTemplates();
-                       
-                       // events and callbacks
-                       this.wmonkeypatch.bindEvents();
-                       
-                       // browser-specific fixes
-                       this.wmonkeypatch.fixWebKit();
-               },
-               
-               /**
-                * Setups event listeners and callbacks.
-                */
-               bindEvents: function() {
-                       var $identifier = this.$textarea.wcfIdentify();
-                       
-                       // keydown
-                       this.wutil.setOption('keydownCallback', function(event) {
-                               var $data = {
-                                       cancel: false,
-                                       event: event
-                               };
-                               
-                               WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'keydown_' + $identifier, $data);
-                               
-                               return ($data.cancel ? false : true);
-                       });
-                       
-                       // keyup
-                       this.wutil.setOption('keyupCallback', (function(event) {
-                               this.wutil.saveSelection();
-                               
-                               var $data = {
-                                       cancel: false,
-                                       event: event
-                               };
-                               
-                               WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'keyup_' + $identifier, $data);
-                               
-                               return ($data.cancel ? false : true);
-                       }).bind(this));
-                       
-                       // buttons response
-                       if (this.opts.activeButtons) {
-                               this.$editor.off('mouseup.redactor keyup.redactor focus.redactor');
-                               
-                               this.$editor.on('mouseup.redactor keyup.redactor focus.redactor', $.proxy(this.observe.buttons, this));
-                               this.$editor.on('keyup.redactor', $.proxy(this.keyup.init, this));
-                       }
-                       
-                       var $saveSelection = false;
-                       this.$editor.on('mousedown.wmonkeypatch', (function() {
-                               $saveSelection = true;
-                       }).bind(this));
-                       
-                       $(document).on('mouseup.wmonkeypatch', (function() {
-                               if ($saveSelection) {
-                                       $saveSelection = false;
-                                       
-                                       this.wutil.saveSelection();
-                               }
-                       }).bind(this));
-                       
-                       var isTargetElement = function(element) {
-                               // [quote]
-                               if (element.nodeName === 'BLOCKQUOTE') {
-                                       return true;
-                               }
-                               
-                               // [code]
-                               if (element.nodeName === 'DIV' && element.classList.contains('codeBox')) {
-                                       return true;
-                               }
-                               
-                               return false;
-                       };
-                       
-                       var getOffset = function(element) {
-                               var offsets = element.getBoundingClientRect();
-                               
-                               return {
-                                       left: offsets.left + document.body.scrollLeft,
-                                       top: offsets.top + document.body.scrollTop
-                               };
-                       };
-                       
-                       function getVerticalBoundaries(element) {
-                               var offset = getOffset(element);
-                               var styles = window.getComputedStyle(element);
-                               
-                               return {
-                                       bottom: offset.top + element.offsetHeight + parseInt(styles.marginBottom),
-                                       top: offset.top - parseInt(styles.marginTop)
-                               };
-                       };
-                       
-                       var setCaretBeforeOrAfter = (function(element, setBefore) {
-                               var ref;
-                               if (setBefore) {
-                                       ref = element.previousSibling;
-                                       if (ref === null) {
-                                               var space = this.utils.createSpaceElement();
-                                               element.parentNode.insertBefore(space, element);
-                                               
-                                               this.caret.setEnd(space);
-                                       }
-                                       else {
-                                               this.caret[(ref.nodeType === Node.ELEMENT_NODE && ref.nodeName === 'BR') ? 'setBefore' : 'setAfter'](ref);
-                                       }
-                               }
-                               else {
-                                       ref = element.nextSibling;
-                                       if (ref === null || ref === element.nextElementSibling && ref.nodeName === 'BR') {
-                                               var space = this.utils.createSpaceElement();
-                                               if (element.nextSibling === null) element.parentNode.appendChild(space);
-                                               else element.parentNode.insertBefore(space, element.nextSibling);
-                                               
-                                               this.caret.setAfter(space);
-                                       }
-                                       else {
-                                               this.caret.setBefore(ref);
-                                       }
-                               }
-                       }).bind(this);
-                       
-                       var editor = this.$editor[0];
-                       this.$editor.on('click.wmonkeypatch', (function(event) {
-                               var range = (window.getSelection().rangeCount) ? window.getSelection().getRangeAt(0) : null;
-                               
-                               if (event.target === editor) {
-                                       var boundaries, element;
-                                       for (var i = 0, length = editor.childElementCount; i < length; i++) {
-                                               element = editor.children[i];
-                                               
-                                               if (!isTargetElement(element)) {
-                                                       continue;
-                                               }
-                                               
-                                               boundaries = getVerticalBoundaries(element);
-                                               
-                                               if (event.pageY > boundaries.bottom) {
-                                                       continue;
-                                               }
-                                               else if (event.pageY < boundaries.top) {
-                                                       break;
-                                               }
-                                               
-                                               if (event.pageY >= boundaries.top && event.pageY <= boundaries.bottom) {
-                                                       var diffToTop = event.pageY - boundaries.top;
-                                                       var height = boundaries.bottom - boundaries.top;
-                                                       var setBefore = (diffToTop <= (height / 2));
-                                                       
-                                                       var ref = element[setBefore ? 'previousSibling' : 'nextSibling'];
-                                                       while (ref !== null) {
-                                                               if (ref.nodeType === Node.TEXT_NODE && ref.textContent !== '') {
-                                                                       // non-empty text node, default behavior is okay
-                                                                       return;
-                                                               }
-                                                               else if (ref.nodeType === Node.ELEMENT_NODE && !isTargetElement(ref)) {
-                                                                       // a non-blocking element such as a formatted line or something, default behavior is okay
-                                                                       return;
-                                                               }
-                                                               
-                                                               ref = ref[setBefore ? 'previousSibling' : 'nextSibling'];
-                                                       }
-                                                       
-                                                       setCaretBeforeOrAfter(element, setBefore);
-                                               }
-                                       }
-                                       
-                                       // check if caret is now inside <kbd>
-                                       range = (window.getSelection().rangeCount) ? window.getSelection().getRangeAt(0) : null;
-                                       if (range !== null) {
-                                               var container = range.startContainer;
-                                               if (container.nodeType === Node.TEXT_NODE) container = container.parentNode;
-                                               
-                                               if (container.nodeName === 'KBD') {
-                                                       if (container.nextElementSibling === editor.lastElementChild) {
-                                                               if (editor.lastElementChild.nodeName === 'SPAN' && editor.lastElementChild.textContent === '') {
-                                                                       editor.removeChild(editor.lastElementChild);
-                                                               }
-                                                       }
-                                                       else if (container.nextSibling === container.nextElementSibling) {
-                                                               if (container.nextElementSibling.nodeName === 'KBD' || container.nextElementSibling.nodeName === 'BR') {
-                                                                       setCaretBeforeOrAfter(container, false);
-                                                               }
-                                                       }
-                                                       
-                                                       if (container === editor.lastElementChild) {
-                                                               setCaretBeforeOrAfter(container, false);
-                                                       }
-                                               }
-                                       }
-                                       
-                                       return false;
-                               }
-                               else if (event.target.nodeName === 'LI') {
-                                       // work-around for #1942
-                                       var caretInsideList = false;
-                                       if (range !== null && range.collapsed) {
-                                               var current = range.startContainer;
-                                               while (current !== null && current !== editor) {
-                                                       if (current.nodeName === 'LI') {
-                                                               caretInsideList = true;
-                                                               break;
-                                                       }
-                                                       
-                                                       current = current.parentNode;
-                                               }
-                                       }
-                                       
-                                       if (!caretInsideList || range === null) {
-                                               var node = document.createTextNode('\u200b');
-                                               var firstChild = event.target.children[0];
-                                               firstChild.appendChild(node);
-                                               
-                                               this.caret.setEnd(firstChild);
-                                       }
-                               }
-                               else if (event.target.nodeName === 'BLOCKQUOTE') {
-                                       if (range !== null && range.collapsed) {
-                                               // check if caret is now inside a quote
-                                               var blockquote = null;
-                                               var current = range.startContainer;
-                                               while (current !== null && current !== editor) {
-                                                       if (current.nodeName === 'BLOCKQUOTE') {
-                                                               blockquote = current;
-                                                               break;
-                                                       }
-                                                       
-                                                       current = current.parentNode;
-                                               }
-                                               
-                                               if (blockquote !== null && blockquote !== event.target) {
-                                                       // click occured within inner quote margin, check if click happened before inner quote
-                                                       if (event.pageY <= getOffset(blockquote).top) {
-                                                               setCaretBeforeOrAfter(blockquote, true);
-                                                       }
-                                                       else {
-                                                               setCaretBeforeOrAfter(blockquote, false);
-                                                       }
-                                               }
-                                       }
-                               }
-                       }).bind(this));
-               },
-               
-               /**
-                * Partially overwrites the 'alignment' module.
-                * 
-                *  - Firing an event after setBlocks() has been called, useful to strip unwanted formatting
-                */
-               alignment: function() {
-                       // alignment.setBlocks
-                       var $mpSetBlocks = this.alignment.setBlocks;
-                       this.alignment.setBlocks = (function(type) {
-                               $mpSetBlocks.call(this, type);
-                               
-                               WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'fixFormatting_' + this.$textarea.wcfIdentify());
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'button' module.
-                * 
-                *  - consistent display of dropdowns
-                */
-               button: function() {
-                       // button.addDropdown
-                       var $mpAddDropdown = this.button.addDropdown;
-                       this.button.addDropdown = (function($btn, dropdown) {
-                               var $dropdown = $mpAddDropdown.call(this, $btn, dropdown);
-                               
-                               if (!dropdown) {
-                                       $dropdown.addClass('dropdownMenu');
-                               }
-                               
-                               return $dropdown;
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'caret' module.
-                * 
-                *  - resolves a selection issue if start === end when setting the caret offsets
-                */
-               caret: function() {
-                       // this.caret.set
-                       this.caret.set = (function(orgn, orgo, focn, foco) {
-                               // focus
-                               // WoltLab fix below [#1970]
-                               //if (!this.utils.browser('msie')) this.$editor.focus();
-                               if (!this.utils.browser('msie')) {
-                                       if (this.utils.isMobile() && this.utils.browser('webkit') && navigator.userAgent.match(/(iPad|iPhone|iPod)/i)) {
-                                               if (document.activeElement !== this.$editor[0]) {
-                                                       this.$editor.focus();
-                                               }
-                                       }
-                                       else {
-                                               this.$editor.focus();
-                                       }
-                               }
-                               
-                               orgn = orgn[0] || orgn;
-                               focn = focn[0] || focn;
-                               
-                               if (this.utils.isBlockTag(orgn.tagName) && orgn.innerHTML === '')
-                               {
-                                       orgn.innerHTML = this.opts.invisibleSpace;
-                               }
-                               
-                               if (orgn.tagName == 'BR' && this.opts.linebreaks === false)
-                               {
-                                       var parent = $(this.opts.emptyHtml)[0];
-                                       $(orgn).replaceWith(parent);
-                                       orgn = parent;
-                                       focn = orgn;
-                               }
-                               
-                               this.selection.get();
-                               
-                               try {
-                                       this.range.setStart(orgn, orgo);
-                                       this.range.setEnd(focn, foco);
-                               }
-                               catch (e) {}
-                               
-                               this.selection.addRange();
-                       }).bind(this);
-                       
-                       this.caret.setOffset = (function(start, end)
-                       {
-                               if (typeof end == 'undefined') end = start;
-                               if (!this.focus.isFocused()) this.focus.setStart();
-
-                               var range = document.createRange();
-                               var sel = document.getSelection();
-                               var node, offset = 0;
-                               var walker = document.createTreeWalker(this.$editor[0], NodeFilter.SHOW_TEXT, null, null);
-
-                               while (node = walker.nextNode())
-                               {
-                                       offset += node.nodeValue.length;
-                                       // WoltLab fix below, remove this method once the issue has been resolved by Imperavi
-                                       if (offset > start || (start === end && offset === start))
-                                       //if (offset > start)
-                                       {
-                                               range.setStart(node, node.nodeValue.length + start - offset);
-                                               start = Infinity;
-                                       }
-
-                                       if (offset >= end)
-                                       {
-                                               range.setEnd(node, node.nodeValue.length + end - offset);
-                                               break;
-                                       }
-                               }
-
-                               sel.removeAllRanges();
-                               sel.addRange(range);
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'clean' module.
-                * 
-                *  - convert <div> to <p> during paste
-                */
-               clean: function() {
-                       // these characters are replaced by this.clean.onSet() and this.clean.onPaste() -- #1980
-                       var $protectedSpecialCharacters = function(text) {
-                               text = text.replace(/\u201D/g, '__wcf_preserve_character_1__');
-                               text = text.replace(/\u201C/g, '__wcf_preserve_character_2__');
-                               text = text.replace(/\u2018/g, '__wcf_preserve_character_3__');
-                               text = text.replace(/\u2019/g, '__wcf_preserve_character_4__');
-                               
-                               return text;
-                       };
-                       
-                       var $restoreSpecialCharacters = function(text) {
-                               text = text.replace(/__wcf_preserve_character_1__/g, '\u201D');
-                               text = text.replace(/__wcf_preserve_character_2__/g, '\u201C');
-                               text = text.replace(/__wcf_preserve_character_3__/g, '\u2018');
-                               text = text.replace(/__wcf_preserve_character_4__/g, '\u2019');
-                               
-                               return text;
-                       };
-                       
-                       // clean.onPaste
-                       var $mpOnPaste = this.clean.onPaste;
-                       this.clean.onPaste = (function(html, setMode) {
-                               this.opts.replaceDivs = true;
-                               
-                               html = $protectedSpecialCharacters(html);
-                               
-                               html = $mpOnPaste.call(this, html, setMode);
-                               
-                               this.opts.replaceDivs = false;
-                               
-                               return $restoreSpecialCharacters(html);
-                       }).bind(this);
-                       
-                       // clean.onPasteRemoveEmpty
-                       this.clean.onPasteRemoveEmpty = function(html) {
-                               return html.replace(/<br\s?\/?>$/i, '');
-                       };
-                       
-                       // clean.removeSpaces
-                       var mpRemoveSpaces = this.clean.removeSpaces;
-                       this.clean.removeSpaces = (function(html) {
-                               html = html.replace(/\u200C/g, '__wcf_zwnj__');
-                               html = html.replace(/\u200D/g, '__wcf_zwj__');
-                               
-                               html = mpRemoveSpaces.call(this, html);
-                               
-                               html = html.replace(/__wcf_zwnj__/g, '\u200C');
-                               return html.replace(/__wcf_zwj__/g, '\u200D');
-                       });
-                       
-                       // clean.onSet
-                       var $mpOnSet = this.clean.onSet;
-                       this.clean.onSet = (function(html) {
-                               html = $protectedSpecialCharacters(html);
-                               
-                               html = $mpOnSet.call(this, html);
-                               
-                               return $restoreSpecialCharacters(html);
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'code' module.
-                * 
-                *  - Redactor internally caches the code and does not flush to textarea if it was not changed, force flushing
-                */
-               code: function() {
-                       // code.startSync
-                       var $mpStartSync = this.code.startSync;
-                       this.code.startSync = (function() {
-                               // the editor internally caches if it needs to sync, thus we need to reset the internal cache to force a sync
-                               this.code.syncCode = undefined;
-                               
-                               $mpStartSync.call(this);
-                       }).bind(this);
-                       
-                       // code.textareaIndenting
-                       var $mpTextareaIndenting = this.code.textareaIndenting;
-                       this.code.textareaIndenting = (function(e) {
-                               if (e.keyCode !== 9 || e.ctrlKey) {
-                                       return true;
-                               }
-                               
-                               return $mpTextareaIndenting.call(this, e);
-                       }).bind(this);
-                       
-                       // code.showCode
-                       // fixes an issue related to setSelectionRange on a hidden textarea in Firefox (NS_ERROR_FAILURE, #1984)
-                       var $mpShowCode = this.code.showCode;
-                       this.code.showCode = (function() {
-                               var height = this.$editor.innerHeight(), hiddenParent = null;
-                               if (!this.$textarea.is(':visible')) {
-                                       hiddenParent = this.$textarea.parentsUntil(':visible').last();
-                                       hiddenParent.show();
-                               }
-                               
-                               $mpShowCode.call(this);
-                               
-                               // jQuery's .height() seems to add the paddings
-                               this.$textarea[0].style.setProperty('height', height + 'px');
-                               
-                               if (hiddenParent !== null) {
-                                       hiddenParent.hide();
-                               }
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'dropdown' module.
-                * 
-                *  - emulate WCF-like dropdowns.
-                *  - save text selection on iOS (#2003)
-                */
-               dropdown: function() {
-                       // dropdown.build
-                       this.dropdown.build = (function(name, $dropdown, dropdownObject) {
-                               $dropdown.addClass('dropdownMenu');
-                               
-                               $.each(dropdownObject, (function(btnName, btnObject) {
-                                       if (btnName == 'dropdownDivider') {
-                                               $('<li class="dropdownDivider" />').appendTo($dropdown);
-                                       }
-                                       else {
-                                               var $listItem = $('<li />');
-                                               var $item = $('<a href="#" class="redactor-dropdown-' + btnName + '">' + btnObject.title + '</a>');
-                                               
-                                               $item.on('click', $.proxy(function(e) {
-                                                       e.preventDefault();
-                                                       
-                                                       var type = 'func';
-                                                       var callback = btnObject.func;
-                                                       if (btnObject.command) {
-                                                               type = 'command';
-                                                               callback = btnObject.command;
-                                                       }
-                                                       else if (btnObject.dropdown) {
-                                                               type = 'dropdown';
-                                                               callback = btnObject.dropdown;
-                                                       }
-                                                       
-                                                       this.button.onClick(e, btnName, type, callback);
-                                                       this.dropdown.hideAll();
-                                               }, this));
-                                               
-                                               $item.appendTo($listItem);
-                                               $listItem.appendTo($dropdown);
-                                       }
-                               }).bind(this));
-                       }).bind(this);
-                       
-                       // dropdown.show
-                       var $mpShow = this.dropdown.show;
-                       this.dropdown.show = $.proxy(function(e, key) {
-                               var $dropdown = this.button.get(key).data('dropdown');
-                               $fixDropdown($dropdown);
-                               
-                               if ($.browser.iOS) {
-                                       this.wutil.saveSelection();
-                               }
-                               
-                               $mpShow.call(this, e, key);
-                               
-                               $dropdown.off('mouseover mouseout');
-                       }, this);
-                       
-                       // fix existing dropdowns
-                       var $fixDropdown = function(dropdown) {
-                               if (dropdown.hasClass('dropdownMenu')) {
-                                       return;
-                               }
-                               
-                               dropdown.addClass('dropdownMenu');
-                               var $items = dropdown.children('a').detach();
-                               for (var $i = 0; $i < $items.length; $i++) {
-                                       var $item = $('<li />').appendTo(dropdown);
-                                       $item.append($items[$i]);
-                               }
-                       };
-               },
-               
-               /**
-                * Partially overwrites the 'image' module.
-                * 
-                *  - WCF-like dialog behavior
-                */
-               image: function() {
-                       // image.setEditable
-                       var $mpSetEditable = this.image.setEditable;
-                       this.image.setEditable = (function($image) {
-                               if ($image.hasClass('smiley')) {
-                                       return;
-                               }
-                               
-                               // workaround for #2675
-                               $image.off('click.redactor touchstart.redactor');
-                               
-                               $mpSetEditable.call(this, $image);
-                       }).bind(this);
-                       
-                       // image.loadEditableControls
-                       var $mpLoadEditableControls = this.image.loadEditableControls;
-                       this.image.loadEditableControls = (function($image) {
-                               if ($image[0].parentNode.id === 'redactor-image-box') {
-                                       return $('#redactor-image-resizer', this.$editor[0]);
-                               }
-                               
-                               var $returnValue = $mpLoadEditableControls.call(this, $image);
-                               
-                               if ($image.hasClass('redactorDisableResize') && $returnValue !== false) {
-                                       $returnValue.hide();
-                               }
-                               
-                               return $returnValue;
-                       }).bind(this);
-                       
-                       // image.show
-                       this.image.show = (function() {
-                               this.modal.load('image', this.lang.get('image'), 0);
-                               var $button = this.modal.createActionButton(this.lang.get('insert'));
-                               $button.click($.proxy(this.wbutton._insertImage, this));
-                               
-                               $('#redactorImageLinkHrefContainer').hide();
-                               
-                               this.selection.save();
-                               this.modal.show();
-                       }).bind(this);
-                       
-                       // image.showEdit
-                       this.image.showEdit = (function(image) {
-                               this.modal.load('imageEdit', this.lang.get('edit'), 0);
-                               this.image.buttonSave = this.modal.createActionButton(this.lang.get('save'));
-                               
-                               this.image.buttonSave.click((function() {
-                                       this.image.update(image);
-                               }).bind(this));
-                               
-                               var link = image.closest('a', this.$editor[0]);
-                               
-                               // set overlay values
-                               $('#redactor-image-link-source').val(image.attr('src'));
-                               $('#redactor-image-link-href').val(link.length ? link.attr('href') : '');
-                               $('#redactor-image-align').val(image.css('float'));
-                               
-                               this.modal.show();
-                               
-                               setTimeout(function() { $('.redactor-link-tooltip').remove(); }, 1);
-                       }).bind(this);
-                       
-                       // image.update
-                       this.image.update = (function(image) {
-                               this.image.hideResize();
-                               this.buffer.set();
-                               
-                               image.attr('src', $('#redactor-image-link-source').val());
-                               this.image.setFloating(image);
-                               
-                               var link = $('#redactor-image-link-href').val().trim();
-                               var anchor = image.closest('a', this.$editor[0]);
-                               
-                               if (anchor.length) {
-                                       if (link === '') {
-                                               anchor = anchor[0];
-                                               var i = anchor.children.length, parent = anchor.parentNode;
-                                               while (i--) {
-                                                       parent.insertBefore(anchor.children[0], anchor);
-                                               }
-                                               
-                                               parent.removeChild(anchor);
-                                       }
-                                       else {
-                                               anchor.attr('href', link);
-                                       }
-                               }
-                               else if (link !== '') {
-                                       anchor = document.createElement('a');
-                                       anchor.href = link;
-                                       image[0].parentNode.insertBefore(anchor, image[0]);
-                                       anchor.appendChild(image[0]);
-                               }
-                               
-                               this.modal.close();
-                               this.observe.images();
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'indent' module.
-                * 
-                *  - prevent browsers from screwing up the DOM when indenting the only item
-                */
-               indent: function() {
-                       // indent.increaseLists
-                       var $mpIncrease = this.indent.increase;
-                       this.indent.increase = (function() {
-                               var $block = this.selection.getBlock();
-                               if ($block && $block.tagName === 'LI') {
-                                       // do not allow indenting the first list item because it yields invalid HTML
-                                       if ($block.parentElement.firstChild !== $block) {
-                                               $mpIncrease.call(this);
-                                       }
-                               }
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'inline' module.
-                * 
-                *  - restore the text selection on iOS (#2003)
-                */
-               inline: function() {
-                       // inline.format
-                       var $mpFormat = this.inline.format;
-                       this.inline.format = (function(tag, type, value) {
-                               if ($.browser.iOS) {
-                                       this.wutil.restoreSelection();
-                               }
-                               
-                               $mpFormat.call(this, tag, type, value);
-                       }).bind(this);
-                       
-                       // inline.removeStyleRule
-                       var $mpRemoveStyleRule = this.inline.removeStyleRule;
-                       this.inline.removeStyleRule = (function(name) {
-                               if ($.browser.iOS) {
-                                       this.wuil.restoreSelection();
-                               }
-                               
-                               $mpRemoveStyleRule.call(this, name);
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'insert' module.
-                * 
-                *  - fixes insertion in an empty editor w/o prior focus until the issue has been resolved by Imperavi
-                */
-               insert: function() {
-                       var isWebKit = ($.browser.webkit || document.documentElement.style.hasOwnProperty('WebkitAppearance') || window.hasOwnProperty('chrome'));
-                       
-                       var focusEditor = (function(html) {
-                               var $html = this.$editor.html();
-                               if (this.utils.isEmpty($html)) {
-                                       this.$editor.focus();
-                                       this.wutil.selectionEndOfEditor();
-                               }
-                               else {
-                                       if (document.activeElement !== this.$editor[0]) {
-                                               this.wutil.restoreSelection();
-                                       }
-                               }
-                       }).bind(this);
-                       
-                       // work-around for WebKit inserting lame spans
-                       // bug report: https://code.google.com/p/chromium/issues/detail?id=335955
-                       // based upon the idea: http://www.neotericdesign.com/blog/2013/3/working-around-chrome-s-contenteditable-span-bug
-                       var fixWebKit = (function() {
-                               var saveSelection = false;
-                               
-                               var elements = this.$editor[0].querySelector('span:not([data-verified="redactor"])');
-                               for (var i = 0, length = elements.length; i < length; i++) {
-                                       elements[i].outerHTML = elements[i].innerHTML;
-                                       saveSelection = true;
-                               }
-                               
-                               if (saveSelection) {
-                                       this.wutil.saveSelection();
-                               }
-                       }).bind(this);
-                       
-                       // insert.html
-                       var mpHtml = this.insert.html;
-                       this.insert.html = (function(html, clean) {
-                               focusEditor(html);
-                               
-                               mpHtml.call(this, html, clean);
-                               
-                               this.wutil.saveSelection();
-                               
-                               if (isWebKit) {
-                                       setTimeout(function() {
-                                               fixWebKit();
-                                       }, 10);
-                               }
-                       }).bind(this);
-                       
-                       // pasting in Safari is broken, try to avoid breaking everything and wait for Imperavi to address this bug
-                       if (navigator.userAgent.match(/safari/i)) {
-                               var mpExecHtml = this.insert.execHtml;
-                               this.insert.execHtml = (function(html) {
-                                       try {
-                                               mpExecHtml.call(this, html);
-                                       }
-                                       catch (e) {
-                                               console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: " + e.message);
-                                       }
-                               }).bind(this);
-                       }
-               },
-               
-               /**
-                * Partially overwrites the 'keydown' module.
-                * 
-                *  - improve behavior in quotes
-                *  - allow indentation for lists only
-                */
-               keydown: function() {
-                       this.keydown.enterWithinBlockquote = false;
-                       
-                       // keydown.onTab
-                       var mpOnTab = this.keydown.onTab;
-                       this.keydown.onTab = (function(e, key) {
-                               var block = this.selection.getBlock();
-                               
-                               if (block && block.nodeName === 'LI') {
-                                       return mpOnTab.call(this, e, key);
-                               }
-                               
-                               return true;
-                       }).bind(this);
-                       
-                       // keydown.replaceDivToParagraph
-                       var mpReplaceDivToParagraph = this.keydown.replaceDivToParagraph;
-                       this.keydown.replaceDivToParagraph = (function() {
-                               if (this.keydown.enterWithinBlockquote) {
-                                       // do nothing and prevent replacement
-                                       this.keydown.enterWithinBlockquote = false;
-                               }
-                               else {
-                                       mpReplaceDivToParagraph.call(this);
-                               }
-                       }).bind(this);
-                       
-                       // keydown.setupBuffer
-                       var mpSetupBuffer = this.keydown.setupBuffer;
-                       this.keydown.setupBuffer = (function(e, key) {
-                               // undo
-                               if (this.keydown.ctrl && key === 89 && !e.shiftKey && !e.altKey && this.opts.rebuffer.length !== 0) {
-                                       e.preventDefault();
-                                       this.buffer.redo();
-                                       return;
-                               }
-                               
-                               mpSetupBuffer.call(this, e, key);
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'keyup' module.
-                * 
-                *  - prevent divs inside a quote being replace with paragraphs
-                */
-               keyup: function() {
-                       // keyup.replaceToParagraph
-                       var mpReplaceToParagraph = this.keyup.replaceToParagraph;
-                       this.keyup.replaceToParagraph = (function(clone) {
-                               if (this.keyup.current.nodeName !== 'DIV' || !this.keyup.current.parentNode || this.keyup.current.parentNode.nodeName !== 'BLOCKQUOTE') {
-                                       mpReplaceToParagraph.call(this, clone);
-                               }
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'link' module.
-                * 
-                * - force consistent caret position upon link insert
-                */
-               link: function() {
-                       // link.insert
-                       var mpInsert = this.link.insert;
-                       this.link.insert = (function() {
-                               mpInsert.call(this);
-                               
-                               this.selection.get();
-                               var container = this.selection.getCurrent();
-                               if (container.nodeType === Node.TEXT_NODE) {
-                                       container = container.parentNode;
-                               }
-                               
-                               if (container.nodeName === 'A') {
-                                       this.caret.setAfter(container);
-                               }
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'modal' module.
-                * 
-                *  - delegate modal creation and handling to $.ui.wcfDialog.
-                */
-               modal: function() {
-                       // modal.dialog
-                       this.modal.dialog = null;
-                       
-                       // modal.addTemplate
-                       var $mpAddTemplate = this.modal.addTemplate;
-                       this.modal.addTemplate = (function(name, template) {
-                               // overrides the 'table' template
-                               if (name !== 'table') {
-                                       $mpAddTemplate.call(this, name, template);
-                               }
-                       }).bind(this);
-                       
-                       // modal.build
-                       this.modal.build = function() { /* does nothing */ };
-                       
-                       // modal.load
-                       this.modal.load = (function(templateName, title, width) {
-                               this.modal.templateName = templateName;
-                               this.modal.title = title;
-                               
-                               this.modal.dialog = $('<div />').hide().appendTo(document.body);
-                               this.modal.dialog.html(this.modal.getTemplate(this.modal.templateName));
-                               
-                               this.$modalFooter = null;
-                       }).bind(this);
-                       
-                       // modal.show
-                       this.modal.show = (function() {
-                               this.modal.dialog.wcfDialog({
-                                       onClose: $.proxy(this.modal.close, this),
-                                       title: this.modal.title
-                               });
-                               
-                               // focus first input field
-                               this.modal.dialog.find('input:first').focus();
-                       }).bind(this);
-                       
-                       // modal.createButton
-                       var $mpCreateButton = this.modal.createButton;
-                       this.modal.createButton = (function(label, className) {
-                               if (this.$modalFooter === null) {
-                                       this.$modalFooter = $('<div class="formSubmit" />').appendTo(this.modal.dialog);
-                                       this.modal.dialog.addClass('dialogForm');
-                               }
-                               
-                               return $mpCreateButton.call(this, label, className);
-                       }).bind(this);
-                       
-                       // modal.close
-                       this.modal.close = (function() {
-                               if (this.modal.dialog === null) {
-                                       return;
-                               }
-                               
-                               try {
-                                       this.modal.dialog.wcfDialog('close');
-                               }
-                               catch (e) {
-                                       // ignore
-                               }
-                               finally {
-                                       if (this.modal.dialog) {
-                                               var $container = this.modal.dialog.parents('.dialogContainer:eq(0)');
-                                               if ($container.length) {
-                                                       setTimeout(function() {
-                                                               $container.remove();
-                                                       }, 500);
-                                               }
-                                       }
-                               }
-                               
-                               this.modal.dialog = null;
-                       }).bind(this);
-                       
-                       // modal.createCancelButton
-                       this.modal.createCancelButton = function() { return $(); };
-                       
-                       // modal.createDeleteButton
-                       this.modal.createDeleteButton = function() { return $(); };
-               },
-               
-               /**
-                * Partially overwrites the 'observe' module.
-                * 
-                *  - handles custom button active states.
-                */
-               observe: function() {
-                       var $toggleButtons = (function(element, searchFor, buttonSelector, inverse, className, skipInSourceMode) {
-                               var $buttons = this.$toolbar.find(buttonSelector);
-                               if (element && element.closest(searchFor, this.$editor[0]).length != 0) {
-                                       $buttons[(inverse ? 'removeClass' : 'addClass')](className);
-                               }
-                               else {
-                                       if (skipInSourceMode && !this.opts.visual) {
-                                               return;
-                                       }
-                                       
-                                       $buttons[(inverse ? 'addClass' : 'removeClass')](className);
-                               }
-                       }).bind(this);
-                       
-                       // observe.buttons
-                       var $mpButtons = this.observe.buttons;
-                       this.observe.buttons = (function(e, btnName) {
-                               $mpButtons.call(this, e, btnName);
-                               
-                               var element = this.selection.getCurrent();
-                               if (element === false) {
-                                       return;
-                               }
-                               
-                               if (element.nodeType === Node.TEXT_NODE) {
-                                       element = element.parentNode;
-                               }
-                               
-                               if (element === this.$editor[0]) {
-                                       return;
-                               }
-                               
-                               element = $(element);
-                               
-                               $toggleButtons(element, 'ul, ol', 'a.re-indent, a.re-outdent', true, 'redactor-button-disabled');
-                               $toggleButtons(element, 'kbd', 'a.re-__wcf_tt', false, 'redactor-act');
-                               $toggleButtons(element, 'blockquote.quoteBox', 'a.re-__wcf_quote', false, 'redactor-button-disabled', true);
-                               $toggleButtons(element, 'sub', 'a.re-subscript', false, 'redactor-act');
-                               $toggleButtons(element, 'sup', 'a.re-superscript', false, 'redactor-act');
-                       }).bind(this);
-                       
-                       // observe.load
-                       var $mpLoad = this.observe.load;
-                       this.observe.load = (function() {
-                               $mpLoad.call(this);
-                               
-                               WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'observe_load_' + this.$textarea.wcfIdentify());
-                       }).bind(this);
-                       
-                       // observe.showTooltip
-                       var $mpShowTooltip = this.observe.showTooltip;
-                       this.observe.showTooltip = (function(e) {
-                               var $link = $(e.target);
-                               if (!$link.hasClass('redactorQuoteEdit')) {
-                                       $mpShowTooltip.call(this, e);
-                               }
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'paste' module.
-                * 
-                *  - prevent screwed up, pasted HTML from placing text nodes (and inline elements) in the editor's direct root
-                *  - fixes text pasting in Internet Explorer 11 (#2040) 
-                */
-               paste: function() {
-                       // paste.createPasteBox
-                       var $mpCreatePasteBox = this.paste.createPasteBox;
-                       this.paste.createPasteBox = (function() {
-                               if ($.browser.iOS) {
-                                       var $top = 0;
-                                       if (window.getSelection().rangeCount) {
-                                               var $container = window.getSelection().getRangeAt(0).endContainer;
-                                               if ($container.nodeType !== Node.ELEMENT_NODE) {
-                                                       $container = $container.parentElement;
-                                               }
-                                               $container = $($container);
-                                               
-                                               $top = $($container).offset().top;
-                                       }
-                                       else {
-                                               $top = $(window).scrollTop();
-                                       }
-                                       
-                                       this.$pasteBox = $('<div>').html('').attr('contenteditable', 'true').css({ position: 'fixed', /*width: 0, */top: $top + 'px', /*left: '-9999px', */fontSize: '16px' });
-                                       
-                                       this.$box.parent().append(this.$pasteBox);
-                                       this.$pasteBox.focus();
-                               }
-                               else {
-                                       $mpCreatePasteBox.call(this);
-                               }
-                       }).bind(this);
-                       
-                       var $fixSelection = function() {
-                               var $selection = window.getSelection();
-                               if (!$selection.rangeCount) {
-                                       return;
-                               }
-                               
-                               var $range = $selection.getRangeAt(0);
-                               if (!$range.collapsed) {
-                                       return;
-                               }
-                               
-                               var $element = $range.startContainer;
-                               if ($element.nodeType === Node.ELEMENT_NODE && $element.tagName === 'DIV') {
-                                       var $parentNode = $element.parentNode;
-                                       if ($parentNode !== null && $parentNode.tagName === 'BLOCKQUOTE' && $parentNode.classList.contains('quoteBox')) {
-                                               var $endContainer = $range.startContainer.childNodes[$range.startContainer.childNodes.length - 1];
-                                               var $newRange = document.createRange();
-                                               $newRange.setStart($range.startContainer.childNodes[0], 0);
-                                               
-                                               $newRange.setEnd($endContainer, $endContainer.length);
-                                               $newRange.collapse(false);
-                                               
-                                               $selection.removeAllRanges();
-                                               $selection.addRange($newRange);
-                                       }
-                               }
-                       };
-                       
-                       // paste.insert
-                       var $mpInsert = this.paste.insert;
-                       this.paste.insert = (function(html) {
-                               $fixSelection();
-                               
-                               $mpInsert.call(this, html);
-                               
-                               setTimeout((function() {
-                                       this.wutil.fixDOM();
-                                       
-                                       if ($.browser.msie) {
-                                               getSelection().getRangeAt(0).collapse(false);
-                                       }
-                                       else if ($.browser.mozilla) {
-                                               // bugfix for Firefox setting the caret somewhere in the void
-                                               var $range = getSelection().getRangeAt(0);
-                                               if ($range.startContainer === this.$editor[0] && $range.endContainer === this.$editor[0]) {
-                                                       this.wutil.selectionEndOfEditor();
-                                               }
-                                       }
-                                       
-                                       this.wutil.saveSelection();
-                               }).bind(this), 20);
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'selection' module.
-                * 
-                *  - remove superflous empty text nodes caused by the selection markers (#2083)
-                */
-               selection: function() {
-                       this.selection.implicitRange = null;
-                       
-                       var $removeEmptyTextNodes = (function(index, marker) {
-                               var $nextSibling = marker.nextSibling;
-                               if ($nextSibling !== null && $nextSibling.nodeType === Node.TEXT_NODE && $nextSibling.length === 0) {
-                                       $($nextSibling).remove();
-                               }
-                               
-                               var $node = null;
-                               if ((marker.id === 'selection-marker-1' && !this.$editor.find('#selection-marker-2').length) || marker.id === 'nodes-marker-1' && !this.$editor.find('#nodes-marker-2').length) {
-                                       $node = marker.previousSibling;
-                               }
-                               
-                               // iOS sometimes pastes right into the marker, this work-around will unwrap the pasted content
-                               if (marker.innerHTML.length) {
-                                       marker.outerHTML = marker.innerHTML;
-                               }
-                               else {
-                                       marker.parentNode.removeChild(marker);
-                               }
-                               
-                               if ($node !== null) {
-                                       this.selection.implicitRange = document.createRange();
-                                       this.selection.implicitRange.setStart($node, $node.length);
-                                       this.selection.implicitRange.setEnd($node, $node.length);
-                               }
-                               else {
-                                       this.selection.implicitRange = null;
-                               }
-                       }).bind(this);
-                       
-                       // selection.removeMarkers
-                       this.selection.removeMarkers = (function() {
-                               this.$editor.find('span.redactor-selection-marker').each($removeEmptyTextNodes);
-                       }).bind(this);
-                       
-                       // selection.removeNodesMarkers
-                       this.selection.removeNodesMarkers = (function() {
-                               $(document).find('span.redactor-nodes-marker').each($removeEmptyTextNodes);
-                               this.$editor.find('span.redactor-nodes-marker').each($removeEmptyTextNodes);
-                       }).bind(this);
-               },
-               
-               /**
-                * Partially overwrites the 'utils' module.
-                * 
-                *  - prevent removing of empty paragraphs/divs
-                */
-               utils: function() {
-                       this.utils.removeEmpty = function(i, s) { /* does nothing */ };
-               },
-               
-               /**
-                * Rebuilds certain templates provided by Redactor to better integrate into WCF.
-                */
-               rebuildTemplates: function() {
-                       // template: image
-                       this.opts.modal.image =
-                               '<fieldset id="redactor-modal-image-edit">'
-                                       + '<dl>'
-                                               + '<dt><label for="redactor-image-link-source">' + WCF.Language.get('wcf.bbcode.image.source') + '</label></dt>'
-                                               + '<dd><input type="text" id="redactor-image-link-source" class="long"  /></dd>'
-                                       + '</dl>'
-                                       + '<dl id="redactorImageLinkHrefContainer">'
-                                               + '<dt><label for="redactor-image-link-href">' + this.lang.get('link') + '</label></dt>'
-                                               + '<dd><input type="text" id="redactor-image-link-href" class="long"  /></dd>'
-                                       + '</dl>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactor-image-align">' + this.opts.curLang.image_position + '</label></dt>'
-                                               + '<dd>'
-                                                       + '<select id="redactor-image-align">'
-                                                               + '<option value="none">' + WCF.Language.get('wcf.global.noSelection') + '</option>'
-                                                               + '<option value="left">' + this.lang.get('left') + '</option>'
-                                                               + '<option value="right">' + this.lang.get('right') + '</option>'
-                                                       + '</select>'
-                                               + '</dd>'
-                                       + '</dl>'
-                               + '</fieldset>';
-                       
-                       // template: imageEdit
-                       this.opts.modal.imageEdit = this.opts.modal.image;
-                       
-                       // template: link
-                       this.opts.modal.link =
-                               '<fieldset id="redactor-modal-link">'
-                                       + '<dl>'
-                                               + '<dt><label for="redactor-link-url">URL</label></dt>' /* TODO: use a phrase instead of hardcoding it! */
-                                               + '<dd><input type="url" id="redactor-link-url" class="long" /></dd>'
-                                       + '</dl>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactor-link-url-text">' + this.lang.get('text') + '</label></dt>'
-                                               + '<dd><input type="text" id="redactor-link-url-text" class="long" /></dd>'
-                                       + '</dl>'
-                               + '</fieldset>';
-                       
-                       // template: quote
-                       this.opts.modal.quote =
-                               '<fieldset>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactorQuoteAuthor">' + WCF.Language.get('wcf.bbcode.quote.edit.author') + '</label></dt>'
-                                               + '<dd><input type="text" id="redactorQuoteAuthor" class="long" /></dd>'
-                                       + '</dl>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactorQuoteLink">' + WCF.Language.get('wcf.bbcode.quote.edit.link') + '</label></dt>'
-                                               + '<dd><input type="text" id="redactorQuoteLink" class="long" /></dd>'
-                                       + '</dl>'
-                               + '</fieldset>';
-                       
-                       // template: code
-                       var $highlighters = '';
-                       $.each(__REDACTOR_CODE_HIGHLIGHTERS, function(k, v) {
-                               if (k === 'plain') return true;
-                               
-                               $highlighters += '<option value="' + k + '">' + v + '</option>';
-                       });
-                       
-                       this.opts.modal.code =
-                               '<fieldset>'
-                                       + '<legend>' + WCF.Language.get('wcf.bbcode.code.settings') + '</legend>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactorCodeHighlighter">' + WCF.Language.get('wcf.bbcode.code.highlighter') + '</label></dt>'
-                                               + '<dd>'
-                                                       + '<select id="redactorCodeHighlighter">'
-                                                               + '<option value="plain">' + WCF.Language.get('wcf.bbcode.code.highlighter.none') + '</option>'
-                                                               + $highlighters
-                                                       + '</select>'
-                                                       + '<small>' + WCF.Language.get('wcf.bbcode.code.highlighter.description') + '</small>'
-                                               + '</dd>'
-                                       + '</dl>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactorCodeLineNumber">' + WCF.Language.get('wcf.bbcode.code.lineNumber') + '</label></dt>'
-                                               + '<dd>'
-                                                       + '<input type="number" id="redactorCodeLineNumber" min="1" max="99999" value="1" />'
-                                                       + '<small>' + WCF.Language.get('wcf.bbcode.code.lineNumber.description') + '</small>'
-                                               + '</dd>'
-                                       + '</dl>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactorCodeFilename">' + WCF.Language.get('wcf.bbcode.code.filename') + '</label></dt>'
-                                               + '<dd>'
-                                                       + '<input type="text" id="redactorCodeFilename" value="" class="long" />'
-                                                       + '<small>' + WCF.Language.get('wcf.bbcode.code.filename.description') + '</small>'
-                                               + '</dd>'
-                                       + '</dl>'
-                               + '</fieldset>'
-                               + '<fieldset>'
-                                       + '<legend>' + WCF.Language.get('wcf.bbcode.code') + '</legend>'
-                                       + '<dl class="wide">'
-                                               + '<dt></dt>'
-                                               + '<dd><textarea id="redactorCodeBox" class="long monospace" rows="12" /></dd>'
-                                       + '</dl>'
-                               + '</fieldset>';
-                       
-                       // template: table
-                       this.opts.modal.table =
-                               '<fieldset id="redactor-modal-table-insert">'
-                                       + '<dl>'
-                                               + '<dt><label for="redactor-table-rows">' + this.lang.get('rows') + '</label></dt>'
-                                               + '<dd><input type="number" size="5" value="2" min="1" id="redactor-table-rows" class="tiny" /></dd>'
-                                       + '</dl>'
-                                       + '<dl>'
-                                               + '<dt><label for="redactor-table-columns">' + this.lang.get('columns') + '</label></dt>'
-                                               + '<dd><input type="number" size="5" value="3" min="1" id="redactor-table-columns" class="tiny" /></dd>'
-                                       + '</dl>'
-                               + '</fieldset>';
-               },
-               
-               /**
-                * Resolves issues in Chrome / WebKit based browsers
-                * 
-                * - Explicitly set CSS values for <span> within the editor, prevents Chrome from inserting random <span> tags
-                */
-               fixWebKit: function() {
-                       return;
-                       if (!$.browser.webkit && !document.documentElement.style.hasOwnProperty('WebkitAppearance') && !window.hasOwnProperty('chrome')) {
-                               return;
-                       }
-                       
-                       // get styles
-                       var $default = {
-                               fontSize: this.$editor.css('font-size'),
-                               lineHeight: this.$editor.css('line-height')
-                       };
-                       
-                       var $editorID = this.$editor.wcfIdentify();
-                       var $style = document.createElement('style');
-                       $style.type = 'text/css';
-                       $style.innerHTML = '#' + $editorID + ' span { font-size: ' + $default.fontSize + '; line-height: ' + $default.lineHeight + ' }';
-                       document.head.appendChild($style);
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wupload.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wupload.js
deleted file mode 100644 (file)
index 16a431f..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Handles drag&drop upload using the attachment system for Redactor.
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wupload = function() {
-       "use strict";
-       
-       return {
-               _boundGlobalUploadEvents: false,
-               _dropArea: { },
-               _timer: null,
-               _isDragging: false,
-               _isFile: false,
-               
-               /**
-                * Initializes the RedactorPlugins.wupload plugin.
-                */
-               init: function() {
-                       var $namespace = '.redactor_' + this.$textarea.wcfIdentify();
-                       $(document).on('dragover' + $namespace, $.proxy(this.wupload._dragOver, this));
-                       $(document).on('dragleave' + $namespace, $.proxy(this.wupload._dragLeave, this));
-                       $(document).on('drop' + $namespace, (function(event) {
-                               event.preventDefault();
-                               
-                               this.wupload._revertDropArea(undefined, this.$textarea.wcfIdentify());
-                       }).bind(this));
-                       
-                       if (!this.wupload._boundGlobalUploadEvents) {
-                               this.wupload._boundGlobalUploadEvents = true;
-                               
-                               $(document).on('dragend', function(event) { event.preventDefault(); });
-                       }
-                       
-                       WCF.System.Event.addListener('com.woltlab.wcf.attachment', 'autoInsert_' + this.$textarea.wcfIdentify(), $.proxy(this.wupload.insertPastedImageAttachment, this));
-               },
-               
-               /**
-                * Handles an actively dragged object.
-                * 
-                * @param       object          event
-                */
-               _dragOver: function(event) {
-                       event = event.originalEvent;
-                       
-                       if (!this.$editor.is(':visible')) {
-                               return;
-                       }
-                       
-                       if (!event.dataTransfer || !event.dataTransfer.types) {
-                               return;
-                       }
-                       
-                       var $isFirefox = false;
-                       for (var $property in event.dataTransfer) {
-                               if (/^moz/.test($property)) {
-                                       $isFirefox = true;
-                                       break;
-                               }
-                       }
-                       
-                       // IE and WebKit set 'Files', Firefox sets 'application/x-moz-file' for files being dragged
-                       // and Safari just provides 'Files' along with a huge list of other stuff
-                       this.wupload._isFile = false;
-                       if ($isFirefox) {
-                               // Firefox sets the 'Files' type even if the user is just dragging an on-page element
-                               if (event.dataTransfer.types[0] === 'application/x-moz-file') {
-                                       this.wupload._isFile = true;
-                               }
-                       }
-                       else {
-                               for (var $i = 0; $i < event.dataTransfer.types.length; $i++) {
-                                       if (event.dataTransfer.types[$i] === 'Files') {
-                                               this.wupload._isFile = true;
-                                               break;
-                                       }
-                               }
-                       }
-                       
-                       if (!this.wupload._isFile) {
-                               return;
-                       }
-                       
-                       this.wupload._isFile = true;
-                       event.preventDefault();
-                       
-                       if (!this.wupload._isDragging) {
-                               var $containerID = this.$textarea.wcfIdentify();
-                               
-                               if (this.wupload._dropArea[$containerID] === undefined) {
-                                       this.wupload._dropArea[$containerID] = $('<div class="redactorDropArea">' + WCF.Language.get('wcf.attachment.dragAndDrop.dropHere') + '</div>').hide().appendTo(document.body);
-                                       this.wupload._dropArea[$containerID].on('dragover', $.proxy(this.wupload._hoverDropArea, this)).on('dragleave', $.proxy(this.wupload._revertDropArea, this)).on('drop', $.proxy(this.wupload._drop, this));
-                               }
-                               
-                               // adjust dimensions
-                               var $dimensions = (this.wutil.inWysiwygMode()) ? this.$editor.getDimensions('outer') : this.$textarea.getDimensions('outer');
-                               var $position = (this.wutil.inWysiwygMode()) ? this.$editor.getOffsets('offset') : this.$textarea.getOffsets('offset');
-                               
-                               this.wupload._dropArea[$containerID].css({
-                                       height: $dimensions.height + 'px',
-                                       left: $position.left + 'px',
-                                       lineHeight: $dimensions.height + 'px',
-                                       top: $position.top + 'px',
-                                       width: $dimensions.width + 'px'
-                               }).show();
-                               
-                               this.wupload._isDragging = true;
-                       }
-                       
-                       event.preventDefault();
-               },
-               
-               /**
-                * Visualizes the drop area being hovered.
-                * 
-                * @param       object          event
-                */
-               _hoverDropArea: function(event) {
-                       this.wupload._dropArea[this.$textarea.wcfIdentify()].addClass('active').text(WCF.Language.get('wcf.attachment.dragAndDrop.dropNow'));
-               },
-               
-               /**
-                * Reverts the drop area into the initial state.
-                * 
-                * @param       object          event
-                * @param       string          containerID
-                */
-               _revertDropArea: function(event, containerID) {
-                       if (!this.wupload._isFile) {
-                               return;
-                       }
-                       
-                       var $containerID = containerID || this.$textarea.wcfIdentify();
-                       this.wupload._dropArea[$containerID].removeClass('active').text(WCF.Language.get('wcf.attachment.dragAndDrop.dropHere'));
-                       
-                       if (containerID) {
-                               this.wupload._dropArea[$containerID].hide();
-                       }
-               },
-               
-               /**
-                * Handles the object no longer being dragged.
-                * 
-                * This event can fires whenever an object is hovering over a different element, there is
-                * a delay of 100ms before the dragging will be checked again to prevent flicker.
-                */
-               _dragLeave: function() {
-                       if (!this.wupload._isDragging || !this.wupload._isFile) {
-                               return;
-                       }
-                       
-                       if (this.wupload._timer === null) {
-                               this.wupload._timer = new WCF.PeriodicalExecuter((function(pe) {
-                                       pe.stop();
-                                       
-                                       if (!this.wupload._isDragging) {
-                                               this.wupload._dropArea[this.$textarea.wcfIdentify()].hide();
-                                       }
-                               }).bind(this), 100);
-                       }
-                       else {
-                               this.wupload._timer.resume();
-                       }
-                       
-                       this.wupload._isDragging = false;
-               },
-               
-               /**
-                * Handles the drop of the dragged object.
-                * 
-                * @param       object          event
-                */
-               _drop: function(event) {
-                       if (!this.wupload._isFile) {
-                               return;
-                       }
-                       
-                       event = event.originalEvent || event;
-                       
-                       if (event.dataTransfer && event.dataTransfer.files.length) {
-                               event.preventDefault();
-                               
-                               // reset overlay
-                               var $containerID = this.$textarea.wcfIdentify();
-                               this.wupload._revertDropArea(undefined, $containerID);
-                               
-                               for (var $i = 0; $i < event.dataTransfer.files.length; $i++) {
-                                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'upload_' + $containerID, { file: event.dataTransfer.files[$i] });
-                               }
-                       }
-               },
-               
-               /**
-                * Overwrites $.Redactor.pasteClipboardUploadMozilla() to upload files as attachments.
-                * 
-                * @see         $.Redactor.pasteClipboardUploadMozilla()
-                */
-               pasteClipboardUploadMozilla: function() {
-                       this.$editor.find('img[data-mozilla-paste-image]').each($.proxy(function(index, image) {
-                               var $image = $(image);
-                               var $src = $image.prop('src').split(',');
-                               var $contentType = $src[0].split(';')[0].split(':')[1];
-                               var $data = $src[1]; // raw base64
-                               
-                               var $eventData = {
-                                       blob: WCF.base64toBlob($data, $contentType),
-                                       uploadID: null
-                               };
-                               WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'upload_' + this.$textarea.wcfIdentify(), $eventData);
-                               
-                               // drop image
-                               $image.replaceWith('<span class="redactor-pastedImageFromClipboard-' + $eventData.uploadID + '" />');
-                       }, this));
-               },
-               
-               /**
-                * Inserts the attachment at the placeholder location.
-                * 
-                * @param       object          data
-                */
-               insertPastedImageAttachment: function(data) {
-                       var $placeholder = this.$editor.find('span.redactor-pastedImageFromClipboard-' + data.uploadID);
-                       $placeholder.before(data.attachment);
-                       $placeholder.remove();
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js
deleted file mode 100644 (file)
index ade48a0..0000000
+++ /dev/null
@@ -1,567 +0,0 @@
-if (!RedactorPlugins) var RedactorPlugins = {};
-
-/**
- * Provides utility methods extending $.Redactor
- * 
- * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- */
-RedactorPlugins.wutil = function() {
-       "use strict";
-       
-       var $autosaveLastMessage = '';
-       var $autosaveNotice = null;
-       var $autosaveDidSave = false;
-       var $autosavePaused = false;
-       var $autosaveSaveNoticePE = null;
-       
-       var _editor = null;
-       var _range =  null;
-       var _textarea = null;
-       
-       return {
-               /**
-                * autosave worker process
-                * @var WCF.PeriodicalExecuter
-                */
-               _autosaveWorker: null,
-               
-               /**
-                * Initializes the RedactorPlugins.wutil plugin.
-                */
-               init: function() {
-                       _editor = this.$editor[0];
-                       _textarea = this.$textarea[0];
-                       
-                       // convert HTML to BBCode upon submit
-                       this.$textarea.parents('form').submit($.proxy(this.wutil.submit, this));
-                       
-                       WCF.System.Event.addListener('com.woltlab.wcf.redactor', 'getText_' + _textarea.id, (function(data) {
-                               data.message = this.wutil.getText();
-                       }).bind(this));
-               },
-               
-               /**
-                * Saves current caret position.
-                * 
-                * @param       boolean         discardSavedIfEmpty
-                */
-               saveSelection: function(discardSavedIfEmpty) {
-                       var selection = window.getSelection();
-                       
-                       if (selection.rangeCount) {
-                               _range = selection.getRangeAt(0);
-                       }
-                       else if (discardSavedIfEmpty) {
-                               _range = null;
-                       }
-               },
-               
-               /**
-                * Restores saved selection.
-                */
-               restoreSelection: function() {
-                       if (document.activeElement !== _editor) {
-                               _editor.focus();
-                       }
-                       
-                       if (_range !== null) {
-                               var selection = window.getSelection();
-                               selection.removeAllRanges();
-                               selection.addRange(_range);
-                               
-                               _range = null;
-                       }
-               },
-               
-               /**
-                * Clears the current selection.
-                */
-               clearSelection: function() {
-                       _range = null;
-               },
-               
-               /**
-                * Returns stored selection or null.
-                * 
-                * @return      Range
-                */
-               getSelection: function() {
-                       return _range;
-               },
-               
-               /**
-                * Allows inserting of text contents in Redactor's source area.
-                * 
-                * @param       string          string
-                * @return      boolean
-                */
-               insertAtCaret: function(string) {
-                       if (this.opts.visual) {
-                               console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");
-                               return false;
-                       }
-                       
-                       _textarea.focus();
-                       var $position = this.$textarea.getCaret();
-                       if ($position == -1) {
-                               console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.");
-                       }
-                       
-                       var $content = _textarea.value;
-                       $content = $content.substr(0, $position) + string + $content.substr($position);
-                       _textarea.value = $content;
-                       
-                       return true;
-               },
-               
-               /**
-                * Inserts content into the editor depending if it is in wysiwyg or plain mode. If 'plainValue' is
-                * null or undefined, the value from 'html' will be taken instead.
-                * 
-                * @param       string          html
-                * @param       string          plainValue
-                */
-               insertDynamic: function(html, plainValue) {
-                       if (this.wutil.inWysiwygMode()) {
-                               this.insert.html(html, false);
-                       }
-                       else {
-                               if (plainValue === undefined || plainValue === null) {
-                                       plainValue = html;
-                               }
-                               
-                               this.wutil.insertAtCaret(plainValue);
-                       }
-               },
-               
-               /**
-                * Sets an option value after initialization.
-                * 
-                * @param       string          key
-                * @param       mixed           value
-                */
-               setOption: function(key, value) {
-                       if (key.indexOf('.') !== -1) {
-                               key = key.split('.', 2);
-                               this.opts[key[0]][key[1]] = value;
-                       }
-                       else {
-                               this.opts[key] = value;
-                       }
-               },
-               
-               /**
-                * Reads an option value, returns null if key is unknown.
-                * 
-                * @param       string          key
-                * @return      mixed
-                */
-               getOption: function(key) {
-                       if (key.indexOf('.') !== -1) {
-                               key = key.split('.', 2);
-                               if (this.opts[key[0]][key[1]]) {
-                                       return this.opts[key[0]][key[1]];
-                               }
-                       }
-                       else if (this.opts[key]) {
-                               return this.opts[key];
-                       }
-                       
-                       return null;
-               },
-               
-               /**
-                * Returns true if editor is in source mode.
-                * 
-                * @return      boolean
-                */
-               inPlainMode: function() {
-                       return !this.opts.visual;
-               },
-               
-               /**
-                * Returns true if editor is in WYSIWYG mode.
-                * 
-                * @return      boolean
-                */
-               inWysiwygMode: function() {
-                       return (this.opts.visual);
-               },
-               
-               /**
-                * Replaces all ranges from the current selection with the provided one.
-                * 
-                * @param       DOMRange        range
-                */
-               replaceRangesWith: function(range) {
-                       getSelection().removeAllRanges();
-                       getSelection().addRange(range);
-               },
-               
-               /**
-                * Returns text using BBCodes.
-                * 
-                * @return      string
-                */
-               getText: function() {
-                       if (this.wutil.inWysiwygMode()) {
-                               this.code.startSync();
-                               
-                               _textarea.value = this.wbbcode.convertFromHtml(_textarea.value).trim();
-                       }
-                       
-                       return _textarea.value.trim();
-               },
-               
-               /**
-                * Returns true if editor is empty.
-                * 
-                * @return      boolean
-                */
-               isEmptyEditor: function() {
-                       if (this.opts.visual) {
-                               return this.utils.isEmpty(_editor.innerHTML);
-                       }
-                       
-                       return (_textarea.value.trim() === '');
-               },
-               
-               /**
-                * Converts HTML to BBCode upon submit.
-                */
-               submit: function() {
-                       if (this.wutil.inWysiwygMode()) {
-                               this.code.startSync();
-                               
-                               _textarea = this.wbbcode.convertFromHtml(_textarea.value).trim();
-                       }
-                       
-                       this.wautosave.purge();
-               },
-               
-               /**
-                * Resets the editor's contents.
-                */
-               reset: function() {
-                       if (this.opts.visual) {
-                               _editor.innerHTML = '';
-                               this.wutil.saveSelection();
-                       }
-                       
-                       _textarea.value = '';
-                       
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'reset', { wysiwygContainerID: _textarea.id });
-               },
-               
-               /** @deprecated 2.2 - please use `wautosave.enable()` instead */
-               autosaveEnable: function(key) { this.wautosave.enable(key); },
-               
-               /** @deprecated 2.2 - please use `wautosave.save()` instead */
-               saveTextToStorage: function(force) { this.wautosave.save(force); },
-               
-               /** @deprecated 2.2 - please use `wautosave.disable()` instead */
-               autosaveDisable: function() { return this.wautosave.disable(); },
-               
-               /** @deprecated 2.2 - please use `wautosave.purge()` instead */
-               autosavePurge: function() { this.wautosave.purge(); },
-               
-               /** @deprecated 2.2 - please use `wautosave.restore()` instead */
-               autosaveRestore: function() { return this.wautosave.restore(); },
-               
-               /** @deprecated 2.2 - please use `wautosave.showNotice()` instead */
-               autosaveShowNotice: function(type, data) { this.wautosave.showNotice(type, data); },
-               
-               /** @deprecated 2.2 - please use `wautosave.purgeOutdated()` instead */
-               autosavePurgeOutdated: function() { this.wautosave.purgeOutdated(); },
-               
-               /** @deprecated 2.2 - please use `wautosave.pause()` instead */
-               autosavePause: function() { this.wautosave.pause(); },
-               
-               /** @deprecated 2.2 - please use `wautosave.resume()` instead */
-               autosaveResume: function() { this.wautosave.resume(); },
-               
-               /**
-                * Replaces one button with a new one.
-                * 
-                * @param       string          target
-                * @param       string          key
-                * @param       string          title
-                * @param       object          callback
-                * @param       object          dropdown
-                * @return      jQuery
-                */
-               buttonReplace: function(target, key, title, callback, dropdown) {
-                       var $target = this.buttonGet(target);
-                       
-                       var $button = this.buttonAddAfter(target, key, title, callback, dropdown);
-                       if ($target.parent().hasClass('separator')) {
-                               $button.parent().addClass('separator');
-                       }
-                       
-                       $target.parent().remove();
-                       
-                       return $button;
-               },
-               
-               /**
-                * Removes the unicode zero-width space (0x200B).
-                * 
-                * @param       string          string
-                * @return      string
-                */
-               removeZeroWidthSpace: function(string) {
-                       return string.replace(/\u200b/g, '');
-               },
-               
-               /**
-                * Returns source textarea object.
-                * 
-                * @deprecated  2.2 - please use `core.getTextarea()` instead
-                * @return      jQuery
-                */
-               getSource: function() {
-                       return this.$textarea;
-               },
-               
-               /**
-                * Returns editor instance name.
-                * 
-                * @return      string
-                */
-               getName: function() {
-                       return _textarea.id;
-               },
-               
-               /**
-                * Sets the selection after the last direct children of the editor.
-                */
-               selectionEndOfEditor: function() {
-                       var lastChild = _editor.lastElementChild;
-                       if (lastChild === null || lastChild.nodeName === 'BLOCKQUOTE' || (lastChild.nodeName === 'DIV' && lastChild.classList.contains('codeBox')) || lastChild.nodeName === 'KBD') {
-                               var element = this.utils.createSpaceElement();
-                               _editor.appendChild(element);
-                               
-                               this.caret.setEnd(element);
-                               this.wutil.saveSelection();
-                       }
-                       else {
-                               this.focus.setEnd();
-                       }
-               },
-               
-               /**
-                * Inserting block-level elements into other blocks or inline elements can mess up the entire DOM,
-                * this method tries to find the best nearby insert location.
-                */
-               adjustSelectionForBlockElement: function() {
-                       if (document.activeElement !== _editor) {
-                               this.wutil.restoreSelection();
-                       }
-                       
-                       if (!window.getSelection().rangeCount) {
-                               return;
-                       }
-                       
-                       var range = window.getSelection().getRangeAt(0);
-                       if (range.collapsed) {
-                               var element = range.startContainer;
-                               if (element.nodeType === Node.TEXT_NODE && element.parentNode && element.parentNode.parentNode === _editor) {
-                                       // caret position is fine
-                                       return;
-                               }
-                               else {
-                                       // walk tree up until we find a direct children of the editor and place the caret afterwards
-                                       while (element && element !== _editor) {
-                                               element = element.parentNode;
-                                       }
-                                       
-                                       if (element.parentNode === _editor) {
-                                               this.caret.setAfter(element);
-                                       }
-                                       else {
-                                               // work-around if selection never has been within the editor before
-                                               this.wutil.selectionEndOfEditor();
-                                       }
-                               }
-                       }
-               },
-               
-               /**
-                * Returns true if current selection is just a caret or false if selection spans content.
-                * 
-                * @return      boolean
-                */
-               isCaret: function() {
-                       this.selection.get();
-                       
-                       return this.range.collapsed;
-               },
-               
-               /**
-                * Returns true if current selection is just a caret and it is the last possible offset
-                * within the given element.
-                * 
-                * @param       Element         element
-                * @return      boolean
-                */
-               isEndOfElement: function(element) {
-                       // prefer our range because it is more reliable
-                       var $range = this.selection.implicitRange;
-                       if ($range === null) {
-                               this.selection.get();
-                               $range = this.range;
-                       }
-                       
-                       // range is not a plain caret
-                       if (!this.wutil.isCaret()) {
-                               return false;
-                       }
-                       
-                       if ($range.endContainer.nodeType === Node.TEXT_NODE) {
-                               // caret is not at the end
-                               if ($range.endOffset < $range.endContainer.length) {
-                                       return false;
-                               }
-                       }
-                       
-                       // range is not within the provided element
-                       if (!this.wutil.isNodeWithin($range.endContainer, element)) {
-                               return false;
-                       }
-                       
-                       var $current = $range.endContainer;
-                       while ($current !== element) {
-                               // end of range is not the last element
-                               if ($current.nextSibling) {
-                                       return false;
-                               }
-                               
-                               $current = $current.parentNode;
-                       }
-                       
-                       return true;
-               },
-               
-               /**
-                * Returns true if the provided node is a direct or indirect child of the target element. This
-                * method works similar to jQuery's $.contains() but works recursively.
-                * 
-                * @param       Element         node
-                * @param       Element         element
-                * @return      boolean
-                */
-               isNodeWithin: function(node, element) {
-                       while (node && node !== _editor) {
-                               if (node === element) {
-                                       return true;
-                               }
-                               
-                               node = node.parentNode;
-                       }
-                       
-                       return false;
-               },
-               
-               /**
-                * Returns true if the given node equals the provided tagName or contains it.
-                * 
-                * @param       Element         node
-                * @param       string          tagName
-                * @return      boolean
-                */
-               containsTag: function(node, tagName) {
-                       if (node.nodeType === Node.ELEMENT_NODE) {
-                               if (node.nodeName === tagName) {
-                                       return true;
-                               }
-                       }
-                       else if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
-                               for (var i = 0, length = node.childElementCount; i < length; i++) {
-                                       if (this.wutil.containsTag(node.childNodes[i], tagName)) {
-                                               return true;
-                                       }
-                               }
-                       }
-                       
-                       return false;
-               },
-               
-               /**
-                * Replaces the current content with the provided value.
-                * 
-                * @param       string          value
-                */
-               replaceText: function(value) {
-                       var $document = $(document);
-                       var $offsetTop = $document.scrollTop();
-                       var $wasInWysiwygMode = false;
-                       
-                       if (this.wutil.inWysiwygMode()) {
-                               this.code.toggle();
-                               $wasInWysiwygMode = true;
-                       }
-                       
-                       _textarea.value = value;
-                       
-                       if ($wasInWysiwygMode) {
-                               this.code.toggle();
-                               
-                               // restore scrolling since editor receives the focus
-                               $document.scrollTop($offsetTop);
-                       }
-                       
-                       // trigger resize event to rebuild message tab menu
-                       $document.trigger('resize');
-               },
-               
-               /**
-                * Sets the caret before the given element.
-                * 
-                * @param       Element         element
-                */
-               setCaretBefore: function(element) {
-                       this.caret.setBefore(element);
-               },
-               
-               /**
-                * Sets the caret after the given element.
-                * 
-                * @param       Element         element
-                */
-               setCaretAfter: function(element) {
-                       this.caret.setAfter(element);
-               },
-               
-               /**
-                * Sets the caret at target position.
-                * 
-                * @deprecated  2.2 - please use `wutil.setCaret(Before|After)()` instead
-                * @param       Element         element
-                * @param       boolean         setBefore
-                */
-               _setCaret: function(element, setBefore) {
-                       this.caret[(setBefore ? 'setBefore' : 'setAfter')](element);
-               },
-               
-               /**
-                * Fixes the DOM after pasting:
-                *  - move all non-element children of the editor into a paragraph
-                *  - pasting lists/list-items in lists can yield empty <li></li>
-                */
-               fixDOM: function() {
-                       var elements = _editor.querySelectorAll('li:empty'), parent;
-                       for (var i = 0, length = elements.length; i < length; i++) {
-                               parent = elements[i].parentNode;
-                               if (parent.childElementCount > 1) {
-                                       parent.removeChild(elements[i]);
-                               }
-                       }
-                       
-                       // remove input elements
-                       elements = _editor.getElementsByTagName('INPUT');
-                       while (elements.length) elements[0].parentNode.removeChild(elements[0]);
-               }
-       };
-};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/redactor.js b/wcfsetup/install/files/js/3rdParty/redactor/redactor.js
deleted file mode 100644 (file)
index d65e5a0..0000000
+++ /dev/null
@@ -1,9542 +0,0 @@
-/*
-       Redactor 10.2.5
-       Updated: October 1, 2015
-
-       http://imperavi.com/redactor/
-
-       Copyright (c) 2009-2015, Imperavi LLC.
-       License: http://imperavi.com/redactor/license/
-
-       Usage: $('#content').redactor();
-*/
-
-(function($)
-{
-
-       'use strict';
-
-       if (!Function.prototype.bind)
-       {
-               Function.prototype.bind = function(scope)
-               {
-                       var fn = this;
-                       return function()
-                       {
-                               return fn.apply(scope);
-                       };
-               };
-       }
-
-       var uuid = 0;
-
-       // Plugin
-       $.fn.redactor = function(options)
-       {
-               var val = [];
-               var args = Array.prototype.slice.call(arguments, 1);
-
-               if (typeof options === 'string')
-               {
-                       this.each(function()
-                       {
-                               var instance = $.data(this, 'redactor');
-                               var func;
-
-                               if (options.search(/\./) != '-1')
-                               {
-                                       func = options.split('.');
-                                       if (typeof instance[func[0]] != 'undefined')
-                                       {
-                                               func = instance[func[0]][func[1]];
-                                       }
-                               }
-                               else
-                               {
-                                       func = instance[options];
-                               }
-
-                               if (typeof instance !== 'undefined' && $.isFunction(func))
-                               {
-                                       var methodVal = func.apply(instance, args);
-                                       if (methodVal !== undefined && methodVal !== instance)
-                                       {
-                                               val.push(methodVal);
-                                       }
-                               }
-                               else
-                               {
-                                       $.error('No such method "' + options + '" for Redactor');
-                               }
-                       });
-               }
-               else
-               {
-                       this.each(function()
-                       {
-                               $.data(this, 'redactor', {});
-                               $.data(this, 'redactor', Redactor(this, options));
-                       });
-               }
-
-               if (val.length === 0) return this;
-               else if (val.length === 1) return val[0];
-               else return val;
-
-       };
-
-       // Initialization
-       function Redactor(el, options)
-       {
-               return new Redactor.prototype.init(el, options);
-       }
-
-       // Functionality
-       $.Redactor = Redactor;
-       $.Redactor.VERSION = '10.2.5';
-       $.Redactor.modules = ['alignment', 'autosave', 'block', 'buffer', 'build', 'button',
-                                                 'caret', 'clean', 'code', 'core', 'dropdown', 'file', 'focus',
-                                                 'image', 'indent', 'inline', 'insert', 'keydown', 'keyup',
-                                                 'lang', 'line', 'link', 'linkify', 'list', 'modal', 'observe', 'paragraphize',
-                                                 'paste', 'placeholder', 'progress', 'selection', 'shortcuts',
-                                                 'tabifier', 'tidy',  'toolbar', 'upload', 'utils'];
-
-       $.Redactor.opts = {
-
-               // settings
-               lang: 'en',
-               direction: 'ltr', // ltr or rtl
-
-               plugins: false, // array
-
-               focus: false,
-               focusEnd: false,
-
-               placeholder: false,
-
-               visual: true,
-               tabindex: false,
-
-               minHeight: false,
-               maxHeight: false,
-
-               linebreaks: false,
-               replaceDivs: true,
-               paragraphize: true,
-               cleanStyleOnEnter: false,
-               enterKey: true,
-
-               cleanOnPaste: true,
-               cleanSpaces: true,
-               pastePlainText: false,
-
-               autosave: false, // false or url
-               autosaveName: false,
-               autosaveInterval: 60, // seconds
-               autosaveOnChange: false,
-               autosaveFields: false,
-
-               linkTooltip: true,
-               linkProtocol: 'http',
-               linkNofollow: false,
-               linkSize: 50,
-
-               imageEditable: true,
-               imageLink: true,
-               imagePosition: true,
-               imageFloatMargin: '10px',
-               imageResizable: true,
-
-               imageUpload: null,
-               imageUploadParam: 'file',
-
-               uploadImageField: false,
-
-               dragImageUpload: true,
-
-               fileUpload: null,
-               fileUploadParam: 'file',
-
-               dragFileUpload: true,
-
-               s3: false,
-
-               convertLinks: true,
-               convertUrlLinks: true,
-               convertImageLinks: true,
-               convertVideoLinks: true,
-
-               preSpaces: 4, // or false
-               tabAsSpaces: false, // true or number of spaces
-               tabKey: true,
-
-               scrollTarget: false,
-
-               toolbar: true,
-               toolbarFixed: true,
-               toolbarFixedTarget: document,
-               toolbarFixedTopOffset: 0, // pixels
-               toolbarExternal: false, // ID selector
-               toolbarOverflow: false,
-
-               source: true,
-               buttons: ['html', 'formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist',
-                                 'outdent', 'indent', 'image', 'file', 'link', 'alignment', 'horizontalrule'], // + 'underline'
-
-               buttonsHide: [],
-               buttonsHideOnMobile: [],
-
-               formatting: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
-               formattingAdd: false,
-
-               tabifier: true,
-
-               deniedTags: ['script', 'style'],
-               allowedTags: false, // or array
-
-               paragraphizeBlocks: ['table', 'div', 'pre', 'form', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'dl', 'blockquote', 'figcaption',
-                                                       'address', 'section', 'header', 'footer', 'aside', 'article', 'object', 'style', 'script', 'iframe', 'select', 'input', 'textarea',
-                                                       'button', 'option', 'map', 'area', 'math', 'hr', 'fieldset', 'legend', 'hgroup', 'nav', 'figure', 'details', 'menu', 'summary', 'p'],
-
-               removeComments: false,
-               replaceTags: [
-                       ['strike', 'del'],
-                       ['b', 'strong']
-               ],
-               replaceStyles: [
-            ['font-weight:\\s?bold', "strong"],
-            ['font-style:\\s?italic', "em"],
-            ['text-decoration:\\s?underline', "u"],
-            ['text-decoration:\\s?line-through', 'del']
-        ],
-        removeDataAttr: false,
-
-               removeAttr: false, // or multi array
-               allowedAttr: false, // or multi array
-
-               removeWithoutAttr: ['span'], // or false
-               removeEmpty: ['p'], // or false;
-
-               activeButtons: ['deleted', 'italic', 'bold', 'underline', 'unorderedlist', 'orderedlist',
-                                               'alignleft', 'aligncenter', 'alignright', 'justify'],
-               activeButtonsStates: {
-                       b: 'bold',
-                       strong: 'bold',
-                       i: 'italic',
-                       em: 'italic',
-                       del: 'deleted',
-                       strike: 'deleted',
-                       ul: 'unorderedlist',
-                       ol: 'orderedlist',
-                       u: 'underline'
-               },
-
-               shortcuts: {
-                       'ctrl+shift+m, meta+shift+m': { func: 'inline.removeFormat' },
-                       'ctrl+b, meta+b': { func: 'inline.format', params: ['bold'] },
-                       'ctrl+i, meta+i': { func: 'inline.format', params: ['italic'] },
-                       'ctrl+h, meta+h': { func: 'inline.format', params: ['superscript'] },
-                       'ctrl+l, meta+l': { func: 'inline.format', params: ['subscript'] },
-                       'ctrl+k, meta+k': { func: 'link.show' },
-                       'ctrl+shift+7':   { func: 'list.toggle', params: ['orderedlist'] },
-                       'ctrl+shift+8':   { func: 'list.toggle', params: ['unorderedlist'] }
-               },
-               shortcutsAdd: false,
-
-               // private
-               buffer: [],
-               rebuffer: [],
-               emptyHtml: '<p>&#x200b;</p>',
-               invisibleSpace: '&#x200b;',
-               imageTypes: ['image/png', 'image/jpeg', 'image/gif'],
-               indentValue: 20,
-               verifiedTags:           ['a', 'img', 'b', 'strong', 'sub', 'sup', 'i', 'em', 'u', 'small', 'strike', 'del', 'cite', 'ul', 'ol', 'li'], // and for span tag special rule
-               inlineTags:             ['strong', 'b', 'u', 'em', 'i', 'code', 'del', 'ins', 'samp', 'kbd', 'sup', 'sub', 'mark', 'var', 'cite', 'small'],
-               alignmentTags:          ['P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6',  'DL', 'DT', 'DD', 'DIV', 'TD', 'BLOCKQUOTE', 'OUTPUT', 'FIGCAPTION', 'ADDRESS', 'SECTION', 'HEADER', 'FOOTER', 'ASIDE', 'ARTICLE'],
-               blockLevelElements: ['PRE', 'UL', 'OL', 'LI'],
-               highContrast: false,
-               observe: {
-                       dropdowns: []
-               },
-
-               // lang
-               langs: {
-                       en: {
-                               html: 'HTML',
-                               video: 'Insert Video',
-                               image: 'Insert Image',
-                               table: 'Table',
-                               link: 'Link',
-                               link_insert: 'Insert link',
-                               link_edit: 'Edit link',
-                               unlink: 'Unlink',
-                               formatting: 'Formatting',
-                               paragraph: 'Normal text',
-                               quote: 'Quote',
-                               code: 'Code',
-                               header1: 'Header 1',
-                               header2: 'Header 2',
-                               header3: 'Header 3',
-                               header4: 'Header 4',
-                               header5: 'Header 5',
-                               bold: 'Bold',
-                               italic: 'Italic',
-                               fontcolor: 'Font Color',
-                               backcolor: 'Back Color',
-                               unorderedlist: 'Unordered List',
-                               orderedlist: 'Ordered List',
-                               outdent: 'Outdent',
-                               indent: 'Indent',
-                               cancel: 'Cancel',
-                               insert: 'Insert',
-                               save: 'Save',
-                               _delete: 'Delete',
-                               insert_table: 'Insert Table',
-                               insert_row_above: 'Add Row Above',
-                               insert_row_below: 'Add Row Below',
-                               insert_column_left: 'Add Column Left',
-                               insert_column_right: 'Add Column Right',
-                               delete_column: 'Delete Column',
-                               delete_row: 'Delete Row',
-                               delete_table: 'Delete Table',
-                               rows: 'Rows',
-                               columns: 'Columns',
-                               add_head: 'Add Head',
-                               delete_head: 'Delete Head',
-                               title: 'Title',
-                               image_position: 'Position',
-                               none: 'None',
-                               left: 'Left',
-                               right: 'Right',
-                               center: 'Center',
-                               image_web_link: 'Image Web Link',
-                               text: 'Text',
-                               mailto: 'Email',
-                               web: 'URL',
-                               video_html_code: 'Video Embed Code or Youtube/Vimeo Link',
-                               file: 'Insert File',
-                               upload: 'Upload',
-                               download: 'Download',
-                               choose: 'Choose',
-                               or_choose: 'Or choose',
-                               drop_file_here: 'Drop file here',
-                               align_left: 'Align text to the left',
-                               align_center: 'Center text',
-                               align_right: 'Align text to the right',
-                               align_justify: 'Justify text',
-                               horizontalrule: 'Insert Horizontal Rule',
-                               deleted: 'Deleted',
-                               anchor: 'Anchor',
-                               link_new_tab: 'Open link in new tab',
-                               underline: 'Underline',
-                               alignment: 'Alignment',
-                               filename: 'Name (optional)',
-                               edit: 'Edit',
-                               upload_label: 'Drop file here or '
-                       }
-               },
-
-               linkify: {
-                       regexps: {
-                               youtube: /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,
-                               vimeo: /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,
-                               image: /((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/ig,
-                               url: /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/ig,
-                       }
-               },
-
-               codemirror: false
-       };
-
-       // Functionality
-       Redactor.fn = $.Redactor.prototype = {
-
-               keyCode: {
-                       BACKSPACE: 8,
-                       DELETE: 46,
-                       UP: 38,
-                       DOWN: 40,
-                       ENTER: 13,
-                       SPACE: 32,
-                       ESC: 27,
-                       TAB: 9,
-                       CTRL: 17,
-                       META: 91,
-                       SHIFT: 16,
-                       ALT: 18,
-                       RIGHT: 39,
-                       LEFT: 37,
-                       LEFT_WIN: 91
-               },
-
-               // Initialization
-               init: function(el, options)
-               {
-                       this.$element = $(el);
-                       this.uuid = uuid++;
-
-                       // if paste event detected = true
-                       this.rtePaste = false;
-                       this.$pasteBox = false;
-
-                       this.loadOptions(options);
-                       this.loadModules();
-
-                       // formatting storage
-                       this.formatting = {};
-
-                       // block level tags
-                       $.merge(this.opts.blockLevelElements, this.opts.alignmentTags);
-                       this.reIsBlock = new RegExp('^(' + this.opts.blockLevelElements.join('|' ) + ')$', 'i');
-
-                       // setup allowed and denied tags
-                       this.tidy.setupAllowed();
-
-                       // setup denied tags
-                       if (this.opts.deniedTags !== false)
-                       {
-                               var tags = ['html', 'head', 'link', 'body', 'meta', 'applet'];
-                               for (var i = 0; i < tags.length; i++)
-                               {
-                                       this.opts.deniedTags.push(tags[i]);
-                               }
-                       }
-
-                       // load lang
-                       this.lang.load();
-
-                       // extend shortcuts
-                       $.extend(this.opts.shortcuts, this.opts.shortcutsAdd);
-
-                       // start callback
-                       this.core.setCallback('start');
-
-                       // build
-                       this.start = true;
-                       this.build.run();
-               },
-
-               loadOptions: function(options)
-               {
-                       this.opts = $.extend(
-                               {},
-                               $.extend(true, {}, $.Redactor.opts),
-                               this.$element.data(),
-                               options
-                       );
-               },
-               getModuleMethods: function(object)
-               {
-                       return Object.getOwnPropertyNames(object).filter(function(property)
-                       {
-                               return typeof object[property] == 'function';
-                       });
-               },
-               loadModules: function()
-               {
-                       var len = $.Redactor.modules.length;
-                       for (var i = 0; i < len; i++)
-                       {
-                               this.bindModuleMethods($.Redactor.modules[i]);
-                       }
-               },
-               bindModuleMethods: function(module)
-               {
-                       if (typeof this[module] == 'undefined') return;
-
-                       // init module
-                       this[module] = this[module]();
-
-                       var methods = this.getModuleMethods(this[module]);
-                       var len = methods.length;
-
-                       // bind methods
-                       for (var z = 0; z < len; z++)
-                       {
-                               this[module][methods[z]] = this[module][methods[z]].bind(this);
-                       }
-               },
-               alignment: function()
-               {
-                       return {
-                               left: function()
-                               {
-                                       this.alignment.set('');
-                               },
-                               right: function()
-                               {
-                                       this.alignment.set('right');
-                               },
-                               center: function()
-                               {
-                                       this.alignment.set('center');
-                               },
-                               justify: function()
-                               {
-                                       this.alignment.set('justify');
-                               },
-                               set: function(type)
-                               {
-                                       // focus
-                                       if (!this.utils.browser('msie') && !this.opts.linebreaks)
-                                       {
-                                               this.$editor.focus();
-                                       }
-
-                                       // get blocks
-                                       this.alignment.blocks = this.selection.getBlocks();
-                                       this.alignment.type = type;
-
-                                       this.buffer.set();
-                                       this.selection.save();
-
-                                       // set alignment
-                                       if (this.alignment.isLinebreaksOrNoBlocks())
-                                       {
-                                               this.alignment.setText();
-                                       }
-                                       else
-                                       {
-                                               this.alignment.setBlocks();
-                                       }
-
-                                       // sync
-                                       this.selection.restore();
-                                       this.code.sync();
-                               },
-                               setText: function()
-                               {
-                                       var wrapper = this.selection.wrap('div');
-                                       $(wrapper).attr('data-tagblock', 'redactor').css('text-align', this.alignment.type);
-                               },
-                               setBlocks: function()
-                               {
-                                       $.each(this.alignment.blocks, $.proxy(function(i, el)
-                                       {
-                                               var $el = this.utils.getAlignmentElement(el);
-                                               if (!$el) return;
-
-                                               if (this.alignment.isNeedReplaceElement($el))
-                                               {
-                                                       this.alignment.replaceElement($el);
-                                               }
-                                               else
-                                               {
-                                                       this.alignment.alignElement($el);
-                                               }
-
-                                       }, this));
-                               },
-                               isLinebreaksOrNoBlocks: function()
-                               {
-                                       return (this.opts.linebreaks && this.alignment.blocks[0] === false);
-                               },
-                               isNeedReplaceElement: function($el)
-                               {
-                                       return (this.alignment.type === '' && typeof($el.data('tagblock')) !== 'undefined');
-                               },
-                               replaceElement: function($el)
-                               {
-                                       $el.replaceWith($el.html());
-                               },
-                               alignElement: function($el)
-                               {
-                                       $el.css('text-align', this.alignment.type);
-                                       this.utils.removeEmptyAttr($el, 'style');
-                               }
-                       };
-               },
-               autosave: function()
-               {
-                       return {
-                               html: false,
-                               enable: function()
-                               {
-                                       if (!this.opts.autosave) return;
-
-                                       this.autosave.name = (this.opts.autosaveName) ? this.opts.autosaveName : this.$textarea.attr('name');
-
-                                       if (this.opts.autosaveOnChange) return;
-                                       this.autosaveInterval = setInterval(this.autosave.load, this.opts.autosaveInterval * 1000);
-                               },
-                               onChange: function()
-                               {
-                                       if (!this.opts.autosaveOnChange) return;
-                                       this.autosave.load();
-                               },
-                               load: function()
-                               {
-                                       if (!this.opts.autosave) return;
-
-                                       this.autosave.source = this.code.get();
-
-                                       if (this.autosave.html === this.autosave.source) return;
-
-                                       // data
-                                       var data = {};
-                                       data['name'] = this.autosave.name;
-                                       data[this.autosave.name] = this.autosave.source;
-                                       data = this.autosave.getHiddenFields(data);
-
-                                       // ajax
-                                       var jsxhr = $.ajax({
-                                               url: this.opts.autosave,
-                                               type: 'post',
-                                               data: data
-                                       });
-
-                                       jsxhr.done(this.autosave.success);
-                               },
-                               getHiddenFields: function(data)
-                               {
-                                       if (this.opts.autosaveFields === false || typeof this.opts.autosaveFields !== 'object')
-                                       {
-                                               return data;
-                                       }
-
-                                       $.each(this.opts.autosaveFields, $.proxy(function(k, v)
-                                       {
-                                               if (v !== null && v.toString().indexOf('#') === 0) v = $(v).val();
-                                               data[k] = v;
-
-                                       }, this));
-
-                                       return data;
-
-                               },
-                               success: function(data)
-                               {
-                                       var json;
-                                       try
-                                       {
-                                               json = $.parseJSON(data);
-                                       }
-                                       catch(e)
-                                       {
-                                               //data has already been parsed
-                                               json = data;
-                                       }
-
-                                       var callbackName = (typeof json.error == 'undefined') ? 'autosave' :  'autosaveError';
-
-                                       this.core.setCallback(callbackName, this.autosave.name, json);
-                                       this.autosave.html = this.autosave.source;
-                               },
-                               disable: function()
-                               {
-                                       clearInterval(this.autosaveInterval);
-                               }
-                       };
-               },
-               block: function()
-               {
-                       return {
-                               formatting: function(name)
-                               {
-                                       this.block.clearStyle = false;
-                                       var type, value;
-
-                                       if (typeof this.formatting[name].data != 'undefined') type = 'data';
-                                       else if (typeof this.formatting[name].attr != 'undefined') type = 'attr';
-                                       else if (typeof this.formatting[name]['class'] != 'undefined') type = 'class';
-
-                                       if (typeof this.formatting[name].clear != 'undefined')
-                                       {
-                                               this.block.clearStyle = true;
-                                       }
-
-                                       if (type) value = this.formatting[name][type];
-
-                                       this.block.format(this.formatting[name].tag, type, value);
-
-                               },
-                               format: function(tag, type, value)
-                               {
-                                       if (tag == 'quote') tag = 'blockquote';
-
-                                       var formatTags = ['p', 'pre', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
-                                       if ($.inArray(tag, formatTags) == -1) return;
-
-                                       this.block.isRemoveInline = (tag == 'pre' || tag.search(/h[1-6]/i) != -1);
-
-                                       // focus
-                                       if (!this.utils.browser('msie')) this.$editor.focus();
-
-                                       var html = $.trim(this.$editor.html());
-                                       this.block.isEmpty = this.utils.isEmpty(html);
-
-                                       // FF focus
-                                       if (this.utils.browser('mozilla') && !this.focus.isFocused())
-                                       {
-                                               if (this.block.isEmpty)
-                                               {
-                                                       var $first;
-                                                       if (!this.opts.linebreaks)
-                                                       {
-                                                               $first = this.$editor.children().first();
-                                                               this.caret.setEnd($first);
-                                                       }
-                                               }
-                                       }
-
-                                       this.block.blocks = this.selection.getBlocks();
-
-                                       this.block.blocksSize = this.block.blocks.length;
-                                       this.block.type = type;
-                                       this.block.value = value;
-
-                                       this.buffer.set();
-                                       this.selection.save();
-
-                                       this.block.set(tag);
-
-                                       this.selection.restore();
-                                       this.code.sync();
-                                       this.observe.load();
-
-                               },
-                               set: function(tag)
-                               {
-
-                                       this.selection.get();
-                                       this.block.containerTag = this.range.commonAncestorContainer.tagName;
-
-                                       if (this.range.collapsed)
-                                       {
-                                               this.block.setCollapsed(tag);
-                                       }
-                                       else
-                                       {
-                                               this.block.setMultiple(tag);
-                                       }
-                               },
-                               setCollapsed: function(tag)
-                               {
-                                       if (this.opts.linebreaks && this.block.isEmpty && tag != 'p')
-                                       {
-                                               var node = document.createElement(tag);
-                                               this.$editor.html(node);
-                                               this.caret.setEnd(node);
-
-                                               return;
-                                       }
-
-                                       var block = this.block.blocks[0];
-                                       if (block === false) return;
-
-                                       if (block.tagName == 'LI')
-                                       {
-                                               if (tag != 'blockquote') return;
-
-                                               this.block.formatListToBlockquote();
-                                               return;
-                                       }
-
-                                       var isContainerTable = (this.block.containerTag  == 'TD' || this.block.containerTag  == 'TH');
-                                       if (isContainerTable && !this.opts.linebreaks)
-                                       {
-                                               document.execCommand('formatblock', false, '<' + tag + '>');
-
-                                               block = this.selection.getBlock();
-                                               this.block.toggle($(block));
-
-                                       }
-                                       else if (block.tagName.toLowerCase() != tag)
-                                       {
-                                               if (this.opts.linebreaks && tag == 'p')
-                                               {
-                                                       $(block).append('<br>');
-                                                       this.utils.replaceWithContents(block);
-                                               }
-                                               else
-                                               {
-                                                       var $formatted = this.utils.replaceToTag(block, tag);
-
-                                                       this.block.toggle($formatted);
-
-                                                       if (tag != 'p' && tag != 'blockquote') $formatted.find('img').remove();
-                                                       if (this.block.isRemoveInline) this.utils.removeInlineTags($formatted);
-                                                       if (tag == 'p' || this.block.headTag) $formatted.find('p').contents().unwrap();
-
-                                                       this.block.formatTableWrapping($formatted);
-                                               }
-                                       }
-                                       else if (tag == 'blockquote' && block.tagName.toLowerCase() == tag)
-                                       {
-                                               // blockquote off
-                                               if (this.opts.linebreaks)
-                                               {
-                                                       $(block).append('<br>');
-                                                       this.utils.replaceWithContents(block);
-                                               }
-                                               else
-                                               {
-                                                       var $el = this.utils.replaceToTag(block, 'p');
-                                                       this.block.toggle($el);
-                                               }
-                                       }
-                                       else if (block.tagName.toLowerCase() == tag)
-                                       {
-                                               this.block.toggle($(block));
-                                       }
-
-
-                                       if (typeof this.block.type == 'undefined' && typeof this.block.value == 'undefined')
-                                       {
-                                               $(block).removeAttr('class').removeAttr('style');
-                                       }
-                               },
-                               setMultiple: function(tag)
-                               {
-                                       var block = this.block.blocks[0];
-
-                                       var isContainerTable = (this.block.containerTag  == 'TD' || this.block.containerTag  == 'TH');
-
-                                       if (block !== false && this.block.blocksSize === 1)
-                                       {
-                                               if (block.tagName.toLowerCase() == tag &&  tag == 'blockquote')
-                                               {
-                                                       // blockquote off
-                                                       if (this.opts.linebreaks)
-                                                       {
-                                                               $(block).append('<br>');
-                                                               this.utils.replaceWithContents(block);
-                                                       }
-                                                       else
-                                                       {
-                                                               var $el = this.utils.replaceToTag(block, 'p');
-                                                               this.block.toggle($el);
-                                                       }
-                                               }
-                                               else if (block.tagName == 'LI')
-                                               {
-                                                       if (tag != 'blockquote') return;
-
-                                                       this.block.formatListToBlockquote();
-                                               }
-                                               else if (this.block.containerTag == 'BLOCKQUOTE')
-                                               {
-                                                       this.block.formatBlockquote(tag);
-                                               }
-                                               else if (this.opts.linebreaks && ((isContainerTable) || (this.range.commonAncestorContainer != block)))
-                                               {
-                                                       this.block.formatWrap(tag);
-                                               }
-                                               else
-                                               {
-                                                       if (this.opts.linebreaks && tag == 'p')
-                                                       {
-                                                               $(block).prepend('<br>').append('<br>');
-                                                               this.utils.replaceWithContents(block);
-                                                       }
-                                                       else if (block.tagName === 'TD')
-                                                       {
-                                                               this.block.formatWrap(tag);
-                                                       }
-                                                       else
-                                                       {
-                                                               var $formatted = this.utils.replaceToTag(block, tag);
-
-                                                               this.block.toggle($formatted);
-
-                                                               if (this.block.isRemoveInline) this.utils.removeInlineTags($formatted);
-                                                               if (tag == 'p' || this.block.headTag) $formatted.find('p').contents().unwrap();
-                                                       }
-                                               }
-                                       }
-                                       else
-                                       {
-                                               if (this.opts.linebreaks || tag != 'p')
-                                               {
-                                                       if (tag == 'blockquote')
-                                                       {
-                                                               var count = 0;
-                                                               for (var i = 0; i < this.block.blocksSize; i++)
-                                                               {
-                                                                       if (this.block.blocks[i].tagName == 'BLOCKQUOTE') count++;
-                                                               }
-
-                                                               // only blockquote selected
-                                                               if (count == this.block.blocksSize)
-                                                               {
-                                                                       $.each(this.block.blocks, $.proxy(function(i,s)
-                                                                       {
-                                                                               var $formatted = false;
-                                                                               if (this.opts.linebreaks)
-                                                                               {
-                                                                                       $(s).prepend('<br>').append('<br>');
-                                                                                       $formatted = this.utils.replaceWithContents(s);
-                                                                               }
-                                                                               else
-                                                                               {
-                                                                                       $formatted = this.utils.replaceToTag(s, 'p');
-                                                                               }
-
-                                                                               if ($formatted && typeof this.block.type == 'undefined' && typeof this.block.value == 'undefined')
-                                                                               {
-                                                                                       $formatted.removeAttr('class').removeAttr('style');
-                                                                               }
-
-                                                                       }, this));
-
-                                                                       return;
-                                                               }
-
-                                                       }
-
-                                                       this.block.formatWrap(tag);
-                                               }
-                                               else
-                                               {
-                                                       var classSize = 0;
-                                                       var toggleType = false;
-                                                       if (this.block.type == 'class')
-                                                       {
-                                                               toggleType = 'toggle';
-                                                               classSize = $(this.block.blocks).filter('.' + this.block.value).length;
-
-                                                               if (this.block.blocksSize == classSize) toggleType = 'toggle';
-                                                               else if (this.block.blocksSize > classSize) toggleType = 'set';
-                                                               else if (classSize === 0) toggleType = 'set';
-
-                                                       }
-
-                                                       var exceptTags = ['ul', 'ol', 'li', 'td', 'th', 'dl', 'dt', 'dd'];
-                                                       $.each(this.block.blocks, $.proxy(function(i,s)
-                                                       {
-                                                               if ($.inArray(s.tagName.toLowerCase(), exceptTags) != -1) return;
-
-                                                               var $formatted = this.utils.replaceToTag(s, tag);
-
-                                                               if (toggleType)
-                                                               {
-                                                                       if (toggleType == 'toggle') this.block.toggle($formatted);
-                                                                       else if (toggleType == 'remove') this.block.remove($formatted);
-                                                                       else if (toggleType == 'set') this.block.setForce($formatted);
-                                                               }
-                                                               else this.block.toggle($formatted);
-
-                                                               if (tag != 'p' && tag != 'blockquote') $formatted.find('img').remove();
-                                                               if (this.block.isRemoveInline) this.utils.removeInlineTags($formatted);
-                                                               if (tag == 'p' || this.block.headTag) $formatted.find('p').contents().unwrap();
-
-                                                               if (typeof this.block.type == 'undefined' && typeof this.block.value == 'undefined')
-                                                               {
-                                                                       $formatted.removeAttr('class').removeAttr('style');
-                                                               }
-
-
-                                                       }, this));
-                                               }
-                                       }
-                               },
-                               setForce: function($el)
-                               {
-                                       // remove style and class if the specified setting
-                                       if (this.block.clearStyle)
-                                       {
-                                               $el.removeAttr('class').removeAttr('style');
-                                       }
-
-                                       if (this.block.type == 'class')
-                                       {
-                                               $el.addClass(this.block.value);
-                                               return;
-                                       }
-                                       else if (this.block.type == 'attr' || this.block.type == 'data')
-                                       {
-                                               $el.attr(this.block.value.name, this.block.value.value);
-                                               return;
-                                       }
-                               },
-                               toggle: function($el)
-                               {
-                                       // remove style and class if the specified setting
-                                       if (this.block.clearStyle)
-                                       {
-                                               $el.removeAttr('class').removeAttr('style');
-                                       }
-
-                                       if (this.block.type == 'class')
-                                       {
-                                               $el.toggleClass(this.block.value);
-                                               return;
-                                       }
-                                       else if (this.block.type == 'attr' || this.block.type == 'data')
-                                       {
-                                               if ($el.attr(this.block.value.name) == this.block.value.value)
-                                               {
-                                                       $el.removeAttr(this.block.value.name);
-                                               }
-                                               else
-                                               {
-                                                       $el.attr(this.block.value.name, this.block.value.value);
-                                               }
-
-                                               return;
-                                       }
-                                       else
-                                       {
-                                               $el.removeAttr('style class');
-                                               return;
-                                       }
-                               },
-                               remove: function($el)
-                               {
-                                       $el.removeClass(this.block.value);
-                               },
-                               formatListToBlockquote: function()
-                               {
-                                       var block = $(this.block.blocks[0]).closest('ul, ol', this.$editor[0]);
-
-                                       $(block).find('ul, ol').contents().unwrap();
-                                       $(block).find('li').append($('<br>')).contents().unwrap();
-
-                                       var $el = this.utils.replaceToTag(block, 'blockquote');
-                                       this.block.toggle($el);
-                               },
-                               formatBlockquote: function(tag)
-                               {
-                                       document.execCommand('outdent');
-                                       document.execCommand('formatblock', false, tag);
-
-                                       this.clean.clearUnverified();
-                                       this.$editor.find('p:empty').remove();
-
-                                       var formatted = this.selection.getBlock();
-
-                                       if (tag != 'p')
-                                       {
-                                               $(formatted).find('img').remove();
-                                       }
-
-                                       if (!this.opts.linebreaks)
-                                       {
-                                               this.block.toggle($(formatted));
-                                       }
-
-                                       this.$editor.find('ul, ol, tr, blockquote, p').each($.proxy(this.utils.removeEmpty, this));
-
-                                       if (this.opts.linebreaks && tag == 'p')
-                                       {
-                                               this.utils.replaceWithContents(formatted);
-                                       }
-
-                               },
-                               formatWrap: function(tag)
-                               {
-                                       if (this.block.containerTag == 'UL' || this.block.containerTag == 'OL')
-                                       {
-                                               if (tag == 'blockquote')
-                                               {
-                                                       this.block.formatListToBlockquote();
-                                               }
-                                               else
-                                               {
-                                                       return;
-                                               }
-                                       }
-
-                                       var formatted = this.selection.wrap(tag);
-                                       if (formatted === false) return;
-
-                                       var $formatted = $(formatted);
-
-                                       this.block.formatTableWrapping($formatted);
-
-                                       var $elements = $formatted.find(this.opts.blockLevelElements.join(',') + ', td, table, thead, tbody, tfoot, th, tr');
-
-                                       $elements.contents().unwrap();
-
-                                       if (tag != 'p' && tag != 'blockquote') $formatted.find('img').remove();
-
-                                       $.each(this.block.blocks, $.proxy(this.utils.removeEmpty, this));
-
-                                       $formatted.append(this.selection.getMarker(2));
-
-                                       if (!this.opts.linebreaks)
-                                       {
-                                               this.block.toggle($formatted);
-                                       }
-
-                                       this.$editor.find('ul, ol, tr, blockquote, p').each($.proxy(this.utils.removeEmpty, this));
-                                       $formatted.find('blockquote:empty').remove();
-
-                                       if (this.block.isRemoveInline)
-                                       {
-                                               this.utils.removeInlineTags($formatted);
-                                       }
-
-                                       if (this.opts.linebreaks && tag == 'p')
-                                       {
-                                               this.utils.replaceWithContents($formatted);
-                                       }
-
-                                       if (this.opts.linebreaks)
-                                       {
-                                               var $next = $formatted.next().next();
-                                               if ($next.size() != 0 && $next[0].tagName === 'BR')
-                                               {
-                                                       $next.remove();
-                                               }
-                                       }
-
-
-
-                               },
-                               formatTableWrapping: function($formatted)
-                               {
-                                       if ($formatted.closest('table', this.$editor[0]).length === 0) return;
-
-                                       if ($formatted.closest('tr', this.$editor[0]).length === 0) $formatted.wrap('<tr>');
-                                       if ($formatted.closest('td', this.$editor[0]).length === 0 && $formatted.closest('th').length === 0)
-                                       {
-                                               $formatted.wrap('<td>');
-                                       }
-                               },
-                               removeData: function(name, value)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $(blocks).removeAttr('data-' + name);
-
-                                       this.code.sync();
-                               },
-                               setData: function(name, value)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $(blocks).attr('data-' + name, value);
-
-                                       this.code.sync();
-                               },
-                               toggleData: function(name, value)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $.each(blocks, function()
-                                       {
-                                               if ($(this).attr('data-' + name))
-                                               {
-                                                       $(this).removeAttr('data-' + name);
-                                               }
-                                               else
-                                               {
-                                                       $(this).attr('data-' + name, value);
-                                               }
-                                       });
-                               },
-                               removeAttr: function(attr, value)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $(blocks).removeAttr(attr);
-
-                                       this.code.sync();
-                               },
-                               setAttr: function(attr, value)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $(blocks).attr(attr, value);
-
-                                       this.code.sync();
-                               },
-                               toggleAttr: function(attr, value)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $.each(blocks, function()
-                                       {
-                                               if ($(this).attr(name))
-                                               {
-                                                       $(this).removeAttr(name);
-                                               }
-                                               else
-                                               {
-                                                       $(this).attr(name, value);
-                                               }
-                                       });
-                               },
-                               removeClass: function(className)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $(blocks).removeClass(className);
-
-                                       this.utils.removeEmptyAttr(blocks, 'class');
-
-                                       this.code.sync();
-                               },
-                               setClass: function(className)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $(blocks).addClass(className);
-
-                                       this.code.sync();
-                               },
-                               toggleClass: function(className)
-                               {
-                                       var blocks = this.selection.getBlocks();
-                                       $(blocks).toggleClass(className);
-
-                                       this.code.sync();
-                               }
-                       };
-               },
-               buffer: function()
-               {
-                       return {
-                               set: function(type)
-                               {
-                                       if (typeof type == 'undefined' || type == 'undo')
-                                       {
-                                               this.buffer.setUndo();
-                                       }
-                                       else
-                                       {
-                                               this.buffer.setRedo();
-                                       }
-                               },
-                               setUndo: function()
-                               {
-                                       this.selection.save();
-                                       this.opts.buffer.push(this.$editor.html());
-                                       this.selection.restore();
-                               },
-                               setRedo: function()
-                               {
-                                       this.selection.save();
-                                       this.opts.rebuffer.push(this.$editor.html());
-                                       this.selection.restore();
-                               },
-                               getUndo: function()
-                               {
-                                       this.$editor.html(this.opts.buffer.pop());
-                               },
-                               getRedo: function()
-                               {
-                                       this.$editor.html(this.opts.rebuffer.pop());
-                               },
-                               add: function()
-                               {
-                                       this.opts.buffer.push(this.$editor.html());
-                               },
-                               undo: function()
-                               {
-                                       if (this.opts.buffer.length === 0) return;
-
-                                       this.buffer.set('redo');
-                                       this.buffer.getUndo();
-
-                                       this.selection.restore();
-
-                                       setTimeout($.proxy(this.observe.load, this), 50);
-                               },
-                               redo: function()
-                               {
-                                       if (this.opts.rebuffer.length === 0) return;
-
-                                       this.buffer.set('undo');
-                                       this.buffer.getRedo();
-
-                                       this.selection.restore();
-
-                                       setTimeout($.proxy(this.observe.load, this), 50);
-                               }
-                       };
-               },
-               build: function()
-               {
-                       return {
-                               focused: false,
-                               blured: true,
-                               run: function()
-                               {
-                                       this.build.createContainerBox();
-                                       this.build.loadContent();
-                                       this.build.loadEditor();
-                                       this.build.enableEditor();
-                                       this.build.setCodeAndCall();
-                               },
-                               isTextarea: function()
-                               {
-                                       return (this.$element[0].tagName === 'TEXTAREA');
-                               },
-                               createContainerBox: function()
-                               {
-                                       this.$box = $('<div class="redactor-box" role="application" />');
-                               },
-                               createTextarea: function()
-                               {
-                                       this.$textarea = $('<textarea />').attr('name', this.build.getTextareaName());
-                               },
-                               getTextareaName: function()
-                               {
-                                       return ((typeof(name) == 'undefined')) ? 'content-' + this.uuid : this.$element.attr('id');
-                               },
-                               loadContent: function()
-                               {
-                                       var func = (this.build.isTextarea()) ? 'val' : 'html';
-                                       this.content = $.trim(this.$element[func]());
-                               },
-                               enableEditor: function()
-                               {
-                                       this.$editor.attr({ 'contenteditable': true, 'dir': this.opts.direction });
-                               },
-                               loadEditor: function()
-                               {
-                                       var func = (this.build.isTextarea()) ? 'fromTextarea' : 'fromElement';
-                                       this.build[func]();
-                               },
-                               fromTextarea: function()
-                               {
-                                       this.$editor = $('<div />');
-                                       this.$textarea = this.$element;
-                                       this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element);
-                                       this.$editor.addClass('redactor-editor');
-
-                                       this.$element.hide();
-                               },
-                               fromElement: function()
-                               {
-                                       this.$editor = this.$element;
-                                       this.build.createTextarea();
-                                       this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$textarea);
-                                       this.$editor.addClass('redactor-editor');
-
-                                       this.$textarea.hide();
-                               },
-                               setCodeAndCall: function()
-                               {
-                                       // set code
-                                       this.code.set(this.content);
-
-                                       this.build.setOptions();
-                                       this.build.callEditor();
-
-                                       // code mode
-                                       if (this.opts.visual) return;
-                                       setTimeout($.proxy(this.code.showCode, this), 200);
-                               },
-                               callEditor: function()
-                               {
-                                       this.build.disableMozillaEditing();
-                                       this.build.disableIeLinks();
-                                       this.build.setEvents();
-                                       this.build.setHelpers();
-
-                                       // load toolbar
-                                       if (this.opts.toolbar)
-                                       {
-                                               this.opts.toolbar = this.toolbar.init();
-                                               this.toolbar.build();
-                                       }
-
-                                       // modal templates init
-                                       this.modal.loadTemplates();
-
-                                       // plugins
-                                       this.build.plugins();
-
-                                       // observers
-                                       setTimeout($.proxy(this.observe.load, this), 4);
-
-                                       // init callback
-                                       this.core.setCallback('init');
-                               },
-                               setOptions: function()
-                               {
-                                       // textarea direction
-                                       $(this.$textarea).attr('dir', this.opts.direction);
-
-                                       if (this.opts.linebreaks) this.$editor.addClass('redactor-linebreaks');
-
-                                       if (this.opts.tabindex) this.$editor.attr('tabindex', this.opts.tabindex);
-
-                                       if (this.opts.minHeight) this.$editor.css('minHeight', this.opts.minHeight);
-                                       if (this.opts.maxHeight) this.$editor.css('maxHeight', this.opts.maxHeight);
-
-                               },
-                               setEventDropUpload: function(e)
-                               {
-                                       e.preventDefault();
-
-                                       if (!this.opts.dragImageUpload || !this.opts.dragFileUpload) return;
-
-                                       var files = e.dataTransfer.files;
-                                       this.upload.directUpload(files[0], e);
-                               },
-                               setEventDrop: function(e)
-                               {
-                                       this.code.sync();
-                                       setTimeout(this.clean.clearUnverified, 1);
-                                       this.core.setCallback('drop', e);
-                               },
-                               setEvents: function()
-                               {
-                                       // drop
-                                       this.$editor.on('dragover.redactor dragenter.redactor', function(e)
-                                       {
-                                               e.preventDefault();
-                                               e.stopPropagation();
-                                   });
-
-                                       this.$editor.on('drop.redactor', $.proxy(function(e)
-                                       {
-                                               e = e.originalEvent || e;
-
-                                               if (window.FormData === undefined || !e.dataTransfer) return true;
-
-                                               if (e.dataTransfer.files.length === 0)
-                                               {
-                                                       return this.build.setEventDrop(e);
-                                               }
-                                               else
-                                               {
-                                                       this.build.setEventDropUpload(e);
-                                               }
-
-                                               setTimeout(this.clean.clearUnverified, 1);
-                                               this.core.setCallback('drop', e);
-
-                                       }, this));
-
-
-                                       // click
-                                       this.$editor.on('click.redactor', $.proxy(function(e)
-                                       {
-                                               var event = this.core.getEvent();
-                                               var type = (event == 'click' || event == 'arrow') ? false : 'click';
-
-                                               this.core.addEvent(type);
-                                               this.utils.disableSelectAll();
-                                               this.core.setCallback('click', e);
-
-                                       }, this));
-
-                                       // paste
-                                       this.$editor.on('paste.redactor', $.proxy(this.paste.init, this));
-
-                                       // cut
-                                       this.$editor.on('cut.redactor', $.proxy(this.code.sync, this));
-
-                                       // keydown
-                                       this.$editor.on('keydown.redactor', $.proxy(this.keydown.init, this));
-
-                                       // keyup
-                                       this.$editor.on('keyup.redactor', $.proxy(this.keyup.init, this));
-
-                                       // textarea keydown
-                                       if ($.isFunction(this.opts.codeKeydownCallback))
-                                       {
-                                               this.$textarea.on('keydown.redactor-textarea', $.proxy(this.opts.codeKeydownCallback, this));
-                                       }
-
-                                       // textarea keyup
-                                       if ($.isFunction(this.opts.codeKeyupCallback))
-                                       {
-                                               this.$textarea.on('keyup.redactor-textarea', $.proxy(this.opts.codeKeyupCallback, this));
-                                       }
-
-                                       // focus
-                                       this.$editor.on('focus.redactor', $.proxy(function(e)
-                                       {
-                                               if ($.isFunction(this.opts.focusCallback))
-                                               {
-                                                       this.core.setCallback('focus', e);
-                                               }
-
-                                               this.build.focused = true;
-                                               this.build.blured = false;
-
-                                               if (this.selection.getCurrent() === false)
-                                               {
-                                                       this.selection.get();
-                                                       this.range.setStart(this.$editor[0], 0);
-                                                       this.range.setEnd(this.$editor[0], 0);
-                                                       this.selection.addRange();
-                                               }
-
-
-                                       }, this));
-
-
-                                       // blur
-                                       $(document).on('mousedown.redactor-blur.' + this.uuid, $.proxy(function(e)
-                                       {
-                                               if (this.start) return;
-                                               if (this.rtePaste) return;
-
-                                               if ($(e.target).closest('.redactor-editor, .redactor-toolbar, .redactor-dropdown').size() !== 0)
-                                               {
-                                                       return;
-                                               }
-
-                                               this.utils.disableSelectAll();
-                                               if (!this.build.blured && $.isFunction(this.opts.blurCallback))
-                                               {
-                                                       this.core.setCallback('blur', e);
-                                               }
-
-                                               this.build.focused = false;
-                                               this.build.blured = true;
-
-                                       }, this));
-
-                               },
-                               setHelpers: function()
-                               {
-                                       // linkify
-                                       if (this.linkify.isEnabled())
-                                       {
-                                               this.linkify.format();
-                                       }
-
-                                       // placeholder
-                                       this.placeholder.enable();
-
-                                       // focus
-                                       if (this.opts.focus) setTimeout(this.focus.setStart, 100);
-                                       if (this.opts.focusEnd) setTimeout(this.focus.setEnd, 100);
-
-                               },
-                               plugins: function()
-                               {
-                                       if (!this.opts.plugins) return;
-
-                                       $.each(this.opts.plugins, $.proxy(function(i, s)
-                                       {
-                                               var func = (typeof RedactorPlugins !== 'undefined' && typeof RedactorPlugins[s] !== 'undefined') ? RedactorPlugins : Redactor.fn;
-
-                                               if (!$.isFunction(func[s]))
-                                               {
-                                                       return;
-                                               }
-
-                                               this[s] = func[s]();
-
-                                               // get methods
-                                               var methods = this.getModuleMethods(this[s]);
-                                               var len = methods.length;
-
-                                               // bind methods
-                                               for (var z = 0; z < len; z++)
-                                               {
-                                                       this[s][methods[z]] = this[s][methods[z]].bind(this);
-                                               }
-
-                                               if ($.isFunction(this[s].init))
-                                               {
-                                                       this[s].init();
-                                               }
-
-
-                                       }, this));
-
-                               },
-                               disableMozillaEditing: function()
-                               {
-                                       if (!this.utils.browser('mozilla')) return;
-
-                                       // FF fix
-                                       try {
-                                               document.execCommand('enableObjectResizing', false, false);
-                                               document.execCommand('enableInlineTableEditing', false, false);
-                                       } catch (e) {}
-                               },
-                               disableIeLinks: function()
-                               {
-                                       if (!this.utils.browser('msie')) return;
-
-                                       // IE prevent converting links
-                                       document.execCommand("AutoUrlDetect", false, false);
-                               }
-                       };
-               },
-               button: function()
-               {
-                       return {
-                               build: function(btnName, btnObject)
-                               {
-                                       var $button = $('<a href="#" class="re-icon re-' + btnName + '" rel="' + btnName + '" />').attr({'role': 'button', 'aria-label': btnObject.title, 'tabindex': '-1'});
-
-                                       // click
-                                       if (btnObject.func || btnObject.command || btnObject.dropdown)
-                                       {
-                                               this.button.setEvent($button, btnName, btnObject);
-                                       }
-
-                                       // dropdown
-                                       if (btnObject.dropdown)
-                                       {
-                                               $button.addClass('redactor-toolbar-link-dropdown').attr('aria-haspopup', true);
-
-                                               var $dropdown = $('<div class="redactor-dropdown redactor-dropdown-' + this.uuid + ' redactor-dropdown-box-' + btnName + '" style="display: none;">');
-                                               $button.data('dropdown', $dropdown);
-                                               this.dropdown.build(btnName, $dropdown, btnObject.dropdown);
-                                       }
-
-                                       // tooltip
-                                       if (this.utils.isDesktop())
-                                       {
-                                               this.button.createTooltip($button, btnName, btnObject.title);
-                                       }
-
-                                       return $button;
-                               },
-                               setEvent: function($button, btnName, btnObject)
-                               {
-                                       $button.on('touchstart click', $.proxy(function(e)
-                                       {
-                                               if ($button.hasClass('redactor-button-disabled')) return false;
-
-                                               var type = 'func';
-                                               var callback = btnObject.func;
-
-                                               if (btnObject.command)
-                                               {
-                                                       type = 'command';
-                                                       callback = btnObject.command;
-                                               }
-                                               else if (btnObject.dropdown)
-                                               {
-                                                       type = 'dropdown';
-                                                       callback = false;
-                                               }
-
-                                               this.button.onClick(e, btnName, type, callback);
-
-                                       }, this));
-                               },
-                               createTooltip: function($button, name, title)
-                               {
-                                       var $tooltip = $('<span>').addClass('redactor-toolbar-tooltip redactor-toolbar-tooltip-' + this.uuid + ' redactor-toolbar-tooltip-' + name).hide().html(title);
-                                       $tooltip.appendTo('body');
-
-                                       $button.on('mouseover', function()
-                                       {
-                                               if ($(this).hasClass('redactor-button-disabled'))
-                                               {
-                                                       return;
-                                               }
-
-                                               var pos = $button.offset();
-
-                                               $tooltip.css({
-                                                       top: (pos.top + $button.innerHeight()) + 'px',
-                                                       left: (pos.left + $button.innerWidth()/2 - $tooltip.innerWidth()/2) + 'px'
-                                               });
-                                               $tooltip.show();
-
-                                       });
-
-                                       $button.on('mouseout', function()
-                                       {
-                                               $tooltip.hide();
-                                       });
-
-                               },
-                               onClick: function(e, btnName, type, callback)
-                               {
-                                       this.button.caretOffset = this.caret.getOffset();
-
-                                       e.preventDefault();
-
-                                       $(document).find('.redactor-toolbar-tooltip').hide();
-
-                                       if (this.utils.browser('msie')) e.returnValue = false;
-
-                                       if (type == 'command') this.inline.format(callback);
-                                       else if (type == 'dropdown') this.dropdown.show(e, btnName);
-                                       else this.button.onClickCallback(e, callback, btnName);
-                               },
-                               onClickCallback: function(e, callback, btnName)
-                               {
-                                       var func;
-
-                                       if ($.isFunction(callback)) callback.call(this, btnName);
-                                       else if (callback.search(/\./) != '-1')
-                                       {
-                                               func = callback.split('.');
-                                               if (typeof this[func[0]] == 'undefined') return;
-
-                                               this[func[0]][func[1]](btnName);
-                                       }
-                                       else this[callback](btnName);
-
-                                       this.observe.buttons(e, btnName);
-                               },
-                               get: function(key)
-                               {
-                                       return this.$toolbar.find('a.re-' + key);
-                               },
-                               setActive: function(key)
-                               {
-                                       this.button.get(key).addClass('redactor-act');
-                               },
-                               setInactive: function(key)
-                               {
-                                       this.button.get(key).removeClass('redactor-act');
-                               },
-                               setInactiveAll: function(key)
-                               {
-                                       if (typeof key === 'undefined')
-                                       {
-                                               this.$toolbar.find('a.re-icon').removeClass('redactor-act');
-                                       }
-                                       else
-                                       {
-                                               this.$toolbar.find('a.re-icon').not('.re-' + key).removeClass('redactor-act');
-                                       }
-                               },
-                               setActiveInVisual: function()
-                               {
-                                       this.$toolbar.find('a.re-icon').not('a.re-html, a.re-fullscreen').removeClass('redactor-button-disabled');
-                               },
-                               setInactiveInCode: function()
-                               {
-                                       this.$toolbar.find('a.re-icon').not('a.re-html, a.re-fullscreen').addClass('redactor-button-disabled');
-                               },
-                               changeIcon: function(key, classname)
-                               {
-                                       this.button.get(key).addClass('re-' + classname);
-                               },
-                               removeIcon: function(key, classname)
-                               {
-                                       this.button.get(key).removeClass('re-' + classname);
-                               },
-                               setAwesome: function(key, name)
-                               {
-                                       var $button = this.button.get(key);
-                                       $button.removeClass('redactor-btn-image').addClass('fa-redactor-btn');
-                                       $button.html('<i class="fa ' + name + '"></i>');
-                               },
-                               addCallback: function($btn, callback)
-                               {
-                                       if ($btn == "buffer") return;
-
-                                       var type = (callback == 'dropdown') ? 'dropdown' : 'func';
-                                       var key = $btn.attr('rel');
-                                       $btn.on('touchstart click', $.proxy(function(e)
-                                       {
-                                               if ($btn.hasClass('redactor-button-disabled')) return false;
-                                               this.button.onClick(e, key, type, callback);
-
-                                       }, this));
-                               },
-                               addDropdown: function($btn, dropdown)
-                               {
-                                       $btn.addClass('redactor-toolbar-link-dropdown').attr('aria-haspopup', true);
-
-                                       var key = $btn.attr('rel');
-                                       this.button.addCallback($btn, 'dropdown');
-
-                                       var $dropdown = $('<div class="redactor-dropdown redactor-dropdown-' + this.uuid + ' redactor-dropdown-box-' + key + '" style="display: none;">');
-                                       $btn.data('dropdown', $dropdown);
-
-                                       // build dropdown
-                                       if (dropdown) this.dropdown.build(key, $dropdown, dropdown);
-
-                                       return $dropdown;
-                               },
-                               add: function(key, title)
-                               {
-                                       if (!this.opts.toolbar) return;
-
-                                       if (this.button.isMobileUndoRedo(key)) return "buffer";
-
-                                       var btn = this.button.build(key, { title: title });
-                                       btn.addClass('redactor-btn-image');
-
-                                       this.$toolbar.append($('<li>').append(btn));
-
-                                       return btn;
-                               },
-                               addFirst: function(key, title)
-                               {
-                                       if (!this.opts.toolbar) return;
-
-                                       if (this.button.isMobileUndoRedo(key)) return "buffer";
-
-                                       var btn = this.button.build(key, { title: title });
-                                       btn.addClass('redactor-btn-image');
-                                       this.$toolbar.prepend($('<li>').append(btn));
-
-                                       return btn;
-                               },
-                               addAfter: function(afterkey, key, title)
-                               {
-                                       if (!this.opts.toolbar) return;
-
-                                       if (this.button.isMobileUndoRedo(key)) return "buffer";
-
-                                       var btn = this.button.build(key, { title: title });
-                                       btn.addClass('redactor-btn-image');
-                                       var $btn = this.button.get(afterkey);
-
-                                       if ($btn.length !== 0) $btn.parent().after($('<li>').append(btn));
-                                       else this.$toolbar.append($('<li>').append(btn));
-
-                                       return btn;
-                               },
-                               addBefore: function(beforekey, key, title)
-                               {
-                                       if (!this.opts.toolbar) return;
-
-                                       if (this.button.isMobileUndoRedo(key)) return "buffer";
-
-                                       var btn = this.button.build(key, { title: title });
-                                       btn.addClass('redactor-btn-image');
-                                       var $btn = this.button.get(beforekey);
-
-                                       if ($btn.length !== 0) $btn.parent().before($('<li>').append(btn));
-                                       else this.$toolbar.append($('<li>').append(btn));
-
-                                       return btn;
-                               },
-                               remove: function(key)
-                               {
-                                       this.button.get(key).remove();
-                               },
-                               isMobileUndoRedo: function(key)
-                               {
-                                       return (key == "undo" || key == "redo") && !this.utils.isDesktop();
-                               }
-                       };
-               },
-               caret: function()
-               {
-                       return {
-                               setStart: function(node)
-                               {
-                                       // inline tag
-                                       if (!this.utils.isBlock(node))
-                                       {
-                                               var space = this.utils.createSpaceElement();
-
-                                               $(node).prepend(space);
-                                               this.caret.setEnd(space);
-                                       }
-                                       else
-                                       {
-                                               this.caret.set(node, 0, node, 0);
-                                       }
-                               },
-                               setEnd: function(node)
-                               {
-                                       node = node[0] || node;
-                                       if (node.lastChild.nodeType == 1)
-                                       {
-                                               return this.caret.setAfter(node.lastChild);
-                                       }
-
-                                       this.caret.set(node, 1, node, 1);
-
-                               },
-                               set: function(orgn, orgo, focn, foco)
-                               {
-                                       // focus
-                                       // disabled in 10.0.7
-                                       // if (!this.utils.browser('msie')) this.$editor.focus();
-
-                                       orgn = orgn[0] || orgn;
-                                       focn = focn[0] || focn;
-
-                                       if (this.utils.isBlockTag(orgn.tagName) && orgn.innerHTML === '')
-                                       {
-                                               orgn.innerHTML = this.opts.invisibleSpace;
-                                       }
-
-                                       if (orgn.tagName == 'BR' && this.opts.linebreaks === false)
-                                       {
-                                               var parent = $(this.opts.emptyHtml)[0];
-                                               $(orgn).replaceWith(parent);
-                                               orgn = parent;
-                                               focn = orgn;
-                                       }
-
-                                       this.selection.get();
-
-                                       try
-                                       {
-                                               this.range.setStart(orgn, orgo);
-                                               this.range.setEnd(focn, foco);
-                                       }
-                                       catch (e) {}
-
-                                       this.selection.addRange();
-                               },
-                               setAfter: function(node)
-                               {
-                                       try
-                                       {
-                                               var tag = $(node)[0].tagName;
-
-                                               // inline tag
-                                               if (tag != 'BR' && !this.utils.isBlock(node))
-                                               {
-                                                       var space = this.utils.createSpaceElement();
-
-                                                       $(node).after(space);
-                                                       this.caret.setEnd(space);
-                                               }
-                                               else
-                                               {
-                                                       if (tag != 'BR' && this.utils.browser('msie'))
-                                                       {
-                                                               this.caret.setStart($(node).next());
-                                                       }
-                                                       else
-                                                       {
-                                                               this.caret.setAfterOrBefore(node, 'after');
-                                                       }
-                                               }
-                                       }
-                                       catch (e)
-                                       {
-                                               var space = this.utils.createSpaceElement();
-                                               $(node).after(space);
-                                               this.caret.setEnd(space);
-                                       }
-                               },
-                               setBefore: function(node)
-                               {
-                                       // block tag
-                                       if (this.utils.isBlock(node))
-                                       {
-                                               this.caret.setEnd($(node).prev());
-                                       }
-                                       else
-                                       {
-                                               this.caret.setAfterOrBefore(node, 'before');
-                                       }
-                               },
-                               setAfterOrBefore: function(node, type)
-                               {
-                                       // focus
-                                       if (!this.utils.browser('msie')) this.$editor.focus();
-
-                                       node = node[0] || node;
-
-                                       this.selection.get();
-
-                                       if (type == 'after')
-                                       {
-                                               try {
-
-                                                       this.range.setStartAfter(node);
-                                                       this.range.setEndAfter(node);
-                                               }
-                                               catch (e) {}
-                                       }
-                                       else
-                                       {
-                                               try {
-                                                       this.range.setStartBefore(node);
-                                                       this.range.setEndBefore(node);
-                                               }
-                                               catch (e) {}
-                                       }
-
-
-                                       this.range.collapse(false);
-                                       this.selection.addRange();
-                               },
-                               getOffsetOfElement: function(node)
-                               {
-                                       node = node[0] || node;
-
-                                       this.selection.get();
-
-                                       var cloned = this.range.cloneRange();
-                                       cloned.selectNodeContents(node);
-                                       cloned.setEnd(this.range.endContainer, this.range.endOffset);
-
-                                       return $.trim(cloned.toString()).length;
-                               },
-                               getOffset: function()
-                               {
-                                       var offset = 0;
-                                   var sel = window.getSelection();
-
-                                   if (sel.rangeCount > 0)
-                                   {
-                                       var range = window.getSelection().getRangeAt(0);
-                                       var caretRange = range.cloneRange();
-                                       caretRange.selectNodeContents(this.$editor[0]);
-                                       caretRange.setEnd(range.endContainer, range.endOffset);
-                                       offset = caretRange.toString().length;
-                                   }
-
-                                       return offset;
-                               },
-                               setOffset: function(start, end)
-                               {
-                                       if (typeof end == 'undefined') end = start;
-                                       if (!this.focus.isFocused()) this.focus.setStart();
-
-                                       var sel = this.selection.get();
-                                       var node, offset = 0;
-                                       var walker = document.createTreeWalker(this.$editor[0], NodeFilter.SHOW_TEXT, null, null);
-
-                                       while (node = walker.nextNode())
-                                       {
-                                               offset += node.nodeValue.length;
-                                               if (offset > start)
-                                               {
-                                                       this.range.setStart(node, node.nodeValue.length + start - offset);
-                                                       start = Infinity;
-                                               }
-
-                                               if (offset >= end)
-                                               {
-                                                       this.range.setEnd(node, node.nodeValue.length + end - offset);
-                                                       break;
-                                               }
-                                       }
-
-                                       this.range.collapse(false);
-                                       this.selection.addRange();
-                               },
-                               // deprecated
-                               setToPoint: function(start, end)
-                               {
-                                       this.caret.setOffset(start, end);
-                               },
-                               getCoords: function()
-                               {
-                                       return this.caret.getOffset();
-                               }
-                       };
-               },
-               clean: function()
-               {
-                       return {
-                               onSet: function(html)
-                               {
-                                       html = this.clean.savePreCode(html);
-
-                                       // convert script tag
-                                       html = html.replace(/<script(.*?[^>]?)>([\w\W]*?)<\/script>/gi, '<pre class="redactor-script-tag" style="display: none;" $1>$2</pre>');
-
-                                       // replace dollar sign to entity
-                                       html = html.replace(/\$/g, '&#36;');
-
-                                       // replace special characters in links
-                                       html = html.replace(/<a href="(.*?[^>]?)®(.*?[^>]?)">/gi, '<a href="$1&reg$2">');
-
-                                       if (this.opts.replaceDivs && !this.opts.linebreaks) html = this.clean.replaceDivs(html);
-                                       if (this.opts.linebreaks)  html = this.clean.replaceParagraphsToBr(html);
-
-                                       // save form tag
-                                       html = this.clean.saveFormTags(html);
-
-                                       // convert font tag to span
-                                       var $div = $('<div>');
-                                       $div.html(html);
-                                       var fonts = $div.find('font[style]');
-                                       if (fonts.length !== 0)
-                                       {
-                                               fonts.replaceWith(function()
-                                               {
-                                                       var $el = $(this);
-                                                       var $span = $('<span>').attr('style', $el.attr('style'));
-                                                       return $span.append($el.contents());
-                                               });
-
-                                               html = $div.html();
-                                       }
-
-                                       $div.remove();
-
-                                       // remove font tag
-                                       html = html.replace(/<font(.*?)>/gi, '');
-                                       html = html.replace(/<\/font>/gi, '');
-
-                                       // tidy html
-                                       html = this.tidy.load(html);
-
-                                       // paragraphize
-                                       if (this.opts.paragraphize) html = this.paragraphize.load(html);
-
-                                       // verified
-                                       html = this.clean.setVerified(html);
-
-                                       // convert inline tags
-                                       html = this.clean.convertInline(html);
-
-                                       html = html.replace(/&amp;/g, '&');
-
-                                       return html;
-                               },
-                               onSync: function(html)
-                               {
-                                       // remove spaces
-                                       html = html.replace(/\u200B/g, '');
-                                       html = html.replace(/&#x200b;/gi, '');
-
-                                       if (this.opts.cleanSpaces)
-                                       {
-                                               html = html.replace(/&nbsp;/gi, ' ');
-                                       }
-
-                                       if (html.search(/^<p>(||\s||<br\s?\/?>||&nbsp;)<\/p>$/i) != -1)
-                                       {
-                                               return '';
-                                       }
-
-                                       // reconvert script tag
-                                       html = html.replace(/<pre class="redactor-script-tag" style="display: none;"(.*?[^>]?)>([\w\W]*?)<\/pre>/gi, '<script$1>$2</script>');
-
-                                       // restore form tag
-                                       html = this.clean.restoreFormTags(html);
-
-                                       var chars = {
-                                               '\u2122': '&trade;',
-                                               '\u00a9': '&copy;',
-                                               '\u2026': '&hellip;',
-                                               '\u2014': '&mdash;',
-                                               '\u2010': '&dash;'
-                                       };
-                                       // replace special characters
-                                       $.each(chars, function(i,s)
-                                       {
-                                               html = html.replace(new RegExp(i, 'g'), s);
-                                       });
-
-                                       // remove last br in FF
-                                       if (this.utils.browser('mozilla'))
-                                       {
-                                               html = html.replace(/<br\s?\/?>$/gi, '');
-                                       }
-
-                                       // remove br in|of li tags
-                                       html = html.replace(new RegExp('<br\\s?/?></li>', 'gi'), '</li>');
-                                       html = html.replace(new RegExp('</li><br\\s?/?>', 'gi'), '</li>');
-
-                                       // remove empty attributes
-                                       html = html.replace(/<(.*?)rel="\s*?"(.*?[^>]?)>/gi, '<$1$2">');
-                                       html = html.replace(/<(.*?)style="\s*?"(.*?[^>]?)>/gi, '<$1$2">');
-                                       html = html.replace(/="">/gi, '>');
-                                       html = html.replace(/""">/gi, '">');
-                                       html = html.replace(/"">/gi, '">');
-
-                                       // remove verified
-                                       html = html.replace(/<div(.*?)data-tagblock="redactor"(.*?[^>])>/gi, '<div$1$2>');
-                                       html = html.replace(/<(.*?) data-verified="redactor"(.*?[^>])>/gi, '<$1$2>');
-
-                                       var $div = $("<div/>").html($.parseHTML(html, document, true));
-                                       $div.find("span").removeAttr("rel");
-
-                                       $div.find('pre .redactor-invisible-space').each(function()
-                                       {
-                                               $(this).contents().unwrap();
-                                       });
-
-                                       html = $div.html();
-
-                                       // remove rel attribute from img
-                                       html = html.replace(/<img(.*?[^>])rel="(.*?[^>])"(.*?[^>])>/gi, '<img$1$3>');
-                                       html = html.replace(/<span class="redactor-invisible-space">(.*?)<\/span>/gi, '$1');
-
-                                       html = html.replace(/ data-save-url="(.*?[^>])"/gi, '');
-
-                                       // remove image resize
-                                       html = html.replace(/<span(.*?)id="redactor-image-box"(.*?[^>])>([\w\W]*?)<img(.*?)><\/span>/gi, '$3<img$4>');
-                                       html = html.replace(/<span(.*?)id="redactor-image-resizer"(.*?[^>])>(.*?)<\/span>/gi, '');
-                                       html = html.replace(/<span(.*?)id="redactor-image-editter"(.*?[^>])>(.*?)<\/span>/gi, '');
-
-                                       // remove font tag
-                                       html = html.replace(/<font(.*?)>/gi, '');
-                                       html = html.replace(/<\/font>/gi, '');
-
-                                       // tidy html
-                                       html = this.tidy.load(html);
-
-                                       // link nofollow
-                                       if (this.opts.linkNofollow)
-                                       {
-                                               html = html.replace(/<a(.*?)rel="nofollow"(.*?[^>])>/gi, '<a$1$2>');
-                                               html = html.replace(/<a(.*?[^>])>/gi, '<a$1 rel="nofollow">');
-                                       }
-
-                                       // reconvert inline
-                                       html = html.replace(/\sdata-redactor-(tag|class|style)="(.*?[^>])"/gi, '');
-                                       html = html.replace(new RegExp('<(.*?) data-verified="redactor"(.*?[^>])>', 'gi'), '<$1$2>');
-                                       html = html.replace(new RegExp('<(.*?) data-verified="redactor">', 'gi'), '<$1>');
-
-                                       html = html.replace(/&amp;/g, '&');
-
-                                       return html;
-                               },
-                               onPaste: function(html, setMode)
-                               {
-                                       html = $.trim(html);
-                                       html = html.replace(/\$/g, '&#36;');
-
-                                       // convert dirty spaces
-                                       html = html.replace(/<span class="s[0-9]">/gi, '<span>');
-                                       html = html.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi, ' ');
-                                       html = html.replace(/<span class="Apple-tab-span"[^>]*>\t<\/span>/gi, '\t');
-                                       html = html.replace(/<span[^>]*>(\s|&nbsp;)<\/span>/gi, ' ');
-
-                                       if (this.opts.pastePlainText)
-                                       {
-                                               return this.clean.getPlainText(html);
-                                       }
-
-                                       if (!this.utils.isSelectAll() && typeof setMode == 'undefined')
-                                       {
-                                               if (this.utils.isCurrentOrParent(['FIGCAPTION', 'A']))
-                                               {
-                                                       return this.clean.getPlainText(html, false);
-                                               }
-
-                                               if (this.utils.isCurrentOrParent('PRE'))
-                                               {
-                                                       html = html.replace(/”/g, '"');
-                                                       html = html.replace(/“/g, '"');
-                                                       html = html.replace(/‘/g, '\'');
-                                                       html = html.replace(/’/g, '\'');
-
-                                                       return this.clean.getPreCode(html);
-                                               }
-
-                                               if (this.utils.isCurrentOrParent(['BLOCKQUOTE', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6']))
-                                               {
-                                                       html = this.clean.getOnlyImages(html);
-
-                                                       if (!this.utils.browser('msie'))
-                                                       {
-                                                               var block = this.selection.getBlock();
-                                                               if (block && block.tagName == 'P')
-                                                               {
-                                                                       html = html.replace(/<img(.*?)>/gi, '<p><img$1></p>');
-                                                               }
-                                                       }
-
-                                                       return html;
-                                               }
-
-                                               if (this.utils.isCurrentOrParent(['TD']))
-                                               {
-                                                       html = this.clean.onPasteTidy(html, 'td');
-
-                                                       if (this.opts.linebreaks) html = this.clean.replaceParagraphsToBr(html);
-
-                                                       html = this.clean.replaceDivsToBr(html);
-
-                                                       return html;
-                                               }
-
-
-                                               if (this.utils.isCurrentOrParent(['LI']))
-                                               {
-                                                       return this.clean.onPasteTidy(html, 'li');
-                                               }
-                                       }
-
-
-                                       html = this.clean.isSingleLine(html, setMode);
-
-                                       if (!this.clean.singleLine)
-                                       {
-                                               if (this.opts.linebreaks)  html = this.clean.replaceParagraphsToBr(html);
-                                               if (this.opts.replaceDivs) html = this.clean.replaceDivs(html);
-
-                                               html = this.clean.saveFormTags(html);
-                                       }
-
-
-                                       html = this.clean.onPasteWord(html);
-                                       html = this.clean.onPasteExtra(html);
-
-                                       html = this.clean.onPasteTidy(html, 'all');
-
-
-                                       // paragraphize
-                                       if (!this.clean.singleLine && this.opts.paragraphize)
-                                       {
-                                               html = this.paragraphize.load(html);
-                                       }
-
-                                       html = this.clean.removeDirtyStyles(html);
-                                       html = this.clean.onPasteRemoveSpans(html);
-                                       html = this.clean.onPasteRemoveEmpty(html);
-
-
-                                       html = this.clean.convertInline(html);
-
-                                       return html;
-                               },
-                               onPasteWord: function(html)
-                               {
-                                       // comments
-                                       html = html.replace(/<!--[\s\S]*?-->/gi, '');
-
-                                       // style
-                                       html = html.replace(/<style[^>]*>[\s\S]*?<\/style>/gi, '');
-
-                                       // op
-                                       html = html.replace(/<o\:p[^>]*>[\s\S]*?<\/o\:p>/gi, '');
-
-                                       if (html.match(/class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i))
-                                       {
-                                               // comments
-                                               html = html.replace(/<!--[\s\S]+?-->/gi, '');
-
-                                               // scripts
-                                               html = html.replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, '');
-
-                                               // Convert <s> into <strike>
-                                               html = html.replace(/<(\/?)s>/gi, "<$1strike>");
-
-                                               // Replace nbsp entites to char since it's easier to handle
-                                               html = html.replace(/ /gi, ' ');
-
-                                               // Convert <span style="mso-spacerun:yes">___</span> to string of alternating
-                                               // breaking/non-breaking spaces of same length
-                                               html = html.replace(/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi, function(str, spaces) {
-                                                       return (spaces.length > 0) ? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : '';
-                                               });
-
-                                               html = this.clean.onPasteIeFixLinks(html);
-
-                                               // shapes
-                                               html = html.replace(/<img(.*?)v:shapes=(.*?)>/gi, '');
-                                               html = html.replace(/src="file\:\/\/(.*?)"/, 'src=""');
-
-                                               // lists
-                                               var $div = $("<div/>").html(html);
-
-                                               var lastList = false;
-                                               var lastLevel = 1;
-                                               var listsIds = [];
-
-                                               $div.find("p[style]").each(function()
-                                               {
-                                                       var matches = $(this).attr('style').match(/mso\-list\:l([0-9]+)\slevel([0-9]+)/);
-
-                                                       if (matches)
-                                                       {
-                                                               var currentList = parseInt(matches[1]);
-                                                               var currentLevel = parseInt(matches[2]);
-                                                               var listType = $(this).html().match(/^[\w]+\./) ? "ol" : "ul";
-
-                                                               var $li = $("<li/>").html($(this).html());
-
-                                                               $li.html($li.html().replace(/^([\w\.]+)</, '<'));
-                                                               $li.find("span:first").remove();
-
-                                                               if (currentLevel == 1 && $.inArray(currentList, listsIds) == -1)
-                                                               {
-                                                                       var $list = $("<" + listType + "/>").attr({"data-level": currentLevel,
-                                                                                                                                                          "data-list": currentList})
-                                                                                                                                         .html($li);
-
-                                                                       $(this).replaceWith($list);
-
-                                                                       lastList = currentList;
-                                                                       listsIds.push(currentList);
-                                                               }
-                                                               else
-                                                               {
-                                                                       if (currentLevel > lastLevel)
-                                                                       {
-                                                                               var $prevList = $div.find('[data-level="' + lastLevel + '"][data-list="' + lastList + '"]');
-
-                                                                               var $lastList = $prevList;
-
-                                                                               for(var i = lastLevel; i < currentLevel; i++)
-                                                                               {
-                                                                                       $list = $("<" + listType + "/>");
-
-                                                                                       $list.appendTo($lastList.find("li").last());
-
-                                                                                       $lastList = $list;
-                                                                               }
-
-                                                                               $lastList.attr({"data-level": currentLevel,
-                                                                                                               "data-list": currentList})
-                                                                                                .html($li);
-
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                               var $prevList = $div.find('[data-level="' + currentLevel + '"][data-list="' + currentList + '"]').last();
-
-                                                                               $prevList.append($li);
-                                                                       }
-
-                                                                       lastLevel = currentLevel;
-                                                                       lastList = currentList;
-
-                                                                       $(this).remove();
-                                                               }
-                                                       }
-                                               });
-
-                                               $div.find('[data-level][data-list]').removeAttr('data-level data-list');
-                                               html = $div.html();
-
-                                               // remove ms word's bullet
-                                               html = html.replace(/·/g, '');
-                                               html = html.replace(/<p class="Mso(.*?)"/gi, '<p');
-
-                                               // classes
-                                               html = html.replace(/ class=\"(mso[^\"]*)\"/gi, "");
-                                               html = html.replace(/ class=(mso\w+)/gi, "");
-
-                                               // remove ms word tags
-                                               html = html.replace(/<o:p(.*?)>([\w\W]*?)<\/o:p>/gi, '$2');
-
-                                               // ms word break lines
-                                               html = html.replace(/\n/g, ' ');
-
-                                               // ms word lists break lines
-                                               html = html.replace(/<p>\n?<li>/gi, '<li>');
-                                       }
-
-                                       return html;
-                               },
-                               onPasteExtra: function(html)
-                               {
-                                       // remove google docs markers
-                                       html = html.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi, "$2");
-                                       html = html.replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi, "$3");
-
-                                       // google docs styles
-                                       html = html.replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>/gi, '<span style="font-weight: bold;"><span style="font-style: italic;">');
-                                       html = html.replace(/<span[^>]*font-style: italic[^>]*>/gi, '<span style="font-style: italic;">');
-                                       html = html.replace(/<span[^>]*font-weight: bold[^>]*>/gi, '<span style="font-weight: bold;">');
-                                       html = html.replace(/<span[^>]*text-decoration: underline[^>]*>/gi, '<span style="text-decoration: underline;">');
-
-                                       html = html.replace(/<img>/gi, '');
-                                       html = html.replace(/\n{3,}/gi, '\n');
-                                       html = html.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi, '$2');
-
-                                       // remove dirty p
-                                       html = html.replace(/<p><p>/gi, '<p>');
-                                       html = html.replace(/<\/p><\/p>/gi, '</p>');
-                                       html = html.replace(/<li>(\s*|\t*|\n*)<p>/gi, '<li>');
-                                       html = html.replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi, '</li>');
-
-                                       // remove space between paragraphs
-                                       html = html.replace(/<\/p>\s<p/gi, '<\/p><p');
-
-                                       // remove safari local images
-                                       html = html.replace(/<img src="webkit-fake-url\:\/\/(.*?)"(.*?)>/gi, '');
-
-                                       // bullets
-                                       html = html.replace(/<p>•([\w\W]*?)<\/p>/gi, '<li>$1</li>');
-
-                                       // FF fix
-                                       if (this.utils.browser('mozilla'))
-                                       {
-                                               html = html.replace(/<br\s?\/?>$/gi, '');
-                                       }
-
-                                       return html;
-                               },
-                               onPasteTidy: function(html, type)
-                               {
-                                       // remove all tags except these
-                                       var tags = ['span', 'a', 'pre', 'blockquote', 'small', 'em', 'strong', 'code', 'kbd', 'mark', 'address', 'cite', 'var', 'samp', 'dfn', 'sup', 'sub', 'b', 'i', 'u', 'del',
-                                                               'ol', 'ul', 'li', 'dl', 'dt', 'dd', 'p', 'br', 'video', 'audio', 'iframe', 'embed', 'param', 'object', 'img', 'table',
-                                                               'td', 'th', 'tr', 'tbody', 'tfoot', 'thead', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
-                                       var tagsEmpty = false;
-                                       var attrAllowed =  [
-                                                       ['a', '*'],
-                                                       ['img', ['src', 'alt']],
-                                                       ['span', ['class', 'rel', 'data-verified']],
-                                                       ['iframe', '*'],
-                                                       ['video', '*'],
-                                                       ['audio', '*'],
-                                                       ['embed', '*'],
-                                                       ['object', '*'],
-                                                       ['param', '*'],
-                                                       ['source', '*']
-                                               ];
-
-                                       if (type == 'all')
-                                       {
-                                               tagsEmpty = ['p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
-                                               attrAllowed =  [
-                                                       ['table', 'class'],
-                                                       ['td', ['colspan', 'rowspan']],
-                                                       ['a', '*'],
-                                                       ['img', ['src', 'alt', 'data-redactor-inserted-image']],
-                                                       ['span', ['class', 'rel', 'data-verified']],
-                                                       ['iframe', '*'],
-                                                       ['video', '*'],
-                                                       ['audio', '*'],
-                                                       ['embed', '*'],
-                                                       ['object', '*'],
-                                                       ['param', '*'],
-                                                       ['source', '*']
-                                               ];
-                                       }
-                                       else if (type == 'td')
-                                       {
-                                               // remove all tags except these and remove all table tags: tr, td etc
-                                               tags = ['ul', 'ol', 'li', 'span', 'a', 'small', 'em', 'strong', 'code', 'kbd', 'mark', 'cite', 'var', 'samp', 'dfn', 'sup', 'sub', 'b', 'i', 'u', 'del',
-                                                               'ol', 'ul', 'li', 'dl', 'dt', 'dd', 'br', 'iframe', 'video', 'audio', 'embed', 'param', 'object', 'img', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
-
-                                       }
-                                       else if (type == 'li')
-                                       {
-                                               // only inline tags and ul, ol, li
-                                               tags = ['ul', 'ol', 'li', 'span', 'a', 'small', 'em', 'strong', 'code', 'kbd', 'mark', 'cite', 'var', 'samp', 'dfn', 'sup', 'sub', 'b', 'i', 'u', 'del', 'br',
-                                                               'iframe', 'video', 'audio', 'embed', 'param', 'object', 'img'];
-                                       }
-
-                                       var options = {
-                                               deniedTags: (this.opts.deniedTags) ? this.opts.deniedTags : false,
-                                               allowedTags: (this.opts.allowedTags) ? this.opts.allowedTags : tags,
-                                               removeComments: true,
-                                               removePhp: true,
-                                               removeAttr: (this.opts.removeAttr) ? this.opts.removeAttr : false,
-                                               allowedAttr: (this.opts.allowedAttr) ? this.opts.allowedAttr : attrAllowed,
-                                               removeEmpty: tagsEmpty
-                                       };
-
-                                       return this.tidy.load(html, options);
-                               },
-                               onPasteRemoveEmpty: function(html)
-                               {
-                                       html = html.replace(/<(p|h[1-6])>(|\s|\n|\t|<br\s?\/?>)<\/(p|h[1-6])>/gi, '');
-
-                                       // remove br in the end
-                                       if (!this.opts.linebreaks) html = html.replace(/<br>$/i, '');
-
-                                       return html;
-                               },
-                               onPasteRemoveSpans: function(html)
-                               {
-                                       html = html.replace(/<span>(.*?)<\/span>/gi, '$1');
-                                       html = html.replace(/<span[^>]*>\s|&nbsp;<\/span>/gi, ' ');
-
-                                       return html;
-                               },
-                               onPasteIeFixLinks: function(html)
-                               {
-                                       if (!this.utils.browser('msie')) return html;
-
-                                       var tmp = $.trim(html);
-                                       if (tmp.search(/^<a(.*?)>(.*?)<\/a>$/i) === 0)
-                                       {
-                                               html = html.replace(/^<a(.*?)>(.*?)<\/a>$/i, "$2");
-                                       }
-
-                                       return html;
-                               },
-                               isSingleLine: function(html, setMode)
-                               {
-                                       this.clean.singleLine = false;
-
-                                       if (!this.utils.isSelectAll() && typeof setMode == 'undefined')
-                                       {
-                                               var blocks = this.opts.blockLevelElements.join('|').replace('P|', '').replace('DIV|', '');
-
-                                               var matchBlocks = html.match(new RegExp('</(' + blocks + ')>', 'gi'));
-                                               var matchContainers = html.match(/<\/(p|div)>/gi);
-
-                                               if (!matchBlocks && (matchContainers === null || (matchContainers && matchContainers.length <= 1)))
-                                               {
-                                                       var matchBR = html.match(/<br\s?\/?>/gi);
-                                                       //var matchIMG = html.match(/<img(.*?[^>])>/gi);
-                                                       if (!matchBR)
-                                                       {
-                                                               this.clean.singleLine = true;
-                                                               html = html.replace(/<\/?(p|div)(.*?)>/gi, '');
-                                                       }
-                                               }
-                                       }
-
-                                       return html;
-                               },
-                               stripTags: function(input, allowed)
-                               {
-                                   allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('');
-                                   var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;
-
-                                   return input.replace(tags, function ($0, $1) {
-                                       return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
-                                   });
-                               },
-                               savePreCode: function(html)
-                               {
-                                       html = this.clean.savePreFormatting(html);
-                                       html = this.clean.saveCodeFormatting(html);
-
-                                       html = this.clean.restoreSelectionMarker(html);
-
-                                       return html;
-                               },
-                               savePreFormatting: function(html)
-                               {
-                                       var pre = html.match(/<pre(.*?)>([\w\W]*?)<\/pre>/gi);
-
-                                       if (pre !== null)
-                                       {
-                                               $.each(pre, $.proxy(function(i,s)
-                                               {
-                                                       var arr = s.match(/<pre(.*?)>([\w\W]*?)<\/pre>/i);
-
-                                                       arr[2] = arr[2].replace(/<br\s?\/?>/g, '\n');
-                                                       arr[2] = arr[2].replace(/&nbsp;/g, ' ');
-
-                                                       if (this.opts.preSpaces)
-                                                       {
-                                                               arr[2] = arr[2].replace(/\t/g, Array(this.opts.preSpaces + 1).join(' '));
-                                                       }
-
-                                                       arr[2] = this.clean.encodeEntities(arr[2]);
-
-                                                       // $ fix
-                                                       arr[2] = arr[2].replace(/\$/g, '&#36;');
-
-                                                       html = html.replace(s, '<pre' + arr[1] + '>' + arr[2] + '</pre>');
-
-                                               }, this));
-                                       }
-
-                                       return html;
-                               },
-                               saveCodeFormatting: function(html)
-                               {
-                                       var code = html.match(/<code(.*?)>([\w\W]*?)<\/code>/gi);
-
-                                       if (code !== null)
-                                       {
-                                               $.each(code, $.proxy(function(i,s)
-                                               {
-                                                       var arr = s.match(/<code(.*?)>([\w\W]*?)<\/code>/i);
-
-                                                       arr[2] = arr[2].replace(/&nbsp;/g, ' ');
-                                                       arr[2] = this.clean.encodeEntities(arr[2]);
-                                                       arr[2] = arr[2].replace(/\$/g, '&#36;');
-
-                                                       html = html.replace(s, '<code' + arr[1] + '>' + arr[2] + '</code>');
-                                               }, this));
-                                       }
-
-                                       return html;
-                               },
-                               restoreSelectionMarker: function(html)
-                               {
-                                       html = html.replace(/&lt;span id=&quot;selection-marker-([0-9])&quot; class=&quot;redactor-selection-marker&quot; data-verified=&quot;redactor&quot;&gt;​&lt;\/span&gt;/g, '<span id="selection-marker-$1" class="redactor-selection-marker" data-verified="redactor">​</span>');
-
-                                       return html;
-                               },
-                               getTextFromHtml: function(html)
-                               {
-                                       html = html.replace(/<br\s?\/?>|<\/H[1-6]>|<\/p>|<\/div>|<\/li>|<\/td>/gi, '\n');
-
-                                       var tmp = document.createElement('div');
-                                       tmp.innerHTML = html;
-                                       html = tmp.textContent || tmp.innerText;
-
-                                       return $.trim(html);
-                               },
-                               getPlainText: function(html, paragraphize)
-                               {
-                                       html = this.clean.getTextFromHtml(html);
-                                       html = html.replace(/\n\s*\n/g, "\n");
-                                       html = html.replace(/\n\n/g, "\n");
-                                       html = html.replace(/\n/g, '<br />');
-
-                                       if (this.opts.paragraphize && typeof paragraphize == 'undefined' && !this.utils.browser('mozilla'))
-                                       {
-                                               html = this.paragraphize.load(html);
-                                       }
-
-                                       return html;
-                               },
-                               getPreCode: function(html)
-                               {
-                                       html = html.replace(/<img(.*?) style="(.*?)"(.*?[^>])>/gi, '<img$1$3>');
-                                       html = html.replace(/<img(.*?)>/gi, '&lt;img$1&gt;');
-                                       html = this.clean.getTextFromHtml(html);
-
-                                       if (this.opts.preSpaces)
-                                       {
-                                               html = html.replace(/\t/g, Array(this.opts.preSpaces + 1).join(' '));
-                                       }
-
-                                       html = this.clean.encodeEntities(html);
-
-                                       return html;
-                               },
-                               getOnlyImages: function(html)
-                               {
-                                       html = html.replace(/<img(.*?)>/gi, '[img$1]');
-
-                                       // remove all tags
-                                       html = html.replace(/<([Ss]*?)>/gi, '');
-
-                                       html = html.replace(/\[img(.*?)\]/gi, '<img$1>');
-
-                                       return html;
-                               },
-                               getOnlyLinksAndImages: function(html)
-                               {
-                                       html = html.replace(/<a(.*?)href="(.*?)"(.*?)>([\w\W]*?)<\/a>/gi, '[a href="$2"]$4[/a]');
-                                       html = html.replace(/<img(.*?)>/gi, '[img$1]');
-
-                                       // remove all tags
-                                       html = html.replace(/<(.*?)>/gi, '');
-
-                                       html = html.replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi, '<a href="$1">$2</a>');
-                                       html = html.replace(/\[img(.*?)\]/gi, '<img$1>');
-
-                                       return html;
-                               },
-                               encodeEntities: function(str)
-                               {
-                                       str = String(str).replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '"');
-                                       return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
-                               },
-                               removeDirtyStyles: function(html)
-                               {
-                                       if (this.utils.browser('msie')) return html;
-
-                                       var div = document.createElement('div');
-                                       div.innerHTML = html;
-
-                                       this.clean.clearUnverifiedRemove($(div));
-
-                                       html = div.innerHTML;
-                                       $(div).remove();
-
-                                       return html;
-                               },
-                               clearUnverified: function()
-                               {
-                                       if (this.utils.browser('msie')) return;
-
-                                       this.clean.clearUnverifiedRemove(this.$editor);
-
-                                       var headers = this.$editor.find('h1, h2, h3, h4, h5, h6');
-                                       headers.find('span').removeAttr('style');
-                                       headers.find(this.opts.verifiedTags.join(', ')).removeAttr('style');
-
-                                       this.code.sync();
-                               },
-                               clearUnverifiedRemove: function($editor)
-                               {
-                                       $editor.find(this.opts.verifiedTags.join(', ')).removeAttr('style');
-                                       $editor.find('span').not('[data-verified="redactor"]').removeAttr('style');
-
-                                       $editor.find('span[data-verified="redactor"], img[data-verified="redactor"]').each(function(i, s)
-                                       {
-                                               var $s = $(s);
-                                               $s.attr('style', $s.attr('rel'));
-                                       });
-
-                               },
-                               cleanEmptyParagraph: function()
-                               {
-
-                               },
-                               setVerified: function(html)
-                               {
-                                       if (this.utils.browser('msie')) return html;
-
-                                       html = html.replace(new RegExp('<img(.*?[^>])>', 'gi'), '<img$1 data-verified="redactor">');
-                                       html = html.replace(new RegExp('<span(.*?[^>])>', 'gi'), '<span$1 data-verified="redactor">');
-
-                                       var matches = html.match(new RegExp('<(span|img)(.*?)style="(.*?)"(.*?[^>])>', 'gi'));
-
-                                       if (matches)
-                                       {
-                                               var len = matches.length;
-                                               for (var i = 0; i < len; i++)
-                                               {
-                                                       try {
-
-                                                               var newTag = matches[i].replace(/style="(.*?)"/i, 'style="$1" rel="$1"');
-                                                               html = html.replace(matches[i], newTag);
-
-                                                       }
-                                                       catch (e) {}
-                                               }
-                                       }
-
-                                       return html;
-                               },
-                               convertInline: function(html)
-                               {
-                                       var $div = $('<div />').html(html);
-
-                                       var tags = this.opts.inlineTags;
-                                       tags.push('span');
-
-                                       $div.find(tags.join(',')).each(function()
-                                       {
-                                               var $el = $(this);
-                                               var tag = this.tagName.toLowerCase();
-                                               $el.attr('data-redactor-tag', tag);
-
-                                               if (tag == 'span')
-                                               {
-                                                       if ($el.attr('style')) $el.attr('data-redactor-style', $el.attr('style'));
-                                                       else if ($el.attr('class')) $el.attr('data-redactor-class', $el.attr('class'));
-                                               }
-
-                                       });
-
-                                       html = $div.html();
-                                       $div.remove();
-
-                                       return html;
-                               },
-                               normalizeLists: function()
-                               {
-                                       this.$editor.find('li').each(function(i,s)
-                                       {
-                                               var $next = $(s).next();
-                                               if ($next.length !== 0 && ($next[0].tagName == 'UL' || $next[0].tagName == 'OL'))
-                                               {
-                                                       $(s).append($next);
-                                               }
-
-                                       });
-                               },
-                               removeSpaces: function(html)
-                               {
-                                       html = html.replace(/\n/g, '');
-                                       html = html.replace(/[\t]*/g, '');
-                                       html = html.replace(/\n\s*\n/g, "\n");
-                                       html = html.replace(/^[\s\n]*/g, ' ');
-                                       html = html.replace(/[\s\n]*$/g, ' ');
-                                       html = html.replace( />\s{2,}</g, '> <'); // between inline tags can be only one space
-                                       html = html.replace(/\n\n/g, "\n");
-                                       html = html.replace(/\u200B/g, '');
-
-                                       return html;
-                               },
-                               replaceDivs: function(html)
-                               {
-                                       if (this.opts.linebreaks)
-                                       {
-                                               html = html.replace(/<div><br\s?\/?><\/div>/gi, '<br />');
-                                               html = html.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi, '$2<br />');
-                                       }
-                                       else
-                                       {
-                                               html = html.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi, '<p$1>$2</p>');
-                                       }
-
-                                       html = html.replace(/<div(.*?[^>])>/gi, '');
-                                       html = html.replace(/<\/div>/gi, '');
-
-                                       return html;
-                               },
-                               replaceDivsToBr: function(html)
-                               {
-                                       html = html.replace(/<div\s(.*?)>/gi, '<p>');
-                                       html = html.replace(/<div><br\s?\/?><\/div>/gi, '<br /><br />');
-                                       html = html.replace(/<div>([\w\W]*?)<\/div>/gi, '$1<br /><br />');
-
-                                       return html;
-                               },
-                               replaceParagraphsToBr: function(html)
-                               {
-                                       html = html.replace(/<p\s(.*?)>/gi, '<p>');
-                                       html = html.replace(/<p><br\s?\/?><\/p>/gi, '<br />');
-                                       html = html.replace(/<p>([\w\W]*?)<\/p>/gi, '$1<br /><br />');
-                                       html = html.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi, '</blockquote>');
-
-                                       return html;
-                               },
-                               saveFormTags: function(html)
-                               {
-                                       return html.replace(/<form(.*?)>([\w\W]*?)<\/form>/gi, '<section$1 rel="redactor-form-tag">$2</section>');
-                               },
-                               restoreFormTags: function(html)
-                               {
-                                       return html.replace(/<section(.*?) rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi, '<form$1$2>$3</form>');
-                               }
-                       };
-               },
-               code: function()
-               {
-                       return {
-                               set: function(html)
-                               {
-                                       html = $.trim(html.toString());
-
-                                       // clean
-                                       html = this.clean.onSet(html);
-
-
-                                       if (this.utils.browser('msie'))
-                                       {
-                                               html = html.replace(/<span(.*?)id="selection-marker-(1|2)"(.*?)><\/span>/gi, '');
-                                       }
-
-                                       this.$editor.html(html);
-                                       this.code.sync();
-
-                                       if (html !== '') this.placeholder.remove();
-
-                                       setTimeout($.proxy(this.buffer.add, this), 15);
-                                       if (this.start === false) this.observe.load();
-
-                               },
-                               get: function()
-                               {
-                                       var code = this.$textarea.val();
-
-                                       if (this.opts.replaceDivs) code = this.clean.replaceDivs(code);
-                                       if (this.opts.linebreaks) code = this.clean.replaceParagraphsToBr(code);
-
-                                       // indent code
-                                       code = this.tabifier.get(code);
-
-                                       return code;
-                               },
-                               sync: function()
-                               {
-                                       setTimeout($.proxy(this.code.startSync, this), 10);
-                               },
-                               startSync: function()
-                               {
-                                       var html = this.$editor.html();
-
-                                       // is there a need to synchronize
-                                       if (this.code.syncCode && this.code.syncCode == html || (this.start && html == '' ))
-                                       {
-                                               // do not sync
-                                               return;
-                                       }
-
-                                       // save code
-                                       this.code.syncCode = html;
-
-                                       // before clean callback
-                                       html = this.core.setCallback('syncBefore', html);
-
-                                       // clean
-                                       html = this.clean.onSync(html);
-
-                                       // set code
-                                       this.$textarea.val(html);
-
-                                       // after sync callback
-                                       this.core.setCallback('sync', html);
-
-                                       if (this.start === false)
-                                       {
-                                               this.core.setCallback('change', html);
-                                       }
-
-                                       this.start = false;
-
-                                       if (this.autosave.html == false)
-                                       {
-                                               this.autosave.html = this.code.get();
-                                       }
-
-                                       if (this.opts.codemirror)
-                                       {
-                                               this.$textarea.next('.CodeMirror').each(function(i, el)
-                                               {
-                                                       el.CodeMirror.setValue(html);
-                                               });
-                                       }
-
-                                       //autosave
-                                       this.autosave.onChange();
-                                       this.autosave.enable();
-                               },
-                               toggle: function()
-                               {
-                                       if (this.opts.visual)
-                                       {
-                                               this.code.showCode();
-                                       }
-                                       else
-                                       {
-                                               this.code.showVisual();
-                                       }
-                               },
-                               showCode: function()
-                               {
-                                       this.selection.save();
-
-                                       this.code.offset = this.caret.getOffset();
-                                       var scroll = $(window).scrollTop();
-
-                                       var     width = this.$editor.innerWidth(),
-                                               height = this.$editor.innerHeight();
-
-                                       this.$editor.hide();
-
-                                       var html = this.$textarea.val();
-
-                                       this.modified = this.clean.removeSpaces(html);
-
-                                       // indent code
-                                       html = this.tabifier.get(html);
-
-                                       // caret position sync
-                                       var start = 0, end = 0;
-                                       var $editorDiv = $("<div/>").append($.parseHTML(this.clean.onSync(this.$editor.html()), document, true));
-                                       var $selectionMarkers = $editorDiv.find("span.redactor-selection-marker");
-
-                                       if ($selectionMarkers.length > 0)
-                                       {
-                                               var editorHtml = this.tabifier.get($editorDiv.html()).replace(/&amp;/g, '&');
-
-                                               if ($selectionMarkers.length == 1)
-                                               {
-                                                       start = this.utils.strpos(editorHtml, $editorDiv.find("#selection-marker-1").prop("outerHTML"));
-                                                       end   = start;
-                                               }
-                                               else if ($selectionMarkers.length == 2)
-                                               {
-                                                       start = this.utils.strpos(editorHtml, $editorDiv.find("#selection-marker-1").prop("outerHTML"));
-                                                       end      = this.utils.strpos(editorHtml, $editorDiv.find("#selection-marker-2").prop("outerHTML")) - $editorDiv.find("#selection-marker-1").prop("outerHTML").toString().length;
-                                               }
-                                       }
-
-                                       this.selection.removeMarkers();
-                                       this.$textarea.val(html);
-
-                                       if (this.opts.codemirror)
-                                       {
-                                               this.$textarea.next('.CodeMirror').each(function(i, el)
-                                               {
-                                                       $(el).show();
-                                                       el.CodeMirror.setValue(html);
-                                                       el.CodeMirror.setSize('100%', height);
-                                                       el.CodeMirror.refresh();
-
-                                                       if (start == end)
-                                                       {
-                                                               el.CodeMirror.setCursor(el.CodeMirror.posFromIndex(start).line, el.CodeMirror.posFromIndex(end).ch);
-                                                       }
-                                                       else
-                                                       {
-                                                               el.CodeMirror.setSelection({line: el.CodeMirror.posFromIndex(start).line,
-                                                                                                                       ch: el.CodeMirror.posFromIndex(start).ch},
-                                                                                                                 {line: el.CodeMirror.posFromIndex(end).line,
-                                                                                                                  ch:  el.CodeMirror.posFromIndex(end).ch});
-                                                       }
-
-                                                       el.CodeMirror.focus();
-                                               });
-                                       }
-                                       else
-                                       {
-                                               this.$textarea.height(height).show().focus();
-                                               this.$textarea.on('keydown.redactor-textarea-indenting', this.code.textareaIndenting);
-
-                                               $(window).scrollTop(scroll);
-
-                                               if (this.$textarea[0].setSelectionRange)
-                                               {
-                                                       this.$textarea[0].setSelectionRange(start, end);
-                                               }
-
-                                               this.$textarea[0].scrollTop = 0;
-                                       }
-
-                                       this.opts.visual = false;
-
-                                       this.button.setInactiveInCode();
-                                       this.button.setActive('html');
-                                       this.core.setCallback('source', html);
-                               },
-                               showVisual: function()
-                               {
-                                       var html;
-
-                                       if (this.opts.visual) return;
-
-                                       var start = 0, end = 0;
-
-                                       if (this.opts.codemirror)
-                                       {
-                                               var selection;
-
-                                               this.$textarea.next('.CodeMirror').each(function(i, el)
-                                               {
-                                                       selection = el.CodeMirror.listSelections();
-
-                                                       start = el.CodeMirror.indexFromPos(selection[0].anchor);
-                                                       end = el.CodeMirror.indexFromPos(selection[0].head);
-
-                                                       html = el.CodeMirror.getValue();
-                                               });
-                                       }
-                                       else
-                                       {
-                                               start = this.$textarea.get(0).selectionStart;
-                                               end = this.$textarea.get(0).selectionEnd;
-
-                                               html = this.$textarea.hide().val();
-                                       }
-
-                                       // if selection starts from end
-                                       if (start > end && end > 0)
-                                       {
-                                               var tempStart = end;
-                                               var tempEnd = start;
-
-                                               start = tempStart;
-                                               end = tempEnd;
-                                       }
-
-                                       start = this.code.enlargeOffset(html, start);
-                                       end = this.code.enlargeOffset(html, end);
-
-                                       html = html.substr(0, start) + this.selection.getMarkerAsHtml(1) + html.substr(start);
-
-                                       if (end > start)
-                                       {
-                                               var markerLength = this.selection.getMarkerAsHtml(1).toString().length;
-
-                                               html = html.substr(0, end + markerLength) + this.selection.getMarkerAsHtml(2) + html.substr(end + markerLength);
-                                       }
-
-
-
-                                       if (this.modified !== this.clean.removeSpaces(html))
-                                       {
-                                               this.code.set(html);
-
-                                       }
-
-                                       if (this.opts.codemirror)
-                                       {
-                                               this.$textarea.next('.CodeMirror').hide();
-                                       }
-
-                                       this.$editor.show();
-
-                                       if (!this.utils.isEmpty(html))
-                                       {
-                                               this.placeholder.remove();
-                                       }
-
-                                       this.selection.restore();
-
-                                       this.$textarea.off('keydown.redactor-textarea-indenting');
-
-                                       this.button.setActiveInVisual();
-                                       this.button.setInactive('html');
-                                       this.observe.load();
-                                       this.opts.visual = true;
-                                       this.core.setCallback('visual', html);
-                               },
-                               textareaIndenting: function(e)
-                               {
-                                       if (e.keyCode !== 9) return true;
-
-                                       var $el = this.$textarea;
-                                       var start = $el.get(0).selectionStart;
-                                       $el.val($el.val().substring(0, start) + "\t" + $el.val().substring($el.get(0).selectionEnd));
-                                       $el.get(0).selectionStart = $el.get(0).selectionEnd = start + 1;
-
-                                       return false;
-                               },
-                               enlargeOffset: function(html, offset)
-                               {
-                                       var htmlLength = html.length;
-                                       var c = 0;
-
-                                       if (html[offset] == '>')
-                                       {
-                                               c++;
-                                       }
-                                       else
-                                       {
-                                               for(var i = offset; i <= htmlLength; i++)
-                                               {
-                                                       c++;
-
-                                                       if (html[i] == '>')
-                                                       {
-                                                               break;
-                                                       }
-                                                       else if (html[i] == '<' || i == htmlLength)
-                                                       {
-                                                               c = 0;
-                                                               break;
-                                                       }
-                                               }
-                                       }
-
-                                       return offset + c;
-                               }
-                       };
-               },
-               core: function()
-               {
-                       return {
-                               getObject: function()
-                               {
-                                       return $.extend({}, this);
-                               },
-                               getEditor: function()
-                               {
-                                       return this.$editor;
-                               },
-                               getBox: function()
-                               {
-                                       return this.$box;
-                               },
-                               getElement: function()
-                               {
-                                       return this.$element;
-                               },
-                               getTextarea: function()
-                               {
-                                       return this.$textarea;
-                               },
-                               getToolbar: function()
-                               {
-                                       return (this.$toolbar) ? this.$toolbar : false;
-                               },
-                               addEvent: function(name)
-                               {
-                                       this.core.event = name;
-                               },
-                               getEvent: function()
-                               {
-                                       return this.core.event;
-                               },
-                               setCallback: function(type, e, data)
-                               {
-                                       var eventName = type + 'Callback';
-                                       var eventNamespace = 'redactor';
-                                       var callback = this.opts[eventName];
-
-                                       if (this.$textarea)
-                                       {
-                                               var returnValue = false;
-                                               var events = $._data(this.$textarea[0], 'events');
-
-                                               if (typeof events != 'undefined' && typeof events[eventName] != 'undefined')
-                                               {
-                                                       $.each(events[eventName], $.proxy(function(key, value)
-                                                       {
-                                                               if (value['namespace'] == eventNamespace)
-                                                               {
-                                                                       var data = (typeof data == 'undefined') ? [e] : [e, data];
-
-                                                                       returnValue = (typeof data == 'undefined') ? value.handler.call(this, e) : value.handler.call(this, e, data);
-                                                               }
-                                                       }, this));
-                                               }
-
-                                               if (returnValue) return returnValue;
-                                       }
-
-                                       if ($.isFunction(callback))
-                                       {
-                                               return (typeof data == 'undefined') ? callback.call(this, e) : callback.call(this, e, data);
-                                       }
-                                       else
-                                       {
-                                               return (typeof data == 'undefined') ? e : data;
-                                       }
-                               },
-                               destroy: function()
-                               {
-                                       this.opts.destroyed = true;
-
-                                       this.core.setCallback('destroy');
-
-                                       // off events and remove data
-                                       this.$element.off('.redactor').removeData('redactor');
-                                       this.$editor.off('.redactor');
-
-                                       $(document).off('mousedown.redactor-blur.' + this.uuid);
-                                       $(document).off('mousedown.redactor.' + this.uuid);
-                                       $(document).off('click.redactor-image-delete.' + this.uuid);
-                                       $(document).off('click.redactor-image-resize-hide.' + this.uuid);
-                                       $(document).off('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid);
-                                       $("body").off('scroll.redactor.' + this.uuid);
-                                       $(this.opts.toolbarFixedTarget).off('scroll.redactor.' + this.uuid);
-
-                                       // common
-                                       this.$editor.removeClass('redactor-editor redactor-linebreaks redactor-placeholder');
-                                       this.$editor.removeAttr('contenteditable');
-
-                                       var html = this.code.get();
-
-                                       if (this.opts.toolbar)
-                                       {
-                                               // dropdowns off
-                                               this.$toolbar.find('a').each(function()
-                                               {
-                                                       var $el = $(this);
-                                                       if ($el.data('dropdown'))
-                                                       {
-                                                               $el.data('dropdown').remove();
-                                                               $el.data('dropdown', {});
-                                                       }
-                                               });
-                                       }
-
-                                       if (this.build.isTextarea())
-                                       {
-                                               this.$box.after(this.$element);
-                                               this.$box.remove();
-                                               this.$element.val(html).show();
-                                       }
-                                       else
-                                       {
-                                               this.$box.after(this.$editor);
-                                               this.$box.remove();
-                                               this.$element.html(html).show();
-                                       }
-
-                                       // paste box
-                                       if (this.$pasteBox) this.$pasteBox.remove();
-
-                                       // modal
-                                       if (this.$modalBox) this.$modalBox.remove();
-                                       if (this.$modalOverlay) this.$modalOverlay.remove();
-
-                                       // buttons tooltip
-                                       $('.redactor-toolbar-tooltip-' + this.uuid).remove();
-
-                                       // autosave
-                                       clearInterval(this.autosaveInterval);
-                               }
-                       };
-               },
-               dropdown: function()
-               {
-                       return {
-                               build: function(name, $dropdown, dropdownObject)
-                               {
-                                       if (name == 'formatting' && this.opts.formattingAdd)
-                                       {
-                                               $.each(this.opts.formattingAdd, $.proxy(function(i,s)
-                                               {
-                                                       var name = s.tag,
-                                                               func;
-
-                                                       if (typeof s['class'] != 'undefined')
-                                                       {
-                                                               name = name + '-' + s['class'];
-                                                       }
-
-                                                       s.type = (this.utils.isBlockTag(s.tag)) ? 'block' : 'inline';
-
-                                                       if (typeof s.func !== "undefined")
-                                                       {
-                                                               func = s.func;
-                                                       }
-                                                       else
-                                                       {
-                                                               func = (s.type == 'inline') ? 'inline.formatting' : 'block.formatting';
-                                                       }
-
-                                                       if (this.opts.linebreaks && s.type == 'block' && s.tag == 'p') return;
-
-                                                       this.formatting[name] = {
-                                                               tag: s.tag,
-                                                               style: s.style,
-                                                               'class': s['class'],
-                                                               attr: s.attr,
-                                                               data: s.data,
-                                                               clear: s.clear
-                                                       };
-
-                                                       dropdownObject[name] = {
-                                                               func: func,
-                                                               title: s.title
-                                                       };
-
-                                               }, this));
-                                       }
-
-                                       $.each(dropdownObject, $.proxy(function(btnName, btnObject)
-                                       {
-                                               var $item = $('<a href="#" class="redactor-dropdown-' + btnName + '" role="button">' + btnObject.title + '</a>');
-                                               if (name == 'formatting') $item.addClass('redactor-formatting-' + btnName);
-
-                                               $item.on('click', $.proxy(function(e)
-                                               {
-                                                       e.preventDefault();
-
-                                                       var type = 'func';
-                                                       var callback = btnObject.func;
-                                                       if (btnObject.command)
-                                                       {
-                                                               type = 'command';
-                                                               callback = btnObject.command;
-                                                       }
-                                                       else if (btnObject.dropdown)
-                                                       {
-                                                               type = 'dropdown';
-                                                               callback = btnObject.dropdown;
-                                                       }
-
-                                                       if ($(e.target).hasClass('redactor-dropdown-link-inactive')) return;
-
-                                                       this.button.onClick(e, btnName, type, callback);
-                                                       this.dropdown.hideAll();
-
-                                               }, this));
-
-                                               this.observe.addDropdown($item, btnName, btnObject);
-
-                                               $dropdown.append($item);
-
-                                       }, this));
-                               },
-                               show: function(e, key)
-                               {
-                                       if (!this.opts.visual)
-                                       {
-                                               e.preventDefault();
-                                               return false;
-                                       }
-
-                                       var $button = this.button.get(key);
-
-                                       // Always re-append it to the end of <body> so it always has the highest sub-z-index.
-                                       var $dropdown = $button.data('dropdown').appendTo(document.body);
-
-                                       if (this.opts.highContrast)
-                                       {
-                                               $dropdown.addClass("redactor-dropdown-contrast");
-                                       }
-
-                                       if ($button.hasClass('dropact'))
-                                       {
-                                               this.dropdown.hideAll();
-                                       }
-                                       else
-                                       {
-                                               this.dropdown.hideAll();
-                                               this.observe.dropdowns();
-
-                                               this.core.setCallback('dropdownShow', { dropdown: $dropdown, key: key, button: $button });
-
-                                               this.button.setActive(key);
-
-                                               $button.addClass('dropact');
-
-                                               var keyPosition = $button.offset();
-
-                                               // fix right placement
-                                               var dropdownWidth = $dropdown.width();
-                                               if ((keyPosition.left + dropdownWidth) > $(document).width())
-                                               {
-                                                       keyPosition.left = Math.max(0, keyPosition.left - dropdownWidth);
-                                               }
-
-                                               var left = keyPosition.left + 'px';
-                                               if (this.$toolbar.hasClass('toolbar-fixed-box'))
-                                               {
-                                                       var top = this.$toolbar.innerHeight() + this.opts.toolbarFixedTopOffset;
-                                                       var position = 'fixed';
-                                                       if (this.opts.toolbarFixedTarget !== document)
-                                                       {
-                                                               top = (this.$toolbar.innerHeight() + this.$toolbar.offset().top) + this.opts.toolbarFixedTopOffset;
-                                                               position = 'absolute';
-                                                       }
-
-                                                       $dropdown.css({ position: position, left: left, top: top + 'px' }).show();
-                                               }
-                                               else
-                                               {
-                                                       var top = ($button.innerHeight() + keyPosition.top) + 'px';
-
-                                                       $dropdown.css({ position: 'absolute', left: left, top: top }).show();
-                                               }
-
-                                               this.core.setCallback('dropdownShown', { dropdown: $dropdown, key: key, button: $button });
-
-                                               this.$dropdown = $dropdown;
-                                       }
-
-
-                                       $(document).one('click.redactor-dropdown', $.proxy(this.dropdown.hide, this));
-                                       this.$editor.one('click.redactor-dropdown', $.proxy(this.dropdown.hide, this));
-                                       $(document).one('keyup.redactor-dropdown', $.proxy(this.dropdown.closeHandler, this));
-
-                                       // disable scroll whan dropdown scroll
-                                       $dropdown.on('mouseover.redactor-dropdown', $.proxy(this.utils.disableBodyScroll, this)).on('mouseout.redactor-dropdown', $.proxy(this.utils.enableBodyScroll, this));
-
-                                       e.stopPropagation();
-                               },
-                               closeHandler: function(e)
-                               {
-                                       if (e.which != this.keyCode.ESC) return;
-
-                                       this.dropdown.hideAll();
-                                       this.$editor.focus();
-                               },
-                               hideAll: function()
-                               {
-                                       this.$toolbar.find('a.dropact').removeClass('redactor-act').removeClass('dropact');
-
-                                       this.utils.enableBodyScroll();
-
-                                       $('.redactor-dropdown-' + this.uuid).hide();
-                                       $('.redactor-dropdown-link-selected').removeClass('redactor-dropdown-link-selected');
-
-
-                                       if (this.$dropdown)
-                                       {
-                                               this.$dropdown.off('.redactor-dropdown');
-                                               this.core.setCallback('dropdownHide', this.$dropdown);
-
-                                               this.$dropdown = false;
-                                       }
-                               },
-                               hide: function (e)
-                               {
-                                       var $dropdown = $(e.target);
-
-                                       if (!$dropdown.hasClass('dropact') && !$dropdown.hasClass('redactor-dropdown-link-inactive'))
-                                       {
-                                               if ($dropdown.hasClass('redactor-dropdown'))
-                                               {
-                                                       $dropdown.removeClass('dropact');
-                                                       $dropdown.off('mouseover mouseout');
-                                               }
-
-                                               this.dropdown.hideAll();
-                                       }
-                               }
-                       };
-               },
-               file: function()
-               {
-                       return {
-                               show: function()
-                               {
-                                       this.modal.load('file', this.lang.get('file'), 700);
-                                       this.upload.init('#redactor-modal-file-upload', this.opts.fileUpload, this.file.insert);
-
-                                       this.selection.save();
-
-                                       this.selection.get();
-                                       var text = this.sel.toString();
-
-                                       $('#redactor-filename').val(text);
-
-                                       this.modal.show();
-                               },
-                               insert: function(json, direct, e)
-                               {
-                                       // error callback
-                                       if (typeof json.error != 'undefined')
-                                       {
-                                               this.modal.close();
-                                               this.selection.restore();
-                                               this.core.setCallback('fileUploadError', json);
-                                               return;
-                                       }
-
-                                       var link;
-                                       if (typeof json == 'string')
-                                       {
-                                               link = json;
-                                       }
-                                       else
-                                       {
-                                               var text = $('#redactor-filename').val();
-                                               if (typeof text == 'undefined' || text === '') text = json.filename;
-
-                                               link = '<a href="' + json.filelink + '" id="filelink-marker">' + text + '</a>';
-                                       }
-
-                                       if (direct)
-                                       {
-                                               this.selection.removeMarkers();
-                                               var marker = this.selection.getMarker();
-                                               this.insert.nodeToCaretPositionFromPoint(e, marker);
-                                       }
-                                       else
-                                       {
-                                               this.modal.close();
-                                       }
-
-                                       this.selection.restore();
-                                       this.buffer.set();
-
-                                       this.insert.htmlWithoutClean(link);
-
-                                       if (typeof json == 'string') return;
-
-                                       var linkmarker = $(this.$editor.find('a#filelink-marker'));
-                                       if (linkmarker.length !== 0)
-                                       {
-                                               linkmarker.removeAttr('id').removeAttr('style');
-                                       }
-                                       else linkmarker = false;
-
-                                       this.core.setCallback('fileUpload', linkmarker, json);
-
-                               }
-                       };
-               },
-               focus: function()
-               {
-                       return {
-                               setStart: function()
-                               {
-                                       this.$editor.focus();
-
-                                       var first = this.$editor.children().first();
-
-                                       if (first.length === 0) return;
-                                       if (first[0].length === 0 || first[0].tagName == 'BR' || first[0].nodeType == 3)
-                                       {
-                                               return;
-                                       }
-
-                                       if (first[0].tagName == 'UL' || first[0].tagName == 'OL')
-                                       {
-                                               var child = first.find('li').first();
-                                               if (!this.utils.isBlock(child) && child.text() === '')
-                                               {
-                                                       // empty inline tag in li
-                                                       this.caret.setStart(child);
-                                                       return;
-                                               }
-                                       }
-
-                                       if (this.opts.linebreaks && !this.utils.isBlockTag(first[0].tagName))
-                                       {
-                                               this.selection.get();
-                                               this.range.setStart(this.$editor[0], 0);
-                                               this.range.setEnd(this.$editor[0], 0);
-                                               this.selection.addRange();
-
-                                               return;
-                                       }
-
-                                       // if node is tag
-                                       this.caret.setStart(first);
-                               },
-                               setEnd: function()
-                               {
-                                       var last = this.$editor.children().last();
-                                       this.$editor.focus();
-
-                                       if (last.size() === 0) return;
-                                       if (this.utils.isEmpty(this.$editor.html()))
-                                       {
-
-                                               this.selection.get();
-                                               this.range.collapse(true);
-                                               this.range.setStartAfter(last[0]);
-                                               this.range.setEnd(last[0], 0);
-                                               this.selection.addRange();
-                                       }
-                                       else
-                                       {
-                                               this.selection.get();
-                                               this.range.selectNodeContents(last[0]);
-                                               this.range.collapse(false);
-                                               this.selection.addRange();
-
-                                       }
-                               },
-                               isFocused: function()
-                               {
-                                       return this.$editor[0] === document.activeElement;
-                               }
-                       };
-               },
-               image: function()
-               {
-                       return {
-                               show: function()
-                               {
-                                       this.modal.load('image', this.lang.get('image'), 700);
-                                       this.upload.init('#redactor-modal-image-droparea', this.opts.imageUpload, this.image.insert);
-
-                                       this.selection.save();
-                                       this.modal.show();
-
-                               },
-                               showEdit: function($image)
-                               {
-                                       var $link = $image.closest('a', this.$editor[0]);
-
-                                       this.modal.load('imageEdit', this.lang.get('edit'), 705);
-
-                                       this.modal.createCancelButton();
-                                       this.image.buttonDelete = this.modal.createDeleteButton(this.lang.get('_delete'));
-                                       this.image.buttonSave = this.modal.createActionButton(this.lang.get('save'));
-
-                                       this.image.buttonDelete.on('click', $.proxy(function()
-                                       {
-                                               this.image.remove($image);
-
-                                       }, this));
-
-                                       this.image.buttonSave.on('click', $.proxy(function()
-                                       {
-                                               this.image.update($image);
-
-                                       }, this));
-
-                                       // hide link's tooltip
-                                       $('.redactor-link-tooltip').remove();
-
-                                       $('#redactor-image-title').val($image.attr('alt'));
-
-                                       if (!this.opts.imageLink) $('.redactor-image-link-option').hide();
-                                       else
-                                       {
-                                               var $redactorImageLink = $('#redactor-image-link');
-
-                                               $redactorImageLink.attr('href', $image.attr('src'));
-                                               if ($link.length !== 0)
-                                               {
-                                                       $redactorImageLink.val($link.attr('href'));
-                                                       if ($link.attr('target') == '_blank') $('#redactor-image-link-blank').prop('checked', true);
-                                               }
-                                       }
-
-                                       if (!this.opts.imagePosition) $('.redactor-image-position-option').hide();
-                                       else
-                                       {
-                                               var floatValue = ($image.css('display') == 'block' && $image.css('float') == 'none') ? 'center' : $image.css('float');
-                                               $('#redactor-image-align').val(floatValue);
-                                       }
-
-                                       this.modal.show();
-                                       $('#redactor-image-title').focus();
-
-                               },
-                               setFloating: function($image)
-                               {
-                                       var floating = $('#redactor-image-align').val();
-
-                                       var imageFloat = '';
-                                       var imageDisplay = '';
-                                       var imageMargin = '';
-
-                                       switch (floating)
-                                       {
-                                               case 'left':
-                                                       imageFloat = 'left';
-                                                       imageMargin = '0 ' + this.opts.imageFloatMargin + ' ' + this.opts.imageFloatMargin + ' 0';
-                                               break;
-                                               case 'right':
-                                                       imageFloat = 'right';
-                                                       imageMargin = '0 0 ' + this.opts.imageFloatMargin + ' ' + this.opts.imageFloatMargin;
-                                               break;
-                                               case 'center':
-                                                       imageDisplay = 'block';
-                                                       imageMargin = 'auto';
-                                               break;
-                                       }
-
-                                       $image.css({ 'float': imageFloat, display: imageDisplay, margin: imageMargin });
-                                       $image.attr('rel', $image.attr('style'));
-                               },
-                               update: function($image)
-                               {
-                                       this.image.hideResize();
-                                       this.buffer.set();
-
-                                       var $link = $image.closest('a', this.$editor[0]);
-
-                                       var title = $('#redactor-image-title').val().replace(/(<([^>]+)>)/ig,"");
-                                       $image.attr('alt', title);
-
-                                       this.image.setFloating($image);
-
-                                       // as link
-                                       var link = $.trim($('#redactor-image-link').val());
-                                       var link = link.replace(/(<([^>]+)>)/ig,"");
-                                       if (link !== '')
-                                       {
-                                               // test url (add protocol)
-                                               var pattern = '((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}';
-                                               var re = new RegExp('^(http|ftp|https)://' + pattern, 'i');
-                                               var re2 = new RegExp('^' + pattern, 'i');
-
-                                               if (link.search(re) == -1 && link.search(re2) === 0 && this.opts.linkProtocol)
-                                               {
-                                                       link = this.opts.linkProtocol + '://' + link;
-                                               }
-
-                                               var target = ($('#redactor-image-link-blank').prop('checked')) ? true : false;
-
-                                               if ($link.length === 0)
-                                               {
-                                                       var a = $('<a href="' + link + '">' + this.utils.getOuterHtml($image) + '</a>');
-                                                       if (target) a.attr('target', '_blank');
-
-                                                       $image.replaceWith(a);
-                                               }
-                                               else
-                                               {
-                                                       $link.attr('href', link);
-                                                       if (target)
-                                                       {
-                                                               $link.attr('target', '_blank');
-                                                       }
-                                                       else
-                                                       {
-                                                               $link.removeAttr('target');
-                                                       }
-                                               }
-                                       }
-                                       else if ($link.length !== 0)
-                                       {
-                                               $link.replaceWith(this.utils.getOuterHtml($image));
-
-                                       }
-
-                                       this.modal.close();
-                                       this.observe.images();
-                                       this.code.sync();
-
-
-                               },
-                               setEditable: function($image)
-                               {
-                                       if (this.opts.imageEditable)
-                                       {
-                                               $image.on('dragstart', $.proxy(this.image.onDrag, this));
-                                       }
-
-                                       var handler = $.proxy(function(e)
-                                       {
-
-                                               this.observe.image = $image;
-
-                                               this.image.resizer = this.image.loadEditableControls($image);
-
-                                               $(document).on('mousedown.redactor-image-resize-hide.' + this.uuid, $.proxy(this.image.hideResize, this));
-
-                                               // resize
-                                               if (!this.opts.imageResizable) return;
-
-                                               this.image.resizer.on('mousedown.redactor touchstart.redactor', $.proxy(function(e)
-                                               {
-                                                       this.image.setResizable(e, $image);
-                                               }, this));
-
-                                       }, this);
-
-
-                                       $image.off('mousedown.redactor').on('mousedown.redactor', $.proxy(this.image.hideResize, this));
-                                       $image.off('click.redactor touchstart.redactor').on('click.redactor touchstart.redactor', handler);
-                               },
-                               setResizable: function(e, $image)
-                               {
-                                       e.preventDefault();
-
-                                   this.image.resizeHandle = {
-                                       x : e.pageX,
-                                       y : e.pageY,
-                                       el : $image,
-                                       ratio: $image.width() / $image.height(),
-                                       h: $image.height()
-                                   };
-
-                                   e = e.originalEvent || e;
-
-                                   if (e.targetTouches)
-                                   {
-                                        this.image.resizeHandle.x = e.targetTouches[0].pageX;
-                                        this.image.resizeHandle.y = e.targetTouches[0].pageY;
-                                   }
-
-                                       this.image.startResize();
-
-
-                               },
-                               startResize: function()
-                               {
-                                       $(document).on('mousemove.redactor-image-resize touchmove.redactor-image-resize', $.proxy(this.image.moveResize, this));
-                                       $(document).on('mouseup.redactor-image-resize touchend.redactor-image-resize', $.proxy(this.image.stopResize, this));
-                               },
-                               moveResize: function(e)
-                               {
-                                       e.preventDefault();
-
-                                       e = e.originalEvent || e;
-
-                                       var height = this.image.resizeHandle.h;
-
-                           if (e.targetTouches) height += (e.targetTouches[0].pageY -  this.image.resizeHandle.y);
-                           else height += (e.pageY -  this.image.resizeHandle.y);
-
-                                       var width = Math.round(height * this.image.resizeHandle.ratio);
-
-                                       if (height < 50 || width < 100) return;
-
-                                       var height = Math.round(this.image.resizeHandle.el.width() / this.image.resizeHandle.ratio);
-
-                                       this.image.resizeHandle.el.attr({width: width, height: height});
-                           this.image.resizeHandle.el.width(width);
-                           this.image.resizeHandle.el.height(height);
-
-                           this.code.sync();
-                               },
-                               stopResize: function()
-                               {
-                                       this.handle = false;
-                                       $(document).off('.redactor-image-resize');
-
-                                       this.image.hideResize();
-                               },
-                               onDrag: function(e)
-                               {
-                                       if (this.$editor.find('#redactor-image-box').length !== 0)
-                                       {
-                                               e.preventDefault();
-                                               return false;
-                                       }
-
-                                       this.$editor.on('drop.redactor-image-inside-drop', $.proxy(function()
-                                       {
-                                               setTimeout($.proxy(this.image.onDrop, this), 1);
-
-                                       }, this));
-                               },
-                               onDrop: function()
-                               {
-                                       this.image.fixImageSourceAfterDrop();
-                                       this.observe.images();
-                                       this.$editor.off('drop.redactor-image-inside-drop');
-                                       this.clean.clearUnverified();
-                                       this.code.sync();
-                               },
-                               fixImageSourceAfterDrop: function()
-                               {
-                                       this.$editor.find('img[data-save-url]').each(function()
-                                       {
-                                               var $el = $(this);
-                                               $el.attr('src', $el.attr('data-save-url'));
-                                               $el.removeAttr('data-save-url');
-                                       });
-                               },
-                               hideResize: function(e)
-                               {
-                                       if (e && $(e.target).closest('#redactor-image-box', this.$editor[0]).length !== 0) return;
-                                       if (e && e.target.tagName == 'IMG')
-                                       {
-                                               var $image = $(e.target);
-                                               $image.attr('data-save-url', $image.attr('src'));
-                                       }
-
-                                       var imageBox = this.$editor.find('#redactor-image-box');
-                                       if (imageBox.length === 0) return;
-
-                                       $('#redactor-image-editter').remove();
-                                       $('#redactor-image-resizer').remove();
-
-                                       imageBox.find('img').css({
-                                               marginTop: imageBox[0].style.marginTop,
-                                               marginBottom: imageBox[0].style.marginBottom,
-                                               marginLeft: imageBox[0].style.marginLeft,
-                                               marginRight: imageBox[0].style.marginRight
-                                       });
-
-                                       imageBox.css('margin', '');
-                                       imageBox.find('img').css('opacity', '');
-                                       imageBox.replaceWith(function()
-                                       {
-                                               return $(this).contents();
-                                       });
-
-                                       $(document).off('mousedown.redactor-image-resize-hide.' + this.uuid);
-
-
-                                       if (typeof this.image.resizeHandle !== 'undefined')
-                                       {
-                                               this.image.resizeHandle.el.attr('rel', this.image.resizeHandle.el.attr('style'));
-                                       }
-
-                                       this.code.sync();
-
-                               },
-                               loadResizableControls: function($image, imageBox)
-                               {
-                                       if (this.opts.imageResizable && !this.utils.isMobile())
-                                       {
-                                               var imageResizer = $('<span id="redactor-image-resizer" data-redactor="verified"></span>');
-
-                                               if (!this.utils.isDesktop())
-                                               {
-                                                       imageResizer.css({ width: '15px', height: '15px' });
-                                               }
-
-                                               imageResizer.attr('contenteditable', false);
-                                               imageBox.append(imageResizer);
-                                               imageBox.append($image);
-
-                                               return imageResizer;
-                                       }
-                                       else
-                                       {
-                                               imageBox.append($image);
-                                               return false;
-                                       }
-                               },
-                               loadEditableControls: function($image)
-                               {
-                                       var imageBox = $('<span id="redactor-image-box" data-redactor="verified">');
-                                       imageBox.css('float', $image.css('float')).attr('contenteditable', false);
-
-                                       if ($image[0].style.margin != 'auto')
-                                       {
-                                               imageBox.css({
-                                                       marginTop: $image[0].style.marginTop,
-                                                       marginBottom: $image[0].style.marginBottom,
-                                                       marginLeft: $image[0].style.marginLeft,
-                                                       marginRight: $image[0].style.marginRight
-                                               });
-
-                                               $image.css('margin', '');
-                                       }
-                                       else
-                                       {
-                                               imageBox.css({ 'display': 'block', 'margin': 'auto' });
-                                       }
-
-                                       $image.css('opacity', '.5').after(imageBox);
-
-
-                                       if (this.opts.imageEditable)
-                                       {
-                                               // editter
-                                               this.image.editter = $('<span id="redactor-image-editter" data-redactor="verified">' + this.lang.get('edit') + '</span>');
-                                               this.image.editter.attr('contenteditable', false);
-                                               this.image.editter.on('click', $.proxy(function()
-                                               {
-                                                       this.image.showEdit($image);
-                                               }, this));
-
-                                               imageBox.append(this.image.editter);
-
-                                               // position correction
-                                               var editerWidth = this.image.editter.innerWidth();
-                                               this.image.editter.css('margin-left', '-' + editerWidth/2 + 'px');
-                                       }
-
-                                       return this.image.loadResizableControls($image, imageBox);
-
-                               },
-                               remove: function(image)
-                               {
-                                       var $image = $(image);
-                                       var $link = $image.closest('a', this.$editor[0]);
-                                       var $figure = $image.closest('figure', this.$editor[0]);
-                                       var $parent = $image.parent();
-                                       if ($('#redactor-image-box').length !== 0)
-                                       {
-                                               $parent = $('#redactor-image-box').parent();
-                                       }
-
-                                       var $next;
-                                       if ($figure.length !== 0)
-                                       {
-                                               $next = $figure.next();
-                                               $figure.remove();
-                                       }
-                                       else if ($link.length !== 0)
-                                       {
-                                               $parent = $link.parent();
-                                               $link.remove();
-                                       }
-                                       else
-                                       {
-                                               $image.remove();
-                                       }
-
-                                       $('#redactor-image-box').remove();
-
-                                       if ($figure.length !== 0)
-                                       {
-                                               this.caret.setStart($next);
-                                       }
-                                       else
-                                       {
-                                               this.caret.setStart($parent);
-                                       }
-
-                                       // delete callback
-                                       this.core.setCallback('imageDelete', $image[0].src, $image);
-
-                                       this.modal.close();
-                                       this.code.sync();
-                               },
-                               insert: function(json, direct, e)
-                               {
-                                       // error callback
-                                       if (typeof json.error != 'undefined')
-                                       {
-                                               this.modal.close();
-                                               this.selection.restore();
-                                               this.core.setCallback('imageUploadError', json);
-                                               return;
-                                       }
-
-                                       var $img;
-                                       if (typeof json == 'string')
-                                       {
-                                               $img = $(json).attr('data-redactor-inserted-image', 'true');
-                                       }
-                                       else
-                                       {
-                                               $img = $('<img>');
-                                               $img.attr('src', json.filelink).attr('data-redactor-inserted-image', 'true');
-                                       }
-
-
-                                       var node = $img;
-                                       var isP = this.utils.isCurrentOrParent('P');
-                                       if (isP)
-                                       {
-                                               // will replace
-                                               node = $('<blockquote />').append($img);
-                                       }
-
-                                       if (direct)
-                                       {
-                                               this.selection.removeMarkers();
-                                               var marker = this.selection.getMarker();
-                                               this.insert.nodeToCaretPositionFromPoint(e, marker);
-                                       }
-                                       else
-                                       {
-                                               this.modal.close();
-                                       }
-
-                                       this.selection.restore();
-                                       this.buffer.set();
-
-                                       this.insert.html(this.utils.getOuterHtml(node), false);
-
-                                       var $image = this.$editor.find('img[data-redactor-inserted-image=true]').removeAttr('data-redactor-inserted-image');
-
-                                       if (isP)
-                                       {
-                                               $image.parent().contents().unwrap().wrap('<p />');
-                                       }
-                                       else if (this.opts.linebreaks)
-                                       {
-                                               if (!this.utils.isEmpty(this.code.get()))
-                                               {
-                                                       $image.before('<br>');
-                                               }
-
-                                               $image.after('<br>');
-                                       }
-
-                                       if (typeof json == 'string') return;
-
-                                       this.core.setCallback('imageUpload', $image, json);
-
-                               }
-                       };
-               },
-               indent: function()
-               {
-                       return {
-                               increase: function()
-                               {
-                                       // focus
-                                       if (!this.utils.browser('msie')) this.$editor.focus();
-
-                                       this.buffer.set();
-                                       this.selection.save();
-
-                                       var block = this.selection.getBlock();
-
-                                       if (block && block.tagName == 'LI')
-                                       {
-                                               this.indent.increaseLists();
-                                       }
-                                       else if (block === false && this.opts.linebreaks)
-                                       {
-                                               this.indent.increaseText();
-                                       }
-                                       else
-                                       {
-                                               this.indent.increaseBlocks();
-                                       }
-
-                                       this.selection.restore();
-                                       this.code.sync();
-                               },
-                               increaseLists: function()
-                               {
-                                       document.execCommand('indent');
-
-                                       this.indent.fixEmptyIndent();
-                                       this.clean.normalizeLists();
-                                       this.clean.clearUnverified();
-                               },
-                               increaseBlocks: function()
-                               {
-                                       $.each(this.selection.getBlocks(), $.proxy(function(i, elem)
-                                       {
-                                               if (elem.tagName === 'TD' || elem.tagName === 'TH') return;
-
-                                               var $el = this.utils.getAlignmentElement(elem);
-
-                                               var left = this.utils.normalize($el.css('margin-left')) + this.opts.indentValue;
-                                               $el.css('margin-left', left + 'px');
-
-                                       }, this));
-                               },
-                               increaseText: function()
-                               {
-                                       var wrapper = this.selection.wrap('div');
-                                       $(wrapper).attr('data-tagblock', 'redactor');
-                                       $(wrapper).css('margin-left', this.opts.indentValue + 'px');
-                               },
-                               decrease: function()
-                               {
-                                       this.buffer.set();
-                                       this.selection.save();
-
-                                       var block = this.selection.getBlock();
-                                       if (block && block.tagName == 'LI')
-                                       {
-                                               this.indent.decreaseLists();
-                                       }
-                                       else
-                                       {
-                                               this.indent.decreaseBlocks();
-                                       }
-
-                                       this.selection.restore();
-                                       this.code.sync();
-                               },
-                               decreaseLists: function()
-                               {
-                                       document.execCommand('outdent');
-
-                                       var current = this.selection.getCurrent();
-                                       var $item = $(current).closest('li', this.$editor[0]);
-
-                                       this.indent.fixEmptyIndent();
-
-                                       if (!this.opts.linebreaks && $item.length === 0)
-                                       {
-                                               document.execCommand('formatblock', false, 'p');
-                                               this.$editor.find('ul, ol, blockquote, p').each($.proxy(this.utils.removeEmpty, this));
-                                       }
-
-                                       this.clean.clearUnverified();
-                               },
-                               decreaseBlocks: function()
-                               {
-                                       $.each(this.selection.getBlocks(), $.proxy(function(i, elem)
-                                       {
-                                               var $el = this.utils.getAlignmentElement(elem);
-                                               var left = this.utils.normalize($el.css('margin-left')) - this.opts.indentValue;
-
-                                               if (left <= 0)
-                                               {
-                                                       if (this.opts.linebreaks && typeof($el.data('tagblock')) !== 'undefined')
-                                                       {
-                                                               $el.replaceWith($el.html() + '<br />');
-                                                       }
-                                                       else
-                                                       {
-                                                               $el.css('margin-left', '');
-                                                               this.utils.removeEmptyAttr($el, 'style');
-                                                       }
-                                               }
-                                               else
-                                               {
-                                                       $el.css('margin-left', left + 'px');
-                                               }
-
-                                       }, this));
-                               },
-                               fixEmptyIndent: function()
-                               {
-                                       var block = this.selection.getBlock();
-
-                                       if (this.range.collapsed && block && block.tagName == 'LI' && this.utils.isEmpty($(block).text()))
-                                       {
-                                               var $block = $(block);
-                                               $block.find('span').not('.redactor-selection-marker').contents().unwrap();
-                                               $block.append('<br>');
-                                       }
-                               }
-                       };
-               },
-               inline: function()
-               {
-                       return {
-                               formatting: function(name)
-                               {
-                                       var type, value;
-
-                                       if (typeof this.formatting[name].style != 'undefined') type = 'style';
-                                       else if (typeof this.formatting[name]['class'] != 'undefined') type = 'class';
-
-                                       if (type) value = this.formatting[name][type];
-
-                                       this.inline.format(this.formatting[name].tag, type, value);
-
-                               },
-                               format: function(tag, type, value)
-                               {
-                                       var current = this.selection.getCurrent();
-                                       if (current && current.tagName === 'TR') return;
-
-                                       // Stop formatting pre and headers
-                                       if (this.utils.isCurrentOrParent('PRE') || this.utils.isCurrentOrParentHeader()) return;
-
-                                       var tags = ['b', 'bold', 'i', 'italic', 'underline', 'strikethrough', 'deleted', 'superscript', 'subscript'];
-                                       var replaced = ['strong', 'strong', 'em', 'em', 'u', 'del', 'del', 'sup', 'sub'];
-
-                                       for (var i = 0; i < tags.length; i++)
-                                       {
-                                               if (tag == tags[i]) tag = replaced[i];
-                                       }
-
-
-                                       if (this.opts.allowedTags)
-                                       {
-                                               if ($.inArray(tag, this.opts.allowedTags) == -1) return;
-                                       }
-                                       else
-                                       {
-                                               if ($.inArray(tag, this.opts.deniedTags) !== -1) return;
-                                       }
-
-                                       this.inline.type = type || false;
-                                       this.inline.value = value || false;
-
-                                       this.buffer.set();
-
-                                       if (!this.utils.browser('msie') && !this.opts.linebreaks)
-                                       {
-                                               this.$editor.focus();
-                                       }
-
-                                       this.selection.get();
-
-                                       if (this.range.collapsed)
-                                       {
-                                               this.inline.formatCollapsed(tag);
-                                       }
-                                       else
-                                       {
-                                               this.inline.formatMultiple(tag);
-                                       }
-                               },
-                               formatCollapsed: function(tag)
-                               {
-                                       var current = this.selection.getCurrent();
-                                       var $parent = $(current).closest(tag + '[data-redactor-tag=' + tag + ']', this.$editor[0]);
-
-                                       // inline there is
-                                       if ($parent.length !== 0 && (this.inline.type != 'style' && $parent[0].tagName != 'SPAN'))
-                                       {
-                                               // remove empty
-                                               if (this.utils.isEmpty($parent.text()))
-                                               {
-                                                       this.caret.setAfter($parent[0]);
-
-                                                       $parent.remove();
-                                                       this.code.sync();
-                                               }
-                                               else if (this.utils.isEndOfElement($parent))
-                                               {
-                                                       this.caret.setAfter($parent[0]);
-                                               }
-
-                                               return;
-                                       }
-
-                                       // create empty inline
-                                       var node = $('<' + tag + '>').attr('data-verified', 'redactor').attr('data-redactor-tag', tag);
-                                       node.html(this.opts.invisibleSpace);
-
-                                       node = this.inline.setFormat(node);
-
-                                       var node = this.insert.node(node);
-                                       this.caret.setEnd(node);
-
-                                       this.code.sync();
-                               },
-                               formatMultiple: function(tag)
-                               {
-                                       this.inline.formatConvert(tag);
-
-                                       this.selection.save();
-                                       document.execCommand('strikethrough');
-
-                                       this.$editor.find('strike').each($.proxy(function(i,s)
-                                       {
-                                               var $el = $(s);
-
-                                               this.inline.formatRemoveSameChildren($el, tag);
-
-                                               var $span;
-                                               if (this.inline.type)
-                                               {
-                                                       $span = $('<span>').attr('data-redactor-tag', tag).attr('data-verified', 'redactor');
-                                                       $span = this.inline.setFormat($span);
-                                               }
-                                               else
-                                               {
-                                                       $span = $('<' + tag + '>').attr('data-redactor-tag', tag).attr('data-verified', 'redactor');
-                                               }
-
-                                               $el.replaceWith($span.html($el.contents()));
-                                               var $parent = $span.parent();
-
-                                               // remove U tag if selected link + node
-                                               if ($span[0].tagName === 'A' && $parent && $parent[0].tagName === 'U')
-                                               {
-                                                       $span.parent().replaceWith($span);
-                                               }
-
-                                               if (tag == 'span')
-                                               {
-                                                       if ($parent && $parent[0].tagName === 'SPAN' && this.inline.type === 'style')
-                                                       {
-                                                               var arr = this.inline.value.split(';');
-
-                                                               for (var z = 0; z < arr.length; z++)
-                                                               {
-                                                                       if (arr[z] === '') return;
-                                                                       var style = arr[z].split(':');
-                                                                       $parent.css(style[0], '');
-
-                                                                       if (this.utils.removeEmptyAttr($parent, 'style'))
-                                                                       {
-                                                                               $parent.replaceWith($parent.contents());
-                                                                       }
-
-                                                               }
-
-                                                       }
-                                               }
-
-                                       }, this));
-
-                                       // clear text decoration
-                                       if (tag != 'span')
-                                       {
-                                               this.$editor.find(this.opts.inlineTags.join(', ')).each($.proxy(function(i,s)
-                                               {
-                                                       var $el = $(s);
-
-
-                                                       if (s.tagName === 'U' && s.attributes.length === 0)
-                                                       {
-                                                               $el.replaceWith($el.contents());
-                                                               return;
-                                                       }
-
-                                                       var property = $el.css('text-decoration');
-                                                       if (property === 'line-through')
-                                                       {
-                                                               $el.css('text-decoration', '');
-                                                               this.utils.removeEmptyAttr($el, 'style');
-                                                       }
-                                               }, this));
-                                       }
-
-                                       if (tag != 'del')
-                                       {
-                                               var _this = this;
-                                               this.$editor.find('inline').each(function(i,s)
-                                               {
-                                                       _this.utils.replaceToTag(s, 'del');
-                                               });
-                                       }
-
-                                       if (tag != 'u')
-                                       {
-                                               var _this = this;
-                                               this.$editor.find('unline').each(function(i,s)
-                                               {
-                                                       _this.utils.replaceToTag(s, 'u');
-                                               });
-                                       }
-
-                                       this.selection.restore();
-                                       this.code.sync();
-
-                               },
-                               formatRemoveSameChildren: function($el, tag)
-                               {
-                                       var self = this;
-                                       $el.children(tag).each(function()
-                                       {
-                                               var $child = $(this);
-
-                                               if (!$child.hasClass('redactor-selection-marker'))
-                                               {
-                                                       if (self.inline.type == 'style')
-                                                       {
-                                                               var arr = self.inline.value.split(';');
-
-                                                               for (var z = 0; z < arr.length; z++)
-                                                               {
-                                                                       if (arr[z] === '') return;
-
-                                                                       var style = arr[z].split(':');
-                                                                       $child.css(style[0], '');
-
-                                                                       if (self.utils.removeEmptyAttr($child , 'style'))
-                                                                       {
-                                                                               $child.replaceWith($child.contents());
-                                                                       }
-
-                                                               }
-                                                       }
-                                                       else
-                                                       {
-                                                               $child.contents().unwrap();
-                                                       }
-                                               }
-
-                                       });
-                               },
-                               formatConvert: function(tag)
-                               {
-                                       this.selection.save();
-
-                                       var find = '';
-                                       if (this.inline.type == 'class') find = '[data-redactor-class=' + this.inline.value + ']';
-                                       else if (this.inline.type == 'style')
-                                       {
-                                               find = '[data-redactor-style="' + this.inline.value + '"]';
-                                       }
-
-                                       var self = this;
-                                       if (tag != 'del')
-                                       {
-                                               this.$editor.find('del').each(function(i,s)
-                                               {
-                                                       self.utils.replaceToTag(s, 'inline');
-                                               });
-                                       }
-
-                                       if (tag != 'u')
-                                       {
-                                               this.$editor.find('u').each(function(i,s)
-                                               {
-                                                       self.utils.replaceToTag(s, 'unline');
-                                               });
-                                       }
-
-                                       if (tag != 'span')
-                                       {
-                                               this.$editor.find(tag).each(function()
-                                               {
-                                                       var $el = $(this);
-                                                       $el.replaceWith($('<strike />').html($el.contents()));
-
-                                               });
-                                       }
-
-                                       this.$editor.find('[data-redactor-tag="' + tag + '"]' + find).each(function()
-                                       {
-                                               if (find === '' && tag == 'span' && this.tagName.toLowerCase() == tag) return;
-
-                                               var $el = $(this);
-                                               $el.replaceWith($('<strike />').html($el.contents()));
-
-                                       });
-
-                                       this.selection.restore();
-                               },
-                               setFormat: function(node)
-                               {
-                                       switch (this.inline.type)
-                                       {
-                                               case 'class':
-
-                                                       if (node.hasClass(this.inline.value))
-                                                       {
-                                                               node.removeClass(this.inline.value);
-                                                               node.removeAttr('data-redactor-class');
-                                                       }
-                                                       else
-                                                       {
-                                                               node.addClass(this.inline.value);
-                                                               node.attr('data-redactor-class', this.inline.value);
-                                                       }
-
-
-                                               break;
-                                               case 'style':
-
-                                                       node[0].style.cssText = this.inline.value;
-                                                       node.attr('data-redactor-style', this.inline.value);
-
-                                               break;
-                                       }
-
-                                       return node;
-                               },
-                               removeStyle: function()
-                               {
-                                       this.buffer.set();
-                                       var current = this.selection.getCurrent();
-                                       var nodes = this.selection.getInlines();
-
-                                       this.selection.save();
-
-                                       if (current && current.tagName === 'SPAN')
-                                       {
-                                               var $s = $(current);
-
-                                               $s.removeAttr('style');
-                                               if ($s[0].attributes.length === 0)
-                                               {
-                                                       $s.replaceWith($s.contents());
-                                               }
-                                       }
-
-                                       $.each(nodes, $.proxy(function(i,s)
-                                       {
-                                               var $s = $(s);
-                                               if ($.inArray(s.tagName.toLowerCase(), this.opts.inlineTags) != -1 && !$s.hasClass('redactor-selection-marker'))
-                                               {
-                                                       $s.removeAttr('style');
-                                                       if ($s[0].attributes.length === 0)
-                                                       {
-                                                               $s.replaceWith($s.contents());
-                                                       }
-                                               }
-                                       }, this));
-
-                                       this.selection.restore();
-                                       this.code.sync();
-
-                               },
-                               removeStyleRule: function(name)
-                               {
-                                       this.buffer.set();
-                                       var parent = this.selection.getParent();
-                                       var nodes = this.selection.getInlines();
-
-                                       this.selection.save();
-
-                                       if (parent && parent.tagName === 'SPAN')
-                                       {
-                                               var $s = $(parent);
-
-                                               $s.css(name, '');
-                                               this.utils.removeEmptyAttr($s, 'style');
-                                               if ($s[0].attributes.length === 0)
-                                               {
-                                                       $s.replaceWith($s.contents());
-                                               }
-                                       }
-
-                                       $.each(nodes, $.proxy(function(i,s)
-                                       {
-                                               var $s = $(s);
-                                               if ($.inArray(s.tagName.toLowerCase(), this.opts.inlineTags) != -1 && !$s.hasClass('redactor-selection-marker'))
-                                               {
-                                                       $s.css(name, '');
-                                                       this.utils.removeEmptyAttr($s, 'style');
-                                                       if ($s[0].attributes.length === 0)
-                                                       {
-                                                               $s.replaceWith($s.contents());
-                                                       }
-                                               }
-                                       }, this));
-
-                                       this.selection.restore();
-                                       this.code.sync();
-                               },
-                               removeFormat: function()
-                               {
-                                       this.buffer.set();
-                                       var current = this.selection.getCurrent();
-
-                                       this.selection.save();
-
-                                       document.execCommand('removeFormat');
-
-                                       if (current && current.tagName === 'SPAN')
-                                       {
-                                               $(current).replaceWith($(current).contents());
-                                       }
-
-
-                                       $.each(this.selection.getNodes(), $.proxy(function(i,s)
-                                       {
-                                               var $s = $(s);
-                                               if ($.inArray(s.tagName.toLowerCase(), this.opts.inlineTags) != -1 && !$s.hasClass('redactor-selection-marker'))
-                                               {
-                                                       $s.replaceWith($s.contents());
-                                               }
-                                       }, this));
-
-                                       this.selection.restore();
-                                       this.code.sync();
-
-                               },
-                               toggleClass: function(className)
-                               {
-                                       this.inline.format('span', 'class', className);
-                               },
-                               toggleStyle: function(value)
-                               {
-                                       this.inline.format('span', 'style', value);
-                               }
-                       };
-               },
-               insert: function()
-               {
-                       return {
-                               set: function(html, clean)
-                               {
-                                       this.placeholder.remove();
-
-                                       html = this.clean.setVerified(html);
-
-                                       if (typeof clean == 'undefined')
-                                       {
-                                               html = this.clean.onPaste(html, false);
-                                       }
-
-                                       this.$editor.html(html);
-                                       this.selection.remove();
-                                       this.focus.setEnd();
-                                       this.clean.normalizeLists();
-                                       this.code.sync();
-                                       this.observe.load();
-
-                                       if (typeof clean == 'undefined')
-                                       {
-                                               setTimeout($.proxy(this.clean.clearUnverified, this), 10);
-                                       }
-                               },
-                               text: function(text)
-                               {
-                                       this.placeholder.remove();
-
-                                       text = text.toString();
-                                       text = $.trim(text);
-                                       text = this.clean.getPlainText(text, false);
-
-                                       this.$editor.focus();
-
-                                       if (this.utils.browser('msie'))
-                                       {
-                                               this.insert.htmlIe(text);
-                                       }
-                                       else
-                                       {
-                                               this.selection.get();
-
-                                               this.range.deleteContents();
-                                               var el = document.createElement("div");
-                                               el.innerHTML = text;
-                                               var frag = document.createDocumentFragment(), node, lastNode;
-                                               while ((node = el.firstChild))
-                                               {
-                                                       lastNode = frag.appendChild(node);
-                                               }
-
-                                               this.range.insertNode(frag);
-
-                                               if (lastNode)
-                                               {
-                                                       var range = this.range.cloneRange();
-                                                       range.setStartAfter(lastNode);
-                                                       range.collapse(true);
-                                                       this.sel.removeAllRanges();
-                                                       this.sel.addRange(range);
-                                               }
-                                       }
-
-                                       this.code.sync();
-                                       this.clean.clearUnverified();
-                               },
-                               htmlWithoutClean: function(html)
-                               {
-                                       this.insert.html(html, false);
-                               },
-                               html: function(html, clean)
-                               {
-                                       this.placeholder.remove();
-
-                                       if (typeof clean == 'undefined') clean = true;
-
-                                       if (!this.opts.linebreaks)
-                                       {
-                                               this.$editor.focus();
-                                       }
-
-                                       html = this.clean.setVerified(html);
-
-                                       if (clean)
-                                       {
-                                               html = this.clean.onPaste(html);
-                                       }
-
-                                       if (this.utils.browser('msie'))
-                                       {
-                                               this.insert.htmlIe(html);
-                                       }
-                                       else
-                                       {
-                                               if (this.clean.singleLine) this.insert.execHtml(html);
-                                               else document.execCommand('insertHTML', false, html);
-
-                                               this.insert.htmlFixMozilla();
-
-                                       }
-
-                                       this.clean.normalizeLists();
-
-                                       // remove empty paragraphs finaly
-                                       if (!this.opts.linebreaks)
-                                       {
-                                               this.$editor.find('p').each($.proxy(this.utils.removeEmpty, this));
-                                       }
-
-                                       this.code.sync();
-                                       this.observe.load();
-
-                                       if (clean)
-                                       {
-                                               this.clean.clearUnverified();
-                                       }
-
-                               },
-                               htmlFixMozilla: function()
-                               {
-                                       // FF inserts empty p when content was selected dblclick
-                                       if (!this.utils.browser('mozilla')) return;
-
-                                       var $next = $(this.selection.getBlock()).next();
-                                       if ($next.length > 0 && $next[0].tagName == 'P' && $next.html() === '')
-                                       {
-                                               $next.remove();
-                                       }
-
-                               },
-                               htmlIe: function(html)
-                               {
-                                       if (this.utils.isIe11())
-                                       {
-                                               var parent = this.utils.isCurrentOrParent('P');
-                                               var $html = $('<div>').append(html);
-                                               var blocksMatch = $html.contents().is('p, :header, dl, ul, ol, div, table, td, blockquote, pre, address, section, header, footer, aside, article');
-
-                                               if (parent && blocksMatch) this.insert.ie11FixInserting(parent, html);
-                                               else this.insert.ie11PasteFrag(html);
-
-                                               return;
-                                       }
-
-                                       document.selection.createRange().pasteHTML(html);
-
-                               },
-                               execHtml: function(html)
-                               {
-                                       html = this.clean.setVerified(html);
-
-                                       this.selection.get();
-
-                                       this.range.deleteContents();
-
-                                       var el = document.createElement('div');
-                                       el.innerHTML = html;
-
-                                       var frag = document.createDocumentFragment(), node, lastNode;
-                                       while ((node = el.firstChild))
-                                       {
-                                               lastNode = frag.appendChild(node);
-                                       }
-
-                                       this.range.insertNode(frag);
-
-                                       this.range.collapse(true);
-                                       this.caret.setAfter(lastNode);
-
-                               },
-                               node: function(node, deleteContents)
-                               {
-                                       node = node[0] || node;
-
-                                       var offset = this.caret.getOffset();
-                                       var html = this.utils.getOuterHtml(node);
-                                       html = this.clean.setVerified(html);
-
-                                       if (html.match(/</g) !== null)
-                                       {
-                                               node = $(html)[0];
-                                       }
-
-                                       this.selection.get();
-
-                                       if (deleteContents !== false)
-                                       {
-                                               this.range.deleteContents();
-                                       }
-
-                                       this.range.insertNode(node);
-                                       this.range.collapse(false);
-                                       this.selection.addRange();
-
-                                       this.caret.setOffset(offset);
-
-                                       return node;
-                               },
-                               nodeToPoint: function(node, x, y)
-                               {
-                                       node = node[0] || node;
-
-                                       this.selection.get();
-
-                                       var range;
-                                       if (document.caretPositionFromPoint)
-                                       {
-                                           var pos = document.caretPositionFromPoint(x, y);
-
-                                           this.range.setStart(pos.offsetNode, pos.offset);
-                                           this.range.collapse(true);
-                                           this.range.insertNode(node);
-                                       }
-                                       else if (document.caretRangeFromPoint)
-                                       {
-                                           range = document.caretRangeFromPoint(x, y);
-                                           range.insertNode(node);
-                                       }
-                                       else if (typeof document.body.createTextRange != "undefined")
-                                       {
-                                       range = document.body.createTextRange();
-                                       range.moveToPoint(x, y);
-                                       var endRange = range.duplicate();
-                                       endRange.moveToPoint(x, y);
-                                       range.setEndPoint("EndToEnd", endRange);
-                                       range.select();
-                                       }
-                               },
-                               nodeToCaretPositionFromPoint: function(e, node)
-                               {
-                                       node = node[0] || node;
-
-                                       var range;
-                                       var x = e.clientX, y = e.clientY;
-                                       if (document.caretPositionFromPoint)
-                                       {
-                                           var pos = document.caretPositionFromPoint(x, y);
-                                           var sel = document.getSelection();
-                                           range = sel.getRangeAt(0);
-                                           range.setStart(pos.offsetNode, pos.offset);
-                                           range.collapse(true);
-                                           range.insertNode(node);
-                                       }
-                                       else if (document.caretRangeFromPoint)
-                                       {
-                                           range = document.caretRangeFromPoint(x, y);
-                                           range.insertNode(node);
-                                       }
-                                       else if (typeof document.body.createTextRange != "undefined")
-                                       {
-                                       range = document.body.createTextRange();
-                                       range.moveToPoint(x, y);
-                                       var endRange = range.duplicate();
-                                       endRange.moveToPoint(x, y);
-                                       range.setEndPoint("EndToEnd", endRange);
-                                       range.select();
-                                       }
-
-                               },
-                               ie11FixInserting: function(parent, html)
-                               {
-                                       var node = document.createElement('span');
-                                       node.className = 'redactor-ie-paste';
-                                       this.insert.node(node);
-
-                                       var parHtml = $(parent).html();
-
-                                       parHtml = '<p>' + parHtml.replace(/<span class="redactor-ie-paste"><\/span>/gi, '</p>' + html + '<p>') + '</p>';
-                                       parHtml = parHtml.replace(/<p><\/p>/gi, '');
-                                       $(parent).replaceWith(parHtml);
-                               },
-                               ie11PasteFrag: function(html)
-                               {
-                                       this.selection.get();
-                                       this.range.deleteContents();
-
-                                       var el = document.createElement("div");
-                                       el.innerHTML = html;
-
-                                       var frag = document.createDocumentFragment(), node, lastNode;
-                                       while ((node = el.firstChild))
-                                       {
-                                               lastNode = frag.appendChild(node);
-                                       }
-
-                                       this.range.insertNode(frag);
-                                       this.range.collapse(false);
-                                       this.selection.addRange();
-                               }
-                       };
-               },
-               keydown: function()
-               {
-                       return {
-                               init: function(e)
-                               {
-                                       if (this.rtePaste) return;
-
-                                       var key = e.which;
-                                       var arrow = (key >= 37 && key <= 40);
-
-                                       this.keydown.ctrl = e.ctrlKey || e.metaKey;
-                                       this.keydown.current = this.selection.getCurrent();
-                                       this.keydown.parent = this.selection.getParent();
-                                       this.keydown.block = this.selection.getBlock();
-
-                               // detect tags
-                                       this.keydown.pre = this.utils.isTag(this.keydown.current, 'pre');
-                                       this.keydown.blockquote = this.utils.isTag(this.keydown.current, 'blockquote');
-                                       this.keydown.figcaption = this.utils.isTag(this.keydown.current, 'figcaption');
-
-                                       // shortcuts setup
-                                       this.shortcuts.init(e, key);
-
-                                       if (this.utils.isDesktop())
-                                       {
-                                               this.keydown.checkEvents(arrow, key);
-                                               this.keydown.setupBuffer(e, key);
-                                       }
-
-                                       this.keydown.addArrowsEvent(arrow);
-                                       this.keydown.setupSelectAll(e, key);
-
-                                       // callback
-                                       var keydownStop = this.core.setCallback('keydown', e);
-                                       if (keydownStop === false)
-                                       {
-                                               e.preventDefault();
-                                               return false;
-                                       }
-
-                                       // ie and ff exit from table
-                                       if (this.opts.enterKey && (this.utils.browser('msie') || this.utils.browser('mozilla')) && (key === this.keyCode.DOWN || key === this.keyCode.RIGHT))
-                                       {
-                                               var isEndOfTable = false;
-                                               var $table = false;
-                                               if (this.keydown.block && this.keydown.block.tagName === 'TD')
-                                               {
-                                                       $table = $(this.keydown.block).closest('table', this.$editor[0]);
-                                               }
-
-                                               if ($table && $table.find('td').last()[0] === this.keydown.block)
-                                               {
-                                                       isEndOfTable = true;
-                                               }
-
-                                               if (this.utils.isEndOfElement() && isEndOfTable)
-                                               {
-                                                       var node = $(this.opts.emptyHtml);
-                                                       $table.after(node);
-                                                       this.caret.setStart(node);
-                                               }
-                                       }
-
-                                       // down
-                                       if (this.opts.enterKey && key === this.keyCode.DOWN)
-                                       {
-                                               this.keydown.onArrowDown();
-                                       }
-
-                                       // turn off enter key
-                                       if (!this.opts.enterKey && key === this.keyCode.ENTER)
-                                       {
-                                               e.preventDefault();
-                                               // remove selected
-                                               if (!this.range.collapsed) this.range.deleteContents();
-                                               return;
-                                       }
-
-                                       // on enter
-                                       if (key == this.keyCode.ENTER && !e.shiftKey && !e.ctrlKey && !e.metaKey)
-                                       {
-                                               var stop = this.core.setCallback('enter', e);
-                                               if (stop === false)
-                                               {
-                                                       e.preventDefault();
-                                                       return false;
-                                               }
-
-                                               if (this.keydown.blockquote && this.keydown.exitFromBlockquote(e) === true)
-                                               {
-                                                       return false;
-                                               }
-
-                                               var current, $next;
-                                               if (this.keydown.pre)
-                                               {
-                                                       return this.keydown.insertNewLine(e);
-                                               }
-                                               else if (this.keydown.blockquote || this.keydown.figcaption)
-                                               {
-                                                       current = this.selection.getCurrent();
-                                                       $next = $(current).next();
-
-                                                       if ($next.length !== 0 && $next[0].tagName == 'BR')
-                                                       {
-                                                               return this.keydown.insertBreakLine(e);
-                                                       }
-                                                       else if (this.utils.isEndOfElement() && (current && current != 'SPAN'))
-                                                       {
-                                                               return this.keydown.insertDblBreakLine(e);
-                                                       }
-                                                       else
-                                                       {
-                                                               return this.keydown.insertBreakLine(e);
-                                                       }
-                                               }
-                                               else if (this.opts.linebreaks && !this.keydown.block)
-                                               {
-                                                       current = this.selection.getCurrent();
-                                                       $next = $(this.keydown.current).next();
-
-                                                       if ($next.length !== 0 && $next[0].tagName == 'BR')
-                                                       {
-                                                               return this.keydown.insertBreakLine(e);
-                                                       }
-                                                       else if (current !== false && $(current).hasClass('redactor-invisible-space'))
-                                                       {
-                                                               this.caret.setAfter(current);
-                                                               $(current).contents().unwrap();
-
-                                                               return this.keydown.insertDblBreakLine(e);
-                                                       }
-                                                       else
-                                                       {
-                                                               if (this.utils.isEndOfEditor())
-                                                               {
-                                                                       return this.keydown.insertDblBreakLine(e);
-                                                               }
-                                                               else if ($next.length === 0 && current === false && typeof $next.context != 'undefined')
-                                                               {
-                                                                       return this.keydown.insertBreakLine(e);
-                                                               }
-
-                                                               return this.keydown.insertBreakLine(e);
-                                                       }
-
-                                               }
-                                               else if (this.opts.linebreaks && this.keydown.block)
-                                               {
-                                                       setTimeout($.proxy(this.keydown.replaceDivToBreakLine, this), 1);
-                                               }
-                                               // paragraphs
-                                               else if (!this.opts.linebreaks && this.keydown.block)
-                                               {
-                                                       setTimeout($.proxy(this.keydown.replaceDivToParagraph, this), 1);
-
-                                                       if (this.keydown.block.tagName === 'LI')
-                                                       {
-                                                               current = this.selection.getCurrent();
-                                                               var $parent = $(current).closest('li', this.$editor[0]);
-                                                               var $list = $parent.closest('ul,ol', this.$editor[0]);
-
-                                                               if ($parent.length !== 0 && this.utils.isEmpty($parent.html()) && $list.next().length === 0 && this.utils.isEmpty($list.find("li").last().html()))
-                                                               {
-                                                                       $list.find("li").last().remove();
-
-                                                                       var node = $(this.opts.emptyHtml);
-                                                                       $list.after(node);
-                                                                       this.caret.setStart(node);
-
-                                                                       return false;
-                                                               }
-                                                       }
-                                               }
-                                               else if (!this.opts.linebreaks && !this.keydown.block)
-                                               {
-                                                       return this.keydown.insertParagraph(e);
-                                               }
-                                       }
-
-                                       // Shift+Enter or Ctrl+Enter
-                                       if (key === this.keyCode.ENTER && (e.ctrlKey || e.shiftKey))
-                                       {
-                                               return this.keydown.onShiftEnter(e);
-                                       }
-
-
-                                       // tab or cmd + [
-                                       if (key === this.keyCode.TAB || e.metaKey && key === 221 || e.metaKey && key === 219)
-                                       {
-                                               return this.keydown.onTab(e, key);
-                                       }
-
-                                       // image delete and backspace
-                                       if (key === this.keyCode.BACKSPACE || key === this.keyCode.DELETE)
-                                       {
-                                               var nodes = this.selection.getNodes();
-
-                                               if (nodes)
-                                               {
-                                                       var len = nodes.length;
-                                                       var last;
-                                                       for (var i = 0; i < len; i++)
-                                                       {
-                                                               var children = $(nodes[i]).children('img');
-                                                               if (children.length !== 0)
-                                                               {
-                                                                       var self = this;
-                                                                       $.each(children, function(z,s)
-                                                                       {
-                                                                               var $s = $(s);
-                                                                               if ($s.css('float') != 'none') return;
-
-                                                                               // image delete callback
-                                                                               self.core.setCallback('imageDelete', s.src, $s);
-                                                                               last = s;
-                                                                       });
-                                                               }
-                                                               else if (nodes[i].tagName == 'IMG')
-                                                               {
-                                                                       if (last != nodes[i])
-                                                                       {
-                                                                               // image delete callback
-                                                                               this.core.setCallback('imageDelete', nodes[i].src, $(nodes[i]));
-                                                                               last = nodes[i];
-                                                                       }
-                                                               }
-                                                       }
-                                               }
-                                       }
-
-                                       // backspace
-                                       if (key === this.keyCode.BACKSPACE)
-                                       {
-                                               // backspace as outdent
-                                               var block = this.selection.getBlock();
-                                               var indented = ($(block).css('margin-left') !== '0px');
-                                               if (block && indented && this.range.collapsed && this.utils.isStartOfElement())
-                                               {
-                                                       this.indent.decrease();
-                                                       e.preventDefault();
-                                                       return;
-                                               }
-
-                                               // remove hr in FF
-                                               if (this.utils.browser('mozilla'))
-                                               {
-                                                       var prev = this.selection.getPrev();
-                                                       var prev2 = $(prev).prev()[0];
-                                                       if (prev && prev.tagName === 'HR') $(prev).remove();
-                                                       if (prev2 && prev2.tagName === 'HR') $(prev2).remove();
-                                               }
-
-                                               this.keydown.removeInvisibleSpace();
-                                               this.keydown.removeEmptyListInTable(e);
-                                       }
-
-                                       this.code.sync();
-                               },
-                               checkEvents: function(arrow, key)
-                               {
-                                       if (!arrow && (this.core.getEvent() == 'click' || this.core.getEvent() == 'arrow'))
-                                       {
-                                               this.core.addEvent(false);
-
-                                               if (this.keydown.checkKeyEvents(key))
-                                               {
-                                                       this.buffer.set();
-                                               }
-                                       }
-                               },
-                               checkKeyEvents: function(key)
-                               {
-                                       var k = this.keyCode;
-                                       var keys = [k.BACKSPACE, k.DELETE, k.ENTER, k.ESC, k.TAB, k.CTRL, k.META, k.ALT, k.SHIFT];
-
-                                       return ($.inArray(key, keys) == -1) ? true : false;
-
-                               },
-                               addArrowsEvent: function(arrow)
-                               {
-                                       if (!arrow) return;
-
-                                       if ((this.core.getEvent() == 'click' || this.core.getEvent() == 'arrow'))
-                                       {
-                                               this.core.addEvent(false);
-                                               return;
-                                       }
-
-                                   this.core.addEvent('arrow');
-                               },
-                               setupBuffer: function(e, key)
-                               {
-                                       if (this.keydown.ctrl && key === 90 && !e.shiftKey && !e.altKey && this.opts.buffer.length) // z key
-                                       {
-                                               e.preventDefault();
-                                               this.buffer.undo();
-                                               return;
-                                       }
-                                       // undo
-                                       else if (this.keydown.ctrl && key === 90 && e.shiftKey && !e.altKey && this.opts.rebuffer.length !== 0)
-                                       {
-                                               e.preventDefault();
-                                               this.buffer.redo();
-                                               return;
-                                       }
-                                       else if (!this.keydown.ctrl)
-                                       {
-                                               if (key == this.keyCode.BACKSPACE || key == this.keyCode.DELETE || (key == this.keyCode.ENTER && !e.ctrlKey && !e.shiftKey))
-                                               {
-                                                       this.buffer.set();
-                                               }
-                                       }
-                               },
-                               setupSelectAll: function(e, key)
-                               {
-                                       if (this.keydown.ctrl && key === 65)
-                                       {
-                                               this.utils.enableSelectAll();
-                                       }
-                                       else if (key != this.keyCode.LEFT_WIN && !this.keydown.ctrl)
-                                       {
-                                               this.utils.disableSelectAll();
-                                       }
-                               },
-                               onArrowDown: function()
-                               {
-                                       var tags = [this.keydown.blockquote, this.keydown.pre, this.keydown.figcaption];
-
-                                       for (var i = 0; i < tags.length; i++)
-                                       {
-                                               if (tags[i])
-                                               {
-                                                       this.keydown.insertAfterLastElement(tags[i]);
-                                                       return false;
-                                               }
-                                       }
-                               },
-                               onShiftEnter: function(e)
-                               {
-                                       this.buffer.set();
-
-                                       if (this.utils.isEndOfElement())
-                                       {
-                                               return this.keydown.insertDblBreakLine(e);
-                                       }
-
-                                       return this.keydown.insertBreakLine(e);
-                               },
-                               onTab: function(e, key)
-                               {
-                                       if (!this.opts.tabKey) return true;
-                                       if (this.utils.isEmpty(this.code.get()) && this.opts.tabAsSpaces === false) return true;
-
-                                       e.preventDefault();
-
-                                       var node;
-                                       if (this.keydown.pre && !e.shiftKey)
-                                       {
-                                               node = (this.opts.preSpaces) ? document.createTextNode(Array(this.opts.preSpaces + 1).join('\u00a0')) : document.createTextNode('\t');
-                                               this.insert.node(node);
-                                               this.code.sync();
-                                       }
-                                       else if (this.opts.tabAsSpaces !== false)
-                                       {
-                                               node = document.createTextNode(Array(this.opts.tabAsSpaces + 1).join('\u00a0'));
-                                               this.insert.node(node);
-                                               this.code.sync();
-                                       }
-                                       else
-                                       {
-                                               if (e.metaKey && key === 219) this.indent.decrease();
-                                               else if (e.metaKey && key === 221) this.indent.increase();
-                                               else if (!e.shiftKey) this.indent.increase();
-                                               else this.indent.decrease();
-                                       }
-
-                                       return false;
-                               },
-                               replaceDivToBreakLine: function()
-                               {
-                                       var blockElem = this.selection.getBlock();
-                                       var blockHtml = blockElem.innerHTML.replace(/<br\s?\/?>/gi, '');
-                                       if ((blockElem.tagName === 'DIV' || blockElem.tagName === 'P') && blockHtml === '' && !$(blockElem).hasClass('redactor-editor'))
-                                       {
-                                               var br = document.createElement('br');
-
-                                               $(blockElem).replaceWith(br);
-                                               this.caret.setBefore(br);
-
-                                               this.code.sync();
-
-                                               return false;
-                                       }
-                               },
-                               replaceDivToParagraph: function()
-                               {
-                                       var blockElem = this.selection.getBlock();
-                                       var blockHtml = blockElem.innerHTML.replace(/<br\s?\/?>/gi, '');
-                                       if (blockElem.tagName === 'DIV' && this.utils.isEmpty(blockHtml) && !$(blockElem).hasClass('redactor-editor'))
-                                       {
-                                               var p = document.createElement('p');
-                                               p.innerHTML = this.opts.invisibleSpace;
-
-                                               $(blockElem).replaceWith(p);
-                                               this.caret.setStart(p);
-
-                                               this.code.sync();
-
-                                               return false;
-                                       }
-                                       else if (this.opts.cleanStyleOnEnter && blockElem.tagName == 'P')
-                                       {
-                                               $(blockElem).removeAttr('class').removeAttr('style');
-                                       }
-                               },
-                               insertParagraph: function(e)
-                               {
-                                       e.preventDefault();
-
-                                       this.selection.get();
-
-                                       var p = document.createElement('p');
-                                       p.innerHTML = this.opts.invisibleSpace;
-
-                                       this.range.deleteContents();
-                                       this.range.insertNode(p);
-
-                                       this.caret.setStart(p);
-
-                                       this.code.sync();
-
-                                       return false;
-                               },
-                               exitFromBlockquote: function(e)
-                               {
-                                       if (!this.utils.isEndOfElement()) return;
-
-                                       var tmp = $.trim($(this.keydown.block).html());
-                                       if (tmp.search(/(<br\s?\/?>){2}$/i) != -1)
-                                       {
-                                               e.preventDefault();
-
-                                               if (this.opts.linebreaks)
-                                               {
-                                                       var br = document.createElement('br');
-                                                       $(this.keydown.blockquote).after(br);
-
-                                                       this.caret.setBefore(br);
-                                                       $(this.keydown.block).html(tmp.replace(/<br\s?\/?>$/i, ''));
-                                               }
-                                               else
-                                               {
-                                                       var node = $(this.opts.emptyHtml);
-                                                       $(this.keydown.blockquote).after(node);
-                                                       this.caret.setStart(node);
-                                               }
-
-                                               return true;
-
-                                       }
-
-                                       return;
-
-                               },
-                               insertAfterLastElement: function(element)
-                               {
-                                       if (!this.utils.isEndOfElement()) return;
-
-                                       this.buffer.set();
-
-                                       if (this.opts.linebreaks)
-                                       {
-                                               var contents = $('<div>').append($.trim(this.$editor.html())).contents();
-                                               var last = contents.last()[0];
-                                               if (last.tagName == 'SPAN' && last.innerHTML === '')
-                                               {
-                                                       last = contents.prev()[0];
-                                               }
-
-                                               if (this.utils.getOuterHtml(last) != this.utils.getOuterHtml(element)) return;
-
-                                               var br = document.createElement('br');
-                                               $(element).after(br);
-                                               this.caret.setAfter(br);
-
-                                       }
-                                       else
-                                       {
-                                               if (this.$editor.contents().last()[0] !== element) return;
-
-                                               var node = $(this.opts.emptyHtml);
-                                               $(element).after(node);
-                                               this.caret.setStart(node);
-                                       }
-                               },
-                               insertNewLine: function(e)
-                               {
-                                       e.preventDefault();
-
-                                       var node = document.createTextNode('\n');
-
-                                       this.selection.get();
-
-                                       this.range.deleteContents();
-                                       this.range.insertNode(node);
-
-                                       this.caret.setAfter(node);
-
-                                       this.code.sync();
-
-                                       return false;
-                               },
-                               insertBreakLine: function(e)
-                               {
-                                       return this.keydown.insertBreakLineProcessing(e);
-                               },
-                               insertDblBreakLine: function(e)
-                               {
-                                       return this.keydown.insertBreakLineProcessing(e, true);
-                               },
-                               insertBreakLineProcessing: function(e, dbl)
-                               {
-                                       e.stopPropagation();
-
-                                       this.selection.get();
-
-                                       var br1 = document.createElement('br');
-
-                                       if (this.utils.browser('msie'))
-                                       {
-                                               this.range.collapse(false);
-                                               this.range.setEnd(this.range.endContainer, this.range.endOffset);
-                                       }
-                                       else
-                                       {
-                                               this.range.deleteContents();
-                                       }
-
-                                       this.range.insertNode(br1);
-
-                                       // move br outside A tag
-                                       var $parentA = $(br1).parent("a");
-
-                                       if ($parentA.length > 0)
-                                       {
-                                               $parentA.find(br1).remove();
-                                               $parentA.after(br1);
-                                       }
-
-                                       if (dbl === true)
-                                       {
-                                               var $next = $(br1).next();
-                                               if ($next.length !== 0 && $next[0].tagName === 'BR' && this.utils.isEndOfEditor())
-                                               {
-                                                       this.caret.setAfter(br1);
-                                                       this.code.sync();
-                                                       return false;
-                                               }
-
-                                               var br2 = document.createElement('br');
-
-                                               this.range.insertNode(br2);
-                                               this.caret.setAfter(br2);
-                                       }
-                                       else
-                                       {
-                                               // caret does not move after the br visual
-                                               if (this.utils.browser('msie'))
-                                               {
-                                                       var space = document.createElement('span');
-                                                       space.innerHTML = '&#x200b;';
-
-                                                       $(br1).after(space);
-
-                                                       this.range.setStartAfter(space);
-                                                       this.range.setEndAfter(space);
-                                                       $(space).remove();
-                                               }
-                                               else
-                                               {
-                                                       var range = document.createRange();
-                                                       range.setStartAfter(br1);
-                                                       range.collapse(true);
-                                                       var selection = window.getSelection();
-                                                       selection.removeAllRanges();
-                                                       selection.addRange(range);
-                                               }
-                                       }
-
-                                       this.code.sync();
-                                       return false;
-                               },
-                               removeInvisibleSpace: function()
-                               {
-                                       var $current = $(this.keydown.current);
-                                       if ($current.text().search(/^\u200B$/g) === 0)
-                                       {
-                                               $current.remove();
-                                       }
-                               },
-                               removeEmptyListInTable: function(e)
-                               {
-                                       var $current = $(this.keydown.current);
-                                       var $parent = $(this.keydown.parent);
-                                       var td = $current.closest('td', this.$editor[0]);
-
-                                       if (td.length !== 0 && $current.closest('li', this.$editor[0]) && $parent.children('li').length === 1)
-                                       {
-                                               if (!this.utils.isEmpty($current.text())) return;
-
-                                               e.preventDefault();
-
-                                               $current.remove();
-                                               $parent.remove();
-
-                                               this.caret.setStart(td);
-                                       }
-                               }
-                       };
-               },
-               keyup: function()
-               {
-                       return {
-                               init: function(e)
-                               {
-
-                                       if (this.rtePaste) return;
-
-                                       var key = e.which;
-
-                                       this.keyup.current = this.selection.getCurrent();
-                                       this.keyup.parent = this.selection.getParent();
-                                       var $parent = this.utils.isRedactorParent($(this.keyup.parent).parent());
-
-                                       // callback
-                                       var keyupStop = this.core.setCallback('keyup', e);
-                                       if (keyupStop === false)
-                                       {
-                                               e.preventDefault();
-                                               return false;
-                                       }
-
-                                       // replace to p before / after the table or body
-                                       if (!this.opts.linebreaks && this.keyup.current.nodeType === 3 && this.keyup.current.length <= 1 && (this.keyup.parent === false || this.keyup.parent.tagName == 'BODY'))
-                                       {
-                                               this.keyup.replaceToParagraph();
-                                       }
-
-                                       // replace div after lists
-                                       if (!this.opts.linebreaks && this.utils.isRedactorParent(this.keyup.current) && this.keyup.current.tagName === 'DIV')
-                                       {
-                                               this.keyup.replaceToParagraph(false);
-                                       }
-
-
-                                       if (!this.opts.linebreaks && $(this.keyup.parent).hasClass('redactor-invisible-space') && ($parent === false || $parent[0].tagName == 'BODY'))
-                                       {
-                                               $(this.keyup.parent).contents().unwrap();
-                                               this.keyup.replaceToParagraph();
-                                       }
-
-                                       // linkify
-                                       if (this.linkify.isEnabled() && this.linkify.isKey(key)) this.linkify.format();
-
-                                       if (key === this.keyCode.DELETE || key === this.keyCode.BACKSPACE)
-                                       {
-                                               if (this.utils.browser('mozilla'))
-                                               {
-                                                       var td = $(this.keydown.current).closest('td', this.$editor[0]);
-                                                       if (td.size() !== 0 && td.text() !== '')
-                                                       {
-                                                               e.preventDefault();
-                                                               return false;
-                                                       }
-                                               }
-
-                                               // clear unverified
-                                               this.clean.clearUnverified();
-
-                                               if (this.observe.image)
-                                               {
-                                                       e.preventDefault();
-
-                                                       this.image.hideResize();
-
-                                                       this.buffer.set();
-                                                       this.image.remove(this.observe.image);
-                                                       this.observe.image = false;
-
-                                                       return false;
-                                               }
-
-                                               // remove empty paragraphs
-                                               this.$editor.find('p').each($.proxy(function(i, s)
-                                               {
-                                                       this.utils.removeEmpty(i, $(s).html());
-                                               }, this));
-
-                                               // remove invisible space
-                                               if (this.opts.linebreaks && this.keyup.current && this.keyup.current.tagName == 'DIV' && this.utils.isEmpty(this.keyup.current.innerHTML))
-                                               {
-                                                       $(this.keyup.current).after(this.selection.getMarkerAsHtml());
-                                                       this.selection.restore();
-                                                       $(this.keyup.current).remove();
-                                               }
-
-                                               this.keyup.removeEmptyLists();
-
-                                               // if empty
-                                               return this.keyup.formatEmpty(e);
-                                       }
-                               },
-                               replaceToParagraph: function(clone)
-                               {
-                                       var $current = $(this.keyup.current);
-
-                                       var node;
-                                       if (clone === false)
-                                       {
-                                               node = $('<p>').append($current.html());
-                                       }
-                                       else
-                                       {
-                                               node = $('<p>').append($current.clone());
-                                       }
-
-                                       $current.replaceWith(node);
-                                       var next = $(node).next();
-                                       if (typeof(next[0]) !== 'undefined' && next[0].tagName == 'BR')
-                                       {
-                                               next.remove();
-                                       }
-
-                                       this.caret.setEnd(node);
-                               },
-                               removeEmptyLists: function()
-                               {
-                                       var removeIt = function()
-                                       {
-                                               var html = $.trim(this.innerHTML).replace(/\/t\/n/g, '');
-                                               if (html === '')
-                                               {
-                                                       $(this).remove();
-                                               }
-                                       };
-
-                                       this.$editor.find('li').each(removeIt);
-                                       this.$editor.find('ul, ol').each(removeIt);
-                               },
-                               formatEmpty: function(e)
-                               {
-                                       var html = $.trim(this.$editor.html());
-
-                                       if (!this.utils.isEmpty(html)) return;
-
-                                       e.preventDefault();
-
-                                       if (this.opts.linebreaks)
-                                       {
-                                               this.$editor.html(this.selection.getMarkerAsHtml());
-                                               this.selection.restore();
-                                       }
-                                       else
-                                       {
-                                               this.$editor.html(this.opts.emptyHtml);
-                                               this.focus.setStart();
-                                       }
-
-                                       this.code.sync();
-
-                                       return false;
-                               }
-                       };
-               },
-               lang: function()
-               {
-                       return {
-                               load: function()
-                               {
-                                       this.opts.curLang = this.opts.langs[this.opts.lang];
-                               },
-                               get: function(name)
-                               {
-                                       return (typeof this.opts.curLang[name] != 'undefined') ? this.opts.curLang[name] : '';
-                               }
-                       };
-               },
-               line: function()
-               {
-                       return {
-                               insert: function()
-                               {
-                                       this.buffer.set();
-
-                                       var blocks = this.selection.getBlocks();
-                                       if (blocks[0] !== false && this.line.isExceptLastOrFirst(blocks))
-                                       {
-                                               if (!this.utils.browser('msie')) this.$editor.focus();
-                                               return;
-                                       }
-
-                                       if (this.utils.browser('msie'))
-                                       {
-                                               this.line.insertInIe();
-                                       }
-                                       else
-                                       {
-                                               this.line.insertInOthersBrowsers();
-                                       }
-                               },
-                               isExceptLastOrFirst: function(blocks)
-                               {
-                                       var exceptTags = ['li', 'td', 'th', 'blockquote', 'figcaption', 'pre', 'dl', 'dt', 'dd'];
-
-                                       var first = blocks[0].tagName.toLowerCase();
-                                       var last = this.selection.getLastBlock();
-
-                                       last = (typeof last == 'undefined') ? first : last.tagName.toLowerCase();
-
-                                       var firstFound = $.inArray(first, exceptTags) != -1;
-                                       var lastFound = $.inArray(last, exceptTags) != -1;
-
-                                       if ((firstFound && lastFound) || firstFound)
-                                       {
-                                               return true;
-                                       }
-                               },
-                               insertInIe: function()
-                               {
-                                       this.utils.saveScroll();
-                                       this.buffer.set();
-
-                                       this.insert.node(document.createElement('hr'));
-
-                                       this.utils.restoreScroll();
-                                       this.code.sync();
-                               },
-                               insertInOthersBrowsers: function()
-                               {
-                                       this.buffer.set();
-
-                                       var extra = '<p id="redactor-insert-line"><br /></p>';
-                                       if (this.opts.linebreaks) extra = '<br id="redactor-insert-line">';
-
-                                       document.execCommand('insertHtml', false, '<hr>' + extra);
-
-                                       this.line.setFocus();
-                                       this.code.sync();
-                               },
-                               setFocus: function()
-                               {
-                                       var node = this.$editor.find('#redactor-insert-line');
-                                       var next = $(node).next()[0];
-                                       var target = next;
-                                       if (this.utils.browser('mozilla') && next && next.innerHTML === '')
-                                       {
-                                               target = $(next).next()[0];
-                                               $(next).remove();
-                                       }
-
-                                       if (target)
-                                       {
-                                               node.remove();
-
-                                               if (!this.opts.linebreaks)
-                                               {
-                                                       this.$editor.focus();
-                                                       this.line.setStart(target);
-                                               }
-
-                                       }
-                                       else
-                                       {
-
-                                               node.removeAttr('id');
-                                               this.line.setStart(node[0]);
-                                       }
-                               },
-                               setStart: function(node)
-                               {
-                                       if (typeof node === 'undefined') return;
-
-                                       var textNode = document.createTextNode('\u200B');
-
-                                       this.selection.get();
-                                       this.range.setStart(node, 0);
-                                       this.range.insertNode(textNode);
-                                       this.range.collapse(true);
-                                       this.selection.addRange();
-
-                               }
-                       };
-               },
-               link: function()
-               {
-                       return {
-                               show: function(e)
-                               {
-                                       if (typeof e != 'undefined' && e.preventDefault) e.preventDefault();
-
-                                       if (!this.observe.isCurrent('a'))
-                                       {
-                                               this.modal.load('link', this.lang.get('link_insert'), 600);
-                                       }
-                                       else
-                                       {
-                                               this.modal.load('link', this.lang.get('link_edit'), 600);
-                                       }
-
-                                       this.modal.createCancelButton();
-
-                                       var buttonText = !this.observe.isCurrent('a') ? this.lang.get('insert') : this.lang.get('edit');
-
-                                       this.link.buttonInsert = this.modal.createActionButton(buttonText);
-
-                                       this.selection.get();
-
-                                       this.link.getData();
-                                       this.link.cleanUrl();
-
-                                       if (this.link.target == '_blank') $('#redactor-link-blank').prop('checked', true);
-
-                                       this.link.$inputUrl = $('#redactor-link-url');
-                                       this.link.$inputText = $('#redactor-link-url-text');
-
-                                       this.link.$inputText.val(this.link.text);
-                                       this.link.$inputUrl.val(this.link.url);
-
-                                       this.link.buttonInsert.on('click', $.proxy(this.link.insert, this));
-
-                                       // hide link's tooltip
-                                       $('.redactor-link-tooltip').remove();
-
-                                       // show modal
-                                       this.selection.save();
-                                       this.modal.show();
-                                       this.link.$inputUrl.focus();
-                               },
-                               cleanUrl: function()
-                               {
-                                       var thref = self.location.href.replace(/\/$/i, '');
-
-                                       if (typeof this.link.url !== "undefined")
-                                       {
-                                               this.link.url = this.link.url.replace(thref, '');
-                                               this.link.url = this.link.url.replace(/^\/#/, '#');
-                                               this.link.url = this.link.url.replace('mailto:', '');
-
-                                               // remove host from href
-                                               if (!this.opts.linkProtocol)
-                                               {
-                                                       var re = new RegExp('^(http|ftp|https)://' + self.location.host, 'i');
-                                                       this.link.url = this.link.url.replace(re, '');
-                                               }
-                                       }
-                               },
-                               getData: function()
-                               {
-                                       this.link.$node = false;
-
-                                       var $el = $(this.selection.getCurrent()).closest('a', this.$editor[0]);
-                                       if ($el.length !== 0 && $el[0].tagName === 'A')
-                                       {
-                                               this.link.$node = $el;
-
-                                               this.link.url = $el.attr('href');
-                                               this.link.text = $el.text();
-                                               this.link.target = $el.attr('target');
-                                       }
-                                       else
-                                       {
-                                               this.link.text = this.sel.toString();
-                                               this.link.url = '';
-                                               this.link.target = '';
-                                       }
-
-                               },
-                               insert: function()
-                               {
-                                       this.placeholder.remove();
-
-                                       var target = '';
-                                       var link = this.link.$inputUrl.val();
-                                       var text = this.link.$inputText.val().replace(/(<([^>]+)>)/ig,"");
-
-                                       if ($.trim(link) === '')
-                                       {
-                                               this.link.$inputUrl.addClass('redactor-input-error').on('keyup', function()
-                                               {
-                                                       $(this).removeClass('redactor-input-error');
-                                                       $(this).off('keyup');
-
-                                               });
-
-                                               return;
-                                       }
-
-                                       // mailto
-                                       if (link.search('@') != -1 && /(http|ftp|https):\/\//i.test(link) === false)
-                                       {
-                                               link = link.replace('mailto:', '');
-                                               link = 'mailto:' + link;
-                                       }
-                                       // url, not anchor
-                                       else if (link.search('#') !== 0)
-                                       {
-                                               if ($('#redactor-link-blank').prop('checked'))
-                                               {
-                                                       target = '_blank';
-                                               }
-
-                                               // test url (add protocol)
-                                               var pattern = '((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}';
-                                               var re = new RegExp('^(http|ftp|https)://' + pattern, 'i');
-                                               var re2 = new RegExp('^' + pattern, 'i');
-                                               var re3 = new RegExp('\.(html|php)$', 'i');
-                                               if (link.search(re) == -1 && link.search(re3) == -1 && link.search(re2) === 0 && this.opts.linkProtocol)
-                                               {
-                                                       link = this.opts.linkProtocol + '://' + link;
-                                               }
-                                       }
-
-                                       this.link.set(text, link, target);
-                                       this.modal.close();
-                               },
-                               set: function(text, link, target)
-                               {
-                                       text = $.trim(text.replace(/<|>/g, ''));
-
-                                       this.selection.restore();
-                                       var blocks = this.selection.getBlocks();
-
-                                       if (text === '' && link === '') return;
-                                       if (text === '' && link !== '') text = link;
-
-                                       if (this.link.$node)
-                                       {
-                                               this.buffer.set();
-
-                                               var $link = this.link.$node,
-                                                       $el   = $link.children();
-
-                                               if ($el.length > 0)
-                                               {
-                                                       while ($el.length)
-                                                       {
-                                                               $el = $el.children();
-                                                       }
-
-                                                       $el = $el.end();
-                                               }
-                                               else
-                                               {
-                                                       $el = $link;
-                                               }
-
-                                               $link.attr('href', link);
-                                               $el.text(text);
-
-                                               if (target !== '')
-                                               {
-                                                       $link.attr('target', target);
-                                               }
-                                               else
-                                               {
-                                                       $link.removeAttr('target');
-                                               }
-
-                                               this.selection.selectElement($link);
-
-                                               this.code.sync();
-                                       }
-                                       else
-                                       {
-                                               if (this.utils.browser('mozilla') && this.link.text === '')
-                                               {
-                                                       var $a = $('<a />').attr('href', link).text(text);
-                                                       if (target !== '') $a.attr('target', target);
-
-                                                       $a = $(this.insert.node($a));
-
-                                                       if (this.opts.linebreaks)
-                                                       {
-                                                               $a.after('&nbsp;');
-                                                       }
-
-                                                       this.selection.selectElement($a);
-                                               }
-                                               else
-                                               {
-                                                       var $a;
-                                                       if (this.utils.browser('msie'))
-                                                       {
-                                                               $a = $('<a href="' + link + '">').text(text);
-                                                               if (target !== '') $a.attr('target', target);
-
-                                                               $a = $(this.insert.node($a));
-
-                                                               if (this.selection.getText().match(/\s$/))
-                                                               {
-                                                                       $a.after(" ");
-                                                               }
-
-                                                               this.selection.selectElement($a);
-                                                       }
-                                                       else
-                                                       {
-                                                               document.execCommand('createLink', false, link);
-
-                                                               $a = $(this.selection.getCurrent()).closest('a', this.$editor[0]);
-                                                               if (this.utils.browser('mozilla'))
-                                                               {
-                                                                       $a = $('a[_moz_dirty=""]');
-                                                               }
-
-                                                               if (target !== '') $a.attr('target', target);
-                                                               $a.removeAttr('style').removeAttr('_moz_dirty');
-
-                                                               if (this.selection.getText().match(/\s$/))
-                                                               {
-                                                                       $a.after(" ");
-                                                               }
-
-                                                               if (this.link.text !== '' || this.link.text != text)
-                                                               {
-                                                                       if (!this.opts.linebreaks && blocks && blocks.length <= 1)
-                                                                       {
-                                                                               $a.text(text);
-                                                                       }
-                                                                       else if (this.opts.linebreaks)
-                                                                       {
-                                                                               $a.text(text);
-                                                                       }
-
-                                                                       this.selection.selectElement($a);
-                                                               }
-                                                       }
-                                               }
-
-                                               this.code.sync();
-                                               this.core.setCallback('insertedLink', $a);
-
-                                       }
-
-                                       // link tooltip
-                                       setTimeout($.proxy(function()
-                                       {
-                                               this.observe.links();
-
-                                       }, this), 5);
-                               },
-                               unlink: function(e)
-                               {
-                                       if (typeof e != 'undefined' && e.preventDefault)
-                                       {
-                                               e.preventDefault();
-                                       }
-
-                                       var nodes = this.selection.getNodes();
-                                       if (!nodes) return;
-
-                                       this.buffer.set();
-
-                                       var len = nodes.length;
-                                       var links = [];
-                                       for (var i = 0; i < len; i++)
-                                       {
-                                               if (nodes[i].tagName === 'A')
-                                               {
-                                                       links.push(nodes[i]);
-                                               }
-
-                                               var $node = $(nodes[i]).closest('a', this.$editor[0]);
-                                               $node.replaceWith($node.contents());
-                                       }
-
-                                       this.core.setCallback('deletedLink', links);
-
-                                       // hide link's tooltip
-                                       $('.redactor-link-tooltip').remove();
-
-                                       this.code.sync();
-
-                               },
-                               toggleClass: function(className)
-                               {
-                                       this.link.setClass(className, 'toggleClass');
-                               },
-                               addClass: function(className)
-                               {
-                                       this.link.setClass(className, 'addClass');
-                               },
-                               removeClass: function(className)
-                               {
-                                       this.link.setClass(className, 'removeClass');
-                               },
-                               setClass: function(className, func)
-                               {
-                                       var links = this.selection.getInlinesTags(['a']);
-                                       if (links === false) return;
-
-                                       $.each(links, function()
-                                       {
-                                               $(this)[func](className);
-                                       });
-                               }
-                       };
-               },
-               linkify: function()
-               {
-                       return {
-                               isKey: function(key)
-                               {
-                                       return key == this.keyCode.ENTER || key == this.keyCode.SPACE;
-                               },
-                               isEnabled: function()
-                               {
-                                       return this.opts.convertLinks && (this.opts.convertUrlLinks || this.opts.convertImageLinks || this.opts.convertVideoLinks) && !this.utils.isCurrentOrParent('PRE');
-                               },
-                               format: function()
-                               {
-                                       var linkify = this.linkify,
-                                               opts    = this.opts;
-
-                                       this.$editor
-                                               .find(":not(iframe,img,a,pre)")
-                                               .addBack()
-                                               .contents()
-                                               .filter(function()
-                                               {
-                                                       return this.nodeType === 3 && $.trim(this.nodeValue) != "" && !$(this).parent().is("pre") && (this.nodeValue.match(opts.linkify.regexps.youtube) || this.nodeValue.match(opts.linkify.regexps.vimeo) || this.nodeValue.match(opts.linkify.regexps.image) || this.nodeValue.match(opts.linkify.regexps.url));
-                                               })
-                                               .each(function()
-                                               {
-                                                       var text = $(this).text(),
-                                                               html = text;
-
-                                                       if (opts.convertVideoLinks && (html.match(opts.linkify.regexps.youtube) || html.match(opts.linkify.regexps.vimeo)) )
-                                                       {
-                                                               html = linkify.convertVideoLinks(html);
-                                                       }
-                                                       else if (opts.convertImageLinks && html.match(opts.linkify.regexps.image))
-                                                       {
-                                                               html = linkify.convertImages(html);
-                                                       }
-                                                       else if (opts.convertUrlLinks)
-                                                       {
-                                                               html = linkify.convertLinks(html);
-                                                       }
-
-                                                       $(this).before(text.replace(text, html))
-                                                                  .remove();
-                                               });
-
-
-                                       var objects = this.$editor.find('.redactor-linkify-object').each(function()
-                                       {
-                                               var $el = $(this);
-                                               $el.removeClass('redactor-linkify-object');
-                                               if ($el.attr('class') === '') $el.removeAttr('class');
-
-                                               return $el[0];
-
-                                       });
-
-                                       // callback
-                                       setTimeout($.proxy(function()
-                                       {
-                                               this.observe.load();
-                                               this.core.setCallback('linkify', objects);
-                                       }, this), 100);
-
-                                       // sync
-                                       this.code.sync();
-                               },
-                               convertVideoLinks: function(html)
-                               {
-                                       var iframeStart = '<iframe class="redactor-linkify-object" width="500" height="281" src="',
-                                               iframeEnd = '" frameborder="0" allowfullscreen></iframe>';
-
-                                       if (html.match(this.opts.linkify.regexps.youtube))
-                                       {
-                                               html = html.replace(this.opts.linkify.regexps.youtube, iframeStart + '//www.youtube.com/embed/$1' + iframeEnd);
-                                       }
-
-                                       if (html.match(this.opts.linkify.regexps.vimeo))
-                                       {
-                                               html = html.replace(this.opts.linkify.regexps.vimeo, iframeStart + '//player.vimeo.com/video/$2' + iframeEnd);
-                                       }
-
-                                       return html;
-                               },
-                               convertImages: function(html)
-                               {
-                                       var matches = html.match(this.opts.linkify.regexps.image);
-
-                                       if (matches)
-                                       {
-                                               html = html.replace(html, '<img src="' + matches + '" class="redactor-linkify-object" />');
-
-                                               if (this.opts.linebreaks)
-                                               {
-                                                       if (!this.utils.isEmpty(this.code.get()))
-                                                       {
-                                                               html = '<br>' + html;
-                                                       }
-                                               }
-
-                                               html += '<br>';
-                                       }
-
-                                       return html;
-                               },
-                               convertLinks: function(html)
-                               {
-                                       var matches = html.match(this.opts.linkify.regexps.url);
-
-                                       if (matches)
-                                       {
-                                               matches = $.grep(matches, function(v, k) { return $.inArray(v, matches) === k; });
-
-                                               var length = matches.length;
-
-                                               for (var i = 0; i < length; i++)
-                                               {
-                                                       var href = matches[i],
-                                                               text = href,
-                                                               linkProtocol = this.opts.linkProtocol + '://';
-
-                                                       if (href.match(/(https?|ftp):\/\//i) !== null)
-                                                       {
-                                                               linkProtocol = "";
-                                                       }
-
-                                                       if (text.length > this.opts.linkSize)
-                                                       {
-                                                               text = text.substring(0, this.opts.linkSize) + '...';
-                                                       }
-
-                                                       if (text.search('%') === -1)
-                                                       {
-                                                               text = decodeURIComponent(text);
-                                                       }
-
-                                                       var regexB = "\\b";
-
-                                                       if ($.inArray(href.slice(-1), ["/", "&", "="]) != -1)
-                                                       {
-                                                               regexB = "";
-                                                       }
-
-                                                       // escaping url
-                                                       var regexp = new RegExp('(' + href.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + regexB + ')', 'g');
-
-                                                       html = html.replace(regexp, '<a href="' + linkProtocol + $.trim(href) + '" class="redactor-linkify-object">' + $.trim(text) + '</a>');
-                                               }
-                                       }
-
-                                       return html;
-                               }
-                       };
-               },
-               list: function()
-               {
-                       return {
-                               toggle: function(cmd)
-                               {
-                                       this.placeholder.remove();
-
-                                       if (!this.utils.browser('msie') && !this.opts.linebreaks)
-                                       {
-                                               this.$editor.focus();
-                                       }
-
-                                       this.buffer.set();
-                                       this.selection.save();
-
-                                       var parent = this.selection.getParent();
-                                       var $list = $(parent).closest('ol, ul', this.$editor[0]);
-
-                                       if (!this.utils.isRedactorParent($list) && $list.length !== 0)
-                                       {
-                                               $list = false;
-                                       }
-
-                                       var isUnorderedCmdOrdered, isOrderedCmdUnordered;
-                                       var remove = false;
-                                       if ($list && $list.length)
-                                       {
-                                               remove = true;
-                                               var listTag = $list[0].tagName;
-
-                                               isUnorderedCmdOrdered = (cmd === 'orderedlist' && listTag === 'UL');
-                                               isOrderedCmdUnordered = (cmd === 'unorderedlist' && listTag === 'OL');
-                                       }
-
-                                       if (isUnorderedCmdOrdered)
-                                       {
-                                               this.utils.replaceToTag($list, 'ol');
-                                       }
-                                       else if (isOrderedCmdUnordered)
-                                       {
-                                               this.utils.replaceToTag($list, 'ul');
-                                       }
-                                       else
-                                       {
-                                               if (remove)
-                                               {
-                                                       this.list.remove(cmd, $list);
-                                               }
-                                               else
-                                               {
-                                                       this.list.insert(cmd);
-                                               }
-                                       }
-
-                                       this.selection.restore();
-                                       this.code.sync();
-
-                               },
-                               insert: function(cmd)
-                               {
-                                       var current = this.selection.getCurrent();
-                                       var $td = $(current).closest('td, th', this.$editor[0]);
-
-                                       if (this.utils.browser('msie') && this.opts.linebreaks)
-                                       {
-                                               this.list.insertInIe(cmd);
-                                       }
-                                       else
-                                       {
-                                               document.execCommand('insert' + cmd);
-                                       }
-
-                                       var parent = this.selection.getParent();
-                                       var $list = $(parent).closest('ol, ul', this.$editor[0]);
-                                       if ($td.length !== 0)
-                                       {
-                                               var newTd = $td.clone();
-                                               $td.after(newTd).remove('');
-                                       }
-
-
-                                       if (this.utils.isEmpty($list.find('li').text()))
-                                       {
-                                               var $children = $list.children('li');
-                                               $children.find('br').remove();
-                                               $children.append(this.selection.getMarkerAsHtml());
-
-                                               if (this.opts.linebreaks && this.utils.browser('mozilla') && $children.size() == 2 && this.utils.isEmpty($children.eq(1).text()))
-                                               {
-                                                       $children.eq(1).remove();
-                                               }
-                                       }
-
-                                       if ($list.length)
-                                       {
-                                               // remove block-element list wrapper
-                                               var $listParent = $list.parent();
-                                               if (this.utils.isRedactorParent($listParent) && $listParent[0].tagName != 'LI' && this.utils.isBlock($listParent[0]))
-                                               {
-                                                       $listParent.replaceWith($listParent.contents());
-                                               }
-                                       }
-
-                                       if (!this.utils.browser('msie'))
-                                       {
-                                               this.$editor.focus();
-                                       }
-
-
-                                       this.clean.clearUnverified();
-                               },
-                               insertInIe: function(cmd)
-                               {
-                                       var wrapper = this.selection.wrap('div');
-                                       var wrapperHtml = $(wrapper).html();
-
-                                       var tmpList = (cmd == 'orderedlist') ? $('<ol>') : $('<ul>');
-                                       var tmpLi = $('<li>');
-
-                                       if ($.trim(wrapperHtml) === '')
-                                       {
-                                               tmpLi.append(this.selection.getMarkerAsHtml());
-                                               tmpList.append(tmpLi);
-                                               this.$editor.find('#selection-marker-1').replaceWith(tmpList);
-                                       }
-                                       else
-                                       {
-                                               var items = wrapperHtml.split(/<br\s?\/?>/gi);
-                                               if (items)
-                                               {
-                                                       for (var i = 0; i < items.length; i++)
-                                                       {
-                                                               if ($.trim(items[i]) !== '')
-                                                               {
-                                                                       tmpList.append($('<li>').html(items[i]));
-                                                               }
-                                                       }
-                                               }
-                                               else
-                                               {
-                                                       tmpLi.append(wrapperHtml);
-                                                       tmpList.append(tmpLi);
-                                               }
-
-                                               $(wrapper).replaceWith(tmpList);
-                                       }
-                               },
-                               remove: function(cmd, $list)
-                               {
-                                       if ($.inArray('ul', this.selection.getBlocks())) cmd = 'unorderedlist';
-
-                                       document.execCommand('insert' + cmd);
-
-                                       var $current = $(this.selection.getCurrent());
-                                       this.indent.fixEmptyIndent();
-
-                                       if (!this.opts.linebreaks && $current.closest('li, th, td', this.$editor[0]).length === 0)
-                                       {
-                                               document.execCommand('formatblock', false, 'p');
-                                               this.$editor.find('ul, ol, blockquote').each($.proxy(this.utils.removeEmpty, this));
-                                       }
-
-                                       var $table = $(this.selection.getCurrent()).closest('table', this.$editor[0]);
-                                       var $prev = $table.prev();
-                                       if (!this.opts.linebreaks && $table.length !== 0 && $prev.length !== 0 && $prev[0].tagName == 'BR')
-                                       {
-                                               $prev.remove();
-                                       }
-
-                                       this.clean.clearUnverified();
-
-
-                               }
-                       };
-               },
-               modal: function()
-               {
-                       return {
-                               callbacks: {},
-                               loadTemplates: function()
-                               {
-                                       this.opts.modal = {
-                                               imageEdit: String()
-                                               + '<section id="redactor-modal-image-edit">'
-                                                       + '<label>' + this.lang.get('title') + '</label>'
-                                                       + '<input type="text" id="redactor-image-title" />'
-                                                       + '<label class="redactor-image-link-option">' + this.lang.get('link') + '</label>'
-                                                       + '<input type="text" id="redactor-image-link" class="redactor-image-link-option" aria-label="' + this.lang.get('link') + '" />'
-                                                       + '<label class="redactor-image-link-option"><input type="checkbox" id="redactor-image-link-blank" aria-label="' + this.lang.get('link_new_tab') + '"> ' + this.lang.get('link_new_tab') + '</label>'
-                                                       + '<label class="redactor-image-position-option">' + this.lang.get('image_position') + '</label>'
-                                                       + '<select class="redactor-image-position-option" id="redactor-image-align" aria-label="' + this.lang.get('image_position') + '">'
-                                                               + '<option value="none">' + this.lang.get('none') + '</option>'
-                                                               + '<option value="left">' + this.lang.get('left') + '</option>'
-                                                               + '<option value="center">' + this.lang.get('center') + '</option>'
-                                                               + '<option value="right">' + this.lang.get('right') + '</option>'
-                                                       + '</select>'
-                                               + '</section>',
-
-                                               image: String()
-                                               + '<section id="redactor-modal-image-insert">'
-                                                       + '<div id="redactor-modal-image-droparea"></div>'
-                                               + '</section>',
-
-                                               file: String()
-                                               + '<section id="redactor-modal-file-insert">'
-                                                       + '<div id="redactor-modal-file-upload-box">'
-                                                               + '<label>' + this.lang.get('filename') + '</label>'
-                                                               + '<input type="text" id="redactor-filename" aria-label="' + this.lang.get('filename') + '" /><br><br>'
-                                                               + '<div id="redactor-modal-file-upload"></div>'
-                                                       + '</div>'
-                                               + '</section>',
-
-                                               link: String()
-                                               + '<section id="redactor-modal-link-insert">'
-                                                       + '<label>URL</label>'
-                                                       + '<input type="url" id="redactor-link-url" aria-label="URL" />'
-                                                       + '<label>' + this.lang.get('text') + '</label>'
-                                                       + '<input type="text" id="redactor-link-url-text" aria-label="' + this.lang.get('text') + '" />'
-                                                       + '<label><input type="checkbox" id="redactor-link-blank"> ' + this.lang.get('link_new_tab') + '</label>'
-                                               + '</section>'
-                                       };
-
-
-                                       $.extend(this.opts, this.opts.modal);
-
-                               },
-                               addCallback: function(name, callback)
-                               {
-                                       this.modal.callbacks[name] = callback;
-                               },
-                               createTabber: function($modal)
-                               {
-                                       this.modal.$tabber = $('<div>').attr('id', 'redactor-modal-tabber');
-
-                                       $modal.prepend(this.modal.$tabber);
-                               },
-                               addTab: function(id, name, active)
-                               {
-                                       var $tab = $('<a href="#" rel="tab' + id + '">').text(name);
-                                       if (active)
-                                       {
-                                               $tab.addClass('active');
-                                       }
-
-                                       var self = this;
-                                       $tab.on('click', function(e)
-                                       {
-                                               e.preventDefault();
-                                               $('.redactor-tab').hide();
-                                               $('.redactor-' + $(this).attr('rel')).show();
-
-                                               self.modal.$tabber.find('a').removeClass('active');
-                                               $(this).addClass('active');
-
-                                       });
-
-                                       this.modal.$tabber.append($tab);
-                               },
-                               addTemplate: function(name, template)
-                               {
-                                       this.opts.modal[name] = template;
-                               },
-                               getTemplate: function(name)
-                               {
-                                       return this.opts.modal[name];
-                               },
-                               getModal: function()
-                               {
-                                       return this.$modalBody.find('section');
-                               },
-                               load: function(templateName, title, width)
-                               {
-                                       this.modal.templateName = templateName;
-                                       this.modal.width = width;
-
-                                       this.modal.build();
-                                       this.modal.enableEvents();
-                                       this.modal.setTitle(title);
-                                       this.modal.setDraggable();
-                                       this.modal.setContent();
-
-                                       // callbacks
-                                       if (typeof this.modal.callbacks[templateName] != 'undefined')
-                                       {
-                                               this.modal.callbacks[templateName].call(this);
-                                       }
-
-                               },
-                               show: function()
-                               {
-                                       this.utils.disableBodyScroll();
-
-                                       if (this.utils.isMobile())
-                                       {
-                                               this.modal.showOnMobile();
-                                       }
-                                       else
-                                       {
-                                               this.modal.showOnDesktop();
-                                       }
-
-                                       if (this.opts.highContrast)
-                                       {
-                                               this.$modalBox.addClass("redactor-modal-contrast");
-                                       }
-
-                                       this.$modalOverlay.show();
-                                       this.$modalBox.show();
-
-                                       this.$modal.attr('tabindex', '-1');
-                                       this.$modal.focus();
-
-                                       this.modal.setButtonsWidth();
-
-                                       this.utils.saveScroll();
-
-                                       // resize
-                                       if (!this.utils.isMobile())
-                                       {
-                                               setTimeout($.proxy(this.modal.showOnDesktop, this), 0);
-                                               $(window).on('resize.redactor-modal', $.proxy(this.modal.resize, this));
-                                       }
-
-                                       // modal shown callback
-                                       this.core.setCallback('modalOpened', this.modal.templateName, this.$modal);
-
-                                       // fix bootstrap modal focus
-                                       $(document).off('focusin.modal');
-
-                                       // enter
-                                       this.$modal.find('input[type=text],input[type=url],input[type=email]').on('keydown.redactor-modal', $.proxy(this.modal.setEnter, this));
-                               },
-                               showOnDesktop: function()
-                               {
-                                       var height = this.$modal.outerHeight();
-                                       var windowHeight = $(window).height();
-                                       var windowWidth = $(window).width();
-
-                                       if (this.modal.width > windowWidth)
-                                       {
-                                               this.$modal.css({
-                                                       width: '96%',
-                                                       marginTop: (windowHeight/2 - height/2) + 'px'
-                                               });
-                                               return;
-                                       }
-
-                                       if (height > windowHeight)
-                                       {
-                                               this.$modal.css({
-                                                       width: this.modal.width + 'px',
-                                                       marginTop: '20px'
-                                               });
-                                       }
-                                       else
-                                       {
-                                               this.$modal.css({
-                                                       width: this.modal.width + 'px',
-                                                       marginTop: (windowHeight/2 - height/2) + 'px'
-                                               });
-                                       }
-                               },
-                               showOnMobile: function()
-                               {
-                                       this.$modal.css({
-                                               width: '96%',
-                                               marginTop: '2%'
-                                       });
-
-                               },
-                               resize: function()
-                               {
-                                       if (this.utils.isMobile())
-                                       {
-                                               this.modal.showOnMobile();
-                                       }
-                                       else
-                                       {
-                                               this.modal.showOnDesktop();
-                                       }
-                               },
-                               setTitle: function(title)
-                               {
-                                       this.$modalHeader.html(title);
-                               },
-                               setContent: function()
-                               {
-                                       this.$modalBody.html(this.modal.getTemplate(this.modal.templateName));
-                               },
-                               setDraggable: function()
-                               {
-                                       if (typeof $.fn.draggable === 'undefined') return;
-
-                                       this.$modal.draggable({ handle: this.$modalHeader });
-                                       this.$modalHeader.css('cursor', 'move');
-                               },
-                               setEnter: function(e)
-                               {
-                                       if (e.which != 13) return;
-
-                                       e.preventDefault();
-                                       this.$modal.find('button.redactor-modal-action-btn').click();
-                               },
-                               createCancelButton: function()
-                               {
-                                       var button = $('<button>').addClass('redactor-modal-btn redactor-modal-close-btn').html(this.lang.get('cancel'));
-                                       button.on('click', $.proxy(this.modal.close, this));
-
-                                       this.$modalFooter.append(button);
-                               },
-                               createDeleteButton: function(label)
-                               {
-                                       return this.modal.createButton(label, 'delete');
-                               },
-                               createActionButton: function(label)
-                               {
-                                       return this.modal.createButton(label, 'action');
-                               },
-                               createButton: function(label, className)
-                               {
-                                       var button = $('<button>').addClass('redactor-modal-btn').addClass('redactor-modal-' + className + '-btn').html(label);
-                                       this.$modalFooter.append(button);
-
-                                       return button;
-                               },
-                               setButtonsWidth: function()
-                               {
-                                       var buttons = this.$modalFooter.find('button');
-                                       var buttonsSize = buttons.length;
-                                       if (buttonsSize === 0) return;
-
-                                       buttons.css('width', (100/buttonsSize) + '%');
-                               },
-                               build: function()
-                               {
-                                       this.modal.buildOverlay();
-
-                                       this.$modalBox = $('<div id="redactor-modal-box"/>').hide();
-                                       this.$modal = $('<div id="redactor-modal" role="dialog" aria-labelledby="redactor-modal-header" />');
-                                       this.$modalHeader = $('<header id="redactor-modal-header"/>');
-                                       this.$modalClose = $('<button type="button" id="redactor-modal-close" tabindex="1" aria-label="Close" />').html('&times;');
-                                       this.$modalBody = $('<div id="redactor-modal-body" />');
-                                       this.$modalFooter = $('<footer />');
-
-                                       this.$modal.append(this.$modalHeader);
-                                       this.$modal.append(this.$modalClose);
-                                       this.$modal.append(this.$modalBody);
-                                       this.$modal.append(this.$modalFooter);
-                                       this.$modalBox.append(this.$modal);
-                                       this.$modalBox.appendTo(document.body);
-                               },
-                               buildOverlay: function()
-                               {
-                                       this.$modalOverlay = $('<div id="redactor-modal-overlay">').hide();
-                                       $('body').prepend(this.$modalOverlay);
-                               },
-                               enableEvents: function()
-                               {
-                                       this.$modalClose.on('click.redactor-modal', $.proxy(this.modal.close, this));
-                                       $(document).on('keyup.redactor-modal', $.proxy(this.modal.closeHandler, this));
-                                       this.$editor.on('keyup.redactor-modal', $.proxy(this.modal.closeHandler, this));
-                                       this.$modalBox.on('click.redactor-modal', $.proxy(this.modal.close, this));
-                               },
-                               disableEvents: function()
-                               {
-                                       this.$modalClose.off('click.redactor-modal');
-                                       $(document).off('keyup.redactor-modal');
-                                       this.$editor.off('keyup.redactor-modal');
-                                       this.$modalBox.off('click.redactor-modal');
-                                       $(window).off('resize.redactor-modal');
-                               },
-                               closeHandler: function(e)
-                               {
-                                       if (e.which != this.keyCode.ESC) return;
-
-                                       this.modal.close(false);
-                               },
-                               close: function(e)
-                               {
-                                       if (e)
-                                       {
-                                               if (!$(e.target).hasClass('redactor-modal-close-btn') && e.target != this.$modalClose[0] && e.target != this.$modalBox[0])
-                                               {
-                                                       return;
-                                               }
-
-                                               e.preventDefault();
-                                       }
-
-                                       if (!this.$modalBox) return;
-
-                                       this.modal.disableEvents();
-                                       this.utils.enableBodyScroll();
-
-                                       this.$modalOverlay.remove();
-
-                                       this.$modalBox.fadeOut('fast', $.proxy(function()
-                                       {
-                                               this.$modalBox.remove();
-
-                                               setTimeout($.proxy(this.utils.restoreScroll, this), 0);
-
-                                               if (e !== undefined) this.selection.restore();
-
-                                               $(document.body).css('overflow', this.modal.bodyOveflow);
-                                               this.core.setCallback('modalClosed', this.modal.templateName);
-
-                                       }, this));
-
-                               }
-                       };
-               },
-               observe: function()
-               {
-                       return {
-                               load: function()
-                               {
-                                       if (typeof this.opts.destroyed != "undefined") return;
-
-                                       if (this.utils.browser('msie'))
-                                       {
-                                               var self = this;
-                                               this.$editor.find('pre, code').on('mouseover',function()
-                                               {
-                                                       self.$editor.attr('contenteditable', false);
-                                                       $(this).attr('contenteditable', true);
-
-                                               }).on('mouseout',function()
-                                               {
-                                                       self.$editor.attr('contenteditable', true);
-                                                       $(this).removeAttr('contenteditable');
-
-                                               });
-                                       }
-
-                                       this.observe.images();
-                                       this.observe.links();
-                               },
-                               toolbar: function(e, btnName)
-                               {
-                                       this.observe.buttons(e, btnName);
-                                       this.observe.dropdowns();
-                               },
-                               isCurrent: function($el, $current)
-                               {
-                                       if (typeof $current == 'undefined')
-                                       {
-                                               var $current = $(this.selection.getCurrent());
-                                       }
-
-                                       return $current.is($el) || $current.parents($el).length > 0;
-                               },
-                               dropdowns: function()
-                               {
-                                       var $current = $(this.selection.getCurrent());
-
-                                       $.each(this.opts.observe.dropdowns, $.proxy(function(key, value)
-                                       {
-                                               var observe = value.observe,
-                                                       element = observe.element,
-                                                       $item   = value.item,
-                                                       inValues = typeof observe['in'] != 'undefined' ? observe['in'] : false,
-                                                       outValues = typeof observe['out'] != 'undefined' ? observe['out'] : false;
-
-                                               if ($current.closest(element).size() > 0)
-                                               {
-                                                       this.observe.setDropdownProperties($item, inValues, outValues);
-                                               }
-                                               else
-                                               {
-                                                       this.observe.setDropdownProperties($item, outValues, inValues);
-                                               }
-                                       }, this));
-                               },
-                               setDropdownProperties: function($item, addProperties, deleteProperties)
-                               {
-                                       if (deleteProperties && typeof deleteProperties['attr'] != 'undefined')
-                                       {
-                                               this.observe.setDropdownAttr($item, deleteProperties.attr, true);
-                                       }
-
-                                       if (typeof addProperties['attr'] != 'undefined')
-                                       {
-                                               this.observe.setDropdownAttr($item, addProperties.attr);
-                                       }
-
-                                       if (typeof addProperties['title'] != 'undefined')
-                                       {
-                                               $item.text(addProperties['title']);
-                                       }
-                               },
-                               setDropdownAttr: function($item, properties, isDelete)
-                               {
-                                       $.each(properties, function(key, value)
-                                       {
-                                               if (key == 'class')
-                                               {
-                                                       if (!isDelete)
-                                                       {
-                                                               $item.addClass(value);
-                                                       }
-                                                       else
-                                                       {
-                                                               $item.removeClass(value);
-                                                       }
-                                               }
-                                               else
-                                               {
-                                                       if (!isDelete)
-                                                       {
-                                                               $item.attr(key, value);
-                                                       }
-                                                       else
-                                                       {
-                                                               $item.removeAttr(key);
-                                                       }
-                                               }
-                                       });
-                               },
-                               addDropdown: function($item, btnName, btnObject)
-                               {
-                                       if (typeof btnObject.observe == "undefined") return;
-
-                                       btnObject.item = $item;
-
-                                       this.opts.observe.dropdowns.push(btnObject);
-                               },
-                               buttons: function(e, btnName)
-                               {
-                                       var current = this.selection.getCurrent();
-                                       var parent = this.selection.getParent();
-
-                                       if (e !== false)
-                                       {
-                                               this.button.setInactiveAll();
-                                       }
-                                       else
-                                       {
-                                               this.button.setInactiveAll(btnName);
-                                       }
-
-                                       if (e === false && btnName !== 'html')
-                                       {
-                                               if ($.inArray(btnName, this.opts.activeButtons) != -1) this.button.toggleActive(btnName);
-                                               return;
-                                       }
-
-                                       //var linkButtonName = (this.utils.isCurrentOrParent('A')) ? this.lang.get('link_edit') : this.lang.get('link_insert');
-                                       //$('body').find('a.redactor-dropdown-link').text(linkButtonName);
-
-                                       $.each(this.opts.activeButtonsStates, $.proxy(function(key, value)
-                                       {
-                                               var parentEl = $(parent).closest(key, this.$editor[0]);
-                                               var currentEl = $(current).closest(key, this.$editor[0]);
-
-                                               if (parentEl.length !== 0 && !this.utils.isRedactorParent(parentEl)) return;
-                                               if (!this.utils.isRedactorParent(currentEl)) return;
-                                               if (parentEl.length !== 0 || currentEl.closest(key, this.$editor[0]).length !== 0)
-                                               {
-                                                       this.button.setActive(value);
-                                               }
-
-                                       }, this));
-
-                                       var $parent = $(parent).closest(this.opts.alignmentTags.toString().toLowerCase(), this.$editor[0]);
-                                       if (this.utils.isRedactorParent(parent) && $parent.length)
-                                       {
-                                               var align = ($parent.css('text-align') === '') ? 'left' : $parent.css('text-align');
-                                               this.button.setActive('align' + align);
-                                       }
-                               },
-                               addButton: function(tag, btnName)
-                               {
-                                       this.opts.activeButtons.push(btnName);
-                                       this.opts.activeButtonsStates[tag] = btnName;
-                               },
-                               images: function()
-                               {
-                                       this.$editor.find('img').each($.proxy(function(i, img)
-                                       {
-                                               var $img = $(img);
-
-                                               // IE fix (when we clicked on an image and then press backspace IE does goes to image's url)
-                                               $img.closest('a', this.$editor[0]).on('click', function(e) { e.preventDefault(); });
-
-                                               if (this.utils.browser('msie')) $img.attr('unselectable', 'on');
-
-                                               this.image.setEditable($img);
-
-                                       }, this));
-
-                                       $(document).on('click.redactor-image-delete.' + this.uuid, $.proxy(function(e)
-                                       {
-                                               this.observe.image = false;
-                                               if (e.target.tagName == 'IMG' && this.utils.isRedactorParent(e.target))
-                                               {
-                                                       this.observe.image = (this.observe.image && this.observe.image == e.target) ? false : e.target;
-                                               }
-
-                                       }, this));
-
-                               },
-                               links: function()
-                               {
-                                       if (!this.opts.linkTooltip) return;
-
-                                       this.$editor.find('a').on('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid, $.proxy(this.observe.showTooltip, this));
-                                       this.$editor.on('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid, $.proxy(this.observe.closeTooltip, this));
-                                       $(document).on('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid, $.proxy(this.observe.closeTooltip, this));
-                               },
-                               getTooltipPosition: function($link)
-                               {
-                                       return $link.offset();
-                               },
-                               showTooltip: function(e)
-                               {
-                                       var $el = $(e.target);
-
-                                       if ($el[0].tagName == 'IMG')
-                                               return;
-
-                                       if ($el[0].tagName !== 'A')
-                                               $el = $el.closest('a', this.$editor[0]);
-
-                                       if ($el[0].tagName !== 'A')
-                                               return;
-
-                                       var $link = $el;
-
-                                       var pos = this.observe.getTooltipPosition($link);
-                                       var tooltip = $('<span class="redactor-link-tooltip"></span>');
-
-                                       var href = $link.attr('href');
-                                       if (href === undefined)
-                                       {
-                                               href = '';
-                                       }
-
-                                       if (href.length > 24) href = href.substring(0, 24) + '...';
-
-                                       var aLink = $('<a href="' + $link.attr('href') + '" target="_blank" />').html(href).addClass('redactor-link-tooltip-action');
-                                       var aEdit = $('<a href="#" />').html(this.lang.get('edit')).on('click', $.proxy(this.link.show, this)).addClass('redactor-link-tooltip-action');
-                                       var aUnlink = $('<a href="#" />').html(this.lang.get('unlink')).on('click', $.proxy(this.link.unlink, this)).addClass('redactor-link-tooltip-action');
-
-                                       tooltip.append(aLink).append(' | ').append(aEdit).append(' | ').append(aUnlink);
-                                       tooltip.css({
-                                               top: (pos.top + parseInt($link.css('line-height'), 10)) + 'px',
-                                               left: pos.left + 'px'
-                                       });
-
-                                       $('.redactor-link-tooltip').remove();
-                                       $('body').append(tooltip);
-                               },
-                               closeTooltip: function(e)
-                               {
-                                       e = e.originalEvent || e;
-
-                                       var target = e.target;
-                                       var $parent = $(target).closest('a', this.$editor[0]);
-                                       if ($parent.length !== 0 && $parent[0].tagName === 'A' && target.tagName !== 'A')
-                                       {
-                                               return;
-                                       }
-                                       else if ((target.tagName === 'A' && this.utils.isRedactorParent(target)) || $(target).hasClass('redactor-link-tooltip-action'))
-                                       {
-                                               return;
-                                       }
-
-                                       $('.redactor-link-tooltip').remove();
-                               }
-
-                       };
-               },
-               paragraphize: function()
-               {
-                       return {
-                               load: function(html)
-                               {
-                                       if (this.opts.linebreaks) return html;
-                                       if (html === '' || html === '<p></p>') return this.opts.emptyHtml;
-
-                                       html = html + "\n";
-
-                                       this.paragraphize.safes = [];
-                                       this.paragraphize.z = 0;
-
-                                       html = html.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi, '</blockquote>');
-
-                                       html = this.paragraphize.getSafes(html);
-                                       html = this.paragraphize.getSafesComments(html);
-                                       html = this.paragraphize.replaceBreaksToNewLines(html);
-                                       html = this.paragraphize.replaceBreaksToParagraphs(html);
-                                       html = this.paragraphize.clear(html);
-                                       html = this.paragraphize.restoreSafes(html);
-
-                                       html = html.replace(new RegExp('<br\\s?/?>\n?<(' + this.opts.paragraphizeBlocks.join('|') + ')(.*?[^>])>', 'gi'), '<p><br /></p>\n<$1$2>');
-
-                                       return $.trim(html);
-                               },
-                               getSafes: function(html)
-                               {
-                                       var $div = $('<div />').append(html);
-
-                                       // remove paragraphs in blockquotes
-                                       $div.find('blockquote p').replaceWith(function()
-                                       {
-                                               return $(this).append('<br />').contents();
-                                       });
-
-                                       html = $div.html();
-
-                                       $div.find(this.opts.paragraphizeBlocks.join(', ')).each($.proxy(function(i,s)
-                                       {
-                                               this.paragraphize.z++;
-                                               this.paragraphize.safes[this.paragraphize.z] = s.outerHTML;
-                                               html = html.replace(s.outerHTML, '\n{replace' + this.paragraphize.z + '}');
-
-                                       }, this));
-
-                                       return html;
-                               },
-                               getSafesComments: function(html)
-                               {
-                                       var commentsMatches = html.match(/<!--([\w\W]*?)-->/gi);
-
-                                       if (!commentsMatches) return html;
-
-                                       $.each(commentsMatches, $.proxy(function(i,s)
-                                       {
-                                               this.paragraphize.z++;
-                                               this.paragraphize.safes[this.paragraphize.z] = s;
-                                               html = html.replace(s, '\n{replace' + this.paragraphize.z + '}');
-                                       }, this));
-
-                                       return html;
-                               },
-                               restoreSafes: function(html)
-                               {
-                                       $.each(this.paragraphize.safes, function(i,s)
-                                       {
-                                               s = (typeof s !== 'undefined') ? s.replace(/\$/g, '&#36;') : s;
-                                               html = html.replace('{replace' + i + '}', s);
-
-                                       });
-
-                                       return html;
-                               },
-                               replaceBreaksToParagraphs: function(html)
-                               {
-                                       var htmls = html.split(new RegExp('\n', 'g'), -1);
-
-                                       html = '';
-                                       if (htmls)
-                                       {
-                                               var len = htmls.length;
-                                               for (var i = 0; i < len; i++)
-                                               {
-                                                       if (!htmls.hasOwnProperty(i)) return;
-
-                                                       if (htmls[i].search('{replace') == -1)
-                                                       {
-                                                               htmls[i] = htmls[i].replace(/<p>\n\t?<\/p>/gi, '');
-                                                               htmls[i] = htmls[i].replace(/<p><\/p>/gi, '');
-
-                                                               if (htmls[i] !== '')
-                                                               {
-                                                                       html += '<p>' +  htmls[i].replace(/^\n+|\n+$/g, "") + "</p>";
-                                                               }
-                                                       }
-                                                       else html += htmls[i];
-                                               }
-                                       }
-
-                                       return html;
-                               },
-                               replaceBreaksToNewLines: function(html)
-                               {
-                                       html = html.replace(/<br \/>\s*<br \/>/gi, "\n\n");
-                                       html = html.replace(/<br\s?\/?>\n?<br\s?\/?>/gi, "\n<br /><br />");
-
-                                       html = html.replace(new RegExp("\r\n", 'g'), "\n");
-                                       html = html.replace(new RegExp("\r", 'g'), "\n");
-                                       html = html.replace(new RegExp("/\n\n+/"), 'g', "\n\n");
-
-                                       return html;
-                               },
-                               clear: function(html)
-                               {
-                                       html = html.replace(new RegExp('</blockquote></p>', 'gi'), '</blockquote>');
-                                       html = html.replace(new RegExp('<p></blockquote>', 'gi'), '</blockquote>');
-                                       html = html.replace(new RegExp('<p><blockquote>', 'gi'), '<blockquote>');
-                                       html = html.replace(new RegExp('<blockquote></p>', 'gi'), '<blockquote>');
-
-                                       html = html.replace(new RegExp('<p><p ', 'gi'), '<p ');
-                                       html = html.replace(new RegExp('<p><p>', 'gi'), '<p>');
-                                       html = html.replace(new RegExp('</p></p>', 'gi'), '</p>');
-                                       html = html.replace(new RegExp('<p>\\s?</p>', 'gi'), '');
-                                       html = html.replace(new RegExp("\n</p>", 'gi'), '</p>');
-                                       html = html.replace(new RegExp('<p>\t?\t?\n?<p>', 'gi'), '<p>');
-                                       html = html.replace(new RegExp('<p>\t*</p>', 'gi'), '');
-
-                                       return html;
-                               }
-                       };
-               },
-               paste: function()
-               {
-                       return {
-                               init: function(e)
-                               {
-                                       if (!this.opts.cleanOnPaste)
-                                       {
-                                               setTimeout($.proxy(this.code.sync, this), 1);
-                                               return;
-                                       }
-
-                                       this.rtePaste = true;
-
-                                       this.buffer.set();
-                                       this.selection.save();
-                                       this.utils.saveScroll();
-
-                                       this.paste.createPasteBox();
-
-                                       $(window).on('scroll.redactor-freeze', $.proxy(function()
-                                       {
-                                               $(window).scrollTop(this.saveBodyScroll);
-
-                                       }, this));
-
-                                       setTimeout($.proxy(function()
-                                       {
-                                               var html = this.$pasteBox.html();
-
-                                               this.$pasteBox.remove();
-
-                                               this.selection.restore();
-                                               this.utils.restoreScroll();
-
-                                               this.paste.insert(html);
-
-                                               $(window).off('scroll.redactor-freeze');
-
-                                               if (this.linkify.isEnabled())
-                                               {
-                                                       this.linkify.format();
-                                               }
-
-                                       }, this), 1);
-                               },
-                               createPasteBox: function()
-                               {
-                                       this.$pasteBox = $('<div>').html('').attr('contenteditable', 'true').css({ position: 'fixed', width: 0, top: 0, left: '-9999px' });
-
-                                       if (this.utils.browser('msie'))
-                                       {
-                                               this.$box.append(this.$pasteBox);
-                                       }
-                                       else
-                                       {
-                                               // bootstrap modal
-                                               var $visibleModals = $('.modal-body:visible');
-                                               if ($visibleModals.length > 0)
-                                               {
-                                                       $visibleModals.append(this.$pasteBox);
-                                               }
-                                               else
-                                               {
-                                                       $('body').append(this.$pasteBox);
-                                               }
-                                       }
-
-                                       this.$pasteBox.get(0).focus();
-                               },
-                               insert: function(html)
-                               {
-                                       html = this.core.setCallback('pasteBefore', html);
-
-                                       // clean
-                                       html = (this.utils.isSelectAll()) ? this.clean.onPaste(html, false) : this.clean.onPaste(html);
-
-                                       html = this.core.setCallback('paste', html);
-
-                                       if (this.utils.isSelectAll())
-                                       {
-                                               this.insert.set(html, false);
-                                       }
-                                       else
-                                       {
-                                               this.insert.html(html, false);
-                                       }
-
-                                       this.utils.disableSelectAll();
-                                       this.rtePaste = false;
-
-                                       setTimeout($.proxy(this.clean.clearUnverified, this), 10);
-
-                                       // clean empty spans
-                                       setTimeout($.proxy(function()
-                                       {
-                                               var spans = this.$editor.find('span');
-                                               $.each(spans, function(i,s)
-                                               {
-                                                       var html = s.innerHTML.replace(/\u200B/, '');
-                                                       if (html === '' && s.attributes.length === 0) $(s).remove();
-
-                                               });
-
-                                       }, this), 10);
-
-                               }
-                       };
-               },
-               placeholder: function()
-               {
-                       return {
-                               enable: function()
-                               {
-                                       if (!this.placeholder.is()) return;
-
-                                       this.$editor.attr('placeholder', this.$element.attr('placeholder'));
-
-                                       this.placeholder.toggle();
-                                       this.$editor.on('keydown.redactor-placeholder', $.proxy(this.placeholder.toggle, this));
-                               },
-                               toggle: function()
-                               {
-                                       setTimeout($.proxy(function()
-                                       {
-                                               var func = this.utils.isEmpty(this.$editor.html(), false) ? 'addClass' : 'removeClass';
-                                               this.$editor[func]('redactor-placeholder');
-
-                                       }, this), 5);
-                               },
-                               remove: function()
-                               {
-                                       this.$editor.removeClass('redactor-placeholder');
-                               },
-                               is: function()
-                               {
-                                       if (this.opts.placeholder)
-                                       {
-                                               return this.$element.attr('placeholder', this.opts.placeholder);
-                                       }
-                                       else
-                                       {
-                                               return !(typeof this.$element.attr('placeholder') == 'undefined' || this.$element.attr('placeholder') === '');
-                                       }
-                               }
-                       };
-               },
-               progress: function()
-               {
-                       return {
-                               show: function()
-                               {
-                                       $(document.body).append($('<div id="redactor-progress"><span></span></div>'));
-                                       $('#redactor-progress').fadeIn();
-                               },
-                               hide: function()
-                               {
-                                       $('#redactor-progress').fadeOut(1500, function()
-                                       {
-                                               $(this).remove();
-                                       });
-                               }
-
-                       };
-               },
-               selection: function()
-               {
-                       return {
-                               get: function()
-                               {
-                                       this.sel = document.getSelection();
-
-                                       if (document.getSelection && this.sel.getRangeAt && this.sel.rangeCount)
-                                       {
-                                               this.range = this.sel.getRangeAt(0);
-                                       }
-                                       else
-                                       {
-                                               this.range = document.createRange();
-                                       }
-                               },
-                               addRange: function()
-                               {
-                                       try {
-                                               this.sel.removeAllRanges();
-                                       } catch (e) {}
-
-                                       this.sel.addRange(this.range);
-                               },
-                               getCurrent: function()
-                               {
-                                       var el = false;
-
-                                       this.selection.get();
-
-                                       if (this.sel && this.sel.rangeCount > 0)
-                                       {
-                                               el = this.sel.getRangeAt(0).startContainer;
-                                       }
-
-                                       return this.utils.isRedactorParent(el);
-                               },
-                               getParent: function(elem)
-                               {
-                                       elem = elem || this.selection.getCurrent();
-                                       if (elem)
-                                       {
-                                               return this.utils.isRedactorParent($(elem).parent()[0]);
-                                       }
-
-                                       return false;
-                               },
-                               getPrev: function()
-                               {
-                                       return  window.getSelection().anchorNode.previousSibling;
-                               },
-                               getNext: function()
-                               {
-                                       return window.getSelection().anchorNode.nextSibling;
-                               },
-                               getBlock: function(node)
-                               {
-                                       node = node || this.selection.getCurrent();
-
-                                       while (node)
-                                       {
-                                               if (this.utils.isBlockTag(node.tagName))
-                                               {
-                                                       return ($(node).hasClass('redactor-editor')) ? false : node;
-                                               }
-
-                                               node = node.parentNode;
-                                       }
-
-                                       return false;
-                               },
-                               getInlines: function(nodes, tags)
-                               {
-                                       this.selection.get();
-
-                                       if (this.range && this.range.collapsed)
-                                       {
-                                               return false;
-                                       }
-
-                                       var inlines = [];
-                                       nodes = (typeof nodes == 'undefined' || nodes === false) ? this.selection.getNodes() : nodes;
-                                       var inlineTags = this.opts.inlineTags;
-                                       inlineTags.push('span');
-
-                                       if (typeof tags !== 'undefined')
-                                       {
-                                               for (var i = 0; i < tags.length; i++)
-                                               {
-                                                       inlineTags.push(tags[i]);
-                                               }
-                                       }
-
-                                       $.each(nodes, $.proxy(function(i,node)
-                                       {
-                                               if ($.inArray(node.tagName.toLowerCase(), inlineTags) != -1)
-                                               {
-                                                       inlines.push(node);
-                                               }
-
-                                       }, this));
-
-                                       return (inlines.length === 0) ? false : inlines;
-                               },
-                               getInlinesTags: function(tags)
-                               {
-                                       this.selection.get();
-
-                                       if (this.range && this.range.collapsed)
-                                       {
-                                               return false;
-                                       }
-
-                                       var inlines = [];
-                                       var nodes =  this.selection.getNodes();
-                                       $.each(nodes, $.proxy(function(i,node)
-                                       {
-                                               if ($.inArray(node.tagName.toLowerCase(), tags) != -1)
-                                               {
-                                                       inlines.push(node);
-                                               }
-
-                                       }, this));
-
-                                       return (inlines.length === 0) ? false : inlines;
-                               },
-                               getBlocks: function(nodes)
-                               {
-                                       this.selection.get();
-
-                                       if (this.range && this.range.collapsed)
-                                       {
-                                               return [this.selection.getBlock()];
-                                       }
-
-                                       var blocks = [];
-                                       nodes = (typeof nodes == 'undefined') ? this.selection.getNodes() : nodes;
-
-                                       $.each(nodes, $.proxy(function(i,node)
-                                       {
-                                               if (this.utils.isBlock(node))
-                                               {
-                                                       blocks.push(node);
-                                               }
-
-                                       }, this));
-
-                                       return (blocks.length === 0) ? [this.selection.getBlock()] : blocks;
-                               },
-                               getLastBlock: function()
-                               {
-                                       return this.selection.lastBlock;
-                               },
-                               getNodes: function()
-                               {
-                                       this.selection.get();
-
-                                       var startNode = this.selection.getNodesMarker(1);
-                                       var endNode = this.selection.getNodesMarker(2);
-
-                                       if (this.range.collapsed === false)
-                                       {
-                                          if (window.getSelection) {
-                                               var sel = window.getSelection();
-                                               if (sel.rangeCount > 0) {
-
-                                                   var range = sel.getRangeAt(0);
-                                                   var startPointNode = range.startContainer, startOffset = range.startOffset;
-
-                                                   var boundaryRange = range.cloneRange();
-                                                   boundaryRange.collapse(false);
-                                                   boundaryRange.insertNode(endNode);
-                                                   boundaryRange.setStart(startPointNode, startOffset);
-                                                   boundaryRange.collapse(true);
-                                                   boundaryRange.insertNode(startNode);
-
-                                                   // Reselect the original text
-                                                   range.setStartAfter(startNode);
-                                                   range.setEndBefore(endNode);
-                                                   sel.removeAllRanges();
-                                                   sel.addRange(range);
-                                               }
-                                           }
-                                       }
-                                       else
-                                       {
-                                               this.selection.setNodesMarker(this.range, startNode, true);
-                                               endNode = startNode;
-                                       }
-
-                                       var nodes = [];
-                                       var counter = 0;
-
-                                       var self = this;
-                                       this.$editor.find('*').each(function()
-                                       {
-                                               if (this == startNode)
-                                               {
-                                                       var parent = $(this).parent();
-                                                       if (parent.length !== 0 && parent[0].tagName != 'BODY' && self.utils.isRedactorParent(parent[0]))
-                                                       {
-                                                               nodes.push(parent[0]);
-                                                       }
-
-                                                       nodes.push(this);
-                                                       counter = 1;
-                                               }
-                                               else
-                                               {
-                                                       if (counter > 0)
-                                                       {
-                                                               nodes.push(this);
-                                                               counter = counter + 1;
-                                                       }
-                                               }
-
-                                               if (this == endNode)
-                                               {
-                                                       return false;
-                                               }
-
-                                       });
-
-                                       var finalNodes = [];
-                                       var len = nodes.length;
-                                       for (var i = 0; i < len; i++)
-                                       {
-                                               if (nodes[i].id != 'nodes-marker-1' && nodes[i].id != 'nodes-marker-2')
-                                               {
-                                                       finalNodes.push(nodes[i]);
-                                               }
-                                       }
-
-                                       this.selection.removeNodesMarkers();
-
-                                       return finalNodes;
-
-                               },
-                               getNodesMarker: function(num)
-                               {
-                                       return $('<span id="nodes-marker-' + num + '" class="redactor-nodes-marker" data-verified="redactor">' + this.opts.invisibleSpace + '</span>')[0];
-                               },
-                               setNodesMarker: function(range, node, type)
-                               {
-                                       var range = range.cloneRange();
-
-                                       try {
-                                               range.collapse(type);
-                                               range.insertNode(node);
-                                       }
-                                       catch (e) {}
-                               },
-                               removeNodesMarkers: function()
-                               {
-                                       $(document).find('span.redactor-nodes-marker').remove();
-                                       this.$editor.find('span.redactor-nodes-marker').remove();
-                               },
-                               fromPoint: function(start, end)
-                               {
-                                       this.caret.setOffset(start, end);
-                               },
-                               wrap: function(tag)
-                               {
-                                       this.selection.get();
-
-                                       if (this.range.collapsed) return false;
-
-                                       var wrapper = document.createElement(tag);
-                                       wrapper.appendChild(this.range.extractContents());
-                                       this.range.insertNode(wrapper);
-
-                                       return wrapper;
-                               },
-                               selectElement: function(node)
-                               {
-                                       if (this.utils.browser('mozilla'))
-                                       {
-                                               node = node[0] || node;
-
-                                               var range = document.createRange();
-                                               range.selectNodeContents(node);
-                                       }
-                                       else
-                                       {
-                                               this.caret.set(node, 0, node, 1);
-                                       }
-                               },
-                               selectAll: function()
-                               {
-                                       this.selection.get();
-                                       this.range.selectNodeContents(this.$editor[0]);
-                                       this.selection.addRange();
-                               },
-                               remove: function()
-                               {
-                                       this.selection.get();
-                                       this.sel.removeAllRanges();
-                               },
-                               save: function()
-                               {
-                                       this.selection.createMarkers();
-                               },
-                               createMarkers: function()
-                               {
-                                       this.selection.get();
-
-                                       var node1 = this.selection.getMarker(1);
-
-                                       this.selection.setMarker(this.range, node1, true);
-                                       if (this.range.collapsed === false)
-                                       {
-                                               var node2 = this.selection.getMarker(2);
-                                               this.selection.setMarker(this.range, node2, false);
-                                       }
-
-                                       this.savedSel = this.$editor.html();
-                               },
-                               getMarker: function(num)
-                               {
-                                       if (typeof num == 'undefined') num = 1;
-
-                                       return $('<span id="selection-marker-' + num + '" class="redactor-selection-marker"  data-verified="redactor">' + this.opts.invisibleSpace + '</span>')[0];
-                               },
-                               getMarkerAsHtml: function(num)
-                               {
-                                       return this.utils.getOuterHtml(this.selection.getMarker(num));
-                               },
-                               setMarker: function(range, node, type)
-                               {
-                                       range = range.cloneRange();
-
-                                       try {
-                                               range.collapse(type);
-                                               range.insertNode(node);
-
-                                       }
-                                       catch (e)
-                                       {
-                                               this.focus.setStart();
-                                       }
-
-                               },
-                               restore: function()
-                               {
-                                       var node1 = this.$editor.find('span#selection-marker-1');
-                                       var node2 = this.$editor.find('span#selection-marker-2');
-
-                                       if (this.utils.browser('mozilla'))
-                                       {
-                                               this.$editor.focus();
-                                       }
-
-                                       if (node1.length !== 0 && node2.length !== 0)
-                                       {
-                                               this.caret.set(node1, 0, node2, 0);
-                                       }
-                                       else if (node1.length !== 0)
-                                       {
-                                               this.caret.set(node1, 0, node1, 0);
-                                       }
-                                       else
-                                       {
-                                               this.$editor.focus();
-                                       }
-
-                                       this.selection.removeMarkers();
-                                       this.savedSel = false;
-
-                               },
-                               removeMarkers: function()
-                               {
-                                       this.$editor.find('span.redactor-selection-marker').each(function(i,s)
-                                       {
-                                               var text = $(s).text().replace(/\u200B/g, '');
-                                               if (text === '') $(s).remove();
-                                               else $(s).replaceWith(function() { return $(this).contents(); });
-                                       });
-                               },
-                               getText: function()
-                               {
-                                       this.selection.get();
-
-                                       return this.sel.toString();
-                               },
-                               getHtml: function()
-                               {
-                                       var html = '';
-
-                                       this.selection.get();
-                                       if (this.sel.rangeCount)
-                                       {
-                                               var container = document.createElement('div');
-                                               var len = this.sel.rangeCount;
-                                               for (var i = 0; i < len; ++i)
-                                               {
-                                                       container.appendChild(this.sel.getRangeAt(i).cloneContents());
-                                               }
-
-                                               html = container.innerHTML;
-                                       }
-
-                                       return this.clean.onSync(html);
-                               },
-                               replaceSelection: function(html)
-                               {
-                                       this.selection.get();
-                                       this.range.deleteContents();
-                                       var div = document.createElement("div");
-                                       div.innerHTML = html;
-                                       var frag = document.createDocumentFragment(), child;
-                                       while ((child = div.firstChild)) {
-                                               frag.appendChild(child);
-                                       }
-
-                                       this.range.insertNode(frag);
-                               },
-                               replaceWithHtml: function(html)
-                               {
-                                       html = this.selection.getMarkerAsHtml(1) + html + this.selection.getMarkerAsHtml(2);
-
-                                       this.selection.get();
-
-                                       if (window.getSelection && window.getSelection().getRangeAt)
-                                       {
-                                               this.selection.replaceSelection(html);
-                                       }
-                                       else if (document.selection && document.selection.createRange)
-                                       {
-                                               this.range.pasteHTML(html);
-                                       }
-
-                                       this.selection.restore();
-                                       this.code.sync();
-                               }
-                       };
-               },
-               shortcuts: function()
-               {
-                       return {
-                               init: function(e, key)
-                               {
-                                       // disable browser's hot keys for bold and italic
-                                       if (!this.opts.shortcuts)
-                                       {
-                                               if ((e.ctrlKey || e.metaKey) && (key === 66 || key === 73)) e.preventDefault();
-                                               return false;
-                                       }
-
-                                       $.each(this.opts.shortcuts, $.proxy(function(str, command)
-                                       {
-                                               var keys = str.split(',');
-                                               var len = keys.length;
-                                               for (var i = 0; i < len; i++)
-                                               {
-                                                       if (typeof keys[i] === 'string')
-                                                       {
-                                                               this.shortcuts.handler(e, $.trim(keys[i]), $.proxy(function()
-                                                               {
-                                                                       var func;
-                                                                       if (command.func.search(/\./) != '-1')
-                                                                       {
-                                                                               func = command.func.split('.');
-                                                                               if (typeof this[func[0]] != 'undefined')
-                                                                               {
-                                                                                       this[func[0]][func[1]].apply(this, command.params);
-                                                                               }
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                               this[command.func].apply(this, command.params);
-                                                                       }
-
-                                                               }, this));
-                                                       }
-
-                                               }
-
-                                       }, this));
-                               },
-                               handler: function(e, keys, origHandler)
-                               {
-                                       // based on https://github.com/jeresig/jquery.hotkeys
-                                       var hotkeysSpecialKeys =
-                                       {
-                                               8: "backspace", 9: "tab", 10: "return", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
-                                               20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
-                                               37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 59: ";", 61: "=",
-                                               96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
-                                               104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
-                                               112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
-                                               120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 173: "-", 186: ";", 187: "=",
-                                               188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'"
-                                       };
-
-
-                                       var hotkeysShiftNums =
-                                       {
-                                               "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
-                                               "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
-                                               ".": ">",  "/": "?",  "\\": "|"
-                                       };
-
-                                       keys = keys.toLowerCase().split(" ");
-                                       var special = hotkeysSpecialKeys[e.keyCode],
-                                               character = String.fromCharCode( e.which ).toLowerCase(),
-                                               modif = "", possible = {};
-
-                                       $.each([ "alt", "ctrl", "meta", "shift"], function(index, specialKey)
-                                       {
-                                               if (e[specialKey + 'Key'] && special !== specialKey)
-                                               {
-                                                       modif += specialKey + '+';
-                                               }
-                                       });
-
-
-                                       if (special) possible[modif + special] = true;
-                                       if (character)
-                                       {
-                                               possible[modif + character] = true;
-                                               possible[modif + hotkeysShiftNums[character]] = true;
-
-                                               // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
-                                               if (modif === "shift+")
-                                               {
-                                                       possible[hotkeysShiftNums[character]] = true;
-                                               }
-                                       }
-
-                                       for (var i = 0, len = keys.length; i < len; i++)
-                                       {
-                                               if (possible[keys[i]])
-                                               {
-                                                       e.preventDefault();
-                                                       return origHandler.apply(this, arguments);
-                                               }
-                                       }
-                               }
-                       };
-               },
-               tabifier: function()
-               {
-                       return {
-                               get: function(code)
-                               {
-                                       if (!this.opts.tabifier) return code;
-
-                                       // clean setup
-                                       var ownLine = ['area', 'body', 'head', 'hr', 'i?frame', 'link', 'meta', 'noscript', 'style', 'script', 'table', 'tbody', 'thead', 'tfoot'];
-                                       var contOwnLine = ['li', 'dt', 'dt', 'h[1-6]', 'option', 'script'];
-                                       var newLevel = ['p', 'blockquote', 'div', 'dl', 'fieldset', 'form', 'frameset', 'map', 'ol', 'pre', 'select', 'td', 'th', 'tr', 'ul'];
-
-                                       this.tabifier.lineBefore = new RegExp('^<(/?' + ownLine.join('|/?' ) + '|' + contOwnLine.join('|') + ')[ >]');
-                                       this.tabifier.lineAfter = new RegExp('^<(br|/?' + ownLine.join('|/?' ) + '|/' + contOwnLine.join('|/') + ')[ >]');
-                                       this.tabifier.newLevel = new RegExp('^</?(' + newLevel.join('|' ) + ')[ >]');
-
-                                       var i = 0,
-                                       codeLength = code.length,
-                                       point = 0,
-                                       start = null,
-                                       end = null,
-                                       tag = '',
-                                       out = '',
-                                       cont = '';
-
-                                       this.tabifier.cleanlevel = 0;
-
-                                       for (; i < codeLength; i++)
-                                       {
-                                               point = i;
-
-                                               // if no more tags, copy and exit
-                                               if (-1 == code.substr(i).indexOf( '<' ))
-                                               {
-                                                       out += code.substr(i);
-
-                                                       return this.tabifier.finish(out);
-                                               }
-
-                                               // copy verbatim until a tag
-                                               while (point < codeLength && code.charAt(point) != '<')
-                                               {
-                                                       point++;
-                                               }
-
-                                               if (i != point)
-                                               {
-                                                       cont = code.substr(i, point - i);
-                                                       if (!cont.match(/^\s{2,}$/g))
-                                                       {
-                                                               if ('\n' == out.charAt(out.length - 1)) out += this.tabifier.getTabs();
-                                                               else if ('\n' == cont.charAt(0))
-                                                               {
-                                                                       out += '\n' + this.tabifier.getTabs();
-                                                                       cont = cont.replace(/^\s+/, '');
-                                                               }
-
-                                                               out += cont;
-                                                       }
-
-                                                       if (cont.match(/\n/)) out += '\n' + this.tabifier.getTabs();
-                                               }
-
-                                               start = point;
-
-                                               // find the end of the tag
-                                               while (point < codeLength && '>' != code.charAt(point))
-                                               {
-                                                       point++;
-                                               }
-
-                                               tag = code.substr(start, point - start);
-                                               i = point;
-
-                                               var t;
-
-                                               if ('!--' == tag.substr(1, 3))
-                                               {
-                                                       if (!tag.match(/--$/))
-                                                       {
-                                                               while ('-->' != code.substr(point, 3))
-                                                               {
-                                                                       point++;
-                                                               }
-                                                               point += 2;
-                                                               tag = code.substr(start, point - start);
-                                                               i = point;
-                                                       }
-
-                                                       if ('\n' != out.charAt(out.length - 1)) out += '\n';
-
-                                                       out += this.tabifier.getTabs();
-                                                       out += tag + '>\n';
-                                               }
-                                               else if ('!' == tag[1])
-                                               {
-                                                       out = this.tabifier.placeTag(tag + '>', out);
-                                               }
-                                               else if ('?' == tag[1])
-                                               {
-                                                       out += tag + '>\n';
-                                               }
-                                               else if (t = tag.match(/^<(script|style|pre)/i))
-                                               {
-                                                       t[1] = t[1].toLowerCase();
-                                                       tag = this.tabifier.cleanTag(tag);
-                                                       out = this.tabifier.placeTag(tag, out);
-                                                       end = String(code.substr(i + 1)).toLowerCase().indexOf('</' + t[1]);
-
-                                                       if (end)
-                                                       {
-                                                               cont = code.substr(i + 1, end);
-                                                               i += end;
-                                                               out += cont;
-                                                       }
-                                               }
-                                               else
-                                               {
-                                                       tag = this.tabifier.cleanTag(tag);
-                                                       out = this.tabifier.placeTag(tag, out);
-                                               }
-                                       }
-
-                                       return this.tabifier.finish(out);
-                               },
-                               getTabs: function()
-                               {
-                                       var s = '';
-                                       for ( var j = 0; j < this.tabifier.cleanlevel; j++ )
-                                       {
-                                               s += '\t';
-                                       }
-
-                                       return s;
-                               },
-                               finish: function(code)
-                               {
-                                       code = code.replace(/\n\s*\n/g, '\n');
-                                       code = code.replace(/^[\s\n]*/, '');
-                                       code = code.replace(/[\s\n]*$/, '');
-                                       code = code.replace(/<script(.*?)>\n<\/script>/gi, '<script$1></script>');
-
-                                       this.tabifier.cleanlevel = 0;
-
-                                       return code;
-                               },
-                               cleanTag: function (tag)
-                               {
-                                       var tagout = '';
-                                       tag = tag.replace(/\n/g, ' ');
-                                       tag = tag.replace(/\s{2,}/g, ' ');
-                                       tag = tag.replace(/^\s+|\s+$/g, ' ');
-
-                                       var suffix = '';
-                                       if (tag.match(/\/$/))
-                                       {
-                                               suffix = '/';
-                                               tag = tag.replace(/\/+$/, '');
-                                       }
-
-                                       var m;
-                                       while (m = /\s*([^= ]+)(?:=((['"']).*?\3|[^ ]+))?/.exec(tag))
-                                       {
-                                               if (m[2]) tagout += m[1].toLowerCase() + '=' + m[2];
-                                               else if (m[1]) tagout += m[1].toLowerCase();
-
-                                               tagout += ' ';
-                                               tag = tag.substr(m[0].length);
-                                       }
-
-                                       return tagout.replace(/\s*$/, '') + suffix + '>';
-                               },
-                               placeTag: function (tag, out)
-                               {
-                                       var nl = tag.match(this.tabifier.newLevel);
-
-                                       if (tag.match(this.tabifier.lineBefore) || nl)
-                                       {
-                                               out = out.replace(/\s*$/, '');
-                                               out += '\n';
-                                       }
-
-                                       if (nl && '/' == tag.charAt(1)) this.tabifier.cleanlevel--;
-                                       if ('\n' == out.charAt(out.length - 1)) out += this.tabifier.getTabs();
-                                       if (nl && '/' != tag.charAt(1)) this.tabifier.cleanlevel++;
-
-                                       out += tag;
-
-                                       if (tag.match(this.tabifier.lineAfter) || tag.match(this.tabifier.newLevel))
-                                       {
-                                               out = out.replace(/ *$/, '');
-                                               //out += '\n';
-                                       }
-
-                                       return out;
-                               }
-                       };
-               },
-               tidy: function()
-               {
-                       return {
-                               setupAllowed: function()
-                               {
-                                       var index = $.inArray('span', this.opts.removeEmpty);
-                                       if (index !== -1)
-                                       {
-                                               this.opts.removeEmpty.splice(index, 1);
-                                       }
-
-                                       if (this.opts.allowedTags) this.opts.deniedTags = false;
-                                       if (this.opts.allowedAttr) this.opts.removeAttr = false;
-
-                                       if (this.opts.linebreaks) return;
-
-                                       var tags = ['p', 'section'];
-                                       if (this.opts.allowedTags) this.tidy.addToAllowed(tags);
-                                       if (this.opts.deniedTags) this.tidy.removeFromDenied(tags);
-
-                               },
-                               addToAllowed: function(tags)
-                               {
-                                       var len = tags.length;
-                                       for (var i = 0; i < len; i++)
-                                       {
-                                               if ($.inArray(tags[i], this.opts.allowedTags) == -1)
-                                               {
-                                                       this.opts.allowedTags.push(tags[i]);
-                                               }
-                                       }
-                               },
-                               removeFromDenied: function(tags)
-                               {
-                                       var len = tags.length;
-                                       for (var i = 0; i < len; i++)
-                                       {
-                                               var pos = $.inArray(tags[i], this.opts.deniedTags);
-                                               if (pos != -1)
-                                               {
-                                                       this.opts.deniedTags.splice(pos, 1);
-                                               }
-                                       }
-                               },
-                               load: function(html, options)
-                               {
-                                       this.tidy.settings = {
-                                               deniedTags: this.opts.deniedTags,
-                                               allowedTags: this.opts.allowedTags,
-                                               removeComments: this.opts.removeComments,
-                                               replaceTags: this.opts.replaceTags,
-                                               replaceStyles: this.opts.replaceStyles,
-                                               removeDataAttr: this.opts.removeDataAttr,
-                                               removeAttr: this.opts.removeAttr,
-                                               allowedAttr: this.opts.allowedAttr,
-                                               removeWithoutAttr: this.opts.removeWithoutAttr,
-                                               removeEmpty: this.opts.removeEmpty
-                                       };
-
-                                       $.extend(this.tidy.settings, options);
-
-                                       html = this.tidy.removeComments(html);
-
-                                       // create container
-                                       this.tidy.$div = $('<div />').append(html);
-
-                                       // clean
-                                       this.tidy.replaceTags();
-                                       this.tidy.replaceStyles();
-                                       this.tidy.removeTags();
-
-                                       this.tidy.removeAttr();
-                                       this.tidy.removeEmpty();
-                                       this.tidy.removeParagraphsInLists();
-                                       this.tidy.removeDataAttr();
-                                       this.tidy.removeWithoutAttr();
-
-                                       html = this.tidy.$div.html();
-                                       this.tidy.$div.remove();
-
-                                       return html;
-                               },
-                               removeComments: function(html)
-                               {
-                                       if (!this.tidy.settings.removeComments) return html;
-
-                                       return html.replace(/<!--[\s\S]*?-->/gi, '');
-                               },
-                               replaceTags: function(html)
-                               {
-                                       if (!this.tidy.settings.replaceTags) return html;
-
-                                       var len = this.tidy.settings.replaceTags.length;
-                                       var replacement = [], rTags = [];
-                                       for (var i = 0; i < len; i++)
-                                       {
-                                               rTags.push(this.tidy.settings.replaceTags[i][1]);
-                                               replacement.push(this.tidy.settings.replaceTags[i][0]);
-                                       }
-
-                                       $.each(replacement, $.proxy(function(key, value)
-                                       {
-                                               this.tidy.$div.find(value).replaceWith(function()
-                                               {
-                                                       return $("<" + rTags[key] + " />", {html: $(this).html()});
-                                               });
-                                       }, this));
-                               },
-                               replaceStyles: function()
-                               {
-                                       if (!this.tidy.settings.replaceStyles) return;
-
-                                       var len = this.tidy.settings.replaceStyles.length;
-                                       this.tidy.$div.find('span').each($.proxy(function(n,s)
-                                       {
-                                               var $el = $(s);
-                                               var style = $el.attr('style');
-                                               for (var i = 0; i < len; i++)
-                                               {
-                                                       if (style && style.match(new RegExp('^' + this.tidy.settings.replaceStyles[i][0], 'i')))
-                                                       {
-                                                               var tagName = this.tidy.settings.replaceStyles[i][1];
-                                                               $el.replaceWith(function()
-                                                               {
-                                                                       var tag = document.createElement(tagName);
-                                                                       return $(tag).append($(this).contents());
-                                                               });
-                                                       }
-                                               }
-
-                                       }, this));
-
-                               },
-                               removeTags: function()
-                               {
-                                       if (!this.tidy.settings.deniedTags && this.tidy.settings.allowedTags)
-                                       {
-                                               this.tidy.$div.find('*').not(this.tidy.settings.allowedTags.join(',')).each(function(i, s)
-                                               {
-                                                       if (s.innerHTML === '') $(s).remove();
-                                                       else $(s).contents().unwrap();
-                                               });
-                                       }
-
-                                       if (this.tidy.settings.deniedTags)
-                                       {
-                                               this.tidy.$div.find(this.tidy.settings.deniedTags.join(',')).each(function(i, s)
-                                               {
-                                                       if ($(s).hasClass('redactor-script-tag') || $(s).hasClass('redactor-selection-marker')) return;
-
-                                                       if (s.innerHTML === '') $(s).remove();
-                                                       else $(s).contents().unwrap();
-                                               });
-                                       }
-                               },
-                               removeAttr: function()
-                               {
-                                       var len;
-                                       if (!this.tidy.settings.removeAttr && this.tidy.settings.allowedAttr)
-                                       {
-
-                                               var allowedAttrTags = [], allowedAttrData = [];
-                                               len = this.tidy.settings.allowedAttr.length;
-                                               for (var i = 0; i < len; i++)
-                                               {
-                                                       allowedAttrTags.push(this.tidy.settings.allowedAttr[i][0]);
-                                                       allowedAttrData.push(this.tidy.settings.allowedAttr[i][1]);
-                                               }
-
-
-                                               this.tidy.$div.find('*').each($.proxy(function(n,s)
-                                               {
-                                                       var $el = $(s);
-                                                       var pos = $.inArray($el[0].tagName.toLowerCase(), allowedAttrTags);
-                                                       var attributesRemove = this.tidy.removeAttrGetRemoves(pos, allowedAttrData, $el);
-
-                                                       if (attributesRemove)
-                                                       {
-                                                               $.each(attributesRemove, function(z,f) {
-                                                                       $el.removeAttr(f);
-                                                               });
-                                                       }
-                                               }, this));
-                                       }
-
-                                       if (this.tidy.settings.removeAttr)
-                                       {
-                                               len = this.tidy.settings.removeAttr.length;
-                                               for (var i = 0; i < len; i++)
-                                               {
-                                                       var attrs = this.tidy.settings.removeAttr[i][1];
-                                                       if ($.isArray(attrs)) attrs = attrs.join(' ');
-
-                                                       this.tidy.$div.find(this.tidy.settings.removeAttr[i][0]).removeAttr(attrs);
-                                               }
-                                       }
-
-                               },
-                               removeAttrGetRemoves: function(pos, allowed, $el)
-                               {
-                                       var attributesRemove = [];
-
-                                       // remove all attrs
-                                       if (pos == -1)
-                                       {
-                                               $.each($el[0].attributes, function(i, item)
-                                               {
-                                                       attributesRemove.push(item.name);
-                                               });
-
-                                       }
-                                       // allow all attrs
-                                       else if (allowed[pos] == '*')
-                                       {
-                                               attributesRemove = [];
-                                       }
-                                       // allow specific attrs
-                                       else
-                                       {
-                                               $.each($el[0].attributes, function(i, item)
-                                               {
-                                                       if ($.isArray(allowed[pos]))
-                                                       {
-                                                               if ($.inArray(item.name, allowed[pos]) == -1)
-                                                               {
-                                                                       attributesRemove.push(item.name);
-                                                               }
-                                                       }
-                                                       else if (allowed[pos] != item.name)
-                                                       {
-                                                               attributesRemove.push(item.name);
-                                                       }
-
-                                               });
-                                       }
-
-                                       return attributesRemove;
-                               },
-                               removeAttrs: function (el, regex)
-                               {
-                                       regex = new RegExp(regex, "g");
-                                       return el.each(function()
-                                       {
-                                               var self = $(this);
-                                               var len = this.attributes.length - 1;
-                                               for (var i = len; i >= 0; i--)
-                                               {
-                                                       var item = this.attributes[i];
-                                                       if (item && item.specified && item.name.search(regex)>=0)
-                                                       {
-                                                               self.removeAttr(item.name);
-                                                       }
-                                               }
-                                       });
-                               },
-                               removeEmpty: function()
-                               {
-                                       if (!this.tidy.settings.removeEmpty) return;
-
-                                       this.tidy.$div.find(this.tidy.settings.removeEmpty.join(',')).each(function()
-                                       {
-                                               var $el = $(this);
-                                               var text = $el.text();
-                                               text = text.replace(/\u200B/g, '');
-                                               text = text.replace(/&nbsp;/gi, '');
-                                               text = text.replace(/\s/g, '');
-
-                               if (text === '' && $el.children().length === 0)
-                               {
-                                       $el.remove();
-                               }
-                                       });
-                               },
-                               removeParagraphsInLists: function()
-                               {
-                                       this.tidy.$div.find('li p').contents().unwrap();
-                               },
-                               removeDataAttr: function()
-                               {
-                                       if (!this.tidy.settings.removeDataAttr) return;
-
-                                       var tags = this.tidy.settings.removeDataAttr;
-                                       if ($.isArray(this.tidy.settings.removeDataAttr)) tags = this.tidy.settings.removeDataAttr.join(',');
-
-                                       this.tidy.removeAttrs(this.tidy.$div.find(tags), '^(data-)');
-
-                               },
-                               removeWithoutAttr: function()
-                               {
-                                       if (!this.tidy.settings.removeWithoutAttr) return;
-
-                                       this.tidy.$div.find(this.tidy.settings.removeWithoutAttr.join(',')).each(function()
-                                       {
-                                               if (this.attributes.length === 0)
-                                               {
-                                                       $(this).contents().unwrap();
-                                               }
-                                       });
-                               }
-                       };
-               },
-               toolbar: function()
-               {
-                       return {
-                               init: function()
-                               {
-                                       return {
-                                               html:
-                                               {
-                                                       title: this.lang.get('html'),
-                                                       func: 'code.toggle'
-                                               },
-                                               formatting:
-                                               {
-                                                       title: this.lang.get('formatting'),
-                                                       dropdown:
-                                                       {
-                                                               p:
-                                                               {
-                                                                       title: this.lang.get('paragraph'),
-                                                                       func: 'block.format'
-                                                               },
-                                                               blockquote:
-                                                               {
-                                                                       title: this.lang.get('quote'),
-                                                                       func: 'block.format'
-                                                               },
-                                                               pre:
-                                                               {
-                                                                       title: this.lang.get('code'),
-                                                                       func: 'block.format'
-                                                               },
-                                                               h1:
-                                                               {
-                                                                       title: this.lang.get('header1'),
-                                                                       func: 'block.format'
-                                                               },
-                                                               h2:
-                                                               {
-                                                                       title: this.lang.get('header2'),
-                                                                       func: 'block.format'
-                                                               },
-                                                               h3:
-                                                               {
-                                                                       title: this.lang.get('header3'),
-                                                                       func: 'block.format'
-                                                               },
-                                                               h4:
-                                                               {
-                                                                       title: this.lang.get('header4'),
-                                                                       func: 'block.format'
-                                                               },
-                                                               h5:
-                                                               {
-                                                                       title: this.lang.get('header5'),
-                                                                       func: 'block.format'
-                                                               }
-                                                       }
-                                               },
-                                               bold:
-                                               {
-                                                       title: this.lang.get('bold'),
-                                                       func: 'inline.format'
-                                               },
-                                               italic:
-                                               {
-                                                       title: this.lang.get('italic'),
-                                                       func: 'inline.format'
-                                               },
-                                               deleted:
-                                               {
-                                                       title: this.lang.get('deleted'),
-                                                       func: 'inline.format'
-                                               },
-                                               underline:
-                                               {
-                                                       title: this.lang.get('underline'),
-                                                       func: 'inline.format'
-                                               },
-                                               unorderedlist:
-                                               {
-                                                       title: '&bull; ' + this.lang.get('unorderedlist'),
-                                                       func: 'list.toggle'
-                                               },
-                                               orderedlist:
-                                               {
-                                                       title: '1. ' + this.lang.get('orderedlist'),
-                                                       func: 'list.toggle'
-                                               },
-                                               outdent:
-                                               {
-                                                       title: '< ' + this.lang.get('outdent'),
-                                                       func: 'indent.decrease'
-                                               },
-                                               indent:
-                                               {
-                                                       title: '> ' + this.lang.get('indent'),
-                                                       func: 'indent.increase'
-                                               },
-                                               image:
-                                               {
-                                                       title: this.lang.get('image'),
-                                                       func: 'image.show'
-                                               },
-                                               file:
-                                               {
-                                                       title: this.lang.get('file'),
-                                                       func: 'file.show'
-                                               },
-                                               link:
-                                               {
-                                                       title: this.lang.get('link'),
-                                                       dropdown:
-                                                       {
-                                                               link:
-                                                               {
-                                                                       title: this.lang.get('link_insert'),
-                                                                       func: 'link.show',
-                                                                       observe: {
-                                                                               element: 'a',
-                                                                               in: {
-                                                                                       title: this.lang.get('link_edit'),
-                                                                               },
-                                                                               out: {
-                                                                                       title: this.lang.get('link_insert')
-                                                                               }
-                                                                       }
-                                                               },
-                                                               unlink:
-                                                               {
-                                                                       title: this.lang.get('unlink'),
-                                                                       func: 'link.unlink',
-                                                                       observe: {
-                                                                               element: 'a',
-                                                                               out: {
-                                                                                       attr: {
-                                                                                               'class': 'redactor-dropdown-link-inactive',
-                                                                                               'aria-disabled': true
-                                                                                       }
-                                                                               }
-                                                                       }
-                                                               }
-                                                       }
-                                               },
-                                               alignment:
-                                               {
-                                                       title: this.lang.get('alignment'),
-                                                       dropdown:
-                                                       {
-                                                               left:
-                                                               {
-                                                                       title: this.lang.get('align_left'),
-                                                                       func: 'alignment.left'
-                                                               },
-                                                               center:
-                                                               {
-                                                                       title: this.lang.get('align_center'),
-                                                                       func: 'alignment.center'
-                                                               },
-                                                               right:
-                                                               {
-                                                                       title: this.lang.get('align_right'),
-                                                                       func: 'alignment.right'
-                                                               },
-                                                               justify:
-                                                               {
-                                                                       title: this.lang.get('align_justify'),
-                                                                       func: 'alignment.justify'
-                                                               }
-                                                       }
-                                               },
-                                               horizontalrule:
-                                               {
-                                                       title: this.lang.get('horizontalrule'),
-                                                       func: 'line.insert'
-                                               }
-                                       };
-                               },
-                               build: function()
-                               {
-                                       this.toolbar.hideButtons();
-                                       this.toolbar.hideButtonsOnMobile();
-                                       this.toolbar.isButtonSourceNeeded();
-
-                                       if (this.opts.buttons.length === 0) return;
-
-                                       this.$toolbar = this.toolbar.createContainer();
-
-                                       this.toolbar.setOverflow();
-                                       this.toolbar.append();
-                                       this.toolbar.setFormattingTags();
-                                       this.toolbar.loadButtons();
-                                       this.toolbar.setFixed();
-
-                                       // buttons response
-                                       if (this.opts.activeButtons)
-                                       {
-                                               this.$editor.on('mouseup.redactor keyup.redactor focus.redactor', $.proxy(this.observe.toolbar, this));
-                                       }
-
-                               },
-                               createContainer: function()
-                               {
-                                       return $('<ul>').addClass('redactor-toolbar').attr({'id': 'redactor-toolbar-' + this.uuid, 'role': 'toolbar'});
-                               },
-                               setFormattingTags: function()
-                               {
-                                       $.each(this.opts.toolbar.formatting.dropdown, $.proxy(function (i, s)
-                                       {
-                                               if ($.inArray(i, this.opts.formatting) == -1) delete this.opts.toolbar.formatting.dropdown[i];
-                                       }, this));
-
-                               },
-                               loadButtons: function()
-                               {
-                                       $.each(this.opts.buttons, $.proxy(function(i, btnName)
-                                       {
-                                               if (!this.opts.toolbar[btnName]) return;
-
-                                               if (btnName === 'file')
-                                               {
-                                                        if (this.opts.fileUpload === false) return;
-                                                        else if (!this.opts.fileUpload && this.opts.s3 === false) return;
-                                               }
-
-                                               if (btnName === 'image')
-                                               {
-                                                        if (this.opts.imageUpload === false) return;
-                                                        else if (!this.opts.imageUpload && this.opts.s3 === false) return;
-                                               }
-
-                                               var btnObject = this.opts.toolbar[btnName];
-                                               this.$toolbar.append($('<li>').append(this.button.build(btnName, btnObject)));
-
-                                       }, this));
-                               },
-                               append: function()
-                               {
-                                       if (this.opts.toolbarExternal)
-                                       {
-                                               this.$toolbar.addClass('redactor-toolbar-external');
-                                               $(this.opts.toolbarExternal).html(this.$toolbar);
-                                       }
-                                       else
-                                       {
-                                               this.$box.prepend(this.$toolbar);
-                                       }
-                               },
-                               setFixed: function()
-                               {
-                                       if (!this.utils.isDesktop()) return;
-                                       if (this.opts.toolbarExternal) return;
-                                       if (!this.opts.toolbarFixed) return;
-
-                                       this.toolbar.observeScroll();
-                                       $(this.opts.toolbarFixedTarget).on('scroll.redactor.' + this.uuid, $.proxy(this.toolbar.observeScroll, this));
-
-                               },
-                               setOverflow: function()
-                               {
-                                       if (this.utils.isMobile() && this.opts.toolbarOverflow)
-                                       {
-                                               this.$toolbar.addClass('redactor-toolbar-overflow');
-                                       }
-                               },
-                               isButtonSourceNeeded: function()
-                               {
-                                       if (this.opts.source) return;
-
-                                       var index = this.opts.buttons.indexOf('html');
-                                       if (index !== -1)
-                                       {
-                                               this.opts.buttons.splice(index, 1);
-                                       }
-                               },
-                               hideButtons: function()
-                               {
-                                       if (this.opts.buttonsHide.length === 0) return;
-
-                                       $.each(this.opts.buttonsHide, $.proxy(function(i, s)
-                                       {
-                                               var index = this.opts.buttons.indexOf(s);
-                                               this.opts.buttons.splice(index, 1);
-
-                                       }, this));
-                               },
-                               hideButtonsOnMobile: function()
-                               {
-                                       if (!this.utils.isMobile() || this.opts.buttonsHideOnMobile.length === 0) return;
-
-                                       $.each(this.opts.buttonsHideOnMobile, $.proxy(function(i, s)
-                                       {
-                                               var index = this.opts.buttons.indexOf(s);
-                                               this.opts.buttons.splice(index, 1);
-
-                                       }, this));
-                               },
-                               observeScroll: function()
-                               {
-                                       var scrollTop = $(this.opts.toolbarFixedTarget).scrollTop();
-                                       var boxTop = 1;
-
-                                       if (this.opts.toolbarFixedTarget === document)
-                                       {
-                                               boxTop = this.$box.offset().top;
-                                       }
-
-                                       if ((scrollTop + this.opts.toolbarFixedTopOffset) > boxTop)
-                                       {
-                                               this.toolbar.observeScrollEnable(scrollTop, boxTop);
-                                       }
-                                       else
-                                       {
-                                               this.toolbar.observeScrollDisable();
-                                       }
-                               },
-                               observeScrollEnable: function(scrollTop, boxTop)
-                               {
-                                       var top = this.opts.toolbarFixedTopOffset + scrollTop - boxTop;
-                                       var left = 0;
-                                       var end = boxTop + this.$box.height() - 32;
-                                       var width = this.$box.innerWidth();
-
-                                       this.$toolbar.addClass('toolbar-fixed-box');
-                                       this.$toolbar.css({
-                                               position: 'absolute',
-                                               width: width,
-                                               top: top + 'px',
-                                               left: left
-                                       });
-
-                                       if (scrollTop > end)
-                                               $('.redactor-dropdown-' + this.uuid + ':visible').hide();
-
-                                       this.toolbar.setDropdownsFixed();
-                                       this.$toolbar.css('visibility', (scrollTop < end) ? 'visible' : 'hidden');
-                               },
-                               observeScrollDisable: function()
-                               {
-                                       this.$toolbar.css({
-                                               position: 'relative',
-                                               width: 'auto',
-                                               top: 0,
-                                               left: 0,
-                                               visibility: 'visible'
-                                       });
-
-                                       this.toolbar.unsetDropdownsFixed();
-                                       this.$toolbar.removeClass('toolbar-fixed-box');
-                               },
-                               setDropdownsFixed: function()
-                               {
-                                       var top = this.$toolbar.innerHeight() + this.opts.toolbarFixedTopOffset;
-                                       var position = 'fixed';
-                                       if (this.opts.toolbarFixedTarget !== document)
-                                       {
-                                               top = (this.$toolbar.innerHeight() + this.$toolbar.offset().top) + this.opts.toolbarFixedTopOffset;
-                                               position = 'absolute';
-                                       }
-
-                                       $('.redactor-dropdown-' + this.uuid).each(function()
-                                       {
-                                               $(this).css({ position: position, top: top + 'px' });
-                                       });
-                               },
-                               unsetDropdownsFixed: function()
-                               {
-                                       var top = (this.$toolbar.innerHeight() + this.$toolbar.offset().top);
-                                       $('.redactor-dropdown-' + this.uuid).each(function()
-                                       {
-                                               $(this).css({ position: 'absolute', top: top + 'px' });
-                                       });
-                               }
-                       };
-               },
-               upload: function()
-               {
-                       return {
-                               init: function(id, url, callback)
-                               {
-                                       this.upload.direct = false;
-                                       this.upload.callback = callback;
-                                       this.upload.url = url;
-                                       this.upload.$el = $(id);
-                                       this.upload.$droparea = $('<div id="redactor-droparea" />');
-
-                                       this.upload.$placeholdler = $('<div id="redactor-droparea-placeholder" />').text(this.lang.get('upload_label'));
-                                       this.upload.$input = $('<input type="file" name="file" />');
-
-                                       this.upload.$placeholdler.append(this.upload.$input);
-                                       this.upload.$droparea.append(this.upload.$placeholdler);
-                                       this.upload.$el.append(this.upload.$droparea);
-
-                                       this.upload.$droparea.off('redactor.upload');
-                                       this.upload.$input.off('redactor.upload');
-
-                                       this.upload.$droparea.on('dragover.redactor.upload', $.proxy(this.upload.onDrag, this));
-                                       this.upload.$droparea.on('dragleave.redactor.upload', $.proxy(this.upload.onDragLeave, this));
-
-                                       // change
-                                       this.upload.$input.on('change.redactor.upload', $.proxy(function(e)
-                                       {
-                                               e = e.originalEvent || e;
-                                               this.upload.traverseFile(this.upload.$input[0].files[0], e);
-                                       }, this));
-
-                                       // drop
-                                       this.upload.$droparea.on('drop.redactor.upload', $.proxy(function(e)
-                                       {
-                                               e.preventDefault();
-
-                                               this.upload.$droparea.removeClass('drag-hover').addClass('drag-drop');
-                                               this.upload.onDrop(e);
-
-                                       }, this));
-                               },
-                               directUpload: function(file, e)
-                               {
-                                       this.upload.direct = true;
-                                       this.upload.traverseFile(file, e);
-                               },
-                               onDrop: function(e)
-                               {
-                                       e = e.originalEvent || e;
-                                       var files = e.dataTransfer.files;
-
-                                       this.upload.traverseFile(files[0], e);
-                               },
-                               traverseFile: function(file, e)
-                               {
-                                       if (this.opts.s3)
-                                       {
-                                               this.upload.setConfig(file);
-                                               this.upload.s3uploadFile(file);
-                                               return;
-                                       }
-
-                                       var formData = !!window.FormData ? new FormData() : null;
-                                       if (window.FormData)
-                                       {
-                                               this.upload.setConfig(file);
-
-                                               var name = (this.upload.type == 'image') ? this.opts.imageUploadParam : this.opts.fileUploadParam;
-                                               formData.append(name, file);
-                                       }
-
-                                       this.progress.show();
-                                       this.core.setCallback('uploadStart', e, formData);
-                                       this.upload.sendData(formData, e);
-                               },
-                               setConfig: function(file)
-                               {
-                                       this.upload.getType(file);
-
-                                       if (this.upload.direct)
-                                       {
-                                               this.upload.url = (this.upload.type == 'image') ? this.opts.imageUpload : this.opts.fileUpload;
-                                               this.upload.callback = (this.upload.type == 'image') ? this.image.insert : this.file.insert;
-                                       }
-                               },
-                               getType: function(file)
-                               {
-                                       this.upload.type = 'image';
-                                       if (this.opts.imageTypes.indexOf(file.type) == -1)
-                                       {
-                                               this.upload.type = 'file';
-                                       }
-                               },
-                               getHiddenFields: function(obj, fd)
-                               {
-                                       if (obj === false || typeof obj !== 'object') return fd;
-
-                                       $.each(obj, $.proxy(function(k, v)
-                                       {
-                                               if (v !== null && v.toString().indexOf('#') === 0) v = $(v).val();
-                                               fd.append(k, v);
-
-                                       }, this));
-
-                                       return fd;
-
-                               },
-                               sendData: function(formData, e)
-                               {
-                                       // append hidden fields
-                                       if (this.upload.type == 'image')
-                                       {
-                                               formData = this.upload.getHiddenFields(this.opts.uploadImageFields, formData);
-                                               formData = this.upload.getHiddenFields(this.upload.imageFields, formData);
-                                       }
-                                       else
-                                       {
-                                               formData = this.upload.getHiddenFields(this.opts.uploadFileFields, formData);
-                                               formData = this.upload.getHiddenFields(this.upload.fileFields, formData);
-                                       }
-
-                                       var xhr = new XMLHttpRequest();
-                                       xhr.open('POST', this.upload.url);
-                                       xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-
-                                       // complete
-                                       xhr.onreadystatechange = $.proxy(function()
-                                       {
-                                           if (xhr.readyState == 4)
-                                           {
-                                               var data = xhr.responseText;
-
-                                                       data = data.replace(/^\[/, '');
-                                                       data = data.replace(/\]$/, '');
-
-                                                       var json;
-                                                       try
-                                                       {
-                                                               json = (typeof data === 'string' ? $.parseJSON(data) : data);
-                                                       }
-                                                       catch(err)
-                                                       {
-                                                               json = {
-                                                                       error: true
-                                                               };
-                                                       }
-
-
-                                                       this.progress.hide();
-
-                                                       if (!this.upload.direct)
-                                                       {
-                                                               this.upload.$droparea.removeClass('drag-drop');
-                                                       }
-
-                                                       this.upload.callback(json, this.upload.direct, e);
-                                           }
-                                       }, this);
-
-
-                                       /*
-                                       xhr.upload.onprogress = $.proxy(function(e)
-                                       {
-                                               if (e.lengthComputable)
-                                               {
-                                                       var complete = (e.loaded / e.total * 100 | 0);
-                                                       //progress.value = progress.innerHTML = complete;
-                                               }
-
-                                       }, this);
-                                       */
-
-
-                                       xhr.send(formData);
-                               },
-                               onDrag: function(e)
-                               {
-                                       e.preventDefault();
-                                       this.upload.$droparea.addClass('drag-hover');
-                               },
-                               onDragLeave: function(e)
-                               {
-                                       e.preventDefault();
-                                       this.upload.$droparea.removeClass('drag-hover');
-                               },
-                               clearImageFields: function()
-                               {
-                                       this.upload.imageFields = {};
-                               },
-                               addImageFields: function(name, value)
-                               {
-                                       this.upload.imageFields[name] = value;
-                               },
-                               removeImageFields: function(name)
-                               {
-                                       delete this.upload.imageFields[name];
-                               },
-                               clearFileFields: function()
-                               {
-                                       this.upload.fileFields = {};
-                               },
-                               addFileFields: function(name, value)
-                               {
-                                       this.upload.fileFields[name] = value;
-                               },
-                               removeFileFields: function(name)
-                               {
-                                       delete this.upload.fileFields[name];
-                               },
-
-
-                               // S3
-                               s3uploadFile: function(file)
-                               {
-                                       this.upload.s3executeOnSignedUrl(file, $.proxy(function(signedURL)
-                                       {
-                                               this.upload.s3uploadToS3(file, signedURL);
-                                       }, this));
-                               },
-                               s3executeOnSignedUrl: function(file, callback)
-                               {
-                                       var xhr = new XMLHttpRequest();
-                                       var mark = (this.opts.s3.search(/\?/) !== '-1') ? '?' : '&';
-
-                                       xhr.open('GET', this.opts.s3 + mark + 'name=' + file.name + '&type=' + file.type, true);
-
-                                       // Hack to pass bytes through unprocessed.
-                                       if (xhr.overrideMimeType) xhr.overrideMimeType('text/plain; charset=x-user-defined');
-
-                                       var that = this;
-                                       xhr.onreadystatechange = function(e)
-                                       {
-                                               if (this.readyState == 4 && this.status == 200)
-                                               {
-                                                       that.progress.show();
-                                                       callback(decodeURIComponent(this.responseText));
-                                               }
-                                               else if (this.readyState == 4 && this.status != 200)
-                                               {
-                                                       //setProgress(0, 'Could not contact signing script. Status = ' + this.status);
-                                               }
-                                       };
-
-                                       xhr.send();
-                               },
-                               s3createCORSRequest: function(method, url)
-                               {
-                                       var xhr = new XMLHttpRequest();
-                                       if ("withCredentials" in xhr)
-                                       {
-                                               xhr.open(method, url, true);
-                                       }
-                                       else if (typeof XDomainRequest != "undefined")
-                                       {
-                                               xhr = new XDomainRequest();
-                                               xhr.open(method, url);
-                                       }
-                                       else
-                                       {
-                                               xhr = null;
-                                       }
-
-                                       return xhr;
-                               },
-                               s3uploadToS3: function(file, url)
-                               {
-                                       var xhr = this.upload.s3createCORSRequest('PUT', url);
-                                       if (!xhr)
-                                       {
-                                               //setProgress(0, 'CORS not supported');
-                                       }
-                                       else
-                                       {
-                                               xhr.onload = $.proxy(function()
-                                               {
-                                                       if (xhr.status == 200)
-                                                       {
-                                                               //setProgress(100, 'Upload completed.');
-
-                                                               this.progress.hide();
-
-                                                               var s3file = url.split('?');
-
-                                                               if (!s3file[0])
-                                                               {
-                                                                        // url parsing is fail
-                                                                        return false;
-                                                               }
-
-
-                                                               if (!this.upload.direct)
-                                                               {
-                                                                       this.upload.$droparea.removeClass('drag-drop');
-                                                               }
-
-                                                               var json = { filelink: s3file[0] };
-                                                               if (this.upload.type == 'file')
-                                                               {
-                                                                       var arr = s3file[0].split('/');
-                                                                       json.filename = arr[arr.length-1];
-                                                               }
-
-                                                               this.upload.callback(json, this.upload.direct, false);
-
-
-                                                       }
-                                                       else
-                                                       {
-                                                               //setProgress(0, 'Upload error: ' + xhr.status);
-                                                       }
-                                               }, this);
-
-                                               xhr.onerror = function() {};
-
-                                               xhr.upload.onprogress = function(e) {};
-
-                                               xhr.setRequestHeader('Content-Type', file.type);
-                                               xhr.setRequestHeader('x-amz-acl', 'public-read');
-
-                                               xhr.send(file);
-                                       }
-                               }
-                       };
-               },
-               utils: function()
-               {
-                       return {
-                               isMobile: function()
-                               {
-                                       return /(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent);
-                               },
-                               isDesktop: function()
-                               {
-                                       return !/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent);
-                               },
-                               isString: function(obj)
-                               {
-                                       return Object.prototype.toString.call(obj) == '[object String]';
-                               },
-                               isEmpty: function(html, removeEmptyTags)
-                               {
-                                       html = html.replace(/[\u200B-\u200D\uFEFF]/g, '');
-                                       html = html.replace(/&nbsp;/gi, '');
-                                       html = html.replace(/<\/?br\s?\/?>/g, '');
-                                       html = html.replace(/\s/g, '');
-                                       html = html.replace(/^<p>[^\W\w\D\d]*?<\/p>$/i, '');
-                                       html = html.replace(/<iframe(.*?[^>])>$/i, 'iframe');
-                                       html = html.replace(/<source(.*?[^>])>$/i, 'source');
-
-                                       // remove empty tags
-                                       if (removeEmptyTags !== false)
-                                       {
-                                               html = html.replace(/<[^\/>][^>]*><\/[^>]+>/gi, '');
-                                               html = html.replace(/<[^\/>][^>]*><\/[^>]+>/gi, '');
-                                       }
-
-                                       html = $.trim(html);
-
-                                       return html === '';
-                               },
-                               normalize: function(str)
-                               {
-                                       if (typeof(str) === 'undefined') return 0;
-                                       return parseInt(str.replace('px',''), 10);
-                               },
-                               hexToRgb: function(hex)
-                               {
-                                       if (typeof hex == 'undefined') return;
-                                       if (hex.search(/^#/) == -1) return hex;
-
-                                       var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
-                                       hex = hex.replace(shorthandRegex, function(m, r, g, b)
-                                       {
-                                               return r + r + g + g + b + b;
-                                       });
-
-                                       var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
-                                       return 'rgb(' + parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) + ')';
-                               },
-                               getOuterHtml: function(el)
-                               {
-                                       return $('<div>').append($(el).eq(0).clone()).html();
-                               },
-                               getAlignmentElement: function(el)
-                               {
-                                       if ($.inArray(el.tagName, this.opts.alignmentTags) !== -1)
-                                       {
-                                               return $(el);
-                                       }
-                                       else
-                                       {
-                                               return $(el).closest(this.opts.alignmentTags.toString().toLowerCase(), this.$editor[0]);
-                                       }
-                               },
-                               removeEmptyAttr: function(el, attr)
-                               {
-                                       var $el = $(el);
-                                       if (typeof $el.attr(attr) == 'undefined')
-                                       {
-                                               return true;
-                                       }
-
-                                       if ($el.attr(attr) === '')
-                                       {
-                                               $el.removeAttr(attr);
-                                               return true;
-                                       }
-
-                                       return false;
-                               },
-                               removeEmpty: function(i, s)
-                               {
-                                       var $s = $($.parseHTML(s));
-
-                                       $s.find('.redactor-invisible-space').removeAttr('style').removeAttr('class');
-
-                                       if ($s.find('hr, br, img, iframe, source').length !== 0) return;
-                                       var text = $.trim($s.text());
-
-                                       if (this.utils.isEmpty(text, false))
-                                       {
-                                               $s.remove();
-                                       }
-                               },
-
-                               // save and restore scroll
-                               saveScroll: function()
-                               {
-                                       this.saveEditorScroll = this.$editor.scrollTop();
-                                       this.saveBodyScroll = $(window).scrollTop();
-
-                                       if (this.opts.scrollTarget) this.saveTargetScroll = $(this.opts.scrollTarget).scrollTop();
-                               },
-                               restoreScroll: function()
-                               {
-                                       if (typeof this.saveScroll === 'undefined' && typeof this.saveBodyScroll === 'undefined') return;
-
-                                       $(window).scrollTop(this.saveBodyScroll);
-                                       this.$editor.scrollTop(this.saveEditorScroll);
-
-                                       if (this.opts.scrollTarget) $(this.opts.scrollTarget).scrollTop(this.saveTargetScroll);
-                               },
-
-                               // get invisible space element
-                               createSpaceElement: function()
-                               {
-                                       var space = document.createElement('span');
-                                       space.className = 'redactor-invisible-space';
-                                       space.innerHTML = this.opts.invisibleSpace;
-
-                                       return space;
-                               },
-
-                               // replace
-                               removeInlineTags: function(node)
-                               {
-                                       var tags = this.opts.inlineTags;
-                                       tags.push('span');
-
-                                       if (node.tagName == 'PRE') tags.push('a');
-
-                                       $(node).find(tags.join(',')).not('span.redactor-selection-marker').contents().unwrap();
-                               },
-                               replaceWithContents: function(node, removeInlineTags)
-                               {
-                                       var self = this;
-                                       $(node).replaceWith(function()
-                                       {
-                                               if (removeInlineTags === true) self.utils.removeInlineTags(this);
-
-                                               return $(this).contents();
-                                       });
-
-                                       return $(node);
-                               },
-                               replaceToTag: function(node, tag, removeInlineTags)
-                               {
-                                       var replacement;
-                                       var self = this;
-                                       $(node).replaceWith(function()
-                                       {
-                                               replacement = $('<' + tag + ' />').append($(this).contents());
-
-                                               for (var i = 0; i < this.attributes.length; i++)
-                                               {
-                                                       replacement.attr(this.attributes[i].name, this.attributes[i].value);
-                                               }
-
-                                               if (removeInlineTags === true) self.utils.removeInlineTags(replacement);
-
-                                               return replacement;
-                                       });
-
-                                       return replacement;
-                               },
-
-                               // start and end of element
-                               isStartOfElement: function()
-                               {
-                                       var block = this.selection.getBlock();
-                                       if (!block) return false;
-
-                                       var offset = this.caret.getOffsetOfElement(block);
-
-                                       return (offset === 0) ? true : false;
-                               },
-                               isEndOfElement: function(element)
-                               {
-                                       if (typeof element == 'undefined')
-                                       {
-                                               var element = this.selection.getBlock();
-                                               if (!element) return false;
-                                       }
-
-                                       var offset = this.caret.getOffsetOfElement(element);
-                                       var text = $.trim($(element).text()).replace(/\n\r\n/g, '');
-
-                                       return (offset == text.length) ? true : false;
-                               },
-                               isStartOfEditor: function()
-                               {
-                                       var offset = this.caret.getOffsetOfElement(this.$editor[0]);
-
-                                       return (offset === 0) ? true : false;
-                               },
-                               isEndOfEditor: function()
-                               {
-                                       var block = this.$editor[0];
-
-                                       var offset = this.caret.getOffsetOfElement(block);
-                                       var text = $.trim($(block).html().replace(/(<([^>]+)>)/gi,''));
-
-                                       return (offset == text.length) ? true : false;
-                               },
-
-                               // test blocks
-                               isBlock: function(block)
-                               {
-                                       block = block[0] || block;
-
-                                       return block && this.utils.isBlockTag(block.tagName);
-                               },
-                               isBlockTag: function(tag)
-                               {
-                                       if (typeof tag == 'undefined') return false;
-
-                                       return this.reIsBlock.test(tag);
-                               },
-
-                               // tag detection
-                               isTag: function(current, tag)
-                               {
-                                       var element = $(current).closest(tag, this.$editor[0]);
-                                       if (element.length == 1)
-                                       {
-                                               return element[0];
-                                       }
-
-                                       return false;
-                               },
-
-                               // select all
-                               isSelectAll: function()
-                               {
-                                       return this.selectAll;
-                               },
-                               enableSelectAll: function()
-                               {
-                                       this.selectAll = true;
-                               },
-                               disableSelectAll: function()
-                               {
-                                       this.selectAll = false;
-                               },
-
-                               // parents detection
-                               isRedactorParent: function(el)
-                               {
-                                       if (!el)
-                                       {
-                                               return false;
-                                       }
-
-                                       if ($(el).parents('.redactor-editor').length === 0 || $(el).hasClass('redactor-editor'))
-                                       {
-                                               return false;
-                                       }
-
-                                       return el;
-                               },
-                               isCurrentOrParentHeader: function()
-                               {
-                                       return this.utils.isCurrentOrParent(['H1', 'H2', 'H3', 'H4', 'H5', 'H6']);
-                               },
-                               isCurrentOrParent: function(tagName)
-                               {
-                                       var parent = this.selection.getParent();
-                                       var current = this.selection.getCurrent();
-
-                                       if ($.isArray(tagName))
-                                       {
-                                               var matched = 0;
-                                               $.each(tagName, $.proxy(function(i, s)
-                                               {
-                                                       if (this.utils.isCurrentOrParentOne(current, parent, s))
-                                                       {
-                                                               matched++;
-                                                       }
-                                               }, this));
-
-                                               return (matched === 0) ? false : true;
-                                       }
-                                       else
-                                       {
-                                               return this.utils.isCurrentOrParentOne(current, parent, tagName);
-                                       }
-                               },
-                               isCurrentOrParentOne: function(current, parent, tagName)
-                               {
-                                       tagName = tagName.toUpperCase();
-
-                                       return parent && parent.tagName === tagName ? parent : current && current.tagName === tagName ? current : false;
-                               },
-
-
-                               // browsers detection
-                               isOldIe: function()
-                               {
-                                       return (this.utils.browser('msie') && parseInt(this.utils.browser('version'), 10) < 9) ? true : false;
-                               },
-                               isLessIe10: function()
-                               {
-                                       return (this.utils.browser('msie') && parseInt(this.utils.browser('version'), 10) < 10) ? true : false;
-                               },
-                               isIe11: function()
-                               {
-                                       return !!navigator.userAgent.match(/Trident\/7\./);
-                               },
-                               browser: function(browser)
-                               {
-                                       var ua = navigator.userAgent.toLowerCase();
-                                       var match = /(opr)[\/]([\w.]+)/.exec( ua ) ||
-                           /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
-                           /(webkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ua) ||
-                           /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
-                           /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
-                           /(msie) ([\w.]+)/.exec( ua ) ||
-                           ua.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec( ua ) ||
-                           ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
-                           [];
-
-                                       if (browser == 'safari') return (typeof match[3] != 'undefined') ? match[3] == 'safari' : false;
-                                       if (browser == 'version') return match[2];
-                                       if (browser == 'webkit') return (match[1] == 'chrome' || match[1] == 'opr' || match[1] == 'webkit');
-                                       if (match[1] == 'rv') return browser == 'msie';
-                                       if (match[1] == 'opr') return browser == 'webkit';
-
-                                       return browser == match[1];
-                               },
-                               strpos: function(haystack, needle, offset)
-                               {
-                                       var i = haystack.indexOf(needle, offset);
-                                       return i >= 0 ? i : false;
-                               },
-                               disableBodyScroll: function()
-                               {
-
-                                       var $body = $('html');
-                                       var windowWidth = window.innerWidth;
-                                       if (!windowWidth)
-                                       {
-                                               var documentElementRect = document.documentElement.getBoundingClientRect();
-                                               windowWidth = documentElementRect.right - Math.abs(documentElementRect.left);
-                                       }
-
-                                       var isOverflowing = document.body.clientWidth < windowWidth;
-                                       var scrollbarWidth = this.utils.measureScrollbar();
-
-                                       $body.css('overflow', 'hidden');
-                                       if (isOverflowing) $body.css('padding-right', scrollbarWidth);
-
-
-                               },
-                               measureScrollbar: function()
-                               {
-                                       var $body = $('body');
-                                       var scrollDiv = document.createElement('div');
-                                       scrollDiv.className = 'redactor-scrollbar-measure';
-
-                                       $body.append(scrollDiv);
-                                       var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
-                                       $body[0].removeChild(scrollDiv);
-                                       return scrollbarWidth;
-                               },
-                               enableBodyScroll: function()
-                               {
-                                       $('html').css({ 'overflow': '', 'padding-right': '' });
-                                       $('body').remove('redactor-scrollbar-measure');
-                               }
-                       };
-               }
-       };
-
-       $(window).on('load.tools.redactor', function()
-       {
-               $('[data-tools="redactor"]').redactor();
-       });
-
-       // constructor
-       Redactor.prototype.init.prototype = Redactor.prototype;
-
-})(jQuery);
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor/redactor.min.js b/wcfsetup/install/files/js/3rdParty/redactor/redactor.min.js
deleted file mode 100644 (file)
index 70e8f1d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
-       Redactor 10.2.5
-       Updated: October 1, 2015
-
-       http://imperavi.com/redactor/
-
-       Copyright (c) 2009-2015, Imperavi LLC.
-       License: http://imperavi.com/redactor/license/
-
-       Usage: $('#content').redactor();
-*/
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(C($){\'lC lA\';if(!gz.5n.a4){gz.5n.a4=C(gy){E fn=q;F C(){F fn.8n(gy)}}}E 2H=0;$.fn.I=C(47){E 2L=[];E gx=8Q.5n.dn.64(iY,1);if(1s 47===\'70\'){q.1u(C(){E 6E=$.1f(q,\'I\');E 1C;if(47.3J(/\\./)!=\'-1\'){1C=47.4A(\'.\');if(1s 6E[1C[0]]!=\'1z\'){1C=6E[1C[0]][1C[1]]}}O{1C=6E[47]}if(1s 6E!==\'1z\'&&$.5K(1C)){E 9X=1C.8n(6E,gx);if(9X!==1z&&9X!==6E){2L.2N(9X)}}O{$.6N(\'lX m1 9V "\'+47+\'" 2D 3Y\')}})}O{q.1u(C(){$.1f(q,\'I\',{});$.1f(q,\'I\',3Y(q,47))})}if(2L.12===0)F q;O if(2L.12===1)F 2L[0];O F 2L};C 3Y(el,47){F 2a 3Y.5n.3Q(el,47)}$.3Y=3Y;$.3Y.m0=\'10.2.5\';$.3Y.d5=[\'2Z\',\'3n\',\'Q\',\'28\',\'2f\',\'1v\',\'1S\',\'1x\',\'1e\',\'1W\',\'1n\',\'1Z\',\'2p\',\'M\',\'3A\',\'26\',\'1Y\',\'1D\',\'2s\',\'1H\',\'3L\',\'V\',\'2A\',\'2d\',\'1b\',\'1R\',\'2X\',\'5o\',\'3i\',\'5F\',\'K\',\'6a\',\'2I\',\'1I\',\'1A\',\'1w\',\'L\'];$.3Y.G={1H:\'en\',dc:\'lZ\',92:N,2p:N,g0:N,3i:N,5W:1q,6G:N,ae:N,b3:N,1K:N,6q:1q,2X:1q,eE:N,aP:1q,k2:1q,hY:1q,hO:N,3n:N,d4:N,9a:60,cZ:N,bi:N,iW:1q,5a:\'9n\',hR:N,ec:50,ca:1q,hI:1q,hL:1q,8C:\'lQ\',cO:1q,7R:4m,jU:\'1Z\',lI:N,ge:1q,7N:4m,jS:\'1Z\',gh:1q,86:N,ax:1q,ek:1q,e9:1q,9q:1q,72:4,b7:N,et:1q,9w:N,1A:1q,jD:1q,6F:1k,6L:0,aI:N,jr:N,4D:1q,4i:[\'B\',\'30\',\'4n\',\'4h\',\'5S\',\'5q\',\'5u\',\'7n\',\'3A\',\'M\',\'1Z\',\'V\',\'2Z\',\'aO\'],dQ:[],e8:[],30:[\'p\',\'29\',\'2F\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'],cv:N,2I:1q,4c:[\'3W\',\'1p\'],4s:N,co:[\'3V\',\'1j\',\'2F\',\'6k\',\'3k\',\'ol\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\',\'dl\',\'29\',\'80\',\'dW\',\'4d\',\'75\',\'cc\',\'eS\',\'fo\',\'43\',\'1p\',\'3W\',\'4J\',\'7a\',\'3G\',\'2y\',\'1v\',\'41\',\'kh\',\'iZ\',\'lL\',\'hr\',\'j1\',\'mh\',\'mk\',\'mo\',\'6t\',\'me\',\'m8\',\'ma\',\'p\'],6v:N,5w:[[\'7b\',\'4l\'],[\'b\',\'5d\']],5x:[[\'3O-7W:\\\\s?4n\',"5d"],[\'3O-1p:\\\\s?4h\',"em"],[\'1g-7e:\\\\s?5r\',"u"],[\'1g-7e:\\\\s?3L-eB\',\'4l\']],5s:N,1L:N,52:N,6U:[\'1i\'],3T:[\'p\'],aN:[\'5S\',\'4h\',\'4n\',\'5r\',\'5q\',\'5u\',\'l8\',\'la\',\'lv\',\'9B\'],cj:{b:\'4n\',5d:\'4n\',i:\'4h\',em:\'4h\',4l:\'5S\',7b:\'5S\',3k:\'5q\',ol:\'5u\',u:\'5r\'},6a:{\'4a+6P+m, 5c+6P+m\':{1C:\'26.e1\'},\'4a+b, 5c+b\':{1C:\'26.3a\',6d:[\'4n\']},\'4a+i, 5c+i\':{1C:\'26.3a\',6d:[\'4h\']},\'4a+h, 5c+h\':{1C:\'26.3a\',6d:[\'eZ\']},\'4a+l, 5c+l\':{1C:\'26.3a\',6d:[\'fc\']},\'4a+k, 5c+k\':{1C:\'V.2R\'},\'4a+6P+7\':{1C:\'2d.3j\',6d:[\'5u\']},\'4a+6P+8\':{1C:\'2d.3j\',6d:[\'5q\']}},gV:N,28:[],8M:[],5V:\'<p>&#bL;</p>\',5Z:\'&#bL;\',jX:[\'M/gR\',\'M/lu\',\'M/gU\'],9M:20,c7:[\'a\',\'1M\',\'b\',\'5d\',\'7j\',\'7i\',\'i\',\'em\',\'u\',\'95\',\'7b\',\'4l\',\'9d\',\'3k\',\'ol\',\'li\'],4M:[\'5d\',\'b\',\'u\',\'em\',\'i\',\'1e\',\'4l\',\'lj\',\'az\',\'ay\',\'7i\',\'7j\',\'85\',\'E\',\'9d\',\'95\'],9y:[\'P\',\'cJ\',\'cs\',\'c8\',\'c3\',\'c6\',\'bM\',\'ml\',\'nH\',\'mr\',\'8a\',\'6u\',\'aL\',\'nK\',\'hS\',\'nO\',\'nt\',\'nR\',\'o7\',\'o8\',\'oi\'],8E:[\'9J\',\'8B\',\'8h\',\'5L\'],bO:N,1R:{7H:[]},kv:{en:{B:\'og\',6S:\'6K gm\',M:\'6K gn\',3V:\'dC\',V:\'dN\',b2:\'6K V\',e6:\'gG V\',6J:\'of\',30:\'nU\',iB:\'nZ 1g\',dp:\'o4\',1e:\'gl\',iC:\'8i 1\',iL:\'8i 2\',iM:\'8i 3\',kd:\'8i 4\',jt:\'8i 5\',4n:\'o3\',4h:\'mL\',mH:\'mI gB\',mN:\'mQ gB\',5q:\'mP gE\',5u:\'mF gE\',7n:\'mu\',3A:\'mz\',jf:\'mE\',1Y:\'6K\',3o:\'mD\',hF:\'9g\',mC:\'6K dC\',mT:\'9s dr mU\',nd:\'9s dr nc\',na:\'9s dx gv\',nb:\'9s dx go\',ni:\'9g dx\',mZ:\'9g dr\',mY:\'9g dC\',mV:\'mW\',n1:\'n2\',n7:\'9s gw\',nJ:\'9g gw\',1J:\'n3\',ck:\'n5\',5p:\'n6\',2c:\'gv\',4t:\'go\',5m:\'gq\',mX:\'gn n0 dN\',1g:\'n8\',aa:\'n9\',nh:\'cg\',nj:\'gm nm gl or ng/nf dN\',1Z:\'6K ne\',1w:\'mB\',mA:\'my\',gp:\'mt\',ms:\'mv gp\',mx:\'gT 1Z gS\',jO:\'gu 1g gs gr 2c\',jJ:\'gq 1g\',jH:\'gu 1g gs gr 4t\',jF:\'mO 1g\',aO:\'6K mR mS\',5S:\'mM\',ho:\'mJ\',a9:\'mK V in 2a 5t\',5r:\'nn\',2Z:\'no\',6f:\'o1 (o0)\',7F:\'gG\',k8:\'gT 1Z gS or \'}},2A:{4p:{6Q:/5E?:\\/\\/(?:[0-9A-Z-]+\\.)?(?:nY\\.be\\/|6Q\\.aK\\S*[^\\w\\-\\s])([\\w\\-]{11})(?=[^\\w\\-]|$)(?![?=&+%\\w.\\-]*(?:[\'"][^<>]*>|<\\/a>))[?=&+%\\w.-]*/ig,6T:/5E?:\\/\\/(7S\\.)?6T.aK\\/(\\d+)($|\\/)/,M:/((5E?|7S)[^\\s]+\\.)(nT?g|gR|gU)(\\?[^\\s-]+)?/ig,2i:/(5E?:\\/\\/(?:7S\\.|(?!7S))[^\\s\\.]+\\.[^\\s]{2,}|7S\\.[^\\s]+\\.[^\\s]{2,})/ig,}},9r:N};3Y.fn=$.3Y.5n={3r:{83:8,8S:46,nS:38,dm:40,6z:13,kk:32,bG:27,da:9,fB:17,fA:91,ft:16,fu:18,eW:39,nV:37,er:91},3Q:C(el,47){q.$2m=$(el);q.2H=2H++;q.7T=N;q.$5h=N;q.gY(47);q.gX();q.30={};$.nX(q.G.8E,q.G.9y);q.fk=2a 2n(\'^(\'+q.G.8E.31(\'|\')+\')$\',\'i\');q.1I.kU();if(q.G.4c!==N){E 2e=[\'B\',\'dG\',\'V\',\'3f\',\'5c\',\'nW\'];2D(E i=0;i<2e.12;i++){q.G.4c.2N(2e[i])}}q.1H.2K();$.7h(q.G.6a,q.G.gV);q.1W.2r(\'2b\');q.2b=1q;q.2f.fG()},gY:C(47){q.G=$.7h({},$.7h(1q,{},$.3Y.G),q.$2m.1f(),47)},dg:C(43){F kD.o6(43).dO(C(aD){F 1s 43[aD]==\'C\'})},gX:C(){E 2q=$.3Y.d5.12;2D(E i=0;i<2q;i++){q.gW($.3Y.d5[i])}},gW:C(6H){if(1s q[6H]==\'1z\')F;q[6H]=q[6H]();E 6h=q.dg(q[6H]);E 2q=6h.12;2D(E z=0;z<2q;z++){q[6H][6h[z]]=q[6H][6h[z]].a4(q)}},2Z:C(){F{2c:C(){q.2Z.1U(\'\')},4t:C(){q.2Z.1U(\'4t\')},5m:C(){q.2Z.1U(\'5m\')},9B:C(){q.2Z.1U(\'9B\')},1U:C(1m){if(!q.L.1P(\'2G\')&&!q.G.1K){q.$T.2p()}q.2Z.21=q.K.44();q.2Z.1m=1m;q.28.1U();q.K.3o();if(q.2Z.gJ()){q.2Z.gQ()}O{q.2Z.gP()}q.K.3e();q.1e.1T()},gQ:C(){E 4N=q.K.6e(\'1j\');$(4N).1c(\'1f-8u\',\'I\').1O(\'1g-5f\',q.2Z.1m)},gP:C(){$.1u(q.2Z.21,$.1d(C(i,el){E $el=q.L.aS(el);if(!$el)F;if(q.2Z.gI($el)){q.2Z.gH($el)}O{q.2Z.gK($el)}},q))},gJ:C(){F(q.G.1K&&q.2Z.21[0]===N)},gI:C($el){F(q.2Z.1m===\'\'&&1s($el.1f(\'8u\'))!==\'1z\')},gH:C($el){$el.2x($el.B())},gK:C($el){$el.1O(\'1g-5f\',q.2Z.1m);q.L.5C($el,\'1p\')}}},3n:C(){F{B:N,aT:C(){if(!q.G.3n)F;q.3n.1y=(q.G.d4)?q.G.d4:q.$2y.1c(\'1y\');if(q.G.cZ)F;q.9a=o9(q.3n.2K,q.G.9a*oa)},hj:C(){if(!q.G.cZ)F;q.3n.2K()},2K:C(){if(!q.G.3n)F;q.3n.4D=q.1e.1a();if(q.3n.B===q.3n.4D)F;E 1f={};1f[\'1y\']=q.3n.1y;1f[q.3n.1y]=q.3n.4D;1f=q.3n.6A(1f);E gL=$.nQ({2i:q.G.3n,1m:\'ny\',1f:1f});gL.nz(q.3n.gO)},6A:C(1f){if(q.G.bi===N||1s q.G.bi!==\'43\'){F 1f}$.1u(q.G.bi,$.1d(C(k,v){if(v!==4m&&v.4o().4L(\'#\')===0)v=$(v).2L();1f[k]=v},q));F 1f},gO:C(1f){E 2S;4U{2S=$.iO(1f)}56(e){2S=1f}E gN=(1s 2S.6N==\'1z\')?\'3n\':\'nw\';q.1W.2r(gN,q.3n.1y,2S);q.3n.B=q.3n.4D},nq:C(){hq(q.9a)}}},Q:C(){F{30:C(1y){q.Q.bp=N;E 1m,1F;if(1s q.30[1y].1f!=\'1z\')1m=\'1f\';O if(1s q.30[1y].1c!=\'1z\')1m=\'1c\';O if(1s q.30[1y][\'1G\']!=\'1z\')1m=\'1G\';if(1s q.30[1y].9e!=\'1z\'){q.Q.bp=1q}if(1m)1F=q.30[1y][1m];q.Q.3a(q.30[1y].Y,1m,1F)},3a:C(Y,1m,1F){if(Y==\'dp\')Y=\'29\';E gM=[\'p\',\'2F\',\'29\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'];if($.3t(Y,gM)==-1)F;q.Q.8K=(Y==\'2F\'||Y.3J(/h[1-6]/i)!=-1);if(!q.L.1P(\'2G\'))q.$T.2p();E B=$.3h(q.$T.B());q.Q.3z=q.L.3z(B);if(q.L.1P(\'4b\')&&!q.2p.cI()){if(q.Q.3z){E $3I;if(!q.G.1K){$3I=q.$T.3R().3I();q.1S.3H($3I)}}}q.Q.21=q.K.44();q.Q.7q=q.Q.21.12;q.Q.1m=1m;q.Q.1F=1F;q.28.1U();q.K.3o();q.Q.1U(Y);q.K.3e();q.1e.1T();q.1R.2K()},1U:C(Y){q.K.1a();q.Q.6g=q.14.fR.1o;if(q.14.4X){q.Q.gk(Y)}O{q.Q.gj(Y)}},gk:C(Y){if(q.G.1K&&q.Q.3z&&Y!=\'p\'){E R=1k.3B(Y);q.$T.B(R);q.1S.3H(R);F}E Q=q.Q.21[0];if(Q===N)F;if(Q.1o==\'5L\'){if(Y!=\'29\')F;q.Q.bE();F}E bf=(q.Q.6g==\'6u\'||q.Q.6g==\'cr\');if(bf&&!q.G.1K){1k.3Z(\'9S\',N,\'<\'+Y+\'>\');Q=q.K.49();q.Q.3j($(Q))}O if(Q.1o.3g()!=Y){if(q.G.1K&&Y==\'p\'){$(Q).1E(\'<br>\');q.L.5T(Q)}O{E $1X=q.L.4x(Q,Y);q.Q.3j($1X);if(Y!=\'p\'&&Y!=\'29\')$1X.1h(\'1M\').1t();if(q.Q.8K)q.L.4V($1X);if(Y==\'p\'||q.Q.d2)$1X.1h(\'p\').25().48();q.Q.dj($1X)}}O if(Y==\'29\'&&Q.1o.3g()==Y){if(q.G.1K){$(Q).1E(\'<br>\');q.L.5T(Q)}O{E $el=q.L.4x(Q,\'p\');q.Q.3j($el)}}O if(Q.1o.3g()==Y){q.Q.3j($(Q))}if(1s q.Q.1m==\'1z\'&&1s q.Q.1F==\'1z\'){$(Q).1L(\'1G\').1L(\'1p\')}},gj:C(Y){E Q=q.Q.21[0];E bf=(q.Q.6g==\'6u\'||q.Q.6g==\'cr\');if(Q!==N&&q.Q.7q===1){if(Q.1o.3g()==Y&&Y==\'29\'){if(q.G.1K){$(Q).1E(\'<br>\');q.L.5T(Q)}O{E $el=q.L.4x(Q,\'p\');q.Q.3j($el)}}O if(Q.1o==\'5L\'){if(Y!=\'29\')F;q.Q.bE()}O if(q.Q.6g==\'aL\'){q.Q.fP(Y)}O if(q.G.1K&&((bf)||(q.14.fR!=Q))){q.Q.bF(Y)}O{if(q.G.1K&&Y==\'p\'){$(Q).6C(\'<br>\').1E(\'<br>\');q.L.5T(Q)}O if(Q.1o===\'6u\'){q.Q.bF(Y)}O{E $1X=q.L.4x(Q,Y);q.Q.3j($1X);if(q.Q.8K)q.L.4V($1X);if(Y==\'p\'||q.Q.d2)$1X.1h(\'p\').25().48()}}}O{if(q.G.1K||Y!=\'p\'){if(Y==\'29\'){E d1=0;2D(E i=0;i<q.Q.7q;i++){if(q.Q.21[i].1o==\'aL\')d1++}if(d1==q.Q.7q){$.1u(q.Q.21,$.1d(C(i,s){E $1X=N;if(q.G.1K){$(s).6C(\'<br>\').1E(\'<br>\');$1X=q.L.5T(s)}O{$1X=q.L.4x(s,\'p\')}if($1X&&1s q.Q.1m==\'1z\'&&1s q.Q.1F==\'1z\'){$1X.1L(\'1G\').1L(\'1p\')}},q));F}}q.Q.bF(Y)}O{E 8N=0;E 5y=N;if(q.Q.1m==\'1G\'){5y=\'3j\';8N=$(q.Q.21).dO(\'.\'+q.Q.1F).12;if(q.Q.7q==8N)5y=\'3j\';O if(q.Q.7q>8N)5y=\'1U\';O if(8N===0)5y=\'1U\'}E 8Z=[\'3k\',\'ol\',\'li\',\'2Y\',\'6s\',\'dl\',\'dt\',\'dd\'];$.1u(q.Q.21,$.1d(C(i,s){if($.3t(s.1o.3g(),8Z)!=-1)F;E $1X=q.L.4x(s,Y);if(5y){if(5y==\'3j\')q.Q.3j($1X);O if(5y==\'1t\')q.Q.1t($1X);O if(5y==\'1U\')q.Q.fQ($1X)}O q.Q.3j($1X);if(Y!=\'p\'&&Y!=\'29\')$1X.1h(\'1M\').1t();if(q.Q.8K)q.L.4V($1X);if(Y==\'p\'||q.Q.d2)$1X.1h(\'p\').25().48();if(1s q.Q.1m==\'1z\'&&1s q.Q.1F==\'1z\'){$1X.1L(\'1G\').1L(\'1p\')}},q))}}},fQ:C($el){if(q.Q.bp){$el.1L(\'1G\').1L(\'1p\')}if(q.Q.1m==\'1G\'){$el.2g(q.Q.1F);F}O if(q.Q.1m==\'1c\'||q.Q.1m==\'1f\'){$el.1c(q.Q.1F.1y,q.Q.1F.1F);F}},3j:C($el){if(q.Q.bp){$el.1L(\'1G\').1L(\'1p\')}if(q.Q.1m==\'1G\'){$el.7C(q.Q.1F);F}O if(q.Q.1m==\'1c\'||q.Q.1m==\'1f\'){if($el.1c(q.Q.1F.1y)==q.Q.1F.1F){$el.1L(q.Q.1F.1y)}O{$el.1c(q.Q.1F.1y,q.Q.1F.1F)}F}O{$el.1L(\'1p 1G\');F}},1t:C($el){$el.2W(q.Q.1F)},bE:C(){E Q=$(q.Q.21[0]).2o(\'3k, ol\',q.$T[0]);$(Q).1h(\'3k, ol\').25().48();$(Q).1h(\'li\').1E($(\'<br>\')).25().48();E $el=q.L.4x(Q,\'29\');q.Q.3j($el)},fP:C(Y){1k.3Z(\'7n\');1k.3Z(\'9S\',N,Y);q.1x.4r();q.$T.1h(\'p:fT\').1t();E 1X=q.K.49();if(Y!=\'p\'){$(1X).1h(\'1M\').1t()}if(!q.G.1K){q.Q.3j($(1X))}q.$T.1h(\'3k, ol, 6W, 29, p\').1u($.1d(q.L.3T,q));if(q.G.1K&&Y==\'p\'){q.L.5T(1X)}},bF:C(Y){if(q.Q.6g==\'8B\'||q.Q.6g==\'8h\'){if(Y==\'29\'){q.Q.bE()}O{F}}E 1X=q.K.6e(Y);if(1X===N)F;E $1X=$(1X);q.Q.dj($1X);E $fS=$1X.1h(q.G.8E.31(\',\')+\', 2Y, 3V, dE, dF, dI, 6s, 6W\');$fS.25().48();if(Y!=\'p\'&&Y!=\'29\')$1X.1h(\'1M\').1t();$.1u(q.Q.21,$.1d(q.L.3T,q));$1X.1E(q.K.71(2));if(!q.G.1K){q.Q.3j($1X)}q.$T.1h(\'3k, ol, 6W, 29, p\').1u($.1d(q.L.3T,q));$1X.1h(\'29:fT\').1t();if(q.Q.8K){q.L.4V($1X)}if(q.G.1K&&Y==\'p\'){q.L.5T($1X)}if(q.G.1K){E $1N=$1X.1N().1N();if($1N.8b()!=0&&$1N[0].1o===\'5i\'){$1N.1t()}}},dj:C($1X){if($1X.2o(\'3V\',q.$T[0]).12===0)F;if($1X.2o(\'6W\',q.$T[0]).12===0)$1X.6e(\'<6W>\');if($1X.2o(\'2Y\',q.$T[0]).12===0&&$1X.2o(\'6s\').12===0){$1X.6e(\'<2Y>\')}},hd:C(1y,1F){E 21=q.K.44();$(21).1L(\'1f-\'+1y);q.1e.1T()},lq:C(1y,1F){E 21=q.K.44();$(21).1c(\'1f-\'+1y,1F);q.1e.1T()},lr:C(1y,1F){E 21=q.K.44();$.1u(21,C(){if($(q).1c(\'1f-\'+1y)){$(q).1L(\'1f-\'+1y)}O{$(q).1c(\'1f-\'+1y,1F)}})},1L:C(1c,1F){E 21=q.K.44();$(21).1L(1c);q.1e.1T()},ln:C(1c,1F){E 21=q.K.44();$(21).1c(1c,1F);q.1e.1T()},lm:C(1c,1F){E 21=q.K.44();$.1u(21,C(){if($(q).1c(1y)){$(q).1L(1y)}O{$(q).1c(1y,1F)}})},2W:C(3E){E 21=q.K.44();$(21).2W(3E);q.L.5C(21,\'1G\');q.1e.1T()},9o:C(3E){E 21=q.K.44();$(21).2g(3E);q.1e.1T()},7C:C(3E){E 21=q.K.44();$(21).7C(3E);q.1e.1T()}}},28:C(){F{1U:C(1m){if(1s 1m==\'1z\'||1m==\'8P\'){q.28.fV()}O{q.28.fU()}},fV:C(){q.K.3o();q.G.28.2N(q.$T.B());q.K.3e()},fU:C(){q.K.3o();q.G.8M.2N(q.$T.B());q.K.3e()},fN:C(){q.$T.B(q.G.28.fO())},fH:C(){q.$T.B(q.G.8M.fO())},cK:C(){q.G.28.2N(q.$T.B())},8P:C(){if(q.G.28.12===0)F;q.28.1U(\'bC\');q.28.fN();q.K.3e();3w($.1d(q.1R.2K,q),50)},bC:C(){if(q.G.8M.12===0)F;q.28.1U(\'8P\');q.28.fH();q.K.3e();3w($.1d(q.1R.2K,q),50)}}},2f:C(){F{db:N,ag:1q,fG:C(){q.2f.fF();q.2f.fI();q.2f.fM();q.2f.fJ();q.2f.gc()},bA:C(){F(q.$2m[0].1o===\'ls\')},fF:C(){q.$2P=$(\'<1j 1G="I-2P" 9C="lB" />\')},fX:C(){q.$2y=$(\'<2y />\').1c(\'1y\',q.2f.fE())},fE:C(){F((1s(1y)==\'1z\'))?\'dh-\'+q.2H:q.$2m.1c(\'id\')},fI:C(){E 1C=(q.2f.bA())?\'2L\':\'B\';q.dh=$.3h(q.$2m[1C]())},fJ:C(){q.$T.1c({\'5j\':1q,\'gd\':q.G.dc})},fM:C(){E 1C=(q.2f.bA())?\'fL\':\'fK\';q.2f[1C]()},fL:C(){q.$T=$(\'<1j />\');q.$2y=q.$2m;q.$2P.fY(q.$2m).1E(q.$T).1E(q.$2m);q.$T.2g(\'I-T\');q.$2m.3s()},fK:C(){q.$T=q.$2m;q.2f.fX();q.$2P.fY(q.$T).1E(q.$T).1E(q.$2y);q.$T.2g(\'I-T\');q.$2y.3s()},gc:C(){q.1e.1U(q.dh);q.2f.ga();q.2f.gb();if(q.G.5W)F;3w($.1d(q.1e.cF,q),aE)},gb:C(){q.2f.g4();q.2f.g7();q.2f.gg();q.2f.g1();if(q.G.1A){q.G.1A=q.1A.3Q();q.1A.2f()}q.1b.ja();q.2f.92();3w($.1d(q.1R.2K,q),4);q.1W.2r(\'3Q\')},ga:C(){$(q.$2y).1c(\'gd\',q.G.dc);if(q.G.1K)q.$T.2g(\'I-1K\');if(q.G.6G)q.$T.1c(\'6G\',q.G.6G);if(q.G.ae)q.$T.1O(\'ae\',q.G.ae);if(q.G.b3)q.$T.1O(\'b3\',q.G.b3)},g9:C(e){e.2t();if(!q.G.ge||!q.G.gh)F;E 5R=e.aU.5R;q.1w.kf(5R[0],e)},gf:C(e){q.1e.1T();3w(q.1x.4r,1);q.1W.2r(\'4Z\',e)},gg:C(){q.$T.on(\'kb.I lc.I\',C(e){e.2t();e.dK()});q.$T.on(\'4Z.I\',$.1d(C(e){e=e.7L||e;if(3p.aR===1z||!e.aU)F 1q;if(e.aU.5R.12===0){F q.2f.gf(e)}O{q.2f.g9(e)}3w(q.1x.4r,1);q.1W.2r(\'4Z\',e)},q));q.$T.on(\'2z.I\',$.1d(C(e){E 9p=q.1W.7x();E 1m=(9p==\'2z\'||9p==\'54\')?N:\'2z\';q.1W.93(1m);q.L.9z();q.1W.2r(\'2z\',e)},q));q.$T.on(\'5o.I\',$.1d(q.5o.3Q,q));q.$T.on(\'l9.I\',$.1d(q.1e.1T,q));q.$T.on(\'1D.I\',$.1d(q.1D.3Q,q));q.$T.on(\'2s.I\',$.1d(q.2s.3Q,q));if($.5K(q.G.g8)){q.$2y.on(\'1D.I-2y\',$.1d(q.G.g8,q))}if($.5K(q.G.g2)){q.$2y.on(\'2s.I-2y\',$.1d(q.G.g2,q))}q.$T.on(\'2p.I\',$.1d(C(e){if($.5K(q.G.l5)){q.1W.2r(\'2p\',e)}q.2f.db=1q;q.2f.ag=N;if(q.K.3x()===N){q.K.1a();q.14.2O(q.$T[0],0);q.14.3H(q.$T[0],0);q.K.4f()}},q));$(1k).on(\'6j.I-cC.\'+q.2H,$.1d(C(e){if(q.2b)F;if(q.7T)F;if($(e.1Q).2o(\'.I-T, .I-1A, .I-1n\').8b()!==0){F}q.L.9z();if(!q.2f.ag&&$.5K(q.G.l1)){q.1W.2r(\'cC\',e)}q.2f.db=N;q.2f.ag=1q},q))},g1:C(){if(q.2A.a1()){q.2A.3a()}q.3i.aT();if(q.G.2p)3w(q.2p.2O,6O);if(q.G.g0)3w(q.2p.3H,6O)},92:C(){if(!q.G.92)F;$.1u(q.G.92,$.1d(C(i,s){E 1C=(1s df!==\'1z\'&&1s df[s]!==\'1z\')?df:3Y.fn;if(!$.5K(1C[s])){F}q[s]=1C[s]();E 6h=q.dg(q[s]);E 2q=6h.12;2D(E z=0;z<2q;z++){q[s][6h[z]]=q[s][6h[z]].a4(q)}if($.5K(q[s].3Q)){q[s].3Q()}},q))},g4:C(){if(!q.L.1P(\'4b\'))F;4U{1k.3Z(\'md\',N,N);1k.3Z(\'m9\',N,N)}56(e){}},g7:C(){if(!q.L.1P(\'2G\'))F;1k.3Z("m5",N,N)}}},1v:C(){F{2f:C(2h,2U){E $1v=$(\'<a 2l="#" 1G="3K-8X 3K-\'+2h+\'" 3X="\'+2h+\'" />\').1c({\'9C\':\'1v\',\'4O-2M\':2U.1J,\'6G\':\'-1\'});if(2U.1C||2U.4y||2U.1n){q.1v.g6($1v,2h,2U)}if(2U.1n){$1v.2g(\'I-1A-V-1n\').1c(\'4O-i1\',1q);E $1n=$(\'<1j 1G="I-1n I-1n-\'+q.2H+\' I-1n-2P-\'+2h+\'" 1p="6D: 5p;">\');$1v.1f(\'1n\',$1n);q.1n.2f(2h,$1n,2U.1n)}if(q.L.7K()){q.1v.g5($1v,2h,2U.1J)}F $1v},g6:C($1v,2h,2U){$1v.on(\'5B 2z\',$.1d(C(e){if($1v.3u(\'I-1v-7p\'))F N;E 1m=\'1C\';E 2B=2U.1C;if(2U.4y){1m=\'4y\';2B=2U.4y}O if(2U.1n){1m=\'1n\';2B=N}q.1v.bq(e,2h,1m,2B)},q))},g5:C($1v,1y,1J){E $3m=$(\'<1i>\').2g(\'I-1A-3m I-1A-3m-\'+q.2H+\' I-1A-3m-\'+1y).3s().B(1J);$3m.bl(\'3f\');$1v.on(\'ba\',C(){if($(q).3u(\'I-1v-7p\')){F}E 3y=$1v.2v();$3m.1O({2V:(3y.2V+$1v.68())+\'px\',2c:(3y.2c+$1v.7D()/2-$3m.7D()/2)+\'px\'});$3m.2R()});$1v.on(\'b4\',C(){$3m.3s()})},bq:C(e,2h,1m,2B){q.1v.mn=q.1S.8c();e.2t();$(1k).1h(\'.I-1A-3m\').3s();if(q.L.1P(\'2G\'))e.9i=N;if(1m==\'4y\')q.26.3a(2B);O if(1m==\'1n\')q.1n.2R(e,2h);O q.1v.gZ(e,2B,2h)},gZ:C(e,2B,2h){E 1C;if($.5K(2B))2B.64(q,2h);O if(2B.3J(/\\./)!=\'-1\'){1C=2B.4A(\'.\');if(1s q[1C[0]]==\'1z\')F;q[1C[0]][1C[1]](2h)}O q[2B](2h);q.1R.4i(e,2h)},1a:C(1l){F q.$1A.1h(\'a.3K-\'+1l)},8j:C(1l){q.1v.1a(1l).2g(\'I-8x\')},h7:C(1l){q.1v.1a(1l).2W(\'I-8x\')},cP:C(1l){if(1s 1l===\'1z\'){q.$1A.1h(\'a.3K-8X\').2W(\'I-8x\')}O{q.$1A.1h(\'a.3K-8X\').5O(\'.3K-\'+1l).2W(\'I-8x\')}},h8:C(){q.$1A.1h(\'a.3K-8X\').5O(\'a.3K-B, a.3K-h0\').2W(\'I-1v-7p\')},hm:C(){q.$1A.1h(\'a.3K-8X\').5O(\'a.3K-B, a.3K-h0\').2g(\'I-1v-7p\')},mj:C(1l,9Q){q.1v.1a(1l).2g(\'3K-\'+9Q)},m3:C(1l,9Q){q.1v.1a(1l).2W(\'3K-\'+9Q)},lN:C(1l,1y){E $1v=q.1v.1a(1l);$1v.2W(\'I-23-M\').2g(\'fa-I-23\');$1v.B(\'<i 1G="fa \'+1y+\'"></i>\')},ct:C($23,2B){if($23=="28")F;E 1m=(2B==\'1n\')?\'1n\':\'1C\';E 1l=$23.1c(\'3X\');$23.on(\'5B 2z\',$.1d(C(e){if($23.3u(\'I-1v-7p\'))F N;q.1v.bq(e,1l,1m,2B)},q))},cN:C($23,1n){$23.2g(\'I-1A-V-1n\').1c(\'4O-i1\',1q);E 1l=$23.1c(\'3X\');q.1v.ct($23,\'1n\');E $1n=$(\'<1j 1G="I-1n I-1n-\'+q.2H+\' I-1n-2P-\'+1l+\'" 1p="6D: 5p;">\');$23.1f(\'1n\',$1n);if(1n)q.1n.2f(1l,$1n,1n);F $1n},cK:C(1l,1J){if(!q.G.1A)F;if(q.1v.9c(1l))F"28";E 23=q.1v.2f(1l,{1J:1J});23.2g(\'I-23-M\');q.$1A.1E($(\'<li>\').1E(23));F 23},lO:C(1l,1J){if(!q.G.1A)F;if(q.1v.9c(1l))F"28";E 23=q.1v.2f(1l,{1J:1J});23.2g(\'I-23-M\');q.$1A.6C($(\'<li>\').1E(23));F 23},lP:C(i0,1l,1J){if(!q.G.1A)F;if(q.1v.9c(1l))F"28";E 23=q.1v.2f(1l,{1J:1J});23.2g(\'I-23-M\');E $23=q.1v.1a(i0);if($23.12!==0)$23.1r().3C($(\'<li>\').1E(23));O q.$1A.1E($(\'<li>\').1E(23));F 23},lG:C(hZ,1l,1J){if(!q.G.1A)F;if(q.1v.9c(1l))F"28";E 23=q.1v.2f(1l,{1J:1J});23.2g(\'I-23-M\');E $23=q.1v.1a(hZ);if($23.12!==0)$23.1r().9N($(\'<li>\').1E(23));O q.$1A.1E($(\'<li>\').1E(23));F 23},1t:C(1l){q.1v.1a(1l).1t()},9c:C(1l){F(1l=="8P"||1l=="bC")&&!q.L.7K()}}},1S:C(){F{2O:C(R){if(!q.L.6X(R)){E 3b=q.L.ad();$(R).6C(3b);q.1S.3H(3b)}O{q.1S.1U(R,0,R,0)}},3H:C(R){R=R[0]||R;if(R.i3.9R==1){F q.1S.58(R.i3)}q.1S.1U(R,1,R,1)},1U:C(4P,i6,7I,i5){4P=4P[0]||4P;7I=7I[0]||7I;if(q.L.7f(4P.1o)&&4P.3v===\'\'){4P.3v=q.G.5Z}if(4P.1o==\'5i\'&&q.G.1K===N){E 1r=$(q.G.5V)[0];$(4P).2x(1r);4P=1r;7I=4P}q.K.1a();4U{q.14.2O(4P,i6);q.14.3H(7I,i5)}56(e){}q.K.4f()},58:C(R){4U{E Y=$(R)[0].1o;if(Y!=\'5i\'&&!q.L.6X(R)){E 3b=q.L.ad();$(R).3C(3b);q.1S.3H(3b)}O{if(Y!=\'5i\'&&q.L.1P(\'2G\')){q.1S.2O($(R).1N())}O{q.1S.dZ(R,\'3C\')}}}56(e){E 3b=q.L.ad();$(R).3C(3b);q.1S.3H(3b)}},dy:C(R){if(q.L.6X(R)){q.1S.3H($(R).4B())}O{q.1S.dZ(R,\'9N\')}},dZ:C(R,1m){if(!q.L.1P(\'2G\'))q.$T.2p();R=R[0]||R;q.K.1a();if(1m==\'3C\'){4U{q.14.7z(R);q.14.kZ(R)}56(e){}}O{4U{q.14.lW(R);q.14.k9(R)}56(e){}}q.14.42(N);q.K.4f()},9G:C(R){R=R[0]||R;q.K.1a();E 9Z=q.14.84();9Z.8H(R);9Z.3H(q.14.dL,q.14.dM);F $.3h(9Z.4o()).12},8c:C(){E 2v=0;E 2T=3p.4K();if(2T.7y>0){E 14=3p.4K().67(0);E 9W=14.84();9W.8H(q.$T[0]);9W.3H(14.dL,14.dM);2v=9W.4o().12}F 2v},aH:C(2b,2j){if(1s 2j==\'1z\')2j=2b;if(!q.2p.cI())q.2p.2O();E 2T=q.K.1a();E R,2v=0;E i4=1k.lV(q.$T[0],mb.lS,4m,4m);55(R=i4.lR()){2v+=R.5P.12;if(2v>2b){q.14.2O(R,R.5P.12+2b-2v);2b=lH}if(2v>=2j){q.14.3H(R,R.5P.12+2j-2v);5U}}q.14.42(N);q.K.4f()},lM:C(2b,2j){q.1S.aH(2b,2j)},mi:C(){F q.1S.8c()}}},1x:C(){F{hM:C(B){B=q.1x.il(B);B=B.J(/<3W(.*?[^>]?)>([\\w\\W]*?)<\\/3W>/gi,\'<2F 1G="I-3W-Y" 1p="6D: 5p;" $1>$2</2F>\');B=B.J(/\\$/g,\'&#36;\');B=B.J(/<a 2l="(.*?[^>]?)®(.*?[^>]?)">/gi,\'<a 2l="$1&mg$2">\');if(q.G.6q&&!q.G.1K)B=q.1x.6q(B);if(q.G.1K)B=q.1x.8s(B);B=q.1x.bP(B);E $1j=$(\'<1j>\');$1j.B(B);E e4=$1j.1h(\'3O[1p]\');if(e4.12!==0){e4.2x(C(){E $el=$(q);E $1i=$(\'<1i>\').1c(\'1p\',$el.1c(\'1p\'));F $1i.1E($el.25())});B=$1j.B()}$1j.1t();B=B.J(/<3O(.*?)>/gi,\'\');B=B.J(/<\\/3O>/gi,\'\');B=q.1I.2K(B);if(q.G.2X)B=q.2X.2K(B);B=q.1x.7d(B);B=q.1x.bQ(B);B=B.J(/&8J;/g,\'&\');F B},aY:C(B){B=B.J(/\\6c/g,\'\');B=B.J(/&#bL;/gi,\'\');if(q.G.hY){B=B.J(/&5k;/gi,\' \')}if(B.3J(/^<p>(||\\s||<br\\s?\\/?>||&5k;)<\\/p>$/i)!=-1){F\'\'}B=B.J(/<2F 1G="I-3W-Y" 1p="6D: 5p;"(.*?[^>]?)>([\\w\\W]*?)<\\/2F>/gi,\'<3W$1>$2</3W>\');B=q.1x.hN(B);E hX={\'\\mm\':\'&mf;\',\'\\m6\':\'&m4;\',\'\\mq\':\'&ld;\',\'\\l0\':\'&lE;\',\'\\o2\':\'&p4;\'};$.1u(hX,C(i,s){B=B.J(2a 2n(i,\'g\'),s)});if(q.L.1P(\'4b\')){B=B.J(/<br\\s?\\/?>$/gi,\'\')}B=B.J(2a 2n(\'<br\\\\s?/?></li>\',\'gi\'),\'</li>\');B=B.J(2a 2n(\'</li><br\\\\s?/?>\',\'gi\'),\'</li>\');B=B.J(/<(.*?)3X="\\s*?"(.*?[^>]?)>/gi,\'<$1$2">\');B=B.J(/<(.*?)1p="\\s*?"(.*?[^>]?)>/gi,\'<$1$2">\');B=B.J(/="">/gi,\'>\');B=B.J(/""">/gi,\'">\');B=B.J(/"">/gi,\'">\');B=B.J(/<1j(.*?)1f-8u="I"(.*?[^>])>/gi,\'<1j$1$2>\');B=B.J(/<(.*?) 1f-3M="I"(.*?[^>])>/gi,\'<$1$2>\');E $1j=$("<1j/>").B($.dH(B,1k,1q));$1j.1h("1i").1L("3X");$1j.1h(\'2F .I-7m-3b\').1u(C(){$(q).25().48()});B=$1j.B();B=B.J(/<1M(.*?[^>])3X="(.*?[^>])"(.*?[^>])>/gi,\'<1M$1$3>\');B=B.J(/<1i 1G="I-7m-3b">(.*?)<\\/1i>/gi,\'$1\');B=B.J(/ 1f-3o-2i="(.*?[^>])"/gi,\'\');B=B.J(/<1i(.*?)id="I-M-2P"(.*?[^>])>([\\w\\W]*?)<1M(.*?)><\\/1i>/gi,\'$3<1M$4>\');B=B.J(/<1i(.*?)id="I-M-8m"(.*?[^>])>(.*?)<\\/1i>/gi,\'\');B=B.J(/<1i(.*?)id="I-M-5I"(.*?[^>])>(.*?)<\\/1i>/gi,\'\');B=B.J(/<3O(.*?)>/gi,\'\');B=B.J(/<\\/3O>/gi,\'\');B=q.1I.2K(B);if(q.G.hR){B=B.J(/<a(.*?)3X="hQ"(.*?[^>])>/gi,\'<a$1$2>\');B=B.J(/<a(.*?[^>])>/gi,\'<a$1 3X="hQ">\')}B=B.J(/\\qH-I-(Y|1G|1p)="(.*?[^>])"/gi,\'\');B=B.J(2a 2n(\'<(.*?) 1f-3M="I"(.*?[^>])>\',\'gi\'),\'<$1$2>\');B=B.J(2a 2n(\'<(.*?) 1f-3M="I">\',\'gi\'),\'<$1>\');B=B.J(/&8J;/g,\'&\');F B},8G:C(B,8v){B=$.3h(B);B=B.J(/\\$/g,\'&#36;\');B=B.J(/<1i 1G="s[0-9]">/gi,\'<1i>\');B=B.J(/<1i 1G="hP-qJ-3b">&5k;<\\/1i>/gi,\' \');B=B.J(/<1i 1G="hP-5t-1i"[^>]*>\\t<\\/1i>/gi,\'\\t\');B=B.J(/<1i[^>]*>(\\s|&5k;)<\\/1i>/gi,\' \');if(q.G.hO){F q.1x.ap(B)}if(!q.L.9u()&&1s 8v==\'1z\'){if(q.L.4Y([\'hS\',\'A\'])){F q.1x.ap(B,N)}if(q.L.4Y(\'9J\')){B=B.J(/”/g,\'"\');B=B.J(/“/g,\'"\');B=B.J(/‘/g,\'\\\'\');B=B.J(/’/g,\'\\\'\');F q.1x.ic(B)}if(q.L.4Y([\'aL\',\'cJ\',\'cs\',\'c8\',\'c3\',\'c6\',\'bM\'])){B=q.1x.ih(B);if(!q.L.1P(\'2G\')){E Q=q.K.49();if(Q&&Q.1o==\'P\'){B=B.J(/<1M(.*?)>/gi,\'<p><1M$1></p>\')}}F B}if(q.L.4Y([\'6u\'])){B=q.1x.aq(B,\'2Y\');if(q.G.1K)B=q.1x.8s(B);B=q.1x.ii(B);F B}if(q.L.4Y([\'5L\'])){F q.1x.aq(B,\'li\')}}B=q.1x.iw(B,8v);if(!q.1x.8g){if(q.G.1K)B=q.1x.8s(B);if(q.G.6q)B=q.1x.6q(B);B=q.1x.bP(B)}B=q.1x.hT(B);B=q.1x.hU(B);B=q.1x.aq(B,\'ip\');if(!q.1x.8g&&q.G.2X){B=q.2X.2K(B)}B=q.1x.ik(B);B=q.1x.ir(B);B=q.1x.io(B);B=q.1x.bQ(B);F B},hT:C(B){B=B.J(/<!--[\\s\\S]*?-->/gi,\'\');B=B.J(/<1p[^>]*>[\\s\\S]*?<\\/1p>/gi,\'\');B=B.J(/<o\\:p[^>]*>[\\s\\S]*?<\\/o\\:p>/gi,\'\');if(B.1V(/1G="?hV|1p="[^"]*\\hW-|1p=\'[^\'\']*\\hW-|w:qL/i)){B=B.J(/<!--[\\s\\S]+?-->/gi,\'\');B=B.J(/<(!|3W[^>]*>.*?<\\/3W(?=[>\\s])|\\/?(\\?qF(:\\w+)?|1M|5c|V|1p|\\w:\\w+)(?=[\\s\\/>]))[^>]*>/gi,\'\');B=B.J(/<(\\/?)s>/gi,"<$qj>");B=B.J(/ /gi,\' \');B=B.J(/<1i\\s+1p\\s*=\\s*"\\s*aw-qG\\s*:\\s*qo\\s*;?\\s*"\\s*>([\\s\\bm]*)<\\/1i>/gi,C(5b,b1){F(b1.12>0)?b1.J(/./," ").dn(9H.qi(b1.12/2)).4A("").31("\\bm"):\'\'});B=q.1x.it(B);B=B.J(/<1M(.*?)v:qd=(.*?)>/gi,\'\');B=B.J(/4q="1Z\\:\\/\\/(.*?)"/,\'4q=""\');E $1j=$("<1j/>").B(B);E 69=N;E 9m=1;E e7=[];$1j.1h("p[1p]").1u(C(){E 3N=$(q).1c(\'1p\').1V(/aw\\-2d\\:l([0-9]+)\\qe([0-9]+)/);if(3N){E 5Q=5H(3N[1]);E 63=5H(3N[2]);E eg=$(q).B().1V(/^[\\w]+\\./)?"ol":"3k";E $li=$("<li/>").B($(q).B());$li.B($li.B().J(/^([\\w\\.]+)</,\'<\'));$li.1h("1i:3I").1t();if(63==1&&$.3t(5Q,e7)==-1){E $2d=$("<"+eg+"/>").1c({"1f-7V":63,"1f-2d":5Q}).B($li);$(q).2x($2d);69=5Q;e7.2N(5Q)}O{if(63>9m){E $aV=$1j.1h(\'[1f-7V="\'+9m+\'"][1f-2d="\'+69+\'"]\');E $69=$aV;2D(E i=9m;i<63;i++){$2d=$("<"+eg+"/>");$2d.bl($69.1h("li").3c());$69=$2d}$69.1c({"1f-7V":63,"1f-2d":5Q}).B($li)}O{E $aV=$1j.1h(\'[1f-7V="\'+63+\'"][1f-2d="\'+5Q+\'"]\').3c();$aV.1E($li)}9m=63;69=5Q;$(q).1t()}}});$1j.1h(\'[1f-7V][1f-2d]\').1L(\'1f-7V 1f-2d\');B=$1j.B();B=B.J(/·/g,\'\');B=B.J(/<p 1G="hV(.*?)"/gi,\'<p\');B=B.J(/ 1G=\\"(aw[^\\"]*)\\"/gi,"");B=B.J(/ 1G=(aw\\w+)/gi,"");B=B.J(/<o:p(.*?)>([\\w\\W]*?)<\\/o:p>/gi,\'$2\');B=B.J(/\\n/g,\' \');B=B.J(/<p>\\n?<li>/gi,\'<li>\')}F B},hU:C(B){B=B.J(/<b\\ok="i7-4D-2u(.*?)">([\\w\\W]*?)<\\/b>/gi,"$2");B=B.J(/<b(.*?)id="qv-i7-qx(.*?)">([\\w\\W]*?)<\\/b>/gi,"$3");B=B.J(/<1i[^>]*(3O-1p: 4h; 3O-7W: 4n|3O-7W: 4n; 3O-1p: 4h)[^>]*>/gi,\'<1i 1p="3O-7W: 4n;"><1i 1p="3O-1p: 4h;">\');B=B.J(/<1i[^>]*3O-1p: 4h[^>]*>/gi,\'<1i 1p="3O-1p: 4h;">\');B=B.J(/<1i[^>]*3O-7W: 4n[^>]*>/gi,\'<1i 1p="3O-7W: 4n;">\');B=B.J(/<1i[^>]*1g-7e: 5r[^>]*>/gi,\'<1i 1p="1g-7e: 5r;">\');B=B.J(/<1M>/gi,\'\');B=B.J(/\\n{3,}/gi,\'\\n\');B=B.J(/<3O(.*?)>([\\w\\W]*?)<\\/3O>/gi,\'$2\');B=B.J(/<p><p>/gi,\'<p>\');B=B.J(/<\\/p><\\/p>/gi,\'</p>\');B=B.J(/<li>(\\s*|\\t*|\\n*)<p>/gi,\'<li>\');B=B.J(/<\\/p>(\\s*|\\t*|\\n*)<\\/li>/gi,\'</li>\');B=B.J(/<\\/p>\\s<p/gi,\'<\\/p><p\');B=B.J(/<1M 4q="7Q-qb-2i\\:\\/\\/(.*?)"(.*?)>/gi,\'\');B=B.J(/<p>•([\\w\\W]*?)<\\/p>/gi,\'<li>$1</li>\');if(q.L.1P(\'4b\')){B=B.J(/<br\\s?\\/?>$/gi,\'\')}F B},aq:C(B,1m){E 2e=[\'1i\',\'a\',\'2F\',\'29\',\'95\',\'em\',\'5d\',\'1e\',\'ay\',\'85\',\'dW\',\'9d\',\'E\',\'az\',\'eo\',\'7i\',\'7j\',\'b\',\'i\',\'u\',\'4l\',\'ol\',\'3k\',\'li\',\'dl\',\'dt\',\'dd\',\'p\',\'br\',\'6S\',\'8p\',\'4J\',\'7M\',\'8y\',\'43\',\'1M\',\'3V\',\'2Y\',\'6s\',\'6W\',\'dF\',\'dI\',\'dE\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'];E ep=N;E eh=[[\'a\',\'*\'],[\'1M\',[\'4q\',\'7v\']],[\'1i\',[\'1G\',\'3X\',\'1f-3M\']],[\'4J\',\'*\'],[\'6S\',\'*\'],[\'8p\',\'*\'],[\'7M\',\'*\'],[\'43\',\'*\'],[\'8y\',\'*\'],[\'4D\',\'*\']];if(1m==\'ip\'){ep=[\'p\',\'1i\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'];eh=[[\'3V\',\'1G\'],[\'2Y\',[\'qh\',\'qV\']],[\'a\',\'*\'],[\'1M\',[\'4q\',\'7v\',\'1f-I-8F-M\']],[\'1i\',[\'1G\',\'3X\',\'1f-3M\']],[\'4J\',\'*\'],[\'6S\',\'*\'],[\'8p\',\'*\'],[\'7M\',\'*\'],[\'43\',\'*\'],[\'8y\',\'*\'],[\'4D\',\'*\']]}O if(1m==\'2Y\'){2e=[\'3k\',\'ol\',\'li\',\'1i\',\'a\',\'95\',\'em\',\'5d\',\'1e\',\'ay\',\'85\',\'9d\',\'E\',\'az\',\'eo\',\'7i\',\'7j\',\'b\',\'i\',\'u\',\'4l\',\'ol\',\'3k\',\'li\',\'dl\',\'dt\',\'dd\',\'br\',\'4J\',\'6S\',\'8p\',\'7M\',\'8y\',\'43\',\'1M\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\']}O if(1m==\'li\'){2e=[\'3k\',\'ol\',\'li\',\'1i\',\'a\',\'95\',\'em\',\'5d\',\'1e\',\'ay\',\'85\',\'9d\',\'E\',\'az\',\'eo\',\'7i\',\'7j\',\'b\',\'i\',\'u\',\'4l\',\'br\',\'4J\',\'6S\',\'8p\',\'7M\',\'8y\',\'43\',\'1M\']}E 47={4c:(q.G.4c)?q.G.4c:N,4s:(q.G.4s)?q.G.4s:2e,6v:1q,qf:1q,1L:(q.G.1L)?q.G.1L:N,52:(q.G.52)?q.G.52:eh,3T:ep};F q.1I.2K(B,47)},io:C(B){B=B.J(/<(p|h[1-6])>(|\\s|\\n|\\t|<br\\s?\\/?>)<\\/(p|h[1-6])>/gi,\'\');if(!q.G.1K)B=B.J(/<br>$/i,\'\');F B},ir:C(B){B=B.J(/<1i>(.*?)<\\/1i>/gi,\'$1\');B=B.J(/<1i[^>]*>\\s|&5k;<\\/1i>/gi,\' \');F B},it:C(B){if(!q.L.1P(\'2G\'))F B;E 5D=$.3h(B);if(5D.3J(/^<a(.*?)>(.*?)<\\/a>$/i)===0){B=B.J(/^<a(.*?)>(.*?)<\\/a>$/i,"$2")}F B},iw:C(B,8v){q.1x.8g=N;if(!q.L.9u()&&1s 8v==\'1z\'){E 21=q.G.8E.31(\'|\').J(\'P|\',\'\').J(\'8a|\',\'\');E iu=B.1V(2a 2n(\'</(\'+21+\')>\',\'gi\'));E aB=B.1V(/<\\/(p|1j)>/gi);if(!iu&&(aB===4m||(aB&&aB.12<=1))){E im=B.1V(/<br\\s?\\/?>/gi);if(!im){q.1x.8g=1q;B=B.J(/<\\/?(p|1j)(.*?)>/gi,\'\')}}}F B},qY:C(3G,5z){5z=(((5z||\'\')+\'\').3g().1V(/<[a-z][a-7Y-9]*>/g)||[]).31(\'\');E 2e=/<\\/?([a-z][a-7Y-9]*)\\b[^>]*>/gi;F 3G.J(2e,C($0,$1){F 5z.4L(\'<\'+$1.3g()+\'>\')>-1?$0:\'\'})},il:C(B){B=q.1x.ib(B);B=q.1x.ia(B);B=q.1x.i9(B);F B},ib:C(B){E 2F=B.1V(/<2F(.*?)>([\\w\\W]*?)<\\/2F>/gi);if(2F!==4m){$.1u(2F,$.1d(C(i,s){E 2E=s.1V(/<2F(.*?)>([\\w\\W]*?)<\\/2F>/i);2E[2]=2E[2].J(/<br\\s?\\/?>/g,\'\\n\');2E[2]=2E[2].J(/&5k;/g,\' \');if(q.G.72){2E[2]=2E[2].J(/\\t/g,8Q(q.G.72+1).31(\' \'))}2E[2]=q.1x.at(2E[2]);2E[2]=2E[2].J(/\\$/g,\'&#36;\');B=B.J(s,\'<2F\'+2E[1]+\'>\'+2E[2]+\'</2F>\')},q))}F B},ia:C(B){E 1e=B.1V(/<1e(.*?)>([\\w\\W]*?)<\\/1e>/gi);if(1e!==4m){$.1u(1e,$.1d(C(i,s){E 2E=s.1V(/<1e(.*?)>([\\w\\W]*?)<\\/1e>/i);2E[2]=2E[2].J(/&5k;/g,\' \');2E[2]=q.1x.at(2E[2]);2E[2]=2E[2].J(/\\$/g,\'&#36;\');B=B.J(s,\'<1e\'+2E[1]+\'>\'+2E[2]+\'</1e>\')},q))}F B},i9:C(B){B=B.J(/&lt;1i id=&6p;K-2u-([0-9])&6p; 1G=&6p;I-K-2u&6p; 1f-3M=&6p;I&6p;&gt;​&lt;\\/1i&gt;/g,\'<1i id="K-2u-$1" 1G="I-K-2u" 1f-3M="I">​</1i>\');F B},c2:C(B){B=B.J(/<br\\s?\\/?>|<\\/H[1-6]>|<\\/p>|<\\/1j>|<\\/li>|<\\/2Y>/gi,\'\\n\');E 5D=1k.3B(\'1j\');5D.3v=B;B=5D.qm||5D.qC;F $.3h(B)},ap:C(B,2X){B=q.1x.c2(B);B=B.J(/\\n\\s*\\n/g,"\\n");B=B.J(/\\n\\n/g,"\\n");B=B.J(/\\n/g,\'<br />\');if(q.G.2X&&1s 2X==\'1z\'&&!q.L.1P(\'4b\')){B=q.2X.2K(B)}F B},ic:C(B){B=B.J(/<1M(.*?) 1p="(.*?)"(.*?[^>])>/gi,\'<1M$1$3>\');B=B.J(/<1M(.*?)>/gi,\'&lt;1M$1&gt;\');B=q.1x.c2(B);if(q.G.72){B=B.J(/\\t/g,8Q(q.G.72+1).31(\' \'))}B=q.1x.at(B);F B},ih:C(B){B=B.J(/<1M(.*?)>/gi,\'[1M$1]\');B=B.J(/<([qt]*?)>/gi,\'\');B=B.J(/\\[1M(.*?)\\]/gi,\'<1M$1>\');F B},qw:C(B){B=B.J(/<a(.*?)2l="(.*?)"(.*?)>([\\w\\W]*?)<\\/a>/gi,\'[a 2l="$2"]$4[/a]\');B=B.J(/<1M(.*?)>/gi,\'[1M$1]\');B=B.J(/<(.*?)>/gi,\'\');B=B.J(/\\[a 2l="(.*?)"\\]([\\w\\W]*?)\\[\\/a\\]/gi,\'<a 2l="$1">$2</a>\');B=B.J(/\\[1M(.*?)\\]/gi,\'<1M$1>\');F B},at:C(5b){5b=62(5b).J(/&8J;/g,\'&\').J(/&lt;/g,\'<\').J(/&gt;/g,\'>\').J(/&6p;/g,\'"\');F 5b.J(/&/g,\'&8J;\').J(/</g,\'&lt;\').J(/>/g,\'&gt;\').J(/"/g,\'&6p;\')},ik:C(B){if(q.L.1P(\'2G\'))F B;E 1j=1k.3B(\'1j\');1j.3v=B;q.1x.c5($(1j));B=1j.3v;$(1j).1t();F B},4r:C(){if(q.L.1P(\'2G\'))F;q.1x.c5(q.$T);E c4=q.$T.1h(\'h1, h2, h3, h4, h5, h6\');c4.1h(\'1i\').1L(\'1p\');c4.1h(q.G.c7.31(\', \')).1L(\'1p\');q.1e.1T()},c5:C($T){$T.1h(q.G.c7.31(\', \')).1L(\'1p\');$T.1h(\'1i\').5O(\'[1f-3M="I"]\').1L(\'1p\');$T.1h(\'1i[1f-3M="I"], 1M[1f-3M="I"]\').1u(C(i,s){E $s=$(s);$s.1c(\'1p\',$s.1c(\'3X\'))})},qA:C(){},7d:C(B){if(q.L.1P(\'2G\'))F B;B=B.J(2a 2n(\'<1M(.*?[^>])>\',\'gi\'),\'<1M$1 1f-3M="I">\');B=B.J(2a 2n(\'<1i(.*?[^>])>\',\'gi\'),\'<1i$1 1f-3M="I">\');E 3N=B.1V(2a 2n(\'<(1i|1M)(.*?)1p="(.*?)"(.*?[^>])>\',\'gi\'));if(3N){E 2q=3N.12;2D(E i=0;i<2q;i++){4U{E ij=3N[i].J(/1p="(.*?)"/i,\'1p="$1" 3X="$1"\');B=B.J(3N[i],ij)}56(e){}}}F B},bQ:C(B){E $1j=$(\'<1j />\').B(B);E 2e=q.G.4M;2e.2N(\'1i\');$1j.1h(2e.31(\',\')).1u(C(){E $el=$(q);E Y=q.1o.3g();$el.1c(\'1f-I-Y\',Y);if(Y==\'1i\'){if($el.1c(\'1p\'))$el.1c(\'1f-I-1p\',$el.1c(\'1p\'));O if($el.1c(\'1G\'))$el.1c(\'1f-I-1G\',$el.1c(\'1G\'))}});B=$1j.B();$1j.1t();F B},a3:C(){q.$T.1h(\'li\').1u(C(i,s){E $1N=$(s).1N();if($1N.12!==0&&($1N[0].1o==\'8B\'||$1N[0].1o==\'8h\')){$(s).1E($1N)}})},cm:C(B){B=B.J(/\\n/g,\'\');B=B.J(/[\\t]*/g,\'\');B=B.J(/\\n\\s*\\n/g,"\\n");B=B.J(/^[\\s\\n]*/g,\' \');B=B.J(/[\\s\\n]*$/g,\' \');B=B.J(/>\\s{2,}</g,\'> <\');B=B.J(/\\n\\n/g,"\\n");B=B.J(/\\6c/g,\'\');F B},6q:C(B){if(q.G.1K){B=B.J(/<1j><br\\s?\\/?><\\/1j>/gi,\'<br />\');B=B.J(/<1j(.*?)>([\\w\\W]*?)<\\/1j>/gi,\'$2<br />\')}O{B=B.J(/<1j(.*?)>([\\w\\W]*?)<\\/1j>/gi,\'<p$1>$2</p>\')}B=B.J(/<1j(.*?[^>])>/gi,\'\');B=B.J(/<\\/1j>/gi,\'\');F B},ii:C(B){B=B.J(/<1j\\s(.*?)>/gi,\'<p>\');B=B.J(/<1j><br\\s?\\/?><\\/1j>/gi,\'<br /><br />\');B=B.J(/<1j>([\\w\\W]*?)<\\/1j>/gi,\'$1<br /><br />\');F B},8s:C(B){B=B.J(/<p\\s(.*?)>/gi,\'<p>\');B=B.J(/<p><br\\s?\\/?><\\/p>/gi,\'<br />\');B=B.J(/<p>([\\w\\W]*?)<\\/p>/gi,\'$1<br /><br />\');B=B.J(/(<br\\s?\\/?>){1,}\\n?<\\/29>/gi,\'</29>\');F B},bP:C(B){F B.J(/<6k(.*?)>([\\w\\W]*?)<\\/6k>/gi,\'<4d$1 3X="I-6k-Y">$2</4d>\')},hN:C(B){F B.J(/<4d(.*?) 3X="I-6k-Y"(.*?)>([\\w\\W]*?)<\\/4d>/gi,\'<6k$1$2>$3</6k>\')}}},1e:C(){F{1U:C(B){B=$.3h(B.4o());B=q.1x.hM(B);if(q.L.1P(\'2G\')){B=B.J(/<1i(.*?)id="K-2u-(1|2)"(.*?)><\\/1i>/gi,\'\')}q.$T.B(B);q.1e.1T();if(B!==\'\')q.3i.1t();3w($.1d(q.28.cK,q),15);if(q.2b===N)q.1R.2K()},1a:C(){E 1e=q.$2y.2L();if(q.G.6q)1e=q.1x.6q(1e);if(q.G.1K)1e=q.1x.8s(1e);1e=q.2I.1a(1e);F 1e},1T:C(){3w($.1d(q.1e.hk,q),10)},hk:C(){E B=q.$T.B();if(q.1e.cE&&q.1e.cE==B||(q.2b&&B==\'\')){F}q.1e.cE=B;B=q.1W.2r(\'ql\',B);B=q.1x.aY(B);q.$2y.2L(B);q.1W.2r(\'1T\',B);if(q.2b===N){q.1W.2r(\'kg\',B)}q.2b=N;if(q.3n.B==N){q.3n.B=q.1e.1a()}if(q.G.9r){q.$2y.1N(\'.3F\').1u(C(i,el){el.3F.hi(B)})}q.3n.hj();q.3n.aT()},3j:C(){if(q.G.5W){q.1e.cF()}O{q.1e.hp()}},cF:C(){q.K.3o();q.1e.2v=q.1S.8c();E 5N=$(3p).3S();E 2J=q.$T.7D(),3l=q.$T.68();q.$T.3s();E B=q.$2y.2L();q.ha=q.1x.cm(B);B=q.2I.1a(B);E 2b=0,2j=0;E $6R=$("<1j/>").1E($.dH(q.1x.aY(q.$T.B()),1k,1q));E $a0=$6R.1h("1i.I-K-2u");if($a0.12>0){E a2=q.2I.1a($6R.B()).J(/&8J;/g,\'&\');if($a0.12==1){2b=q.L.as(a2,$6R.1h("#K-2u-1").5X("7P"));2j=2b}O if($a0.12==2){2b=q.L.as(a2,$6R.1h("#K-2u-1").5X("7P"));2j=q.L.as(a2,$6R.1h("#K-2u-2").5X("7P"))-$6R.1h("#K-2u-1").5X("7P").4o().12}}q.K.8U();q.$2y.2L(B);if(q.G.9r){q.$2y.1N(\'.3F\').1u(C(i,el){$(el).2R();el.3F.hi(B);el.3F.qI(\'6O%\',3l);el.3F.qM();if(2b==2j){el.3F.qP(el.3F.76(2b).3L,el.3F.76(2j).ch)}O{el.3F.qO({3L:el.3F.76(2b).3L,ch:el.3F.76(2b).ch},{3L:el.3F.76(2j).3L,ch:el.3F.76(2j).ch})}el.3F.2p()})}O{q.$2y.3l(3l).2R().2p();q.$2y.on(\'1D.I-2y-h9\',q.1e.hb);$(3p).3S(5N);if(q.$2y[0].hl){q.$2y[0].hl(2b,2j)}q.$2y[0].3S=0}q.G.5W=N;q.1v.hm();q.1v.8j(\'B\');q.1W.2r(\'4D\',B)},hp:C(){E B;if(q.G.5W)F;E 2b=0,2j=0;if(q.G.9r){E K;q.$2y.1N(\'.3F\').1u(C(i,el){K=el.3F.r0();2b=el.3F.hn(K[0].ho);2j=el.3F.hn(K[0].dG);B=el.3F.qW()})}O{2b=q.$2y.1a(0).ci;2j=q.$2y.1a(0).cq;B=q.$2y.3s().2L()}if(2b>2j&&2j>0){E hh=2j;E fD=2b;2b=hh;2j=fD}2b=q.1e.cx(B,2b);2j=q.1e.cx(B,2j);B=B.4w(0,2b)+q.K.5e(1)+B.4w(2b);if(2j>2b){E cB=q.K.5e(1).4o().12;B=B.4w(0,2j+cB)+q.K.5e(2)+B.4w(2j+cB)}if(q.ha!==q.1x.cm(B)){q.1e.1U(B)}if(q.G.9r){q.$2y.1N(\'.3F\').3s()}q.$T.2R();if(!q.L.3z(B)){q.3i.1t()}q.K.3e();q.$2y.3d(\'1D.I-2y-h9\');q.1v.h8();q.1v.h7(\'B\');q.1R.2K();q.G.5W=1q;q.1W.2r(\'5W\',B)},hb:C(e){if(e.3r!==9)F 1q;E $el=q.$2y;E 2b=$el.1a(0).ci;$el.2L($el.2L().ac(0,2b)+"\\t"+$el.2L().ac($el.1a(0).cq));$el.1a(0).ci=$el.1a(0).cq=2b+1;F N},cx:C(B,2v){E cy=B.12;E c=0;if(B[2v]==\'>\'){c++}O{2D(E i=2v;i<=cy;i++){c++;if(B[i]==\'>\'){5U}O if(B[i]==\'<\'||i==cy){c=0;5U}}}F 2v+c}}},1W:C(){F{oW:C(){F $.7h({},q)},oV:C(){F q.$T},oR:C(){F q.$2P},oQ:C(){F q.$2m},oS:C(){F q.$2y},oT:C(){F(q.$1A)?q.$1A:N},93:C(1y){q.1W.9p=1y},7x:C(){F q.1W.9p},2r:C(1m,e,1f){E a8=1m+\'oU\';E hf=\'I\';E 2B=q.G[a8];if(q.$2y){E 9i=N;E 9j=$.p2(q.$2y[0],\'9j\');if(1s 9j!=\'1z\'&&1s 9j[a8]!=\'1z\'){$.1u(9j[a8],$.1d(C(1l,1F){if(1F[\'pc\']==hf){E 1f=(1s 1f==\'1z\')?[e]:[e,1f];9i=(1s 1f==\'1z\')?1F.7r.64(q,e):1F.7r.64(q,e,1f)}},q))}if(9i)F 9i}if($.5K(2B)){F(1s 1f==\'1z\')?2B.64(q,e):2B.64(q,e,1f)}O{F(1s 1f==\'1z\')?e:1f}},he:C(){q.G.iz=1q;q.1W.2r(\'he\');q.$2m.3d(\'.I\').hd(\'I\');q.$T.3d(\'.I\');$(1k).3d(\'6j.I-cC.\'+q.2H);$(1k).3d(\'6j.I.\'+q.2H);$(1k).3d(\'2z.I-M-82.\'+q.2H);$(1k).3d(\'2z.I-M-4R-3s.\'+q.2H);$(1k).3d(\'5B.I.\'+q.2H+\' 2z.I.\'+q.2H);$("3f").3d(\'5N.I.\'+q.2H);$(q.G.6F).3d(\'5N.I.\'+q.2H);q.$T.2W(\'I-T I-1K I-3i\');q.$T.1L(\'5j\');E B=q.1e.1a();if(q.G.1A){q.$1A.1h(\'a\').1u(C(){E $el=$(q);if($el.1f(\'1n\')){$el.1f(\'1n\').1t();$el.1f(\'1n\',{})}})}if(q.2f.bA()){q.$2P.3C(q.$2m);q.$2P.1t();q.$2m.2L(B).2R()}O{q.$2P.3C(q.$T);q.$2P.1t();q.$2m.B(B).2R()}if(q.$5h)q.$5h.1t();if(q.$4C)q.$4C.1t();if(q.$81)q.$81.1t();$(\'.I-1A-3m-\'+q.2H).1t();hq(q.9a)}}},1n:C(){F{2f:C(1y,$1n,cw){if(1y==\'30\'&&q.G.cv){$.1u(q.G.cv,$.1d(C(i,s){E 1y=s.Y,1C;if(1s s[\'1G\']!=\'1z\'){1y=1y+\'-\'+s[\'1G\']}s.1m=(q.L.7f(s.Y))?\'Q\':\'26\';if(1s s.1C!=="1z"){1C=s.1C}O{1C=(s.1m==\'26\')?\'26.30\':\'Q.30\'}if(q.G.1K&&s.1m==\'Q\'&&s.Y==\'p\')F;q.30[1y]={Y:s.Y,1p:s.1p,\'1G\':s[\'1G\'],1c:s.1c,1f:s.1f,9e:s.9e};cw[1y]={1C:1C,1J:s.1J}},q))}$.1u(cw,$.1d(C(2h,2U){E $2w=$(\'<a 2l="#" 1G="I-1n-\'+2h+\'" 9C="1v">\'+2U.1J+\'</a>\');if(1y==\'30\')$2w.2g(\'I-30-\'+2h);$2w.on(\'2z\',$.1d(C(e){e.2t();E 1m=\'1C\';E 2B=2U.1C;if(2U.4y){1m=\'4y\';2B=2U.4y}O if(2U.1n){1m=\'1n\';2B=2U.1n}if($(e.1Q).3u(\'I-1n-V-e3\'))F;q.1v.bq(e,2h,1m,2B);q.1n.79()},q));q.1R.cN($2w,2h,2U);$1n.1E($2w)},q))},2R:C(e,1l){if(!q.G.5W){e.2t();F N}E $1v=q.1v.1a(1l);E $1n=$1v.1f(\'1n\').bl(1k.3f);if(q.G.bO){$1n.2g("I-1n-j4")}if($1v.3u(\'7c\')){q.1n.79()}O{q.1n.79();q.1R.7H();q.1W.2r(\'qa\',{1n:$1n,1l:1l,1v:$1v});q.1v.8j(1l);$1v.2g(\'7c\');E 7t=$1v.2v();E cf=$1n.2J();if((7t.2c+cf)>$(1k).2J()){7t.2c=9H.p6(0,7t.2c-cf)}E 2c=7t.2c+\'px\';if(q.$1A.3u(\'1A-7G-2P\')){E 2V=q.$1A.68()+q.G.6L;E 4g=\'7G\';if(q.G.6F!==1k){2V=(q.$1A.68()+q.$1A.2v().2V)+q.G.6L;4g=\'9E\'}$1n.1O({4g:4g,2c:2c,2V:2V+\'px\'}).2R()}O{E 2V=($1v.68()+7t.2V)+\'px\';$1n.1O({4g:\'9E\',2c:2c,2V:2V}).2R()}q.1W.2r(\'oP\',{1n:$1n,1l:1l,1v:$1v});q.$1n=$1n}$(1k).cl(\'2z.I-1n\',$.1d(q.1n.3s,q));q.$T.cl(\'2z.I-1n\',$.1d(q.1n.3s,q));$(1k).cl(\'2s.I-1n\',$.1d(q.1n.9t,q));$1n.on(\'ba.I-1n\',$.1d(q.L.dV,q)).on(\'b4.I-1n\',$.1d(q.L.b8,q));e.dK()},9t:C(e){if(e.7w!=q.3r.bG)F;q.1n.79();q.$T.2p()},79:C(){q.$1A.1h(\'a.7c\').2W(\'I-8x\').2W(\'7c\');q.L.b8();$(\'.I-1n-\'+q.2H).3s();$(\'.I-1n-V-hs\').2W(\'I-1n-V-hs\');if(q.$1n){q.$1n.3d(\'.I-1n\');q.1W.2r(\'ov\',q.$1n);q.$1n=N}},3s:C(e){E $1n=$(e.1Q);if(!$1n.3u(\'7c\')&&!$1n.3u(\'I-1n-V-e3\')){if($1n.3u(\'I-1n\')){$1n.2W(\'7c\');$1n.3d(\'ba b4\')}q.1n.79()}}}},1Z:C(){F{2R:C(){q.1b.2K(\'1Z\',q.1H.1a(\'1Z\'),hG);q.1w.3Q(\'#I-1b-1Z-1w\',q.G.7N,q.1Z.1Y);q.K.3o();q.K.1a();E 1g=q.2T.4o();$(\'#I-6f\').2L(1g);q.1b.2R()},1Y:C(2S,4W,e){if(1s 2S.6N!=\'1z\'){q.1b.4j();q.K.3e();q.1W.2r(\'oy\',2S);F}E V;if(1s 2S==\'70\'){V=2S}O{E 1g=$(\'#I-6f\').2L();if(1s 1g==\'1z\'||1g===\'\')1g=2S.6f;V=\'<a 2l="\'+2S.9D+\'" id="9D-2u">\'+1g+\'</a>\'}if(4W){q.K.8U();E 2u=q.K.71();q.1Y.de(e,2u)}O{q.1b.4j()}q.K.3e();q.28.1U();q.1Y.fz(V);if(1s 2S==\'70\')F;E 8f=$(q.$T.1h(\'a#9D-2u\'));if(8f.12!==0){8f.1L(\'id\').1L(\'1p\')}O 8f=N;q.1W.2r(\'7N\',8f,2S)}}},2p:C(){F{2O:C(){q.$T.2p();E 3I=q.$T.3R().3I();if(3I.12===0)F;if(3I[0].12===0||3I[0].1o==\'5i\'||3I[0].9R==3){F}if(3I[0].1o==\'8B\'||3I[0].1o==\'8h\'){E 4v=3I.1h(\'li\').3I();if(!q.L.6X(4v)&&4v.1g()===\'\'){q.1S.2O(4v);F}}if(q.G.1K&&!q.L.7f(3I[0].1o)){q.K.1a();q.14.2O(q.$T[0],0);q.14.3H(q.$T[0],0);q.K.4f();F}q.1S.2O(3I)},3H:C(){E 3c=q.$T.3R().3c();q.$T.2p();if(3c.8b()===0)F;if(q.L.3z(q.$T.B())){q.K.1a();q.14.42(1q);q.14.7z(3c[0]);q.14.3H(3c[0],0);q.K.4f()}O{q.K.1a();q.14.8H(3c[0]);q.14.42(N);q.K.4f()}},cI:C(){F q.$T[0]===1k.ou}}},M:C(){F{2R:C(){q.1b.2K(\'M\',q.1H.1a(\'M\'),hG);q.1w.3Q(\'#I-1b-M-4e\',q.G.7R,q.M.1Y);q.K.3o();q.1b.2R()},eF:C($M){E $V=$M.2o(\'a\',q.$T[0]);q.1b.2K(\'jb\',q.1H.1a(\'7F\'),oo);q.1b.bR();q.M.hE=q.1b.je(q.1H.1a(\'hF\'));q.M.hH=q.1b.c0(q.1H.1a(\'3o\'));q.M.hE.on(\'2z\',$.1d(C(){q.M.1t($M)},q));q.M.hH.on(\'2z\',$.1d(C(){q.M.hD($M)},q));$(\'.I-V-3m\').1t();$(\'#I-M-1J\').2L($M.1c(\'7v\'));if(!q.G.hI)$(\'.I-M-V-41\').3s();O{E $bN=$(\'#I-M-V\');$bN.1c(\'2l\',$M.1c(\'4q\'));if($V.12!==0){$bN.2L($V.1c(\'2l\'));if($V.1c(\'1Q\')==\'7J\')$(\'#I-M-V-87\').5X(\'a6\',1q)}}if(!q.G.hL)$(\'.I-M-4g-41\').3s();O{E hK=($M.1O(\'6D\')==\'Q\'&&$M.1O(\'7o\')==\'5p\')?\'5m\':$M.1O(\'7o\');$(\'#I-M-5f\').2L(hK)}q.1b.2R();$(\'#I-M-1J\').2p()},hC:C($M){E hJ=$(\'#I-M-5f\').2L();E bB=\'\';E cd=\'\';E 8r=\'\';fl(hJ){8A\'2c\':bB=\'2c\';8r=\'0 \'+q.G.8C+\' \'+q.G.8C+\' 0\';5U;8A\'4t\':bB=\'4t\';8r=\'0 0 \'+q.G.8C+\' \'+q.G.8C;5U;8A\'5m\':cd=\'Q\';8r=\'aF\';5U}$M.1O({\'7o\':bB,6D:cd,4G:8r});$M.1c(\'3X\',$M.1c(\'1p\'))},hD:C($M){q.M.7Z();q.28.1U();E $V=$M.2o(\'a\',q.$T[0]);E 1J=$(\'#I-M-1J\').2L().J(/(<([^>]+)>)/ig,"");$M.1c(\'7v\',1J);q.M.hC($M);E V=$.3h($(\'#I-M-V\').2L());E V=V.J(/(<([^>]+)>)/ig,"");if(V!==\'\'){E 7A=\'((kC--)?[a-7Y-9]+(-[a-7Y-9]+)*\\\\.)+[a-z]{2,}\';E 3K=2a 2n(\'^(9n|8l|5E)://\'+7A,\'i\');E al=2a 2n(\'^\'+7A,\'i\');if(V.3J(3K)==-1&&V.3J(al)===0&&q.G.5a){V=q.G.5a+\'://\'+V}E 1Q=($(\'#I-M-V-87\').5X(\'a6\'))?1q:N;if($V.12===0){E a=$(\'<a 2l="\'+V+\'">\'+q.L.6r($M)+\'</a>\');if(1Q)a.1c(\'1Q\',\'7J\');$M.2x(a)}O{$V.1c(\'2l\',V);if(1Q){$V.1c(\'1Q\',\'7J\')}O{$V.1L(\'1Q\')}}}O if($V.12!==0){$V.2x(q.L.6r($M))}q.1b.4j();q.1R.bK();q.1e.1T()},iV:C($M){if(q.G.ca){$M.on(\'oJ\',$.1d(q.M.a7,q))}E 7r=$.1d(C(e){q.1R.M=$M;q.M.8m=q.M.eI($M);$(1k).on(\'6j.I-M-4R-3s.\'+q.2H,$.1d(q.M.7Z,q));if(!q.G.cO)F;q.M.8m.on(\'6j.I 5B.I\',$.1d(C(e){q.M.hw(e,$M)},q))},q);$M.3d(\'6j.I\').on(\'6j.I\',$.1d(q.M.7Z,q));$M.3d(\'2z.I 5B.I\').on(\'2z.I 5B.I\',7r)},hw:C(e,$M){e.2t();q.M.4k={x:e.hv,y:e.bD,el:$M,bT:$M.2J()/$M.3l(),h:$M.3l()};e=e.7L||e;if(e.8z){q.M.4k.x=e.8z[0].hv;q.M.4k.y=e.8z[0].bD}q.M.hu()},hu:C(){$(1k).on(\'oI.I-M-4R oH.I-M-4R\',$.1d(q.M.ht,q));$(1k).on(\'jK.I-M-4R oD.I-M-4R\',$.1d(q.M.hy,q))},ht:C(e){e.2t();e=e.7L||e;E 3l=q.M.4k.h;if(e.8z)3l+=(e.8z[0].bD-q.M.4k.y);O 3l+=(e.bD-q.M.4k.y);E 2J=9H.hx(3l*q.M.4k.bT);if(3l<50||2J<6O)F;E 3l=9H.hx(q.M.4k.el.2J()/q.M.4k.bT);q.M.4k.el.1c({2J:2J,3l:3l});q.M.4k.el.2J(2J);q.M.4k.el.3l(3l);q.1e.1T()},hy:C(){q.jk=N;$(1k).3d(\'.I-M-4R\');q.M.7Z()},a7:C(e){if(q.$T.1h(\'#I-M-2P\').12!==0){e.2t();F N}q.$T.on(\'4Z.I-M-hB-4Z\',$.1d(C(){3w($.1d(q.M.aJ,q),1)},q))},aJ:C(){q.M.hA();q.1R.bK();q.$T.3d(\'4Z.I-M-hB-4Z\');q.1x.4r();q.1e.1T()},hA:C(){q.$T.1h(\'1M[1f-3o-2i]\').1u(C(){E $el=$(q);$el.1c(\'4q\',$el.1c(\'1f-3o-2i\'));$el.1L(\'1f-3o-2i\')})},7Z:C(e){if(e&&$(e.1Q).2o(\'#I-M-2P\',q.$T[0]).12!==0)F;if(e&&e.1Q.1o==\'ab\'){E $M=$(e.1Q);$M.1c(\'1f-3o-2i\',$M.1c(\'4q\'))}E 3D=q.$T.1h(\'#I-M-2P\');if(3D.12===0)F;$(\'#I-M-5I\').1t();$(\'#I-M-8m\').1t();3D.1h(\'1M\').1O({5Y:3D[0].1p.5Y,aC:3D[0].1p.aC,aW:3D[0].1p.aW,bI:3D[0].1p.bI});3D.1O(\'4G\',\'\');3D.1h(\'1M\').1O(\'ez\',\'\');3D.2x(C(){F $(q).25()});$(1k).3d(\'6j.I-M-4R-3s.\'+q.2H);if(1s q.M.4k!==\'1z\'){q.M.4k.el.1c(\'3X\',q.M.4k.el.1c(\'1p\'))}q.1e.1T()},eJ:C($M,3D){if(q.G.cO&&!q.L.6Y()){E 8e=$(\'<1i id="I-M-8m" 1f-I="3M"></1i>\');if(!q.L.7K()){8e.1O({2J:\'hz\',3l:\'hz\'})}8e.1c(\'5j\',N);3D.1E(8e);3D.1E($M);F 8e}O{3D.1E($M);F N}},eI:C($M){E 3D=$(\'<1i id="I-M-2P" 1f-I="3M">\');3D.1O(\'7o\',$M.1O(\'7o\')).1c(\'5j\',N);if($M[0].1p.4G!=\'aF\'){3D.1O({5Y:$M[0].1p.5Y,aC:$M[0].1p.aC,aW:$M[0].1p.aW,bI:$M[0].1p.bI});$M.1O(\'4G\',\'\')}O{3D.1O({\'6D\':\'Q\',\'4G\':\'aF\'})}$M.1O(\'ez\',\'.5\').3C(3D);if(q.G.ca){q.M.5I=$(\'<1i id="I-M-5I" 1f-I="3M">\'+q.1H.1a(\'7F\')+\'</1i>\');q.M.5I.1c(\'5j\',N);q.M.5I.on(\'2z\',$.1d(C(){q.M.eF($M)},q));3D.1E(q.M.5I);E eM=q.M.5I.7D();q.M.5I.1O(\'4G-2c\',\'-\'+eM/2+\'px\')}F q.M.eJ($M,3D)},1t:C(M){E $M=$(M);E $V=$M.2o(\'a\',q.$T[0]);E $6t=$M.2o(\'6t\',q.$T[0]);E $1r=$M.1r();if($(\'#I-M-2P\').12!==0){$1r=$(\'#I-M-2P\').1r()}E $1N;if($6t.12!==0){$1N=$6t.1N();$6t.1t()}O if($V.12!==0){$1r=$V.1r();$V.1t()}O{$M.1t()}$(\'#I-M-2P\').1t();if($6t.12!==0){q.1S.2O($1N)}O{q.1S.2O($1r)}q.1W.2r(\'dk\',$M[0].4q,$M);q.1b.4j();q.1e.1T()},1Y:C(2S,4W,e){if(1s 2S.6N!=\'1z\'){q.1b.4j();q.K.3e();q.1W.2r(\'pP\',2S);F}E $1M;if(1s 2S==\'70\'){$1M=$(2S).1c(\'1f-I-8F-M\',\'1q\')}O{$1M=$(\'<1M>\');$1M.1c(\'4q\',2S.9D).1c(\'1f-I-8F-M\',\'1q\')}E R=$1M;E cW=q.L.4Y(\'P\');if(cW){R=$(\'<29 />\').1E($1M)}if(4W){q.K.8U();E 2u=q.K.71();q.1Y.de(e,2u)}O{q.1b.4j()}q.K.3e();q.28.1U();q.1Y.B(q.L.6r(R),N);E $M=q.$T.1h(\'1M[1f-I-8F-M=1q]\').1L(\'1f-I-8F-M\');if(cW){$M.1r().25().48().6e(\'<p />\')}O if(q.G.1K){if(!q.L.3z(q.1e.1a())){$M.9N(\'<br>\')}$M.3C(\'<br>\')}if(1s 2S==\'70\')F;q.1W.2r(\'7R\',$M,2S)}}},3A:C(){F{9Y:C(){if(!q.L.1P(\'2G\'))q.$T.2p();q.28.1U();q.K.3o();E Q=q.K.49();if(Q&&Q.1o==\'5L\'){q.3A.fC()}O if(Q===N&&q.G.1K){q.3A.eV()}O{q.3A.fq()}q.K.3e();q.1e.1T()},fC:C(){1k.3Z(\'3A\');q.3A.9O();q.1x.a3();q.1x.4r()},fq:C(){$.1u(q.K.44(),$.1d(C(i,53){if(53.1o===\'6u\'||53.1o===\'cr\')F;E $el=q.L.aS(53);E 2c=q.L.cY($el.1O(\'4G-2c\'))+q.G.9M;$el.1O(\'4G-2c\',2c+\'px\')},q))},eV:C(){E 4N=q.K.6e(\'1j\');$(4N).1c(\'1f-8u\',\'I\');$(4N).1O(\'4G-2c\',q.G.9M+\'px\')},9v:C(){q.28.1U();q.K.3o();E Q=q.K.49();if(Q&&Q.1o==\'5L\'){q.3A.eP()}O{q.3A.ff()}q.K.3e();q.1e.1T()},eP:C(){1k.3Z(\'7n\');E 1B=q.K.3x();E $2w=$(1B).2o(\'li\',q.$T[0]);q.3A.9O();if(!q.G.1K&&$2w.12===0){1k.3Z(\'9S\',N,\'p\');q.$T.1h(\'3k, ol, 29, p\').1u($.1d(q.L.3T,q))}q.1x.4r()},ff:C(){$.1u(q.K.44(),$.1d(C(i,53){E $el=q.L.aS(53);E 2c=q.L.cY($el.1O(\'4G-2c\'))-q.G.9M;if(2c<=0){if(q.G.1K&&1s($el.1f(\'8u\'))!==\'1z\'){$el.2x($el.B()+\'<br />\')}O{$el.1O(\'4G-2c\',\'\');q.L.5C($el,\'1p\')}}O{$el.1O(\'4G-2c\',2c+\'px\')}},q))},9O:C(){E Q=q.K.49();if(q.14.4X&&Q&&Q.1o==\'5L\'&&q.L.3z($(Q).1g())){E $Q=$(Q);$Q.1h(\'1i\').5O(\'.I-K-2u\').25().48();$Q.1E(\'<br>\')}}}},26:C(){F{30:C(1y){E 1m,1F;if(1s q.30[1y].1p!=\'1z\')1m=\'1p\';O if(1s q.30[1y][\'1G\']!=\'1z\')1m=\'1G\';if(1m)1F=q.30[1y][1m];q.26.3a(q.30[1y].Y,1m,1F)},3a:C(Y,1m,1F){E 1B=q.K.3x();if(1B&&1B.1o===\'pN\')F;if(q.L.4Y(\'9J\')||q.L.ix())F;E 2e=[\'b\',\'4n\',\'i\',\'4h\',\'5r\',\'eD\',\'5S\',\'eZ\',\'fc\'];E es=[\'5d\',\'5d\',\'em\',\'em\',\'u\',\'4l\',\'4l\',\'7i\',\'7j\'];2D(E i=0;i<2e.12;i++){if(Y==2e[i])Y=es[i]}if(q.G.4s){if($.3t(Y,q.G.4s)==-1)F}O{if($.3t(Y,q.G.4c)!==-1)F}q.26.1m=1m||N;q.26.1F=1F||N;q.28.1U();if(!q.L.1P(\'2G\')&&!q.G.1K){q.$T.2p()}q.K.1a();if(q.14.4X){q.26.eN(Y)}O{q.26.eA(Y)}},eN:C(Y){E 1B=q.K.3x();E $1r=$(1B).2o(Y+\'[1f-I-Y=\'+Y+\']\',q.$T[0]);if($1r.12!==0&&(q.26.1m!=\'1p\'&&$1r[0].1o!=\'6x\')){if(q.L.3z($1r.1g())){q.1S.58($1r[0]);$1r.1t();q.1e.1T()}O if(q.L.6B($1r)){q.1S.58($1r[0])}F}E R=$(\'<\'+Y+\'>\').1c(\'1f-3M\',\'I\').1c(\'1f-I-Y\',Y);R.B(q.G.5Z);R=q.26.e5(R);E R=q.1Y.R(R);q.1S.3H(R);q.1e.1T()},eA:C(Y){q.26.eK(Y);q.K.3o();1k.3Z(\'eD\');q.$T.1h(\'7b\').1u($.1d(C(i,s){E $el=$(s);q.26.eL($el,Y);E $1i;if(q.26.1m){$1i=$(\'<1i>\').1c(\'1f-I-Y\',Y).1c(\'1f-3M\',\'I\');$1i=q.26.e5($1i)}O{$1i=$(\'<\'+Y+\'>\').1c(\'1f-I-Y\',Y).1c(\'1f-3M\',\'I\')}$el.2x($1i.B($el.25()));E $1r=$1i.1r();if($1i[0].1o===\'A\'&&$1r&&$1r[0].1o===\'U\'){$1i.1r().2x($1i)}if(Y==\'1i\'){if($1r&&$1r[0].1o===\'6x\'&&q.26.1m===\'1p\'){E 2E=q.26.1F.4A(\';\');2D(E z=0;z<2E.12;z++){if(2E[z]===\'\')F;E 1p=2E[z].4A(\':\');$1r.1O(1p[0],\'\');if(q.L.5C($1r,\'1p\')){$1r.2x($1r.25())}}}}},q));if(Y!=\'1i\'){q.$T.1h(q.G.4M.31(\', \')).1u($.1d(C(i,s){E $el=$(s);if(s.1o===\'U\'&&s.4z.12===0){$el.2x($el.25());F}E aD=$el.1O(\'1g-7e\');if(aD===\'3L-eB\'){$el.1O(\'1g-7e\',\'\');q.L.5C($el,\'1p\')}},q))}if(Y!=\'4l\'){E ar=q;q.$T.1h(\'26\').1u(C(i,s){ar.L.4x(s,\'4l\')})}if(Y!=\'u\'){E ar=q;q.$T.1h(\'eH\').1u(C(i,s){ar.L.4x(s,\'u\')})}q.K.3e();q.1e.1T()},eL:C($el,Y){E 3q=q;$el.3R(Y).1u(C(){E $4v=$(q);if(!$4v.3u(\'I-K-2u\')){if(3q.26.1m==\'1p\'){E 2E=3q.26.1F.4A(\';\');2D(E z=0;z<2E.12;z++){if(2E[z]===\'\')F;E 1p=2E[z].4A(\':\');$4v.1O(1p[0],\'\');if(3q.L.5C($4v,\'1p\')){$4v.2x($4v.25())}}}O{$4v.25().48()}}})},eK:C(Y){q.K.3o();E 1h=\'\';if(q.26.1m==\'1G\')1h=\'[1f-I-1G=\'+q.26.1F+\']\';O if(q.26.1m==\'1p\'){1h=\'[1f-I-1p="\'+q.26.1F+\'"]\'}E 3q=q;if(Y!=\'4l\'){q.$T.1h(\'4l\').1u(C(i,s){3q.L.4x(s,\'26\')})}if(Y!=\'u\'){q.$T.1h(\'u\').1u(C(i,s){3q.L.4x(s,\'eH\')})}if(Y!=\'1i\'){q.$T.1h(Y).1u(C(){E $el=$(q);$el.2x($(\'<7b />\').B($el.25()))})}q.$T.1h(\'[1f-I-Y="\'+Y+\'"]\'+1h).1u(C(){if(1h===\'\'&&Y==\'1i\'&&q.1o.3g()==Y)F;E $el=$(q);$el.2x($(\'<7b />\').B($el.25()))});q.K.3e()},e5:C(R){fl(q.26.1m){8A\'1G\':if(R.3u(q.26.1F)){R.2W(q.26.1F);R.1L(\'1f-I-1G\')}O{R.2g(q.26.1F);R.1c(\'1f-I-1G\',q.26.1F)}5U;8A\'1p\':R[0].1p.pY=q.26.1F;R.1c(\'1f-I-1p\',q.26.1F);5U}F R},q1:C(){q.28.1U();E 1B=q.K.3x();E 22=q.K.c9();q.K.3o();if(1B&&1B.1o===\'6x\'){E $s=$(1B);$s.1L(\'1p\');if($s[0].4z.12===0){$s.2x($s.25())}}$.1u(22,$.1d(C(i,s){E $s=$(s);if($.3t(s.1o.3g(),q.G.4M)!=-1&&!$s.3u(\'I-K-2u\')){$s.1L(\'1p\');if($s[0].4z.12===0){$s.2x($s.25())}}},q));q.K.3e();q.1e.1T()},q2:C(1y){q.28.1U();E 1r=q.K.6l();E 22=q.K.c9();q.K.3o();if(1r&&1r.1o===\'6x\'){E $s=$(1r);$s.1O(1y,\'\');q.L.5C($s,\'1p\');if($s[0].4z.12===0){$s.2x($s.25())}}$.1u(22,$.1d(C(i,s){E $s=$(s);if($.3t(s.1o.3g(),q.G.4M)!=-1&&!$s.3u(\'I-K-2u\')){$s.1O(1y,\'\');q.L.5C($s,\'1p\');if($s[0].4z.12===0){$s.2x($s.25())}}},q));q.K.3e();q.1e.1T()},e1:C(){q.28.1U();E 1B=q.K.3x();q.K.3o();1k.3Z(\'e1\');if(1B&&1B.1o===\'6x\'){$(1B).2x($(1B).25())}$.1u(q.K.6w(),$.1d(C(i,s){E $s=$(s);if($.3t(s.1o.3g(),q.G.4M)!=-1&&!$s.3u(\'I-K-2u\')){$s.2x($s.25())}},q));q.K.3e();q.1e.1T()},7C:C(3E){q.26.3a(\'1i\',\'1G\',3E)},pI:C(1F){q.26.3a(\'1i\',\'1p\',1F)}}},1Y:C(){F{1U:C(B,1x){q.3i.1t();B=q.1x.7d(B);if(1s 1x==\'1z\'){B=q.1x.8G(B,N)}q.$T.B(B);q.K.1t();q.2p.3H();q.1x.a3();q.1e.1T();q.1R.2K();if(1s 1x==\'1z\'){3w($.1d(q.1x.4r,q),10)}},1g:C(1g){q.3i.1t();1g=1g.4o();1g=$.3h(1g);1g=q.1x.ap(1g,N);q.$T.2p();if(q.L.1P(\'2G\')){q.1Y.dX(1g)}O{q.K.1a();q.14.57();E el=1k.3B("1j");el.3v=1g;E 4Q=1k.b0(),R,5G;55((R=el.aZ)){5G=4Q.74(R)}q.14.3P(4Q);if(5G){E 14=q.14.84();14.7z(5G);14.42(1q);q.2T.8R();q.2T.4f(14)}}q.1e.1T();q.1x.4r()},fz:C(B){q.1Y.B(B,N)},B:C(B,1x){q.3i.1t();if(1s 1x==\'1z\')1x=1q;if(!q.G.1K){q.$T.2p()}B=q.1x.7d(B);if(1x){B=q.1x.8G(B)}if(q.L.1P(\'2G\')){q.1Y.dX(B)}O{if(q.1x.8g)q.1Y.f0(B);O 1k.3Z(\'pq\',N,B);q.1Y.fj()}q.1x.a3();if(!q.G.1K){q.$T.1h(\'p\').1u($.1d(q.L.3T,q))}q.1e.1T();q.1R.2K();if(1x){q.1x.4r()}},fj:C(){if(!q.L.1P(\'4b\'))F;E $1N=$(q.K.49()).1N();if($1N.12>0&&$1N[0].1o==\'P\'&&$1N.B()===\'\'){$1N.1t()}},dX:C(B){if(q.L.hc()){E 1r=q.L.4Y(\'P\');E $B=$(\'<1j>\').1E(B);E fb=$B.25().is(\'p, :75, dl, 3k, ol, 1j, 3V, 2Y, 29, 2F, dW, 4d, 75, cc, eS, fo\');if(1r&&fb)q.1Y.eR(1r,B);O q.1Y.eQ(B);F}1k.K.8O().jI(B)},f0:C(B){B=q.1x.7d(B);q.K.1a();q.14.57();E el=1k.3B(\'1j\');el.3v=B;E 4Q=1k.b0(),R,5G;55((R=el.aZ)){5G=4Q.74(R)}q.14.3P(4Q);q.14.42(1q);q.1S.58(5G)},R:C(R,57){R=R[0]||R;E 2v=q.1S.8c();E B=q.L.6r(R);B=q.1x.7d(B);if(B.1V(/</g)!==4m){R=$(B)[0]}q.K.1a();if(57!==N){q.14.57()}q.14.3P(R);q.14.42(N);q.K.4f();q.1S.aH(2v);F R},ph:C(R,x,y){R=R[0]||R;q.K.1a();E 14;if(1k.a5){E 3y=1k.a5(x,y);q.14.2O(3y.fe,3y.2v);q.14.42(1q);q.14.3P(R)}O if(1k.aj){14=1k.aj(x,y);14.3P(R)}O if(1s 1k.3f.ak!="1z"){14=1k.3f.ak();14.am(x,y);E 7k=14.fh();7k.am(x,y);14.fg("eY",7k);14.7a()}},de:C(e,R){R=R[0]||R;E 14;E x=e.pj,y=e.pk;if(1k.a5){E 3y=1k.a5(x,y);E 2T=1k.4K();14=2T.67(0);14.2O(3y.fe,3y.2v);14.42(1q);14.3P(R)}O if(1k.aj){14=1k.aj(x,y);14.3P(R)}O if(1s 1k.3f.ak!="1z"){14=1k.3f.ak();14.am(x,y);E 7k=14.fh();7k.am(x,y);14.fg("eY",7k);14.7a()}},eR:C(1r,B){E R=1k.3B(\'1i\');R.3E=\'I-ie-5o\';q.1Y.R(R);E 78=$(1r).B();78=\'<p>\'+78.J(/<1i 1G="I-ie-5o"><\\/1i>/gi,\'</p>\'+B+\'<p>\')+\'</p>\';78=78.J(/<p><\\/p>/gi,\'\');$(1r).2x(78)},eQ:C(B){q.K.1a();q.14.57();E el=1k.3B("1j");el.3v=B;E 4Q=1k.b0(),R,5G;55((R=el.aZ)){5G=4Q.74(R)}q.14.3P(4Q);q.14.42(N);q.K.4f()}}},1D:C(){F{3Q:C(e){if(q.7T)F;E 1l=e.7w;E 54=(1l>=37&&1l<=40);q.1D.4a=e.9l||e.6I;q.1D.1B=q.K.3x();q.1D.1r=q.K.6l();q.1D.Q=q.K.49();q.1D.2F=q.L.9P(q.1D.1B,\'2F\');q.1D.29=q.L.9P(q.1D.1B,\'29\');q.1D.80=q.L.9P(q.1D.1B,\'80\');q.6a.3Q(e,1l);if(q.L.7K()){q.1D.fv(54,1l);q.1D.fp(e,1l)}q.1D.fm(54);q.1D.fr(e,1l);E eT=q.1W.2r(\'1D\',e);if(eT===N){e.2t();F N}if(q.G.aP&&(q.L.1P(\'2G\')||q.L.1P(\'4b\'))&&(1l===q.3r.dm||1l===q.3r.eW)){E di=N;E $3V=N;if(q.1D.Q&&q.1D.Q.1o===\'6u\'){$3V=$(q.1D.Q).2o(\'3V\',q.$T[0])}if($3V&&$3V.1h(\'2Y\').3c()[0]===q.1D.Q){di=1q}if(q.L.6B()&&di){E R=$(q.G.5V);$3V.3C(R);q.1S.2O(R)}}if(q.G.aP&&1l===q.3r.dm){q.1D.ew()}if(!q.G.aP&&1l===q.3r.6z){e.2t();if(!q.14.4X)q.14.57();F}if(1l==q.3r.6z&&!e.6Z&&!e.9l&&!e.6I){E eU=q.1W.2r(\'pB\',e);if(eU===N){e.2t();F N}if(q.1D.29&&q.1D.ju(e)===1q){F N}E 1B,$1N;if(q.1D.2F){F q.1D.kN(e)}O if(q.1D.29||q.1D.80){1B=q.K.3x();$1N=$(1B).1N();if($1N.12!==0&&$1N[0].1o==\'5i\'){F q.1D.6V(e)}O if(q.L.6B()&&(1B&&1B!=\'6x\')){F q.1D.8W(e)}O{F q.1D.6V(e)}}O if(q.G.1K&&!q.1D.Q){1B=q.K.3x();$1N=$(q.1D.1B).1N();if($1N.12!==0&&$1N[0].1o==\'5i\'){F q.1D.6V(e)}O if(1B!==N&&$(1B).3u(\'I-7m-3b\')){q.1S.58(1B);$(1B).25().48();F q.1D.8W(e)}O{if(q.L.e2()){F q.1D.8W(e)}O if($1N.12===0&&1B===N&&1s $1N.pw!=\'1z\'){F q.1D.6V(e)}F q.1D.6V(e)}}O if(q.G.1K&&q.1D.Q){3w($.1d(q.1D.ey,q),1)}O if(!q.G.1K&&q.1D.Q){3w($.1d(q.1D.eC,q),1);if(q.1D.Q.1o===\'5L\'){1B=q.K.3x();E $1r=$(1B).2o(\'li\',q.$T[0]);E $2d=$1r.2o(\'3k,ol\',q.$T[0]);if($1r.12!==0&&q.L.3z($1r.B())&&$2d.1N().12===0&&q.L.3z($2d.1h("li").3c().B())){$2d.1h("li").3c().1t();E R=$(q.G.5V);$2d.3C(R);q.1S.2O(R);F N}}}O if(!q.G.1K&&!q.1D.Q){F q.1D.hg(e)}}if(1l===q.3r.6z&&(e.9l||e.6Z)){F q.1D.eu(e)}if(1l===q.3r.da||e.6I&&1l===d8||e.6I&&1l===d3){F q.1D.ev(e,1l)}if(1l===q.3r.83||1l===q.3r.8S){E 22=q.K.6w();if(22){E 2q=22.12;E 3c;2D(E i=0;i<2q;i++){E 3R=$(22[i]).3R(\'1M\');if(3R.12!==0){E 3q=q;$.1u(3R,C(z,s){E $s=$(s);if($s.1O(\'7o\')!=\'5p\')F;3q.1W.2r(\'dk\',s.4q,$s);3c=s})}O if(22[i].1o==\'ab\'){if(3c!=22[i]){q.1W.2r(\'dk\',22[i].4q,$(22[i]));3c=22[i]}}}}}if(1l===q.3r.83){E Q=q.K.49();E fx=($(Q).1O(\'4G-2c\')!==\'pv\');if(Q&&fx&&q.14.4X&&q.L.iy()){q.3A.9v();e.2t();F}if(q.L.1P(\'4b\')){E 4B=q.K.k4();E bv=$(4B).4B()[0];if(4B&&4B.1o===\'fw\')$(4B).1t();if(bv&&bv.1o===\'fw\')$(bv).1t()}q.1D.kS();q.1D.kL(e)}q.1e.1T()},fv:C(54,1l){if(!54&&(q.1W.7x()==\'2z\'||q.1W.7x()==\'54\')){q.1W.93(N);if(q.1D.fy(1l)){q.28.1U()}}},fy:C(1l){E k=q.3r;E 4S=[k.83,k.8S,k.6z,k.bG,k.da,k.fB,k.fA,k.fu,k.ft];F($.3t(1l,4S)==-1)?1q:N},fm:C(54){if(!54)F;if((q.1W.7x()==\'2z\'||q.1W.7x()==\'54\')){q.1W.93(N);F}q.1W.93(\'54\')},fp:C(e,1l){if(q.1D.4a&&1l===90&&!e.6Z&&!e.fs&&q.G.28.12){e.2t();q.28.8P();F}O if(q.1D.4a&&1l===90&&e.6Z&&!e.fs&&q.G.8M.12!==0){e.2t();q.28.bC();F}O if(!q.1D.4a){if(1l==q.3r.83||1l==q.3r.8S||(1l==q.3r.6z&&!e.9l&&!e.6Z)){q.28.1U()}}},fr:C(e,1l){if(q.1D.4a&&1l===65){q.L.ex()}O if(1l!=q.3r.er&&!q.1D.4a){q.L.9z()}},ew:C(){E 2e=[q.1D.29,q.1D.2F,q.1D.80];2D(E i=0;i<2e.12;i++){if(2e[i]){q.1D.kY(2e[i]);F N}}},eu:C(e){q.28.1U();if(q.L.6B()){F q.1D.8W(e)}F q.1D.6V(e)},ev:C(e,1l){if(!q.G.et)F 1q;if(q.L.3z(q.1e.1a())&&q.G.b7===N)F 1q;e.2t();E R;if(q.1D.2F&&!e.6Z){R=(q.G.72)?1k.8Y(8Q(q.G.72+1).31(\'\\bm\')):1k.8Y(\'\\t\');q.1Y.R(R);q.1e.1T()}O if(q.G.b7!==N){R=1k.8Y(8Q(q.G.b7+1).31(\'\\bm\'));q.1Y.R(R);q.1e.1T()}O{if(e.6I&&1l===d3)q.3A.9v();O if(e.6I&&1l===d8)q.3A.9Y();O if(!e.6Z)q.3A.9Y();O q.3A.9v()}F N},ey:C(){E 4E=q.K.49();E bg=4E.3v.J(/<br\\s?\\/?>/gi,\'\');if((4E.1o===\'8a\'||4E.1o===\'P\')&&bg===\'\'&&!$(4E).3u(\'I-T\')){E br=1k.3B(\'br\');$(4E).2x(br);q.1S.dy(br);q.1e.1T();F N}},eC:C(){E 4E=q.K.49();E bg=4E.3v.J(/<br\\s?\\/?>/gi,\'\');if(4E.1o===\'8a\'&&q.L.3z(bg)&&!$(4E).3u(\'I-T\')){E p=1k.3B(\'p\');p.3v=q.G.5Z;$(4E).2x(p);q.1S.2O(p);q.1e.1T();F N}O if(q.G.eE&&4E.1o==\'P\'){$(4E).1L(\'1G\').1L(\'1p\')}},hg:C(e){e.2t();q.K.1a();E p=1k.3B(\'p\');p.3v=q.G.5Z;q.14.57();q.14.3P(p);q.1S.2O(p);q.1e.1T();F N},ju:C(e){if(!q.L.6B())F;E 5D=$.3h($(q.1D.Q).B());if(5D.3J(/(<br\\s?\\/?>){2}$/i)!=-1){e.2t();if(q.G.1K){E br=1k.3B(\'br\');$(q.1D.29).3C(br);q.1S.dy(br);$(q.1D.Q).B(5D.J(/<br\\s?\\/?>$/i,\'\'))}O{E R=$(q.G.5V);$(q.1D.29).3C(R);q.1S.2O(R)}F 1q}F},kY:C(2m){if(!q.L.6B())F;q.28.1U();if(q.G.1K){E 25=$(\'<1j>\').1E($.3h(q.$T.B())).25();E 3c=25.3c()[0];if(3c.1o==\'6x\'&&3c.3v===\'\'){3c=25.4B()[0]}if(q.L.6r(3c)!=q.L.6r(2m))F;E br=1k.3B(\'br\');$(2m).3C(br);q.1S.58(br)}O{if(q.$T.25().3c()[0]!==2m)F;E R=$(q.G.5V);$(2m).3C(R);q.1S.2O(R)}},kN:C(e){e.2t();E R=1k.8Y(\'\\n\');q.K.1a();q.14.57();q.14.3P(R);q.1S.58(R);q.1e.1T();F N},6V:C(e){F q.1D.dD(e)},8W:C(e){F q.1D.dD(e,1q)},dD:C(e,kP){e.dK();q.K.1a();E 5M=1k.3B(\'br\');if(q.L.1P(\'2G\')){q.14.42(N);q.14.3H(q.14.dL,q.14.dM)}O{q.14.57()}q.14.3P(5M);E $b5=$(5M).1r("a");if($b5.12>0){$b5.1h(5M).1t();$b5.3C(5M)}if(kP===1q){E $1N=$(5M).1N();if($1N.12!==0&&$1N[0].1o===\'5i\'&&q.L.e2()){q.1S.58(5M);q.1e.1T();F N}E dJ=1k.3B(\'br\');q.14.3P(dJ);q.1S.58(dJ)}O{if(q.L.1P(\'2G\')){E 3b=1k.3B(\'1i\');3b.3v=\'&#bL;\';$(5M).3C(3b);q.14.7z(3b);q.14.kZ(3b);$(3b).1t()}O{E 14=1k.8O();14.7z(5M);14.42(1q);E K=3p.4K();K.8R();K.4f(14)}}q.1e.1T();F N},kS:C(){E $1B=$(q.1D.1B);if($1B.1g().3J(/^\\6c$/g)===0){$1B.1t()}},kL:C(e){E $1B=$(q.1D.1B);E $1r=$(q.1D.1r);E 2Y=$1B.2o(\'2Y\',q.$T[0]);if(2Y.12!==0&&$1B.2o(\'li\',q.$T[0])&&$1r.3R(\'li\').12===1){if(!q.L.3z($1B.1g()))F;e.2t();$1B.1t();$1r.1t();q.1S.2O(2Y)}}}},2s:C(){F{3Q:C(e){if(q.7T)F;E 1l=e.7w;q.2s.1B=q.K.3x();q.2s.1r=q.K.6l();E $1r=q.L.4H($(q.2s.1r).1r());E ks=q.1W.2r(\'2s\',e);if(ks===N){e.2t();F N}if(!q.G.1K&&q.2s.1B.9R===3&&q.2s.1B.12<=1&&(q.2s.1r===N||q.2s.1r.1o==\'ed\')){q.2s.bs()}if(!q.G.1K&&q.L.4H(q.2s.1B)&&q.2s.1B.1o===\'8a\'){q.2s.bs(N)}if(!q.G.1K&&$(q.2s.1r).3u(\'I-7m-3b\')&&($1r===N||$1r[0].1o==\'ed\')){$(q.2s.1r).25().48();q.2s.bs()}if(q.2A.a1()&&q.2A.kn(1l))q.2A.3a();if(1l===q.3r.8S||1l===q.3r.83){if(q.L.1P(\'4b\')){E 2Y=$(q.1D.1B).2o(\'2Y\',q.$T[0]);if(2Y.8b()!==0&&2Y.1g()!==\'\'){e.2t();F N}}q.1x.4r();if(q.1R.M){e.2t();q.M.7Z();q.28.1U();q.M.1t(q.1R.M);q.1R.M=N;F N}q.$T.1h(\'p\').1u($.1d(C(i,s){q.L.3T(i,$(s).B())},q));if(q.G.1K&&q.2s.1B&&q.2s.1B.1o==\'8a\'&&q.L.3z(q.2s.1B.3v)){$(q.2s.1B).3C(q.K.5e());q.K.3e();$(q.2s.1B).1t()}q.2s.kt();F q.2s.ku(e)}},bs:C(9K){E $1B=$(q.2s.1B);E R;if(9K===N){R=$(\'<p>\').1E($1B.B())}O{R=$(\'<p>\').1E($1B.9K())}$1B.2x(R);E 1N=$(R).1N();if(1s(1N[0])!==\'1z\'&&1N[0].1o==\'5i\'){1N.1t()}q.1S.3H(R)},kt:C(){E d6=C(){E B=$.3h(q.3v).J(/\\/t\\/n/g,\'\');if(B===\'\'){$(q).1t()}};q.$T.1h(\'li\').1u(d6);q.$T.1h(\'3k, ol\').1u(d6)},ku:C(e){E B=$.3h(q.$T.B());if(!q.L.3z(B))F;e.2t();if(q.G.1K){q.$T.B(q.K.5e());q.K.3e()}O{q.$T.B(q.G.5V);q.2p.2O()}q.1e.1T();F N}}},1H:C(){F{2K:C(){q.G.d7=q.G.kv[q.G.1H]},1a:C(1y){F(1s q.G.d7[1y]!=\'1z\')?q.G.d7[1y]:\'\'}}},3L:C(){F{1Y:C(){q.28.1U();E 21=q.K.44();if(21[0]!==N&&q.3L.kq(21)){if(!q.L.1P(\'2G\'))q.$T.2p();F}if(q.L.1P(\'2G\')){q.3L.aM()}O{q.3L.km()}},kq:C(21){E 8Z=[\'li\',\'2Y\',\'6s\',\'29\',\'80\',\'2F\',\'dl\',\'dt\',\'dd\'];E 3I=21[0].1o.3g();E 3c=q.K.kc();3c=(1s 3c==\'1z\')?3I:3c.1o.3g();E d0=$.3t(3I,8Z)!=-1;E kl=$.3t(3c,8Z)!=-1;if((d0&&kl)||d0){F 1q}},aM:C(){q.L.9x();q.28.1U();q.1Y.R(1k.3B(\'hr\'));q.L.bh();q.1e.1T()},km:C(){q.28.1U();E d9=\'<p id="I-1Y-3L"><br /></p>\';if(q.G.1K)d9=\'<br id="I-1Y-3L">\';1k.3Z(\'py\',N,\'<hr>\'+d9);q.3L.ko();q.1e.1T()},ko:C(){E R=q.$T.1h(\'#I-1Y-3L\');E 1N=$(R).1N()[0];E 1Q=1N;if(q.L.1P(\'4b\')&&1N&&1N.3v===\'\'){1Q=$(1N).1N()[0];$(1N).1t()}if(1Q){R.1t();if(!q.G.1K){q.$T.2p();q.3L.2O(1Q)}}O{R.1L(\'id\');q.3L.2O(R[0])}},2O:C(R){if(1s R===\'1z\')F;E kw=1k.8Y(\'\\6c\');q.K.1a();q.14.2O(R,0);q.14.3P(kw);q.14.42(1q);q.K.4f()}}},V:C(){F{2R:C(e){if(1s e!=\'1z\'&&e.2t)e.2t();if(!q.1R.cD(\'a\')){q.1b.2K(\'V\',q.1H.1a(\'b2\'),kx)}O{q.1b.2K(\'V\',q.1H.1a(\'e6\'),kx)}q.1b.bR();E kG=!q.1R.cD(\'a\')?q.1H.1a(\'1Y\'):q.1H.1a(\'7F\');q.V.kJ=q.1b.c0(kG);q.K.1a();q.V.kB();q.V.kK();if(q.V.1Q==\'7J\')$(\'#I-V-87\').5X(\'a6\',1q);q.V.$8I=$(\'#I-V-2i\');q.V.$dP=$(\'#I-V-2i-1g\');q.V.$dP.2L(q.V.1g);q.V.$8I.2L(q.V.2i);q.V.kJ.on(\'2z\',$.1d(q.V.1Y,q));$(\'.I-V-3m\').1t();q.K.3o();q.1b.2R();q.V.$8I.2p()},kK:C(){E kE=3q.kz.2l.J(/\\/$/i,\'\');if(1s q.V.2i!=="1z"){q.V.2i=q.V.2i.J(kE,\'\');q.V.2i=q.V.2i.J(/^\\/#/,\'#\');q.V.2i=q.V.2i.J(\'aa:\',\'\');if(!q.G.5a){E 3K=2a 2n(\'^(9n|8l|5E)://\'+3q.kz.pC,\'i\');q.V.2i=q.V.2i.J(3K,\'\')}}},kB:C(){q.V.$R=N;E $el=$(q.K.3x()).2o(\'a\',q.$T[0]);if($el.12!==0&&$el[0].1o===\'A\'){q.V.$R=$el;q.V.2i=$el.1c(\'2l\');q.V.1g=$el.1g();q.V.1Q=$el.1c(\'1Q\')}O{q.V.1g=q.2T.4o();q.V.2i=\'\';q.V.1Q=\'\'}},1Y:C(){q.3i.1t();E 1Q=\'\';E V=q.V.$8I.2L();E 1g=q.V.$dP.2L().J(/(<([^>]+)>)/ig,"");if($.3h(V)===\'\'){q.V.$8I.2g(\'I-3G-6N\').on(\'2s\',C(){$(q).2W(\'I-3G-6N\');$(q).3d(\'2s\')});F}if(V.3J(\'@\')!=-1&&/(9n|8l|5E):\\/\\//i.ai(V)===N){V=V.J(\'aa:\',\'\');V=\'aa:\'+V}O if(V.3J(\'#\')!==0){if($(\'#I-V-87\').5X(\'a6\')){1Q=\'7J\'}E 7A=\'((kC--)?[a-7Y-9]+(-[a-7Y-9]+)*\\\\.)+[a-z]{2,}\';E 3K=2a 2n(\'^(9n|8l|5E)://\'+7A,\'i\');E al=2a 2n(\'^\'+7A,\'i\');E kF=2a 2n(\'\\.(B|pD)$\',\'i\');if(V.3J(3K)==-1&&V.3J(kF)==-1&&V.3J(al)===0&&q.G.5a){V=q.G.5a+\'://\'+V}}q.V.1U(1g,V,1Q);q.1b.4j()},1U:C(1g,V,1Q){1g=$.3h(1g.J(/<|>/g,\'\'));q.K.3e();E 21=q.K.44();if(1g===\'\'&&V===\'\')F;if(1g===\'\'&&V!==\'\')1g=V;if(q.V.$R){q.28.1U();E $V=q.V.$R,$el=$V.3R();if($el.12>0){55($el.12){$el=$el.3R()}$el=$el.2j()}O{$el=$V}$V.1c(\'2l\',V);$el.1g(1g);if(1Q!==\'\'){$V.1c(\'1Q\',1Q)}O{$V.1L(\'1Q\')}q.K.8L($V);q.1e.1T()}O{if(q.L.1P(\'4b\')&&q.V.1g===\'\'){E $a=$(\'<a />\').1c(\'2l\',V).1g(1g);if(1Q!==\'\')$a.1c(\'1Q\',1Q);$a=$(q.1Y.R($a));if(q.G.1K){$a.3C(\'&5k;\')}q.K.8L($a)}O{E $a;if(q.L.1P(\'2G\')){$a=$(\'<a 2l="\'+V+\'">\').1g(1g);if(1Q!==\'\')$a.1c(\'1Q\',1Q);$a=$(q.1Y.R($a));if(q.K.cX().1V(/\\s$/)){$a.3C(" ")}q.K.8L($a)}O{1k.3Z(\'pE\',N,V);$a=$(q.K.3x()).2o(\'a\',q.$T[0]);if(q.L.1P(\'4b\')){$a=$(\'a[kI=""]\')}if(1Q!==\'\')$a.1c(\'1Q\',1Q);$a.1L(\'1p\').1L(\'kI\');if(q.K.cX().1V(/\\s$/)){$a.3C(" ")}if(q.V.1g!==\'\'||q.V.1g!=1g){if(!q.G.1K&&21&&21.12<=1){$a.1g(1g)}O if(q.G.1K){$a.1g(1g)}q.K.8L($a)}}}q.1e.1T();q.1W.2r(\'pu\',$a)}3w($.1d(C(){q.1R.5A()},q),5)},6J:C(e){if(1s e!=\'1z\'&&e.2t){e.2t()}E 22=q.K.6w();if(!22)F;q.28.1U();E 2q=22.12;E 5A=[];2D(E i=0;i<2q;i++){if(22[i].1o===\'A\'){5A.2N(22[i])}E $R=$(22[i]).2o(\'a\',q.$T[0]);$R.2x($R.25())}q.1W.2r(\'pt\',5A);$(\'.I-V-3m\').1t();q.1e.1T()},7C:C(3E){q.V.9o(3E,\'7C\')},2g:C(3E){q.V.9o(3E,\'2g\')},2W:C(3E){q.V.9o(3E,\'2W\')},9o:C(3E,1C){E 5A=q.K.ke([\'a\']);if(5A===N)F;$.1u(5A,C(){$(q)[1C](3E)})}}},2A:C(){F{kn:C(1l){F 1l==q.3r.6z||1l==q.3r.kk},a1:C(){F q.G.ax&&(q.G.ek||q.G.e9||q.G.9q)&&!q.L.4Y(\'9J\')},3a:C(){E 2A=q.2A,G=q.G;q.$T.1h(":5O(4J,1M,a,2F)").pi().25().dO(C(){F q.9R===3&&$.3h(q.5P)!=""&&!$(q).1r().is("2F")&&(q.5P.1V(G.2A.4p.6Q)||q.5P.1V(G.2A.4p.6T)||q.5P.1V(G.2A.4p.M)||q.5P.1V(G.2A.4p.2i))}).1u(C(){E 1g=$(q).1g(),B=1g;if(G.9q&&(B.1V(G.2A.4p.6Q)||B.1V(G.2A.4p.6T))){B=2A.9q(B)}O if(G.e9&&B.1V(G.2A.4p.M)){B=2A.kQ(B)}O if(G.ek){B=2A.ax(B)}$(q).9N(1g.J(1g,B)).1t()});E kp=q.$T.1h(\'.I-2A-43\').1u(C(){E $el=$(q);$el.2W(\'I-2A-43\');if($el.1c(\'1G\')===\'\')$el.1L(\'1G\');F $el[0]});3w($.1d(C(){q.1R.2K();q.1W.2r(\'2A\',kp)},q),6O);q.1e.1T()},9q:C(B){E e0=\'<4J 1G="I-2A-43" 2J="pn" 3l="ps" 4q="\',dR=\'" pr="0" po></4J>\';if(B.1V(q.G.2A.4p.6Q)){B=B.J(q.G.2A.4p.6Q,e0+\'//7S.6Q.aK/7M/$1\'+dR)}if(B.1V(q.G.2A.4p.6T)){B=B.J(q.G.2A.4p.6T,e0+\'//q3.6T.aK/6S/$2\'+dR)}F B},kQ:C(B){E 3N=B.1V(q.G.2A.4p.M);if(3N){B=B.J(B,\'<1M 4q="\'+3N+\'" 1G="I-2A-43" />\');if(q.G.1K){if(!q.L.3z(q.1e.1a())){B=\'<br>\'+B}}B+=\'<br>\'}F B},ax:C(B){E 3N=B.1V(q.G.2A.4p.2i);if(3N){3N=$.q7(3N,C(v,k){F $.3t(v,3N)===k});E 12=3N.12;2D(E i=0;i<12;i++){E 2l=3N[i],1g=2l,5a=q.G.5a+\'://\';if(2l.1V(/(5E?|8l):\\/\\//i)!==4m){5a=""}if(1g.12>q.G.ec){1g=1g.ac(0,q.G.ec)+\'...\'}if(1g.3J(\'%\')===-1){1g=j2(1g)}E cz="\\\\b";if($.3t(2l.dn(-1),["/","&","="])!=-1){cz=""}E kV=2a 2n(\'(\'+2l.J(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,"\\\\$&")+cz+\')\',\'g\');B=B.J(kV,\'<a 2l="\'+5a+$.3h(2l)+\'" 1G="I-2A-43">\'+$.3h(1g)+\'</a>\')}}F B}}},2d:C(){F{3j:C(4F){q.3i.1t();if(!q.L.1P(\'2G\')&&!q.G.1K){q.$T.2p()}q.28.1U();q.K.3o();E 1r=q.K.6l();E $2d=$(1r).2o(\'ol, 3k\',q.$T[0]);if(!q.L.4H($2d)&&$2d.12!==0){$2d=N}E bU,bV;E 1t=N;if($2d&&$2d.12){1t=1q;E bS=$2d[0].1o;bU=(4F===\'5u\'&&bS===\'8B\');bV=(4F===\'5q\'&&bS===\'8h\')}if(bU){q.L.4x($2d,\'ol\')}O if(bV){q.L.4x($2d,\'3k\')}O{if(1t){q.2d.1t(4F,$2d)}O{q.2d.1Y(4F)}}q.K.3e();q.1e.1T()},1Y:C(4F){E 1B=q.K.3x();E $2Y=$(1B).2o(\'2Y, 6s\',q.$T[0]);if(q.L.1P(\'2G\')&&q.G.1K){q.2d.aM(4F)}O{1k.3Z(\'1Y\'+4F)}E 1r=q.K.6l();E $2d=$(1r).2o(\'ol, 3k\',q.$T[0]);if($2Y.12!==0){E kW=$2Y.9K();$2Y.3C(kW).1t(\'\')}if(q.L.3z($2d.1h(\'li\').1g())){E $3R=$2d.3R(\'li\');$3R.1h(\'br\').1t();$3R.1E(q.K.5e());if(q.G.1K&&q.L.1P(\'4b\')&&$3R.8b()==2&&q.L.3z($3R.eq(1).1g())){$3R.eq(1).1t()}}if($2d.12){E $88=$2d.1r();if(q.L.4H($88)&&$88[0].1o!=\'5L\'&&q.L.6X($88[0])){$88.2x($88.25())}}if(!q.L.1P(\'2G\')){q.$T.2p()}q.1x.4r()},aM:C(4F){E 4N=q.K.6e(\'1j\');E aQ=$(4N).B();E 7s=(4F==\'5u\')?$(\'<ol>\'):$(\'<3k>\');E 9f=$(\'<li>\');if($.3h(aQ)===\'\'){9f.1E(q.K.5e());7s.1E(9f);q.$T.1h(\'#K-2u-1\').2x(7s)}O{E 8T=aQ.4A(/<br\\s?\\/?>/gi);if(8T){2D(E i=0;i<8T.12;i++){if($.3h(8T[i])!==\'\'){7s.1E($(\'<li>\').B(8T[i]))}}}O{9f.1E(aQ);7s.1E(9f)}$(4N).2x(7s)}},1t:C(4F,$2d){if($.3t(\'3k\',q.K.44()))4F=\'5q\';1k.3Z(\'1Y\'+4F);E $1B=$(q.K.3x());q.3A.9O();if(!q.G.1K&&$1B.2o(\'li, 6s, 2Y\',q.$T[0]).12===0){1k.3Z(\'9S\',N,\'p\');q.$T.1h(\'3k, ol, 29\').1u($.1d(q.L.3T,q))}E $3V=$(q.K.3x()).2o(\'3V\',q.$T[0]);E $4B=$3V.4B();if(!q.G.1K&&$3V.12!==0&&$4B.12!==0&&$4B[0].1o==\'5i\'){$4B.1t()}q.1x.4r()}}},1b:C(){F{bw:{},ja:C(){q.G.1b={jb:62()+\'<4d id="I-1b-M-7F">\'+\'<2M>\'+q.1H.1a(\'1J\')+\'</2M>\'+\'<3G 1m="1g" id="I-M-1J" />\'+\'<2M 1G="I-M-V-41">\'+q.1H.1a(\'V\')+\'</2M>\'+\'<3G 1m="1g" id="I-M-V" 1G="I-M-V-41" 4O-2M="\'+q.1H.1a(\'V\')+\'" />\'+\'<2M 1G="I-M-V-41"><3G 1m="j6" id="I-M-V-87" 4O-2M="\'+q.1H.1a(\'a9\')+\'"> \'+q.1H.1a(\'a9\')+\'</2M>\'+\'<2M 1G="I-M-4g-41">\'+q.1H.1a(\'ck\')+\'</2M>\'+\'<7a 1G="I-M-4g-41" id="I-M-5f" 4O-2M="\'+q.1H.1a(\'ck\')+\'">\'+\'<41 1F="5p">\'+q.1H.1a(\'5p\')+\'</41>\'+\'<41 1F="2c">\'+q.1H.1a(\'2c\')+\'</41>\'+\'<41 1F="5m">\'+q.1H.1a(\'5m\')+\'</41>\'+\'<41 1F="4t">\'+q.1H.1a(\'4t\')+\'</41>\'+\'</7a>\'+\'</4d>\',M:62()+\'<4d id="I-1b-M-1Y">\'+\'<1j id="I-1b-M-4e"></1j>\'+\'</4d>\',1Z:62()+\'<4d id="I-1b-1Z-1Y">\'+\'<1j id="I-1b-1Z-1w-2P">\'+\'<2M>\'+q.1H.1a(\'6f\')+\'</2M>\'+\'<3G 1m="1g" id="I-6f" 4O-2M="\'+q.1H.1a(\'6f\')+\'" /><br><br>\'+\'<1j id="I-1b-1Z-1w"></1j>\'+\'</1j>\'+\'</4d>\',V:62()+\'<4d id="I-1b-V-1Y">\'+\'<2M>cg</2M>\'+\'<3G 1m="2i" id="I-V-2i" 4O-2M="cg" />\'+\'<2M>\'+q.1H.1a(\'1g\')+\'</2M>\'+\'<3G 1m="1g" id="I-V-2i-1g" 4O-2M="\'+q.1H.1a(\'1g\')+\'" />\'+\'<2M><3G 1m="j6" id="I-V-87"> \'+q.1H.1a(\'a9\')+\'</2M>\'+\'</4d>\'};$.7h(q.G,q.G.1b)},ct:C(1y,2B){q.1b.bw[1y]=2B},pM:C($1b){q.1b.$9b=$(\'<1j>\').1c(\'id\',\'I-1b-9b\');$1b.6C(q.1b.$9b)},pK:C(id,1y,8k){E $5t=$(\'<a 2l="#" 3X="5t\'+id+\'">\').1g(1y);if(8k){$5t.2g(\'8k\')}E 3q=q;$5t.on(\'2z\',C(e){e.2t();$(\'.I-5t\').3s();$(\'.I-\'+$(q).1c(\'3X\')).2R();3q.1b.$9b.1h(\'a\').2W(\'8k\');$(q).2g(\'8k\')});q.1b.$9b.1E($5t)},pL:C(1y,j3){q.G.1b[1y]=j3},jm:C(1y){F q.G.1b[1y]},pQ:C(){F q.$bo.1h(\'4d\')},2K:C(6m,1J,2J){q.1b.6m=6m;q.1b.2J=2J;q.1b.2f();q.1b.iG();q.1b.jd(1J);q.1b.jn();q.1b.jl();if(1s q.1b.bw[6m]!=\'1z\'){q.1b.bw[6m].64(q)}},2R:C(){q.L.dV();if(q.L.6Y()){q.1b.bX()}O{q.1b.af()}if(q.G.bO){q.$4C.2g("I-1b-j4")}q.$81.2R();q.$4C.2R();q.$1b.1c(\'6G\',\'-1\');q.$1b.2p();q.1b.jg();q.L.9x();if(!q.L.6Y()){3w($.1d(q.1b.af,q),0);$(3p).on(\'4R.I-1b\',$.1d(q.1b.4R,q))}q.1W.2r(\'pV\',q.1b.6m,q.$1b);$(1k).3d(\'pU.1b\');q.$1b.1h(\'3G[1m=1g],3G[1m=2i],3G[1m=pT]\').on(\'1D.I-1b\',$.1d(q.1b.jj,q))},af:C(){E 3l=q.$1b.pR();E bc=$(3p).3l();E 89=$(3p).2J();if(q.1b.2J>89){q.$1b.1O({2J:\'96%\',5Y:(bc/2-3l/2)+\'px\'});F}if(3l>bc){q.$1b.1O({2J:q.1b.2J+\'px\',5Y:\'pS\'})}O{q.$1b.1O({2J:q.1b.2J+\'px\',5Y:(bc/2-3l/2)+\'px\'})}},bX:C(){q.$1b.1O({2J:\'96%\',5Y:\'2%\'})},4R:C(){if(q.L.6Y()){q.1b.bX()}O{q.1b.af()}},jd:C(1J){q.$8q.B(1J)},jl:C(){q.$bo.B(q.1b.jm(q.1b.6m))},jn:C(){if(1s $.fn.jo===\'1z\')F;q.$1b.jo({jk:q.$8q});q.$8q.1O(\'pg\',\'pf\')},jj:C(e){if(e.7w!=13)F;e.2t();q.$1b.1h(\'1v.I-1b-7O-23\').2z()},bR:C(){E 1v=$(\'<1v>\').2g(\'I-1b-23 I-1b-4j-23\').B(q.1H.1a(\'jf\'));1v.on(\'2z\',$.1d(q.1b.4j,q));q.$8w.1E(1v)},je:C(2M){F q.1b.c1(2M,\'82\')},c0:C(2M){F q.1b.c1(2M,\'7O\')},c1:C(2M,3E){E 1v=$(\'<1v>\').2g(\'I-1b-23\').2g(\'I-1b-\'+3E+\'-23\').B(2M);q.$8w.1E(1v);F 1v},jg:C(){E 4i=q.$8w.1h(\'1v\');E bW=4i.12;if(bW===0)F;4i.1O(\'2J\',(6O/bW)+\'%\')},2f:C(){q.1b.iH();q.$4C=$(\'<1j id="I-1b-2P"/>\').3s();q.$1b=$(\'<1j id="I-1b" 9C="oG" 4O-oF="I-1b-75" />\');q.$8q=$(\'<75 id="I-1b-75"/>\');q.$8t=$(\'<1v 1m="1v" id="I-1b-4j" 6G="1" 4O-2M="oN" />\').B(\'&oM;\');q.$bo=$(\'<1j id="I-1b-3f" />\');q.$8w=$(\'<cc />\');q.$1b.1E(q.$8q);q.$1b.1E(q.$8t);q.$1b.1E(q.$bo);q.$1b.1E(q.$8w);q.$4C.1E(q.$1b);q.$4C.bl(1k.3f)},iH:C(){q.$81=$(\'<1j id="I-1b-oB">\').3s();$(\'3f\').6C(q.$81)},iG:C(){q.$8t.on(\'2z.I-1b\',$.1d(q.1b.4j,q));$(1k).on(\'2s.I-1b\',$.1d(q.1b.9t,q));q.$T.on(\'2s.I-1b\',$.1d(q.1b.9t,q));q.$4C.on(\'2z.I-1b\',$.1d(q.1b.4j,q))},iF:C(){q.$8t.3d(\'2z.I-1b\');$(1k).3d(\'2s.I-1b\');q.$T.3d(\'2s.I-1b\');q.$4C.3d(\'2z.I-1b\');$(3p).3d(\'4R.I-1b\')},9t:C(e){if(e.7w!=q.3r.bG)F;q.1b.4j(N)},4j:C(e){if(e){if(!$(e.1Q).3u(\'I-1b-4j-23\')&&e.1Q!=q.$8t[0]&&e.1Q!=q.$4C[0]){F}e.2t()}if(!q.$4C)F;q.1b.iF();q.L.b8();q.$81.1t();q.$4C.jW(\'oq\',$.1d(C(){q.$4C.1t();3w($.1d(q.L.bh,q),0);if(e!==1z)q.K.3e();$(1k.3f).1O(\'bn\',q.1b.op);q.1W.2r(\'om\',q.1b.6m)},q))}}},1R:C(){F{2K:C(){if(1s q.G.iz!="1z")F;if(q.L.1P(\'2G\')){E 3q=q;q.$T.1h(\'2F, 1e\').on(\'ba\',C(){3q.$T.1c(\'5j\',N);$(q).1c(\'5j\',1q)}).on(\'b4\',C(){3q.$T.1c(\'5j\',1q);$(q).1L(\'5j\')})}q.1R.bK();q.1R.5A()},1A:C(e,2h){q.1R.4i(e,2h);q.1R.7H()},cD:C($el,$1B){if(1s $1B==\'1z\'){E $1B=$(q.K.3x())}F $1B.is($el)||$1B.eG($el).12>0},7H:C(){E $1B=$(q.K.3x());$.1u(q.G.1R.7H,$.1d(C(1l,1F){E 1R=1F.1R,2m=1R.2m,$2w=1F.2w,cM=1s 1R[\'in\']!=\'1z\'?1R[\'in\']:N,cL=1s 1R[\'2k\']!=\'1z\'?1R[\'2k\']:N;if($1B.2o(2m).8b()>0){q.1R.cT($2w,cM,cL)}O{q.1R.cT($2w,cL,cM)}},q))},cT:C($2w,8D,b6){if(b6&&1s b6[\'1c\']!=\'1z\'){q.1R.cV($2w,b6.1c,1q)}if(1s 8D[\'1c\']!=\'1z\'){q.1R.cV($2w,8D.1c)}if(1s 8D[\'1J\']!=\'1z\'){$2w.1g(8D[\'1J\'])}},cV:C($2w,iD,cR){$.1u(iD,C(1l,1F){if(1l==\'1G\'){if(!cR){$2w.2g(1F)}O{$2w.2W(1F)}}O{if(!cR){$2w.1c(1l,1F)}O{$2w.1L(1l)}}})},cN:C($2w,2h,2U){if(1s 2U.1R=="1z")F;2U.2w=$2w;q.G.1R.7H.2N(2U)},4i:C(e,2h){E 1B=q.K.3x();E 1r=q.K.6l();if(e!==N){q.1v.cP()}O{q.1v.cP(2h)}if(e===N&&2h!==\'B\'){if($.3t(2h,q.G.aN)!=-1)q.1v.ow(2h);F}$.1u(q.G.cj,$.1d(C(1l,1F){E bd=$(1r).2o(1l,q.$T[0]);E cn=$(1B).2o(1l,q.$T[0]);if(bd.12!==0&&!q.L.4H(bd))F;if(!q.L.4H(cn))F;if(bd.12!==0||cn.2o(1l,q.$T[0]).12!==0){q.1v.8j(1F)}},q));E $1r=$(1r).2o(q.G.9y.4o().3g(),q.$T[0]);if(q.L.4H(1r)&&$1r.12){E 5f=($1r.1O(\'1g-5f\')===\'\')?\'2c\':$1r.1O(\'1g-5f\');q.1v.8j(\'5f\'+5f)}},p9:C(Y,2h){q.G.aN.2N(2h);q.G.cj[Y]=2h},bK:C(){q.$T.1h(\'1M\').1u($.1d(C(i,1M){E $1M=$(1M);$1M.2o(\'a\',q.$T[0]).on(\'2z\',C(e){e.2t()});if(q.L.1P(\'2G\'))$1M.1c(\'pa\',\'on\');q.M.iV($1M)},q));$(1k).on(\'2z.I-M-82.\'+q.2H,$.1d(C(e){q.1R.M=N;if(e.1Q.1o==\'ab\'&&q.L.4H(e.1Q)){q.1R.M=(q.1R.M&&q.1R.M==e.1Q)?N:e.1Q}},q))},5A:C(){if(!q.G.iW)F;q.$T.1h(\'a\').on(\'5B.I.\'+q.2H+\' 2z.I.\'+q.2H,$.1d(q.1R.iX,q));q.$T.on(\'5B.I.\'+q.2H+\' 2z.I.\'+q.2H,$.1d(q.1R.cp,q));$(1k).on(\'5B.I.\'+q.2H+\' 2z.I.\'+q.2H,$.1d(q.1R.cp,q))},iT:C($V){F $V.2v()},iX:C(e){E $el=$(e.1Q);if($el[0].1o==\'ab\')F;if($el[0].1o!==\'A\')$el=$el.2o(\'a\',q.$T[0]);if($el[0].1o!==\'A\')F;E $V=$el;E 3y=q.1R.iT($V);E 3m=$(\'<1i 1G="I-V-3m"></1i>\');E 2l=$V.1c(\'2l\');if(2l===1z){2l=\'\'}if(2l.12>24)2l=2l.ac(0,24)+\'...\';E iN=$(\'<a 2l="\'+$V.1c(\'2l\')+\'" 1Q="7J" />\').B(2l).2g(\'I-V-3m-7O\');E iP=$(\'<a 2l="#" />\').B(q.1H.1a(\'7F\')).on(\'2z\',$.1d(q.V.2R,q)).2g(\'I-V-3m-7O\');E iQ=$(\'<a 2l="#" />\').B(q.1H.1a(\'6J\')).on(\'2z\',$.1d(q.V.6J,q)).2g(\'I-V-3m-7O\');3m.1E(iN).1E(\' | \').1E(iP).1E(\' | \').1E(iQ);3m.1O({2V:(3y.2V+5H($V.1O(\'3L-3l\'),10))+\'px\',2c:3y.2c+\'px\'});$(\'.I-V-3m\').1t();$(\'3f\').1E(3m)},cp:C(e){e=e.7L||e;E 1Q=e.1Q;E $1r=$(1Q).2o(\'a\',q.$T[0]);if($1r.12!==0&&$1r[0].1o===\'A\'&&1Q.1o!==\'A\'){F}O if((1Q.1o===\'A\'&&q.L.4H(1Q))||$(1Q).3u(\'I-V-3m-7O\')){F}$(\'.I-V-3m\').1t()}}},2X:C(){F{2K:C(B){if(q.G.1K)F B;if(B===\'\'||B===\'<p></p>\')F q.G.5V;B=B+"\\n";q.2X.9U=[];q.2X.z=0;B=B.J(/(<br\\s?\\/?>){1,}\\n?<\\/29>/gi,\'</29>\');B=q.2X.iR(B);B=q.2X.jp(B);B=q.2X.k1(B);B=q.2X.k0(B);B=q.2X.9e(B);B=q.2X.jq(B);B=B.J(2a 2n(\'<br\\\\s?/?>\\n?<(\'+q.G.co.31(\'|\')+\')(.*?[^>])>\',\'gi\'),\'<p><br /></p>\\n<$1$2>\');F $.3h(B)},iR:C(B){E $1j=$(\'<1j />\').1E(B);$1j.1h(\'29 p\').2x(C(){F $(q).1E(\'<br />\').25()});B=$1j.B();$1j.1h(q.G.co.31(\', \')).1u($.1d(C(i,s){q.2X.z++;q.2X.9U[q.2X.z]=s.7P;B=B.J(s.7P,\'\\n{J\'+q.2X.z+\'}\')},q));F B},jp:C(B){E cA=B.1V(/<!--([\\w\\W]*?)-->/gi);if(!cA)F B;$.1u(cA,$.1d(C(i,s){q.2X.z++;q.2X.9U[q.2X.z]=s;B=B.J(s,\'\\n{J\'+q.2X.z+\'}\')},q));F B},jq:C(B){$.1u(q.2X.9U,C(i,s){s=(1s s!==\'1z\')?s.J(/\\$/g,\'&#36;\'):s;B=B.J(\'{J\'+i+\'}\',s)});F B},k0:C(B){E 4I=B.4A(2a 2n(\'\\n\',\'g\'),-1);B=\'\';if(4I){E 2q=4I.12;2D(E i=0;i<2q;i++){if(!4I.q9(i))F;if(4I[i].3J(\'{J\')==-1){4I[i]=4I[i].J(/<p>\\n\\t?<\\/p>/gi,\'\');4I[i]=4I[i].J(/<p><\\/p>/gi,\'\');if(4I[i]!==\'\'){B+=\'<p>\'+4I[i].J(/^\\n+|\\n+$/g,"")+"</p>"}}O B+=4I[i]}}F B},k1:C(B){B=B.J(/<br \\/>\\s*<br \\/>/gi,"\\n\\n");B=B.J(/<br\\s?\\/?>\\n?<br\\s?\\/?>/gi,"\\n<br /><br />");B=B.J(2a 2n("\\r\\n",\'g\'),"\\n");B=B.J(2a 2n("\\r",\'g\'),"\\n");B=B.J(2a 2n("/\\n\\n+/"),\'g\',"\\n\\n");F B},9e:C(B){B=B.J(2a 2n(\'</29></p>\',\'gi\'),\'</29>\');B=B.J(2a 2n(\'<p></29>\',\'gi\'),\'</29>\');B=B.J(2a 2n(\'<p><29>\',\'gi\'),\'<29>\');B=B.J(2a 2n(\'<29></p>\',\'gi\'),\'<29>\');B=B.J(2a 2n(\'<p><p \',\'gi\'),\'<p \');B=B.J(2a 2n(\'<p><p>\',\'gi\'),\'<p>\');B=B.J(2a 2n(\'</p></p>\',\'gi\'),\'</p>\');B=B.J(2a 2n(\'<p>\\\\s?</p>\',\'gi\'),\'\');B=B.J(2a 2n("\\n</p>",\'gi\'),\'</p>\');B=B.J(2a 2n(\'<p>\\t?\\t?\\n?<p>\',\'gi\'),\'<p>\');B=B.J(2a 2n(\'<p>\\t*</p>\',\'gi\'),\'\');F B}}},5o:C(){F{3Q:C(e){if(!q.G.k2){3w($.1d(q.1e.1T,q),1);F}q.7T=1q;q.28.1U();q.K.3o();q.L.9x();q.5o.jY();$(3p).on(\'5N.I-k3\',$.1d(C(){$(3p).3S(q.bb)},q));3w($.1d(C(){E B=q.$5h.B();q.$5h.1t();q.K.3e();q.L.bh();q.5o.1Y(B);$(3p).3d(\'5N.I-k3\');if(q.2A.a1()){q.2A.3a()}},q),1)},jY:C(){q.$5h=$(\'<1j>\').B(\'\').1c(\'5j\',\'1q\').1O({4g:\'7G\',2J:0,2V:0,2c:\'-qk\'});if(q.L.1P(\'2G\')){q.$2P.1E(q.$5h)}O{E $ce=$(\'.1b-3f:aG\');if($ce.12>0){$ce.1E(q.$5h)}O{$(\'3f\').1E(q.$5h)}}q.$5h.1a(0).2p()},1Y:C(B){B=q.1W.2r(\'qn\',B);B=(q.L.9u())?q.1x.8G(B,N):q.1x.8G(B);B=q.1W.2r(\'5o\',B);if(q.L.9u()){q.1Y.1U(B,N)}O{q.1Y.B(B,N)}q.L.9z();q.7T=N;3w($.1d(q.1x.4r,q),10);3w($.1d(C(){E jV=q.$T.1h(\'1i\');$.1u(jV,C(i,s){E B=s.3v.J(/\\6c/,\'\');if(B===\'\'&&s.4z.12===0)$(s).1t()})},q),10)}}},3i:C(){F{aT:C(){if(!q.3i.is())F;q.$T.1c(\'3i\',q.$2m.1c(\'3i\'));q.3i.3j();q.$T.on(\'1D.I-3i\',$.1d(q.3i.3j,q))},3j:C(){3w($.1d(C(){E 1C=q.L.3z(q.$T.B(),N)?\'2g\':\'2W\';q.$T[1C](\'I-3i\')},q),5)},1t:C(){q.$T.2W(\'I-3i\')},is:C(){if(q.G.3i){F q.$2m.1c(\'3i\',q.G.3i)}O{F!(1s q.$2m.1c(\'3i\')==\'1z\'||q.$2m.1c(\'3i\')===\'\')}}}},5F:C(){F{2R:C(){$(1k.3f).1E($(\'<1j id="I-5F"><1i></1i></1j>\'));$(\'#I-5F\').qg()},3s:C(){$(\'#I-5F\').jW(qq,C(){$(q).1t()})}}},K:C(){F{1a:C(){q.2T=1k.4K();if(1k.4K&&q.2T.67&&q.2T.7y){q.14=q.2T.67(0)}O{q.14=1k.8O()}},4f:C(){4U{q.2T.8R()}56(e){}q.2T.4f(q.14)},3x:C(){E el=N;q.K.1a();if(q.2T&&q.2T.7y>0){el=q.2T.67(0).k7}F q.L.4H(el)},6l:C(53){53=53||q.K.3x();if(53){F q.L.4H($(53).1r()[0])}F N},k4:C(){F 3p.4K().k5.qz},qB:C(){F 3p.4K().k5.qE},49:C(R){R=R||q.K.3x();55(R){if(q.L.7f(R.1o)){F($(R).3u(\'I-T\'))?N:R}R=R.qu}F N},c9:C(22,2e){q.K.1a();if(q.14&&q.14.4X){F N}E 6b=[];22=(1s 22==\'1z\'||22===N)?q.K.6w():22;E 4M=q.G.4M;4M.2N(\'1i\');if(1s 2e!==\'1z\'){2D(E i=0;i<2e.12;i++){4M.2N(2e[i])}}$.1u(22,$.1d(C(i,R){if($.3t(R.1o.3g(),4M)!=-1){6b.2N(R)}},q));F(6b.12===0)?N:6b},ke:C(2e){q.K.1a();if(q.14&&q.14.4X){F N}E 6b=[];E 22=q.K.6w();$.1u(22,$.1d(C(i,R){if($.3t(R.1o.3g(),2e)!=-1){6b.2N(R)}},q));F(6b.12===0)?N:6b},44:C(22){q.K.1a();if(q.14&&q.14.4X){F[q.K.49()]}E 21=[];22=(1s 22==\'1z\')?q.K.6w():22;$.1u(22,$.1d(C(i,R){if(q.L.6X(R)){21.2N(R)}},q));F(21.12===0)?[q.K.49()]:21},kc:C(){F q.K.qZ},6w:C(){q.K.1a();E 7E=q.K.ef(1);E 94=q.K.ef(2);if(q.14.4X===N){if(3p.4K){E 2T=3p.4K();if(2T.7y>0){E 14=2T.67(0);E k6=14.k7,bZ=14.bZ;E 7B=14.84();7B.42(N);7B.3P(94);7B.2O(k6,bZ);7B.42(1q);7B.3P(7E);14.7z(7E);14.k9(94);2T.8R();2T.4f(14)}}}O{q.K.jR(q.14,7E,1q);94=7E}E 22=[];E 9k=0;E 3q=q;q.$T.1h(\'*\').1u(C(){if(q==7E){E 1r=$(q).1r();if(1r.12!==0&&1r[0].1o!=\'ed\'&&3q.L.4H(1r[0])){22.2N(1r[0])}22.2N(q);9k=1}O{if(9k>0){22.2N(q);9k=9k+1}}if(q==94){F N}});E eb=[];E 2q=22.12;2D(E i=0;i<2q;i++){if(22[i].id!=\'22-2u-1\'&&22[i].id!=\'22-2u-2\'){eb.2N(22[i])}}q.K.jQ();F eb},ef:C(6i){F $(\'<1i id="22-2u-\'+6i+\'" 1G="I-22-2u" 1f-3M="I">\'+q.G.5Z+\'</1i>\')[0]},jR:C(14,R,1m){E 14=14.84();4U{14.42(1m);14.3P(R)}56(e){}},jQ:C(){$(1k).1h(\'1i.I-22-2u\').1t();q.$T.1h(\'1i.I-22-2u\').1t()},qK:C(2b,2j){q.1S.aH(2b,2j)},6e:C(Y){q.K.1a();if(q.14.4X)F N;E 4N=1k.3B(Y);4N.74(q.14.qU());q.14.3P(4N);F 4N},8L:C(R){if(q.L.1P(\'4b\')){R=R[0]||R;E 14=1k.8O();14.8H(R)}O{q.1S.1U(R,0,R,1)}},bH:C(){q.K.1a();q.14.8H(q.$T[0]);q.K.4f()},1t:C(){q.K.1a();q.2T.8R()},3o:C(){q.K.jC()},jC:C(){q.K.1a();E 6o=q.K.71(1);q.K.dU(q.14,6o,1q);if(q.14.4X===N){E 8V=q.K.71(2);q.K.dU(q.14,8V,N)}q.jE=q.$T.B()},71:C(6i){if(1s 6i==\'1z\')6i=1;F $(\'<1i id="K-2u-\'+6i+\'" 1G="I-K-2u"  1f-3M="I">\'+q.G.5Z+\'</1i>\')[0]},5e:C(6i){F q.L.6r(q.K.71(6i))},dU:C(14,R,1m){14=14.84();4U{14.42(1m);14.3P(R)}56(e){q.2p.2O()}},3e:C(){E 6o=q.$T.1h(\'1i#K-2u-1\');E 8V=q.$T.1h(\'1i#K-2u-2\');if(q.L.1P(\'4b\')){q.$T.2p()}if(6o.12!==0&&8V.12!==0){q.1S.1U(6o,0,8V,0)}O if(6o.12!==0){q.1S.1U(6o,0,6o,0)}O{q.$T.2p()}q.K.8U();q.jE=N},8U:C(){q.$T.1h(\'1i.I-K-2u\').1u(C(i,s){E 1g=$(s).1g().J(/\\6c/g,\'\');if(1g===\'\')$(s).1t();O $(s).2x(C(){F $(q).25()})})},cX:C(){q.K.1a();F q.2T.4o()},qr:C(){E B=\'\';q.K.1a();if(q.2T.7y){E dS=1k.3B(\'1j\');E 2q=q.2T.7y;2D(E i=0;i<2q;++i){dS.74(q.2T.67(i).qp())}B=dS.3v}F q.1x.aY(B)},jG:C(B){q.K.1a();q.14.57();E 1j=1k.3B("1j");1j.3v=B;E 4Q=1k.b0(),4v;55((4v=1j.aZ)){4Q.74(4v)}q.14.3P(4Q)},qX:C(B){B=q.K.5e(1)+B+q.K.5e(2);q.K.1a();if(3p.4K&&3p.4K().67){q.K.jG(B)}O if(1k.K&&1k.K.8O){q.14.jI(B)}q.K.3e();q.1e.1T()}}},6a:C(){F{3Q:C(e,1l){if(!q.G.6a){if((e.9l||e.6I)&&(1l===66||1l===73))e.2t();F N}$.1u(q.G.6a,$.1d(C(5b,4y){E 4S=5b.4A(\',\');E 2q=4S.12;2D(E i=0;i<2q;i++){if(1s 4S[i]===\'70\'){q.6a.7r(e,$.3h(4S[i]),$.1d(C(){E 1C;if(4y.1C.3J(/\\./)!=\'-1\'){1C=4y.1C.4A(\'.\');if(1s q[1C[0]]!=\'1z\'){q[1C[0]][1C[1]].8n(q,4y.6d)}}O{q[4y.1C].8n(q,4y.6d)}},q))}}},q))},7r:C(e,4S,iA){E iU={8:"lT",9:"5t",10:"F",13:"F",16:"6P",17:"4a",18:"7v",19:"lJ",20:"lK",27:"m2",32:"3b",33:"mp",34:"m7",35:"2j",36:"mc",37:"2c",38:"lF",39:"4t",40:"l4",45:"1Y",46:"4l",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",6O:"4",l7:"5",lb:"6",le:"7",l6:"8",lf:"9",l2:"*",l3:"+",ly:"-",lx:".",lg:"/",lw:"f1",lz:"f2",lD:"f3",ll:"f4",lk:"f5",lh:"f6",lo:"f7",oj:"f8",nI:"f9",nG:"nE",nF:"nP",nL:"nM",nD:"nC",nu:"5N",ns:"-",nr:";",np:"=",nv:",",nB:"-",nA:".",nx:"/",ob:"`",d3:"[",oc:"\\\\",d8:"]",od:"\'"};E do={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"oh","=":"+",";":": ","\'":"\\"",",":"<",".":">","/":"?","\\\\":"|"};4S=4S.3g().4A(" ");E bt=iU[e.3r],9h=62.oe(e.7w).3g(),7u="",7l={};$.1u(["7v","4a","5c","6P"],C(51,bu){if(e[bu+\'o5\']&&bt!==bu){7u+=bu+\'+\'}});if(bt)7l[7u+bt]=1q;if(9h){7l[7u+9h]=1q;7l[7u+do[9h]]=1q;if(7u==="6P+"){7l[do[9h]]=1q}}2D(E i=0,2q=4S.12;i<2q;i++){if(7l[4S[i]]){e.2t();F iA.8n(q,iY)}}}}},2I:C(){F{1a:C(1e){if(!q.G.2I)F 1e;E ds=[\'iZ\',\'3f\',\'dG\',\'hr\',\'i?mG\',\'V\',\'5c\',\'mw\',\'1p\',\'3W\',\'3V\',\'dF\',\'dE\',\'dI\'];E dq=[\'li\',\'dt\',\'dt\',\'h[1-6]\',\'41\',\'3W\'];E 9L=[\'p\',\'29\',\'1j\',\'dl\',\'j1\',\'6k\',\'n4\',\'kh\',\'ol\',\'2F\',\'7a\',\'2Y\',\'6s\',\'6W\',\'3k\'];q.2I.kO=2a 2n(\'^<(/?\'+ds.31(\'|/?\')+\'|\'+dq.31(\'|\')+\')[ >]\');q.2I.eX=2a 2n(\'^<(br|/?\'+ds.31(\'|/?\')+\'|/\'+dq.31(\'|/\')+\')[ >]\');q.2I.9L=2a 2n(\'^</?(\'+9L.31(\'|\')+\')[ >]\');E i=0,bz=1e.12,3U=0,2b=4m,2j=4m,Y=\'\',2k=\'\',5g=\'\';q.2I.8o=0;2D(;i<bz;i++){3U=i;if(-1==1e.4w(i).4L(\'<\')){2k+=1e.4w(i);F q.2I.dB(2k)}55(3U<bz&&1e.6n(3U)!=\'<\'){3U++}if(i!=3U){5g=1e.4w(i,3U-i);if(!5g.1V(/^\\s{2,}$/g)){if(\'\\n\'==2k.6n(2k.12-1))2k+=q.2I.7g();O if(\'\\n\'==5g.6n(0)){2k+=\'\\n\'+q.2I.7g();5g=5g.J(/^\\s+/,\'\')}2k+=5g}if(5g.1V(/\\n/))2k+=\'\\n\'+q.2I.7g()}2b=3U;55(3U<bz&&\'>\'!=1e.6n(3U)){3U++}Y=1e.4w(2b,3U-2b);i=3U;E t;if(\'!--\'==Y.4w(1,3)){if(!Y.1V(/--$/)){55(\'-->\'!=1e.4w(3U,3)){3U++}3U+=2;Y=1e.4w(2b,3U-2b);i=3U}if(\'\\n\'!=2k.6n(2k.12-1))2k+=\'\\n\';2k+=q.2I.7g();2k+=Y+\'>\\n\'}O if(\'!\'==Y[1]){2k=q.2I.av(Y+\'>\',2k)}O if(\'?\'==Y[1]){2k+=Y+\'>\\n\'}O if(t=Y.1V(/^<(3W|1p|2F)/i)){t[1]=t[1].3g();Y=q.2I.dA(Y);2k=q.2I.av(Y,2k);2j=62(1e.4w(i+1)).3g().4L(\'</\'+t[1]);if(2j){5g=1e.4w(i+1,2j);i+=2j;2k+=5g}}O{Y=q.2I.dA(Y);2k=q.2I.av(Y,2k)}}F q.2I.dB(2k)},7g:C(){E s=\'\';2D(E j=0;j<q.2I.8o;j++){s+=\'\\t\'}F s},dB:C(1e){1e=1e.J(/\\n\\s*\\n/g,\'\\n\');1e=1e.J(/^[\\s\\n]*/,\'\');1e=1e.J(/[\\s\\n]*$/,\'\');1e=1e.J(/<3W(.*?)>\\n<\\/3W>/gi,\'<3W$1></3W>\');q.2I.8o=0;F 1e},dA:C(Y){E 8d=\'\';Y=Y.J(/\\n/g,\' \');Y=Y.J(/\\s{2,}/g,\' \');Y=Y.J(/^\\s+|\\s+$/g,\' \');E dz=\'\';if(Y.1V(/\\/$/)){dz=\'/\';Y=Y.J(/\\/+$/,\'\')}E m;55(m=/\\s*([^= ]+)(?:=(([\'"\']).*?\\3|[^ ]+))?/.5l(Y)){if(m[2])8d+=m[1].3g()+\'=\'+m[2];O if(m[1])8d+=m[1].3g();8d+=\' \';Y=Y.4w(m[0].12)}F 8d.J(/\\s*$/,\'\')+dz+\'>\'},av:C(Y,2k){E nl=Y.1V(q.2I.9L);if(Y.1V(q.2I.kO)||nl){2k=2k.J(/\\s*$/,\'\');2k+=\'\\n\'}if(nl&&\'/\'==Y.6n(1))q.2I.8o--;if(\'\\n\'==2k.6n(2k.12-1))2k+=q.2I.7g();if(nl&&\'/\'!=Y.6n(1))q.2I.8o++;2k+=Y;if(Y.1V(q.2I.eX)||Y.1V(q.2I.9L)){2k=2k.J(/ *$/,\'\')}F 2k}}},1I:C(){F{kU:C(){E 51=$.3t(\'1i\',q.G.3T);if(51!==-1){q.G.3T.9F(51,1)}if(q.G.4s)q.G.4c=N;if(q.G.52)q.G.1L=N;if(q.G.1K)F;E 2e=[\'p\',\'4d\'];if(q.G.4s)q.1I.kR(2e);if(q.G.4c)q.1I.kX(2e)},kR:C(2e){E 2q=2e.12;2D(E i=0;i<2q;i++){if($.3t(2e[i],q.G.4s)==-1){q.G.4s.2N(2e[i])}}},kX:C(2e){E 2q=2e.12;2D(E i=0;i<2q;i++){E 3y=$.3t(2e[i],q.G.4c);if(3y!=-1){q.G.4c.9F(3y,1)}}},2K:C(B,47){q.1I.2C={4c:q.G.4c,4s:q.G.4s,6v:q.G.6v,5w:q.G.5w,5x:q.G.5x,5s:q.G.5s,1L:q.G.1L,52:q.G.52,6U:q.G.6U,3T:q.G.3T};$.7h(q.1I.2C,47);B=q.1I.6v(B);q.1I.$1j=$(\'<1j />\').1E(B);q.1I.5w();q.1I.5x();q.1I.kT();q.1I.1L();q.1I.3T();q.1I.ji();q.1I.5s();q.1I.6U();B=q.1I.$1j.B();q.1I.$1j.1t();F B},6v:C(B){if(!q.1I.2C.6v)F B;F B.J(/<!--[\\s\\S]*?-->/gi,\'\')},5w:C(B){if(!q.1I.2C.5w)F B;E 2q=q.1I.2C.5w.12;E 5J=[],dw=[];2D(E i=0;i<2q;i++){dw.2N(q.1I.2C.5w[i][1]);5J.2N(q.1I.2C.5w[i][0])}$.1u(5J,$.1d(C(1l,1F){q.1I.$1j.1h(1F).2x(C(){F $("<"+dw[1l]+" />",{B:$(q).B()})})},q))},5x:C(){if(!q.1I.2C.5x)F;E 2q=q.1I.2C.5x.12;q.1I.$1j.1h(\'1i\').1u($.1d(C(n,s){E $el=$(s);E 1p=$el.1c(\'1p\');2D(E i=0;i<2q;i++){if(1p&&1p.1V(2a 2n(\'^\'+q.1I.2C.5x[i][0],\'i\'))){E 1o=q.1I.2C.5x[i][1];$el.2x(C(){E Y=1k.3B(1o);F $(Y).1E($(q).25())})}}},q))},kT:C(){if(!q.1I.2C.4c&&q.1I.2C.4s){q.1I.$1j.1h(\'*\').5O(q.1I.2C.4s.31(\',\')).1u(C(i,s){if(s.3v===\'\')$(s).1t();O $(s).25().48()})}if(q.1I.2C.4c){q.1I.$1j.1h(q.1I.2C.4c.31(\',\')).1u(C(i,s){if($(s).3u(\'I-3W-Y\')||$(s).3u(\'I-K-2u\'))F;if(s.3v===\'\')$(s).1t();O $(s).25().48()})}},1L:C(){E 2q;if(!q.1I.2C.1L&&q.1I.2C.52){E du=[],dv=[];2q=q.1I.2C.52.12;2D(E i=0;i<2q;i++){du.2N(q.1I.2C.52[i][0]);dv.2N(q.1I.2C.52[i][1])}q.1I.$1j.1h(\'*\').1u($.1d(C(n,s){E $el=$(s);E 3y=$.3t($el[0].1o.3g(),du);E 5v=q.1I.j5(3y,dv,$el);if(5v){$.1u(5v,C(z,f){$el.1L(f)})}},q))}if(q.1I.2C.1L){2q=q.1I.2C.1L.12;2D(E i=0;i<2q;i++){E 9I=q.1I.2C.1L[i][1];if($.bj(9I))9I=9I.31(\' \');q.1I.$1j.1h(q.1I.2C.1L[i][0]).1L(9I)}}},j5:C(3y,5z,$el){E 5v=[];if(3y==-1){$.1u($el[0].4z,C(i,2w){5v.2N(2w.1y)})}O if(5z[3y]==\'*\'){5v=[]}O{$.1u($el[0].4z,C(i,2w){if($.bj(5z[3y])){if($.3t(2w.1y,5z[3y])==-1){5v.2N(2w.1y)}}O if(5z[3y]!=2w.1y){5v.2N(2w.1y)}})}F 5v},ki:C(el,bx){bx=2a 2n(bx,"g");F el.1u(C(){E 3q=$(q);E 2q=q.4z.12-1;2D(E i=2q;i>=0;i--){E 2w=q.4z[i];if(2w&&2w.nk&&2w.1y.3J(bx)>=0){3q.1L(2w.1y)}}})},3T:C(){if(!q.1I.2C.3T)F;q.1I.$1j.1h(q.1I.2C.3T.31(\',\')).1u(C(){E $el=$(q);E 1g=$el.1g();1g=1g.J(/\\6c/g,\'\');1g=1g.J(/&5k;/gi,\'\');1g=1g.J(/\\s/g,\'\');if(1g===\'\'&&$el.3R().12===0){$el.1t()}})},ji:C(){q.1I.$1j.1h(\'li p\').25().48()},5s:C(){if(!q.1I.2C.5s)F;E 2e=q.1I.2C.5s;if($.bj(q.1I.2C.5s))2e=q.1I.2C.5s.31(\',\');q.1I.ki(q.1I.$1j.1h(2e),\'^(1f-)\')},6U:C(){if(!q.1I.2C.6U)F;q.1I.$1j.1h(q.1I.2C.6U.31(\',\')).1u(C(){if(q.4z.12===0){$(q).25().48()}})}}},1A:C(){F{3Q:C(){F{B:{1J:q.1H.1a(\'B\'),1C:\'1e.3j\'},30:{1J:q.1H.1a(\'30\'),1n:{p:{1J:q.1H.1a(\'iB\'),1C:\'Q.3a\'},29:{1J:q.1H.1a(\'dp\'),1C:\'Q.3a\'},2F:{1J:q.1H.1a(\'1e\'),1C:\'Q.3a\'},h1:{1J:q.1H.1a(\'iC\'),1C:\'Q.3a\'},h2:{1J:q.1H.1a(\'iL\'),1C:\'Q.3a\'},h3:{1J:q.1H.1a(\'iM\'),1C:\'Q.3a\'},h4:{1J:q.1H.1a(\'kd\'),1C:\'Q.3a\'},h5:{1J:q.1H.1a(\'jt\'),1C:\'Q.3a\'}}},4n:{1J:q.1H.1a(\'4n\'),1C:\'26.3a\'},4h:{1J:q.1H.1a(\'4h\'),1C:\'26.3a\'},5S:{1J:q.1H.1a(\'5S\'),1C:\'26.3a\'},5r:{1J:q.1H.1a(\'5r\'),1C:\'26.3a\'},5q:{1J:\'&lU; \'+q.1H.1a(\'5q\'),1C:\'2d.3j\'},5u:{1J:\'1. \'+q.1H.1a(\'5u\'),1C:\'2d.3j\'},7n:{1J:\'< \'+q.1H.1a(\'7n\'),1C:\'3A.9v\'},3A:{1J:\'> \'+q.1H.1a(\'3A\'),1C:\'3A.9Y\'},M:{1J:q.1H.1a(\'M\'),1C:\'M.2R\'},1Z:{1J:q.1H.1a(\'1Z\'),1C:\'1Z.2R\'},V:{1J:q.1H.1a(\'V\'),1n:{V:{1J:q.1H.1a(\'b2\'),1C:\'V.2R\',1R:{2m:\'a\',in:{1J:q.1H.1a(\'e6\'),},2k:{1J:q.1H.1a(\'b2\')}}},6J:{1J:q.1H.1a(\'6J\'),1C:\'V.6J\',1R:{2m:\'a\',2k:{1c:{\'1G\':\'I-1n-V-e3\',\'4O-7p\':1q}}}}}},2Z:{1J:q.1H.1a(\'2Z\'),1n:{2c:{1J:q.1H.1a(\'jO\'),1C:\'2Z.2c\'},5m:{1J:q.1H.1a(\'jJ\'),1C:\'2Z.5m\'},4t:{1J:q.1H.1a(\'jH\'),1C:\'2Z.4t\'},9B:{1J:q.1H.1a(\'jF\'),1C:\'2Z.9B\'}}},aO:{1J:q.1H.1a(\'aO\'),1C:\'3L.1Y\'}}},2f:C(){q.1A.jw();q.1A.jx();q.1A.js();if(q.G.4i.12===0)F;q.$1A=q.1A.jL();q.1A.jv();q.1A.1E();q.1A.jP();q.1A.jN();q.1A.jM();if(q.G.aN){q.$T.on(\'jK.I 2s.I 2p.I\',$.1d(q.1R.1A,q))}},jL:C(){F $(\'<3k>\').2g(\'I-1A\').1c({\'id\':\'I-1A-\'+q.2H,\'9C\':\'1A\'})},jP:C(){$.1u(q.G.1A.30.1n,$.1d(C(i,s){if($.3t(i,q.G.30)==-1)82 q.G.1A.30.1n[i]},q))},jN:C(){$.1u(q.G.4i,$.1d(C(i,2h){if(!q.G.1A[2h])F;if(2h===\'1Z\'){if(q.G.7N===N)F;O if(!q.G.7N&&q.G.86===N)F}if(2h===\'M\'){if(q.G.7R===N)F;O if(!q.G.7R&&q.G.86===N)F}E 2U=q.G.1A[2h];q.$1A.1E($(\'<li>\').1E(q.1v.2f(2h,2U)))},q))},1E:C(){if(q.G.aI){q.$1A.2g(\'I-1A-qD\');$(q.G.aI).B(q.$1A)}O{q.$2P.6C(q.$1A)}},jM:C(){if(!q.L.7K())F;if(q.G.aI)F;if(!q.G.jD)F;q.1A.ea();$(q.G.6F).on(\'5N.I.\'+q.2H,$.1d(q.1A.ea,q))},jv:C(){if(q.L.6Y()&&q.G.jr){q.$1A.2g(\'I-1A-bn\')}},js:C(){if(q.G.4D)F;E 51=q.G.4i.4L(\'B\');if(51!==-1){q.G.4i.9F(51,1)}},jw:C(){if(q.G.dQ.12===0)F;$.1u(q.G.dQ,$.1d(C(i,s){E 51=q.G.4i.4L(s);q.G.4i.9F(51,1)},q))},jx:C(){if(!q.L.6Y()||q.G.e8.12===0)F;$.1u(q.G.e8,$.1d(C(i,s){E 51=q.G.4i.4L(s);q.G.4i.9F(51,1)},q))},ea:C(){E 3S=$(q.G.6F).3S();E 6M=1;if(q.G.6F===1k){6M=q.$2P.2v().2V}if((3S+q.G.6L)>6M){q.1A.jB(3S,6M)}O{q.1A.jA()}},jB:C(3S,6M){E 2V=q.G.6L+3S-6M;E 2c=0;E 2j=6M+q.$2P.3l()-32;E 2J=q.$2P.7D();q.$1A.2g(\'1A-7G-2P\');q.$1A.1O({4g:\'9E\',2J:2J,2V:2V+\'px\',2c:2c});if(3S>2j)$(\'.I-1n-\'+q.2H+\':aG\').3s();q.1A.jz();q.$1A.1O(\'jy\',(3S<2j)?\'aG\':\'i2\')},jA:C(){q.$1A.1O({4g:\'qQ\',2J:\'aF\',2V:0,2c:0,jy:\'aG\'});q.1A.ka();q.$1A.2W(\'1A-7G-2P\')},jz:C(){E 2V=q.$1A.68()+q.G.6L;E 4g=\'7G\';if(q.G.6F!==1k){2V=(q.$1A.68()+q.$1A.2v().2V)+q.G.6L;4g=\'9E\'}$(\'.I-1n-\'+q.2H).1u(C(){$(q).1O({4g:4g,2V:2V+\'px\'})})},ka:C(){E 2V=(q.$1A.68()+q.$1A.2v().2V);$(\'.I-1n-\'+q.2H).1u(C(){$(q).1O({4g:\'9E\',2V:2V+\'px\'})})}}},1w:C(){F{3Q:C(id,2i,2B){q.1w.4W=N;q.1w.2B=2B;q.1w.2i=2i;q.1w.$el=$(id);q.1w.$4e=$(\'<1j id="I-4e" />\');q.1w.$bY=$(\'<1j id="I-4e-3i" />\').1g(q.1H.1a(\'k8\'));q.1w.$3G=$(\'<3G 1m="1Z" 1y="1Z" />\');q.1w.$bY.1E(q.1w.$3G);q.1w.$4e.1E(q.1w.$bY);q.1w.$el.1E(q.1w.$4e);q.1w.$4e.3d(\'I.1w\');q.1w.$3G.3d(\'I.1w\');q.1w.$4e.on(\'kb.I.1w\',$.1d(q.1w.a7,q));q.1w.$4e.on(\'qS.I.1w\',$.1d(q.1w.iS,q));q.1w.$3G.on(\'kg.I.1w\',$.1d(C(e){e=e.7L||e;q.1w.aX(q.1w.$3G[0].5R[0],e)},q));q.1w.$4e.on(\'4Z.I.1w\',$.1d(C(e){e.2t();q.1w.$4e.2W(\'7U-cu\').2g(\'7U-4Z\');q.1w.aJ(e)},q))},kf:C(1Z,e){q.1w.4W=1q;q.1w.aX(1Z,e)},aJ:C(e){e=e.7L||e;E 5R=e.aU.5R;q.1w.aX(5R[0],e)},aX:C(1Z,e){if(q.G.86){q.1w.cG(1Z);q.1w.iE(1Z);F}E 4u=!!3p.aR?2a aR():4m;if(3p.aR){q.1w.cG(1Z);E 1y=(q.1w.1m==\'M\')?q.G.jU:q.G.jS;4u.1E(1y,1Z)}q.5F.2R();q.1W.2r(\'qc\',e,4u);q.1w.jZ(4u,e)},cG:C(1Z){q.1w.jT(1Z);if(q.1w.4W){q.1w.2i=(q.1w.1m==\'M\')?q.G.7R:q.G.7N;q.1w.2B=(q.1w.1m==\'M\')?q.M.1Y:q.1Z.1Y}},jT:C(1Z){q.1w.1m=\'M\';if(q.G.jX.4L(1Z.1m)==-1){q.1w.1m=\'1Z\'}},6A:C(7X,fd){if(7X===N||1s 7X!==\'43\')F fd;$.1u(7X,$.1d(C(k,v){if(v!==4m&&v.4o().4L(\'#\')===0)v=$(v).2L();fd.1E(k,v)},q));F fd},jZ:C(4u,e){if(q.1w.1m==\'M\'){4u=q.1w.6A(q.G.oY,4u);4u=q.1w.6A(q.1w.bk,4u)}O{4u=q.1w.6A(q.G.oX,4u);4u=q.1w.6A(q.1w.by,4u)}E 2Q=2a an();2Q.9T(\'oZ\',q.1w.2i);2Q.dY("X-p0-p1","an");2Q.jh=$.1d(C(){if(2Q.cS==4){E 1f=2Q.j0;1f=1f.J(/^\\[/,\'\');1f=1f.J(/\\]$/,\'\');E 2S;4U{2S=(1s 1f===\'70\'?$.iO(1f):1f)}56(pb){2S={6N:1q}}q.5F.3s();if(!q.1w.4W){q.1w.$4e.2W(\'7U-4Z\')}q.1w.2B(2S,q.1w.4W,e)}},q);2Q.ee(4u)},a7:C(e){e.2t();q.1w.$4e.2g(\'7U-cu\')},iS:C(e){e.2t();q.1w.$4e.2W(\'7U-cu\')},pe:C(){q.1w.bk={}},p7:C(1y,1F){q.1w.bk[1y]=1F},oO:C(1y){82 q.1w.bk[1y]},ox:C(){q.1w.by={}},oz:C(1y,1F){q.1w.by[1y]=1F},ot:C(1y){82 q.1w.by[1y]},iE:C(1Z){q.1w.iJ(1Z,$.1d(C(iK){q.1w.j7(1Z,iK)},q))},iJ:C(1Z,2B){E 2Q=2a an();E 85=(q.G.86.3J(/\\?/)!==\'-1\')?\'?\':\'&\';2Q.9T(\'os\',q.G.86+85+\'1y=\'+1Z.1y+\'&1m=\'+1Z.1m,1q);if(2Q.iI)2Q.iI(\'1g/oK; oL=x-oC-oE\');E jc=q;2Q.jh=C(e){if(q.cS==4&&q.cb==aE){jc.5F.2R();2B(j2(q.j0))}O if(q.cS==4&&q.cb!=aE){}};2Q.ee()},j8:C(9V,2i){E 2Q=2a an();if("pO"in 2Q){2Q.9T(9V,2i,1q)}O if(1s j9!="1z"){2Q=2a j9();2Q.9T(9V,2i)}O{2Q=4m}F 2Q},j7:C(1Z,2i){E 2Q=q.1w.j8(\'pW\',2i);if(!2Q){}O{2Q.pX=$.1d(C(){if(2Q.cb==aE){q.5F.3s();E aA=2i.4A(\'?\');if(!aA[0]){F N}if(!q.1w.4W){q.1w.$4e.2W(\'7U-4Z\')}E 2S={9D:aA[0]};if(q.1w.1m==\'1Z\'){E 2E=aA[0].4A(\'/\');2S.6f=2E[2E.12-1]}q.1w.2B(2S,q.1w.4W,N)}O{}},q);2Q.q5=C(){};2Q.1w.q6=C(e){};2Q.dY(\'q8-q4\',1Z.1m);2Q.dY(\'x-pZ-pJ\',\'pp-pm\');2Q.ee(1Z)}}}},L:C(){F{6Y:C(){F/(kj|kH|ky|kA)/.ai(ah.ao)},7K:C(){F!/(kj|kH|pl|ky|kA)/.ai(ah.ao)},pF:C(7X){F kD.5n.4o.64(7X)==\'[43 62]\'},3z:C(B,kM){B=B.J(/[\\6c-\\pG\\pH]/g,\'\');B=B.J(/&5k;/gi,\'\');B=B.J(/<\\/?br\\s?\\/?>/g,\'\');B=B.J(/\\s/g,\'\');B=B.J(/^<p>[^\\W\\w\\D\\d]*?<\\/p>$/i,\'\');B=B.J(/<4J(.*?[^>])>$/i,\'4J\');B=B.J(/<4D(.*?[^>])>$/i,\'4D\');if(kM!==N){B=B.J(/<[^\\/>][^>]*><\\/[^>]+>/gi,\'\');B=B.J(/<[^\\/>][^>]*><\\/[^>]+>/gi,\'\')}B=$.3h(B);F B===\'\'},cY:C(5b){if(1s(5b)===\'1z\')F 0;F 5H(5b.J(\'px\',\'\'),10)},pz:C(6y){if(1s 6y==\'1z\')F;if(6y.3J(/^#/)==-1)F 6y;E kr=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;6y=6y.J(kr,C(m,r,g,b){F r+r+g+g+b+b});E bJ=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.5l(6y);F\'pA(\'+5H(bJ[1],16)+\', \'+5H(bJ[2],16)+\', \'+5H(bJ[3],16)+\')\'},6r:C(el){F $(\'<1j>\').1E($(el).eq(0).9K()).B()},aS:C(el){if($.3t(el.1o,q.G.9y)!==-1){F $(el)}O{F $(el).2o(q.G.9y.4o().3g(),q.$T[0])}},5C:C(el,1c){E $el=$(el);if(1s $el.1c(1c)==\'1z\'){F 1q}if($el.1c(1c)===\'\'){$el.1L(1c);F 1q}F N},3T:C(i,s){E $s=$($.dH(s));$s.1h(\'.I-7m-3b\').1L(\'1p\').1L(\'1G\');if($s.1h(\'hr, br, 1M, 4J, 4D\').12!==0)F;E 1g=$.3h($s.1g());if(q.L.3z(1g,N)){$s.1t()}},9x:C(){q.eO=q.$T.3S();q.bb=$(3p).3S();if(q.G.9w)q.fi=$(q.G.9w).3S()},bh:C(){if(1s q.9x===\'1z\'&&1s q.bb===\'1z\')F;$(3p).3S(q.bb);q.$T.3S(q.eO);if(q.G.9w)$(q.G.9w).3S(q.fi)},ad:C(){E 3b=1k.3B(\'1i\');3b.3E=\'I-7m-3b\';3b.3v=q.G.5Z;F 3b},4V:C(R){E 2e=q.G.4M;2e.2N(\'1i\');if(R.1o==\'9J\')2e.2N(\'a\');$(R).1h(2e.31(\',\')).5O(\'1i.I-K-2u\').25().48()},5T:C(R,4V){E 3q=q;$(R).2x(C(){if(4V===1q)3q.L.4V(q);F $(q).25()});F $(R)},4x:C(R,Y,4V){E 5J;E 3q=q;$(R).2x(C(){5J=$(\'<\'+Y+\' />\').1E($(q).25());2D(E i=0;i<q.4z.12;i++){5J.1c(q.4z[i].1y,q.4z[i].1F)}if(4V===1q)3q.L.4V(5J);F 5J});F 5J},iy:C(){E Q=q.K.49();if(!Q)F N;E 2v=q.1S.9G(Q);F(2v===0)?1q:N},6B:C(2m){if(1s 2m==\'1z\'){E 2m=q.K.49();if(!2m)F N}E 2v=q.1S.9G(2m);E 1g=$.3h($(2m).1g()).J(/\\n\\r\\n/g,\'\');F(2v==1g.12)?1q:N},q0:C(){E 2v=q.1S.9G(q.$T[0]);F(2v===0)?1q:N},e2:C(){E Q=q.$T[0];E 2v=q.1S.9G(Q);E 1g=$.3h($(Q).B().J(/(<([^>]+)>)/gi,\'\'));F(2v==1g.12)?1q:N},6X:C(Q){Q=Q[0]||Q;F Q&&q.L.7f(Q.1o)},7f:C(Y){if(1s Y==\'1z\')F N;F q.fk.ai(Y)},9P:C(1B,Y){E 2m=$(1B).2o(Y,q.$T[0]);if(2m.12==1){F 2m[0]}F N},9u:C(){F q.bH},ex:C(){q.bH=1q},9z:C(){q.bH=N},4H:C(el){if(!el){F N}if($(el).eG(\'.I-T\').12===0||$(el).3u(\'I-T\')){F N}F el},ix:C(){F q.L.4Y([\'cJ\',\'cs\',\'c8\',\'c3\',\'c6\',\'bM\'])},4Y:C(1o){E 1r=q.K.6l();E 1B=q.K.3x();if($.bj(1o)){E cU=0;$.1u(1o,$.1d(C(i,s){if(q.L.cQ(1B,1r,s)){cU++}},q));F(cU===0)?N:1q}O{F q.L.cQ(1B,1r,1o)}},cQ:C(1B,1r,1o){1o=1o.p8();F 1r&&1r.1o===1o?1r:1B&&1B.1o===1o?1B:N},p5:C(){F(q.L.1P(\'2G\')&&5H(q.L.1P(\'au\'),10)<9)?1q:N},pd:C(){F(q.L.1P(\'2G\')&&5H(q.L.1P(\'au\'),10)<10)?1q:N},hc:C(){F!!ah.ao.1V(/p3\\/7\\./)},1P:C(1P){E 4T=ah.ao.3g();E 1V=/(ei)[\\/]([\\w.]+)/.5l(4T)||/(iv)[ \\/]([\\w.]+)/.5l(4T)||/(7Q)[ \\/]([\\w.]+).*(cH)[ \\/]([\\w.]+)/.5l(4T)||/(7Q)[ \\/]([\\w.]+)/.5l(4T)||/(qN)(?:.*au|)[ \\/]([\\w.]+)/.5l(4T)||/(2G) ([\\w.]+)/.5l(4T)||4T.4L("qR")>=0&&/(ej)(?::| )([\\w.]+)/.5l(4T)||4T.4L("qT")<0&&/(4b)(?:.*? ej:([\\w.]+)|)/.5l(4T)||[];if(1P==\'cH\')F(1s 1V[3]!=\'1z\')?1V[3]==\'cH\':N;if(1P==\'au\')F 1V[2];if(1P==\'7Q\')F(1V[1]==\'iv\'||1V[1]==\'ei\'||1V[1]==\'7Q\');if(1V[1]==\'ej\')F 1P==\'2G\';if(1V[1]==\'ei\')F 1P==\'7Q\';F 1P==1V[1]},as:C(iq,i8,2v){E i=iq.4L(i8,2v);F i>=0?i:N},dV:C(){E $3f=$(\'B\');E 89=3p.7D;if(!89){E dT=1k.qs.qy();89=dT.4t-9H.lY(dT.2c)}E g3=1k.3f.fW<89;E b9=q.L.fZ();$3f.1O(\'bn\',\'i2\');if(g3)$3f.1O(\'gF-4t\',b9)},fZ:C(){E $3f=$(\'3f\');E 77=1k.3B(\'1j\');77.3E=\'I-gC-gD\';$3f.1E(77);E b9=77.lp-77.fW;$3f[0].nN(77);F b9},b8:C(){$(\'B\').1O({\'bn\':\'\',\'gF-4t\':\'\'});$(\'3f\').1t(\'I-gC-gD\')}}}};$(3p).on(\'2K.gA.I\',C(){$(\'[1f-gA="I"]\').I()});3Y.5n.3Q.5n=3Y.5n})(oA);',62,1675,'||||||||||||||||||||||||||this|||||||||||html|function||var|return|opts||redactor|replace|selection|utils|image|false|else||block|node||editor||link|||tag||||length||range||||||get|modal|attr|proxy|code|data|text|find|span|div|document|key|type|dropdown|tagName|style|true|parent|typeof|remove|each|button|upload|clean|name|undefined|toolbar|current|func|keydown|append|value|class|lang|tidy|title|linebreaks|removeAttr|img|next|css|browser|target|observe|caret|sync|set|match|core|formatted|insert|file||blocks|nodes|btn||contents|inline||buffer|blockquote|new|start|left|list|tags|build|addClass|btnName|url|end|out|href|element|RegExp|closest|focus|len|setCallback|keyup|preventDefault|marker|offset|item|replaceWith|textarea|click|linkify|callback|settings|for|arr|pre|msie|uuid|tabifier|width|load|val|label|push|setStart|box|xhr|show|json|sel|btnObject|top|removeClass|paragraphize|td|alignment|formatting|join|||||||||format|space|last|off|restore|body|toLowerCase|trim|placeholder|toggle|ul|height|tooltip|autosave|save|window|self|keyCode|hide|inArray|hasClass|innerHTML|setTimeout|getCurrent|pos|isEmpty|indent|createElement|after|imageBox|className|CodeMirror|input|setEnd|first|search|re|line|verified|matches|font|insertNode|init|children|scrollTop|removeEmpty|point|table|script|rel|Redactor|execCommand||option|collapse|object|getBlocks|||options|unwrap|getBlock|ctrl|mozilla|deniedTags|section|droparea|addRange|position|italic|buttons|close|resizeHandle|del|null|bold|toString|regexps|src|clearUnverified|allowedTags|right|formData|child|substr|replaceToTag|command|attributes|split|prev|modalBox|source|blockElem|cmd|margin|isRedactorParent|htmls|iframe|getSelection|indexOf|inlineTags|wrapper|aria|orgn|frag|resize|keys|ua|try|removeInlineTags|direct|collapsed|isCurrentOrParent|drop||index|allowedAttr|elem|arrow|while|catch|deleteContents|setAfter||linkProtocol|str|meta|strong|getMarkerAsHtml|align|cont|pasteBox|BR|contenteditable|nbsp|exec|center|prototype|paste|none|unorderedlist|underline|removeDataAttr|tab|orderedlist|attributesRemove|replaceTags|replaceStyles|toggleType|allowed|links|touchstart|removeEmptyAttr|tmp|https|progress|lastNode|parseInt|editter|replacement|isFunction|LI|br1|scroll|not|nodeValue|currentList|files|deleted|replaceWithContents|break|emptyHtml|visual|prop|marginTop|invisibleSpace|||String|currentLevel|call|||getRangeAt|innerHeight|lastList|shortcuts|inlines|u200B|params|wrap|filename|containerTag|methods|num|mousedown|form|getParent|templateName|charAt|node1|quot|replaceDivs|getOuterHtml|th|figure|TD|removeComments|getNodes|SPAN|hex|ENTER|getHiddenFields|isEndOfElement|prepend|display|instance|toolbarFixedTarget|tabindex|module|metaKey|unlink|Insert|toolbarFixedTopOffset|boxTop|error|100|shift|youtube|editorDiv|video|vimeo|removeWithoutAttr|insertBreakLine|tr|isBlock|isMobile|shiftKey|string|getMarker|preSpaces||appendChild|header|posFromIndex|scrollDiv|parHtml|hideAll|select|strike|dropact|setVerified|decoration|isBlockTag|getTabs|extend|sup|sub|endRange|possible|invisible|outdent|float|disabled|blocksSize|handler|tmpList|keyPosition|modif|alt|which|getEvent|rangeCount|setStartAfter|pattern|boundaryRange|toggleClass|innerWidth|startNode|edit|fixed|dropdowns|focn|_blank|isDesktop|originalEvent|embed|fileUpload|action|outerHTML|webkit|imageUpload|www|rtePaste|drag|level|weight|obj|z0|hideResize|figcaption|modalOverlay|delete|BACKSPACE|cloneRange|mark|s3|blank|listParent|windowWidth|DIV|size|getOffset|tagout|imageResizer|linkmarker|singleLine|OL|Header|setActive|active|ftp|resizer|apply|cleanlevel|audio|modalHeader|imageMargin|replaceParagraphsToBr|modalClose|tagblock|setMode|modalFooter|act|param|targetTouches|case|UL|imageFloatMargin|addProperties|blockLevelElements|inserted|onPaste|selectNodeContents|inputUrl|amp|isRemoveInline|selectElement|rebuffer|classSize|createRange|undo|Array|removeAllRanges|DELETE|items|removeMarkers|node2|insertDblBreakLine|icon|createTextNode|exceptTags|||plugins|addEvent|endNode|small|||||autosaveInterval|tabber|isMobileUndoRedo|cite|clear|tmpLi|Delete|character|returnValue|events|counter|ctrlKey|lastLevel|http|setClass|event|convertVideoLinks|codemirror|Add|closeHandler|isSelectAll|decrease|scrollTarget|saveScroll|alignmentTags|disableSelectAll||justify|role|filelink|absolute|splice|getOffsetOfElement|Math|attrs|PRE|clone|newLevel|indentValue|before|fixEmptyIndent|isTag|classname|nodeType|formatblock|open|safes|method|caretRange|methodVal|increase|cloned|selectionMarkers|isEnabled|editorHtml|normalizeLists|bind|caretPositionFromPoint|checked|onDrag|eventName|link_new_tab|mailto|IMG|substring|createSpaceElement|minHeight|showOnDesktop|blured|navigator|test|caretRangeFromPoint|createTextRange|re2|moveToPoint|XMLHttpRequest|userAgent|getPlainText|onPasteTidy|_this|strpos|encodeEntities|version|placeTag|mso|convertLinks|kbd|samp|s3file|matchContainers|marginBottom|property|200|auto|visible|setOffset|toolbarExternal|onDrop|com|BLOCKQUOTE|insertInIe|activeButtons|horizontalrule|enterKey|wrapperHtml|FormData|getAlignmentElement|enable|dataTransfer|prevList|marginLeft|traverseFile|onSync|firstChild|createDocumentFragment|spaces|link_insert|maxHeight|mouseout|parentA|deleteProperties|tabAsSpaces|enableBodyScroll|scrollbarWidth|mouseover|saveBodyScroll|windowHeight|parentEl||isContainerTable|blockHtml|restoreScroll|autosaveFields|isArray|imageFields|appendTo|u00a0|overflow|modalBody|clearStyle|onClick||replaceToParagraph|special|specialKey|prev2|callbacks|regex|fileFields|codeLength|isTextarea|imageFloat|redo|pageY|formatListToBlockquote|formatWrap|ESC|selectAll|marginRight|result|images|x200b|H6|redactorImageLink|highContrast|saveFormTags|convertInline|createCancelButton|listTag|ratio|isUnorderedCmdOrdered|isOrderedCmdUnordered|buttonsSize|showOnMobile|placeholdler|startOffset|createActionButton|createButton|getTextFromHtml|H4|headers|clearUnverifiedRemove|H5|verifiedTags|H3|getInlines|imageEditable|status|footer|imageDisplay|visibleModals|dropdownWidth|URL||selectionStart|activeButtonsStates|image_position|one|removeSpaces|currentEl|paragraphizeBlocks|closeTooltip|selectionEnd|TH|H2|addCallback|hover|formattingAdd|dropdownObject|enlargeOffset|htmlLength|regexB|commentsMatches|markerLength|blur|isCurrent|syncCode|showCode|setConfig|safari|isFocused|H1|add|outValues|inValues|addDropdown|imageResizable|setInactiveAll|isCurrentOrParentOne|isDelete|readyState|setDropdownProperties|matched|setDropdownAttr|isP|getText|normalize|autosaveOnChange|firstFound|count|headTag|219|autosaveName|modules|removeIt|curLang|221|extra|TAB|focused|direction||nodeToCaretPositionFromPoint|RedactorPlugins|getModuleMethods|content|isEndOfTable|formatTableWrapping|imageDelete||DOWN|slice|hotkeysShiftNums|quote|contOwnLine|Row|ownLine||allowedAttrTags|allowedAttrData|rTags|Column|setBefore|suffix|cleanTag|finish|Table|insertBreakLineProcessing|thead|tbody|head|parseHTML|tfoot|br2|stopPropagation|endContainer|endOffset|Link|filter|inputText|buttonsHide|iframeEnd|container|documentElementRect|setMarker|disableBodyScroll|address|htmlIe|setRequestHeader|setAfterOrBefore|iframeStart|removeFormat|isEndOfEditor|inactive|fonts|setFormat|link_edit|listsIds|buttonsHideOnMobile|convertImageLinks|observeScroll|finalNodes|linkSize|BODY|send|getNodesMarker|listType|attrAllowed|opr|rv|convertUrlLinks||||dfn|tagsEmpty||LEFT_WIN|replaced|tabKey|onShiftEnter|onTab|onArrowDown|enableSelectAll|replaceDivToBreakLine|opacity|formatMultiple|through|replaceDivToParagraph|strikethrough|cleanStyleOnEnter|showEdit|parents|unline|loadEditableControls|loadResizableControls|formatConvert|formatRemoveSameChildren|editerWidth|formatCollapsed|saveEditorScroll|decreaseLists|ie11PasteFrag|ie11FixInserting|aside|keydownStop|stop|increaseText|RIGHT|lineAfter|EndToEnd|superscript|execHtml|||||||||||blocksMatch|subscript||offsetNode|decreaseBlocks|setEndPoint|duplicate|saveTargetScroll|htmlFixMozilla|reIsBlock|switch|addArrowsEvent||article|setupBuffer|increaseBlocks|setupSelectAll|altKey|SHIFT|ALT|checkEvents|HR|indented|checkKeyEvents|htmlWithoutClean|META|CTRL|increaseLists|tempEnd|getTextareaName|createContainerBox|run|getRedo|loadContent|enableEditor|fromElement|fromTextarea|loadEditor|getUndo|pop|formatBlockquote|setForce|commonAncestorContainer|elements|empty|setRedo|setUndo|clientWidth|createTextarea|insertAfter|measureScrollbar|focusEnd|setHelpers|codeKeyupCallback|isOverflowing|disableMozillaEditing|createTooltip|setEvent|disableIeLinks|codeKeydownCallback|setEventDropUpload|setOptions|callEditor|setCodeAndCall|dir|dragImageUpload|setEventDrop|setEvents|dragFileUpload||setMultiple|setCollapsed|Code|Video|Image|Right|choose|Center|the|to||Align|Left|Head|args|scope|Function|tools|Color|scrollbar|measure|List|padding|Edit|replaceElement|isNeedReplaceElement|isLinebreaksOrNoBlocks|alignElement|jsxhr|formatTags|callbackName|success|setBlocks|setText|png|here|Drop|gif|shortcutsAdd|bindModuleMethods|loadModules|loadOptions|onClickCallback|fullscreen|||||||setInactive|setActiveInVisual|indenting|modified|textareaIndenting|isIe11|removeData|destroy|eventNamespace|insertParagraph|tempStart|setValue|onChange|startSync|setSelectionRange|setInactiveInCode|indexFromPos|anchor|showVisual|clearInterval||selected|moveResize|startResize|pageX|setResizable|round|stopResize|15px|fixImageSourceAfterDrop|inside|setFloating|update|buttonDelete|_delete|700|buttonSave|imageLink|floating|floatValue|imagePosition|onSet|restoreFormTags|pastePlainText|Apple|nofollow|linkNofollow|FIGCAPTION|onPasteWord|onPasteExtra|Mso|bmso|chars|cleanSpaces|beforekey|afterkey|haspopup|hidden|lastChild|walker|foco|orgo|internal|needle|restoreSelectionMarker|saveCodeFormatting|savePreFormatting|getPreCode|||||getOnlyImages|replaceDivsToBr|newTag|removeDirtyStyles|savePreCode|matchBR||onPasteRemoveEmpty|all|haystack|onPasteRemoveSpans||onPasteIeFixLinks|matchBlocks|chrome|isSingleLine|isCurrentOrParentHeader|isStartOfElement|destroyed|origHandler|paragraph|header1|properties|s3uploadFile|disableEvents|enableEvents|buildOverlay|overrideMimeType|s3executeOnSignedUrl|signedURL|header2|header3|aLink|parseJSON|aEdit|aUnlink|getSafes|onDragLeave|getTooltipPosition|hotkeysSpecialKeys|setEditable|linkTooltip|showTooltip|arguments|area|responseText|fieldset|decodeURIComponent|template|contrast|removeAttrGetRemoves|checkbox|s3uploadToS3|s3createCORSRequest|XDomainRequest|loadTemplates|imageEdit|that|setTitle|createDeleteButton|cancel|setButtonsWidth|onreadystatechange|removeParagraphsInLists|setEnter|handle|setContent|getTemplate|setDraggable|draggable|getSafesComments|restoreSafes|toolbarOverflow|isButtonSourceNeeded|header5|exitFromBlockquote|setOverflow|hideButtons|hideButtonsOnMobile|visibility|setDropdownsFixed|observeScrollDisable|observeScrollEnable|createMarkers|toolbarFixed|savedSel|align_justify|replaceSelection|align_right|pasteHTML|align_center|mouseup|createContainer|setFixed|loadButtons|align_left|setFormattingTags|removeNodesMarkers|setNodesMarker|fileUploadParam|getType|imageUploadParam|spans|fadeOut|imageTypes|createPasteBox|sendData|replaceBreaksToParagraphs|replaceBreaksToNewLines|cleanOnPaste|freeze|getPrev|anchorNode|startPointNode|startContainer|upload_label|setEndBefore|unsetDropdownsFixed|dragover|getLastBlock|header4|getInlinesTags|directUpload|change|map|removeAttrs|iPhone|SPACE|lastFound|insertInOthersBrowsers|isKey|setFocus|objects|isExceptLastOrFirst|shorthandRegex|keyupStop|removeEmptyLists|formatEmpty|langs|textNode|600|BlackBerry|location|Android|getData|xn|Object|thref|re3|buttonText|iPod|_moz_dirty|buttonInsert|cleanUrl|removeEmptyListInTable|removeEmptyTags|insertNewLine|lineBefore|dbl|convertImages|addToAllowed|removeInvisibleSpace|removeTags|setupAllowed|regexp|newTd|removeFromDenied|insertAfterLastElement|setEndAfter|u2014|blurCallback|106|107|down|focusCallback|104|101|alignleft|cut|aligncenter|102|dragenter|hellip|103|105|111|117||ins|116|115|toggleAttr|setAttr|118|offsetWidth|setData|toggleData|TEXTAREA||jpeg|alignright|112|110|109|113|strict|application|use|114|mdash|up|addBefore|Infinity|uploadImageField|pause|capslock|math|setToPoint|setAwesome|addFirst|addAfter|10px|nextNode|SHOW_TEXT|backspace|bull|createTreeWalker|setStartBefore|No|abs|ltr|VERSION|such|esc|removeIcon|copy|AutoUrlDetect|u00a9|pagedown|menu|enableInlineTableEditing|summary|NodeFilter|home|enableObjectResizing|details|trade|reg|legend|getCoords|changeIcon|hgroup|DL|u2122|caretOffset|nav|pageup|u2026|DD|or_choose|Choose|Outdent|Or|noscript|drop_file_here|Download|Indent|download|Upload|insert_table|Save|Cancel|Ordered|frame|fontcolor|Font|Anchor|Open|Italic|Deleted|backcolor|Justify|Unordered|Back|Horizontal|Rule|insert_row_above|Above|rows|Rows|image_web_link|delete_table|delete_row|Web|columns|Columns|Title|frameset|Position|None|add_head|Text|Email|insert_column_left|insert_column_right|Below|insert_row_below|File|Vimeo|Youtube|web|delete_column|video_html_code|specified||Embed|Underline|Alignment|187|disable|186|173|SECTION|145|188|autosaveError|191|post|done|190|189|numlock|144|f10|122|121|DT|120|delete_head|OUTPUT|123|f12|removeChild|ADDRESS|f11|ajax|HEADER|UP|jpe|Formatting|LEFT|applet|merge|youtu|Normal|optional|Name|u2010|Bold|Quote|Key|getOwnPropertyNames|FOOTER|ASIDE|setInterval|1000|192|220|222|fromCharCode|Unlink|HTML|_|ARTICLE|119|sid||modalClosed||705|bodyOveflow|fast||GET|removeFileFields|activeElement|dropdownHide|toggleActive|clearFileFields|fileUploadError|addFileFields|jQuery|overlay|user|touchend|defined|labelledby|dialog|touchmove|mousemove|dragstart|plain|charset|times|Close|removeImageFields|dropdownShown|getElement|getBox|getTextarea|getToolbar|Callback|getEditor|getObject|uploadFileFields|uploadImageFields|POST|Requested|With|_data|Trident|dash|isOldIe|max|addImageFields|toUpperCase|addButton|unselectable|err|namespace|isLessIe10|clearImageFields|move|cursor|nodeToPoint|addBack|clientX|clientY|iPad|read|500|allowfullscreen|public|insertHTML|frameborder|281|deletedLink|insertedLink|0px|context||insertHtml|hexToRgb|rgb|enter|host|php|createLink|isString|u200D|uFEFF|toggleStyle|acl|addTab|addTemplate|createTabber|TR|withCredentials|imageUploadError|getModal|outerHeight|20px|email|focusin|modalOpened|PUT|onload|cssText|amz|isStartOfEditor|removeStyle|removeStyleRule|player|Type|onerror|onprogress|grep|Content|hasOwnProperty|dropdownShow|fake|uploadStart|shapes|slevel|removePhp|fadeIn|colspan|floor|1strike|9999px|syncBefore|textContent|pasteBefore|yes|cloneContents|1500|getHtml|documentElement|Ss|parentNode|docs|getOnlyLinksAndImages|guid|getBoundingClientRect|previousSibling|cleanEmptyParagraph|getNext|innerText|external|nextSibling|xml|spacerun|sdata|setSize|converted|fromPoint|WordDocument|refresh|opera|setSelection|setCursor|relative|trident|dragleave|compatible|extractContents|rowspan|getValue|replaceWithHtml|stripTags|lastBlock|listSelections'.split('|'),0,{}))
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/README.md b/wcfsetup/install/files/js/3rdParty/redactor2/README.md
new file mode 100644 (file)
index 0000000..1616dec
--- /dev/null
@@ -0,0 +1,8 @@
+About Redactor II
+--------------
+
+Redactor II is a WYSIWYG-editor created by Imperavi LLC., Copyright (c) 2009-2014. You can make use of Redactor II in any plugin or application for WCF 2.2 free of charge. You are not allowed to extract or re-use the editor (in entirety or in potions) for any other use unless you own a license for Redactor II.
+
+Please see http://imperavi.com/redactor/license/ for more information.
+
+Redactor II is **NOT** free software!
diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js
new file mode 100644 (file)
index 0000000..895f23b
--- /dev/null
@@ -0,0 +1,42 @@
+$.Redactor.prototype.WoltLabButton = function() {
+       "use strict";
+       
+       return {
+               init: function() {
+                       // insert separators
+                       var button, buttonName, lastButtonName;
+                       for (var i = 0, length = this.opts.buttons.length; i < length; i++) {
+                               buttonName = this.opts.buttons[i];
+                               
+                               if (buttonName === 'wcfSeparator') {
+                                       if (lastButtonName) {
+                                               button = this.button.get(lastButtonName);
+                                               button[0].parentNode.classList.add('separator');
+                                       }
+                                       
+                                       lastButtonName = '';
+                               }
+                               else {
+                                       lastButtonName = buttonName;
+                               }
+                       }
+                       
+                       // add tooltips
+                       var buttons = elByClass('re-button', this.button.toolbar()[0]), label;
+                       for (var i = 0, length = buttons.length; i < length; i++) {
+                               button = buttons[i];
+                               label = elAttr(button, 'aria-label');
+                               
+                               // check if label equals button text
+                               if (button.innerText.indexOf(label) !== -1) {
+                                       continue;
+                               }
+                               
+                               elAttr(button, 'title', label);
+                               button.classList.add('jsTooltip');
+                       }
+                       
+                       WCF.DOMNodeInsertedHandler.execute();
+               }
+       };
+};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabDropdown.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabDropdown.js
new file mode 100644 (file)
index 0000000..afd01a3
--- /dev/null
@@ -0,0 +1,60 @@
+$.Redactor.prototype.WoltLabDropdown = function() {
+       "use strict";
+       
+       return {
+               init: function() {
+                       // prevent overflow: hidden on body while hovering dropdowns
+                       this.utils.disableBodyScroll = function() {};
+                       this.utils.enableBodyScroll = function() {};
+                       
+                       // disable slideUp effect for dropdowns on close
+                       this._hideAll();
+                       
+                       // disable slideDown effect for dropdowns on open
+                       // enforce dropdownMenu-like DOM
+                       this._show();
+               },
+               
+               _hideAll: function() {
+                       var hideAll = this.dropdown.hideAll;
+                       this.dropdown.hideAll = (function() {
+                               hideAll.call(this);
+                               
+                               $('.redactor-dropdown-' + this.uuid).stop(true, true).hide();
+                       }).bind(this);
+               },
+               
+               _show: function() {
+                       var show = this.dropdown.show;
+                       this.dropdown.show = (function(e, key) {
+                               var $button = this.button.get(key);
+                               var $dropdown = $button.data('dropdown');
+                               
+                               if (!elDataBool($dropdown[0], 'woltlab')) {
+                                       var list = elCreate('ul');
+                                       list.className = 'dropdownMenu';
+                                       
+                                       var listItem;
+                                       while ($dropdown[0].childElementCount) {
+                                               listItem = elCreate('li');
+                                               listItem.appendChild($dropdown[0].children[0]);
+                                               list.appendChild(listItem);
+                                       }
+                                       
+                                       $dropdown[0].appendChild(list);
+                                       
+                                       elData($dropdown[0], 'woltlab', true);
+                               }
+                               
+                               var isActive = $button.hasClass('dropact');
+                               
+                               show.call(this, e, key);
+                               
+                               if (!isActive) {
+                                       $dropdown.stop(true).show();
+                               }
+                       }).bind(this);
+                       
+               }
+       };
+};
diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.js b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.js
new file mode 100644 (file)
index 0000000..db8ebbf
--- /dev/null
@@ -0,0 +1,7789 @@
+/*
+       Redactor II
+       Version 1.0.1
+       Updated: October 13, 2015
+
+       http://imperavi.com/redactor/
+
+       Copyright (c) 2009-2015, Imperavi LLC.
+       License: http://imperavi.com/redactor/license/
+
+       Usage: $('#content').redactor();
+*/
+
+(function($)
+{
+       'use strict';
+
+       if (!Function.prototype.bind)
+       {
+               Function.prototype.bind = function(scope)
+               {
+                       var fn = this;
+                       return function()
+                       {
+                               return fn.apply(scope);
+                       };
+               };
+       }
+
+       var uuid = 0;
+
+
+       // Plugin
+       $.fn.redactor = function(options)
+       {
+               var val = [];
+               var args = Array.prototype.slice.call(arguments, 1);
+
+               if (typeof options === 'string')
+               {
+                       this.each(function()
+                       {
+                               var instance = $.data(this, 'redactor');
+                               var func;
+
+                               if (options.search(/\./) !== '-1')
+                               {
+                                       func = options.split('.');
+                                       if (typeof instance[func[0]] !== 'undefined')
+                                       {
+                                               func = instance[func[0]][func[1]];
+                                       }
+                               }
+                               else
+                               {
+                                       func = instance[options];
+                               }
+
+                               if (typeof instance !== 'undefined' && $.isFunction(func))
+                               {
+                                       var methodVal = func.apply(instance, args);
+                                       if (methodVal !== undefined && methodVal !== instance)
+                                       {
+                                               val.push(methodVal);
+                                       }
+                               }
+                               else
+                               {
+                                       $.error('No such method "' + options + '" for Redactor');
+                               }
+                       });
+               }
+               else
+               {
+                       this.each(function()
+                       {
+                               $.data(this, 'redactor', {});
+                               $.data(this, 'redactor', Redactor(this, options));
+                       });
+               }
+
+               if (val.length === 0)
+               {
+                       return this;
+               }
+               else if (val.length === 1)
+               {
+                       return val[0];
+               }
+               else
+               {
+                       return val;
+               }
+
+       };
+
+       // Initialization
+       function Redactor(el, options)
+       {
+               return new Redactor.prototype.init(el, options);
+       }
+
+       // Options
+       $.Redactor = Redactor;
+       $.Redactor.VERSION = '1.0.1';
+       $.Redactor.modules = ['air', 'autosave', 'block', 'browser', 'buffer', 'build', 'button', 'caret', 'clean', 'code', 'core', 'dropdown',
+                                                 'events', 'file', 'focus', 'image', 'indent', 'inline', 'insert', 'keydown', 'keyup',
+                                                 'lang', 'line', 'link', 'linkify', 'list', 'modal', 'observe', 'paragraphize', 'paste', 'placeholder',
+                                                 'progress', 'selection', 'shortcuts', 'toolbar', 'upload', 'uploads3', 'utils'];
+
+       $.Redactor.settings = {};
+       $.Redactor.opts = {
+
+               // settings
+               lang: 'en',
+               direction: 'ltr',
+
+               focus: false,
+               focusEnd: false,
+
+               clickToEdit: false,
+               structure: false,
+
+               tabindex: false,
+
+               minHeight: false, // string
+               maxHeight: false, // string
+
+               maxWidth: false, // string
+
+               plugins: false, // array
+               callbacks: {},
+
+               placeholder: false,
+
+               linkify: true,
+               enterKey: true,
+
+               preClass: false, // string
+               preSpaces: 4, // or false
+               tabAsSpaces: false, // true or number of spaces
+               tabKey: true,
+
+               autosave: false, // false or url
+               autosaveName: false,
+               autosaveFields: false,
+
+               imageUpload: null,
+               imageUploadParam: 'file',
+               dragImageUpload: true,
+
+               fileUpload: null,
+               fileUploadParam: 'file',
+               dragFileUpload: true,
+
+               s3: false,
+
+               linkTooltip: true,
+               linkProtocol: 'http',
+               linkNofollow: false,
+               linkSize: 50,
+
+               toolbar: true,
+               toolbarFixed: true,
+               toolbarFixedTarget: document,
+               toolbarFixedTopOffset: 0, // pixels
+               toolbarExternal: false, // ID selector
+               toolbarOverflow: false,
+               toolbarCustom: false,
+
+               air: false,
+
+               formatting: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
+               formattingAdd: false,
+
+               buttons: ['format', 'bold', 'italic', 'deleted', 'lists', 'image', 'file', 'link', 'horizontalrule'], // + 'underline'
+
+               buttonsHide: [],
+               buttonsHideOnMobile: [],
+
+               script: true,
+
+               // shortcuts
+               shortcuts: {
+                       'ctrl+shift+m, meta+shift+m': { func: 'inline.removeFormat' },
+                       'ctrl+b, meta+b': { func: 'inline.format', params: ['bold'] },
+                       'ctrl+i, meta+i': { func: 'inline.format', params: ['italic'] },
+                       'ctrl+h, meta+h': { func: 'inline.format', params: ['superscript'] },
+                       'ctrl+l, meta+l': { func: 'inline.format', params: ['subscript'] },
+                       'ctrl+k, meta+k': { func: 'link.show' },
+                       'ctrl+shift+7':   { func: 'list.toggle', params: ['orderedlist'] },
+                       'ctrl+shift+8':   { func: 'list.toggle', params: ['unorderedlist'] }
+               },
+               shortcutsAdd: false,
+
+               // private lang
+               langs: {
+                       en: {
+
+                               "format": "Format",
+                               "image": "Image",
+                               "file": "File",
+                               "link": "Link",
+                               "bold": "Bold",
+                               "italic": "Italic",
+                               "deleted": "Strikethrough",
+                               "underline": "Underline",
+                               "bold-abbr": "B",
+                               "italic-abbr": "I",
+                               "deleted-abbr": "S",
+                               "underline-abbr": "U",
+                               "lists": "Lists",
+                               "link-insert": "Insert link",
+                               "link-edit": "Edit link",
+                               "link-in-new-tab": "Open link in new tab",
+                               "unlink": "Unlink",
+                               "cancel": "Cancel",
+                               "close": "Close",
+                               "insert": "Insert",
+                               "save": "Save",
+                               "delete": "Delete",
+                               "text": "Text",
+                               "edit": "Edit",
+                               "title": "Title",
+                               "paragraph": "Normal text",
+                               "quote": "Quote",
+                               "code": "Code",
+                               "heading1": "Heading 1",
+                               "heading2": "Heading 2",
+                               "heading3": "Heading 3",
+                               "heading4": "Heading 4",
+                               "heading5": "Heading 5",
+                               "heading6": "Heading 6",
+                               "filename": "Name",
+                               "optional": "optional",
+                               "unorderedlist": "Unordered List",
+                               "orderedlist": "Ordered List",
+                               "outdent": "Outdent",
+                               "indent": "Indent",
+                               "horizontalrule": "Line",
+                               "upload-label": "Drop file here or ",
+
+                               "accessibility-help-label": "Rich text editor"
+                       }
+               },
+
+               // private
+               type: 'textarea', // textarea, div, inline, pre
+               inline: false,
+               buffer: [],
+               rebuffer: [],
+               inlineTags: ['a', 'span', 'strong', 'strike', 'b', 'u', 'em', 'i', 'code', 'del', 'ins', 'samp', 'kbd', 'sup', 'sub', 'mark', 'var', 'cite', 'small'],
+               blockTags: ['pre', 'ul', 'ol', 'li', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',  'dl', 'dt', 'dd', 'div', 'td', 'blockquote', 'output', 'figcaption', 'figure', 'address', 'section', 'header', 'footer', 'aside', 'article', 'iframe'],
+               paragraphize: true,
+               paragraphizeBlocks: ['table', 'div', 'pre', 'form', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'dl', 'blockquote', 'figcaption',
+                                                       'address', 'section', 'header', 'footer', 'aside', 'article', 'object', 'style', 'script', 'iframe', 'select', 'input', 'textarea',
+                                                       'button', 'option', 'map', 'area', 'math', 'hr', 'fieldset', 'legend', 'hgroup', 'nav', 'figure', 'details', 'menu', 'summary', 'p'],
+               emptyHtml: '<p>&#x200b;</p>',
+               invisibleSpace: '&#x200b;',
+               imageTypes: ['image/png', 'image/jpeg', 'image/gif'],
+               userAgent: navigator.userAgent.toLowerCase(),
+               observe: {
+                       dropdowns: []
+               },
+               regexps: {
+                       linkyoutube: /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,
+                       linkvimeo: /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,
+                       linkimage: /((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/ig,
+                       url: /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/ig
+               }
+
+       };
+
+       // Functionality
+       Redactor.fn = $.Redactor.prototype = {
+
+               keyCode: {
+                       BACKSPACE: 8,
+                       DELETE: 46,
+                       UP: 38,
+                       DOWN: 40,
+                       ENTER: 13,
+                       SPACE: 32,
+                       ESC: 27,
+                       TAB: 9,
+                       CTRL: 17,
+                       META: 91,
+                       SHIFT: 16,
+                       ALT: 18,
+                       RIGHT: 39,
+                       LEFT: 37,
+                       LEFT_WIN: 91
+               },
+
+               // =init
+               init: function(el, options)
+               {
+                       this.$element = $(el);
+                       this.uuid = uuid++;
+
+                       this.loadOptions(options);
+                       this.loadModules();
+
+                       // click to edit
+                       if (this.opts.clickToEdit && !this.$element.hasClass('redactor-click-to-edit'))
+                       {
+                               return this.loadToEdit(options);
+                       }
+                       else if (this.$element.hasClass('redactor-click-to-edit'))
+                       {
+                               this.$element.removeClass('redactor-click-to-edit');
+                       }
+
+                       // block & inline test tag regexp
+                       this.reIsBlock = new RegExp('^(' + this.opts.blockTags.join('|' ).toUpperCase() + ')$', 'i');
+                       this.reIsInline = new RegExp('^(' + this.opts.inlineTags.join('|' ).toUpperCase() + ')$', 'i');
+
+                       // set up drag upload
+                       this.opts.dragImageUpload = (this.opts.imageUpload === null) ? false : this.opts.dragImageUpload;
+                       this.opts.dragFileUpload = (this.opts.fileUpload === null) ? false : this.opts.dragFileUpload;
+
+                       // formatting storage
+                       this.formatting = {};
+
+                       // load lang
+                       this.lang.load();
+
+                       // extend shortcuts
+                       $.extend(this.opts.shortcuts, this.opts.shortcutsAdd);
+
+                       // start callback
+                       this.core.callback('start');
+                       this.core.callback('startToEdit');
+
+                       // build
+                       this.start = true;
+                       this.build.start();
+
+               },
+               loadToEdit: function(options)
+               {
+
+                       this.$element.on('click.redactor-click-to-edit', $.proxy(function()
+                       {
+                               this.initToEdit(options);
+
+                       }, this));
+
+                       this.$element.addClass('redactor-click-to-edit');
+
+                       return;
+               },
+               initToEdit: function(options)
+               {
+                       $.extend(options.callbacks,  {
+                               startToEdit: function()
+                               {
+                                       this.insert.node(this.selection.marker(), false);
+                               },
+                               initToEdit: function()
+                               {
+                                       this.selection.restore();
+                                       this.clickToCancelStorage = this.code.get();
+
+                                       // cancel
+                                       $(this.opts.clickToCancel).show().on('click.redactor-click-to-edit', $.proxy(function(e)
+                                       {
+                                               e.preventDefault();
+
+                                               this.core.destroy();
+                                               this.events.syncFire = false;
+                                               this.$element.html(this.clickToCancelStorage);
+                                               this.core.callback('cancel', this.clickToCancelStorage);
+                                               this.events.syncFire = true;
+                                               this.clickToCancelStorage = '';
+                                               $(this.opts.clickToCancel).hide();
+                                               $(this.opts.clickToSave).hide();
+                                               this.$element.on('click.redactor-click-to-edit', $.proxy(function()
+                                               {
+                                                       this.initToEdit(options);
+                                               }, this));
+                                               this.$element.addClass('redactor-click-to-edit');
+
+                                       }, this));
+
+                                       // save
+                                       $(this.opts.clickToSave).show().on('click.redactor-click-to-edit', $.proxy(function(e)
+                                       {
+                                               e.preventDefault();
+
+                                               this.core.destroy();
+                                               this.core.callback('save', this.code.get());
+                                               $(this.opts.clickToCancel).hide();
+                                               $(this.opts.clickToSave).hide();
+                                               this.$element.on('click.redactor-click-to-edit', $.proxy(function()
+                                               {
+                                                       this.initToEdit(options);
+                                               }, this));
+                                               this.$element.addClass('redactor-click-to-edit');
+
+                                       }, this));
+                               }
+
+                       });
+
+                       this.$element.redactor(options);
+                       this.$element.off('click.redactor-click-to-edit');
+
+               },
+               loadOptions: function(options)
+               {
+                       this.opts = $.extend(
+                               {},
+                               $.extend(true, {}, $.Redactor.opts),
+                               $.extend(true, {}, $.Redactor.settings),
+                               this.$element.data(),
+                               options
+                       );
+               },
+               getModuleMethods: function(object)
+               {
+                       return Object.getOwnPropertyNames(object).filter(function(property)
+                       {
+                               return typeof object[property] === 'function';
+                       });
+               },
+               loadModules: function()
+               {
+                       var len = $.Redactor.modules.length;
+                       for (var i = 0; i < len; i++)
+                       {
+                               this.bindModuleMethods($.Redactor.modules[i]);
+                       }
+               },
+               bindModuleMethods: function(module)
+               {
+                       if (typeof this[module] === 'undefined')
+                       {
+                               return;
+                       }
+
+                       // init module
+                       this[module] = this[module]();
+
+                       var methods = this.getModuleMethods(this[module]);
+                       var len = methods.length;
+
+                       // bind methods
+                       for (var z = 0; z < len; z++)
+                       {
+                               this[module][methods[z]] = this[module][methods[z]].bind(this);
+                       }
+               },
+
+               // =air
+               air: function()
+               {
+                       return {
+                               enabled: false,
+                               collapsed: function()
+                               {
+                                       if (this.opts.air)
+                                       {
+                                               this.selection.get().collapseToStart();
+                                       }
+                               },
+                               collapsedEnd: function()
+                               {
+                                       if (this.opts.air)
+                                       {
+                                               this.selection.get().collapseToEnd();
+                                       }
+                               },
+                               build: function()
+                               {
+                                       if (this.utils.isMobile())
+                                       {
+                                               return;
+                                       }
+
+                                       this.button.hideButtons();
+                                       this.button.hideButtonsOnMobile();
+
+                                       if (this.opts.buttons.length === 0)
+                                       {
+                                               return;
+                                       }
+
+                                       this.$air = this.air.createContainer();
+
+                                       this.air.append();
+                                       this.button.$toolbar = this.$air;
+                                       this.button.setFormatting();
+                                       this.button.load(this.$air);
+
+
+                                       this.core.editor().on('mouseup.redactor', this, $.proxy(function(e)
+                                       {
+                                               if (this.selection.text() !== '')
+                                               {
+                                                       this.air.show(e);
+                                               }
+                                       }, this));
+
+                               },
+                               append: function()
+                               {
+                                       this.$air.appendTo('body');
+                               },
+                               createContainer: function()
+                               {
+                                       return $('<ul>').addClass('redactor-air').attr({ 'id': 'redactor-air-' + this.uuid, 'role': 'toolbar' }).hide();
+                               },
+                               show: function (e)
+                               {
+                                       this.selection.removeMarkers();
+                                       this.selection.save();
+                                       this.selection.restore(false);
+
+                                       $('.redactor-air').hide();
+
+                                       var leftFix = 0;
+                                       var width = this.$air.innerWidth();
+
+                                       if ($(window).width() < (e.clientX + width))
+                                       {
+                                               leftFix = 200;
+                                       }
+
+                                       this.$air.css({
+                                               left: (e.clientX - leftFix) + 'px',
+                                               top: (e.clientY + 10 + $(document).scrollTop()) + 'px'
+                                       }).show();
+
+                                       this.air.enabled = true;
+                                       this.air.bindHide();
+                               },
+                               bindHide: function()
+                               {
+                                       $(document).on('mousedown.redactor-air.' + this.uuid, $.proxy(function(e)
+                                       {
+                                               var dropdown = $(e.target).closest('.redactor-dropdown').length;
+
+                                               if ($(e.target).closest(this.$air).length === 0 && dropdown === 0)
+                                               {
+                                                       var hide = this.air.hide(e);
+                                                       if (hide !== false)
+                                                       {
+                                                               this.selection.removeMarkers();
+                                                       }
+                                               }
+
+                                       }, this)).on('keydown.redactor-air.' + this.uuid, $.proxy(function(e)
+                                       {
+                                               var key = e.which;
+                                               if ($(e.target).closest('#redactor-modal').length !== 0)
+                                               {
+                                                       return;
+                                               }
+
+                                               if (key === this.keyCode.ESC)
+                                               {
+                                                       this.selection.get().collapseToStart();
+                                                       this.selection.removeMarkers();
+                                               }
+                                               else if (key === this.keyCode.BACKSPACE || key === this.keyCode.DELETE)
+                                               {
+                                                       var sel = this.selection.get();
+                                                       var range = this.selection.range(sel);
+                                                       range.deleteContents();
+                                                       this.selection.removeMarkers();
+                                               }
+                                               else if (key === this.keyCode.ENTER)
+                                               {
+                                                       this.selection.get().collapseToEnd();
+                                                       this.selection.removeMarkers();
+                                               }
+
+                                               if (this.air.enabled)
+                                               {
+                                                       this.air.hide(e);
+                                               }
+                                               else
+                                               {
+                                                       this.selection.get().collapseToStart();
+                                                       this.selection.removeMarkers();
+                                               }
+
+
+                                       }, this));
+                               },
+                               bindMousemoveHide: function()
+                               {
+                                       $(document).on('mousemove.redactor-air.' + this.uuid, $.proxy(function(e)
+                                       {
+                                               if ($(e.target).closest(this.$air).length === 0)
+                                               {
+                                                       this.air.hide(e);
+                                               }
+
+                                       }, this));
+
+                               },
+                               hide: function(e)
+                               {
+                                       var ctrl = e.ctrlKey || e.metaKey || (e.shiftKey && e.altKey);
+                                       if (ctrl)
+                                       {
+                                               return false;
+                                       }
+
+                                       this.button.setInactiveAll();
+                                       this.$air.fadeOut(100);
+                                       this.air.enabled = false;
+                                       $(document).off('mousedown.redactor-air.' + this.uuid);
+
+                               }
+                       };
+               },
+
+               // =autosave
+               autosave: function()
+               {
+                       return {
+                               enabled: false,
+                               html: false,
+                               init: function()
+                               {
+                                       if (!this.opts.autosave)
+                                       {
+                                               return;
+                                       }
+
+                                       this.autosave.enabled = true;
+                                       this.autosave.name = (this.opts.autosaveName) ? this.opts.autosaveName : this.$textarea.attr('name');
+
+                               },
+                               is: function()
+                               {
+                                       return this.autosave.enabled;
+                               },
+                               send: function()
+                               {
+                                       if (!this.opts.autosave)
+                                       {
+                                               return;
+                                       }
+
+                                       this.autosave.source = this.code.get();
+
+                                       if (this.autosave.html === this.autosave.source)
+                                       {
+                                               return;
+                                       }
+
+                                       // data
+                                       var data = {};
+                                       data.name = this.autosave.name;
+                                       data[this.autosave.name] = this.autosave.source;
+                                       data = this.autosave.getHiddenFields(data);
+
+                                       // ajax
+                                       var jsxhr = $.ajax({
+                                               url: this.opts.autosave,
+                                               type: 'post',
+                                               data: data
+                                       });
+
+                                       jsxhr.done(this.autosave.success);
+                               },
+                               getHiddenFields: function(data)
+                               {
+                                       if (this.opts.autosaveFields === false || typeof this.opts.autosaveFields !== 'object')
+                                       {
+                                               return data;
+                                       }
+
+                                       $.each(this.opts.autosaveFields, $.proxy(function(k, v)
+                                       {
+                                               if (v !== null && v.toString().indexOf('#') === 0)
+                                               {
+                                                       v = $(v).val();
+                                               }
+
+                                               data[k] = v;
+
+                                       }, this));
+
+                                       return data;
+
+                               },
+                               success: function(data)
+                               {
+                                       var json;
+                                       try
+                                       {
+                                               json = $.parseJSON(data);
+                                       }
+                                       catch(e)
+                                       {
+                                               //data has already been parsed
+                                               json = data;
+                                       }
+
+                                       var callbackName = (typeof json.error === 'undefined') ? 'autosave' :  'autosaveError';
+
+                                       this.core.callback(callbackName, this.autosave.name, json);
+                                       this.autosave.html = this.autosave.source;
+                               },
+                               disable: function()
+                               {
+                                       this.autosave.enabled = false;
+
+                                       clearInterval(this.autosaveTimeout);
+                               }
+                       };
+               },
+
+               // =block
+               block: function()
+               {
+                       return {
+                               format: function(tag, attr, value, type)
+                               {
+                                       tag = (tag === 'quote') ? 'blockquote' : tag;
+
+                                       this.block.tags = ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div'];
+                                       if ($.inArray(tag, this.block.tags) === -1)
+                                       {
+                                               return;
+                                       }
+
+                                       this.placeholder.remove();
+                                       this.buffer.set();
+
+                                       return (this.utils.isCollapsed()) ? this.block.formatCollapsed(tag, attr, value, type) : this.block.formatUncollapsed(tag, attr, value, type);
+                               },
+                               formatCollapsed: function(tag, attr, value, type)
+                               {
+                                       this.selection.save();
+
+                                       var block = this.selection.block();
+                                       var currentTag = block.tagName.toLowerCase();
+                                       if ($.inArray(currentTag, this.block.tags) === -1)
+                                       {
+                                               this.selection.restore();
+                                               return;
+                                       }
+
+                                       if (currentTag === tag)
+                                       {
+                                               tag = 'p';
+                                       }
+
+                                       var replaced = this.utils.replaceToTag(block, tag);
+
+                                       if (typeof attr === 'object')
+                                       {
+                                               type = value;
+                                               for (var key in attr)
+                                               {
+                                                       replaced = this.block.setAttr(replaced, key, attr[key], type);
+                                               }
+                                       }
+                                       else
+                                       {
+                                               replaced = this.block.setAttr(replaced, attr, value, type);
+                                       }
+
+                                       this.selection.restore();
+                                       this.block.removeInlineTags(replaced);
+
+                                       return replaced;
+                               },
+                               formatUncollapsed: function(tag, attr, value, type)
+                               {
+                                       this.selection.save();
+
+                                       var replaced = [];
+                                       var blocks = this.selection.blocks();
+                                       var len = blocks.length;
+                                       for (var i = 0; i < len; i++)
+                                       {
+                                               var currentTag = blocks[i].tagName.toLowerCase();
+
+                                               if ($.inArray(currentTag, this.block.tags) !== -1)
+                                               {
+                                                       var block = this.utils.replaceToTag(blocks[i], tag);
+
+                                                       if (typeof attr === 'object')
+                                                       {
+                                                               type = value;
+                                                               for (var key in attr)
+                                                               {
+                                                                       block = this.block.setAttr(block, key, attr[key], type);
+                                                               }
+                                                       }
+                                                       else
+                                                       {
+                                                               block = this.block.setAttr(block, attr, value, type);
+                                                       }
+
+                                                       replaced.push(block);
+                                                       this.block.removeInlineTags(block);
+                                               }
+                                       }
+
+                                       this.selection.restore();
+
+                                       return replaced;
+                               },
+                               removeInlineTags: function(node)
+                               {
+                                       node = node[0] || node;
+
+                                       var tags = this.opts.inlineTags;
+                                       var blocks = ['PRE', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6'];
+
+                                       if ($.inArray(node.tagName, blocks) === - 1)
+                                       {
+                                               return;
+                                       }
+
+                                       if (node.tagName !== 'PRE')
+                                       {
+                                               var index = tags.indexOf('a');
+                                               tags.splice(index, 1);
+                                       }
+
+                                       $(node).find(tags.join(',')).not('.redactor-selection-marker').contents().unwrap();
+                               },
+                               setAttr: function(block, attr, value, type)
+                               {
+                                       if (typeof attr === 'undefined')
+                                       {
+                                               return block;
+                                       }
+
+                                       var func = (typeof type === 'undefined') ? 'replace' : type;
+
+                                       if (attr === 'class')
+                                       {
+                                               block = this.block[func + 'Class'](value, block);
+                                       }
+                                       else
+                                       {
+                                               if (func === 'remove')
+                                               {
+                                                       block = this.block[func + 'Attr'](attr, block);
+                                               }
+                                               else if (func === 'removeAll')
+                                               {
+                                                       block = this.block[func + 'Attr'](attr, block);
+                                               }
+                                               else
+                                               {
+                                                       block = this.block[func + 'Attr'](attr, value, block);
+                                               }
+                                       }
+
+                                       return block;
+
+                               },
+                               getBlocks: function(block)
+                               {
+                                       return (typeof block === 'undefined') ? this.selection.blocks() : block;
+                               },
+                               replaceClass: function(value, block)
+                               {
+                                       return $(this.block.getBlocks(block)).removeAttr('class').addClass(value)[0];
+                               },
+                               toggleClass: function(value, block)
+                               {
+                                       return $(this.block.getBlocks(block)).toggleClass(value)[0];
+                               },
+                               addClass: function(value, block)
+                               {
+                                       return $(this.block.getBlocks(block)).addClass(value)[0];
+                               },
+                               removeClass: function(value, block)
+                               {
+                                       return $(this.block.getBlocks(block)).removeClass(value)[0];
+                               },
+                               removeAllClass: function(block)
+                               {
+                                       return $(this.block.getBlocks(block)).removeAttr('class')[0];
+                               },
+                               replaceAttr: function(attr, value, block)
+                               {
+                                       block = this.block.removeAttr(attr, block);
+
+                                       return $(block).attr(attr, value)[0];
+                               },
+                               toggleAttr: function(attr, value, block)
+                               {
+                                       block = this.block.getBlocks(block);
+
+                                       var self = this;
+                                       var returned = [];
+                                       $.each(block, function(i,s)
+                                       {
+                                               var $el = $(s);
+                                               if ($el.attr(attr))
+                                               {
+                                                       returned.push(self.block.removeAttr(attr, s));
+                                               }
+                                               else
+                                               {
+                                                       returned.push(self.block.addAttr(attr, value, s));
+                                               }
+                                       });
+
+                                       return returned;
+
+                               },
+                               addAttr: function(attr, value, block)
+                               {
+                                       return $(this.block.getBlocks(block)).attr(attr, value)[0];
+                               },
+                               removeAttr: function(attr, block)
+                               {
+                                       return $(this.block.getBlocks(block)).removeAttr(attr)[0];
+                               },
+                               removeAllAttr: function(block)
+                               {
+                                       block = this.block.getBlocks(block);
+
+                                       var returned = [];
+                                       $.each(block, function(i,s)
+                                       {
+                                               if (typeof s.attributes === 'undefined')
+                                               {
+                                                       returned.push(s);
+                                               }
+
+                                               var $el = $(s);
+                                               var len = s.attributes.length;
+                                               for (var z = 0; z < len; z++)
+                                               {
+                                                       $el.removeAttr(s.attributes[z].name);
+                                               }
+
+                                               returned.push($el[0]);
+                                       });
+
+                                       return returned;
+                               }
+                       };
+               },
+
+               // =browser
+               browser: function()
+               {
+                       return {
+                               webkit: function()
+                               {
+                                       return /webkit/.test(this.opts.userAgent);
+                               },
+                               ff: function()
+                               {
+                                       return this.opts.userAgent.indexOf('firefox') > -1;
+                               },
+                               ie: function(v)
+                               {
+                                       var ie;
+                                       ie = RegExp('msie' + (!isNaN(v)?('\\s'+v):''), 'i').test(navigator.userAgent);
+                                       if (!ie)
+                                       {
+                                               ie = !!navigator.userAgent.match(/Trident.*rv[ :]*11\./);
+                                       }
+                                       return ie;
+                               }
+                       };
+               },
+
+               // buffer
+               buffer: function()
+               {
+                       return {
+                               set: function(type)
+                               {
+                                       if (typeof type === 'undefined' || type === 'undo')
+                                       {
+                                               this.buffer.setUndo();
+                                       }
+                                       else
+                                       {
+                                               this.buffer.setRedo();
+                                       }
+                               },
+                               setUndo: function()
+                               {
+                                       this.selection.save();
+                                       this.opts.buffer.push(this.core.editor().html());
+                                       this.selection.restore();
+                               },
+                               setRedo: function()
+                               {
+                                       this.selection.save();
+                                       this.opts.rebuffer.push(this.core.editor().html());
+                                       this.selection.restore();
+                               },
+                               getUndo: function()
+                               {
+                                       this.events.stopDetect();
+                                       this.core.editor().html(this.opts.buffer.pop());
+                                       this.events.startDetect();
+
+                               },
+                               getRedo: function()
+                               {
+                                       this.events.stopDetect();
+                                       this.core.editor().html(this.opts.rebuffer.pop());
+                                       this.events.startDetect();
+
+                               },
+                               add: function()
+                               {
+                                       this.opts.buffer.push(this.core.editor().html());
+                               },
+                               undo: function()
+                               {
+                                       if (this.opts.buffer.length === 0)
+                                       {
+                                               return;
+                                       }
+
+                                       this.buffer.set('redo');
+                                       this.buffer.getUndo();
+
+                                       this.selection.restore();
+
+                                       setTimeout($.proxy(this.observe.load, this), 50);
+                               },
+                               redo: function()
+                               {
+                                       if (this.opts.rebuffer.length === 0)
+                                       {
+                                               return;
+                                       }
+
+                                       this.buffer.set('undo');
+                                       this.buffer.getRedo();
+
+                                       this.selection.restore();
+
+                                       setTimeout($.proxy(this.observe.load, this), 50);
+                               }
+                       };
+               },
+
+               // =build
+               build: function()
+               {
+                       return {
+                               start: function()
+                               {
+                                       this.$editor = this.$element;
+
+                                       // load
+                                       if (this.build.isInline() || this.opts.inline)
+                                       {
+                                               this.opts.type = 'inline';
+                                               this.opts.inline = true;
+                                               this.opts.linkify = false;
+                                       }
+                                       else if (this.build.isTag('DIV'))
+                                       {
+                                               this.opts.type = 'div';
+
+                                               // empty
+                                               if (this.$editor.html() === '')
+                                               {
+                                                       this.$editor.html(this.opts.emptyHtml);
+                                               }
+
+                                       }
+                                       else if (this.build.isTag('PRE'))
+                                       {
+                                               this.opts.type = 'pre';
+                                       }
+                                       else
+                                       {
+                                               this.build.startTextarea();
+                                       }
+
+                                       // set in
+                                       this.build.setIn();
+
+                                       // set id
+                                       this.build.setId();
+
+                                       // enable
+                                       this.build.enableEditor();
+
+                                       // options
+                                       this.build.setOptions();
+
+                                       // call
+                                       this.build.callEditor();
+
+                               },
+                               createContainerBox: function()
+                               {
+                                       this.$box = $('<div class="redactor-box" role="application" />');
+                               },
+                               setIn: function()
+                               {
+                                       this.core.editor().addClass('redactor-in');
+                               },
+                               setId: function()
+                               {
+                                       var id = (this.opts.type === 'textarea') ? 'redactor-uuid-' + this.uuid : this.$element.attr('id');
+
+                                       this.core.editor().attr('id', (typeof id === 'undefined') ? 'redactor-uuid-' + this.uuid : id);
+                               },
+                               getName: function()
+                               {
+                                       var name = this.$element.attr('name');
+
+                                       return (typeof name === 'undefined') ? 'content-' + this.uuid : name;
+                               },
+                               loadFromTextarea: function()
+                               {
+                                       this.$editor = $('<div />');
+
+                                       // textarea
+                                       this.$textarea = this.$element;
+                                       this.$element.attr('name', this.build.getName());
+
+                                       // place
+                                       this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element);
+                                       this.$editor.addClass('redactor-editor');
+                                       this.$element.hide();
+
+                                       this.$box.prepend('<span class="redactor-voice-label" id="redactor-voice-' + this.uuid +'" aria-hidden="false">' + this.lang.get('accessibility-help-label') + '</span>');
+                                       this.$editor.attr({ 'aria-labelledby': 'redactor-voice-' + this.uuid, 'role': 'presentation' });
+                               },
+                               startTextarea: function()
+                               {
+                                       this.build.createContainerBox();
+
+                                       // load
+                                       this.build.loadFromTextarea();
+
+                                       // set code
+                                       this.code.start(this.core.textarea().val());
+
+                                       // set value
+                                       this.core.textarea().val(this.clean.onSync(this.$editor.html()));
+                               },
+                               isTag: function(tag)
+                               {
+                                       return (this.$element[0].tagName === tag);
+                               },
+                               isInline: function()
+                               {
+                                       return (!this.build.isTag('TEXTAREA') && !this.build.isTag('DIV') && !this.build.isTag('PRE'));
+                               },
+                               enableEditor: function()
+                               {
+                                       this.core.editor().attr({ 'contenteditable': true });
+                               },
+                               setOptions: function()
+                               {
+                                       // inline
+                                       if (this.opts.type === 'inline')
+                                       {
+                                               this.opts.enterKey = false;
+                                       }
+
+                                       // inline & pre
+                                       if (this.opts.type === 'inline' || this.opts.type === 'pre')
+                                       {
+                                               this.opts.toolbarMobile = false;
+                                               this.opts.toolbar = false;
+                                               this.opts.air = false;
+                                               this.opts.linkify = false;
+
+                                       }
+
+                                       // structure
+                                       if (this.opts.structure)
+                                       {
+                                               this.core.editor().addClass('redactor-structure');
+                                       }
+
+                                       // options sets only in textarea mode
+                                       if (this.opts.type !== 'textarea')
+                                       {
+                                               return;
+                                       }
+
+                                       // direction
+                                       this.core.box().attr('dir', this.opts.direction);
+                                       this.core.editor().attr('dir', this.opts.direction);
+
+                                       // tabindex
+                                       if (this.opts.tabindex)
+                                       {
+                                               this.core.editor().attr('tabindex', this.opts.tabindex);
+                                       }
+
+                                       // min height
+                                       if (this.opts.minHeight)
+                                       {
+                                               this.core.editor().css('min-height', this.opts.minHeight);
+                                       }
+
+                                       // max height
+                                       if (this.opts.maxHeight)
+                                       {
+                                               this.core.editor().css('max-height', this.opts.maxHeight);
+                                       }
+
+                                       // max width
+                                       if (this.opts.maxWidth)
+                                       {
+                                               this.core.editor().css({ 'max-width': this.opts.maxWidth, 'margin': 'auto' });
+                                       }
+
+
+                               },
+                               callEditor: function()
+                               {
+                                       this.build.disableBrowsersEditing();
+
+                                       this.events.init();
+                                       this.build.setHelpers();
+
+                                       // init buttons
+                                       if (this.opts.toolbar || this.opts.air)
+                                       {
+                                               this.toolbarsButtons = this.button.init();
+                                       }
+
+                                       // custom toolbar
+                                       if (this.opts.toolbarCustom)
+                                       {
+                                               this.toolbar.custom();
+                                       }
+
+                                       // load toolbar
+                                       if (this.opts.air)
+                                       {
+                                               this.air.build();
+                                       }
+                                       else if (this.opts.toolbar)
+                                       {
+                                               this.toolbar.build();
+                                       }
+
+                                       if (this.utils.isMobile() && this.opts.toolbarMobile && this.opts.air)
+                                       {
+                                               this.opts.toolbar = true;
+                                               this.toolbar.build();
+                                       }
+
+                                       // observe dropdowns
+                                       if (this.opts.air || this.opts.toolbar)
+                                       {
+                                               this.core.editor().on('mouseup.redactor keyup.redactor focus.redactor', $.proxy(this.observe.dropdowns, this));
+                                       }
+
+                                       // modal templates init
+                                       this.modal.templates();
+
+                                       // plugins
+                                       this.build.plugins();
+
+                                       // autosave
+                                       this.autosave.init();
+
+                                       // sync code
+                                       this.code.html = this.code.cleaned(this.core.editor().html());
+
+                                       // observers
+                                       setTimeout($.proxy(this.observe.load, this), 4);
+
+                                       // init callback
+                                       this.core.callback('init');
+                                       this.core.callback('initToEdit');
+
+                                       // started
+                                       this.start = false;
+
+                               },
+                               setHelpers: function()
+                               {
+                                       // linkify
+                                       if (this.opts.linkify)
+                                       {
+                                               this.linkify.format();
+                                       }
+
+                                       // placeholder
+                                       this.placeholder.enable();
+
+                                       // focus
+                                       if (this.opts.focus)
+                                       {
+                                               setTimeout(this.focus.start, 100);
+                                       }
+                                       else if (this.opts.focusEnd)
+                                       {
+                                               setTimeout(this.focus.end, 100);
+                                       }
+
+                               },
+                               disableBrowsersEditing: function()
+                               {
+                                       try {
+                                               // FF fix
+                                               document.execCommand('enableObjectResizing', false, false);
+                                               document.execCommand('enableInlineTableEditing', false, false);
+                                               // IE prevent converting links
+                                               document.execCommand("AutoUrlDetect", false, false);
+                                       } catch (e) {}
+                               },
+                               plugins: function()
+                               {
+                                       if (!this.opts.plugins)
+                                       {
+                                               return;
+                                       }
+
+                                       $.each(this.opts.plugins, $.proxy(function(i, s)
+                                       {
+                                               var func = (typeof RedactorPlugins !== 'undefined' && typeof RedactorPlugins[s] !== 'undefined') ? RedactorPlugins : Redactor.fn;
+
+                                               if (!$.isFunction(func[s]))
+                                               {
+                                                       return;
+                                               }
+
+                                               this[s] = func[s]();
+
+                                               // get methods
+                                               var methods = this.getModuleMethods(this[s]);
+                                               var len = methods.length;
+
+                                               // bind methods
+                                               for (var z = 0; z < len; z++)
+                                               {
+                                                       this[s][methods[z]] = this[s][methods[z]].bind(this);
+                                               }
+
+                                               // append lang
+                                               if (typeof this[s].langs !== 'undefined')
+                                               {
+                                                       var lang = {};
+                                                       if (typeof this[s].langs[this.opts.lang] !== 'undefined')
+                                                       {
+                                                               lang = this[s].langs[this.opts.lang];
+                                                       }
+                                                       else if (typeof this[s].langs[this.opts.lang] === 'undefined' && typeof this[s].langs.en !== 'undefined')
+                                                       {
+                                                               lang = this[s].langs.en;
+                                                       }
+
+                                                       // extend
+                                                       var self = this;
+                                                       $.each(lang, function(i,s)
+                                                       {
+                                                               if (typeof self.opts.curLang[i] === 'undefined')
+                                                               {
+                                                                       self.opts.curLang[i] = s;
+                                                               }
+                                                       });
+                                               }
+
+                                               // init
+                                               if ($.isFunction(this[s].init))
+                                               {
+                                                       this[s].init();
+                                               }
+
+
+                                       }, this));
+
+                               }
+                       };
+               },
+
+               // =button
+               button: function()
+               {
+                       return {
+                               toolbar: function()
+                               {
+                                       return (typeof this.button.$toolbar === 'undefined' || !this.button.$toolbar) ? this.$toolbar : this.button.$toolbar;
+                               },
+                               init: function()
+                               {
+                                       return {
+                                               format:
+                                               {
+                                                       title: this.lang.get('format'),
+                                                       dropdown:
+                                                       {
+                                                               p:
+                                                               {
+                                                                       title: this.lang.get('paragraph'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               blockquote:
+                                                               {
+                                                                       title: this.lang.get('quote'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               pre:
+                                                               {
+                                                                       title: this.lang.get('code'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               h1:
+                                                               {
+                                                                       title: this.lang.get('heading1'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               h2:
+                                                               {
+                                                                       title: this.lang.get('heading2'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               h3:
+                                                               {
+                                                                       title: this.lang.get('heading3'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               h4:
+                                                               {
+                                                                       title: this.lang.get('heading4'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               h5:
+                                                               {
+                                                                       title: this.lang.get('heading5'),
+                                                                       func: 'block.format'
+                                                               },
+                                                               h6:
+                                                               {
+                                                                       title: this.lang.get('heading6'),
+                                                                       func: 'block.format'
+                                                               }
+                                                       }
+                                               },
+                                               bold:
+                                               {
+                                                       title: this.lang.get('bold-abbr'),
+                                                       label: this.lang.get('bold'),
+                                                       func: 'inline.format'
+                                               },
+                                               italic:
+                                               {
+                                                       title: this.lang.get('italic-abbr'),
+                                                       label: this.lang.get('italic'),
+                                                       func: 'inline.format'
+                                               },
+                                               deleted:
+                                               {
+                                                       title: this.lang.get('deleted-abbr'),
+                                                       label: this.lang.get('deleted'),
+                                                       func: 'inline.format'
+                                               },
+                                               underline:
+                                               {
+                                                       title: this.lang.get('underline-abbr'),
+                                                       label: this.lang.get('underline'),
+                                                       func: 'inline.format'
+                                               },
+                                               lists:
+                                               {
+                                                       title: this.lang.get('lists'),
+                                                       dropdown:
+                                                       {
+                                                               unorderedlist:
+                                                               {
+                                                                       title: '&bull; ' + this.lang.get('unorderedlist'),
+                                                                       func: 'list.toggle'
+                                                               },
+                                                               orderedlist:
+                                                               {
+                                                                       title: '1. ' + this.lang.get('orderedlist'),
+                                                                       func: 'list.toggle'
+                                                               },
+                                                               outdent:
+                                                               {
+                                                                       title: '< ' + this.lang.get('outdent'),
+                                                                       func: 'indent.decrease',
+                                                                       observe: {
+                                                                               element: 'li',
+                                                                               out: {
+                                                                                       attr: {
+                                                                                               'class': 'redactor-dropdown-link-inactive',
+                                                                                               'aria-disabled': true
+                                                                                       }
+                                                                               }
+                                                                       }
+                                                               },
+                                                               indent:
+                                                               {
+                                                                       title: '> ' + this.lang.get('indent'),
+                                                                       func: 'indent.increase',
+                                                                       observe: {
+                                                                               element: 'li',
+                                                                               out: {
+                                                                                       attr: {
+                                                                                               'class': 'redactor-dropdown-link-inactive',
+                                                                                               'aria-disabled': true
+                                                                                       }
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                               },
+                                               image:
+                                               {
+                                                       title: this.lang.get('image'),
+                                                       func: 'image.show'
+                                               },
+                                               file:
+                                               {
+                                                       title: this.lang.get('file'),
+                                                       func: 'file.show'
+                                               },
+                                               link:
+                                               {
+                                                       title: this.lang.get('link'),
+                                                       dropdown:
+                                                       {
+                                                               link:
+                                                               {
+                                                                       title: this.lang.get('link-insert'),
+                                                                       func: 'link.show',
+                                                                       observe: {
+                                                                               element: 'a',
+                                                                               in: {
+                                                                                       title: this.lang.get('link-edit'),
+                                                                               },
+                                                                               out: {
+                                                                                       title: this.lang.get('link-insert')
+                                                                               }
+                                                                       }
+                                                               },
+                                                               unlink:
+                                                               {
+                                                                       title: this.lang.get('unlink'),
+                                                                       func: 'link.unlink',
+                                                                       observe: {
+                                                                               element: 'a',
+                                                                               out: {
+                                                                                       attr: {
+                                                                                               'class': 'redactor-dropdown-link-inactive',
+                                                                                               'aria-disabled': true
+                                                                                       }
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                               },
+                                               horizontalrule:
+                                               {
+                                                       title: this.lang.get('horizontalrule'),
+                                                       func: 'line.insert'
+                                               }
+                                       };
+                               },
+                               setFormatting: function()
+                               {
+                                       $.each(this.toolbarsButtons.format.dropdown, $.proxy(function (i, s)
+                                       {
+                                               if ($.inArray(i, this.opts.formatting) === -1)
+                                               {
+                                                       delete this.toolbarsButtons.format.dropdown[i];
+                                               }
+
+                                       }, this));
+
+                               },
+                               hideButtons: function()
+                               {
+                                       if (this.opts.buttonsHide.length !== 0)
+                                       {
+                                               this.button.hideButtonsSlicer(this.opts.buttonsHide);
+                                       }
+                               },
+                               hideButtonsOnMobile: function()
+                               {
+                                       if (this.utils.isMobile() && this.opts.buttonsHideOnMobile.length !== 0)
+                                       {
+                                               this.button.hideButtonsSlicer(this.opts.buttonsHideOnMobile);
+                                       }
+                               },
+                               hideButtonsSlicer: function(buttons)
+                               {
+                                       $.each(buttons, $.proxy(function(i, s)
+                                       {
+                                               var index = this.opts.buttons.indexOf(s);
+                                               this.opts.buttons.splice(index, 1);
+
+                                       }, this));
+                               },
+                               load: function($toolbar)
+                               {
+                                       this.button.buttons = [];
+
+                                       $.each(this.opts.buttons, $.proxy(function(i, btnName)
+                                       {
+                                               if (!this.toolbarsButtons[btnName])
+                                               {
+                                                       return;
+                                               }
+
+                                               if (btnName === 'file' && (!this.opts.fileUpload || !this.opts.fileUpload && !this.opts.s3))
+                                               {
+                                                       return;
+                                               }
+
+                                               if (btnName === 'image' && (!this.opts.imageUpload || !this.opts.imageUpload && !this.opts.s3))
+                                               {
+                                                       return;
+                                               }
+
+                                               $toolbar.append($('<li>').append(this.button.build(btnName, this.toolbarsButtons[btnName])));
+
+                                       }, this));
+                               },
+                               build: function(btnName, btnObject)
+                               {
+                                       var $button = $('<a href="javascript:void(null);" class="re-button re-' + btnName + '" rel="' + btnName + '" />').html(btnObject.title);
+                                       $button.attr({ 'role': 'button', 'aria-label': btnObject.title, 'tabindex': '-1' });
+
+                                       if (typeof btnObject.label !== 'undefined')
+                                       {
+                                               $button.attr('aria-label', btnObject.label);
+                                       }
+
+                                       // click
+                                       if (btnObject.func || btnObject.command || btnObject.dropdown)
+                                       {
+                                               this.button.setEvent($button, btnName, btnObject);
+                                       }
+
+                                       // dropdown
+                                       if (btnObject.dropdown)
+                                       {
+                                               $button.addClass('redactor-toolbar-link-dropdown').attr('aria-haspopup', true);
+
+                                               var $dropdown = $('<div class="redactor-dropdown redactor-dropdown-' + this.uuid + ' redactor-dropdown-box-' + btnName + '" style="display: none;">');
+                                               $button.data('dropdown', $dropdown);
+                                               this.dropdown.build(btnName, $dropdown, btnObject.dropdown);
+                                       }
+
+                                       this.button.buttons.push($button);
+
+                                       return $button;
+                               },
+                               setEvent: function($button, btnName, btnObject)
+                               {
+                                       $button.on('click', $.proxy(function(e)
+                                       {
+                                               if ($button.hasClass('redactor-button-disabled'))
+                                               {
+                                                       return false;
+                                               }
+
+                                               var type = 'func';
+                                               var callback = btnObject.func;
+
+                                               if (btnObject.command)
+                                               {
+                                                       type = 'command';
+                                                       callback = btnObject.command;
+                                               }
+                                               else if (btnObject.dropdown)
+                                               {
+                                                       type = 'dropdown';
+                                                       callback = false;
+                                               }
+
+                                               this.button.toggle(e, btnName, type, callback);
+
+                                               return false;
+
+                                       }, this));
+                               },
+                               toggle: function(e, btnName, type, callback, args)
+                               {
+                                       e.preventDefault();
+
+                                       if (this.browser.ie())
+                                       {
+                                               this.utils.freezeScroll();
+                                               e.returnValue = false;
+                                       }
+
+                                       if (type === 'command')
+                                       {
+                                               this.inline.format(callback);
+                                       }
+                                       else if (type === 'dropdown')
+                                       {
+                                               this.dropdown.show(e, btnName);
+                                       }
+                                       else
+                                       {
+                                               this.button.clickCallback(e, callback, btnName, args);
+                                       }
+
+                                       if (this.opts.air && type !== 'dropdown')
+                                       {
+                                               this.air.hide(e);
+                                       }
+
+                                       if (this.browser.ie())
+                                       {
+                                               this.utils.unfreezeScroll();
+                                       }
+                               },
+                               clickCallback: function(e, callback, btnName, args)
+                               {
+                                       var func;
+
+                                       args = (typeof args === 'undefined') ? btnName : args;
+
+                                       if ($.isFunction(callback))
+                                       {
+                                               callback.call(this, btnName);
+                                       }
+                                       else if (callback.search(/\./) !== '-1')
+                                       {
+                                               func = callback.split('.');
+                                               if (typeof this[func[0]] === 'undefined')
+                                               {
+                                                       return;
+                                               }
+
+                                               if (typeof args === 'object')
+                                               {
+                                                       this[func[0]][func[1]].apply(this, args);
+                                               }
+                                               else
+                                               {
+                                                       this[func[0]][func[1]].call(this, args);
+                                               }
+                                       }
+                                       else
+                                       {
+                                               if (typeof args === 'object')
+                                               {
+                                                       this[callback].apply(this, args);
+                                               }
+                                               else
+                                               {
+                                                       this[callback].call(this, args);
+                                               }
+                                       }
+
+                               },
+                               all: function()
+                               {
+                                       return this.button.buttons;
+                               },
+                               get: function(key)
+                               {
+                                       return this.button.toolbar().find('a.re-' + key);
+                               },
+                               set: function(key, title)
+                               {
+                                       var $btn = this.button.toolbar().find('a.re-' + key);
+
+                                       $btn.html(title).attr('aria-label', title);
+
+                                       return $btn;
+                               },
+                               add: function(key, title)
+                               {
+                                       if (this.button.isMobileUndoRedo(key))
+                                       {
+                                               return;
+                                       }
+
+                                       var btn = this.button.build(key, { title: title });
+
+                                       this.button.toolbar().append($('<li>').append(btn));
+
+                                       return btn;
+                               },
+                               addFirst: function(key, title)
+                               {
+                                       if (this.button.isMobileUndoRedo(key))
+                                       {
+                                               return;
+                                       }
+
+                                       var btn = this.button.build(key, { title: title });
+
+                                       this.button.toolbar().prepend($('<li>').append(btn));
+
+                                       return btn;
+                               },
+                               addAfter: function(afterkey, key, title)
+                               {
+                                       if (this.button.isMobileUndoRedo(key))
+                                       {
+                                               return;
+                                       }
+
+                                       var btn = this.button.build(key, { title: title });
+                                       var $btn = this.button.get(afterkey);
+
+                                       if ($btn.length !== 0)
+                                       {
+                                               $btn.parent().after($('<li>').append(btn));
+                                       }
+                                       else
+                                       {
+                                               this.button.toolbar().append($('<li>').append(btn));
+                                       }
+
+                                       return btn;
+                               },
+                               addBefore: function(beforekey, key, title)
+                               {
+                                       if (this.button.isMobileUndoRedo(key))
+                                       {
+                                               return;
+                                       }
+
+                                       var btn = this.button.build(key, { title: title });
+                                       var $btn = this.button.get(beforekey);
+
+                                       if ($btn.length !== 0)
+                                       {
+                                               $btn.parent().before($('<li>').append(btn));
+                                       }
+                                       else
+                                       {
+                                               this.button.toolbar().append($('<li>').append(btn));
+                                       }
+
+                                       return btn;
+                               },
+                               setIcon: function($btn, icon)
+                               {
+                                       $btn.html(icon);
+                               },
+                               addCallback: function($btn, callback)
+                               {
+                                       if (typeof $btn === 'undefined')
+                                       {
+                                               return;
+                                       }
+
+                                       var type = (callback === 'dropdown') ? 'dropdown' : 'func';
+                                       var key = $btn.attr('rel');
+                                       $btn.on('touchstart click', $.proxy(function(e)
+                                       {
+                                               if ($btn.hasClass('redactor-button-disabled'))
+                                               {
+                                                       return false;
+                                               }
+
+                                               this.button.toggle(e, key, type, callback);
+
+                                       }, this));
+                               },
+                               addDropdown: function($btn, dropdown)
+                               {
+                                       $btn.addClass('redactor-toolbar-link-dropdown').attr('aria-haspopup', true);
+
+                                       var key = $btn.attr('rel');
+                                       this.button.addCallback($btn, 'dropdown');
+
+                                       var $dropdown = $('<div class="redactor-dropdown redactor-dropdown-' + this.uuid + ' redactor-dropdown-box-' + key + '" style="display: none;">');
+                                       $btn.data('dropdown', $dropdown);
+
+                                       // build dropdown
+                                       if (dropdown)
+                                       {
+                                               this.dropdown.build(key, $dropdown, dropdown);
+                                       }
+
+                                       return $dropdown;
+                               },
+                               setActive: function(key)
+                               {
+                                       this.button.get(key).addClass('redactor-act');
+                               },
+                               setInactive: function(key)
+                               {
+                                       this.button.get(key).removeClass('redactor-act');
+                               },
+                               setInactiveAll: function(key)
+                               {
+                                       var $btns = this.button.toolbar().find('a.re-button');
+                                       if (typeof key !== 'undefined')
+                                       {
+                                               $btns = $btns.not('.re-' + key);
+                                       }
+
+                                       $btns.removeClass('redactor-act');
+                               },
+                               disableAll: function(key)
+                               {
+                                       var $btns = this.button.toolbar().find('a.re-button');
+                                       if (typeof key !== 'undefined')
+                                       {
+                                               $btns = $btns.not('.re-' + key);
+                                       }
+
+                                       $btns.addClass('redactor-button-disabled');
+                               },
+                               enableAll: function()
+                               {
+                                       this.button.toolbar().find('a.re-button').removeClass('redactor-button-disabled');
+                               },
+                               remove: function(key)
+                               {
+                                       this.button.get(key).remove();
+                               },
+                               isMobileUndoRedo: function(key)
+                               {
+                                       return (key === "undo" || key === "redo") && !this.utils.isDesktop();
+                               }
+                       };
+               },
+
+               // =caret
+               caret: function()
+               {
+                       return {
+                               set: function(node1, node2, end)
+                               {
+                                       this.core.editor().focus();
+
+                                       end = (typeof end === 'undefined') ? 0 : 1;
+
+                                       node1 = node1[0] || node1;
+                                       node2 = node2[0] || node2;
+
+                                       var sel = this.selection.get();
+                                       var range = this.selection.range(sel);
+
+                                       try
+                                       {
+                                               range.setStart(node1, 0);
+                                               range.setEnd(node2, end);
+                                       }
+                                       catch (e) {}
+
+                                       this.selection.update(sel, range);
+                               },
+                               prepare: function(node)
+                               {
+                                       // firefox focus
+                                       if (typeof this.start !== 'undefined')
+                                       {
+                                               this.core.editor().focus();
+                                       }
+
+                                       return node[0] || node;
+                               },
+                               start: function(node)
+                               {
+
+                                       var sel, range;
+                                       node = this.caret.prepare(node);
+
+                                       if (!node)
+                                       {
+                                               return;
+                                       }
+
+                                       if (node.tagName === 'BR')
+                                       {
+                                               return this.caret.before(node);
+                                       }
+
+                                       // empty or inline tag
+                                       var inline = this.utils.isInlineTag(node.tagName);
+                                       if (node.innerHTML === '' || inline)
+                                       {
+                                           range = document.createRange();
+                                               var textNode = document.createTextNode('\u200B');
+
+                                               range.setStart(node, 0);
+                                               range.insertNode(textNode);
+                                               range.setStartAfter(textNode);
+                                               range.collapse(true);
+                                               sel = window.getSelection();
+                                               sel.removeAllRanges();
+                                               sel.addRange(range);
+
+                                               // remove invisible text node
+                                               if (!inline)
+                                               {
+                                                       this.core.editor().on('keydown.redactor-remove-textnode', function()
+                                                       {
+                                                               $(textNode).remove();
+                                                               $(this).off('keydown.redactor-remove-textnode');
+                                                       });
+                                               }
+                                       }
+                                       // block tag
+                                       else
+                                       {
+                                               sel = window.getSelection();
+                                               sel.removeAllRanges();
+
+                                               range = document.createRange();
+                                               range.selectNodeContents(node);
+                                               range.collapse(true);
+                                               sel.addRange(range);
+
+                                       }
+
+
+                               },
+                               end: function(node)
+                               {
+                                       var sel, range;
+                                       node = this.caret.prepare(node);
+
+                                       if (!node)
+                                       {
+                                               return;
+                                       }
+
+                                       // empty node
+                                       if (node.tagName !== 'BR' && node.innerHTML === '')
+                                       {
+                                               return this.caret.start(node);
+                                       }
+
+                                       // br
+                                       if (node.tagName === 'BR')
+                                       {
+                                               var space = document.createElement('span');
+                                               space.className = 'redactor-invisible-space';
+                                               space.innerHTML = '&#x200b;';
+
+                                               $(node).after(space);
+
+                                               sel = window.getSelection();
+                                               sel.removeAllRanges();
+
+                                               range = document.createRange();
+
+                                               range.setStartBefore(space);
+                                               range.setEndBefore(space);
+                                               sel.addRange(range);
+
+                                               $(space).replaceWith(function()
+                                               {
+                                                       return $(this).contents();
+                                               });
+
+                                               return;
+                                       }
+
+                                       if (node.lastChild && node.lastChild.nodeType === 1)
+                                       {
+                                               return this.caret.after(node.lastChild);
+                                       }
+
+                                       sel = window.getSelection();
+                                       sel.removeAllRanges();
+
+                                       range = document.createRange();
+                                       range.selectNodeContents(node);
+                                       range.collapse(false);
+                                       sel.addRange(range);
+                               },
+                               after: function(node)
+                               {
+                                       var sel, range;
+                                       node = this.caret.prepare(node);
+
+
+                                       if (!node)
+                                       {
+                                               return;
+                                       }
+
+                                       if (node.tagName === 'BR')
+                                       {
+                                               return this.caret.end(node);
+                                       }
+
+                                       // block tag
+                                       if (this.utils.isBlockTag(node.tagName))
+                                       {
+                                               var next = this.caret.next(node);
+
+                                               if (typeof next === 'undefined')
+                                               {
+                                                       this.caret.end(node);
+                                               }
+                                               else
+                                               {
+                                                       // table
+                                                       if (next.tagName === 'TABLE')
+                                                       {
+                                                               next = $(next).find('th, td').first()[0];
+                                                       }
+                                                       // list
+                                                       else if (next.tagName === 'UL' || next.tagName === 'OL')
+                                                       {
+                                                               next = $(next).find('li').first()[0];
+                                                       }
+
+                                                       this.caret.start(next);
+                                               }
+
+                                               return;
+                                       }
+
+                                       // inline tag
+                                       var textNode = document.createTextNode('\u200B');
+
+                                       sel = window.getSelection();
+                                       sel.removeAllRanges();
+
+                                       range = document.createRange();
+                                       range.setStartAfter(node);
+                                       range.insertNode(textNode);
+                                       range.setStartAfter(textNode);
+                                       range.collapse(true);
+
+                                       sel.addRange(range);
+
+                               },
+                               before: function(node)
+                               {
+                                       var sel, range;
+                                       node = this.caret.prepare(node);
+
+
+                                       if (!node)
+                                       {
+                                               return;
+                                       }
+
+                                       // block tag
+                                       if (this.utils.isBlockTag(node.tagName))
+                                       {
+                                               var prev = this.caret.prev(node);
+
+                                               if (typeof prev === 'undefined')
+                                               {
+                                                       this.caret.start(node);
+                                               }
+                                               else
+                                               {
+                                                       // table
+                                                       if (prev.tagName === 'TABLE')
+                                                       {
+                                                               prev = $(prev).find('th, td').last()[0];
+                                                       }
+                                                       // list
+                                                       else if (prev.tagName === 'UL' || prev.tagName === 'OL')
+                                                       {
+                                                               prev = $(prev).find('li').last()[0];
+                                                       }
+
+                                                       this.caret.end(prev);
+                                               }
+
+                                               return;
+                                       }
+
+                                       // inline tag
+                                       sel = window.getSelection();
+                                       sel.removeAllRanges();
+
+                                       range = document.createRange();
+
+                               range.setStartBefore(node);
+                               range.collapse(true);
+
+                               sel.addRange(range);
+                               },
+                               next: function(node)
+                               {
+                                       var $next = $(node).next();
+                                       if ($next.hasClass('redactor-script-tag, redactor-selection-marker'))
+                                       {
+                                               return $next.next()[0];
+                                       }
+                                       else
+                                       {
+                                               return $next[0];
+                                       }
+                               },
+                               prev: function(node)
+                               {
+                                       var $prev = $(node).prev();
+                                       if ($prev.hasClass('redactor-script-tag, redactor-selection-marker'))
+                                       {
+                                               return $prev.prev()[0];
+                                       }
+                                       else
+                                       {
+                                               return $prev[0];
+                                       }
+                               },
+                               offset: function(node)
+                               {
+                                       var sel, range, cloned;
+
+                                       if (typeof node === 'undefined')
+                                       {
+                                           sel = this.selection.get();
+                                               range = this.selection.range(sel);
+
+                                       cloned = range.cloneRange();
+                                       cloned.selectNodeContents(this.$editor[0]);
+                                       cloned.setEnd(range.endContainer, range.endOffset);
+
+                                               return $.trim(cloned.toString().replace(/\u200B/g, '')).length;
+                                       }
+                                       else
+                                       {
+                                               node = node[0] || node;
+
+                                               sel = this.selection.get();
+                                               range = this.selection.range(sel);
+
+                                               cloned = range.cloneRange();
+                                               cloned.selectNodeContents(node);
+                                               cloned.setEnd(range.endContainer, range.endOffset);
+
+
+                                               return $.trim(cloned.toString().replace(/\u200B/g, '')).length;
+                                       }
+                               }
+
+                       };
+               },
+
+               // =clean
+               clean: function()
+               {
+                       return {
+                               onSet: function(html)
+                               {
+                                       html = this.clean.savePreCode(html);
+                                       html = this.clean.saveFormTags(html);
+
+                                       // convert script tag
+                                       if (this.opts.script)
+                                       {
+                                               html = html.replace(/<script(.*?[^>]?)>([\w\W]*?)<\/script>/gi, '<pre class="redactor-script-tag" $1>$2</pre>');
+                                       }
+
+                                       // converting entity
+                                       html = html.replace(/\$/g, '&#36;');
+                                       html = html.replace(/&amp;/g, '&');
+
+                                       // replace special characters in links
+                                       html = html.replace(/<a href="(.*?[^>]?)®(.*?[^>]?)">/gi, '<a href="$1&reg$2">');
+
+                                       // replace tags
+                                       var self = this;
+                                       var $div = $("<div/>").html($.parseHTML(html, document, true));
+                                       var replacement = {
+                                               'b': 'strong',
+                                               'i': 'em',
+                                               'strike': 'del'
+                                       };
+
+                                       $div.find('b, i, strike').replaceWith(function()
+                                       {
+                                               return self.utils.replaceToTag(this, replacement[this.tagName.toLowerCase()]);
+                                       });
+
+                                       html = $div.html();
+
+                                       // remove tags
+                                       var tags = ['font', 'html', 'head', 'link', 'body', 'meta', 'applet', 'span'];
+                                       if (!this.opts.script)
+                                       {
+                                               tags.push('script');
+                                       }
+
+                                       html = this.clean.stripTags(html, tags);
+
+                                       // remove html comments
+                                       html = html.replace(/<!--[\s\S]*?-->/gi, '');
+
+                                       // paragraphize
+                                       html = this.paragraphize.load(html);
+
+                                       // empty
+                                       if (html.search(/^(||\s||<br\s?\/?>||&nbsp;)$/i) !== -1)
+                                       {
+                                               return this.opts.emptyHtml;
+                                       }
+
+                                       return html;
+                               },
+                               onGet: function(html)
+                               {
+                                       return this.clean.onSync(html);
+                               },
+                               onSync: function(html)
+                               {
+                                       // remove spaces
+                                       html = html.replace(/\u200B/g, '');
+                                       html = html.replace(/&#x200b;/gi, '');
+                                       html = html.replace(/&nbsp;/gi, ' ');
+
+                                       if (html.search(/^<p>(||\s||<br\s?\/?>||&nbsp;)<\/p>$/i) !== -1)
+                                       {
+                                               return '';
+                                       }
+
+                                       var $div = $("<div/>").html($.parseHTML(html, document, true));
+
+                                       // remove empty atributes
+                                       $div.find('*[style=""]').removeAttr('style');
+                                       $div.find('*[class=""]').removeAttr('class');
+                                       $div.find('*[rel=""]').removeAttr('rel');
+
+                                       // remove markers
+                                       $div.find('.redactor-invisible-space').each(function()
+                                       {
+                                               $(this).contents().unwrap();
+                                       });
+
+                                       // remove span
+                                       $div.find('span').each(function()
+                                       {
+                                               $(this).contents().unwrap();
+                                       });
+
+                                       $div.find('.redactor-selection-marker, #redactor-insert-marker').remove();
+
+                                       html = $div.html();
+
+                                       // reconvert script tag
+                                       if (this.opts.script)
+                                       {
+                                               html = html.replace(/<pre class="redactor-script-tag"(.*?[^>]?)>([\w\W]*?)<\/pre>/gi, '<script$1>$2</script>');
+                                       }
+
+                                       // restore form tag
+                                       html = this.clean.restoreFormTags(html);
+
+                                       // remove br in|of li/header tags
+                                       html = html.replace(new RegExp('<br\\s?/?></h', 'gi'), '</h');
+                                       html = html.replace(new RegExp('<br\\s?/?></li>', 'gi'), '</li>');
+                                       html = html.replace(new RegExp('</li><br\\s?/?>', 'gi'), '</li>');
+
+                                       // pre class
+                                       if (this.opts.preClass)
+                                       {
+                                               html = html.replace(/<pre>/gi, '<pre class="' + this.opts.preClass + '">');
+                                       }
+
+                                       // link nofollow
+                                       if (this.opts.linkNofollow)
+                                       {
+                                               html = html.replace(/<a(.*?)rel="nofollow"(.*?[^>])>/gi, '<a$1$2>');
+                                               html = html.replace(/<a(.*?[^>])>/gi, '<a$1 rel="nofollow">');
+                                       }
+
+                                       // replace special characters
+                                       var chars = {
+                                               '\u2122': '&trade;',
+                                               '\u00a9': '&copy;',
+                                               '\u2026': '&hellip;',
+                                               '\u2014': '&mdash;',
+                                               '\u2010': '&dash;'
+                                       };
+
+                                       $.each(chars, function(i,s)
+                                       {
+                                               html = html.replace(new RegExp(i, 'g'), s);
+                                       });
+
+                                       html = html.replace(/&amp;/g, '&');
+
+                                       return html;
+                               },
+                               onPaste: function(html, insert)
+                               {
+                                       var blocks = this.selection.blocks();
+
+                                       this.paste.text = false;
+                                       this.insert.gap = false;
+
+                                       html = $.trim(html);
+
+                                       if (insert !== true)
+                                       {
+                                               html = html.replace(/</g, '&lt;');
+                                               html = html.replace(/>/g, '&gt;');
+                                       }
+
+                                       if (this.opts.enterKey === false || this.opts.type === 'inline' || (blocks.length === 1 && this.utils.isCurrentOrParent(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li', 'a', 'figcaption'])))
+                                       {
+                                               this.paste.text = true;
+
+                                               if (typeof insert !== 'undefined')
+                                               {
+                                                       html = this.clean.getPlainText(html);
+                                               }
+
+                                               return html;
+                                       }
+                                       else if (blocks.length === 1 && this.utils.isCurrentOrParent(['th', 'td', 'blockquote']))
+                                       {
+                                               if (typeof insert !== 'undefined')
+                                               {
+                                                       html = html.replace(/<br\s?\/?>|<\/H[1-6]>|<\/p>|<\/div>|<\/li>|<\/td>/gi, '\n');
+                                                       html = this.clean.getPlainText(html);
+                                               }
+
+                                               html = html.replace(/\n/g, '<br />');
+
+                                               return html;
+                                       }
+                                       else if (this.opts.type === 'pre' || (blocks.length === 1 && this.utils.isCurrentOrParent('pre')))
+                                       {
+
+                                               html = html.replace(/”/g, '"');
+                                               html = html.replace(/“/g, '"');
+                                               html = html.replace(/‘/g, '\'');
+                                               html = html.replace(/’/g, '\'');
+                                               html = this.clean.encodeEntities(html);
+
+                                               return html;
+                                       }
+
+                                       this.paste.text = false;
+                                       this.insert.gap = true;
+
+                                       // if no block level tags
+                                       if (typeof insert !== 'undefined')
+                                       {
+                                               var match1 = html.match(new RegExp('</(' + this.opts.blockTags.join('|' ).toUpperCase() + ')>', 'gi'));
+                                               var match2 = html.match(new RegExp('<hr\s?/?>', 'gi'));
+                                               if (match1 === null && match2 === null)
+                                               {
+                                                       this.insert.gap = false;
+
+                                                       return html;
+                                               }
+                                       }
+
+                                       // if text as single line
+                                       var singleLine = false;
+                                       if (!this.utils.isSelectAll())
+                                       {
+                                               var matchBR = html.match(/<br\s?\/?>/gi);
+                                               var matchNL = html.match(/\n/gi);
+                                               if (!matchBR && !matchNL)
+                                               {
+                                                       singleLine = true;
+                                               }
+                                       }
+
+                                       if (singleLine)
+                                       {
+                                               this.paste.text = true;
+                                       }
+                                       else
+                                       {
+                                               html = this.paragraphize.load(html);
+                                       }
+
+                                       return html;
+                               },
+                               getPlainText: function(html)
+                               {
+                                       var tmp = document.createElement('div');
+                                       tmp.innerHTML = html;
+                                       html = tmp.textContent || tmp.innerText;
+
+                                       return $.trim(html);
+                               },
+                               savePreCode: function(html)
+                               {
+                                       html = this.clean.savePreFormatting(html);
+                                       html = this.clean.saveCodeFormatting(html);
+
+                                       return html;
+                               },
+                               savePreFormatting: function(html)
+                               {
+                                       var pre = html.match(/<pre(.*?)>([\w\W]*?)<\/pre>/gi);
+                                       if (pre === null)
+                                       {
+                                               return html;
+                                       }
+
+                                       $.each(pre, $.proxy(function(i,s)
+                                       {
+                                               var arr = s.match(/<pre(.*?)>([\w\W]*?)<\/pre>/i);
+
+                                               arr[2] = arr[2].replace(/<br\s?\/?>/g, '\n');
+                                               arr[2] = arr[2].replace(/&nbsp;/g, ' ');
+
+                                               if (this.opts.preSpaces)
+                                               {
+                                                       arr[2] = arr[2].replace(/\t/g, new Array(this.opts.preSpaces + 1).join(' '));
+                                               }
+
+                                               arr[2] = this.clean.encodeEntities(arr[2]);
+
+                                               // $ fix
+                                               arr[2] = arr[2].replace(/\$/g, '&#36;');
+
+                                               html = html.replace(s, '<pre' + arr[1] + '>' + arr[2] + '</pre>');
+
+                                       }, this));
+
+                                       return html;
+                               },
+                               saveCodeFormatting: function(html)
+                               {
+                                       var code = html.match(/<code(.*?)>([\w\W]*?)<\/code>/gi);
+                                       if (code === null)
+                                       {
+                                               return html;
+                                       }
+
+                                       $.each(code, $.proxy(function(i,s)
+                                       {
+                                               var arr = s.match(/<code(.*?)>([\w\W]*?)<\/code>/i);
+
+                                               arr[2] = arr[2].replace(/&nbsp;/g, ' ');
+                                               arr[2] = this.clean.encodeEntities(arr[2]);
+                                               arr[2] = arr[2].replace(/\$/g, '&#36;');
+
+                                               html = html.replace(s, '<code' + arr[1] + '>' + arr[2] + '</code>');
+
+                                       }, this));
+
+                                       return html;
+                               },
+                               saveFormTags: function(html)
+                               {
+                                       return html.replace(/<form(.*?)>([\w\W]*?)<\/form>/gi, '<section$1 rel="redactor-form-tag">$2</section>');
+                               },
+                               restoreFormTags: function(html)
+                               {
+                                       return html.replace(/<section(.*?) rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi, '<form$1$2>$3</form>');
+                               },
+                               encodeEntities: function(str)
+                               {
+                                       str = String(str).replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '"');
+                                       str = str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
+
+                                       return str;
+                               },
+                               stripTags: function(input, denied)
+                               {
+                                       if (typeof denied === 'undefined')
+                                       {
+                                               return input.replace(/(<([^>]+)>)/gi, '');
+                                       }
+
+                                   var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;
+
+                                   return input.replace(tags, function ($0, $1)
+                                   {
+                                       return denied.indexOf($1.toLowerCase()) === -1 ? $0 : '';
+                                   });
+                               },
+                               removeMarkers: function(html)
+                               {
+                                       return html.replace(/<span(.*?[^>]?)class="redactor-selection-marker"(.*?[^>]?)>([\w\W]*?)<\/span>/gi, '');
+                               },
+                               removeSpaces: function(html)
+                               {
+                                       html = $.trim(html);
+                                       html = html.replace(/\n/g, '');
+                                       html = html.replace(/[\t]*/g, '');
+                                       html = html.replace(/\n\s*\n/g, "\n");
+                                       html = html.replace(/^[\s\n]*/g, ' ');
+                                       html = html.replace(/[\s\n]*$/g, ' ');
+                                       html = html.replace( />\s{2,}</g, '> <'); // between inline tags can be only one space
+                                       html = html.replace(/\n\n/g, "\n");
+                                       html = html.replace(/\u200B/g, '');
+
+                                       return html;
+                               },
+                               removeSpacesHard: function(html)
+                               {
+                                       html = $.trim(html);
+                                       html = html.replace(/\n/g, '');
+                                       html = html.replace(/[\t]*/g, '');
+                                       html = html.replace(/\n\s*\n/g, "\n");
+                                       html = html.replace(/^[\s\n]*/g, '');
+                                       html = html.replace(/[\s\n]*$/g, '');
+                                       html = html.replace( />\s{2,}</g, '><');
+                                       html = html.replace(/\n\n/g, "\n");
+                                       html = html.replace(/\u200B/g, '');
+
+                                       return html;
+                               }
+                       };
+               },
+
+               // =code
+               code: function()
+               {
+                       return {
+                               syncFire: true,
+                               html: false,
+                               start: function(html)
+                               {
+                                       html = $.trim(html);
+
+                                       // clean
+                                       if (this.opts.type === 'textarea')
+                                       {
+                                               html = this.clean.onSet(html);
+                                       }
+
+                                       this.events.stopDetect();
+                                       this.core.editor().html(html);
+                                       this.events.startDetect();
+                               },
+                               set: function(html)
+                               {
+                                       html = $.trim(html);
+
+                                       // clean
+                                       if (this.opts.type === 'textarea')
+                                       {
+                                               html = this.clean.onSet(html);
+                                       }
+
+                                       this.core.editor().html(html);
+                                       this.focus.end();
+                               },
+                               get: function()
+                               {
+                                       if (this.opts.type === 'textarea')
+                                       {
+                                               return this.core.textarea().val();
+                                       }
+                                       else
+                                       {
+                                               var html = this.core.editor().html();
+
+                                               // clean
+                                               html = this.clean.onGet(html);
+
+                                               return html;
+                                       }
+                               },
+                               sync: function()
+                               {
+                                       if (!this.code.syncFire)
+                                       {
+                                               return;
+                                       }
+
+                                       var html = this.core.editor().html();
+                                       var htmlCleaned = this.code.cleaned(html);
+
+                                       // is there a need to synchronize
+                                       if (this.code.isSync(htmlCleaned))
+                                       {
+                                               // do not sync
+                                               return;
+                                       }
+
+                                       // save code
+                                       this.code.html = htmlCleaned;
+
+                                       if (this.opts.type !== 'textarea')
+                                       {
+                                               this.core.callback('sync', html);
+                                               this.core.callback('change', html);
+                                               return;
+                                       }
+
+                                       if (this.opts.type === 'textarea')
+                                       {
+                                               setTimeout($.proxy(function()
+                                               {
+                                                       this.code.startSync(html);
+                                               }, this), 10);
+                                       }
+                               },
+                               startSync: function(html)
+                               {
+                                       // before clean callback
+                                       html = this.core.callback('syncBefore', html);
+
+                                       // clean
+                                       html = this.clean.onSync(html);
+
+                                       // set code
+                                       this.core.textarea().val(html);
+
+                                       // after sync callback
+                                       this.core.callback('sync', html);
+
+                                       // change callback
+                                       if (this.start === false)
+                                       {
+                                               this.core.callback('change', html);
+                                       }
+
+                                       this.start = false;
+                               },
+                               isSync: function(htmlCleaned)
+                               {
+                                       return (this.code.html && this.code.html === htmlCleaned);
+
+                               },
+                               cleaned: function(html)
+                               {
+                                       html = this.clean.removeSpaces(html);
+                                       return this.clean.removeMarkers(html);
+                               }
+                       };
+               },
+
+               // =core
+               core: function()
+               {
+                       return {
+                               id: function()
+                               {
+                                       return this.$editor.attr('id');
+                               },
+                               element: function()
+                               {
+                                       return this.$element;
+                               },
+                               editor: function()
+                               {
+                                       return this.$editor;
+                               },
+                               textarea: function()
+                               {
+                                       return this.$textarea;
+                               },
+                               box: function()
+                               {
+                                       return (this.opts.type === 'textarea') ? this.$box : this.$element;
+                               },
+                               toolbar: function()
+                               {
+                                       return (this.$toolbar) ? this.$toolbar : false;
+                               },
+                               air: function()
+                               {
+                                       return (this.$air) ? this.$air : false;
+                               },
+                               object: function()
+                               {
+                                       return $.extend({}, this);
+                               },
+                               structure: function()
+                               {
+                                       this.core.editor().toggleClass('redactor-structure');
+                               },
+                               addEvent: function(name)
+                               {
+                                       this.core.event = name;
+                               },
+                               getEvent: function()
+                               {
+                                       return this.core.event;
+                               },
+                               callback: function(type, e, data)
+                               {
+                                       var eventNamespace = 'redactor';
+                                       var returnValue = false;
+                                       var events = $._data(this.core.element()[0], 'events');
+
+                                       // on callback
+                                       if (typeof events !== 'undefined' && typeof events[type] !== 'undefined')
+                                       {
+                                               var len = events[type].length;
+                                               for (var i = 0; i < len; i++)
+                                               {
+                                                       var namespace = events[type][i].namespace;
+                                                       if (namespace === 'callback.' + eventNamespace)
+                                                       {
+                                                               var handler = events[type][i].handler;
+                                                               var args = (typeof data === 'undefined') ? [e] : [e, data];
+                                                               returnValue = (typeof args === 'undefined') ? handler.call(this, e) : handler.call(this, e, args);
+                                                       }
+                                               }
+                                       }
+
+                                       if (returnValue)
+                                       {
+                                               return returnValue;
+                                       }
+
+                                       // no callback
+                                       if (typeof this.opts.callbacks[type] === 'undefined')
+                                       {
+                                               return (typeof data === 'undefined') ? e : data;
+                                       }
+
+                                       // callback
+                                       var callback = this.opts.callbacks[type];
+
+                                       if ($.isFunction(callback))
+                                       {
+                                               return (typeof data === 'undefined') ? callback.call(this, e) : callback.call(this, e, data);
+                                       }
+                                       else
+                                       {
+                                               return (typeof data === 'undefined') ? e : data;
+                                       }
+                               },
+                               destroy: function()
+                               {
+                                       this.opts.destroyed = true;
+
+                                       this.core.callback('destroy');
+
+                                       // custom toolbar
+                                       $('.redactor-data-cmd').off('click.redactor-data-cmd').removeClass('redactor-data-cmd');
+
+                                       // placeholder style
+                                       $('.redactor-style-tag').remove();
+
+                                       // help label
+                                       $('#redactor-voice-' + this.uuid).remove();
+
+                                       this.core.editor().removeClass('redactor-in');
+
+                                       // structure class
+                                       this.core.editor().removeClass('redactor-structure');
+
+                                       // caret service
+                                       this.core.editor().off('keydown.redactor-remove-textnode');
+
+                                       // observer
+                                       this.observer.disconnect();
+
+                                       // off events and remove data
+                                       this.$element.off('.redactor').removeData('redactor');
+                                       this.core.editor().off('.redactor');
+
+                                       $(document).off('.redactor-air.' + this.uuid);
+                                       $(document).off('mousedown.redactor-blur.' + this.uuid);
+                                       $(document).off('mousedown.redactor.' + this.uuid);
+                                       $(document).off('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid);
+                                       $(window).off('.redactor-toolbar.' + this.uuid);
+                                       $("body").off('scroll.redactor.' + this.uuid);
+
+                                       $(this.opts.toolbarFixedTarget).off('scroll.redactor.' + this.uuid);
+
+                                       // plugins events
+                                       var self = this;
+                                       $.each(this.opts.plugins, function(i,s)
+                                       {
+                                               $(window).off('.redactor-plugin-' + s);
+                                               $(document).off('.redactor-plugin-' + s);
+                                               $("body").off('.redactor-plugin-' + s);
+                                               self.core.editor().off('.redactor-plugin-' + s);
+                                       });
+
+                                       // click to edit
+                                       this.$element.off('click.redactor-click-to-edit');
+                                       this.$element.removeClass('redactor-click-to-edit');
+
+                                       // common
+                                       this.core.editor().removeClass('redactor-editor redactor-linebreaks redactor-placeholder');
+                                       this.core.editor().removeAttr('contenteditable');
+
+                                       var html = this.code.get();
+
+                                       if (this.opts.toolbar && this.$toolbar)
+                                       {
+                                               // dropdowns off
+                                               this.$toolbar.find('a').each(function()
+                                               {
+                                                       var $el = $(this);
+                                                       if ($el.data('dropdown'))
+                                                       {
+                                                               $el.data('dropdown').remove();
+                                                               $el.data('dropdown', {});
+                                                       }
+                                               });
+                                       }
+
+                                       if (this.opts.type === 'textarea')
+                                       {
+                                               this.$box.after(this.$element);
+                                               this.$box.remove();
+                                               this.$element.val(html).show();
+                                       }
+
+                                       // air
+                                       if (this.opts.air)
+                                       {
+                                               this.$air.remove();
+                                       }
+
+                                       if (this.opts.toolbar && this.$toolbar)
+                                       {
+                                               this.$toolbar.remove();
+                                       }
+
+                                       // modal
+                                       if (this.$modalBox)
+                                       {
+                                               this.$modalBox.remove();
+                                       }
+
+                                       if (this.$modalOverlay)
+                                       {
+                                               this.$modalOverlay.remove();
+                                       }
+
+                                       // hide link's tooltip
+                                       $('.redactor-link-tooltip').remove();
+
+                                       // autosave
+                                       clearInterval(this.autosaveTimeout);
+                               }
+                       };
+               },
+
+               // =dropdown
+               dropdown: function()
+               {
+                       return {
+                               build: function(name, $dropdown, dropdownObject)
+                               {
+                                       if (name === 'format' && this.opts.formattingAdd)
+                                       {
+                                               $.each(this.opts.formattingAdd, $.proxy(function(i,s)
+                                               {
+                                                       var func;
+                                                       var type = (this.utils.isBlockTag(s.args[0])) ? 'block' : 'inline';
+
+                                                       if (type === 'block')
+                                                       {
+                                                               func = 'block.format';
+                                                       }
+                                                       else
+                                                       {
+                                                               func = 'inline.format';
+                                                       }
+
+                                                       dropdownObject[i] = {
+                                                               func: func,
+                                                               args: s.args,
+                                                               title: s.title
+                                                       };
+
+                                               }, this));
+                                       }
+
+                                       $.each(dropdownObject, $.proxy(function(btnName, btnObject)
+                                       {
+                                               var $item = $('<a href="#" class="redactor-dropdown-' + btnName + '" role="button">' + btnObject.title + '</a>');
+
+                                               $item.on('click', $.proxy(function(e)
+                                               {
+                                                       e.preventDefault();
+
+                                                       var type = 'func';
+                                                       var callback = btnObject.func;
+                                                       if (btnObject.command)
+                                                       {
+                                                               type = 'command';
+                                                               callback = btnObject.command;
+                                                       }
+                                                       else if (btnObject.dropdown)
+                                                       {
+                                                               type = 'dropdown';
+                                                               callback = btnObject.dropdown;
+                                                       }
+
+                                                       if ($(e.target).hasClass('redactor-dropdown-link-inactive'))
+                                                       {
+                                                               return;
+                                                       }
+
+                                                       if (typeof btnObject.args !== ' undefined')
+                                                       {
+                                                               this.button.toggle(e, btnName, type, callback, btnObject.args);
+                                                       }
+                                                       else
+                                                       {
+                                                               this.button.toggle(e, btnName, type, callback);
+                                                       }
+
+                                                       this.dropdown.hideAll();
+
+
+                                               }, this));
+
+                                               this.observe.addDropdown($item, btnName, btnObject);
+                                               $dropdown.attr('rel', name).append($item);
+
+                                       }, this));
+                               },
+                               show: function(e, key)
+                               {
+                                       this.core.editor().focus();
+
+                                       var $button = this.button.get(key);
+
+                                       // Always re-append it to the end of <body> so it always has the highest sub-z-index.
+                                       var $dropdown = $button.data('dropdown').appendTo(document.body);
+
+                                       if ($button.hasClass('dropact'))
+                                       {
+                                               this.dropdown.hideAll();
+                                       }
+                                       else
+                                       {
+                                               this.dropdown.hideAll();
+
+                                               this.core.callback('dropdownShow', { dropdown: $dropdown, key: key, button: $button });
+
+                                               this.button.setActive(key);
+
+                                               $button.addClass('dropact');
+
+                                               var keyPosition = $button.offset();
+
+                                               // fix right placement
+                                               var dropdownWidth = $dropdown.width();
+                                               if ((keyPosition.left + dropdownWidth) > $(document).width())
+                                               {
+                                                       keyPosition.left = Math.max(0, keyPosition.left - dropdownWidth);
+                                               }
+
+                                               var top;
+                                               var left = keyPosition.left + 'px';
+
+                                               // fixed toolbar
+                                               if (this.button.toolbar().hasClass('toolbar-fixed-box'))
+                                               {
+                                                       top = $button.position().top + $button.innerHeight() + this.opts.toolbarFixedTopOffset;
+
+                                                       var position = 'fixed';
+                                                       if (this.opts.toolbarFixedTarget !== document)
+                                                       {
+                                                               top = ($button.innerHeight() + this.$toolbar.offset().top) + this.opts.toolbarFixedTopOffset;
+                                                               position = 'absolute';
+                                                       }
+
+                                                       $dropdown.css({ position: position, left: left, top: top + 'px' }).slideDown(300);
+                                               }
+                                               else
+                                               {
+                                                       top = ($button.innerHeight() + keyPosition.top) + 'px';
+                                                       $dropdown.css({ position: 'absolute', left: left, top: top }).slideDown(300);
+                                               }
+
+                                               this.core.callback('dropdownShown', { dropdown: $dropdown, key: key, button: $button });
+
+                                               this.$dropdown = $dropdown;
+                                       }
+
+
+                                       $(document).one('click.redactor-dropdown', $.proxy(this.dropdown.hide, this));
+                                       this.$editor.one('click.redactor-dropdown', $.proxy(this.dropdown.hide, this));
+                                       $(document).one('keyup.redactor-dropdown', $.proxy(this.dropdown.closeHandler, this));
+
+                                       // disable scroll whan dropdown scroll
+                                       $dropdown.on('mouseover.redactor-dropdown', $.proxy(this.utils.disableBodyScroll, this));
+                                       $dropdown.on('mouseout.redactor-dropdown', $.proxy(this.utils.enableBodyScroll, this));
+
+
+                                       e.stopPropagation();
+                               },
+                               closeHandler: function(e)
+                               {
+                                       if (e.which !== this.keyCode.ESC)
+                                       {
+                                               return;
+                                       }
+
+                                       this.dropdown.hideAll();
+                                       this.core.editor().focus();
+                               },
+                               hideAll: function()
+                               {
+                                       this.button.toolbar().find('a.dropact').removeClass('redactor-act').removeClass('dropact');
+
+                                       this.utils.enableBodyScroll();
+
+                                       $('.redactor-dropdown-' + this.uuid).slideUp(200);
+                                       $('.redactor-dropdown-link-selected').removeClass('redactor-dropdown-link-selected');
+
+
+                                       if (this.$dropdown)
+                                       {
+                                               this.$dropdown.off('.redactor-dropdown');
+                                               this.core.callback('dropdownHide', this.$dropdown);
+
+                                               this.$dropdown = false;
+                                       }
+                               },
+                               hide: function (e)
+                               {
+                                       var $dropdown = $(e.target);
+
+                                       if (!$dropdown.hasClass('dropact') && !$dropdown.hasClass('redactor-dropdown-link-inactive'))
+                                       {
+                                               $dropdown.removeClass('dropact');
+                                               $dropdown.off('mouseover mouseout');
+
+                                               this.dropdown.hideAll();
+                                       }
+                               }
+                       };
+               },
+
+               // =events
+               events: function()
+               {
+                       return {
+                               focused: false,
+                               blured: true,
+                               stop: false,
+                               stopDetect: function()
+                               {
+                                       this.events.stop = true;
+                               },
+                               startDetect: function()
+                               {
+                                       var self = this;
+                                       setTimeout(function()
+                                       {
+                                               self.events.stop = false;
+                                       }, 1);
+                               },
+                               init: function()
+                               {
+                                       // drop
+                                       this.core.editor().on('dragover.redactor dragenter.redactor', function(e)
+                                       {
+                                               e.preventDefault();
+                                               e.stopPropagation();
+                                   });
+
+                                       this.core.editor().on('drop.redactor', $.proxy(function(e)
+                                       {
+                                               e = e.originalEvent || e;
+
+                                               if (this.opts.type === 'inline' || this.opts.type === 'pre')
+                                               {
+                                                       e.preventDefault();
+                                                       return false;
+                                               }
+
+                                               if (window.FormData === undefined || !e.dataTransfer)
+                                               {
+                                                       return true;
+                                               }
+
+                                               if (e.dataTransfer.files.length === 0)
+                                               {
+                                                       return this.events.drop(e);
+                                               }
+                                               else
+                                               {
+                                                       this.events.dropUpload(e);
+                                               }
+
+                                               this.core.callback('drop', e);
+
+                                       }, this));
+
+                                       // click
+                                       this.core.editor().on('click.redactor', $.proxy(function(e)
+                                       {
+                                               var event = this.core.getEvent();
+                                               var type = (event === 'click' || event === 'arrow') ? false : 'click';
+
+                                               this.core.addEvent(type);
+                                               this.utils.disableSelectAll();
+                                               this.core.callback('click', e);
+
+                                       }, this));
+
+                                       // paste
+                                       this.core.editor().on('paste.redactor', $.proxy(this.paste.init, this));
+
+                                       // keydown
+                                       this.core.editor().on('keydown.redactor', $.proxy(this.keydown.init, this));
+
+                                       // keyup
+                                       this.core.editor().on('keyup.redactor', $.proxy(this.keyup.init, this));
+
+                                       // change
+                                       this.events.changeHandler = $.proxy(function()
+                                       {
+                                               if (this.events.stop)
+                                               {
+                                                       return;
+                                               }
+
+                                               this.code.sync();
+
+                                               // autosave
+                                               if (this.autosave.is())
+                                               {
+                                                       clearTimeout(this.autosaveTimeout);
+                                                       this.autosaveTimeout = setTimeout($.proxy(this.autosave.send, this), 300);
+                                               }
+
+                                       }, this);
+
+                                       // observer
+                                       var self = this;
+                                       this.observer = new MutationObserver(function(mutations) {
+                                         mutations.forEach(function(mutation) {
+
+                                                       self.image.detectRemoved(self, mutation);
+                                                       self.events.changeHandler();
+
+                                         });
+                                       });
+
+                                       // pass in the target node, as well as the observer options
+                                       this.observer.observe(this.core.editor()[0], {
+                                                subtree: true,
+                                                attributes: true,
+                                                childList: true,
+                                                characterData: true,
+                                                characterDataOldValue: true
+                                       });
+
+                                       // focus
+                                       this.core.editor().on('focus.redactor', $.proxy(function(e)
+                                       {
+                                               if (this.rtePaste)
+                                               {
+                                                       return;
+                                               }
+
+                                               if (this.events.isCallback('focus'))
+                                               {
+                                                       this.core.callback('focus', e);
+                                               }
+
+                                               this.events.focused = true;
+                                               this.events.blured = false;
+
+                                               // tab
+                                               if (this.selection.current() === false)
+                                               {
+                                                       var sel = this.selection.get();
+                                                       var range = this.selection.range(sel);
+
+                                                       range.setStart(this.core.editor()[0], 0);
+                                                       range.setEnd(this.core.editor()[0], 0);
+                                                       this.selection.update(sel, range);
+                                               }
+
+
+                                       }, this));
+
+
+                                       // blur
+                                       $(document).on('mousedown.redactor-blur.' + this.uuid, $.proxy(function(e)
+                                       {
+                                               if (this.start || this.rtePaste)
+                                               {
+                                                       return;
+                                               }
+
+                                               if ($(e.target).closest('#' + this.core.id() + ', .redactor-toolbar, .redactor-dropdown, #redactor-modal-box, .redactor-data-cmd').size() !== 0)
+                                               {
+                                                       return;
+                                               }
+
+                                               this.utils.disableSelectAll();
+                                               if (!this.events.blured && this.events.isCallback('blur'))
+                                               {
+                                                       this.core.callback('blur', e);
+                                               }
+
+                                               this.events.focused = false;
+                                               this.events.blured = true;
+
+                                       }, this));
+                               },
+                               dropUpload: function(e)
+                               {
+                                       e.preventDefault();
+                                       e.stopPropagation();
+
+
+                                       if (!this.opts.dragImageUpload && !this.opts.dragFileUpload)
+                                       {
+                                               return;
+                                       }
+
+                                       var files = e.dataTransfer.files;
+                                       this.upload.directUpload(files[0], e);
+                               },
+                               drop: function(e)
+                               {
+                                       this.core.callback('drop', e);
+                               },
+                               isCallback: function(name)
+                               {
+                                       return (typeof this.opts.callbacks[name] !== 'undefined' && $.isFunction(this.opts.callbacks[name]));
+                               }
+                       };
+               },
+
+               // =file
+               file: function()
+               {
+                       return {
+                               show: function()
+                               {
+                                       // build modal
+                                       this.modal.load('file', this.lang.get('file'), 700);
+
+                                       // build upload
+                                       this.upload.init('#redactor-modal-file-upload', this.opts.fileUpload, this.file.insert);
+
+                                       // get text
+                                       var text = this.selection.get().toString();
+
+                                       $('#redactor-filename').val(text);
+
+                                       this.modal.show();
+                               },
+                               insert: function(json, direct, e)
+                               {
+                                       // error callback
+                                       if (typeof json.error !== 'undefined')
+                                       {
+                                               this.modal.close();
+                                               this.core.callback('fileUploadError', json);
+                                               return;
+                                       }
+
+                                       this.placeholder.remove();
+
+                                       var $link;
+                                       var text;
+                                       var $el = (this.utils.isElement(json)) ? $(json) : false;
+
+                                       // direct upload
+                                       if (direct)
+                                       {
+                                               text = json.filename;
+
+                                               this.selection.removeMarkers();
+                                               this.insert.nodeToCaretPositionFromPoint(e, this.selection.marker());
+                                               this.selection.restore();
+                                       }
+                                       else
+                                       {
+                                               text = (typeof text === 'undefined' || text === '') ? json.filename : $('#redactor-filename').val();
+                                               this.modal.close();
+                                       }
+
+                                       // buffer
+                                       this.buffer.set();
+
+                                       this.air.collapsed();
+
+                                       if ($el !== false)
+                                       {
+                                               $link = this.insert.node($el);
+                                       }
+                                       else
+                                       {
+                                               $link = $('<a href="' + json.filelink + '">' + text + '</a>');
+                                               $link = this.insert.node($link);
+                                       }
+
+                                       this.caret.after($link);
+                                       this.core.callback('fileUpload', $link, json);
+
+                               }
+                       };
+               },
+
+               // =focus
+               focus: function()
+               {
+                       return {
+                               start: function()
+                               {
+                                       this.core.editor().focus();
+
+                                       if (this.opts.type === 'inline')
+                                       {
+                                               return;
+                                       }
+
+                                       var first = this.core.editor().children().first();
+
+                                       if (first.length === 0 && (first[0].length === 0 || first[0].tagName === 'BR' || first[0].nodeType === 3))
+                                       {
+                                               return;
+                                       }
+
+                                       if (first[0].tagName === 'UL' || first[0].tagName === 'OL')
+                                       {
+                                               first = first.find('li').first();
+                                       }
+
+                                       this.caret.start(first);
+                               },
+                               end: function()
+                               {
+                                       this.core.editor().focus();
+
+                                       var last = (this.opts.inline) ? this.core.editor() : this.focus.last();
+                                       var sel = this.selection.get();
+                                       var range = this.selection.range(sel);
+
+                                       if (last.length === 0)
+                                       {
+                                               return;
+                                       }
+
+                                       var lastNode = last[0].lastChild;
+                                       if (!this.browser.webkit() && typeof lastNode !== 'undefined' && this.utils.isInlineTag(lastNode.tagName))
+                                       {
+                                               this.caret.end(lastNode);
+                                       }
+                                       else
+                                       {
+                                               range.selectNodeContents(last[0]);
+                                               range.collapse(false);
+
+                                               this.selection.update(sel, range);
+                                       }
+                               },
+                               last: function()
+                               {
+                                       return this.core.editor().children().last();
+                               },
+                               is: function()
+                               {
+                                       return this.core.editor()[0] === document.activeElement;
+                               }
+                       };
+               },
+
+               // =image
+               image: function()
+               {
+                       return {
+                               show: function()
+                               {
+                                       // build modal
+                                       this.modal.load('image', this.lang.get('image'), 700);
+
+                                       // build upload
+                                       this.upload.init('#redactor-modal-image-droparea', this.opts.imageUpload, this.image.insert);
+                                       this.modal.show();
+
+                               },
+                               insert: function(json, direct, e)
+                               {
+                                       // error callback
+                                       if (typeof json.error !== 'undefined')
+                                       {
+                                               this.modal.close();
+                                               this.core.callback('imageUploadError', json);
+                                               return;
+                                       }
+
+                                       this.placeholder.remove();
+
+                                       var $figure = $('<figure>');
+
+                                       var $img;
+                                       if (this.utils.isElement(json))
+                                       {
+                                               $img = $(json);
+                                       }
+                                       else
+                                       {
+                                               $img = $('<img>');
+                                               $img.attr('src', json.filelink);
+                                       }
+
+                                       $figure.append($img);
+
+                                       var pre = this.utils.isTag(this.selection.current(), 'pre');
+
+                                       if (direct)
+                                       {
+
+                                               this.air.collapsed();
+                                               this.selection.removeMarkers();
+                                               var node = this.insert.nodeToCaretPositionFromPoint(e, this.selection.marker());
+                                               var $next = $(node).next();
+
+                                               this.selection.restore();
+
+                                               // buffer
+                                               this.buffer.set();
+
+                                               // insert
+                                               if (typeof $next !== 'undefined' && $next.length !== 0 && $next[0].tagName === 'IMG')
+                                               {
+                                                       // delete callback
+                                                       this.core.callback('imageDelete', $next[0].src, $next);
+
+                                                       // replace
+                                                       $next.closest('figure, p', this.core.editor()[0]).replaceWith($figure);
+                                                       this.caret.after($figure);
+                                               }
+                                               else
+                                               {
+                                                       if (pre)
+                                                       {
+                                                               $(pre).after($figure);
+                                                       }
+                                                       else
+                                                       {
+                                                               this.insert.node($figure);
+                                                       }
+
+                                                       this.caret.after($figure);
+                                               }
+
+                                       }
+                                       else
+                                       {
+                                               this.modal.close();
+
+                                               // buffer
+                                               this.buffer.set();
+
+                                               // insert
+                                               this.air.collapsed();
+
+                                               if (pre)
+                                               {
+                                                       $(pre).after($figure);
+                                               }
+                                               else
+                                               {
+                                                       this.insert.node($figure);
+                                               }
+
+                                               this.caret.after($figure);
+                                       }
+
+                                       this.observe.load();
+                                       this.core.callback('imageUpload', $img, json);
+                               },
+                               setEditable: function($image)
+                               {
+                                       $image.on('dragstart', function(e)
+                                       {
+                                               e.preventDefault();
+                                       });
+
+                                       $image.off('click.redactor touchstart.redactor').on('click.redactor touchstart.redactor', $.proxy(function()
+                                       {
+                                               this.image.showEdit($image);
+
+                                       }, this));
+                               },
+                               showEdit: function($image)
+                               {
+                                       this.observe.image = $image;
+
+                                       var $link = $image.closest('a', this.$editor[0]);
+
+                                       this.modal.load('image-edit', this.lang.get('edit'), 705);
+
+                                       this.modal.createCancelButton();
+                                       this.image.buttonDelete = this.modal.createDeleteButton(this.lang.get('delete'));
+                                       this.image.buttonSave = this.modal.createActionButton(this.lang.get('save'));
+
+                                       this.image.buttonDelete.on('click', $.proxy(this.image.remove, this));
+                                       this.image.buttonSave.on('click', $.proxy(this.image.update, this));
+
+
+                                       $('#redactor-image-title').val($image.attr('alt'));
+
+                                       var $redactorImageLink = $('#redactor-image-link');
+                                       $redactorImageLink.attr('href', $image.attr('src'));
+                                       if ($link.length !== 0)
+                                       {
+                                               $redactorImageLink.val($link.attr('href'));
+                                               if ($link.attr('target') === '_blank')
+                                               {
+                                                       $('#redactor-image-link-blank').prop('checked', true);
+                                               }
+                                       }
+
+                                       // hide link's tooltip
+                                       $('.redactor-link-tooltip').remove();
+
+                                       this.modal.show();
+
+                                       // focus
+                                       $('#redactor-image-title').focus();
+
+                               },
+                               update: function()
+                               {
+                                       var $image = this.observe.image;
+                                       var $link = $image.closest('a', this.core.editor()[0]);
+
+                                       var title = $('#redactor-image-title').val().replace(/(<([^>]+)>)/ig,"");
+                                       $image.attr('alt', title).attr('title', title);
+
+                                       // as link
+                                       var link = $.trim($('#redactor-image-link').val()).replace(/(<([^>]+)>)/ig,"");
+                                       if (link !== '')
+                                       {
+                                               // test url (add protocol)
+                                               var pattern = '((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}';
+                                               var re = new RegExp('^(http|ftp|https)://' + pattern, 'i');
+                                               var re2 = new RegExp('^' + pattern, 'i');
+
+                                               if (link.search(re) === -1 && link.search(re2) === 0 && this.opts.linkProtocol)
+                                               {
+                                                       link = this.opts.linkProtocol + '://' + link;
+                                               }
+
+                                               var target = ($('#redactor-image-link-blank').prop('checked')) ? true : false;
+
+                                               if ($link.length === 0)
+                                               {
+                                                       var a = $('<a href="' + link + '">' + this.utils.getOuterHtml($image) + '</a>');
+                                                       if (target)
+                                                       {
+                                                               a.attr('target', '_blank');
+                                                       }
+
+                                                       $image.replaceWith(a);
+                                               }
+                                               else
+                                               {
+                                                       $link.attr('href', link);
+                                                       if (target)
+                                                       {
+                                                               $link.attr('target', '_blank');
+                                                       }
+                                                       else
+                                                       {
+                                                               $link.removeAttr('target');
+                                                       }
+                                               }
+                                       }
+                                       else if ($link.length !== 0)
+                                       {
+                                               $link.replaceWith(this.utils.getOuterHtml($image));
+
+                                       }
+
+                                       this.modal.close();
+
+                                       // buffer
+                                       this.buffer.set();
+
+                                       this.observe.images();
+
+                               },
+                               detectRemoved: function(self, mutation)
+                               {
+                                       if (self.events.stop)
+                                       {
+                                               return;
+                                       }
+
+                                       var len = mutation.removedNodes.length;
+                                       for (var i = 0; i < len; i++)
+                                       {
+                                               var node = mutation.removedNodes[i];
+                                               if (node.nodeType === 1)
+                                               {
+                                                       var children = $(node).children('img');
+                                                       if (node.tagName !== 'IMG' && children.length !== 0)
+                                                       {
+                                                               var lenChildren = children.length;
+                                                               for (var z = 0; z < lenChildren; z++)
+                                                               {
+                                                                       self.image.remove(false, $(children[z]));
+                                                               }
+                                                       }
+                                                       else if (node.tagName === 'IMG' && mutation.nextSibling === null)
+                                                       {
+                                                               self.image.remove(true, $(node));
+                                                       }
+                                                       else if (node.tagName === 'IMG' && (typeof mutation.nextSibling !== null && mutation.nextSibling.id !== 'redactor-image-box'))
+                                                       {
+                                                               self.image.remove(true, $(node));
+                                                       }
+                                               }
+                                       }
+                               },
+                               remove: function(e, $image)
+                               {
+                                       $image = (typeof $image === 'undefined') ? $(this.observe.image) : $image;
+
+                                       var $link = $image.closest('a', this.core.editor()[0]);
+                                       var $figure = $image.closest('figure, p', this.core.editor()[0]);
+                                       var $parent = $image.parent();
+
+                                       if ($('#redactor-image-box').length !== 0)
+                                       {
+                                               $parent = $('#redactor-image-box').parent();
+                                       }
+
+                                       var $next;
+                                       if ($figure.length !== 0)
+                                       {
+                                               $next = $figure.next();
+                                               $figure.remove();
+                                       }
+                                       else if ($link.length !== 0)
+                                       {
+                                               $parent = $link.parent();
+                                               $link.remove();
+                                       }
+                                       else
+                                       {
+                                               $image.remove();
+                                       }
+
+                                       $('#redactor-image-box').remove();
+
+                                       if (e !== false)
+                                       {
+                                               if ($figure.length !== 0 && $next.length !== 0)
+                                               {
+                                                       this.caret.start($next);
+                                               }
+                                               else if ($parent.length !== 0)
+                                               {
+                                                       this.caret.start($parent);
+                                               }
+                                       }
+
+                                       if (typeof e !== 'boolean')
+                                       {
+                                               this.modal.close();
+                                       }
+
+                                       // delete callback
+                                       this.core.callback('imageDelete', $image[0].src, $image);
+                                       this.utils.restoreScroll();
+                               }
+                       };
+               },
+
+               // =indent
+               indent: function()
+               {
+                       return {
+                               increase: function()
+                               {
+                                       if (!this.list.get())
+                                       {
+                                               return;
+                                       }
+
+                                       var $li = $(this.selection.current()).closest('li');
+                                       var $prev = $li.prev();
+                                       if ($prev.length === 0 || $prev[0].tagName !== 'LI')
+                                       {
+                                               return;
+                                       }
+
+                                       this.buffer.set();
+
+                                       document.execCommand('indent');
+
+                                       // normalize
+                                       this.selection.save();
+                                       this.indent.normalize();
+                                       this.selection.restore();
+                               },
+                               decrease: function()
+                               {
+                                       if (!this.list.get())
+                                       {
+                                               return;
+                                       }
+
+                                       this.buffer.set();
+
+                                       document.execCommand('outdent');
+
+                                       var $item = $(this.selection.current()).closest('li', this.core.editor()[0]);
+
+                                       if (this.utils.isCollapsed())
+                                       {
+                                               var $li = $(this.selection.current()).closest('li');
+                                               if ($li.length !== 0 && $li.parent().length !== 0 && $li.parent()[0].tagName === 'LI')
+                                               {
+                                                       this.selection.save();
+                                                       $li.parent().after($li);
+                                                       this.selection.restore();
+                                               }
+                                       }
+
+                                       if ($item.length === 0)
+                                       {
+                                               document.execCommand('formatblock', false, 'p');
+                                       }
+                               },
+                               normalize: function()
+                               {
+                                       this.core.editor().find('li').each(function(i,s)
+                                       {
+                                               var $next = $(s).next();
+                                               if ($next.length !== 0 && ($next[0].tagName === 'UL' || $next[0].tagName === 'OL'))
+                                               {
+                                                       $(s).append($next);
+                                               }
+
+                                       });
+                               }
+                       };
+               },
+
+               // =inline
+               inline: function()
+               {
+                       return {
+                               format: function(tag, attr, value, type)
+                               {
+                                       tag = tag.toLowerCase();
+
+                                       if (tag === 'span')
+                                       {
+                                               return;
+                                       }
+
+                                       // Stop formatting pre and headers
+                                       if (this.utils.isCurrentOrParent(['PRE', 'TR']) || this.utils.isCurrentOrParentHeader())
+                                       {
+                                               return;
+                                       }
+
+                                       var tags = ['b', 'bold', 'i', 'italic', 'underline', 'strikethrough', 'deleted', 'superscript', 'subscript'];
+                                       var replaced = ['strong', 'strong', 'em', 'em', 'u', 'del', 'del', 'sup', 'sub'];
+
+                                       for (var i = 0; i < tags.length; i++)
+                                       {
+                                               if (tag === tags[i])
+                                               {
+                                                       tag = replaced[i];
+                                               }
+                                       }
+
+                                       this.placeholder.remove();
+                                       this.buffer.set();
+
+                                       return (this.utils.isCollapsed()) ? this.inline.formatCollapsed(tag, attr, value, type) : this.inline.formatUncollapsed(tag, attr, value, type);
+                               },
+                               formatCollapsed: function(tag, attr, value, type)
+                               {
+                                       var inline = this.selection.inline();
+
+                                       if (inline)
+                                       {
+                                               var currentTag = inline.tagName.toLowerCase();
+
+                                               if (currentTag === tag)
+                                               {
+                                                       // empty & remove
+                                                       if (this.utils.isEmpty(inline.innerHTML))
+                                                       {
+                                                               this.caret.after(inline);
+                                                               $(inline).remove();
+                                                       }
+                                                       // break & remove
+                                                       else
+                                                       {
+                                                               var $first = this.inline.insertBreakpoint(inline, currentTag);
+
+                                                               this.caret.after($first);
+                                                       }
+                                               }
+                                               else
+                                               {
+                                                       this.inline.formatSet(tag, attr, value, type);
+                                               }
+                                       }
+                                       else
+                                       {
+                                               this.inline.formatSet(tag, attr, value, type);
+                                       }
+
+                               },
+                               formatSet: function(tag, attr, value, type)
+                               {
+                                       var node = document.createElement(tag);
+                                       node = this.inline.setAttr(node, attr, value, type);
+
+                                       this.insert.node(node);
+                                       this.caret.start(node);
+                               },
+                               formatBreak: function(tag, attr, value, type, inline, currentTag)
+                               {
+                                       var node = document.createElement(tag);
+                                       node = this.inline.setAttr(node, attr, value, type);
+
+                                       var $first = this.inline.insertBreakpoint(inline, currentTag);
+                                       $first.after(node);
+
+                                       this.caret.start(node);
+                               },
+                               formatUncollapsed: function(tag, attr, value, type)
+                               {
+                                       var self = this;
+
+                                       this.inline.formatConvert(tag);
+
+                                       this.selection.save();
+
+                                       document.execCommand('strikethrough');
+
+                                       var $formatted = this.core.editor().find('strike');
+                                       $formatted.each(function(i,s)
+                                       {
+                                               var $oldEl = $(s);
+                                               var newEl = document.createElement(tag);
+
+                                               if (!$oldEl.hasClass('redactor-inline-converted'))
+                                               {
+                                                       newEl = self.inline.setAttr(newEl, attr, value, type);
+                                               }
+
+                                               var $newEl = $(newEl);
+
+                                               $oldEl.replaceWith($newEl.html($oldEl.contents()));
+
+                                       });
+
+                                       // restore del tag
+                                       if (tag !== 'del')
+                                       {
+                                               this.core.editor().find('inline').each(function(i,s)
+                                               {
+                                                       self.utils.replaceToTag(s, 'del');
+                                               });
+                                       }
+
+                                       // restore u tag
+                                       if (tag !== 'u')
+                                       {
+                                               this.core.editor().find('unline').each(function(i,s)
+                                               {
+                                                       self.utils.replaceToTag(s, 'u');
+                                               });
+                                       }
+
+                                       // remove format in pre & headers
+                                       this.core.editor().find('pre, h1, h2, h3, h4, h5, h6').children(tag).replaceWith(function()
+                                       {
+                                               return $(this).contents();
+                                       });
+
+                                       // clear text decoration & service tags
+                                       this.$editor.find(this.opts.inlineTags.join(', ')).each($.proxy(function(i,s)
+                                       {
+                                               var $el = $(s);
+                                               var property = $el.css('text-decoration');
+
+                                               if ($el.hasClass('redactor-selection-marker'))
+                                               {
+                                                       return;
+                                               }
+                                               else if (this.clean.removeSpacesHard(s.innerHTML) === '')
+                                               {
+                                                       $el.remove();
+                                                       return;
+                                               }
+                                               else if (s.tagName === 'SPAN' && $el.hasClass('redactor-inline-converted'))
+                                               {
+                                                       $el.replaceWith($el.contents());
+                                                       return;
+                                               }
+                                               else if (property === 'line-through')
+                                               {
+                                                       if (s.tagName === 'SPAN' || (s.tagName === 'U' && s.attributes.length === 0))
+                                                       {
+                                                               $el.replaceWith($el.contents());
+                                                       }
+                                                       else
+                                                       {
+                                                               $el.css('text-decoration', '');
+                                                               this.utils.removeEmptyAttr($el, 'style');
+                                                       }
+                                               }
+                                       }, this));
+
+                                       this.selection.restore();
+
+                               },
+                               formatConvert: function(tag)
+                               {
+                                       this.selection.save();
+
+                                       var self = this;
+
+                                       // save del tag
+                                       if (tag !== 'del')
+                                       {
+
+                                               this.core.editor().find('del').each(function(i,s)
+                                               {
+                                                       self.utils.replaceToTag(s, 'inline');
+                                               });
+                                       }
+
+                                       // save u tag
+                                       if (tag !== 'u')
+                                       {
+                                               this.core.editor().find('u').each(function(i,s)
+                                               {
+                                                       self.utils.replaceToTag(s, 'unline');
+                                               });
+                                       }
+
+                                       // convert tag
+                                       this.core.editor().find(tag).each(function()
+                                       {
+                                               var $el = $(this);
+                                               $el.replaceWith($('<strike />').addClass('redactor-inline-converted').html($el.contents()));
+
+                                       });
+
+                                       this.selection.restore();
+                               },
+                               insertBreakpoint: function(inline, currentTag)
+                               {
+                                       var breakpoint = document.createElement('span');
+                                       breakpoint.id = 'redactor-inline-breakpoint';
+
+                                       breakpoint = this.insert.node(breakpoint);
+
+                                       var end = this.utils.isEndOfElement(inline);
+                                       var code = this.utils.getOuterHtml(inline);
+
+                                       var endTag = (end) ? '' : '<' + currentTag + '>';
+
+                                       code = code.replace(/<span(.*?[^>])id="redactor-inline-breakpoint">​<\/span>/i, '</' + currentTag + '>' + endTag);
+
+                                       var $code = $(code);
+                                       $(inline).replaceWith($code);
+
+                                       return $code.first();
+                               },
+                               setAttr: function(inline, attr, value, type)
+                               {
+                                       if (typeof attr === 'undefined')
+                                       {
+                                               return inline;
+                                       }
+
+                                       var func = (typeof type === 'undefined') ? 'replace' : type;
+
+                                       if (attr === 'class')
+                                       {
+                                               inline = this.inline[func + 'Class'](value, inline);
+                                       }
+                                       else
+                                       {
+                                               if (func === 'remove')
+                                               {
+                                                       inline = this.inline[func + 'Attr'](attr, inline);
+                                               }
+                                               else if (func === 'removeAll')
+                                               {
+                                                       inline = this.inline[func + 'Attr'](inline);
+                                               }
+                                               else
+                                               {
+                                                       inline = this.inline[func + 'Attr'](attr, value, inline);
+                                               }
+                                       }
+
+                                       return inline;
+
+                               },
+                               getInlines: function(inline)
+                               {
+                                       return (typeof inline === 'undefined') ? this.selection.inlines() : inline;
+                               },
+                               update: function(tag, attr, value, type)
+                               {
+                                       var inlines = this.selection.inlines();
+                                       var result = [];
+                                       var self = this;
+
+                                       $.each(inlines, function(i,s)
+                                       {
+                                               if ($.isArray(tag))
+                                               {
+                                                       if ($.inArray(s.tagName.toLowerCase(), tag) === -1)
+                                                       {
+                                                               return;
+                                                       }
+                                               }
+                                               else
+                                               {
+                                                       if (tag !== '*' && s.tagName.toLowerCase() !== tag)
+                                                       {
+                                                               return;
+                                                       }
+                                               }
+
+                                               result.push(self.inline.setAttr(s, attr, value, type));
+
+                                       });
+
+                                       return result;
+
+                               },
+                               replaceClass: function(value, inline)
+                               {
+                                       return $(this.inline.getInlines(inline)).removeAttr('class').addClass(value)[0];
+                               },
+                               toggleClass: function(value, inline)
+                               {
+                                       return $(this.inline.getInlines(inline)).toggleClass(value)[0];
+                               },
+                               addClass: function(value, inline)
+                               {
+                                       return $(this.inline.getInlines(inline)).addClass(value)[0];
+                               },
+                               removeClass: function(value, inline)
+                               {
+                                       return $(this.inline.getInlines(inline)).removeClass(value)[0];
+                               },
+                               removeAllClass: function(inline)
+                               {
+                                       return $(this.inline.getInlines(inline)).removeAttr('class')[0];
+                               },
+                               replaceAttr: function(inline, attr, value)
+                               {
+                                       inline = this.inline.removeAttr(attr, this.inline.getInlines(inline));
+
+                                       return $(inline).attr(attr, value)[0];
+                               },
+                               toggleAttr: function(attr, value, inline)
+                               {
+                                       inline = this.inline.getInlines(inline);
+
+                                       var self = this;
+                                       var returned = [];
+                                       $.each(inline, function(i,s)
+                                       {
+                                               var $el = $(s);
+                                               if ($el.attr(attr))
+                                               {
+                                                       returned.push(self.inline.removeAttr(attr, s));
+                                               }
+                                               else
+                                               {
+                                                       returned.push(self.inline.addAttr(attr, value, s));
+                                               }
+                                       });
+
+                                       return returned;
+
+                               },
+                               addAttr: function(attr, value, inline)
+                               {
+                                       return $(this.inline.getInlines(inline)).attr(attr, value)[0];
+                               },
+                               removeAttr: function(attr, inline)
+                               {
+                                       return $(this.inline.getInlines(inline)).removeAttr(attr)[0];
+                               },
+                               removeAllAttr: function(inline)
+                               {
+                                       inline = this.inline.getInlines(inline);
+
+                                       var returned = [];
+                                       $.each(inline, function(i, s)
+                                       {
+                                               if (typeof s.attributes === 'undefined')
+                                               {
+                                                       returned.push(s);
+                                               }
+
+                                               var $el = $(s);
+                                               var len = s.attributes.length;
+                                               for (var z = 0; z < len; z++)
+                                               {
+                                                       $el.removeAttr(s.attributes[z].name);
+                                               }
+
+                                               returned.push($el[0]);
+                                       });
+
+                                       return returned;
+                               },
+                               removeFormat: function()
+                               {
+                                       document.execCommand('removeFormat');
+                               }
+                       };
+               },
+
+               // =insert
+               insert: function()
+               {
+                       return {
+                               set: function(html)
+                               {
+                                       this.code.set(html);
+                               },
+                               text: function(text)
+                               {
+                                       this.placeholder.remove();
+
+                                       text = text.toString();
+                                       text = $.trim(text);
+
+                                       var tmp = document.createElement('div');
+                                       tmp.innerHTML = text;
+                                       text = tmp.textContent || tmp.innerText;
+
+                                       text = text.replace(/\n/g, ' ');
+
+                                       // select all
+                                       if (this.utils.isSelectAll())
+                                       {
+                                               var $node = $(this.opts.emptyHtml);
+                                               this.core.editor().html('').append($node);
+                                               $node.html(text);
+                                               this.caret.end($node);
+                                       }
+                                       else
+                                       {
+                                               // insert
+                                               var sel = this.selection.get();
+                                               var node = document.createTextNode(text);
+
+                                               if (sel.getRangeAt && sel.rangeCount)
+                                               {
+                                                       var range = sel.getRangeAt(0);
+                                                       range.deleteContents();
+                                                       range.insertNode(node);
+                                                       range.setStartAfter(node);
+                                                       range.collapse(true);
+
+                                                       this.selection.update(sel, range);
+                                               }
+                                       }
+
+                                       this.utils.disableSelectAll();
+                                       this.linkify.format();
+                               },
+                               raw: function(html)
+                               {
+                                       this.insert.gap = true;
+                                       this.insert.html(html, false);
+
+                               },
+                               html: function(html, clean)
+                               {
+                                       this.core.editor().focus();
+
+                                       var block = this.selection.block();
+                                       var inline = this.selection.inline();
+
+                                       // clean
+                                       if (clean !== false)
+                                       {
+                                               html = this.clean.onPaste(html, true);
+                                       }
+
+                                       // delete selected content
+                                       var sel = this.selection.get();
+                                       var range = this.selection.range(sel);
+                                       range.deleteContents();
+
+                                       this.selection.update(sel, range);
+
+                                       // save selection
+                                       this.selection.save();
+
+                                       // inserted marker
+                                       var node = document.createElement('span');
+                                       node.id = 'redactor-insert-marker';
+                                       node = this.insert.node(node);
+
+                                       if (this.insert.gap && block)
+                                       {
+                                               if (this.utils.isSelectAll())
+                                               {
+                                                       this.core.editor().html(html);
+                                                       this.focus.end();
+                                               }
+                                               else
+                                               {
+                                                       this.events.stopDetect();
+
+                                                       var tag = block.tagName.toLowerCase();
+                                                       if (tag !== 'p' || tag !== 'div')
+                                                       {
+                                                               tag = 'p';
+                                                       }
+
+                                                       var inlineStart = '', inlineEnd = '';
+                                                       if (inline)
+                                                       {
+                                                               inlineStart = '</' + inline.tagName.toLowerCase() + '>';
+                                                               inlineEnd = '<' + inline.tagName.toLowerCase() + '>';
+                                                       }
+
+                                                       var code = this.core.editor().html();
+
+                                                       code = code.replace(/<span(.*?[^>])id="redactor-insert-marker">​<\/span>/i, inlineStart + '</' + tag + '>' + html + '<' + tag + '>' + inlineEnd);
+                                                       this.core.editor().html(code);
+
+                                                       this.selection.restore();
+
+                                                       var current = this.selection.current();
+                                                       if (current && current.tagName === 'P' && current.innerHTML === '')
+                                                       {
+                                                               this.caret.before(current);
+                                                       }
+
+                                                       this.core.editor().find('p:empty').remove();
+                                                       this.events.startDetect();
+                                               }
+
+                                       }
+                                       else
+                                       {
+                                               if (inline)
+                                               {
+                                                       // remove same tag inside
+                                                       var $div = $("<div/>").html($.parseHTML(html, document, true));
+
+                                                       $div.find(inline.tagName.toLowerCase()).each(function()
+                                                       {
+                                                               $(this).contents().unwrap();
+                                                       });
+
+                                                       html = $div.html();
+                                               }
+
+                                               if (this.utils.isSelectAll())
+                                               {
+                                                       var $node = $(this.opts.emptyHtml);
+                                                       this.core.editor().html('').append($node);
+                                                       $node.html(html);
+                                                       this.caret.end($node);
+                                               }
+                                               else
+                                               {
+                                                       $(node).before(html);
+                                                       this.selection.restore();
+                                                       this.caret.after(node);
+                                                       $(node).remove();
+                                               }
+
+
+                                       }
+
+
+                                       this.utils.disableSelectAll();
+                                       this.linkify.format();
+
+                               },
+                               node: function(node, deleteContent)
+                               {
+                                       if (typeof this.start !== 'undefined')
+                                       {
+                                               this.core.editor().focus();
+                                       }
+
+                                       node = node[0] || node;
+
+                                       var block = this.selection.block();
+                                       var gap = this.utils.isBlockTag(node.tagName);
+
+                                       if (gap && block)
+                                       {
+                                               this.events.stopDetect();
+
+                                               var inline = this.selection.inline();
+                                               var tag = block.tagName.toLowerCase();
+
+                                               if (tag !== 'p' || tag !== 'div')
+                                               {
+                                                       tag = 'p';
+                                               }
+
+                                               var inlineStart = '', inlineEnd = '';
+                                               if (inline)
+                                               {
+                                                       inlineStart = '</' + inline.tagName.toLowerCase() + '>';
+                                                       inlineEnd = '<' + inline.tagName.toLowerCase() + '>';
+                                               }
+
+                                               // inserted marker
+                                               var marker = document.createElement('span');
+                                               marker.id = 'redactor-insert-marker';
+
+                                               this.insert.node(marker);
+
+                                               var code = this.core.editor().html();
+                                               code = code.replace(/<span(.*?[^>])id="redactor-insert-marker">​<\/span>/i, inlineStart + '</' + tag + '><span id="redactor-insert-marker">​</span><' + tag + '>' + inlineEnd);
+                                               this.core.editor().html(code);
+
+                                               var $marker = this.core.editor().find('#redactor-insert-marker');
+
+                                               $marker.replaceWith(node);
+
+                                               var current = this.selection.current();
+                                               if (current && current.tagName === 'P' && current.innerHTML === '')
+                                               {
+                                                       this.caret.before(current);
+                                               }
+
+                                               this.core.editor().find('p:empty').remove();
+                                               this.events.startDetect();
+                                       }
+                                       else
+                                       {
+                                               var sel = this.selection.get();
+                                               var range = this.selection.range(sel);
+
+                                               if (deleteContent !== false)
+                                               {
+                                                       range.deleteContents();
+                                               }
+
+                                               range.insertNode(node);
+                                               range.collapse(false);
+
+                                               this.selection.update(sel, range);
+                                       }
+
+                                       this.caret.end(node);
+
+                                       return node;
+
+                               },
+                               nodeToCaretPositionFromPoint: function(e, node)
+                               {
+                                       node = node[0] || node;
+
+                                       var range;
+                                       var x = e.clientX, y = e.clientY;
+                                       if (document.caretPositionFromPoint)
+                                       {
+                                           var pos = document.caretPositionFromPoint(x, y);
+                                           var sel = document.getSelection();
+                                           range = sel.getRangeAt(0);
+                                           range.setStart(pos.offsetNode, pos.offset);
+                                           range.collapse(true);
+                                           range.insertNode(node);
+                                       }
+                                       else if (document.caretRangeFromPoint)
+                                       {
+                                           range = document.caretRangeFromPoint(x, y);
+                                           range.insertNode(node);
+                                       }
+                                       else if (typeof document.body.createTextRange !== "undefined")
+                                       {
+                                       range = document.body.createTextRange();
+                                       range.moveToPoint(x, y);
+                                       var endRange = range.duplicate();
+                                       endRange.moveToPoint(x, y);
+                                       range.setEndPoint("EndToEnd", endRange);
+                                       range.select();
+                                       }
+
+                                       return node;
+
+                               },
+                               marker: function(range, node, collapse)
+                               {
+                                       if (range === null)
+                                       {
+                                               return;
+                                       }
+
+                                       range = range.cloneRange();
+
+                                       try {
+                                               range.collapse(collapse);
+                                               range.insertNode(node);
+
+                                       }
+                                       catch (e)
+                                       {
+                                               this.focus.start();
+                                       }
+
+                               }
+
+                       };
+               },
+
+               // =keydown
+               keydown: function()
+               {
+                       return {
+                               init: function(e)
+                               {
+                                       if (this.rtePaste)
+                                       {
+                                               return;
+                                       }
+
+                                       var key = e.which;
+                                       var arrow = (key >= 37 && key <= 40);
+
+                                       this.keydown.ctrl = e.ctrlKey || e.metaKey;
+                                       this.keydown.parent = this.selection.parent();
+                                       this.keydown.current = this.selection.current();
+                                       this.keydown.block = this.selection.block();
+
+                               // detect tags
+                                       this.keydown.pre = this.utils.isTag(this.keydown.current, 'pre');
+                                       this.keydown.blockquote = this.utils.isTag(this.keydown.current, 'blockquote');
+                                       this.keydown.figcaption = this.utils.isTag(this.keydown.current, 'figcaption');
+
+                                       // callback
+                                       var keydownStop = this.core.callback('keydown', e);
+                                       if (keydownStop === false)
+                                       {
+                                               e.preventDefault();
+                                               return false;
+                                       }
+
+                                       // shortcuts setup
+                                       this.shortcuts.init(e, key);
+
+                                       // buffer
+                                       if (this.utils.isDesktop())
+                                       {
+                                               this.keydown.checkEvents(arrow, key);
+                                               this.keydown.setupBuffer(e, key);
+                                       }
+
+                                       this.keydown.addArrowsEvent(arrow);
+                                       this.keydown.setupSelectAll(e, key);
+
+                                       // turn off enter key
+                                       if (!this.opts.enterKey && key === this.keyCode.ENTER)
+                                       {
+                                               e.preventDefault();
+
+                                               // remove selected
+                                               var sel = this.selection.get();
+                                               var range = this.selection.range(sel);
+
+                                               if (!range.collapsed)
+                                               {
+                                                       range.deleteContents();
+                                               }
+
+                                               return;
+                                       }
+
+                                       // down
+                                       if (this.opts.enterKey && key === this.keyCode.DOWN)
+                                       {
+                                               this.keydown.onArrowDown();
+                                       }
+
+                                       // up
+                                       if (this.opts.enterKey && key === this.keyCode.UP)
+                                       {
+                                               this.keydown.onArrowUp();
+                                       }
+
+                                       // on enter
+                                       if (key === this.keyCode.ENTER && !e.shiftKey && !e.ctrlKey && !e.metaKey)
+                                       {
+                                               var stop = this.core.callback('enter', e);
+                                               if (stop === false)
+                                               {
+                                                       e.preventDefault();
+                                                       return false;
+                                               }
+
+                                               // blockquote exit
+                                               if (this.keydown.blockquote && this.keydown.exitFromBlockquote(e) === true)
+                                               {
+                                                       return false;
+                                               }
+
+                                               // pre
+                                               if (this.keydown.pre)
+                                               {
+                                                       return this.keydown.insertNewLine(e);
+                                               }
+                                               // blockquote & figcaption
+                                               else if (this.keydown.blockquote || this.keydown.figcaption)
+                                               {
+                                                       return this.keydown.insertBreakLine(e);
+                                               }
+                                               // paragraphs
+                                               else if (this.keydown.block)
+                                               {
+                                                       setTimeout($.proxy(this.keydown.replaceDivToParagraph, this), 1);
+
+                                                       // empty list exit
+                                                       if (this.keydown.block.tagName === 'LI')
+                                                       {
+                                                               var current = this.selection.current();
+                                                               var $parent = $(current).closest('li', this.$editor[0]);
+                                                               var $list = $parent.closest('ul,ol', this.$editor[0]);
+
+                                                               if ($parent.length !== 0 && this.utils.isEmpty($parent.html()) && $list.next().length === 0 && this.utils.isEmpty($list.find("li").last().html()))
+                                                               {
+                                                                       $list.find("li").last().remove();
+
+                                                                       var node = $(this.opts.emptyHtml);
+                                                                       $list.after(node);
+                                                                       this.caret.start(node);
+
+                                                                       return false;
+                                                               }
+                                                       }
+
+                                               }
+                                               // outside
+                                               else if (!this.keydown.block)
+                                               {
+                                                       return this.keydown.insertParagraph(e);
+                                               }
+
+                                       }
+
+                                       // tab or cmd + [
+                                       if (key === this.keyCode.TAB || e.metaKey && key === 221 || e.metaKey && key === 219)
+                                       {
+                                               return this.keydown.onTab(e, key);
+                                       }
+
+                                       // on Shift+Enter or Ctrl+Enter
+                                       if (key === this.keyCode.ENTER && (e.ctrlKey || e.shiftKey))
+                                       {
+                                               return this.keydown.insertBreakLine(e);
+                                       }
+
+                                       // backspace & delete
+                                       if (key === this.keyCode.BACKSPACE || key === this.keyCode.DELETE)
+                                       {
+                                               this.utils.saveScroll();
+                                       }
+
+                                       // delete
+                                       if (key === this.keyCode.DELETE && $('#redactor-image-box').length !== 0)
+                                       {
+                                               this.image.remove();
+                                       }
+
+                                       // backspace
+                                       if (key === this.keyCode.BACKSPACE)
+                                       {
+
+                                               // backspace as outdent
+                                               var block = this.selection.block();
+                                               if (block && block.tagName === 'LI' && this.utils.isCollapsed() && this.utils.isStartOfElement())
+                                               {
+                                                       this.indent.decrease();
+                                                       e.preventDefault();
+                                                       return;
+                                               }
+
+                                               // remove hr in FF
+                                               if (this.browser.ff())
+                                               {
+                                                       var prev = this.selection.prev();
+                                                       var prev2 = $(prev).prev()[0];
+
+                                                       if (prev && prev.tagName === 'HR')
+                                                       {
+                                                               $(prev).remove();
+                                                       }
+
+                                                       if (prev2 && prev2.tagName === 'HR')
+                                                       {
+                                                               $(prev2).remove();
+                                                       }
+                                               }
+
+                                               this.keydown.removeInvisibleSpace();
+                                               this.keydown.removeEmptyListInTable(e);
+
+                                               // remove style tag
+                                               setTimeout($.proxy(function()
+                                               {
+                                                       this.code.syncFire = false;
+                                                       this.keydown.removeEmptyLists();
+
+                                                       this.core.editor().find('*[style]').not('#redactor-image-box, #redactor-image-editter').removeAttr('style');
+
+                                                       this.keydown.formatEmpty(e);
+                                                       this.code.syncFire = true;
+
+                                               }, this), 1);
+                                       }
+
+                               },
+                               checkEvents: function(arrow, key)
+                               {
+                                       if (!arrow && (this.core.getEvent() === 'click' || this.core.getEvent() === 'arrow'))
+                                       {
+                                               this.core.addEvent(false);
+
+                                               if (this.keydown.checkKeyEvents(key))
+                                               {
+                                                       this.buffer.set();
+                                               }
+                                       }
+                               },
+                               checkKeyEvents: function(key)
+                               {
+                                       var k = this.keyCode;
+                                       var keys = [k.BACKSPACE, k.DELETE, k.ENTER, k.ESC, k.TAB, k.CTRL, k.META, k.ALT, k.SHIFT];
+
+                                       return ($.inArray(key, keys) === -1) ? true : false;
+
+                               },
+                               addArrowsEvent: function(arrow)
+                               {
+                                       if (!arrow)
+                                       {
+                                               return;
+                                       }
+
+                                       if ((this.core.getEvent() === 'click' || this.core.getEvent() === 'arrow'))
+                                       {
+                                               this.core.addEvent(false);
+                                               return;
+                                       }
+
+                                   this.core.addEvent('arrow');
+                               },
+                               setupBuffer: function(e, key)
+                               {
+                                       if (this.keydown.ctrl && key === 90 && !e.shiftKey && !e.altKey && this.opts.buffer.length) // z key
+                                       {
+                                               e.preventDefault();
+                                               this.buffer.undo();
+                                               return;
+                                       }
+                                       // undo
+                                       else if (this.keydown.ctrl && key === 90 && e.shiftKey && !e.altKey && this.opts.rebuffer.length !== 0)
+                                       {
+                                               e.preventDefault();
+                                               this.buffer.redo();
+                                               return;
+                                       }
+                                       else if (!this.keydown.ctrl)
+                                       {
+                                               if (key === this.keyCode.BACKSPACE || key === this.keyCode.DELETE || (key === this.keyCode.ENTER && !e.ctrlKey && !e.shiftKey))
+                                               {
+                                                       this.buffer.set();
+                                               }
+                                       }
+                               },
+                               exitFromBlockquote: function(e)
+                               {
+
+                                       if (!this.utils.isEndOfElement(this.keydown.blockquote))
+                                       {
+                                               return;
+                                       }
+
+                                       var tmp = this.clean.removeSpacesHard($(this.keydown.blockquote).html());
+                                       if (tmp.search(/(<br\s?\/?>){3}$/i) !== -1)
+                                       {
+                                               e.preventDefault();
+
+                                               var $last = $(this.keydown.blockquote).children().last().prev();
+
+                                               $last.prev().filter('br').remove();
+                                               $last.filter('br').remove();
+
+
+                                               var node = $(this.opts.emptyHtml);
+                                               $(this.keydown.blockquote).after(node);
+                                               this.caret.start(node);
+
+                                               return true;
+
+                                       }
+
+                                       return;
+
+                               },
+                               onArrowDown: function()
+                               {
+                                       var tags = [this.keydown.blockquote, this.keydown.pre, this.keydown.figcaption];
+
+                                       for (var i = 0; i < tags.length; i++)
+                                       {
+                                               if (tags[i])
+                                               {
+                                                       this.keydown.insertAfterLastElement(tags[i]);
+                                                       return false;
+                                               }
+                                       }
+                               },
+                               onArrowUp: function()
+                               {
+                                       var tags = [this.keydown.blockquote, this.keydown.pre, this.keydown.figcaption];
+
+                                       for (var i = 0; i < tags.length; i++)
+                                       {
+                                               if (tags[i])
+                                               {
+                                                       this.keydown.insertBeforeFirstElement(tags[i]);
+                                                       return false;
+                                               }
+                                       }
+                               },
+                               insertAfterLastElement: function(element)
+                               {
+                                       if (!this.utils.isEndOfElement())
+                                       {
+                                               return;
+                                       }
+
+                                       if (this.$editor.contents().last()[0] !== element)
+                                       {
+                                               return;
+                                       }
+
+                                       var node = $(this.opts.emptyHtml);
+                                       $(element).after(node);
+                                       this.caret.start(node);
+
+                               },
+                               insertBeforeFirstElement: function(element)
+                               {
+                                       if (!this.utils.isStartOfElement())
+                                       {
+                                               return;
+                                       }
+
+                                       if (this.$editor.contents().length > 1 && this.$editor.contents().first()[0] !== element)
+                                       {
+                                               return;
+                                       }
+
+                                       var node = $(this.opts.emptyHtml);
+                                       $(element).before(node);
+                                       this.caret.start(node);
+
+                               },
+                               onTab: function(e, key)
+                               {
+                                       if (!this.opts.tabKey)
+                                       {
+                                               return true;
+                                       }
+
+                                       if (this.utils.isEmpty(this.code.get()) && this.opts.tabAsSpaces === false)
+                                       {
+                                               return true;
+                                       }
+
+                                       e.preventDefault();
+                                       this.buffer.set();
+
+                                       var node;
+                                       if (this.keydown.pre && !e.shiftKey)
+                                       {
+                                               node = (this.opts.preSpaces) ? document.createTextNode(Array(this.opts.preSpaces + 1).join('\u00a0')) : document.createTextNode('\t');
+                                               this.insert.node(node);
+                                       }
+                                       else if (this.opts.tabAsSpaces !== false)
+                                       {
+                                               node = document.createTextNode(Array(this.opts.tabAsSpaces + 1).join('\u00a0'));
+                                               this.insert.node(node);
+                                       }
+                                       else
+                                       {
+                                               if (e.metaKey && key === 219)
+                                               {
+                                                       this.indent.decrease();
+                                               }
+                                               else if (e.metaKey && key === 221)
+                                               {
+                                                       this.indent.increase();
+                                               }
+                                               else if (!e.shiftKey)
+                                               {
+                                                       this.indent.increase();
+                                               }
+                                               else
+                                               {
+                                                       this.indent.decrease();
+                                               }
+                                       }
+
+                                       return false;
+                               },
+                               setupSelectAll: function(e, key)
+                               {
+                                       if (this.keydown.ctrl && key === 65)
+                                       {
+                                               this.utils.enableSelectAll();
+                                       }
+                                       else if (key !== this.keyCode.LEFT_WIN && !this.keydown.ctrl)
+                                       {
+                                               this.utils.disableSelectAll();
+                                       }
+                               },
+                               insertNewLine: function(e)
+                               {
+                                       e.preventDefault();
+
+                                       var node = document.createTextNode('\n');
+
+                                       var sel = this.selection.get();
+                                       var range = this.selection.range(sel);
+
+                                       range.deleteContents();
+                                       range.insertNode(node);
+
+                                       this.caret.after(node);
+
+                                       return false;
+                               },
+                               insertBreakLine: function(e)
+                               {
+                                       return this.keydown.insertBreakLineProcessing(e);
+                               },
+                               insertDblBreakLine: function(e)
+                               {
+                                       return this.keydown.insertBreakLineProcessing(e, true);
+                               },
+                               insertBreakLineProcessing: function(e, dbl)
+                               {
+                                       e.stopPropagation();
+
+                                       var br1 = document.createElement('br');
+                                       this.insert.node(br1);
+
+                                       if (dbl === true)
+                                       {
+                                               var br2 = document.createElement('br');
+                                               this.insert.node(br2);
+                                       }
+
+                                       return false;
+
+                               },
+                               replaceDivToParagraph: function()
+                               {
+                                       var blockElem = this.selection.block();
+                                       var blockHtml = blockElem.innerHTML.replace(/<br\s?\/?>/gi, '');
+                                       if (blockElem.tagName === 'DIV' && this.utils.isEmpty(blockHtml) && !$(blockElem).hasClass('redactor-in'))
+                                       {
+                                               var p = document.createElement('p');
+                                               $(blockElem).replaceWith(p);
+                                               this.caret.start(p);
+
+                                               return false;
+                                       }
+                                       else if (this.opts.cleanStyleOnEnter && blockElem.tagName === 'P')
+                                       {
+                                               $(blockElem).removeAttr('class').removeAttr('style');
+                                       }
+                               },
+                               removeInvisibleSpace: function()
+                               {
+                                       var $current = $(this.keydown.current);
+                                       if ($current.text().search(/^\u200B$/g) === 0)
+                                       {
+                                               $current.remove();
+                                       }
+                               },
+                               removeEmptyListInTable: function(e)
+                               {
+                                       var $current = $(this.keydown.current);
+                                       var $parent = $(this.keydown.parent);
+                                       var td = $current.closest('td', this.$editor[0]);
+
+                                       if (td.length !== 0 && $current.closest('li', this.$editor[0]) && $parent.children('li').length === 1)
+                                       {
+                                               if (!this.utils.isEmpty($current.text()))
+                                               {
+                                                       return;
+                                               }
+
+                                               e.preventDefault();
+
+                                               $current.remove();
+                                               $parent.remove();
+
+                                               this.caret.start(td);
+                                       }
+                               },
+                               removeEmptyLists: function()
+                               {
+                                       var removeIt = function()
+                                       {
+                                               var html = $.trim(this.innerHTML).replace(/\/t\/n/g, '');
+                                               if (html === '')
+                                               {
+                                                       $(this).remove();
+                                               }
+                                       };
+
+                                       this.core.editor().find('li').each(removeIt);
+                                       this.core.editor().find('ul, ol').each(removeIt);
+                               },
+                               formatEmpty: function(e)
+                               {
+                                       var html = $.trim(this.core.editor().html());
+
+                                       if (!this.utils.isEmpty(html))
+                                       {
+                                               return;
+                                       }
+
+                                       e.preventDefault();
+
+                                       if (this.opts.type === 'inline' || this.opts.type === 'pre')
+                                       {
+                                               this.core.editor().html(this.selection.markerHtml());
+                                               this.selection.restore();
+                                       }
+                                       else
+                                       {
+                                               this.core.editor().html(this.opts.emptyHtml);
+                                               this.focus.start();
+                                       }
+
+                                       return false;
+
+                               }
+                       };
+               },
+
+               // =keyup
+               keyup: function()
+               {
+                       return {
+                               init: function(e)
+                               {
+                                       if (this.rtePaste)
+                                       {
+                                               return;
+                                       }
+
+                                       var key = e.which;
+
+                                       // callback
+                                       var stop = this.core.callback('keyup', e);
+                                       if (stop === false)
+                                       {
+                                               e.preventDefault();
+                                               return false;
+                                       }
+
+                                       // linkify
+                                       if (this.linkify.isKey(key))
+                                       {
+                                               this.linkify.format();
+                                       }
+
+                               }
+
+                       };
+               },
+
+               // =lang
+               lang: function()
+               {
+                       return {
+                               load: function()
+                               {
+                                       this.opts.curLang = this.opts.langs[this.opts.lang];
+                               },
+                               get: function(name)
+                               {
+                                       return (typeof this.opts.curLang[name] !== 'undefined') ? this.opts.curLang[name] : '';
+                               }
+                       };
+               },
+
+               // =line
+               line: function()
+               {
+                       return {
+                               insert: function()
+                               {
+                                       this.buffer.set();
+                                       this.insert.html('<hr>');
+                               }
+                       };
+               },
+
+               // =link
+               link: function()
+               {
+                       return {
+                               show: function(e)
+                               {
+                                       if (typeof e !== 'undefined' && e.preventDefault)
+                                       {
+                                               e.preventDefault();
+                                       }
+
+                                       // hide link's tooltip
+                                       $('.redactor-link-tooltip').remove();
+
+                                       var isLink = (this.observe.isCurrent('a') && this.utils.isRedactorParent(this.selection.current));
+                                       var langVarModal = (isLink) ? 'link-edit' : 'link-insert';
+                                       var langVarBtn = (isLink) ? 'save' : 'insert';
+
+                                       // build modal
+                                       this.modal.load('link', this.lang.get(langVarModal), 600);
+                                       this.modal.createCancelButton();
+
+                                       // btn insert
+                                       this.link.buttonInsert = this.modal.createActionButton(this.lang.get(langVarBtn));
+
+                                       // get link
+                                       this.link.getData();
+                                       this.link.cleanUrl();
+
+                                       // set modal values
+                                       if (this.link.target === '_blank')
+                                       {
+                                               $('#redactor-link-blank').prop('checked', true);
+                                       }
+
+                                       this.link.$inputUrl = $('#redactor-link-url');
+                                       this.link.$inputText = $('#redactor-link-url-text');
+
+                                       this.link.$inputText.val(this.link.text);
+                                       this.link.$inputUrl.val(this.link.url);
+
+                                       // insert event
+                                       this.link.buttonInsert.on('click', $.proxy(this.link.insert, this));
+
+                                       // show modal
+                                       this.modal.show();
+
+                                       // focus
+                                       this.link.$inputUrl.focus();
+
+                               },
+                               getData: function()
+                               {
+                                       this.link.$node = false;
+                                       this.link.url = '';
+                                       this.link.target = '';
+
+                                       var $el = $(this.selection.current()).closest('a', this.core.editor()[0]);
+                                       if ($el.length !== 0 && $el[0].tagName === 'A')
+                                       {
+                                               this.link.$node = $el;
+
+                                               this.link.url = $el.attr('href');
+                                               this.link.text = $el.text();
+                                               this.link.target = $el.attr('target');
+                                       }
+                                       else
+                                       {
+                                               this.link.text = this.selection.get().toString();
+                                       }
+
+                               },
+                               cleanUrl: function()
+                               {
+                                       if (typeof this.link.url === 'undefined')
+                                       {
+                                               return;
+                                       }
+
+                                       var thref = self.location.href.replace(/\/$/i, '');
+
+                                       this.link.url = this.link.url.replace(thref, '');
+                                       this.link.url = this.link.url.replace(/^\/#/, '#');
+                                       this.link.url = this.link.url.replace('mailto:', '');
+
+                                       // remove host from href
+                                       if (!this.opts.linkProtocol)
+                                       {
+                                               var re = new RegExp('^(http|ftp|https)://' + self.location.host, 'i');
+                                               this.link.url = this.link.url.replace(re, '');
+                                       }
+
+                               },
+                               insert: function()
+                               {
+                                       this.placeholder.remove();
+
+                                       var target = '';
+                                       var link = $.trim(this.link.$inputUrl.val());
+                                       var text = $.trim(this.link.$inputText.val().replace(/(<([^>]+)>)/gi, ''));
+
+                                       // empty text
+                                       if (text === '' && link !== '')
+                                       {
+                                               text = link.replace(/<|>/g, '');
+                                       }
+
+                                       // empty link
+                                       if (link === '' || (text === '' && link === ''))
+                                       {
+                                               return;
+                                       }
+
+                                       // mailto
+                                       if (link.search('@') !== -1 && /(http|ftp|https):\/\//i.test(link) === false)
+                                       {
+                                               link = link.replace('mailto:', '');
+                                               link = 'mailto:' + link;
+                                       }
+                                       // url, not anchor
+                                       else if (link.search('#') !== 0)
+                                       {
+                                               if ($('#redactor-link-blank').prop('checked'))
+                                               {
+                                                       target = '_blank';
+                                               }
+
+                                               // test url (add protocol)
+                                               var pattern = '((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}';
+                                               var re = new RegExp('^(http|ftp|https)://' + pattern, 'i');
+                                               var re2 = new RegExp('^' + pattern, 'i');
+                                               var re3 = new RegExp('\.(html|php)$', 'i');
+                                               if (link.search(re) === -1 && link.search(re3) === -1 && link.search(re2) === 0 && this.opts.linkProtocol)
+                                               {
+                                                       link = this.opts.linkProtocol + '://' + link;
+                                               }
+                                       }
+
+                                       // close modal
+                                       this.modal.close();
+                                       this.buffer.set();
+
+                                       // set link
+                                       if (this.link.$node)
+                                       {
+                                               this.link.$node.attr('href', link);
+                                               this.link.$node.text(text);
+
+                                               if (target !== '')
+                                               {
+                                                       this.link.$node.attr('target', target);
+                                               }
+                                               else
+                                               {
+                                                       this.link.$node.removeAttr('target');
+                                               }
+
+                                               this.selection.node(this.link.$node);
+                                       }
+                                       else
+                                       {
+                                               // create link
+                                               var $a = $('<a href="' + link + '">').text(text);
+
+                                               // set target
+                                               if (target !== '')
+                                               {
+                                                       $a.attr('target', target);
+                                               }
+
+                                               $a = $(this.insert.node($a));
+                                               this.caret.after($a);
+
+                                               this.core.callback('insertedLink', $a);
+                                       }
+
+                                       this.observe.links();
+                               },
+                               unlink: function(e)
+                               {
+                                       if (typeof e !== 'undefined' && e.preventDefault)
+                                       {
+                                               e.preventDefault();
+                                       }
+
+                                       var inlines = this.selection.inlines();
+                                       if (!inlines)
+                                       {
+                                               return;
+                                       }
+
+                                       var len = inlines.length;
+                                       var links = [];
+                                       for (var i = 0; i < len; i++)
+                                       {
+                                               if (inlines[i].tagName === 'A')
+                                               {
+                                                       links.push(inlines[i]);
+                                               }
+
+                                               var $node = $(inlines[i]).closest('a', this.core.editor()[0]);
+                                               $node.replaceWith($node.contents());
+                                       }
+
+                                       // hide link's tooltip
+                                       $('.redactor-link-tooltip').remove();
+
+                                       this.core.callback('deletedLink', links);
+
+                               }
+                       };
+               },
+
+               // =linkify
+               linkify: function()
+               {
+                       return {
+                               isKey: function(key)
+                               {
+                                       return key === this.keyCode.ENTER || key === this.keyCode.SPACE;
+                               },
+                               format: function()
+                               {
+                                       if (!this.opts.linkify || this.utils.isCurrentOrParent('pre'))
+                                       {
+                                               return;
+                                       }
+
+                                       var linkify = this.linkify;
+                                       var opts = this.opts.regexps;
+
+                                       this.core.editor().find(":not(iframe,img,a,pre)").addBack().contents()
+                                               .filter(function()
+                                               {
+                                                       return this.nodeType === 3 && $.trim(this.nodeValue) !== "" && !$(this).parent().is("pre") && (this.nodeValue.match(opts.linkyoutube) || this.nodeValue.match(opts.linkvimeo) || this.nodeValue.match(opts.linkimage) || this.nodeValue.match(opts.url));
+                                               }).each(function()
+                                               {
+                                                       var text = $(this).text();
+                                                       var html = text;
+
+                                                       if (html.match(opts.linkyoutube) || html.match(opts.linkvimeo))
+                                                       {
+                                                               html = linkify.convertVideoLinks(html);
+                                                       }
+                                                       else if (html.match(opts.linkimage))
+                                                       {
+                                                               html = linkify.convertImages(html);
+                                                       }
+                                                       else
+                                                       {
+                                                               html = linkify.convertLinks(html);
+                                                       }
+
+                                                       $(this).before(text.replace(text, html)).remove();
+                                               });
+
+
+                                       var objects = this.core.editor().find('.redactor-linkify-object').each($.proxy(function(i,s)
+                                       {
+                                               var $el = $(s);
+                                               $el.removeClass('redactor-linkify-object');
+                                               if ($el.attr('class') === '')
+                                               {
+                                                       $el.removeAttr('class');
+                                               }
+
+                                               // img figure
+                                               if (s.tagName === 'IMG')
+                                               {
+                                                       this.events.stopDetect();
+
+                                                       var block = this.selection.block();
+                                                       var inline = this.selection.inline();
+                                                       var tag = block.tagName.toLowerCase();
+                                                       var html = this.utils.getOuterHtml(s);
+
+                                                       // add marker
+                                                       $el.attr('data-replaced', i);
+
+                                                       var inlineStart = '', inlineEnd = '';
+                                                       if (inline)
+                                                       {
+                                                               inlineStart = '</' + inline.tagName.toLowerCase() + '>';
+                                                               inlineEnd = '<' + inline.tagName.toLowerCase() + '>';
+                                                       }
+
+                                                       var code = this.core.editor().html();
+                                                       var re = new RegExp(this.utils.getOuterHtml(s), 'i');
+                                                       code = code.replace(re, inlineStart + '</' + tag + '><figure id="redactor-inserted-figure-' + i + '">' + html + '</figure><' + tag + '>' + inlineEnd);
+                                                       this.core.editor().html(code);
+
+                                                       var $figure = $('#redactor-inserted-figure-' + i).removeAttr('id');
+                                                       this.caret.after($figure);
+
+                                                       this.events.startDetect();
+                                               }
+
+                                               return $el[0];
+
+                                       }, this));
+
+                                       // callback
+                                       setTimeout($.proxy(function()
+                                       {
+                                               this.observe.load();
+                                               this.core.callback('linkify', objects);
+                                       }, this), 100);
+
+                               },
+                               convertVideoLinks: function(html)
+                               {
+                                       var iframeStart = '<iframe class="redactor-linkify-object" width="500" height="281" src="';
+                                       var iframeEnd = '" frameborder="0" allowfullscreen></iframe>';
+
+                                       if (html.match(this.opts.regexps.linkyoutube))
+                                       {
+                                               html = html.replace(this.opts.regexps.linkyoutube, iframeStart + '//www.youtube.com/embed/$1' + iframeEnd);
+                                       }
+
+                                       if (html.match(this.opts.regexps.linkvimeo))
+                                       {
+                                               html = html.replace(this.opts.regexps.linkvimeo, iframeStart + '//player.vimeo.com/video/$2' + iframeEnd);
+                                       }
+
+                                       return html;
+                               },
+                               convertImages: function(html)
+                               {
+                                       var matches = html.match(this.opts.regexps.linkimage);
+                                       if (!matches)
+                                       {
+                                               return html;
+                                       }
+
+                                       return html.replace(html, '<img src="' + matches + '" class="redactor-linkify-object" />');
+                               },
+                               convertLinks: function(html)
+                               {
+                                       var matches = html.match(this.opts.regexps.url);
+                                       if (!matches)
+                                       {
+                                               return html;
+                                       }
+
+                                       matches = $.grep(matches, function(v, k) { return $.inArray(v, matches) === k; });
+
+                                       var length = matches.length;
+
+                                       for (var i = 0; i < length; i++)
+                                       {
+                                               var href = matches[i],
+                                                       text = href,
+                                                       linkProtocol = this.opts.linkProtocol + '://';
+
+                                               if (href.match(/(https?|ftp):\/\//i) !== null)
+                                               {
+                                                       linkProtocol = "";
+                                               }
+
+                                               if (text.length > this.opts.linkSize)
+                                               {
+                                                       text = text.substring(0, this.opts.linkSize) + '...';
+                                               }
+
+                                               if (text.search('%') === -1)
+                                               {
+                                                       text = decodeURIComponent(text);
+                                               }
+
+                                               var regexB = "\\b";
+
+                                               if ($.inArray(href.slice(-1), ["/", "&", "="]) !== -1)
+                                               {
+                                                       regexB = "";
+                                               }
+
+                                               // escaping url
+                                               var regexp = new RegExp('(' + href.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + regexB + ')', 'g');
+
+                                               html = html.replace(regexp, '<a href="' + linkProtocol + $.trim(href) + '" class="redactor-linkify-object">' + $.trim(text) + '</a>');
+                                       }
+
+                                       return html;
+                               }
+                       };
+               },
+
+               // =list
+               list: function()
+               {
+                       return {
+                               toggle: function(cmd)
+                               {
+                                       if (this.utils.inBlocks(['table', 'td', 'th', 'tr']))
+                                       {
+                                               return;
+                                       }
+
+                                       var tag = (cmd === 'orderedlist') ? 'OL' : 'UL';
+                                       var $list = $(this.selection.current()).parents('ul, ol').first();
+
+                                       this.placeholder.remove();
+                                       this.buffer.set();
+
+                                       if ($list.length !== 0 && $list[0].tagName === tag)
+                                       {
+                                               this.selection.save();
+
+                                               // remove list
+                                               $list.find('ul, ol').each(function()
+                                               {
+                                                       var parent = $(this).closest('li');
+                                                       $(this).find('li').each(function()
+                                                       {
+                                                               $(parent).after(this);
+                                                       });
+                                               });
+
+                                               $list.find('ul, ol').remove();
+
+                                               $list.find('li').each(function()
+                                               {
+                                                       return $(this).replaceWith(function()
+                                                       {
+                                                               return $('<p />').append($(this).contents());
+                                                       });
+                                               });
+
+
+                                               $list.replaceWith(function()
+                                               {
+                                                       return $(this).contents();
+                                               });
+
+                                               this.selection.restore();
+                                               return;
+                                       }
+
+                                       document.execCommand('insert' + cmd);
+
+                                       var $insertedList = this.list.get();
+                                       if (!$insertedList)
+                                       {
+                                               if (!this.selection.block())
+                                               {
+                                                       document.execCommand('formatblock', false, 'p');
+                                               }
+
+                                               return;
+                                       }
+
+                                       // clear span
+                                       $insertedList.find('span').replaceWith(function()
+                                       {
+                                               return $(this).contents();
+                                       });
+
+                                       // remove style
+                                       $insertedList.find(this.opts.inlineTags.join(',')).each(function()
+                                       {
+                                               $(this).removeAttr('style');
+                                       });
+
+                                       // remove block-element list wrapper
+                                       var $listParent = $insertedList.parent();
+                                       if (this.utils.isRedactorParent($listParent) && $listParent[0].tagName !== 'LI' && this.utils.isBlock($listParent))
+                                       {
+                                               this.selection.save();
+
+                                               $listParent.replaceWith($listParent.contents());
+
+                                               this.selection.restore();
+                                       }
+
+                               },
+                               get: function()
+                               {
+                                       var current = this.selection.current();
+                                       var $list = $(current).closest('ul, ol', this.core.editor()[0]);
+
+                                       return ($list.length === 0) ? false : $list;
+                               }
+                       };
+               },
+
+               // =modal
+               modal: function()
+               {
+                       return {
+                               callbacks: {},
+                               templates: function()
+                               {
+                                       this.opts.modal = {
+                                               'image-edit': String()
+                                               + '<div class="modal-section" id="redactor-modal-image-edit">'
+                                                       + '<label>' + this.lang.get('title') + '</label>'
+                                                       + '<input type="text" id="redactor-image-title" />'
+                                                       + '<label class="redactor-image-link-option">' + this.lang.get('link') + '</label>'
+                                                       + '<input type="text" id="redactor-image-link" class="redactor-image-link-option" aria-label="' + this.lang.get('link') + '" />'
+                                                       + '<label class="redactor-image-link-option"><input type="checkbox" id="redactor-image-link-blank" aria-label="' + this.lang.get('link-in-new-tab') + '"> ' + this.lang.get('link-in-new-tab') + '</label>'
+                                               + '</div>',
+
+                                               'image': String()
+                                               + '<div class="modal-section" id="redactor-modal-image-insert">'
+                                                       + '<div id="redactor-modal-image-droparea"></div>'
+                                               + '</div>',
+
+                                               'file': String()
+                                               + '<div class="modal-section" id="redactor-modal-file-insert">'
+                                                       + '<div id="redactor-modal-file-upload-box">'
+                                                               + '<label>' + this.lang.get('filename') + ' <span class="desc">(' + this.lang.get('optional') + ')</span></label>'
+                                                               + '<input type="text" id="redactor-filename" aria-label="' + this.lang.get('filename') + '" /><br><br>'
+                                                               + '<div id="redactor-modal-file-upload"></div>'
+                                                       + '</div>'
+                                               + '</div>',
+
+                                               'link': String()
+                                               + '<div class="modal-section" id="redactor-modal-link-insert">'
+                                                       + '<label>URL</label>'
+                                                       + '<input type="url" id="redactor-link-url" aria-label="URL" />'
+                                                       + '<label>' + this.lang.get('text') + '</label>'
+                                                       + '<input type="text" id="redactor-link-url-text" aria-label="' + this.lang.get('text') + '" />'
+                                                       + '<label><input type="checkbox" id="redactor-link-blank"> ' + this.lang.get('link-in-new-tab') + '</label>'
+                                               + '</div>'
+                                       };
+
+
+                                       $.extend(this.opts, this.opts.modal);
+
+                               },
+                               addCallback: function(name, callback)
+                               {
+                                       this.modal.callbacks[name] = callback;
+                               },
+                               createTabber: function($modal)
+                               {
+                                       this.modal.$tabber = $('<div>').attr('id', 'redactor-modal-tabber');
+
+                                       $modal.prepend(this.modal.$tabber);
+                               },
+                               addTab: function(id, name, active)
+                               {
+                                       var $tab = $('<a href="#" rel="tab' + id + '">').text(name);
+                                       if (active)
+                                       {
+                                               $tab.addClass('active');
+                                       }
+
+                                       var self = this;
+                                       $tab.on('click', function(e)
+                                       {
+                                               e.preventDefault();
+                                               $('.redactor-tab').hide();
+                                               $('.redactor-' + $(this).attr('rel')).show();
+
+                                               self.modal.$tabber.find('a').removeClass('active');
+                                               $(this).addClass('active');
+
+                                       });
+
+                                       this.modal.$tabber.append($tab);
+                               },
+                               addTemplate: function(name, template)
+                               {
+                                       this.opts.modal[name] = template;
+                               },
+                               getTemplate: function(name)
+                               {
+                                       return this.opts.modal[name];
+                               },
+                               getModal: function()
+                               {
+                                       return this.$modalBody.find('.modal-section');
+                               },
+                               load: function(templateName, title, width)
+                               {
+                                       this.modal.templateName = templateName;
+                                       this.modal.width = width;
+
+                                       this.modal.build();
+                                       this.modal.enableEvents();
+                                       this.modal.setTitle(title);
+                                       this.modal.setDraggable();
+                                       this.modal.setContent();
+
+                                       // callbacks
+                                       if (typeof this.modal.callbacks[templateName] !== 'undefined')
+                                       {
+                                               this.modal.callbacks[templateName].call(this);
+                                       }
+
+                               },
+                               show: function()
+                               {
+                                       this.selection.save();
+
+                                       if (this.utils.isMobile())
+                                       {
+                                               this.modal.showOnMobile();
+                                       }
+                                       else
+                                       {
+                                               this.modal.showOnDesktop();
+                                       }
+
+                                       this.$modalOverlay.show();
+                                       this.$modalBox.fadeIn(150);
+
+                                       this.$modal.attr('tabindex', '-1');
+                                       this.$modal.focus();
+
+                                       this.modal.setButtonsWidth();
+
+                                       // resize
+                                       if (!this.utils.isMobile())
+                                       {
+                                               setTimeout($.proxy(this.modal.showOnDesktop, this), 0);
+                                               $(window).on('resize.redactor-modal', $.proxy(this.modal.resize, this));
+                                       }
+
+                                       // modal shown callback
+                                       this.core.callback('modalOpened', this.modal.templateName, this.$modal);
+
+                                       // fix bootstrap modal focus
+                                       $(document).off('focusin.modal');
+
+                                       // enter
+                                       this.$modal.find('input[type=text],input[type=url],input[type=email]').on('keydown.redactor-modal', $.proxy(this.modal.setEnter, this));
+                               },
+                               showOnDesktop: function()
+                               {
+                                       var height = this.$modal.outerHeight();
+                                       var windowHeight = $(window).height();
+                                       var windowWidth = $(window).width();
+
+                                       if (this.modal.width > windowWidth)
+                                       {
+                                               this.$modal.css({
+                                                       width: '96%',
+                                                       marginTop: (windowHeight/2 - height/2) + 'px'
+                                               });
+
+                                               this.utils.saveScroll();
+                                               return;
+                                       }
+
+                                       if (height > windowHeight)
+                                       {
+                                               this.$modal.css({
+                                                       width: this.modal.width + 'px',
+                                                       marginTop: '20px'
+                                               });
+                                       }
+                                       else
+                                       {
+                                               this.$modal.css({
+                                                       width: this.modal.width + 'px',
+                                                       marginTop: (windowHeight/2 - height/2) + 'px'
+                                               });
+                                       }
+
+                                       this.utils.saveScroll();
+                                       this.utils.disableBodyScroll();
+
+                               },
+                               showOnMobile: function()
+                               {
+                                       this.$modal.css({
+                                               width: '96%',
+                                               marginTop: '2%'
+                                       });
+
+
+                                       this.utils.saveScroll();
+                               },
+                               resize: function()
+                               {
+                                       if (this.utils.isMobile())
+                                       {
+                                               this.modal.showOnMobile();
+                                       }
+                                       else
+                                       {
+                                               this.modal.showOnDesktop();
+                                       }
+                               },
+                               setTitle: function(title)
+                               {
+                                       this.$modalHeader.html(title);
+                               },
+                               setContent: function()
+                               {
+                                       this.$modalBody.html(this.modal.getTemplate(this.modal.templateName));
+                               },
+                               setDraggable: function()
+                               {
+                                       if (typeof $.fn.draggable === 'undefined')
+                                       {
+                                               return;
+                                       }
+
+                                       this.$modal.draggable({ handle: this.$modalHeader });
+                                       this.$modalHeader.css('cursor', 'move');
+                               },
+                               setEnter: function(e)
+                               {
+                                       if (e.which !== 13)
+                                       {
+                                               return;
+                                       }
+
+                                       e.preventDefault();
+                                       this.$modal.find('button.redactor-modal-action-btn').click();
+                               },
+                               createCancelButton: function()
+                               {
+                                       var button = $('<button>').addClass('redactor-modal-btn redactor-modal-close-btn').html(this.lang.get('cancel'));
+                                       button.on('click', $.proxy(this.modal.close, this));
+
+                                       this.$modalFooter.append(button);
+                               },
+                               createDeleteButton: function(label)
+                               {
+                                       return this.modal.createButton(label, 'delete');
+                               },
+                               createActionButton: function(label)
+                               {
+                                       return this.modal.createButton(label, 'action');
+                               },
+                               createButton: function(label, className)
+                               {
+                                       var button = $('<button>').addClass('redactor-modal-btn').addClass('redactor-modal-' + className + '-btn').html(label);
+                                       this.$modalFooter.append(button);
+
+                                       return button;
+                               },
+                               setButtonsWidth: function()
+                               {
+                                       var buttons = this.$modalFooter.find('button');
+                                       var buttonsSize = buttons.length;
+                                       if (buttonsSize === 0)
+                                       {
+                                               return;
+                                       }
+
+                                       buttons.css('width', (100/buttonsSize) + '%');
+                               },
+                               build: function()
+                               {
+                                       this.modal.buildOverlay();
+
+                                       this.$modalBox = $('<div id="redactor-modal-box"/>').hide();
+                                       this.$modal = $('<div id="redactor-modal" role="dialog" />');
+                                       this.$modalHeader = $('<header id="redactor-modal-header" tabindex="1" />');
+                                       this.$modalClose = $('<button type="button" id="redactor-modal-close" tabindex="3" aria-label="' + this.lang.get('close') + '" />').html('&times;');
+                                       this.$modalBody = $('<div id="redactor-modal-body" />');
+                                       this.$modalFooter = $('<footer />');
+
+                                       this.$modal.append(this.$modalHeader);
+                                       this.$modal.append(this.$modalBody);
+                                       this.$modal.append(this.$modalFooter);
+                                       this.$modal.append(this.$modalClose);
+                                       this.$modalBox.append(this.$modal);
+                                       this.$modalBox.appendTo(document.body);
+                               },
+                               buildOverlay: function()
+                               {
+                                       this.$modalOverlay = $('<div id="redactor-modal-overlay">').hide();
+                                       $('body').prepend(this.$modalOverlay);
+                               },
+                               enableEvents: function()
+                               {
+                                       this.$modalClose.on('click.redactor-modal', $.proxy(this.modal.close, this));
+                                       $(document).on('keyup.redactor-modal', $.proxy(this.modal.closeHandler, this));
+                                       this.$editor.on('keyup.redactor-modal', $.proxy(this.modal.closeHandler, this));
+                                       this.$modalBox.on('click.redactor-modal', $.proxy(this.modal.close, this));
+                               },
+                               disableEvents: function()
+                               {
+                                       this.$modalClose.off('click.redactor-modal');
+                                       $(document).off('keyup.redactor-modal');
+                                       this.$editor.off('keyup.redactor-modal');
+                                       this.$modalBox.off('click.redactor-modal');
+                                       $(window).off('resize.redactor-modal');
+                               },
+                               closeHandler: function(e)
+                               {
+                                       if (e.which !== this.keyCode.ESC)
+                                       {
+                                               return;
+                                       }
+
+                                       this.modal.close(false);
+                               },
+                               close: function(e)
+                               {
+                                       if (e)
+                                       {
+                                               if (!$(e.target).hasClass('redactor-modal-close-btn') && e.target !== this.$modalClose[0] && e.target !== this.$modalBox[0])
+                                               {
+                                                       return;
+                                               }
+
+                                               e.preventDefault();
+                                       }
+
+                                       if (!this.$modalBox)
+                                       {
+                                               return;
+                                       }
+
+                                       // restore selection
+                                       this.selection.restore();
+
+                                       this.modal.disableEvents();
+                                       this.utils.enableBodyScroll();
+                                       this.utils.restoreScroll();
+
+                                       this.$modalOverlay.fadeOut(500, $.proxy(function()
+                                       {
+                                               this.$modalOverlay.remove();
+
+                                       }, this));
+
+                                       this.$modalBox.fadeOut(300, $.proxy(function()
+                                       {
+                                               this.$modalBox.remove();
+
+                                               $(document.body).css('overflow', this.modal.bodyOveflow);
+                                               this.core.callback('modalClosed', this.modal.templateName);
+
+                                       }, this));
+
+
+                               }
+                       };
+               },
+
+               // =observe
+               observe: function()
+               {
+                       return {
+                               load: function()
+                               {
+                                       if (typeof this.opts.destroyed !== 'undefined')
+                                       {
+                                               return;
+                                       }
+
+                                       // ie pre & code
+                                       if (this.browser.ie())
+                                       {
+                                               var self = this;
+                                               this.core.editor().find('pre, code').on('mouseover',function()
+                                               {
+                                                       self.events.stopDetect();
+                                                       self.core.editor().attr('contenteditable', false);
+                                                       $(this).attr('contenteditable', true);
+                                                       self.events.startDetect();
+
+                                               }).on('mouseout',function()
+                                               {
+                                                       self.events.stopDetect();
+                                                       self.core.editor().attr('contenteditable', true);
+                                                       $(this).removeAttr('contenteditable');
+                                                       self.events.startDetect();
+
+                                               });
+                                       }
+
+                                       this.observe.images();
+                                       this.observe.links();
+                               },
+                               isCurrent: function($el, $current)
+                               {
+                                       if (typeof $current === 'undefined')
+                                       {
+                                               $current = $(this.selection.current());
+                                       }
+
+                                       return $current.is($el) || $current.parents($el).length > 0;
+                               },
+                               dropdowns: function()
+                               {
+                                       var $current = $(this.selection.current());
+                                       var isRedactor = this.utils.isRedactorParent($current);
+
+                                       $.each(this.opts.observe.dropdowns, $.proxy(function(key, value)
+                                       {
+                                               var observe = value.observe,
+                                                       element = observe.element,
+                                                       $item   = value.item,
+                                                       inValues = typeof observe.in !== 'undefined' ? observe.in : false,
+                                                       outValues = typeof observe.out !== 'undefined' ? observe.out : false;
+
+                                               if ($current.closest(element).size() > 0 && isRedactor)
+                                               {
+                                                       this.observe.setDropdownProperties($item, inValues, outValues);
+                                               }
+                                               else
+                                               {
+                                                       this.observe.setDropdownProperties($item, outValues, inValues);
+                                               }
+
+                                       }, this));
+                               },
+                               setDropdownProperties: function($item, addProperties, deleteProperties)
+                               {
+                                       if (deleteProperties && typeof deleteProperties.attr !== 'undefined')
+                                       {
+                                               this.observe.setDropdownAttr($item, deleteProperties.attr, true);
+                                       }
+
+                                       if (typeof addProperties.attr !== 'undefined')
+                                       {
+                                               this.observe.setDropdownAttr($item, addProperties.attr);
+                                       }
+
+                                       if (typeof addProperties.title !== 'undefined')
+                                       {
+                                               $item.text(addProperties.title);
+                                       }
+                               },
+                               setDropdownAttr: function($item, properties, isDelete)
+                               {
+                                       $.each(properties, function(key, value)
+                                       {
+                                               if (key === 'class')
+                                               {
+                                                       if (!isDelete)
+                                                       {
+                                                               $item.addClass(value);
+                                                       }
+                                                       else
+                                                       {
+                                                               $item.removeClass(value);
+                                                       }
+                                               }
+                                               else
+                                               {
+                                                       if (!isDelete)
+                                                       {
+                                                               $item.attr(key, value);
+                                                       }
+                                                       else
+                                                       {
+                                                               $item.removeAttr(key);
+                                                       }
+                                               }
+                                       });
+                               },
+                               addDropdown: function($item, btnName, btnObject)
+                               {
+                                       if (typeof btnObject.observe === "undefined")
+                                       {
+                                               return;
+                                       }
+
+                                       btnObject.item = $item;
+
+                                       this.opts.observe.dropdowns.push(btnObject);
+                               },
+                               images: function()
+                               {
+                                       this.core.editor().find('img').each($.proxy(function(i, img)
+                                       {
+                                               var $img = $(img);
+
+                                               // IE fix (when we clicked on an image and then press backspace IE does goes to image's url)
+                                               $img.closest('a', this.$editor[0]).on('click', function(e) { e.preventDefault(); });
+
+                                               if (this.browser.ie())
+                                               {
+                                                       $img.attr('unselectable', 'on');
+                                               }
+
+                                               this.image.setEditable($img);
+
+                                       }, this));
+
+                               },
+                               links: function()
+                               {
+                                       if (!this.opts.linkTooltip)
+                                       {
+                                               return;
+                                       }
+
+                                       this.core.editor().find('a').on('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid, $.proxy(this.observe.showTooltip, this));
+                                       this.core.editor().on('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid, $.proxy(this.observe.closeTooltip, this));
+                                       $(document).on('touchstart.redactor.' + this.uuid + ' click.redactor.' + this.uuid, $.proxy(this.observe.closeTooltip, this));
+                               },
+                               getTooltipPosition: function($link)
+                               {
+                                       return $link.offset();
+                               },
+                               showTooltip: function(e)
+                               {
+                                       var $el = $(e.target);
+
+                                       if ($el[0].tagName === 'IMG')
+                                       {
+                                               return;
+                                       }
+
+                                       if ($el[0].tagName !== 'A')
+                                       {
+                                               $el = $el.closest('a', this.$editor[0]);
+                                       }
+
+                                       if ($el[0].tagName !== 'A')
+                                       {
+                                               return;
+                                       }
+
+                                       var $link = $el;
+
+                                       var pos = this.observe.getTooltipPosition($link);
+                                       var tooltip = $('<span class="redactor-link-tooltip"></span>');
+
+                                       var href = $link.attr('href');
+                                       if (href === undefined)
+                                       {
+                                               href = '';
+                                       }
+
+                                       if (href.length > 24)
+                                       {
+                                               href = href.substring(0, 24) + '...';
+                                       }
+
+                                       var aLink = $('<a href="' + $link.attr('href') + '" target="_blank" />').html(href).addClass('redactor-link-tooltip-action');
+                                       var aEdit = $('<a href="#" />').html(this.lang.get('edit')).on('click', $.proxy(this.link.show, this)).addClass('redactor-link-tooltip-action');
+                                       var aUnlink = $('<a href="#" />').html(this.lang.get('unlink')).on('click', $.proxy(this.link.unlink, this)).addClass('redactor-link-tooltip-action');
+
+                                       tooltip.append(aLink).append(' | ').append(aEdit).append(' | ').append(aUnlink);
+                                       tooltip.css({
+                                               top: (pos.top + parseInt($link.css('line-height'), 10)) + 'px',
+                                               left: pos.left + 'px'
+                                       });
+
+                                       $('.redactor-link-tooltip').remove();
+                                       $('body').append(tooltip);
+                               },
+                               closeTooltip: function(e)
+                               {
+                                       e = e.originalEvent || e;
+
+                                       var target = e.target;
+                                       var $parent = $(target).closest('a', this.$editor[0]);
+                                       if ($parent.length !== 0 && $parent[0].tagName === 'A' && target.tagName !== 'A')
+                                       {
+                                               return;
+                                       }
+                                       else if ((target.tagName === 'A' && this.utils.isRedactorParent(target)) || $(target).hasClass('redactor-link-tooltip-action'))
+                                       {
+                                               return;
+                                       }
+
+                                       $('.redactor-link-tooltip').remove();
+                               }
+
+                       };
+               },
+
+               // =paragraphize
+               paragraphize: function()
+               {
+                       return {
+                               load: function(html)
+                               {
+                                       if (this.opts.paragraphize === false || this.opts.type === 'inline' || this.opts.type === 'pre')
+                                       {
+                                               return html;
+                                       }
+
+                                       if (html === '' || html === '<p></p>')
+                                       {
+                                               return this.opts.emptyHtml;
+                                       }
+
+                                       html = html + "\n";
+
+                                       this.paragraphize.safes = [];
+                                       this.paragraphize.z = 0;
+
+                                       html = html.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi, '</blockquote>');
+
+                                       html = this.paragraphize.getSafes(html);
+                                       html = this.paragraphize.convert(html);
+                                       html = this.paragraphize.clear(html);
+                                       html = this.paragraphize.restoreSafes(html);
+
+                                       html = html.replace(new RegExp('<br\\s?/?>\n?<(' + this.opts.paragraphizeBlocks.join('|') + ')(.*?[^>])>', 'gi'), '<p><br /></p>\n<$1$2>');
+
+                                       return $.trim(html);
+                               },
+                               getSafes: function(html)
+                               {
+                                       var $div = $('<div />').append(html);
+
+                                       // remove paragraphs in blockquotes
+                                       $div.find('blockquote p').replaceWith(function()
+                                       {
+                                               return $(this).append('<br />').contents();
+                                       });
+
+                                       html = $div.html();
+
+                                       $div.find(this.opts.paragraphizeBlocks.join(', ')).each($.proxy(function(i,s)
+                                       {
+                                               this.paragraphize.z++;
+                                               this.paragraphize.safes[this.paragraphize.z] = s.outerHTML;
+                                               html = html.replace(s.outerHTML, '\n{replace' + this.paragraphize.z + '}\n');
+
+                                       }, this));
+
+                                       return html;
+                               },
+                               restoreSafes: function(html)
+                               {
+                                       $.each(this.paragraphize.safes, function(i,s)
+                                       {
+                                               s = (typeof s !== 'undefined') ? s.replace(/\$/g, '&#36;') : s;
+                                               html = html.replace('{replace' + i + '}', s);
+
+                                       });
+
+                                       return html;
+                               },
+                               convert: function(html)
+                               {
+                                       html = html.replace(/\r\n/g, "xparagraphmarkerz");
+                                       html = html.replace(/\n/g, "xparagraphmarkerz");
+                                       html = html.replace(/\r/g, "xparagraphmarkerz");
+
+                                       var re1 = /\s+/g;
+                                       html = html.replace(re1, " ");
+                                       html = $.trim(html);
+
+                                       var re2 = /xparagraphmarkerzxparagraphmarkerz/gi;
+                                       html = html.replace(re2, "</p><p>");
+
+                                       var re3 = /xparagraphmarkerz/gi;
+                                       html = html.replace(re3, "<br>");
+
+                                       html = '<p>' + html + '</p>';
+
+
+                                       html = html.replace("<p></p>", "");
+                                       html = html.replace("\r\n\r\n", "");
+                                       html = html.replace(/<\/p><p>/g, "</p>\r\n\r\n<p>");
+                                       html = html.replace(new RegExp("<p><br />", "g"), "<p>");
+                                       html = html.replace(new RegExp("<p><br>", "g"), "<p>");
+                                       html = html.replace(new RegExp("<br></p>", "g"), "</p>");
+                                       html = html.replace(/<p>&nbsp;<\/p>/gi, "");
+
+                                       return html;
+                               },
+                               clear: function(html)
+                               {
+                                       html = html.replace(/<p>(.*?){replace(.*?)\}\s?<\/p>/gi, '{replace$2}');
+
+                                       html = html.replace(new RegExp('</blockquote></p>', 'gi'), '</blockquote>');
+                                       html = html.replace(new RegExp('<p></blockquote>', 'gi'), '</blockquote>');
+                                       html = html.replace(new RegExp('<p><blockquote>', 'gi'), '<blockquote>');
+                                       html = html.replace(new RegExp('<blockquote></p>', 'gi'), '<blockquote>');
+
+                                       html = html.replace(new RegExp('<p><p ', 'gi'), '<p ');
+                                       html = html.replace(new RegExp('<p><p>', 'gi'), '<p>');
+                                       html = html.replace(new RegExp('</p></p>', 'gi'), '</p>');
+                                       html = html.replace(new RegExp('<p>\\s?</p>', 'gi'), '');
+                                       html = html.replace(new RegExp("\n</p>", 'gi'), '</p>');
+                                       html = html.replace(new RegExp('<p>\t?\t?\n?<p>', 'gi'), '<p>');
+                                       html = html.replace(new RegExp('<p>\t*</p>', 'gi'), '');
+
+                                       return html;
+                               }
+                       };
+               },
+
+               // =paste
+               paste: function()
+               {
+                       return {
+                               init: function(e)
+                               {
+                                       this.rtePaste = true;
+
+                                       e.preventDefault();
+
+                                       var data = ((e.originalEvent || e).clipboardData || window.clipboardData);
+
+                                       // get text
+                                       var html = data.getData('text/html') || data.getData('text');
+                                       var pre = false;
+                                       if (this.opts.type !== 'pre' && !this.utils.isCurrentOrParent('pre'))
+                                       {
+                                               // save links
+                                               html = html.replace(/<a(.*?)href="(.*?)"(.*?[^>])>(.*?)<\/a>/gi, '###a href="$2"###$4###/a###');
+
+                                               html = html.replace(/<!--[\s\S]*?-->/gi, '');
+                                               html = html.replace(/<style[\s\S]*?style>/gi, '');
+                                               html = html.replace(/<br\s?\/?>|<\/p>|<\/div>|<\/li>|<\/td>/gi, '\n');
+                                               html = html.replace(/<\/H[1-6]>/gi, '\n\n');
+
+                                               var tmp = document.createElement('div');
+                                               tmp.innerHTML = html;
+                                               html = $.trim(tmp.textContent || tmp.innerText);
+                                       }
+                                       else
+                                       {
+                                               pre = true;
+
+                                               // pre clean
+                                               html = html.replace(/^<meta charset='(.*?)'>/i, '');
+
+                                               if (html.match(/^<pre style="(.*?)">/i))
+                                               {
+                                                       html = html.replace(/^<pre style="(.*?)">/i, '');
+                                                       html = html.replace(/<\/pre>$/i, '');
+                                               }
+
+                                       }
+
+                                       // clean
+                                       html = this.clean.onPaste(html);
+
+                                       // revert links
+                                       html = html.replace(/###a href="(.*?)"###(.*?)###\/a###/gi, '<a href="$1">$2</a>');
+
+                                       // callback
+                                       var returned = this.core.callback('paste', html);
+                                       html = (typeof returned === 'undefined') ? html : returned;
+
+                                       // buffer
+                                       this.buffer.set();
+
+                                       // insert
+                                       if (this.paste.text)
+                                       {
+                                               this.insert.text(html);
+                                       }
+                                       else
+                                       {
+                                               this.insert.raw(html);
+                                       }
+
+                                       this.rtePaste = false;
+
+                                       // clean pre empty paragraph at the end
+                                       if (pre)
+                                       {
+                                               var block = $(this.selection.block()).closest('pre', this.core.editor()[0]);
+                                               $(block).find('p').remove();
+                                       }
+
+                               }
+                       };
+               },
+
+               // =placeholder
+               placeholder: function()
+               {
+                       return {
+                               enable: function()
+                               {
+                                       if (!this.placeholder.is())
+                                       {
+                                               return;
+                                       }
+
+                                       var position = this.core.editor().css('position');
+                                       var arr = ['absolute', 'fixed', 'relative'];
+                                       if ($.inArray(arr, position) === -1)
+                                       {
+                                               this.core.editor().addClass('redactor-relative');
+                                       }
+
+                                       var top = this.core.editor().css('padding-top');
+                                       var left = this.core.editor().css('padding-left');
+                                       $('<style class="redactor-style-tag">#' + this.core.id() + '.redactor-placeholder::after{ top: ' + top + '; left: ' + left + '; }</style>').appendTo('head');
+
+                                       this.core.editor().attr('placeholder', this.$element.attr('placeholder'));
+
+                                       this.placeholder.toggle();
+                                       this.core.editor().on('keydown.redactor-placeholder', $.proxy(this.placeholder.toggle, this));
+                               },
+                               toggle: function()
+                               {
+                                       setTimeout($.proxy(function()
+                                       {
+                                               var func = this.utils.isEmpty() ? 'addClass' : 'removeClass';
+                                               this.core.editor()[func]('redactor-placeholder');
+
+                                       }, this), 5);
+                               },
+                               remove: function()
+                               {
+                                       this.core.editor().removeClass('redactor-placeholder');
+                               },
+                               is: function()
+                               {
+                                       if (this.opts.placeholder)
+                                       {
+                                               return this.$element.attr('placeholder', this.opts.placeholder);
+                                       }
+                                       else
+                                       {
+                                               return !(typeof this.$element.attr('placeholder') === 'undefined' || this.$element.attr('placeholder') === '');
+                                       }
+                               }
+                       };
+               },
+
+               // =progress
+               progress: function()
+               {
+                       return {
+                               show: function()
+                               {
+                                       $(document.body).append($('<div id="redactor-progress"><span></span></div>'));
+                                       $('#redactor-progress').fadeIn();
+                               },
+                               hide: function()
+                               {
+                                       $('#redactor-progress').fadeOut(1500, function()
+                                       {
+                                               $(this).remove();
+                                       });
+                               }
+
+                       };
+               },
+
+               // =selection
+               selection: function()
+               {
+                       return {
+                               get: function()
+                               {
+                                       if (window.getSelection)
+                                       {
+                                               return window.getSelection();
+                                       }
+                                       else if (document.selection && document.selection.type !== "Control")
+                                       {
+                                               return document.selection;
+                                       }
+
+                                       return null;
+                               },
+                               range: function(sel)
+                               {
+                                       if (typeof sel === 'undefined')
+                                       {
+                                               sel = this.selection.get();
+                                       }
+
+                                       if (sel.getRangeAt && sel.rangeCount)
+                                       {
+                                               return sel.getRangeAt(0);
+                                       }
+
+                                       return null;
+                               },
+                               update: function(sel, range)
+                               {
+                                       if (range === null)
+                                       {
+                                               return;
+                                       }
+
+                                       sel.removeAllRanges();
+                                       sel.addRange(range);
+                               },
+                               current: function()
+                               {
+                                       var sel = this.selection.get();
+
+                                       return (sel === null) ? false : sel.anchorNode;
+                               },
+                               parent: function()
+                               {
+                                       var current = this.selection.current();
+
+                                       return (current === null) ? false : current.parentNode;
+                               },
+                               block: function(node)
+                               {
+                                       node = node || this.selection.current();
+
+                                       while (node)
+                                       {
+                                               if (this.utils.isBlockTag(node.tagName))
+                                               {
+                                                       return ($(node).hasClass('redactor-in')) ? false : node;
+                                               }
+
+                                               node = node.parentNode;
+                                       }
+
+                                       return false;
+                               },
+                               inline: function(node)
+                               {
+                                       node = node || this.selection.current();
+
+                                       while (node)
+                                       {
+                                               if (this.utils.isInlineTag(node.tagName))
+                                               {
+                                                       return ($(node).hasClass('redactor-in')) ? false : node;
+                                               }
+
+                                               node = node.parentNode;
+                                       }
+
+                                       return false;
+                               },
+                               element: function(node)
+                               {
+                                       if (!node)
+                                       {
+                                               node = this.selection.current();
+                                       }
+
+                                       while (node)
+                                       {
+                                               if (node.nodeType === 1)
+                                               {
+                                                       if ($(node).hasClass('redactor-in'))
+                                                       {
+                                                               return false;
+                                                       }
+
+                                                       return node;
+                                               }
+
+                                               node = node.parentNode;
+                                       }
+
+                                       return false;
+                               },
+                               prev: function()
+                               {
+                                       var current = this.selection.current();
+
+                                       return (current === null) ? false : this.selection.current().previousSibling;
+                               },
+                               next: function()
+                               {
+                                       var current = this.selection.current();
+
+                                       return (current === null) ? false : this.selection.current().nextSibling;
+                               },
+                               blocks: function()
+                               {
+                                       var blocks = [];
+                                       var nodes = this.selection.nodes();
+
+                                       $.each(nodes, $.proxy(function(i,node)
+                                       {
+                                               if (this.utils.isBlock(node))
+                                               {
+                                                       blocks.push(node);
+                                               }
+
+                                       }, this));
+
+                                       return (blocks.length === 0) ? [this.selection.block()] : blocks;
+                               },
+                               inlines: function()
+                               {
+                                       var inlines = [];
+                                       var nodes = this.selection.nodes();
+
+                                       $.each(nodes, $.proxy(function(i,node)
+                                       {
+                                               if (this.utils.isInline(node))
+                                               {
+                                                       inlines.push(node);
+                                               }
+
+                                       }, this));
+
+                                       return (inlines.length === 0) ? [this.selection.inline()] : inlines;
+                               },
+                               nodes: function()
+                               {
+                                       var sel = this.selection.get();
+                                       var range = this.selection.range(sel);
+                                       if (this.utils.isCollapsed())
+                                       {
+                                               return [this.selection.current()];
+                                       }
+                                       else
+                                       {
+                                               var node = range.startContainer;
+                                               var endNode = range.endContainer;
+
+                                               // single node
+                                               if (node === endNode)
+                                               {
+                                                       return [node];
+                                               }
+
+                                               // iterate
+                                               var nodes = [];
+                                               while (node && node !== endNode)
+                                               {
+                                                       nodes.push(node = this.selection.nextNode(node));
+                                               }
+
+                                               // partially selected nodes
+                                               node = range.startContainer;
+                                               while (node && node !== range.commonAncestorContainer)
+                                               {
+                                                       nodes.unshift(node);
+                                                       node = node.parentNode;
+                                               }
+
+                                               // remove service nodes
+                                               var resultNodes = [];
+                                               $.each(nodes, function(i,s)
+                                               {
+                                                       if (!$(s).hasClass('redactor-script-tag, redactor-selection-marker'))
+                                                       {
+                                                               resultNodes.push(s);
+                                                       }
+                                               });
+
+                                               return (resultNodes.length === 0) ? [false] : resultNodes;
+                                       }
+
+                               },
+                               nextNode: function(node)
+                               {
+                                       if (node.hasChildNodes())
+                                       {
+                                               return node.firstChild;
+                                       }
+                                       else
+                                       {
+                                               while (node && !node.nextSibling)
+                                               {
+                                                       node = node.parentNode;
+                                               }
+
+                                               if (!node)
+                                               {
+                                                       return null;
+                                               }
+
+                                               return node.nextSibling;
+                                       }
+                               },
+                               save: function()
+                               {
+                                       var sel = this.selection.get();
+                                       var range = this.selection.range(sel);
+                                       var node1 = this.selection.marker(1);
+
+                                       this.insert.marker(range, node1, true);
+                                       if (range && range.collapsed === false)
+                                       {
+                                               var node2 = this.selection.marker(2);
+                                               this.insert.marker(range, node2, false);
+                                       }
+
+                                       this.savedSel = this.core.editor().html();
+                               },
+                               restore: function(removeMarkers)
+                               {
+                                       var node1 = this.core.editor().find('span#selection-marker-1');
+                                       var node2 = this.core.editor().find('span#selection-marker-2');
+
+                                       if (this.browser.ff())
+                                       {
+                                               this.core.editor().focus();
+                                       }
+
+                                       if (node1.length !== 0 && node2.length !== 0)
+                                       {
+                                               this.caret.set(node1, node2);
+                                       }
+                                       else if (node1.length !== 0)
+                                       {
+                                               this.caret.start(node1);
+                                       }
+                                       else
+                                       {
+                                               this.core.editor().focus();
+                                       }
+
+                                       if (removeMarkers !== false)
+                                       {
+                                               this.selection.removeMarkers();
+                                               this.savedSel = false;
+                                       }
+
+                               },
+                               removeMarkers: function()
+                               {
+                                       this.core.editor().find('.redactor-selection-marker').each(function(i,s)
+                                       {
+                                               var text = $(s).text().replace(/\u200B/g, '');
+                                               if (text === '')
+                                               {
+                                                       $(s).remove();
+                                               }
+                                               else
+                                               {
+                                                       $(s).replaceWith(function() { return $(this).contents(); });
+                                               }
+                                       });
+                               },
+                               marker: function(num)
+                               {
+                                       if (typeof num === 'undefined')
+                                       {
+                                               num = 1;
+                                       }
+
+                                       return $('<span id="selection-marker-' + num + '" class="redactor-selection-marker"  data-verified="redactor">' + this.opts.invisibleSpace + '</span>')[0];
+                               },
+                               markerHtml: function(num)
+                               {
+                                       return this.utils.getOuterHtml(this.selection.marker(num));
+                               },
+                               node: function(node)
+                               {
+                                       $(node).prepend(this.selection.marker(1));
+                                       $(node).append(this.selection.marker(2));
+
+                                       this.selection.restore();
+                               },
+                               all: function()
+                               {
+                                       this.core.editor().focus();
+
+                                       var sel = this.selection.get();
+                                       var range = this.selection.range(sel);
+
+                                       range.selectNodeContents(this.core.editor()[0]);
+
+                                       this.selection.update(sel, range);
+                               },
+                               remove: function()
+                               {
+                                       this.selection.get().removeAllRanges();
+                               },
+                               replace: function(html)
+                               {
+                                       this.insert.html(html);
+                               },
+                               text: function()
+                               {
+                                       return this.selection.get().toString();
+                               },
+                               html: function()
+                               {
+                                       var html = '';
+                                       var sel = this.selection.get();
+
+                                       if (sel.rangeCount)
+                                       {
+                                               var container = document.createElement('div');
+                                               var len = sel.rangeCount;
+                                               for (var i = 0; i < len; ++i)
+                                               {
+                                                       container.appendChild(sel.getRangeAt(i).cloneContents());
+                                               }
+
+                                               html = this.clean.onGet(container.innerHTML);
+                                       }
+
+                                       return html;
+                               }
+
+                       };
+               },
+
+               // =shortcuts
+               shortcuts: function()
+               {
+                       return {
+                               init: function(e, key)
+                               {
+                                       // disable browser's hot keys for bold and italic
+                                       if (!this.opts.shortcuts)
+                                       {
+                                               if ((e.ctrlKey || e.metaKey) && (key === 66 || key === 73))
+                                               {
+                                                       e.preventDefault();
+                                               }
+
+                                               return false;
+                                       }
+
+
+                                       $.each(this.opts.shortcuts, $.proxy(function(str, command)
+                                       {
+                                               var keys = str.split(',');
+                                               var len = keys.length;
+                                               var handler = $.proxy(function()
+                                               {
+                                                       var func;
+                                                       if (command.func.search(/\./) !== '-1')
+                                                       {
+                                                               func = command.func.split('.');
+                                                               if (typeof this[func[0]] !== 'undefined')
+                                                               {
+                                                                       this[func[0]][func[1]].apply(this, command.params);
+                                                               }
+                                                       }
+                                                       else
+                                                       {
+                                                               this[command.func].apply(this, command.params);
+                                                       }
+
+                                               }, this);
+
+                                               for (var i = 0; i < len; i++)
+                                               {
+                                                       if (typeof keys[i] === 'string')
+                                                       {
+                                                               this.shortcuts.handler(e, $.trim(keys[i]), handler);
+                                                       }
+
+                                               }
+
+                                       }, this));
+                               },
+                               handler: function(e, keys, origHandler)
+                               {
+                                       // based on https://github.com/jeresig/jquery.hotkeys
+                                       var hotkeysSpecialKeys =
+                                       {
+                                               8: "backspace", 9: "tab", 10: "return", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
+                                               20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
+                                               37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 59: ";", 61: "=",
+                                               96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
+                                               104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
+                                               112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
+                                               120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 173: "-", 186: ";", 187: "=",
+                                               188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'"
+                                       };
+
+
+                                       var hotkeysShiftNums =
+                                       {
+                                               "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
+                                               "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
+                                               ".": ">",  "/": "?",  "\\": "|"
+                                       };
+
+                                       keys = keys.toLowerCase().split(" ");
+                                       var special = hotkeysSpecialKeys[e.keyCode],
+                                               character = String.fromCharCode( e.which ).toLowerCase(),
+                                               modif = "", possible = {};
+
+                                       $.each([ "alt", "ctrl", "meta", "shift"], function(index, specialKey)
+                                       {
+                                               if (e[specialKey + 'Key'] && special !== specialKey)
+                                               {
+                                                       modif += specialKey + '+';
+                                               }
+                                       });
+
+
+                                       if (special)
+                                       {
+                                               possible[modif + special] = true;
+                                       }
+
+                                       if (character)
+                                       {
+                                               possible[modif + character] = true;
+                                               possible[modif + hotkeysShiftNums[character]] = true;
+
+                                               // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
+                                               if (modif === "shift+")
+                                               {
+                                                       possible[hotkeysShiftNums[character]] = true;
+                                               }
+                                       }
+
+                                       for (var i = 0, len = keys.length; i < len; i++)
+                                       {
+                                               if (possible[keys[i]])
+                                               {
+                                                       e.preventDefault();
+                                                       return origHandler.apply(this, arguments);
+                                               }
+                                       }
+                               }
+                       };
+               },
+
+               // =toolbar
+               toolbar: function()
+               {
+                       return {
+                               custom: function()
+                               {
+                                       $(document).find('[data-cmd]').each($.proxy(function(i,s)
+                                       {
+                                               var $el = $(s);
+                                               var func = $el.data('cmd');
+                                               var args = $el.data('args');
+
+                                               $el.addClass('redactor-data-cmd');
+                                               $el.on('click.redactor-data-cmd', $.proxy(function(e)
+                                               {
+                                                       e.preventDefault();
+
+                                                       if (func === 'func')
+                                                       {
+                                                               var fn = window[args];
+                                                               if (typeof fn === 'function')
+                                                               {
+                                                                       fn.call(this, $el, e);
+                                                               }
+                                                       }
+                                                       else
+                                                       {
+                                                               var cmd = func.split('.');
+                                                               if (typeof this[cmd[0]] !== 'undefined')
+                                                               {
+                                                                       if (!$.isArray(args))
+                                                                       {
+                                                                               args = (args) ? args.split('|') : undefined;
+                                                                       }
+
+                                                                       this[cmd[0]][cmd[1]].apply(this, args);
+                                                               }
+
+                                                       }
+
+                                               }, this));
+
+
+                                       }, this));
+                               },
+                               build: function()
+                               {
+                                       this.button.hideButtons();
+                                       this.button.hideButtonsOnMobile();
+
+                                       if (this.opts.buttons.length === 0)
+                                       {
+                                               return;
+                                       }
+
+                                       this.$toolbar = this.toolbar.createContainer();
+
+                                       this.toolbar.setOverflow();
+                                       this.toolbar.append();
+                                       this.button.$toolbar = this.$toolbar;
+                                       this.button.setFormatting();
+                                       this.button.load(this.$toolbar);
+                                       this.toolbar.setFixed();
+                               },
+                               createContainer: function()
+                               {
+                                       return $('<ul>').addClass('redactor-toolbar').attr({ 'id': 'redactor-toolbar-' + this.uuid, 'role': 'toolbar' });
+                               },
+                               append: function()
+                               {
+                                       if (this.opts.toolbarExternal)
+                                       {
+                                               this.$toolbar.addClass('redactor-toolbar-external');
+                                               $(this.opts.toolbarExternal).html(this.$toolbar);
+                                       }
+                                       else
+                                       {
+                                               if (this.opts.type === 'textarea')
+                                               {
+                                                       this.$box.prepend(this.$toolbar);
+                                               }
+                                               else
+                                               {
+                                                       this.$element.before(this.$toolbar);
+                                               }
+
+                                       }
+                               },
+                               setOverflow: function()
+                               {
+                                       if (this.utils.isMobile() || this.opts.toolbarOverflow)
+                                       {
+                                               this.$toolbar.addClass('redactor-toolbar-overflow');
+                                       }
+                               },
+                               setFixed: function()
+                               {
+                                       if (!this.utils.isDesktop() || !this.opts.toolbarFixed || this.opts.toolbarExternal)
+                                       {
+                                               return;
+                                       }
+
+                                       if (this.opts.toolbarFixedTarget !== document)
+                                       {
+                                               var $el = $(this.opts.toolbarFixedTarget);
+                                               this.toolbarOffsetTop = ($el.length === 0) ? 0 : this.core.box().offset().top - $el.offset().top;
+                                       }
+
+                                       // bootstrap modal fix
+                                       var late = (this.core.box().closest('.modal-body').length !== 0) ? 1000 : 0;
+
+                                       setTimeout($.proxy(function()
+                                       {
+                                               this.toolbar.observeScroll();
+                                               $(this.opts.toolbarFixedTarget).on('scroll.redactor.' + this.uuid, $.proxy(this.toolbar.observeScroll, this));
+
+                                       }, this), late);
+
+
+                               },
+                               getBoxTop: function()
+                               {
+                                       return (this.opts.toolbarFixedTarget === document) ? this.core.box().offset().top : this.toolbarOffsetTop;
+                               },
+                               observeScroll: function()
+                               {
+
+                                       var tolerance = (this.opts.toolbarFixedTarget === document) ? 20 : 0;
+                                       var scrollTop = $(this.opts.toolbarFixedTarget).scrollTop();
+                                       var boxTop = this.toolbar.getBoxTop();
+
+                                       if ((scrollTop + this.opts.toolbarFixedTopOffset + tolerance) > boxTop)
+                                       {
+                                               this.toolbar.observeScrollEnable(scrollTop, boxTop);
+                                       }
+                                       else
+                                       {
+                                               this.toolbar.observeScrollDisable();
+                                       }
+                               },
+                               observeScrollResize: function()
+                               {
+                                       this.$toolbar.css({
+
+                                               width: this.core.box().innerWidth(),
+                                               left: this.core.box().offset().left
+
+                                       });
+                               },
+                               observeScrollEnable: function(scrollTop, boxTop)
+                               {
+                                       if (typeof this.fullscreen !== 'undefined' && this.fullscreen.isOpened === false)
+                                       {
+                                               this.toolbar.observeScrollDisable();
+                                               return;
+                                       }
+
+                                       var end = boxTop + this.core.box().outerHeight() - 32;
+                                       var width = this.core.box().innerWidth();
+                                       var position = 'fixed';
+                                       var top = this.opts.toolbarFixedTopOffset;
+                                       var left = this.core.box().offset().left;
+
+                                       if (this.opts.toolbarFixedTarget !== document)
+                                       {
+                                                position = 'absolute';
+                                                top = this.opts.toolbarFixedTopOffset + $(this.opts.toolbarFixedTarget).scrollTop() - boxTop - 1;
+                                                left = 0;
+                                       }
+
+                                       this.$toolbar.addClass('toolbar-fixed-box');
+                                       this.$toolbar.css({
+                                               position: position,
+                                               width: width,
+                                               top: top,
+                                               left: left
+                                       });
+
+                                       if (scrollTop > end)
+                                       {
+                                               $('.redactor-dropdown-' + this.uuid + ':visible').hide();
+                                       }
+
+                                       this.toolbar.setDropdownsFixed();
+                                       this.$toolbar.css('visibility', (scrollTop < end) ? 'visible' : 'hidden');
+                                       $(window).on('resize.redactor-toolbar.' + this.uuid, $.proxy(this.toolbar.observeScrollResize, this));
+                               },
+                               observeScrollDisable: function()
+                               {
+                                       this.$toolbar.css({
+                                               position: 'relative',
+                                               width: 'auto',
+                                               top: '-1px',
+                                               left: 0,
+                                               visibility: 'visible'
+                                       });
+
+                                       this.toolbar.unsetDropdownsFixed();
+                                       this.$toolbar.removeClass('toolbar-fixed-box');
+                                       $(window).off('resize.redactor-toolbar.' + this.uuid);
+                               },
+                               setDropdownsFixed: function()
+                               {
+                                       var position = (this.opts.toolbarFixedTarget === document) ? 'fixed' : 'absolute';
+                                       this.toolbar.setDropdownPosition(position);
+                               },
+                               unsetDropdownsFixed: function()
+                               {
+                                       this.toolbar.setDropdownPosition('absolute');
+                               },
+                               setDropdownPosition: function(position)
+                               {
+                                       var self = this;
+                                       $('.redactor-dropdown-' + this.uuid).each(function()
+                                       {
+                                               var $el = $(this);
+                                               var $button = self.button.get($el.attr('rel'));
+                                               var top = (position === 'fixed') ? self.opts.toolbarFixedTopOffset : $button.offset().top;
+
+                                               $el.css({ position: position, top: ($button.innerHeight() + top) + 'px' });
+                                       });
+                               }
+                       };
+               },
+
+               // =upload
+               upload: function()
+               {
+                       return {
+                               init: function(id, url, callback)
+                               {
+                                       this.upload.direct = false;
+                                       this.upload.callback = callback;
+                                       this.upload.url = url;
+                                       this.upload.$el = $(id);
+                                       this.upload.$droparea = $('<div id="redactor-droparea" />');
+
+                                       this.upload.$placeholdler = $('<div id="redactor-droparea-placeholder" />').text(this.lang.get('upload-label'));
+                                       this.upload.$input = $('<input type="file" name="file" />');
+
+                                       this.upload.$placeholdler.append(this.upload.$input);
+                                       this.upload.$droparea.append(this.upload.$placeholdler);
+                                       this.upload.$el.append(this.upload.$droparea);
+
+                                       this.upload.$droparea.off('redactor.upload');
+                                       this.upload.$input.off('redactor.upload');
+
+                                       this.upload.$droparea.on('dragover.redactor.upload', $.proxy(this.upload.onDrag, this));
+                                       this.upload.$droparea.on('dragleave.redactor.upload', $.proxy(this.upload.onDragLeave, this));
+
+                                       // change
+                                       this.upload.$input.on('change.redactor.upload', $.proxy(function(e)
+                                       {
+                                               e = e.originalEvent || e;
+                                               this.upload.traverseFile(this.upload.$input[0].files[0], e);
+                                       }, this));
+
+                                       // drop
+                                       this.upload.$droparea.on('drop.redactor.upload', $.proxy(function(e)
+                                       {
+                                               e.preventDefault();
+
+                                               this.upload.$droparea.removeClass('drag-hover').addClass('drag-drop');
+                                               this.upload.onDrop(e);
+
+                                       }, this));
+                               },
+                               directUpload: function(file, e)
+                               {
+                                       this.upload.direct = true;
+                                       this.upload.traverseFile(file, e);
+                               },
+                               onDrop: function(e)
+                               {
+                                       e = e.originalEvent || e;
+                                       var files = e.dataTransfer.files;
+
+                                       this.upload.traverseFile(files[0], e);
+                               },
+                               traverseFile: function(file, e)
+                               {
+                                       if (this.opts.s3)
+                                       {
+                                               this.upload.setConfig(file);
+                                               this.uploads3.send(file);
+                                               return;
+                                       }
+
+                                       var formData = !!window.FormData ? new FormData() : null;
+                                       if (window.FormData)
+                                       {
+                                               this.upload.setConfig(file);
+
+                                               var name = (this.upload.type === 'image') ? this.opts.imageUploadParam : this.opts.fileUploadParam;
+                                               formData.append(name, file);
+                                       }
+
+                                       this.progress.show();
+                                       this.core.callback('uploadStart', e, formData);
+                                       this.upload.send(formData, e);
+                               },
+                               setConfig: function(file)
+                               {
+                                       this.upload.getType(file);
+
+                                       if (this.upload.direct)
+                                       {
+                                               this.upload.url = (this.upload.type === 'image') ? this.opts.imageUpload : this.opts.fileUpload;
+                                               this.upload.callback = (this.upload.type === 'image') ? this.image.insert : this.file.insert;
+                                       }
+                               },
+                               getType: function(file)
+                               {
+                                       this.upload.type = (this.opts.imageTypes.indexOf(file.type) === -1) ? 'file' : 'image';
+                               },
+                               getHiddenFields: function(obj, fd)
+                               {
+                                       if (obj === false || typeof obj !== 'object')
+                                       {
+                                               return fd;
+                                       }
+
+                                       $.each(obj, $.proxy(function(k, v)
+                                       {
+                                               if (v !== null && v.toString().indexOf('#') === 0)
+                                               {
+                                                       v = $(v).val();
+                                               }
+
+                                               fd.append(k, v);
+
+                                       }, this));
+
+                                       return fd;
+
+                               },
+                               send: function(formData, e)
+                               {
+                                       // append hidden fields
+                                       if (this.upload.type === 'image')
+                                       {
+                                               formData = this.upload.getHiddenFields(this.opts.uploadImageFields, formData);
+                                               formData = this.upload.getHiddenFields(this.upload.imageFields, formData);
+                                       }
+                                       else
+                                       {
+                                               formData = this.upload.getHiddenFields(this.opts.uploadFileFields, formData);
+                                               formData = this.upload.getHiddenFields(this.upload.fileFields, formData);
+                                       }
+
+                                       var xhr = new XMLHttpRequest();
+                                       xhr.open('POST', this.upload.url);
+                                       xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+
+                                       // complete
+                                       xhr.onreadystatechange = $.proxy(function()
+                                       {
+                                           if (xhr.readyState === 4)
+                                           {
+                                               var data = xhr.responseText;
+
+                                                       data = data.replace(/^\[/, '');
+                                                       data = data.replace(/\]$/, '');
+
+                                                       var json;
+                                                       try
+                                                       {
+                                                               json = (typeof data === 'string' ? $.parseJSON(data) : data);
+                                                       }
+                                                       catch(err)
+                                                       {
+                                                               json = { error: true };
+                                                       }
+
+
+                                                       this.progress.hide();
+
+                                                       if (!this.upload.direct)
+                                                       {
+                                                               this.upload.$droparea.removeClass('drag-drop');
+                                                       }
+
+                                                       this.upload.callback(json, this.upload.direct, e);
+                                           }
+                                       }, this);
+
+
+                                       /*
+                                       xhr.upload.onprogress = $.proxy(function(e)
+                                       {
+                                               if (e.lengthComputable)
+                                               {
+                                                       var complete = (e.loaded / e.total * 100 | 0);
+                                                       //progress.value = progress.innerHTML = complete;
+                                               }
+
+                                       }, this);
+                                       */
+
+
+                                       xhr.send(formData);
+                               },
+                               onDrag: function(e)
+                               {
+                                       e.preventDefault();
+                                       this.upload.$droparea.addClass('drag-hover');
+                               },
+                               onDragLeave: function(e)
+                               {
+                                       e.preventDefault();
+                                       this.upload.$droparea.removeClass('drag-hover');
+                               },
+                               clearImageFields: function()
+                               {
+                                       this.upload.imageFields = {};
+                               },
+                               addImageFields: function(name, value)
+                               {
+                                       this.upload.imageFields[name] = value;
+                               },
+                               removeImageFields: function(name)
+                               {
+                                       delete this.upload.imageFields[name];
+                               },
+                               clearFileFields: function()
+                               {
+                                       this.upload.fileFields = {};
+                               },
+                               addFileFields: function(name, value)
+                               {
+                                       this.upload.fileFields[name] = value;
+                               },
+                               removeFileFields: function(name)
+                               {
+                                       delete this.upload.fileFields[name];
+                               }
+                       };
+               },
+
+               // =s3
+               uploads3: function()
+               {
+                       return {
+                               send: function(file)
+                               {
+                                       this.uploads3.executeOnSignedUrl(file, $.proxy(function(signedURL)
+                                       {
+                                               this.uploads3.sendToS3(file, signedURL);
+                                       }, this));
+                               },
+                               executeOnSignedUrl: function(file, callback)
+                               {
+                                       var xhr = new XMLHttpRequest();
+                                       var mark = (this.opts.s3.search(/\?/) !== '-1') ? '?' : '&';
+
+
+                                       xhr.open('GET', this.opts.s3 + mark + 'name=' + file.name + '&type=' + file.type, true);
+
+                                       // Hack to pass bytes through unprocessed.
+                                       if (xhr.overrideMimeType)
+                                       {
+                                               xhr.overrideMimeType('text/plain; charset=x-user-defined');
+                                       }
+
+                                       var that = this;
+                                       xhr.onreadystatechange = function(e)
+                                       {
+                                               if (this.readyState === 4 && this.status === 200)
+                                               {
+                                                       that.progress.show();
+                                                       callback(decodeURIComponent(this.responseText));
+                                               }
+                                               else if (this.readyState === 4 && this.status !== 200)
+                                               {
+                                                       //setProgress(0, 'Could not contact signing script. Status = ' + this.status);
+                                               }
+                                       };
+
+                                       xhr.send();
+                               },
+                               createCORSRequest: function(method, url)
+                               {
+                                       var xhr = new XMLHttpRequest();
+                                       if ("withCredentials" in xhr)
+                                       {
+                                               xhr.open(method, url, true);
+                                       }
+                                       else if (typeof XDomainRequest !== "undefined")
+                                       {
+                                               xhr = new XDomainRequest();
+                                               xhr.open(method, url);
+                                       }
+                                       else
+                                       {
+                                               xhr = null;
+                                       }
+
+                                       return xhr;
+                               },
+                               sendToS3: function(file, url)
+                               {
+                                       var xhr = this.uploads3.createCORSRequest('PUT', url);
+                                       if (!xhr)
+                                       {
+                                               //setProgress(0, 'CORS not supported');
+                                               return;
+                                       }
+
+                                       xhr.onload = $.proxy(function()
+                                       {
+                                               if (xhr.status !== 200)
+                                               {
+                                                       //setProgress(0, 'Upload error: ' + xhr.status);
+                                                       return;
+                                               }
+
+                                               //setProgress(100, 'Upload completed.');
+
+                                               this.progress.hide();
+
+                                               var s3file = url.split('?');
+
+                                               if (!s3file[0])
+                                               {
+                                                        // url parsing is fail
+                                                        return false;
+                                               }
+
+
+                                               if (!this.upload.direct)
+                                               {
+                                                       this.upload.$droparea.removeClass('drag-drop');
+                                               }
+
+                                               var json = { filelink: s3file[0] };
+                                               if (this.upload.type === 'file')
+                                               {
+                                                       var arr = s3file[0].split('/');
+                                                       json.filename = arr[arr.length-1];
+                                               }
+
+                                               this.upload.callback(json, this.upload.direct, false);
+
+
+                                       }, this);
+
+                                       xhr.onerror = function() {};
+                                       xhr.upload.onprogress = function(e) {};
+
+                                       xhr.setRequestHeader('Content-Type', file.type);
+                                       xhr.setRequestHeader('x-amz-acl', 'public-read');
+
+                                       xhr.send(file);
+
+                               }
+                       };
+               },
+
+               // =utils
+               utils: function()
+               {
+                       return {
+                               isEmpty: function(html)
+                               {
+                                       html = (typeof html === 'undefined') ? this.core.editor().html() : html;
+
+                                       html = html.replace(/[\u200B-\u200D\uFEFF]/g, '');
+                                       html = html.replace(/&nbsp;/gi, '');
+                                       html = html.replace(/<\/?br\s?\/?>/g, '');
+                                       html = html.replace(/\s/g, '');
+                                       html = html.replace(/^<p>[^\W\w\D\d]*?<\/p>$/i, '');
+                                       html = html.replace(/<iframe(.*?[^>])>$/i, 'iframe');
+                                       html = html.replace(/<source(.*?[^>])>$/i, 'source');
+
+                                       // remove empty tags
+                                       html = html.replace(/<[^\/>][^>]*><\/[^>]+>/gi, '');
+                                       html = html.replace(/<[^\/>][^>]*><\/[^>]+>/gi, '');
+
+                                       html = $.trim(html);
+
+                                       return html === '';
+                               },
+                               isElement: function(obj)
+                               {
+                                       try {
+                                               // Using W3 DOM2 (works for FF, Opera and Chrome)
+                                               return obj instanceof HTMLElement;
+                                       }
+                                       catch(e)
+                                       {
+                                               return (typeof obj === "object") && (obj.nodeType === 1) && (typeof obj.style === "object") && (typeof obj.ownerDocument === "object");
+                                       }
+                               },
+                               isMobile: function()
+                               {
+                                       return /(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent);
+                               },
+                               isDesktop: function()
+                               {
+                                       return !/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent);
+                               },
+                               getOuterHtml: function(el)
+                               {
+                                       return $('<div>').append($(el).eq(0).clone()).html();
+                               },
+                               // tag detection
+                               inBlocks: function(tags)
+                               {
+                                       tags = ($.isArray(tags)) ? tags : [tags];
+
+                                       var blocks = this.selection.blocks();
+                                       var len = blocks.length;
+                                       var contains = false;
+                                       for (var i = 0; i < len; i++)
+                                       {
+                                               var tag = blocks[i].tagName.toLowerCase();
+
+                                               if ($.inArray(tag, tags) !== -1)
+                                               {
+                                                       contains = true;
+                                               }
+                                       }
+
+                                       return contains;
+
+                               },
+                               inInlines: function(tags)
+                               {
+                                       tags = ($.isArray(tags)) ? tags : [tags];
+
+                                       var inlines = this.selection.inlines();
+                                       var len = inlines.length;
+                                       var contains = false;
+                                       for (var i = 0; i < len; i++)
+                                       {
+                                               var tag = inlines[i].tagName.toLowerCase();
+
+                                               if ($.inArray(tag, tags) !== -1)
+                                               {
+                                                       contains = true;
+                                               }
+                                       }
+
+                                       return contains;
+
+                               },
+                               isTag: function(current, tag)
+                               {
+                                       var element = $(current).closest(tag, this.core.editor()[0]);
+                                       if (element.length === 1)
+                                       {
+                                               return element[0];
+                                       }
+
+                                       return false;
+                               },
+                               isBlock: function(block)
+                               {
+                                       block = block[0] || block;
+
+                                       return block && this.utils.isBlockTag(block.tagName);
+                               },
+                               isBlockTag: function(tag)
+                               {
+                                       return (typeof tag === 'undefined') ? false : this.reIsBlock.test(tag);
+                               },
+                               isInline: function(inline)
+                               {
+                                       inline = inline[0] || inline;
+
+                                       return inline && this.utils.isInlineTag(inline.tagName);
+                               },
+                               isInlineTag: function(tag)
+                               {
+                                       return (typeof tag === 'undefined') ? false : this.reIsInline.test(tag);
+                               },
+                               // parents detection
+                               isRedactorParent: function(el)
+                               {
+                                       if (!el)
+                                       {
+                                               return false;
+                                       }
+
+                                       if ($(el).parents('.redactor-in').length === 0 || $(el).hasClass('redactor-in'))
+                                       {
+                                               return false;
+                                       }
+
+                                       return el;
+                               },
+                               isCurrentOrParentHeader: function()
+                               {
+                                       return this.utils.isCurrentOrParent(['H1', 'H2', 'H3', 'H4', 'H5', 'H6']);
+                               },
+                               isCurrentOrParent: function(tagName)
+                               {
+                                       var parent = this.selection.parent();
+                                       var current = this.selection.current();
+
+                                       if ($.isArray(tagName))
+                                       {
+                                               var matched = 0;
+                                               $.each(tagName, $.proxy(function(i, s)
+                                               {
+                                                       if (this.utils.isCurrentOrParentOne(current, parent, s))
+                                                       {
+                                                               matched++;
+                                                       }
+                                               }, this));
+
+                                               return (matched === 0) ? false : true;
+                                       }
+                                       else
+                                       {
+                                               return this.utils.isCurrentOrParentOne(current, parent, tagName);
+                                       }
+                               },
+                               isCurrentOrParentOne: function(current, parent, tagName)
+                               {
+                                       tagName = tagName.toUpperCase();
+
+                                       return parent && parent.tagName === tagName ? parent : current && current.tagName === tagName ? current : false;
+                               },
+                               // scroll
+                               freezeScroll: function()
+                               {
+                                       this.freezeScrollTop = $(document).scrollTop();
+                                       $(document).scrollTop(this.freezeScrollTop);
+                               },
+                               unfreezeScroll: function()
+                               {
+                                       if (typeof this.freezeScrollTop === 'undefined')
+                                       {
+                                               return;
+                                       }
+
+                                       $(document).scrollTop(this.freezeScrollTop);
+                               },
+                               saveScroll: function()
+                               {
+                                       this.tmpScrollTop = $(document).scrollTop();
+                               },
+                               restoreScroll: function()
+                               {
+                                       if (typeof this.tmpScrollTop === 'undefined')
+                                       {
+                                               return;
+                                       }
+
+                                       $(document).scrollTop(this.tmpScrollTop);
+                               },
+                               //collapsed
+                               isCollapsed: function()
+                               {
+                                       return this.selection.get().isCollapsed;
+                               },
+                               isStartOfElement: function(element)
+                               {
+                                       if (typeof element === 'undefined')
+                                       {
+                                               element = this.selection.block();
+                                               if (!element)
+                                               {
+                                                       return false;
+                                               }
+                                       }
+
+                                       return (this.caret.offset(element) === 0) ? true : false;
+                               },
+                               isEndOfElement: function(element)
+                               {
+                                       if (typeof element === 'undefined')
+                                       {
+                                               element = this.selection.block();
+                                               if (!element)
+                                               {
+                                                       return false;
+                                               }
+                                       }
+
+                                       var text = $.trim($(element).text()).replace(/\t\n\r\n/g, '').replace(/\u200B/g, '');
+
+                                       return (this.caret.offset(element) === text.length) ? true : false;
+                               },
+                               removeEmptyAttr: function(el, attr)
+                               {
+                                       var $el = $(el);
+                                       if (typeof $el.attr(attr) === 'undefined')
+                                       {
+                                               return true;
+                                       }
+
+                                       if ($el.attr(attr) === '')
+                                       {
+                                               $el.removeAttr(attr);
+                                               return true;
+                                       }
+
+                                       return false;
+                               },
+                               replaceToTag: function(node, tag)
+                               {
+                                       var replacement;
+                                       $(node).replaceWith(function()
+                                       {
+                                               replacement = $('<' + tag + ' />').append($(this).contents());
+
+                                               for (var i = 0; i < this.attributes.length; i++)
+                                               {
+                                                       replacement.attr(this.attributes[i].name, this.attributes[i].value);
+                                               }
+
+                                               return replacement;
+                                       });
+
+                                       return replacement;
+                               },
+                               // select all
+                               isSelectAll: function()
+                               {
+                                       return this.selectAll;
+                               },
+                               enableSelectAll: function()
+                               {
+                                       this.selectAll = true;
+                               },
+                               disableSelectAll: function()
+                               {
+                                       this.selectAll = false;
+                               },
+                               disableBodyScroll: function()
+                               {
+
+                                       var $body = $('html');
+                                       var windowWidth = window.innerWidth;
+                                       if (!windowWidth)
+                                       {
+                                               var documentElementRect = document.documentElement.getBoundingClientRect();
+                                               windowWidth = documentElementRect.right - Math.abs(documentElementRect.left);
+                                       }
+
+                                       var isOverflowing = document.body.clientWidth < windowWidth;
+                                       var scrollbarWidth = this.utils.measureScrollbar();
+
+                                       $body.css('overflow', 'hidden');
+                                       if (isOverflowing)
+                                       {
+                                               $body.css('padding-right', scrollbarWidth);
+                                       }
+                               },
+                               measureScrollbar: function()
+                               {
+                                       var $body = $('body');
+                                       var scrollDiv = document.createElement('div');
+                                       scrollDiv.className = 'redactor-scrollbar-measure';
+
+                                       $body.append(scrollDiv);
+                                       var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
+                                       $body[0].removeChild(scrollDiv);
+                                       return scrollbarWidth;
+                               },
+                               enableBodyScroll: function()
+                               {
+                                       $('html').css({ 'overflow': '', 'padding-right': '' });
+                                       $('body').remove('redactor-scrollbar-measure');
+                               }
+                       };
+               }
+       };
+
+       $(window).on('load.tools.redactor', function()
+       {
+               $('[data-tools="redactor"]').redactor();
+       });
+
+       // constructor
+       Redactor.prototype.init.prototype = Redactor.prototype;
+
+})(jQuery);
diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.min.js
new file mode 100644 (file)
index 0000000..9f23514
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+       Redactor II
+       Version 1.0.1
+       Updated: October 13, 2015
+
+       http://imperavi.com/redactor/
+
+       Copyright (c) 2009-2015, Imperavi LLC.
+       License: http://imperavi.com/redactor/license/
+
+       Usage: $('#content').redactor();
+*/
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(f($){\'ga gb\';if(!b7.4G.7z){b7.4G.7z=f(b8){j fn=c;q f(){q fn.4H(b8)}}}j 1T=0;$.fn.C=f(2Z){j 2J=[];j 2h=7A.4G.b9.4a(ba,1);if(15 2Z===\'93\'){c.1E(f(){j 5d=$.1C(c,\'C\');j 1g;if(2Z.3p(/\\./)!==\'-1\'){1g=2Z.4n(\'.\');if(15 5d[1g[0]]!==\'1e\'){1g=5d[1g[0]][1g[1]]}}R{1g=5d[2Z]}if(15 5d!==\'1e\'&&$.5G(1g)){j 7B=1g.4H(5d,2h);if(7B!==1e&&7B!==5d){2J.2S(7B)}}R{$.6I(\'gc gd 7C "\'+2Z+\'" 2K 3f\')}})}R{c.1E(f(){$.1C(c,\'C\',{});$.1C(c,\'C\',3f(c,2Z))})}if(2J.1f===0){q c}R if(2J.1f===1){q 2J[0]}R{q 2J}};f 3f(el,2Z){q 1N 3f.4G.2L(el,2Z)}$.3f=3f;$.3f.ge=\'1.0.1\';$.3f.94=[\'1J\',\'2A\',\'T\',\'4o\',\'2e\',\'1Z\',\'14\',\'1K\',\'2n\',\'1F\',\'G\',\'1d\',\'1P\',\'1O\',\'2k\',\'1h\',\'3x\',\'N\',\'1y\',\'1t\',\'3T\',\'1v\',\'6J\',\'K\',\'2M\',\'2D\',\'V\',\'1Q\',\'3l\',\'4b\',\'2t\',\'4p\',\'J\',\'4I\',\'1m\',\'1o\',\'5H\',\'1b\'];$.3f.bb={};$.3f.E={1v:\'en\',95:\'gf\',2k:L,bc:L,bd:L,5I:L,4J:L,9a:L,9b:L,9c:L,5J:L,4c:{},2t:L,2M:1j,5K:1j,9d:L,6K:4,7D:L,bf:1j,2A:L,9e:L,7E:L,5e:2B,bg:\'1O\',7F:1j,5f:2B,bh:\'1O\',7G:1j,5L:L,bi:1j,4d:\'6L\',bj:L,9f:50,1m:1j,bk:1j,3M:1i,5g:0,7H:L,bl:L,bm:L,1J:L,9g:[\'p\',\'2o\',\'1G\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'],9h:L,3y:[\'28\',\'4K\',\'4L\',\'5h\',\'7I\',\'1h\',\'1O\',\'K\',\'7J\'],9i:[],9j:[],3t:1j,4I:{\'3j+5i+m, 4q+5i+m\':{1g:\'N.9k\'},\'3j+b, 4q+b\':{1g:\'N.28\',4M:[\'4K\']},\'3j+i, 4q+i\':{1g:\'N.28\',4M:[\'4L\']},\'3j+h, 4q+h\':{1g:\'N.28\',4M:[\'bn\']},\'3j+l, 4q+l\':{1g:\'N.28\',4M:[\'bo\']},\'3j+k, 4q+k\':{1g:\'K.2w\'},\'3j+5i+7\':{1g:\'2D.3G\',4M:[\'6M\']},\'3j+5i+8\':{1g:\'2D.3G\',4M:[\'7K\']}},bp:L,4N:{en:{"28":"gg","1h":"gh","1O":"gj","K":"gk","4K":"gl","4L":"gm","5h":"gn","5M":"go","4K-4O":"B","4L-4O":"I","5h-4O":"S","5M-4O":"U","7I":"gp","K-1y":"bq K","K-2N":"bs K","K-in-1N-3N":"gq K in 1N 3N","5j":"gr","9l":"gs","3m":"gu","1y":"bq","3k":"gv","5N":"gw","1p":"gx","2N":"bs","1z":"gy","bt":"gz 1p","9m":"gA","1F":"gB","bu":"5O 1","bv":"5O 2","bw":"5O 3","bx":"5O 4","by":"5O 5","bz":"5O 6","4r":"gC","9n":"9n","7K":"gD bA","6M":"gE bA","7L":"gF","3x":"gG","7J":"gH","1o-1U":"gI 1O gJ gK ","bB-bC-1U":"gL 1p O"}},12:\'3a\',N:L,2e:[],6N:[],6O:[\'a\',\'2f\',\'7M\',\'6P\',\'b\',\'u\',\'em\',\'i\',\'1F\',\'4s\',\'gM\',\'gN\',\'gO\',\'bD\',\'bE\',\'9o\',\'j\',\'gP\',\'gQ\'],9p:[\'1G\',\'4e\',\'4P\',\'1R\',\'p\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\',\'dl\',\'dt\',\'dd\',\'1A\',\'3U\',\'2o\',\'gR\',\'4Q\',\'2x\',\'bF\',\'3V\',\'7N\',\'9q\',\'bG\',\'bH\',\'5k\'],3l:1j,9r:[\'bI\',\'1A\',\'1G\',\'5l\',\'4e\',\'4P\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\',\'dl\',\'2o\',\'4Q\',\'bF\',\'3V\',\'7N\',\'9q\',\'bG\',\'bH\',\'3g\',\'3h\',\'3t\',\'5k\',\'bJ\',\'3b\',\'3a\',\'14\',\'7O\',\'gS\',\'gT\',\'gU\',\'hr\',\'gV\',\'gW\',\'gX\',\'gY\',\'2x\',\'gZ\',\'h0\',\'h7\',\'p\'],3W:\'<p>&#7P;</p>\',bK:\'&#7P;\',bL:[\'1h/bM\',\'1h/h8\',\'1h/bN\'],4R:6Q.4R.2O(),1Q:{6R:[]},4S:{6S:/4t?:\\/\\/(?:[0-9A-Z-]+\\.)?(?:h9\\.be\\/|bO\\.7Q\\S*[^\\w\\-\\s])([\\w\\-]{11})(?=[^\\w\\-]|$)(?![?=&+%\\w.\\-]*(?:[\'"][^<>]*>|<\\/a>))[?=&+%\\w.-]*/ig,6T:/4t?:\\/\\/(5P\\.)?bP.7Q\\/(\\d+)($|\\/)/,7R:/((4t?|5P)[^\\s]+\\.)(ha?g|bM|bN)(\\?[^\\s-]+)?/ig,29:/(4t?:\\/\\/(?:5P\\.|(?!5P))[^\\s\\.]+\\.[^\\s]{2,}|5P\\.[^\\s]+\\.[^\\s]{2,})/ig}};3f.fn=$.3f.4G={2C:{5Q:8,5R:46,bQ:38,bR:40,4T:13,bS:32,6U:27,9s:9,bT:17,bU:91,bV:16,bW:18,hb:39,hc:37,bX:91},2L:f(el,2Z){c.$1w=$(el);c.1T=1T++;c.bY(2Z);c.bZ();if(c.E.bd&&!c.$1w.2T(\'C-1H-3z-2N\')){q c.c0(2Z)}R if(c.$1w.2T(\'C-1H-3z-2N\')){c.$1w.2u(\'C-1H-3z-2N\')}c.c1=1N 2a(\'^(\'+c.E.9p.3X(\'|\').7S()+\')$\',\'i\');c.c2=1N 2a(\'^(\'+c.E.6O.3X(\'|\').7S()+\')$\',\'i\');c.E.7F=(c.E.5e===2B)?L:c.E.7F;c.E.7G=(c.E.5f===2B)?L:c.E.7G;c.9g={};c.1v.3c();$.5m(c.E.4I,c.E.bp);c.G.1s(\'2b\');c.G.1s(\'c3\');c.2b=1j;c.1Z.2b()},c0:f(2Z){c.$1w.1D(\'1H.C-1H-3z-2N\',$.1k(f(){c.5S(2Z)},c));c.$1w.21(\'C-1H-3z-2N\');q},5S:f(2Z){$.5m(2Z.4c,{c3:f(){c.1y.F(c.J.23(),L)},5S:f(){c.J.2P();c.7T=c.1F.1c();$(c.E.9t).2w().1D(\'1H.C-1H-3z-2N\',$.1k(f(e){e.26();c.G.7U();c.1P.5T=L;c.$1w.o(c.7T);c.G.1s(\'9l\',c.7T);c.1P.5T=1j;c.7T=\'\';$(c.E.9t).2E();$(c.E.9u).2E();c.$1w.1D(\'1H.C-1H-3z-2N\',$.1k(f(){c.5S(2Z)},c));c.$1w.21(\'C-1H-3z-2N\')},c));$(c.E.9u).2w().1D(\'1H.C-1H-3z-2N\',$.1k(f(e){e.26();c.G.7U();c.G.1s(\'3k\',c.1F.1c());$(c.E.9t).2E();$(c.E.9u).2E();c.$1w.1D(\'1H.C-1H-3z-2N\',$.1k(f(){c.5S(2Z)},c));c.$1w.21(\'C-1H-3z-2N\')},c))}});c.$1w.C(2Z);c.$1w.2g(\'1H.C-1H-3z-2N\')},bY:f(2Z){c.E=$.5m({},$.5m(1j,{},$.3f.E),$.5m(1j,{},$.3f.bb),c.$1w.1C(),2Z)},9v:f(3g){q hd.he(3g).7V(f(7W){q 15 3g[7W]===\'f\'})},bZ:f(){j 2p=$.3f.94.1f;2K(j i=0;i<2p;i++){c.c4($.3f.94[i])}},c4:f(5n){if(15 c[5n]===\'1e\'){q}c[5n]=c[5n]();j 4U=c.9v(c[5n]);j 2p=4U.1f;2K(j z=0;z<2p;z++){c[5n][4U[z]]=c[5n][4U[z]].7z(c)}},1J:f(){q{4V:L,5U:f(){if(c.E.1J){c.J.1c().9w()}},hf:f(){if(c.E.1J){c.J.1c().c5()}},1Z:f(){if(c.1b.4W()){q}c.14.9x();c.14.9y();if(c.E.3y.1f===0){q}c.$1J=c.1J.7X();c.1J.1I();c.14.$1m=c.$1J;c.14.9z();c.14.3c(c.$1J);c.G.O().1D(\'c6.C\',c,$.1k(f(e){if(c.J.1p()!==\'\'){c.1J.2w(e)}},c))},1I:f(){c.$1J.7Y(\'2Q\')},7X:f(){q $(\'<4e>\').21(\'C-1J\').Q({\'id\':\'C-1J-\'+c.1T,\'5o\':\'1m\'}).2E()},2w:f(e){c.J.3A();c.J.3k();c.J.2P(L);$(\'.C-1J\').2E();j 9B=0;j 2F=c.$1J.7Z();if($(2G).2F()<(e.9C+2F)){9B=6V}c.$1J.2q({2y:(e.9C-9B)+\'3O\',2i:(e.c7+10+$(1i).3B())+\'3O\'}).2w();c.1J.4V=1j;c.1J.c8()},c8:f(){$(1i).1D(\'6W.C-1J.\'+c.1T,$.1k(f(e){j 1d=$(e.1V).2r(\'.C-1d\').1f;if($(e.1V).2r(c.$1J).1f===0&&1d===0){j 2E=c.1J.2E(e);if(2E!==L){c.J.3A()}}},c)).1D(\'1t.C-1J.\'+c.1T,$.1k(f(e){j 1a=e.5p;if($(e.1V).2r(\'#C-V\').1f!==0){q}if(1a===c.2C.6U){c.J.1c().9w();c.J.3A()}R if(1a===c.2C.5Q||1a===c.2C.5R){j 1q=c.J.1c();j Y=c.J.Y(1q);Y.5V();c.J.3A()}R if(1a===c.2C.4T){c.J.1c().c5();c.J.3A()}if(c.1J.4V){c.1J.2E(e)}R{c.J.1c().9w();c.J.3A()}},c))},hg:f(){$(1i).1D(\'hh.C-1J.\'+c.1T,$.1k(f(e){if($(e.1V).2r(c.$1J).1f===0){c.1J.2E(e)}},c))},2E:f(e){j 3j=e.5W||e.4X||(e.4Y&&e.9D);if(3j){q L}c.14.c9();c.$1J.80(5X);c.1J.4V=L;$(1i).2g(\'6W.C-1J.\'+c.1T)}}},2A:f(){q{4V:L,o:L,2L:f(){if(!c.E.2A){q}c.2A.4V=1j;c.2A.1M=(c.E.9e)?c.E.9e:c.$3a.Q(\'1M\')},is:f(){q c.2A.4V},4u:f(){if(!c.E.2A){q}c.2A.5Y=c.1F.1c();if(c.2A.o===c.2A.5Y){q}j 1C={};1C.1M=c.2A.1M;1C[c.2A.1M]=c.2A.5Y;1C=c.2A.5q(1C);j ca=$.hi({29:c.E.2A,12:\'hj\',1C:1C});ca.hk(c.2A.cb)},5q:f(1C){if(c.E.7E===L||15 c.E.7E!==\'3g\'){q 1C}$.1E(c.E.7E,$.1k(f(k,v){if(v!==2B&&v.4Z().5r(\'#\')===0){v=$(v).2J()}1C[k]=v},c));q 1C},cb:f(1C){j 2s;5Z{2s=$.cc(1C)}60(e){2s=1C}j cd=(15 2s.6I===\'1e\')?\'2A\':\'hl\';c.G.1s(cd,c.2A.1M,2s);c.2A.o=c.2A.5Y},hm:f(){c.2A.4V=L;ce(c.81)}}},T:f(){q{28:f(1l,Q,1u,12){1l=(1l===\'9m\')?\'2o\':1l;c.T.25=[\'p\',\'2o\',\'1G\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\',\'1A\'];if($.3P(1l,c.T.25)===-1){q}c.2t.1x();c.2e.2H();q(c.1b.5s())?c.T.82(1l,Q,1u,12):c.T.83(1l,Q,1u,12)},82:f(1l,Q,1u,12){c.J.3k();j T=c.J.T();j 3H=T.1n.2O();if($.3P(3H,c.T.25)===-1){c.J.2P();q}if(3H===1l){1l=\'p\'}j 3I=c.1b.51(T,1l);if(15 Q===\'3g\'){12=1u;2K(j 1a in Q){3I=c.T.4f(3I,1a,Q[1a],12)}}R{3I=c.T.4f(3I,Q,1u,12)}c.J.2P();c.T.9E(3I);q 3I},83:f(1l,Q,1u,12){c.J.3k();j 3I=[];j 2U=c.J.2U();j 2p=2U.1f;2K(j i=0;i<2p;i++){j 3H=2U[i].1n.2O();if($.3P(3H,c.T.25)!==-1){j T=c.1b.51(2U[i],1l);if(15 Q===\'3g\'){12=1u;2K(j 1a in Q){T=c.T.4f(T,1a,Q[1a],12)}}R{T=c.T.4f(T,Q,1u,12)}3I.2S(T);c.T.9E(T)}}c.J.2P();q 3I},9E:f(F){F=F[0]||F;j 25=c.E.6O;j 2U=[\'6X\',\'cf\',\'cg\',\'ch\',\'ci\',\'cj\',\'ck\'];if($.3P(F.1n,2U)===-1){q}if(F.1n!==\'6X\'){j 6Y=25.5r(\'a\');25.cl(6Y,1)}$(F).1B(25.3X(\',\')).6Z(\'.C-J-23\').2V().84()},4f:f(T,Q,1u,12){if(15 Q===\'1e\'){q T}j 1g=(15 12===\'1e\')?\'M\':12;if(Q===\'1W\'){T=c.T[1g+\'cm\'](1u,T)}R{if(1g===\'1x\'){T=c.T[1g+\'62\'](Q,T)}R if(1g===\'cn\'){T=c.T[1g+\'62\'](Q,T)}R{T=c.T[1g+\'62\'](Q,1u,T)}}q T},4g:f(T){q(15 T===\'1e\')?c.J.2U():T},co:f(1u,T){q $(c.T.4g(T)).2l(\'1W\').21(1u)[0]},70:f(1u,T){q $(c.T.4g(T)).70(1u)[0]},21:f(1u,T){q $(c.T.4g(T)).21(1u)[0]},2u:f(1u,T){q $(c.T.4g(T)).2u(1u)[0]},cp:f(T){q $(c.T.4g(T)).2l(\'1W\')[0]},cq:f(Q,1u,T){T=c.T.2l(Q,T);q $(T).Q(Q,1u)[0]},cr:f(Q,1u,T){T=c.T.4g(T);j 1L=c;j 3i=[];$.1E(T,f(i,s){j $el=$(s);if($el.Q(Q)){3i.2S(1L.T.2l(Q,s))}R{3i.2S(1L.T.85(Q,1u,s))}});q 3i},85:f(Q,1u,T){q $(c.T.4g(T)).Q(Q,1u)[0]},2l:f(Q,T){q $(c.T.4g(T)).2l(Q)[0]},cs:f(T){T=c.T.4g(T);j 3i=[];$.1E(T,f(i,s){if(15 s.3Y===\'1e\'){3i.2S(s)}j $el=$(s);j 2p=s.3Y.1f;2K(j z=0;z<2p;z++){$el.2l(s.3Y[z].1M)}3i.2S($el[0])});q 3i}}},4o:f(){q{9F:f(){q/9F/.5t(c.E.4R)},ff:f(){q c.E.4R.5r(\'hn\')>-1},ie:f(v){j ie;ie=2a(\'ho\'+(!hp(v)?(\'\\\\s\'+v):\'\'),\'i\').5t(6Q.4R);if(!ie){ie=!!6Q.4R.2W(/hq.*hs[ :]*11\\./)}q ie}}},2e:f(){q{2H:f(12){if(15 12===\'1e\'||12===\'71\'){c.2e.ct()}R{c.2e.cu()}},ct:f(){c.J.3k();c.E.2e.2S(c.G.O().o());c.J.2P()},cu:f(){c.J.3k();c.E.6N.2S(c.G.O().o());c.J.2P()},cv:f(){c.1P.4v();c.G.O().o(c.E.2e.cw());c.1P.4w()},cx:f(){c.1P.4v();c.G.O().o(c.E.6N.cw());c.1P.4w()},cy:f(){c.E.2e.2S(c.G.O().o())},71:f(){if(c.E.2e.1f===0){q}c.2e.2H(\'86\');c.2e.cv();c.J.2P();3C($.1k(c.1Q.3c,c),50)},86:f(){if(c.E.6N.1f===0){q}c.2e.2H(\'71\');c.2e.cx();c.J.2P();3C($.1k(c.1Q.3c,c),50)}}},1Z:f(){q{2b:f(){c.$O=c.$1w;if(c.1Z.87()||c.E.N){c.E.12=\'N\';c.E.N=1j;c.E.2M=L}R if(c.1Z.3Z(\'9G\')){c.E.12=\'1A\';if(c.$O.o()===\'\'){c.$O.o(c.E.3W)}}R if(c.1Z.3Z(\'6X\')){c.E.12=\'1G\'}R{c.1Z.cz()}c.1Z.cA();c.1Z.cB();c.1Z.cC();c.1Z.cD();c.1Z.cE()},cF:f(){c.$2c=$(\'<1A 1W="C-2c" 5o="ht" />\')},cA:f(){c.G.O().21(\'C-in\')},cB:f(){j id=(c.E.12===\'3a\')?\'C-1T-\'+c.1T:c.$1w.Q(\'id\');c.G.O().Q(\'id\',(15 id===\'1e\')?\'C-1T-\'+c.1T:id)},cG:f(){j 1M=c.$1w.Q(\'1M\');q(15 1M===\'1e\')?\'hu-\'+c.1T:1M},cH:f(){c.$O=$(\'<1A />\');c.$3a=c.$1w;c.$1w.Q(\'1M\',c.1Z.cG());c.$2c.hv(c.$1w).1I(c.$O).1I(c.$1w);c.$O.21(\'C-O\');c.$1w.2E();c.$2c.63(\'<2f 1W="C-88-1U" id="C-88-\'+c.1T+\'" 3q-9H="L">\'+c.1v.1c(\'bB-bC-1U\')+\'</2f>\');c.$O.Q({\'3q-hw\':\'C-88-\'+c.1T,\'5o\':\'hx\'})},cz:f(){c.1Z.cF();c.1Z.cH();c.1F.2b(c.G.3a().2J());c.G.3a().2J(c.2n.89(c.$O.o()))},3Z:f(1l){q(c.$1w[0].1n===1l)},87:f(){q(!c.1Z.3Z(\'hy\')&&!c.1Z.3Z(\'9G\')&&!c.1Z.3Z(\'6X\'))},cC:f(){c.G.O().Q({\'64\':1j})},cD:f(){if(c.E.12===\'N\'){c.E.5K=L}if(c.E.12===\'N\'||c.E.12===\'1G\'){c.E.cI=L;c.E.1m=L;c.E.1J=L;c.E.2M=L}if(c.E.5I){c.G.O().21(\'C-5I\')}if(c.E.12!==\'3a\'){q}c.G.2c().Q(\'cJ\',c.E.95);c.G.O().Q(\'cJ\',c.E.95);if(c.E.4J){c.G.O().Q(\'4J\',c.E.4J)}if(c.E.9a){c.G.O().2q(\'hz-4x\',c.E.9a)}if(c.E.9b){c.G.O().2q(\'9I-4x\',c.E.9b)}if(c.E.9c){c.G.O().2q({\'9I-2F\':c.E.9c,\'hA\':\'cK\'})}},cE:f(){c.1Z.cL();c.1P.2L();c.1Z.cM();if(c.E.1m||c.E.1J){c.72=c.14.2L()}if(c.E.bm){c.1m.cN()}if(c.E.1J){c.1J.1Z()}R if(c.E.1m){c.1m.1Z()}if(c.1b.4W()&&c.E.cI&&c.E.1J){c.E.1m=1j;c.1m.1Z()}if(c.E.1J||c.E.1m){c.G.O().1D(\'c6.C 3T.C 2k.C\',$.1k(c.1Q.6R,c))}c.V.cO();c.1Z.5J();c.2A.2L();c.1F.o=c.1F.9J(c.G.O().o());3C($.1k(c.1Q.3c,c),4);c.G.1s(\'2L\');c.G.1s(\'5S\');c.2b=L},cM:f(){if(c.E.2M){c.2M.28()}c.2t.cP();if(c.E.2k){3C(c.2k.2b,5X)}R if(c.E.bc){3C(c.2k.2X,5X)}},cL:f(){5Z{1i.4h(\'hB\',L,L);1i.4h(\'hC\',L,L);1i.4h("hD",L,L)}60(e){}},5J:f(){if(!c.E.5J){q}$.1E(c.E.5J,$.1k(f(i,s){j 1g=(15 9K!==\'1e\'&&15 9K[s]!==\'1e\')?9K:3f.fn;if(!$.5G(1g[s])){q}c[s]=1g[s]();j 4U=c.9v(c[s]);j 2p=4U.1f;2K(j z=0;z<2p;z++){c[s][4U[z]]=c[s][4U[z]].7z(c)}if(15 c[s].4N!==\'1e\'){j 1v={};if(15 c[s].4N[c.E.1v]!==\'1e\'){1v=c[s].4N[c.E.1v]}R if(15 c[s].4N[c.E.1v]===\'1e\'&&15 c[s].4N.en!==\'1e\'){1v=c[s].4N.en}j 1L=c;$.1E(1v,f(i,s){if(15 1L.E.74[i]===\'1e\'){1L.E.74[i]=s}})}if($.5G(c[s].2L)){c[s].2L()}},c))}}},14:f(){q{1m:f(){q(15 c.14.$1m===\'1e\'||!c.14.$1m)?c.$1m:c.14.$1m},2L:f(){q{28:{1z:c.1v.1c(\'28\'),1d:{p:{1z:c.1v.1c(\'bt\'),1g:\'T.28\'},2o:{1z:c.1v.1c(\'9m\'),1g:\'T.28\'},1G:{1z:c.1v.1c(\'1F\'),1g:\'T.28\'},h1:{1z:c.1v.1c(\'bu\'),1g:\'T.28\'},h2:{1z:c.1v.1c(\'bv\'),1g:\'T.28\'},h3:{1z:c.1v.1c(\'bw\'),1g:\'T.28\'},h4:{1z:c.1v.1c(\'bx\'),1g:\'T.28\'},h5:{1z:c.1v.1c(\'by\'),1g:\'T.28\'},h6:{1z:c.1v.1c(\'bz\'),1g:\'T.28\'}}},4K:{1z:c.1v.1c(\'4K-4O\'),1U:c.1v.1c(\'4K\'),1g:\'N.28\'},4L:{1z:c.1v.1c(\'4L-4O\'),1U:c.1v.1c(\'4L\'),1g:\'N.28\'},5h:{1z:c.1v.1c(\'5h-4O\'),1U:c.1v.1c(\'5h\'),1g:\'N.28\'},5M:{1z:c.1v.1c(\'5M-4O\'),1U:c.1v.1c(\'5M\'),1g:\'N.28\'},7I:{1z:c.1v.1c(\'7I\'),1d:{7K:{1z:\'&hE; \'+c.1v.1c(\'7K\'),1g:\'2D.3G\'},6M:{1z:\'1. \'+c.1v.1c(\'6M\'),1g:\'2D.3G\'},7L:{1z:\'< \'+c.1v.1c(\'7L\'),1g:\'3x.75\',1Q:{1w:\'1R\',67:{Q:{\'1W\':\'C-1d-K-76\',\'3q-5u\':1j}}}},3x:{1z:\'> \'+c.1v.1c(\'3x\'),1g:\'3x.8a\',1Q:{1w:\'1R\',67:{Q:{\'1W\':\'C-1d-K-76\',\'3q-5u\':1j}}}}}},1h:{1z:c.1v.1c(\'1h\'),1g:\'1h.2w\'},1O:{1z:c.1v.1c(\'1O\'),1g:\'1O.2w\'},K:{1z:c.1v.1c(\'K\'),1d:{K:{1z:c.1v.1c(\'K-1y\'),1g:\'K.2w\',1Q:{1w:\'a\',in:{1z:c.1v.1c(\'K-2N\'),},67:{1z:c.1v.1c(\'K-1y\')}}},5j:{1z:c.1v.1c(\'5j\'),1g:\'K.5j\',1Q:{1w:\'a\',67:{Q:{\'1W\':\'C-1d-K-76\',\'3q-5u\':1j}}}}}},7J:{1z:c.1v.1c(\'7J\'),1g:\'6J.1y\'}}},9z:f(){$.1E(c.72.28.1d,$.1k(f(i,s){if($.3P(i,c.E.9g)===-1){5N c.72.28.1d[i]}},c))},9x:f(){if(c.E.9i.1f!==0){c.14.9L(c.E.9i)}},9y:f(){if(c.1b.4W()&&c.E.9j.1f!==0){c.14.9L(c.E.9j)}},9L:f(3y){$.1E(3y,$.1k(f(i,s){j 6Y=c.E.3y.5r(s);c.E.3y.cl(6Y,1)},c))},3c:f($1m){c.14.3y=[];$.1E(c.E.3y,$.1k(f(i,2z){if(!c.72[2z]){q}if(2z===\'1O\'&&(!c.E.5f||!c.E.5f&&!c.E.5L)){q}if(2z===\'1h\'&&(!c.E.5e||!c.E.5e&&!c.E.5L)){q}$1m.1I($(\'<1R>\').1I(c.14.1Z(2z,c.72[2z])))},c))},1Z:f(2z,2j){j $14=$(\'<a 22="hF:hG(2B);" 1W="3n-14 3n-\'+2z+\'" 3J="\'+2z+\'" />\').o(2j.1z);$14.Q({\'5o\':\'14\',\'3q-1U\':2j.1z,\'4J\':\'-1\'});if(15 2j.1U!==\'1e\'){$14.Q(\'3q-1U\',2j.1U)}if(2j.1g||2j.3D||2j.1d){c.14.cQ($14,2z,2j)}if(2j.1d){$14.21(\'C-1m-K-1d\').Q(\'3q-cR\',1j);j $1d=$(\'<1A 1W="C-1d C-1d-\'+c.1T+\' C-1d-2c-\'+2z+\'" 3h="cS: cT;">\');$14.1C(\'1d\',$1d);c.1d.1Z(2z,$1d,2j.1d)}c.14.3y.2S($14);q $14},cQ:f($14,2z,2j){$14.1D(\'1H\',$.1k(f(e){if($14.2T(\'C-14-5u\')){q L}j 12=\'1g\';j 1s=2j.1g;if(2j.3D){12=\'3D\';1s=2j.3D}R if(2j.1d){12=\'1d\';1s=L}c.14.3G(e,2z,12,1s);q L},c))},3G:f(e,2z,12,1s,2h){e.26();if(c.4o.ie()){c.1b.cU();e.77=L}if(12===\'3D\'){c.N.28(1s)}R if(12===\'1d\'){c.1d.2w(e,2z)}R{c.14.cV(e,1s,2z,2h)}if(c.E.1J&&12!==\'1d\'){c.1J.2E(e)}if(c.4o.ie()){c.1b.cW()}},cV:f(e,1s,2z,2h){j 1g;2h=(15 2h===\'1e\')?2z:2h;if($.5G(1s)){1s.4a(c,2z)}R if(1s.3p(/\\./)!==\'-1\'){1g=1s.4n(\'.\');if(15 c[1g[0]]===\'1e\'){q}if(15 2h===\'3g\'){c[1g[0]][1g[1]].4H(c,2h)}R{c[1g[0]][1g[1]].4a(c,2h)}}R{if(15 2h===\'3g\'){c[1s].4H(c,2h)}R{c[1s].4a(c,2h)}}},cX:f(){q c.14.3y},1c:f(1a){q c.14.1m().1B(\'a.3n-\'+1a)},2H:f(1a,1z){j $1S=c.14.1m().1B(\'a.3n-\'+1a);$1S.o(1z).Q(\'3q-1U\',1z);q $1S},cy:f(1a,1z){if(c.14.78(1a)){q}j 1S=c.14.1Z(1a,{1z:1z});c.14.1m().1I($(\'<1R>\').1I(1S));q 1S},hH:f(1a,1z){if(c.14.78(1a)){q}j 1S=c.14.1Z(1a,{1z:1z});c.14.1m().63($(\'<1R>\').1I(1S));q 1S},hI:f(cY,1a,1z){if(c.14.78(1a)){q}j 1S=c.14.1Z(1a,{1z:1z});j $1S=c.14.1c(cY);if($1S.1f!==0){$1S.1X().2I($(\'<1R>\').1I(1S))}R{c.14.1m().1I($(\'<1R>\').1I(1S))}q 1S},hJ:f(cZ,1a,1z){if(c.14.78(1a)){q}j 1S=c.14.1Z(1a,{1z:1z});j $1S=c.14.1c(cZ);if($1S.1f!==0){$1S.1X().4y($(\'<1R>\').1I(1S))}R{c.14.1m().1I($(\'<1R>\').1I(1S))}q 1S},hK:f($1S,d0){$1S.o(d0)},9M:f($1S,1s){if(15 $1S===\'1e\'){q}j 12=(1s===\'1d\')?\'1d\':\'1g\';j 1a=$1S.Q(\'3J\');$1S.1D(\'5v 1H\',$.1k(f(e){if($1S.2T(\'C-14-5u\')){q L}c.14.3G(e,1a,12,1s)},c))},9N:f($1S,1d){$1S.21(\'C-1m-K-1d\').Q(\'3q-cR\',1j);j 1a=$1S.Q(\'3J\');c.14.9M($1S,\'1d\');j $1d=$(\'<1A 1W="C-1d C-1d-\'+c.1T+\' C-1d-2c-\'+1a+\'" 3h="cS: cT;">\');$1S.1C(\'1d\',$1d);if(1d){c.1d.1Z(1a,$1d,1d)}q $1d},d1:f(1a){c.14.1c(1a).21(\'C-8b\')},hL:f(1a){c.14.1c(1a).2u(\'C-8b\')},c9:f(1a){j $52=c.14.1m().1B(\'a.3n-14\');if(15 1a!==\'1e\'){$52=$52.6Z(\'.3n-\'+1a)}$52.2u(\'C-8b\')},hM:f(1a){j $52=c.14.1m().1B(\'a.3n-14\');if(15 1a!==\'1e\'){$52=$52.6Z(\'.3n-\'+1a)}$52.21(\'C-14-5u\')},hN:f(){c.14.1m().1B(\'a.3n-14\').2u(\'C-14-5u\')},1x:f(1a){c.14.1c(1a).1x()},78:f(1a){q(1a==="71"||1a==="86")&&!c.1b.8c()}}},1K:f(){q{2H:f(3Q,4i,2X){c.G.O().2k();2X=(15 2X===\'1e\')?0:1;3Q=3Q[0]||3Q;4i=4i[0]||4i;j 1q=c.J.1c();j Y=c.J.Y(1q);5Z{Y.8d(3Q,0);Y.8e(4i,2X)}60(e){}c.J.41(1q,Y)},79:f(F){if(15 c.2b!==\'1e\'){c.G.O().2k()}q F[0]||F},2b:f(F){j 1q,Y;F=c.1K.79(F);if(!F){q}if(F.1n===\'7a\'){q c.1K.4y(F)}j N=c.1b.7b(F.1n);if(F.3K===\'\'||N){Y=1i.68();j 5w=1i.5x(\'\\42\');Y.8d(F,0);Y.53(5w);Y.8f(5w);Y.3R(1j);1q=2G.4z();1q.54();1q.5y(Y);if(!N){c.G.O().1D(\'1t.C-1x-9O\',f(){$(5w).1x();$(c).2g(\'1t.C-1x-9O\')})}}R{1q=2G.4z();1q.54();Y=1i.68();Y.69(F);Y.3R(1j);1q.5y(Y)}},2X:f(F){j 1q,Y;F=c.1K.79(F);if(!F){q}if(F.1n!==\'7a\'&&F.3K===\'\'){q c.1K.2b(F)}if(F.1n===\'7a\'){j 4j=1i.3u(\'2f\');4j.8g=\'C-d2-4j\';4j.3K=\'&#7P;\';$(F).2I(4j);1q=2G.4z();1q.54();Y=1i.68();Y.d3(4j);Y.hO(4j);1q.5y(Y);$(4j).30(f(){q $(c).2V()});q}if(F.8h&&F.8h.6a===1){q c.1K.2I(F.8h)}1q=2G.4z();1q.54();Y=1i.68();Y.69(F);Y.3R(L);1q.5y(Y)},2I:f(F){j 1q,Y;F=c.1K.79(F);if(!F){q}if(F.1n===\'7a\'){q c.1K.2X(F)}if(c.1b.5z(F.1n)){j 1Y=c.1K.1Y(F);if(15 1Y===\'1e\'){c.1K.2X(F)}R{if(1Y.1n===\'d4\'){1Y=$(1Y).1B(\'8i, 3U\').31()[0]}R if(1Y.1n===\'7c\'||1Y.1n===\'7d\'){1Y=$(1Y).1B(\'1R\').31()[0]}c.1K.2b(1Y)}q}j 5w=1i.5x(\'\\42\');1q=2G.4z();1q.54();Y=1i.68();Y.8f(F);Y.53(5w);Y.8f(5w);Y.3R(1j);1q.5y(Y)},4y:f(F){j 1q,Y;F=c.1K.79(F);if(!F){q}if(c.1b.5z(F.1n)){j 2d=c.1K.2d(F);if(15 2d===\'1e\'){c.1K.2b(F)}R{if(2d.1n===\'d4\'){2d=$(2d).1B(\'8i, 3U\').3r()[0]}R if(2d.1n===\'7c\'||2d.1n===\'7d\'){2d=$(2d).1B(\'1R\').3r()[0]}c.1K.2X(2d)}q}1q=2G.4z();1q.54();Y=1i.68();Y.d3(F);Y.3R(1j);1q.5y(Y)},1Y:f(F){j $1Y=$(F).1Y();if($1Y.2T(\'C-3t-1l, C-J-23\')){q $1Y.1Y()[0]}R{q $1Y[0]}},2d:f(F){j $2d=$(F).2d();if($2d.2T(\'C-3t-1l, C-J-23\')){q $2d.2d()[0]}R{q $2d[0]}},3L:f(F){j 1q,Y,4A;if(15 F===\'1e\'){1q=c.J.1c();Y=c.J.Y(1q);4A=Y.9P();4A.69(c.$O[0]);4A.8e(Y.9Q,Y.d5);q $.2R(4A.4Z().M(/\\42/g,\'\')).1f}R{F=F[0]||F;1q=c.J.1c();Y=c.J.Y(1q);4A=Y.9P();4A.69(F);4A.8e(Y.9Q,Y.d5);q $.2R(4A.4Z().M(/\\42/g,\'\')).1f}}}},2n:f(){q{9R:f(o){o=c.2n.d6(o);o=c.2n.d7(o);if(c.E.3t){o=o.M(/<3t(.*?[^>]?)>([\\w\\W]*?)<\\/3t>/gi,\'<1G 1W="C-3t-1l" $1>$2</1G>\')}o=o.M(/\\$/g,\'&#36;\');o=o.M(/&8j;/g,\'&\');o=o.M(/<a 22="(.*?[^>]?)®(.*?[^>]?)">/gi,\'<a 22="$1&hP$2">\');j 1L=c;j $1A=$("<1A/>").o($.9S(o,1i,1j));j 5A={\'b\':\'7M\',\'i\':\'em\',\'6P\':\'4s\'};$1A.1B(\'b, i, 6P\').30(f(){q 1L.1b.51(c,5A[c.1n.2O()])});o=$1A.o();j 25=[\'hQ\',\'o\',\'d8\',\'K\',\'2Q\',\'4q\',\'hR\',\'2f\'];if(!c.E.3t){25.2S(\'3t\')}o=c.2n.d9(o,25);o=o.M(/<!--[\\s\\S]*?-->/gi,\'\');o=c.3l.3c(o);if(o.3p(/^(||\\s||<br\\s?\\/?>||&5B;)$/i)!==-1){q c.E.3W}q o},9T:f(o){q c.2n.89(o)},89:f(o){o=o.M(/\\42/g,\'\');o=o.M(/&#7P;/gi,\'\');o=o.M(/&5B;/gi,\' \');if(o.3p(/^<p>(||\\s||<br\\s?\\/?>||&5B;)<\\/p>$/i)!==-1){q\'\'}j $1A=$("<1A/>").o($.9S(o,1i,1j));$1A.1B(\'*[3h=""]\').2l(\'3h\');$1A.1B(\'*[1W=""]\').2l(\'1W\');$1A.1B(\'*[3J=""]\').2l(\'3J\');$1A.1B(\'.C-d2-4j\').1E(f(){$(c).2V().84()});$1A.1B(\'2f\').1E(f(){$(c).2V().84()});$1A.1B(\'.C-J-23, #C-1y-23\').1x();o=$1A.o();if(c.E.3t){o=o.M(/<1G 1W="C-3t-1l"(.*?[^>]?)>([\\w\\W]*?)<\\/1G>/gi,\'<3t$1>$2</3t>\')}o=c.2n.da(o);o=o.M(1N 2a(\'<br\\\\s?/?></h\',\'gi\'),\'</h\');o=o.M(1N 2a(\'<br\\\\s?/?></1R>\',\'gi\'),\'</1R>\');o=o.M(1N 2a(\'</1R><br\\\\s?/?>\',\'gi\'),\'</1R>\');if(c.E.9d){o=o.M(/<1G>/gi,\'<1G 1W="\'+c.E.9d+\'">\')}if(c.E.bj){o=o.M(/<a(.*?)3J="db"(.*?[^>])>/gi,\'<a$1$2>\');o=o.M(/<a(.*?[^>])>/gi,\'<a$1 3J="db">\')}j dc={\'\\hS\':\'&hT;\',\'\\hU\':\'&hV;\',\'\\hW\':\'&hX;\',\'\\hY\':\'&hZ;\',\'\\i0\':\'&i1;\'};$.1E(dc,f(i,s){o=o.M(1N 2a(i,\'g\'),s)});o=o.M(/&8j;/g,\'&\');q o},9U:f(o,1y){j 2U=c.J.2U();c.4b.1p=L;c.1y.5C=L;o=$.2R(o);if(1y!==1j){o=o.M(/</g,\'&9V;\');o=o.M(/>/g,\'&gt;\')}if(c.E.5K===L||c.E.12===\'N\'||(2U.1f===1&&c.1b.55([\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\',\'1R\',\'a\',\'4Q\']))){c.4b.1p=1j;if(15 1y!==\'1e\'){o=c.2n.9W(o)}q o}R if(2U.1f===1&&c.1b.55([\'8i\',\'3U\',\'2o\'])){if(15 1y!==\'1e\'){o=o.M(/<br\\s?\\/?>|<\\/H[1-6]>|<\\/p>|<\\/1A>|<\\/1R>|<\\/3U>/gi,\'\\n\');o=c.2n.9W(o)}o=o.M(/\\n/g,\'<br />\');q o}R if(c.E.12===\'1G\'||(2U.1f===1&&c.1b.55(\'1G\'))){o=o.M(/”/g,\'"\');o=o.M(/“/g,\'"\');o=o.M(/‘/g,\'\\\'\');o=o.M(/’/g,\'\\\'\');o=c.2n.8k(o);q o}c.4b.1p=L;c.1y.5C=1j;if(15 1y!==\'1e\'){j de=o.2W(1N 2a(\'</(\'+c.E.9p.3X(\'|\').7S()+\')>\',\'gi\'));j df=o.2W(1N 2a(\'<hr\\s?/?>\',\'gi\'));if(de===2B&&df===2B){c.1y.5C=L;q o}}j 9X=L;if(!c.1b.7e()){j dg=o.2W(/<br\\s?\\/?>/gi);j dh=o.2W(/\\n/gi);if(!dg&&!dh){9X=1j}}if(9X){c.4b.1p=1j}R{o=c.3l.3c(o)}q o},9W:f(o){j 3E=1i.3u(\'1A\');3E.3K=o;o=3E.9Y||3E.9Z;q $.2R(o)},d6:f(o){o=c.2n.di(o);o=c.2n.dj(o);q o},di:f(o){j 1G=o.2W(/<1G(.*?)>([\\w\\W]*?)<\\/1G>/gi);if(1G===2B){q o}$.1E(1G,$.1k(f(i,s){j 2v=s.2W(/<1G(.*?)>([\\w\\W]*?)<\\/1G>/i);2v[2]=2v[2].M(/<br\\s?\\/?>/g,\'\\n\');2v[2]=2v[2].M(/&5B;/g,\' \');if(c.E.6K){2v[2]=2v[2].M(/\\t/g,1N 7A(c.E.6K+1).3X(\' \'))}2v[2]=c.2n.8k(2v[2]);2v[2]=2v[2].M(/\\$/g,\'&#36;\');o=o.M(s,\'<1G\'+2v[1]+\'>\'+2v[2]+\'</1G>\')},c));q o},dj:f(o){j 1F=o.2W(/<1F(.*?)>([\\w\\W]*?)<\\/1F>/gi);if(1F===2B){q o}$.1E(1F,$.1k(f(i,s){j 2v=s.2W(/<1F(.*?)>([\\w\\W]*?)<\\/1F>/i);2v[2]=2v[2].M(/&5B;/g,\' \');2v[2]=c.2n.8k(2v[2]);2v[2]=2v[2].M(/\\$/g,\'&#36;\');o=o.M(s,\'<1F\'+2v[1]+\'>\'+2v[2]+\'</1F>\')},c));q o},d7:f(o){q o.M(/<5l(.*?)>([\\w\\W]*?)<\\/5l>/gi,\'<3V$1 3J="C-5l-1l">$2</3V>\')},da:f(o){q o.M(/<3V(.*?) 3J="C-5l-1l"(.*?)>([\\w\\W]*?)<\\/3V>/gi,\'<5l$1$2>$3</5l>\')},8k:f(56){56=6b(56).M(/&8j;/g,\'&\').M(/&9V;/g,\'<\').M(/&gt;/g,\'>\').M(/&dk;/g,\'"\');56=56.M(/&/g,\'&8j;\').M(/</g,\'&9V;\').M(/>/g,\'&gt;\').M(/"/g,\'&dk;\');q 56},d9:f(3b,a0){if(15 a0===\'1e\'){q 3b.M(/(<([^>]+)>)/gi,\'\')}j 25=/<\\/?([a-z][a-7f-9]*)\\b[^>]*>/gi;q 3b.M(25,f($0,$1){q a0.5r($1.2O())===-1?$0:\'\'})},3A:f(o){q o.M(/<2f(.*?[^>]?)1W="C-J-23"(.*?[^>]?)>([\\w\\W]*?)<\\/2f>/gi,\'\')},dm:f(o){o=$.2R(o);o=o.M(/\\n/g,\'\');o=o.M(/[\\t]*/g,\'\');o=o.M(/\\n\\s*\\n/g,"\\n");o=o.M(/^[\\s\\n]*/g,\' \');o=o.M(/[\\s\\n]*$/g,\' \');o=o.M(/>\\s{2,}</g,\'> <\');o=o.M(/\\n\\n/g,"\\n");o=o.M(/\\42/g,\'\');q o},a1:f(o){o=$.2R(o);o=o.M(/\\n/g,\'\');o=o.M(/[\\t]*/g,\'\');o=o.M(/\\n\\s*\\n/g,"\\n");o=o.M(/^[\\s\\n]*/g,\'\');o=o.M(/[\\s\\n]*$/g,\'\');o=o.M(/>\\s{2,}</g,\'><\');o=o.M(/\\n\\n/g,"\\n");o=o.M(/\\42/g,\'\');q o}}},1F:f(){q{5T:1j,o:L,2b:f(o){o=$.2R(o);if(c.E.12===\'3a\'){o=c.2n.9R(o)}c.1P.4v();c.G.O().o(o);c.1P.4w()},2H:f(o){o=$.2R(o);if(c.E.12===\'3a\'){o=c.2n.9R(o)}c.G.O().o(o);c.2k.2X()},1c:f(){if(c.E.12===\'3a\'){q c.G.3a().2J()}R{j o=c.G.O().o();o=c.2n.9T(o);q o}},8l:f(){if(!c.1F.5T){q}j o=c.G.O().o();j 7g=c.1F.9J(o);if(c.1F.dn(7g)){q}c.1F.o=7g;if(c.E.12!==\'3a\'){c.G.1s(\'8l\',o);c.G.1s(\'a2\',o);q}if(c.E.12===\'3a\'){3C($.1k(f(){c.1F.do(o)},c),10)}},do:f(o){o=c.G.1s(\'i2\',o);o=c.2n.89(o);c.G.3a().2J(o);c.G.1s(\'8l\',o);if(c.2b===L){c.G.1s(\'a2\',o)}c.2b=L},dn:f(7g){q(c.1F.o&&c.1F.o===7g)},9J:f(o){o=c.2n.dm(o);q c.2n.3A(o)}}},G:f(){q{id:f(){q c.$O.Q(\'id\')},1w:f(){q c.$1w},O:f(){q c.$O},3a:f(){q c.$3a},2c:f(){q(c.E.12===\'3a\')?c.$2c:c.$1w},1m:f(){q(c.$1m)?c.$1m:L},1J:f(){q(c.$1J)?c.$1J:L},3g:f(){q $.5m({},c)},5I:f(){c.G.O().70(\'C-5I\')},7h:f(1M){c.G.7i=1M},6c:f(){q c.G.7i},1s:f(12,e,1C){j dp=\'C\';j 77=L;j 1P=$.i3(c.G.1w()[0],\'1P\');if(15 1P!==\'1e\'&&15 1P[12]!==\'1e\'){j 2p=1P[12].1f;2K(j i=0;i<2p;i++){j a3=1P[12][i].a3;if(a3===\'1s.\'+dp){j 57=1P[12][i].57;j 2h=(15 1C===\'1e\')?[e]:[e,1C];77=(15 2h===\'1e\')?57.4a(c,e):57.4a(c,e,2h)}}}if(77){q 77}if(15 c.E.4c[12]===\'1e\'){q(15 1C===\'1e\')?e:1C}j 1s=c.E.4c[12];if($.5G(1s)){q(15 1C===\'1e\')?1s.4a(c,e):1s.4a(c,e,1C)}R{q(15 1C===\'1e\')?e:1C}},7U:f(){c.E.dq=1j;c.G.1s(\'7U\');$(\'.C-1C-3v\').2g(\'1H.C-1C-3v\').2u(\'C-1C-3v\');$(\'.C-3h-1l\').1x();$(\'#C-88-\'+c.1T).1x();c.G.O().2u(\'C-in\');c.G.O().2u(\'C-5I\');c.G.O().2g(\'1t.C-1x-9O\');c.a4.i4();c.$1w.2g(\'.C\').i5(\'C\');c.G.O().2g(\'.C\');$(1i).2g(\'.C-1J.\'+c.1T);$(1i).2g(\'6W.C-8m.\'+c.1T);$(1i).2g(\'6W.C.\'+c.1T);$(1i).2g(\'5v.C.\'+c.1T+\' 1H.C.\'+c.1T);$(2G).2g(\'.C-1m.\'+c.1T);$("2Q").2g(\'8n.C.\'+c.1T);$(c.E.3M).2g(\'8n.C.\'+c.1T);j 1L=c;$.1E(c.E.5J,f(i,s){$(2G).2g(\'.C-8o-\'+s);$(1i).2g(\'.C-8o-\'+s);$("2Q").2g(\'.C-8o-\'+s);1L.G.O().2g(\'.C-8o-\'+s)});c.$1w.2g(\'1H.C-1H-3z-2N\');c.$1w.2u(\'C-1H-3z-2N\');c.G.O().2u(\'C-O C-i6 C-2t\');c.G.O().2l(\'64\');j o=c.1F.1c();if(c.E.1m&&c.$1m){c.$1m.1B(\'a\').1E(f(){j $el=$(c);if($el.1C(\'1d\')){$el.1C(\'1d\').1x();$el.1C(\'1d\',{})}})}if(c.E.12===\'3a\'){c.$2c.2I(c.$1w);c.$2c.1x();c.$1w.2J(o).2w()}if(c.E.1J){c.$1J.1x()}if(c.E.1m&&c.$1m){c.$1m.1x()}if(c.$3S){c.$3S.1x()}if(c.$5D){c.$5D.1x()}$(\'.C-K-3w\').1x();ce(c.81)}}},1d:f(){q{1Z:f(1M,$1d,a5){if(1M===\'28\'&&c.E.9h){$.1E(c.E.9h,$.1k(f(i,s){j 1g;j 12=(c.1b.5z(s.2h[0]))?\'T\':\'N\';if(12===\'T\'){1g=\'T.28\'}R{1g=\'N.28\'}a5[i]={1g:1g,2h:s.2h,1z:s.1z}},c))}$.1E(a5,$.1k(f(2z,2j){j $2Y=$(\'<a 22="#" 1W="C-1d-\'+2z+\'" 5o="14">\'+2j.1z+\'</a>\');$2Y.1D(\'1H\',$.1k(f(e){e.26();j 12=\'1g\';j 1s=2j.1g;if(2j.3D){12=\'3D\';1s=2j.3D}R if(2j.1d){12=\'1d\';1s=2j.1d}if($(e.1V).2T(\'C-1d-K-76\')){q}if(15 2j.2h!==\' 1e\'){c.14.3G(e,2z,12,1s,2j.2h)}R{c.14.3G(e,2z,12,1s)}c.1d.6d()},c));c.1Q.9N($2Y,2z,2j);$1d.Q(\'3J\',1M).1I($2Y)},c))},2w:f(e,1a){c.G.O().2k();j $14=c.14.1c(1a);j $1d=$14.1C(\'1d\').7Y(1i.2Q);if($14.2T(\'6e\')){c.1d.6d()}R{c.1d.6d();c.G.1s(\'i7\',{1d:$1d,1a:1a,14:$14});c.14.d1(1a);$14.21(\'6e\');j 6f=$14.3L();j a6=$1d.2F();if((6f.2y+a6)>$(1i).2F()){6f.2y=dr.9I(0,6f.2y-a6)}j 2i;j 2y=6f.2y+\'3O\';if(c.14.1m().2T(\'1m-58-2c\')){2i=$14.3d().2i+$14.8p()+c.E.5g;j 3d=\'58\';if(c.E.3M!==1i){2i=($14.8p()+c.$1m.3L().2i)+c.E.5g;3d=\'6g\'}$1d.2q({3d:3d,2y:2y,2i:2i+\'3O\'}).ds(8q)}R{2i=($14.8p()+6f.2i)+\'3O\';$1d.2q({3d:\'6g\',2y:2y,2i:2i}).ds(8q)}c.G.1s(\'i8\',{1d:$1d,1a:1a,14:$14});c.$1d=$1d}$(1i).a7(\'1H.C-1d\',$.1k(c.1d.2E,c));c.$O.a7(\'1H.C-1d\',$.1k(c.1d.2E,c));$(1i).a7(\'3T.C-1d\',$.1k(c.1d.7j,c));$1d.1D(\'a8.C-1d\',$.1k(c.1b.a9,c));$1d.1D(\'aa.C-1d\',$.1k(c.1b.8r,c));e.8s()},7j:f(e){if(e.5p!==c.2C.6U){q}c.1d.6d();c.G.O().2k()},6d:f(){c.14.1m().1B(\'a.6e\').2u(\'C-8b\').2u(\'6e\');c.1b.8r();$(\'.C-1d-\'+c.1T).i9(6V);$(\'.C-1d-K-du\').2u(\'C-1d-K-du\');if(c.$1d){c.$1d.2g(\'.C-1d\');c.G.1s(\'ia\',c.$1d);c.$1d=L}},2E:f(e){j $1d=$(e.1V);if(!$1d.2T(\'6e\')&&!$1d.2T(\'C-1d-K-76\')){$1d.2u(\'6e\');$1d.2g(\'a8 aa\');c.1d.6d()}}}},1P:f(){q{ab:L,8t:1j,4B:L,4v:f(){c.1P.4B=1j},4w:f(){j 1L=c;3C(f(){1L.1P.4B=L},1)},2L:f(){c.G.O().1D(\'dv.C ib.C\',f(e){e.26();e.8s()});c.G.O().1D(\'4C.C\',$.1k(f(e){e=e.7k||e;if(c.E.12===\'N\'||c.E.12===\'1G\'){e.26();q L}if(2G.8u===1e||!e.8v){q 1j}if(e.8v.5a.1f===0){q c.1P.4C(e)}R{c.1P.dw(e)}c.G.1s(\'4C\',e)},c));c.G.O().1D(\'1H.C\',$.1k(f(e){j 7i=c.G.6c();j 12=(7i===\'1H\'||7i===\'43\')?L:\'1H\';c.G.7h(12);c.1b.6h();c.G.1s(\'1H\',e)},c));c.G.O().1D(\'4b.C\',$.1k(c.4b.2L,c));c.G.O().1D(\'1t.C\',$.1k(c.1t.2L,c));c.G.O().1D(\'3T.C\',$.1k(c.3T.2L,c));c.1P.dx=$.1k(f(){if(c.1P.4B){q}c.1F.8l();if(c.2A.is()){ic(c.81);c.81=3C($.1k(c.2A.4u,c),8q)}},c);j 1L=c;c.a4=1N ih(f(dy){dy.ii(f(5b){1L.1h.dz(1L,5b);1L.1P.dx()})});c.a4.1Q(c.G.O()[0],{ij:1j,3Y:1j,ik:1j,il:1j,im:1j});c.G.O().1D(\'2k.C\',$.1k(f(e){if(c.6i){q}if(c.1P.ac(\'2k\')){c.G.1s(\'2k\',e)}c.1P.ab=1j;c.1P.8t=L;if(c.J.1r()===L){j 1q=c.J.1c();j Y=c.J.Y(1q);Y.8d(c.G.O()[0],0);Y.8e(c.G.O()[0],0);c.J.41(1q,Y)}},c));$(1i).1D(\'6W.C-8m.\'+c.1T,$.1k(f(e){if(c.2b||c.6i){q}if($(e.1V).2r(\'#\'+c.G.id()+\', .C-1m, .C-1d, #C-V-2c, .C-1C-3v\').dA()!==0){q}c.1b.6h();if(!c.1P.8t&&c.1P.ac(\'8m\')){c.G.1s(\'8m\',e)}c.1P.ab=L;c.1P.8t=1j},c))},dw:f(e){e.26();e.8s();if(!c.E.7F&&!c.E.7G){q}j 5a=e.8v.5a;c.1o.dB(5a[0],e)},4C:f(e){c.G.1s(\'4C\',e)},ac:f(1M){q(15 c.E.4c[1M]!==\'1e\'&&$.5G(c.E.4c[1M]))}}},1O:f(){q{2w:f(){c.V.3c(\'1O\',c.1v.1c(\'1O\'),dC);c.1o.2L(\'#C-V-1O-1o\',c.E.5f,c.1O.1y);j 1p=c.J.1c().4Z();$(\'#C-4r\').2J(1p);c.V.2w()},1y:f(2s,44,e){if(15 2s.6I!==\'1e\'){c.V.3m();c.G.1s(\'io\',2s);q}c.2t.1x();j $K;j 1p;j $el=(c.1b.ad(2s))?$(2s):L;if(44){1p=2s.4r;c.J.3A();c.1y.ae(e,c.J.23());c.J.2P()}R{1p=(15 1p===\'1e\'||1p===\'\')?2s.4r:$(\'#C-4r\').2J();c.V.3m()}c.2e.2H();c.1J.5U();if($el!==L){$K=c.1y.F($el)}R{$K=$(\'<a 22="\'+2s.af+\'">\'+1p+\'</a>\');$K=c.1y.F($K)}c.1K.2I($K);c.G.1s(\'5f\',$K,2s)}}},2k:f(){q{2b:f(){c.G.O().2k();if(c.E.12===\'N\'){q}j 31=c.G.O().4k().31();if(31.1f===0&&(31[0].1f===0||31[0].1n===\'7a\'||31[0].6a===3)){q}if(31[0].1n===\'7c\'||31[0].1n===\'7d\'){31=31.1B(\'1R\').31()}c.1K.2b(31)},2X:f(){c.G.O().2k();j 3r=(c.E.N)?c.G.O():c.2k.3r();j 1q=c.J.1c();j Y=c.J.Y(1q);if(3r.1f===0){q}j 8w=3r[0].8h;if(!c.4o.9F()&&15 8w!==\'1e\'&&c.1b.7b(8w.1n)){c.1K.2X(8w)}R{Y.69(3r[0]);Y.3R(L);c.J.41(1q,Y)}},3r:f(){q c.G.O().4k().3r()},is:f(){q c.G.O()[0]===1i.ip}}},1h:f(){q{2w:f(){c.V.3c(\'1h\',c.1v.1c(\'1h\'),dC);c.1o.2L(\'#C-V-1h-3s\',c.E.5e,c.1h.1y);c.V.2w()},1y:f(2s,44,e){if(15 2s.6I!==\'1e\'){c.V.3m();c.G.1s(\'iq\',2s);q}c.2t.1x();j $2x=$(\'<2x>\');j $3o;if(c.1b.ad(2s)){$3o=$(2s)}R{$3o=$(\'<3o>\');$3o.Q(\'6j\',2s.af)}$2x.1I($3o);j 1G=c.1b.3Z(c.J.1r(),\'1G\');if(44){c.1J.5U();c.J.3A();j F=c.1y.ae(e,c.J.23());j $1Y=$(F).1Y();c.J.2P();c.2e.2H();if(15 $1Y!==\'1e\'&&$1Y.1f!==0&&$1Y[0].1n===\'6k\'){c.G.1s(\'dD\',$1Y[0].6j,$1Y);$1Y.2r(\'2x, p\',c.G.O()[0]).30($2x);c.1K.2I($2x)}R{if(1G){$(1G).2I($2x)}R{c.1y.F($2x)}c.1K.2I($2x)}}R{c.V.3m();c.2e.2H();c.1J.5U();if(1G){$(1G).2I($2x)}R{c.1y.F($2x)}c.1K.2I($2x)}c.1Q.3c();c.G.1s(\'5e\',$3o,2s)},dE:f($1h){$1h.1D(\'ir\',f(e){e.26()});$1h.2g(\'1H.C 5v.C\').1D(\'1H.C 5v.C\',$.1k(f(){c.1h.dF($1h)},c))},dF:f($1h){c.1Q.1h=$1h;j $K=$1h.2r(\'a\',c.$O[0]);c.V.3c(\'1h-2N\',c.1v.1c(\'2N\'),it);c.V.ag();c.1h.dG=c.V.dH(c.1v.1c(\'5N\'));c.1h.dI=c.V.ah(c.1v.1c(\'3k\'));c.1h.dG.1D(\'1H\',$.1k(c.1h.1x,c));c.1h.dI.1D(\'1H\',$.1k(c.1h.41,c));$(\'#C-1h-1z\').2J($1h.Q(\'8x\'));j $ai=$(\'#C-1h-K\');$ai.Q(\'22\',$1h.Q(\'6j\'));if($K.1f!==0){$ai.2J($K.Q(\'22\'));if($K.Q(\'1V\')===\'6l\'){$(\'#C-1h-K-6m\').8y(\'8z\',1j)}}$(\'.C-K-3w\').1x();c.V.2w();$(\'#C-1h-1z\').2k()},41:f(){j $1h=c.1Q.1h;j $K=$1h.2r(\'a\',c.G.O()[0]);j 1z=$(\'#C-1h-1z\').2J().M(/(<([^>]+)>)/ig,"");$1h.Q(\'8x\',1z).Q(\'1z\',1z);j K=$.2R($(\'#C-1h-K\').2J()).M(/(<([^>]+)>)/ig,"");if(K!==\'\'){j 6n=\'((dJ--)?[a-7f-9]+(-[a-7f-9]+)*\\\\.)+[a-z]{2,}\';j 3n=1N 2a(\'^(6L|7l|4t)://\'+6n,\'i\');j 6o=1N 2a(\'^\'+6n,\'i\');if(K.3p(3n)===-1&&K.3p(6o)===0&&c.E.4d){K=c.E.4d+\'://\'+K}j 1V=($(\'#C-1h-K-6m\').8y(\'8z\'))?1j:L;if($K.1f===0){j a=$(\'<a 22="\'+K+\'">\'+c.1b.5E($1h)+\'</a>\');if(1V){a.Q(\'1V\',\'6l\')}$1h.30(a)}R{$K.Q(\'22\',K);if(1V){$K.Q(\'1V\',\'6l\')}R{$K.2l(\'1V\')}}}R if($K.1f!==0){$K.30(c.1b.5E($1h))}c.V.3m();c.2e.2H();c.1Q.aj()},dz:f(1L,5b){if(1L.1P.4B){q}j 2p=5b.dK.1f;2K(j i=0;i<2p;i++){j F=5b.dK[i];if(F.6a===1){j 4k=$(F).4k(\'3o\');if(F.1n!==\'6k\'&&4k.1f!==0){j dL=4k.1f;2K(j z=0;z<dL;z++){1L.1h.1x(L,$(4k[z]))}}R if(F.1n===\'6k\'&&5b.6p===2B){1L.1h.1x(1j,$(F))}R if(F.1n===\'6k\'&&(15 5b.6p!==2B&&5b.6p.id!==\'C-1h-2c\')){1L.1h.1x(1j,$(F))}}}},1x:f(e,$1h){$1h=(15 $1h===\'1e\')?$(c.1Q.1h):$1h;j $K=$1h.2r(\'a\',c.G.O()[0]);j $2x=$1h.2r(\'2x, p\',c.G.O()[0]);j $1X=$1h.1X();if($(\'#C-1h-2c\').1f!==0){$1X=$(\'#C-1h-2c\').1X()}j $1Y;if($2x.1f!==0){$1Y=$2x.1Y();$2x.1x()}R if($K.1f!==0){$1X=$K.1X();$K.1x()}R{$1h.1x()}$(\'#C-1h-2c\').1x();if(e!==L){if($2x.1f!==0&&$1Y.1f!==0){c.1K.2b($1Y)}R if($1X.1f!==0){c.1K.2b($1X)}}if(15 e!==\'iu\'){c.V.3m()}c.G.1s(\'dD\',$1h[0].6j,$1h);c.1b.ak()}}},3x:f(){q{8a:f(){if(!c.2D.1c()){q}j $1R=$(c.J.1r()).2r(\'1R\');j $2d=$1R.2d();if($2d.1f===0||$2d[0].1n!==\'7m\'){q}c.2e.2H();1i.4h(\'3x\');c.J.3k();c.3x.dM();c.J.2P()},75:f(){if(!c.2D.1c()){q}c.2e.2H();1i.4h(\'7L\');j $2Y=$(c.J.1r()).2r(\'1R\',c.G.O()[0]);if(c.1b.5s()){j $1R=$(c.J.1r()).2r(\'1R\');if($1R.1f!==0&&$1R.1X().1f!==0&&$1R.1X()[0].1n===\'7m\'){c.J.3k();$1R.1X().2I($1R);c.J.2P()}}if($2Y.1f===0){1i.4h(\'dN\',L,\'p\')}},dM:f(){c.G.O().1B(\'1R\').1E(f(i,s){j $1Y=$(s).1Y();if($1Y.1f!==0&&($1Y[0].1n===\'7c\'||$1Y[0].1n===\'7d\')){$(s).1I($1Y)}})}}},N:f(){q{28:f(1l,Q,1u,12){1l=1l.2O();if(1l===\'2f\'){q}if(c.1b.55([\'6X\',\'iv\'])||c.1b.dO()){q}j 25=[\'b\',\'4K\',\'i\',\'4L\',\'5M\',\'dP\',\'5h\',\'bn\',\'bo\'];j 3I=[\'7M\',\'7M\',\'em\',\'em\',\'u\',\'4s\',\'4s\',\'bD\',\'bE\'];2K(j i=0;i<25.1f;i++){if(1l===25[i]){1l=3I[i]}}c.2t.1x();c.2e.2H();q(c.1b.5s())?c.N.82(1l,Q,1u,12):c.N.83(1l,Q,1u,12)},82:f(1l,Q,1u,12){j N=c.J.N();if(N){j 3H=N.1n.2O();if(3H===1l){if(c.1b.4D(N.3K)){c.1K.2I(N);$(N).1x()}R{j $31=c.N.al(N,3H);c.1K.2I($31)}}R{c.N.am(1l,Q,1u,12)}}R{c.N.am(1l,Q,1u,12)}},am:f(1l,Q,1u,12){j F=1i.3u(1l);F=c.N.4f(F,Q,1u,12);c.1y.F(F);c.1K.2b(F)},iw:f(1l,Q,1u,12,N,3H){j F=1i.3u(1l);F=c.N.4f(F,Q,1u,12);j $31=c.N.al(N,3H);$31.2I(F);c.1K.2b(F)},83:f(1l,Q,1u,12){j 1L=c;c.N.dQ(1l);c.J.3k();1i.4h(\'dP\');j $dR=c.G.O().1B(\'6P\');$dR.1E(f(i,s){j $8A=$(s);j 6q=1i.3u(1l);if(!$8A.2T(\'C-N-an\')){6q=1L.N.4f(6q,Q,1u,12)}j $6q=$(6q);$8A.30($6q.o($8A.2V()))});if(1l!==\'4s\'){c.G.O().1B(\'N\').1E(f(i,s){1L.1b.51(s,\'4s\')})}if(1l!==\'u\'){c.G.O().1B(\'dS\').1E(f(i,s){1L.1b.51(s,\'u\')})}c.G.O().1B(\'1G, h1, h2, h3, h4, h5, h6\').4k(1l).30(f(){q $(c).2V()});c.$O.1B(c.E.6O.3X(\', \')).1E($.1k(f(i,s){j $el=$(s);j 7W=$el.2q(\'1p-dT\');if($el.2T(\'C-J-23\')){q}R if(c.2n.a1(s.3K)===\'\'){$el.1x();q}R if(s.1n===\'dU\'&&$el.2T(\'C-N-an\')){$el.30($el.2V());q}R if(7W===\'6J-ix\'){if(s.1n===\'dU\'||(s.1n===\'U\'&&s.3Y.1f===0)){$el.30($el.2V())}R{$el.2q(\'1p-dT\',\'\');c.1b.dV($el,\'3h\')}}},c));c.J.2P()},dQ:f(1l){c.J.3k();j 1L=c;if(1l!==\'4s\'){c.G.O().1B(\'4s\').1E(f(i,s){1L.1b.51(s,\'N\')})}if(1l!==\'u\'){c.G.O().1B(\'u\').1E(f(i,s){1L.1b.51(s,\'dS\')})}c.G.O().1B(1l).1E(f(){j $el=$(c);$el.30($(\'<6P />\').21(\'C-N-an\').o($el.2V()))});c.J.2P()},al:f(N,3H){j 6r=1i.3u(\'2f\');6r.id=\'C-N-6r\';6r=c.1y.F(6r);j 2X=c.1b.8B(N);j 1F=c.1b.5E(N);j dW=(2X)?\'\':\'<\'+3H+\'>\';1F=1F.M(/<2f(.*?[^>])id="C-N-6r">​<\\/2f>/i,\'</\'+3H+\'>\'+dW);j $1F=$(1F);$(N).30($1F);q $1F.31()},4f:f(N,Q,1u,12){if(15 Q===\'1e\'){q N}j 1g=(15 12===\'1e\')?\'M\':12;if(Q===\'1W\'){N=c.N[1g+\'cm\'](1u,N)}R{if(1g===\'1x\'){N=c.N[1g+\'62\'](Q,N)}R if(1g===\'cn\'){N=c.N[1g+\'62\'](N)}R{N=c.N[1g+\'62\'](Q,1u,N)}}q N},47:f(N){q(15 N===\'1e\')?c.J.3e():N},41:f(1l,Q,1u,12){j 3e=c.J.3e();j ao=[];j 1L=c;$.1E(3e,f(i,s){if($.7n(1l)){if($.3P(s.1n.2O(),1l)===-1){q}}R{if(1l!==\'*\'&&s.1n.2O()!==1l){q}}ao.2S(1L.N.4f(s,Q,1u,12))});q ao},co:f(1u,N){q $(c.N.47(N)).2l(\'1W\').21(1u)[0]},70:f(1u,N){q $(c.N.47(N)).70(1u)[0]},21:f(1u,N){q $(c.N.47(N)).21(1u)[0]},2u:f(1u,N){q $(c.N.47(N)).2u(1u)[0]},cp:f(N){q $(c.N.47(N)).2l(\'1W\')[0]},cq:f(N,Q,1u){N=c.N.2l(Q,c.N.47(N));q $(N).Q(Q,1u)[0]},cr:f(Q,1u,N){N=c.N.47(N);j 1L=c;j 3i=[];$.1E(N,f(i,s){j $el=$(s);if($el.Q(Q)){3i.2S(1L.N.2l(Q,s))}R{3i.2S(1L.N.85(Q,1u,s))}});q 3i},85:f(Q,1u,N){q $(c.N.47(N)).Q(Q,1u)[0]},2l:f(Q,N){q $(c.N.47(N)).2l(Q)[0]},cs:f(N){N=c.N.47(N);j 3i=[];$.1E(N,f(i,s){if(15 s.3Y===\'1e\'){3i.2S(s)}j $el=$(s);j 2p=s.3Y.1f;2K(j z=0;z<2p;z++){$el.2l(s.3Y[z].1M)}3i.2S($el[0])});q 3i},9k:f(){1i.4h(\'9k\')}}},1y:f(){q{2H:f(o){c.1F.2H(o)},1p:f(1p){c.2t.1x();1p=1p.4Z();1p=$.2R(1p);j 3E=1i.3u(\'1A\');3E.3K=1p;1p=3E.9Y||3E.9Z;1p=1p.M(/\\n/g,\' \');if(c.1b.7e()){j $F=$(c.E.3W);c.G.O().o(\'\').1I($F);$F.o(1p);c.1K.2X($F)}R{j 1q=c.J.1c();j F=1i.5x(1p);if(1q.6s&&1q.8C){j Y=1q.6s(0);Y.5V();Y.53(F);Y.8f(F);Y.3R(1j);c.J.41(1q,Y)}}c.1b.6h();c.2M.28()},dX:f(o){c.1y.5C=1j;c.1y.o(o,L)},o:f(o,2n){c.G.O().2k();j T=c.J.T();j N=c.J.N();if(2n!==L){o=c.2n.9U(o,1j)}j 1q=c.J.1c();j Y=c.J.Y(1q);Y.5V();c.J.41(1q,Y);c.J.3k();j F=1i.3u(\'2f\');F.id=\'C-1y-23\';F=c.1y.F(F);if(c.1y.5C&&T){if(c.1b.7e()){c.G.O().o(o);c.2k.2X()}R{c.1P.4v();j 1l=T.1n.2O();if(1l!==\'p\'||1l!==\'1A\'){1l=\'p\'}j 4E=\'\',4F=\'\';if(N){4E=\'</\'+N.1n.2O()+\'>\';4F=\'<\'+N.1n.2O()+\'>\'}j 1F=c.G.O().o();1F=1F.M(/<2f(.*?[^>])id="C-1y-23">​<\\/2f>/i,4E+\'</\'+1l+\'>\'+o+\'<\'+1l+\'>\'+4F);c.G.O().o(1F);c.J.2P();j 1r=c.J.1r();if(1r&&1r.1n===\'P\'&&1r.3K===\'\'){c.1K.4y(1r)}c.G.O().1B(\'p:dY\').1x();c.1P.4w()}}R{if(N){j $1A=$("<1A/>").o($.9S(o,1i,1j));$1A.1B(N.1n.2O()).1E(f(){$(c).2V().84()});o=$1A.o()}if(c.1b.7e()){j $F=$(c.E.3W);c.G.O().o(\'\').1I($F);$F.o(o);c.1K.2X($F)}R{$(F).4y(o);c.J.2P();c.1K.2I(F);$(F).1x()}}c.1b.6h();c.2M.28()},F:f(F,dZ){if(15 c.2b!==\'1e\'){c.G.O().2k()}F=F[0]||F;j T=c.J.T();j 5C=c.1b.5z(F.1n);if(5C&&T){c.1P.4v();j N=c.J.N();j 1l=T.1n.2O();if(1l!==\'p\'||1l!==\'1A\'){1l=\'p\'}j 4E=\'\',4F=\'\';if(N){4E=\'</\'+N.1n.2O()+\'>\';4F=\'<\'+N.1n.2O()+\'>\'}j 23=1i.3u(\'2f\');23.id=\'C-1y-23\';c.1y.F(23);j 1F=c.G.O().o();1F=1F.M(/<2f(.*?[^>])id="C-1y-23">​<\\/2f>/i,4E+\'</\'+1l+\'><2f id="C-1y-23">​</2f><\'+1l+\'>\'+4F);c.G.O().o(1F);j $23=c.G.O().1B(\'#C-1y-23\');$23.30(F);j 1r=c.J.1r();if(1r&&1r.1n===\'P\'&&1r.3K===\'\'){c.1K.4y(1r)}c.G.O().1B(\'p:dY\').1x();c.1P.4w()}R{j 1q=c.J.1c();j Y=c.J.Y(1q);if(dZ!==L){Y.5V()}Y.53(F);Y.3R(L);c.J.41(1q,Y)}c.1K.2X(F);q F},ae:f(e,F){F=F[0]||F;j Y;j x=e.9C,y=e.c7;if(1i.e0){j 6t=1i.e0(x,y);j 1q=1i.4z();Y=1q.6s(0);Y.8d(6t.iy,6t.3L);Y.3R(1j);Y.53(F)}R if(1i.e1){Y=1i.e1(x,y);Y.53(F)}R if(15 1i.2Q.e2!=="1e"){Y=1i.2Q.e2();Y.e3(x,y);j ap=Y.iz();ap.e3(x,y);Y.iA("iB",ap);Y.bJ()}q F},23:f(Y,F,3R){if(Y===2B){q}Y=Y.9P();5Z{Y.3R(3R);Y.53(F)}60(e){c.2k.2b()}}}},1t:f(){q{2L:f(e){if(c.6i){q}j 1a=e.5p;j 43=(1a>=37&&1a<=40);c.1t.3j=e.5W||e.4X;c.1t.1X=c.J.1X();c.1t.1r=c.J.1r();c.1t.T=c.J.T();c.1t.1G=c.1b.3Z(c.1t.1r,\'1G\');c.1t.2o=c.1b.3Z(c.1t.1r,\'2o\');c.1t.4Q=c.1b.3Z(c.1t.1r,\'4Q\');j e4=c.G.1s(\'1t\',e);if(e4===L){e.26();q L}c.4I.2L(e,1a);if(c.1b.8c()){c.1t.e5(43,1a);c.1t.e6(e,1a)}c.1t.e7(43);c.1t.e8(e,1a);if(!c.E.5K&&1a===c.2C.4T){e.26();j 1q=c.J.1c();j Y=c.J.Y(1q);if(!Y.5U){Y.5V()}q}if(c.E.5K&&1a===c.2C.bR){c.1t.e9()}if(c.E.5K&&1a===c.2C.bQ){c.1t.ea()}if(1a===c.2C.4T&&!e.4Y&&!e.5W&&!e.4X){j 4B=c.G.1s(\'iC\',e);if(4B===L){e.26();q L}if(c.1t.2o&&c.1t.eb(e)===1j){q L}if(c.1t.1G){q c.1t.ec(e)}R if(c.1t.2o||c.1t.4Q){q c.1t.aq(e)}R if(c.1t.T){3C($.1k(c.1t.ed,c),1);if(c.1t.T.1n===\'7m\'){j 1r=c.J.1r();j $1X=$(1r).2r(\'1R\',c.$O[0]);j $2D=$1X.2r(\'4e,4P\',c.$O[0]);if($1X.1f!==0&&c.1b.4D($1X.o())&&$2D.1Y().1f===0&&c.1b.4D($2D.1B("1R").3r().o())){$2D.1B("1R").3r().1x();j F=$(c.E.3W);$2D.2I(F);c.1K.2b(F);q L}}}R if(!c.1t.T){q c.1t.iD(e)}}if(1a===c.2C.9s||e.4X&&1a===ar||e.4X&&1a===as){q c.1t.ee(e,1a)}if(1a===c.2C.4T&&(e.5W||e.4Y)){q c.1t.aq(e)}if(1a===c.2C.5Q||1a===c.2C.5R){c.1b.7o()}if(1a===c.2C.5R&&$(\'#C-1h-2c\').1f!==0){c.1h.1x()}if(1a===c.2C.5Q){j T=c.J.T();if(T&&T.1n===\'7m\'&&c.1b.5s()&&c.1b.at()){c.3x.75();e.26();q}if(c.4o.ff()){j 2d=c.J.2d();j 8D=$(2d).2d()[0];if(2d&&2d.1n===\'ef\'){$(2d).1x()}if(8D&&8D.1n===\'ef\'){$(8D).1x()}}c.1t.eg();c.1t.eh(e);3C($.1k(f(){c.1F.5T=L;c.1t.ei();c.G.O().1B(\'*[3h]\').6Z(\'#C-1h-2c, #C-1h-iE\').2l(\'3h\');c.1t.ej(e);c.1F.5T=1j},c),1)}},e5:f(43,1a){if(!43&&(c.G.6c()===\'1H\'||c.G.6c()===\'43\')){c.G.7h(L);if(c.1t.ek(1a)){c.2e.2H()}}},ek:f(1a){j k=c.2C;j 48=[k.5Q,k.5R,k.4T,k.6U,k.9s,k.bT,k.bU,k.bW,k.bV];q($.3P(1a,48)===-1)?1j:L},e7:f(43){if(!43){q}if((c.G.6c()===\'1H\'||c.G.6c()===\'43\')){c.G.7h(L);q}c.G.7h(\'43\')},e6:f(e,1a){if(c.1t.3j&&1a===90&&!e.4Y&&!e.9D&&c.E.2e.1f){e.26();c.2e.71();q}R if(c.1t.3j&&1a===90&&e.4Y&&!e.9D&&c.E.6N.1f!==0){e.26();c.2e.86();q}R if(!c.1t.3j){if(1a===c.2C.5Q||1a===c.2C.5R||(1a===c.2C.4T&&!e.5W&&!e.4Y)){c.2e.2H()}}},eb:f(e){if(!c.1b.8B(c.1t.2o)){q}j 3E=c.2n.a1($(c.1t.2o).o());if(3E.3p(/(<br\\s?\\/?>){3}$/i)!==-1){e.26();j $3r=$(c.1t.2o).4k().3r().2d();$3r.2d().7V(\'br\').1x();$3r.7V(\'br\').1x();j F=$(c.E.3W);$(c.1t.2o).2I(F);c.1K.2b(F);q 1j}q},e9:f(){j 25=[c.1t.2o,c.1t.1G,c.1t.4Q];2K(j i=0;i<25.1f;i++){if(25[i]){c.1t.eo(25[i]);q L}}},ea:f(){j 25=[c.1t.2o,c.1t.1G,c.1t.4Q];2K(j i=0;i<25.1f;i++){if(25[i]){c.1t.ep(25[i]);q L}}},eo:f(1w){if(!c.1b.8B()){q}if(c.$O.2V().3r()[0]!==1w){q}j F=$(c.E.3W);$(1w).2I(F);c.1K.2b(F)},ep:f(1w){if(!c.1b.at()){q}if(c.$O.2V().1f>1&&c.$O.2V().31()[0]!==1w){q}j F=$(c.E.3W);$(1w).4y(F);c.1K.2b(F)},ee:f(e,1a){if(!c.E.bf){q 1j}if(c.1b.4D(c.1F.1c())&&c.E.7D===L){q 1j}e.26();c.2e.2H();j F;if(c.1t.1G&&!e.4Y){F=(c.E.6K)?1i.5x(7A(c.E.6K+1).3X(\'\\er\')):1i.5x(\'\\t\');c.1y.F(F)}R if(c.E.7D!==L){F=1i.5x(7A(c.E.7D+1).3X(\'\\er\'));c.1y.F(F)}R{if(e.4X&&1a===as){c.3x.75()}R if(e.4X&&1a===ar){c.3x.8a()}R if(!e.4Y){c.3x.8a()}R{c.3x.75()}}q L},e8:f(e,1a){if(c.1t.3j&&1a===65){c.1b.es()}R if(1a!==c.2C.bX&&!c.1t.3j){c.1b.6h()}},ec:f(e){e.26();j F=1i.5x(\'\\n\');j 1q=c.J.1c();j Y=c.J.Y(1q);Y.5V();Y.53(F);c.1K.2I(F);q L},aq:f(e){q c.1t.au(e)},iF:f(e){q c.1t.au(e,1j)},au:f(e,et){e.8s();j eu=1i.3u(\'br\');c.1y.F(eu);if(et===1j){j ev=1i.3u(\'br\');c.1y.F(ev)}q L},ed:f(){j 5F=c.J.T();j ew=5F.3K.M(/<br\\s?\\/?>/gi,\'\');if(5F.1n===\'9G\'&&c.1b.4D(ew)&&!$(5F).2T(\'C-in\')){j p=1i.3u(\'p\');$(5F).30(p);c.1K.2b(p);q L}R if(c.E.iG&&5F.1n===\'P\'){$(5F).2l(\'1W\').2l(\'3h\')}},eg:f(){j $1r=$(c.1t.1r);if($1r.1p().3p(/^\\42$/g)===0){$1r.1x()}},eh:f(e){j $1r=$(c.1t.1r);j $1X=$(c.1t.1X);j 3U=$1r.2r(\'3U\',c.$O[0]);if(3U.1f!==0&&$1r.2r(\'1R\',c.$O[0])&&$1X.4k(\'1R\').1f===1){if(!c.1b.4D($1r.1p())){q}e.26();$1r.1x();$1X.1x();c.1K.2b(3U)}},ei:f(){j av=f(){j o=$.2R(c.3K).M(/\\/t\\/n/g,\'\');if(o===\'\'){$(c).1x()}};c.G.O().1B(\'1R\').1E(av);c.G.O().1B(\'4e, 4P\').1E(av)},ej:f(e){j o=$.2R(c.G.O().o());if(!c.1b.4D(o)){q}e.26();if(c.E.12===\'N\'||c.E.12===\'1G\'){c.G.O().o(c.J.ex());c.J.2P()}R{c.G.O().o(c.E.3W);c.2k.2b()}q L}}},3T:f(){q{2L:f(e){if(c.6i){q}j 1a=e.5p;j 4B=c.G.1s(\'3T\',e);if(4B===L){e.26();q L}if(c.2M.ey(1a)){c.2M.28()}}}},1v:f(){q{3c:f(){c.E.74=c.E.4N[c.E.1v]},1c:f(1M){q(15 c.E.74[1M]!==\'1e\')?c.E.74[1M]:\'\'}}},6J:f(){q{1y:f(){c.2e.2H();c.1y.o(\'<hr>\')}}},K:f(){q{2w:f(e){if(15 e!==\'1e\'&&e.26){e.26()}$(\'.C-K-3w\').1x();j aw=(c.1Q.ez(\'a\')&&c.1b.7p(c.J.1r));j eA=(aw)?\'K-2N\':\'K-1y\';j eB=(aw)?\'3k\':\'1y\';c.V.3c(\'K\',c.1v.1c(eA),iH);c.V.ag();c.K.eC=c.V.ah(c.1v.1c(eB));c.K.8E();c.K.eD();if(c.K.1V===\'6l\'){$(\'#C-K-6m\').8y(\'8z\',1j)}c.K.$8F=$(\'#C-K-29\');c.K.$ax=$(\'#C-K-29-1p\');c.K.$ax.2J(c.K.1p);c.K.$8F.2J(c.K.29);c.K.eC.1D(\'1H\',$.1k(c.K.1y,c));c.V.2w();c.K.$8F.2k()},8E:f(){c.K.$F=L;c.K.29=\'\';c.K.1V=\'\';j $el=$(c.J.1r()).2r(\'a\',c.G.O()[0]);if($el.1f!==0&&$el[0].1n===\'A\'){c.K.$F=$el;c.K.29=$el.Q(\'22\');c.K.1p=$el.1p();c.K.1V=$el.Q(\'1V\')}R{c.K.1p=c.J.1c().4Z()}},eD:f(){if(15 c.K.29===\'1e\'){q}j eE=1L.eF.22.M(/\\/$/i,\'\');c.K.29=c.K.29.M(eE,\'\');c.K.29=c.K.29.M(/^\\/#/,\'#\');c.K.29=c.K.29.M(\'ay:\',\'\');if(!c.E.4d){j 3n=1N 2a(\'^(6L|7l|4t)://\'+1L.eF.iI,\'i\');c.K.29=c.K.29.M(3n,\'\')}},1y:f(){c.2t.1x();j 1V=\'\';j K=$.2R(c.K.$8F.2J());j 1p=$.2R(c.K.$ax.2J().M(/(<([^>]+)>)/gi,\'\'));if(1p===\'\'&&K!==\'\'){1p=K.M(/<|>/g,\'\')}if(K===\'\'||(1p===\'\'&&K===\'\')){q}if(K.3p(\'@\')!==-1&&/(6L|7l|4t):\\/\\//i.5t(K)===L){K=K.M(\'ay:\',\'\');K=\'ay:\'+K}R if(K.3p(\'#\')!==0){if($(\'#C-K-6m\').8y(\'8z\')){1V=\'6l\'}j 6n=\'((dJ--)?[a-7f-9]+(-[a-7f-9]+)*\\\\.)+[a-z]{2,}\';j 3n=1N 2a(\'^(6L|7l|4t)://\'+6n,\'i\');j 6o=1N 2a(\'^\'+6n,\'i\');j 8G=1N 2a(\'\\.(o|iJ)$\',\'i\');if(K.3p(3n)===-1&&K.3p(8G)===-1&&K.3p(6o)===0&&c.E.4d){K=c.E.4d+\'://\'+K}}c.V.3m();c.2e.2H();if(c.K.$F){c.K.$F.Q(\'22\',K);c.K.$F.1p(1p);if(1V!==\'\'){c.K.$F.Q(\'1V\',1V)}R{c.K.$F.2l(\'1V\')}c.J.F(c.K.$F)}R{j $a=$(\'<a 22="\'+K+\'">\').1p(1p);if(1V!==\'\'){$a.Q(\'1V\',1V)}$a=$(c.1y.F($a));c.1K.2I($a);c.G.1s(\'iK\',$a)}c.1Q.6u()},5j:f(e){if(15 e!==\'1e\'&&e.26){e.26()}j 3e=c.J.3e();if(!3e){q}j 2p=3e.1f;j 6u=[];2K(j i=0;i<2p;i++){if(3e[i].1n===\'A\'){6u.2S(3e[i])}j $F=$(3e[i]).2r(\'a\',c.G.O()[0]);$F.30($F.2V())}$(\'.C-K-3w\').1x();c.G.1s(\'iL\',6u)}}},2M:f(){q{ey:f(1a){q 1a===c.2C.4T||1a===c.2C.bS},28:f(){if(!c.E.2M||c.1b.55(\'1G\')){q}j 2M=c.2M;j E=c.E.4S;c.G.O().1B(":6Z(5k,3o,a,1G)").iM().2V().7V(f(){q c.6a===3&&$.2R(c.7q)!==""&&!$(c).1X().is("1G")&&(c.7q.2W(E.6S)||c.7q.2W(E.6T)||c.7q.2W(E.7R)||c.7q.2W(E.29))}).1E(f(){j 1p=$(c).1p();j o=1p;if(o.2W(E.6S)||o.2W(E.6T)){o=2M.eG(o)}R if(o.2W(E.7R)){o=2M.eH(o)}R{o=2M.eI(o)}$(c).4y(1p.M(1p,o)).1x()});j eJ=c.G.O().1B(\'.C-2M-3g\').1E($.1k(f(i,s){j $el=$(s);$el.2u(\'C-2M-3g\');if($el.Q(\'1W\')===\'\'){$el.2l(\'1W\')}if(s.1n===\'6k\'){c.1P.4v();j T=c.J.T();j N=c.J.N();j 1l=T.1n.2O();j o=c.1b.5E(s);$el.Q(\'1C-3I\',i);j 4E=\'\',4F=\'\';if(N){4E=\'</\'+N.1n.2O()+\'>\';4F=\'<\'+N.1n.2O()+\'>\'}j 1F=c.G.O().o();j 3n=1N 2a(c.1b.5E(s),\'i\');1F=1F.M(3n,4E+\'</\'+1l+\'><2x id="C-eK-2x-\'+i+\'">\'+o+\'</2x><\'+1l+\'>\'+4F);c.G.O().o(1F);j $2x=$(\'#C-eK-2x-\'+i).2l(\'id\');c.1K.2I($2x);c.1P.4w()}q $el[0]},c));3C($.1k(f(){c.1Q.3c();c.G.1s(\'2M\',eJ)},c),5X)},eG:f(o){j az=\'<5k 1W="C-2M-3g" 2F="eL" 4x="iN" 6j="\';j aA=\'" iO="0" iP></5k>\';if(o.2W(c.E.4S.6S)){o=o.M(c.E.4S.6S,az+\'//5P.bO.7Q/iQ/$1\'+aA)}if(o.2W(c.E.4S.6T)){o=o.M(c.E.4S.6T,az+\'//iR.bP.7Q/iS/$2\'+aA)}q o},eH:f(o){j 4l=o.2W(c.E.4S.7R);if(!4l){q o}q o.M(o,\'<3o 6j="\'+4l+\'" 1W="C-2M-3g" />\')},eI:f(o){j 4l=o.2W(c.E.4S.29);if(!4l){q o}4l=$.iT(4l,f(v,k){q $.3P(v,4l)===k});j 1f=4l.1f;2K(j i=0;i<1f;i++){j 22=4l[i],1p=22,4d=c.E.4d+\'://\';if(22.2W(/(4t?|7l):\\/\\//i)!==2B){4d=""}if(1p.1f>c.E.9f){1p=1p.eM(0,c.E.9f)+\'...\'}if(1p.3p(\'%\')===-1){1p=eN(1p)}j aB="\\\\b";if($.3P(22.b9(-1),["/","&","="])!==-1){aB=""}j eO=1N 2a(\'(\'+22.M(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,"\\\\$&")+aB+\')\',\'g\');o=o.M(eO,\'<a 22="\'+4d+$.2R(22)+\'" 1W="C-2M-3g">\'+$.2R(1p)+\'</a>\')}q o}}},2D:f(){q{3G:f(3v){if(c.1b.eP([\'bI\',\'3U\',\'8i\',\'iU\'])){q}j 1l=(3v===\'6M\')?\'7d\':\'7c\';j $2D=$(c.J.1r()).aC(\'4e, 4P\').31();c.2t.1x();c.2e.2H();if($2D.1f!==0&&$2D[0].1n===1l){c.J.3k();$2D.1B(\'4e, 4P\').1E(f(){j 1X=$(c).2r(\'1R\');$(c).1B(\'1R\').1E(f(){$(1X).2I(c)})});$2D.1B(\'4e, 4P\').1x();$2D.1B(\'1R\').1E(f(){q $(c).30(f(){q $(\'<p />\').1I($(c).2V())})});$2D.30(f(){q $(c).2V()});c.J.2P();q}1i.4h(\'1y\'+3v);j $7r=c.2D.1c();if(!$7r){if(!c.J.T()){1i.4h(\'dN\',L,\'p\')}q}$7r.1B(\'2f\').30(f(){q $(c).2V()});$7r.1B(c.E.6O.3X(\',\')).1E(f(){$(c).2l(\'3h\')});j $6v=$7r.1X();if(c.1b.7p($6v)&&$6v[0].1n!==\'7m\'&&c.1b.aD($6v)){c.J.3k();$6v.30($6v.2V());c.J.2P()}},1c:f(){j 1r=c.J.1r();j $2D=$(1r).2r(\'4e, 4P\',c.G.O()[0]);q($2D.1f===0)?L:$2D}}},V:f(){q{4c:{},cO:f(){c.E.V={\'1h-2N\':6b()+\'<1A 1W="V-3V" id="C-V-1h-2N">\'+\'<1U>\'+c.1v.1c(\'1z\')+\'</1U>\'+\'<3b 12="1p" id="C-1h-1z" />\'+\'<1U 1W="C-1h-K-7O">\'+c.1v.1c(\'K\')+\'</1U>\'+\'<3b 12="1p" id="C-1h-K" 1W="C-1h-K-7O" 3q-1U="\'+c.1v.1c(\'K\')+\'" />\'+\'<1U 1W="C-1h-K-7O"><3b 12="eQ" id="C-1h-K-6m" 3q-1U="\'+c.1v.1c(\'K-in-1N-3N\')+\'"> \'+c.1v.1c(\'K-in-1N-3N\')+\'</1U>\'+\'</1A>\',\'1h\':6b()+\'<1A 1W="V-3V" id="C-V-1h-1y">\'+\'<1A id="C-V-1h-3s"></1A>\'+\'</1A>\',\'1O\':6b()+\'<1A 1W="V-3V" id="C-V-1O-1y">\'+\'<1A id="C-V-1O-1o-2c">\'+\'<1U>\'+c.1v.1c(\'4r\')+\' <2f 1W="iV">(\'+c.1v.1c(\'9n\')+\')</2f></1U>\'+\'<3b 12="1p" id="C-4r" 3q-1U="\'+c.1v.1c(\'4r\')+\'" /><br><br>\'+\'<1A id="C-V-1O-1o"></1A>\'+\'</1A>\'+\'</1A>\',\'K\':6b()+\'<1A 1W="V-3V" id="C-V-K-1y">\'+\'<1U>eR</1U>\'+\'<3b 12="29" id="C-K-29" 3q-1U="eR" />\'+\'<1U>\'+c.1v.1c(\'1p\')+\'</1U>\'+\'<3b 12="1p" id="C-K-29-1p" 3q-1U="\'+c.1v.1c(\'1p\')+\'" />\'+\'<1U><3b 12="eQ" id="C-K-6m"> \'+c.1v.1c(\'K-in-1N-3N\')+\'</1U>\'+\'</1A>\'};$.5m(c.E,c.E.V)},9M:f(1M,1s){c.V.4c[1M]=1s},iW:f($V){c.V.$7s=$(\'<1A>\').Q(\'id\',\'C-V-7s\');$V.63(c.V.$7s)},iX:f(id,1M,7t){j $3N=$(\'<a 22="#" 3J="3N\'+id+\'">\').1p(1M);if(7t){$3N.21(\'7t\')}j 1L=c;$3N.1D(\'1H\',f(e){e.26();$(\'.C-3N\').2E();$(\'.C-\'+$(c).Q(\'3J\')).2w();1L.V.$7s.1B(\'a\').2u(\'7t\');$(c).21(\'7t\')});c.V.$7s.1I($3N)},iY:f(1M,eS){c.E.V[1M]=eS},eT:f(1M){q c.E.V[1M]},iZ:f(){q c.$8H.1B(\'.V-3V\')},3c:f(5c,1z,2F){c.V.5c=5c;c.V.2F=2F;c.V.1Z();c.V.eU();c.V.eV(1z);c.V.eW();c.V.eX();if(15 c.V.4c[5c]!==\'1e\'){c.V.4c[5c].4a(c)}},2w:f(){c.J.3k();if(c.1b.4W()){c.V.aE()}R{c.V.8I()}c.$5D.2w();c.$3S.eY(j0);c.$V.Q(\'4J\',\'-1\');c.$V.2k();c.V.eZ();if(!c.1b.4W()){3C($.1k(c.V.8I,c),0);$(2G).1D(\'6w.C-V\',$.1k(c.V.6w,c))}c.G.1s(\'j1\',c.V.5c,c.$V);$(1i).2g(\'j2.V\');c.$V.1B(\'3b[12=1p],3b[12=29],3b[12=j3]\').1D(\'1t.C-V\',$.1k(c.V.f0,c))},8I:f(){j 4x=c.$V.fa();j 8J=$(2G).4x();j 6x=$(2G).2F();if(c.V.2F>6x){c.$V.2q({2F:\'96%\',8K:(8J/2-4x/2)+\'3O\'});c.1b.7o();q}if(4x>8J){c.$V.2q({2F:c.V.2F+\'3O\',8K:\'j4\'})}R{c.$V.2q({2F:c.V.2F+\'3O\',8K:(8J/2-4x/2)+\'3O\'})}c.1b.7o();c.1b.a9()},aE:f(){c.$V.2q({2F:\'96%\',8K:\'2%\'});c.1b.7o()},6w:f(){if(c.1b.4W()){c.V.aE()}R{c.V.8I()}},eV:f(1z){c.$7u.o(1z)},eX:f(){c.$8H.o(c.V.eT(c.V.5c))},eW:f(){if(15 $.fn.fb===\'1e\'){q}c.$V.fb({j5:c.$7u});c.$7u.2q(\'j6\',\'j7\')},f0:f(e){if(e.5p!==13){q}e.26();c.$V.1B(\'14.C-V-6y-1S\').1H()},ag:f(){j 14=$(\'<14>\').21(\'C-V-1S C-V-3m-1S\').o(c.1v.1c(\'9l\'));14.1D(\'1H\',$.1k(c.V.3m,c));c.$7v.1I(14)},dH:f(1U){q c.V.aF(1U,\'5N\')},ah:f(1U){q c.V.aF(1U,\'6y\')},aF:f(1U,8g){j 14=$(\'<14>\').21(\'C-V-1S\').21(\'C-V-\'+8g+\'-1S\').o(1U);c.$7v.1I(14);q 14},eZ:f(){j 3y=c.$7v.1B(\'14\');j aG=3y.1f;if(aG===0){q}3y.2q(\'2F\',(5X/aG)+\'%\')},1Z:f(){c.V.fc();c.$3S=$(\'<1A id="C-V-2c"/>\').2E();c.$V=$(\'<1A id="C-V" 5o="j8" />\');c.$7u=$(\'<7N id="C-V-7N" 4J="1" />\');c.$7w=$(\'<14 12="14" id="C-V-3m" 4J="3" 3q-1U="\'+c.1v.1c(\'3m\')+\'" />\').o(\'&j9;\');c.$8H=$(\'<1A id="C-V-2Q" />\');c.$7v=$(\'<9q />\');c.$V.1I(c.$7u);c.$V.1I(c.$8H);c.$V.1I(c.$7v);c.$V.1I(c.$7w);c.$3S.1I(c.$V);c.$3S.7Y(1i.2Q)},fc:f(){c.$5D=$(\'<1A id="C-V-ja">\').2E();$(\'2Q\').63(c.$5D)},eU:f(){c.$7w.1D(\'1H.C-V\',$.1k(c.V.3m,c));$(1i).1D(\'3T.C-V\',$.1k(c.V.7j,c));c.$O.1D(\'3T.C-V\',$.1k(c.V.7j,c));c.$3S.1D(\'1H.C-V\',$.1k(c.V.3m,c))},fe:f(){c.$7w.2g(\'1H.C-V\');$(1i).2g(\'3T.C-V\');c.$O.2g(\'3T.C-V\');c.$3S.2g(\'1H.C-V\');$(2G).2g(\'6w.C-V\')},7j:f(e){if(e.5p!==c.2C.6U){q}c.V.3m(L)},3m:f(e){if(e){if(!$(e.1V).2T(\'C-V-3m-1S\')&&e.1V!==c.$7w[0]&&e.1V!==c.$3S[0]){q}e.26()}if(!c.$3S){q}c.J.2P();c.V.fe();c.1b.8r();c.1b.ak();c.$5D.80(eL,$.1k(f(){c.$5D.1x()},c));c.$3S.80(8q,$.1k(f(){c.$3S.1x();$(1i.2Q).2q(\'8L\',c.V.jb);c.G.1s(\'jc\',c.V.5c)},c))}}},1Q:f(){q{3c:f(){if(15 c.E.dq!==\'1e\'){q}if(c.4o.ie()){j 1L=c;c.G.O().1B(\'1G, 1F\').1D(\'a8\',f(){1L.1P.4v();1L.G.O().Q(\'64\',L);$(c).Q(\'64\',1j);1L.1P.4w()}).1D(\'aa\',f(){1L.1P.4v();1L.G.O().Q(\'64\',1j);$(c).2l(\'64\');1L.1P.4w()})}c.1Q.aj();c.1Q.6u()},ez:f($el,$1r){if(15 $1r===\'1e\'){$1r=$(c.J.1r())}q $1r.is($el)||$1r.aC($el).1f>0},6R:f(){j $1r=$(c.J.1r());j fg=c.1b.7p($1r);$.1E(c.E.1Q.6R,$.1k(f(1a,1u){j 1Q=1u.1Q,1w=1Q.1w,$2Y=1u.2Y,aH=15 1Q.in!==\'1e\'?1Q.in:L,aI=15 1Q.67!==\'1e\'?1Q.67:L;if($1r.2r(1w).dA()>0&&fg){c.1Q.aJ($2Y,aH,aI)}R{c.1Q.aJ($2Y,aI,aH)}},c))},aJ:f($2Y,7x,8M){if(8M&&15 8M.Q!==\'1e\'){c.1Q.aK($2Y,8M.Q,1j)}if(15 7x.Q!==\'1e\'){c.1Q.aK($2Y,7x.Q)}if(15 7x.1z!==\'1e\'){$2Y.1p(7x.1z)}},aK:f($2Y,fh,aL){$.1E(fh,f(1a,1u){if(1a===\'1W\'){if(!aL){$2Y.21(1u)}R{$2Y.2u(1u)}}R{if(!aL){$2Y.Q(1a,1u)}R{$2Y.2l(1a)}}})},9N:f($2Y,2z,2j){if(15 2j.1Q==="1e"){q}2j.2Y=$2Y;c.E.1Q.6R.2S(2j)},aj:f(){c.G.O().1B(\'3o\').1E($.1k(f(i,3o){j $3o=$(3o);$3o.2r(\'a\',c.$O[0]).1D(\'1H\',f(e){e.26()});if(c.4o.ie()){$3o.Q(\'jd\',\'1D\')}c.1h.dE($3o)},c))},6u:f(){if(!c.E.bi){q}c.G.O().1B(\'a\').1D(\'5v.C.\'+c.1T+\' 1H.C.\'+c.1T,$.1k(c.1Q.fi,c));c.G.O().1D(\'5v.C.\'+c.1T+\' 1H.C.\'+c.1T,$.1k(c.1Q.aM,c));$(1i).1D(\'5v.C.\'+c.1T+\' 1H.C.\'+c.1T,$.1k(c.1Q.aM,c))},fj:f($K){q $K.3L()},fi:f(e){j $el=$(e.1V);if($el[0].1n===\'6k\'){q}if($el[0].1n!==\'A\'){$el=$el.2r(\'a\',c.$O[0])}if($el[0].1n!==\'A\'){q}j $K=$el;j 6t=c.1Q.fj($K);j 3w=$(\'<2f 1W="C-K-3w"></2f>\');j 22=$K.Q(\'22\');if(22===1e){22=\'\'}if(22.1f>24){22=22.eM(0,24)+\'...\'}j fk=$(\'<a 22="\'+$K.Q(\'22\')+\'" 1V="6l" />\').o(22).21(\'C-K-3w-6y\');j fl=$(\'<a 22="#" />\').o(c.1v.1c(\'2N\')).1D(\'1H\',$.1k(c.K.2w,c)).21(\'C-K-3w-6y\');j fm=$(\'<a 22="#" />\').o(c.1v.1c(\'5j\')).1D(\'1H\',$.1k(c.K.5j,c)).21(\'C-K-3w-6y\');3w.1I(fk).1I(\' | \').1I(fl).1I(\' | \').1I(fm);3w.2q({2i:(6t.2i+je($K.2q(\'6J-4x\'),10))+\'3O\',2y:6t.2y+\'3O\'});$(\'.C-K-3w\').1x();$(\'2Q\').1I(3w)},aM:f(e){e=e.7k||e;j 1V=e.1V;j $1X=$(1V).2r(\'a\',c.$O[0]);if($1X.1f!==0&&$1X[0].1n===\'A\'&&1V.1n!==\'A\'){q}R if((1V.1n===\'A\'&&c.1b.7p(1V))||$(1V).2T(\'C-K-3w-6y\')){q}$(\'.C-K-3w\').1x()}}},3l:f(){q{3c:f(o){if(c.E.3l===L||c.E.12===\'N\'||c.E.12===\'1G\'){q o}if(o===\'\'||o===\'<p></p>\'){q c.E.3W}o=o+"\\n";c.3l.aN=[];c.3l.z=0;o=o.M(/(<br\\s?\\/?>){1,}\\n?<\\/2o>/gi,\'</2o>\');o=c.3l.fo(o);o=c.3l.fp(o);o=c.3l.fq(o);o=c.3l.fr(o);o=o.M(1N 2a(\'<br\\\\s?/?>\\n?<(\'+c.E.9r.3X(\'|\')+\')(.*?[^>])>\',\'gi\'),\'<p><br /></p>\\n<$1$2>\');q $.2R(o)},fo:f(o){j $1A=$(\'<1A />\').1I(o);$1A.1B(\'2o p\').30(f(){q $(c).1I(\'<br />\').2V()});o=$1A.o();$1A.1B(c.E.9r.3X(\', \')).1E($.1k(f(i,s){c.3l.z++;c.3l.aN[c.3l.z]=s.fs;o=o.M(s.fs,\'\\n{M\'+c.3l.z+\'}\\n\')},c));q o},fr:f(o){$.1E(c.3l.aN,f(i,s){s=(15 s!==\'1e\')?s.M(/\\$/g,\'&#36;\'):s;o=o.M(\'{M\'+i+\'}\',s)});q o},fp:f(o){o=o.M(/\\r\\n/g,"8N");o=o.M(/\\n/g,"8N");o=o.M(/\\r/g,"8N");j ft=/\\s+/g;o=o.M(ft," ");o=$.2R(o);j 6o=/jf/gi;o=o.M(6o,"</p><p>");j 8G=/8N/gi;o=o.M(8G,"<br>");o=\'<p>\'+o+\'</p>\';o=o.M("<p></p>","");o=o.M("\\r\\n\\r\\n","");o=o.M(/<\\/p><p>/g,"</p>\\r\\n\\r\\n<p>");o=o.M(1N 2a("<p><br />","g"),"<p>");o=o.M(1N 2a("<p><br>","g"),"<p>");o=o.M(1N 2a("<br></p>","g"),"</p>");o=o.M(/<p>&5B;<\\/p>/gi,"");q o},fq:f(o){o=o.M(/<p>(.*?){M(.*?)\\}\\s?<\\/p>/gi,\'{M$2}\');o=o.M(1N 2a(\'</2o></p>\',\'gi\'),\'</2o>\');o=o.M(1N 2a(\'<p></2o>\',\'gi\'),\'</2o>\');o=o.M(1N 2a(\'<p><2o>\',\'gi\'),\'<2o>\');o=o.M(1N 2a(\'<2o></p>\',\'gi\'),\'<2o>\');o=o.M(1N 2a(\'<p><p \',\'gi\'),\'<p \');o=o.M(1N 2a(\'<p><p>\',\'gi\'),\'<p>\');o=o.M(1N 2a(\'</p></p>\',\'gi\'),\'</p>\');o=o.M(1N 2a(\'<p>\\\\s?</p>\',\'gi\'),\'\');o=o.M(1N 2a("\\n</p>",\'gi\'),\'</p>\');o=o.M(1N 2a(\'<p>\\t?\\t?\\n?<p>\',\'gi\'),\'<p>\');o=o.M(1N 2a(\'<p>\\t*</p>\',\'gi\'),\'\');q o}}},4b:f(){q{2L:f(e){c.6i=1j;e.26();j 1C=((e.7k||e).fu||2G.fu);j o=1C.8E(\'1p/o\')||1C.8E(\'1p\');j 1G=L;if(c.E.12!==\'1G\'&&!c.1b.55(\'1G\')){o=o.M(/<a(.*?)22="(.*?)"(.*?[^>])>(.*?)<\\/a>/gi,\'###a 22="$2"###$4###/a###\');o=o.M(/<!--[\\s\\S]*?-->/gi,\'\');o=o.M(/<3h[\\s\\S]*?3h>/gi,\'\');o=o.M(/<br\\s?\\/?>|<\\/p>|<\\/1A>|<\\/1R>|<\\/3U>/gi,\'\\n\');o=o.M(/<\\/H[1-6]>/gi,\'\\n\\n\');j 3E=1i.3u(\'1A\');3E.3K=o;o=$.2R(3E.9Y||3E.9Z)}R{1G=1j;o=o.M(/^<4q fv=\'(.*?)\'>/i,\'\');if(o.2W(/^<1G 3h="(.*?)">/i)){o=o.M(/^<1G 3h="(.*?)">/i,\'\');o=o.M(/<\\/1G>$/i,\'\')}}o=c.2n.9U(o);o=o.M(/###a 22="(.*?)"###(.*?)###\\/a###/gi,\'<a 22="$1">$2</a>\');j 3i=c.G.1s(\'4b\',o);o=(15 3i===\'1e\')?o:3i;c.2e.2H();if(c.4b.1p){c.1y.1p(o)}R{c.1y.dX(o)}c.6i=L;if(1G){j T=$(c.J.T()).2r(\'1G\',c.G.O()[0]);$(T).1B(\'p\').1x()}}}},2t:f(){q{cP:f(){if(!c.2t.is()){q}j 3d=c.G.O().2q(\'3d\');j 2v=[\'6g\',\'58\',\'aO\'];if($.3P(2v,3d)===-1){c.G.O().21(\'C-aO\')}j 2i=c.G.O().2q(\'8O-2i\');j 2y=c.G.O().2q(\'8O-2y\');$(\'<3h 1W="C-3h-1l">#\'+c.G.id()+\'.C-2t::2I{ 2i: \'+2i+\'; 2y: \'+2y+\'; }</3h>\').7Y(\'d8\');c.G.O().Q(\'2t\',c.$1w.Q(\'2t\'));c.2t.3G();c.G.O().1D(\'1t.C-2t\',$.1k(c.2t.3G,c))},3G:f(){3C($.1k(f(){j 1g=c.1b.4D()?\'21\':\'2u\';c.G.O()[1g](\'C-2t\')},c),5)},1x:f(){c.G.O().2u(\'C-2t\')},is:f(){if(c.E.2t){q c.$1w.Q(\'2t\',c.E.2t)}R{q!(15 c.$1w.Q(\'2t\')===\'1e\'||c.$1w.Q(\'2t\')===\'\')}}}},4p:f(){q{2w:f(){$(1i.2Q).1I($(\'<1A id="C-4p"><2f></2f></1A>\'));$(\'#C-4p\').eY()},2E:f(){$(\'#C-4p\').80(jg,f(){$(c).1x()})}}},J:f(){q{1c:f(){if(2G.4z){q 2G.4z()}R if(1i.J&&1i.J.12!=="jh"){q 1i.J}q 2B},Y:f(1q){if(15 1q===\'1e\'){1q=c.J.1c()}if(1q.6s&&1q.8C){q 1q.6s(0)}q 2B},41:f(1q,Y){if(Y===2B){q}1q.54();1q.5y(Y)},1r:f(){j 1q=c.J.1c();q(1q===2B)?L:1q.ji},1X:f(){j 1r=c.J.1r();q(1r===2B)?L:1r.6z},T:f(F){F=F||c.J.1r();6A(F){if(c.1b.5z(F.1n)){q($(F).2T(\'C-in\'))?L:F}F=F.6z}q L},N:f(F){F=F||c.J.1r();6A(F){if(c.1b.7b(F.1n)){q($(F).2T(\'C-in\'))?L:F}F=F.6z}q L},1w:f(F){if(!F){F=c.J.1r()}6A(F){if(F.6a===1){if($(F).2T(\'C-in\')){q L}q F}F=F.6z}q L},2d:f(){j 1r=c.J.1r();q(1r===2B)?L:c.J.1r().jj},1Y:f(){j 1r=c.J.1r();q(1r===2B)?L:c.J.1r().6p},2U:f(){j 2U=[];j 49=c.J.49();$.1E(49,$.1k(f(i,F){if(c.1b.aD(F)){2U.2S(F)}},c));q(2U.1f===0)?[c.J.T()]:2U},3e:f(){j 3e=[];j 49=c.J.49();$.1E(49,$.1k(f(i,F){if(c.1b.87(F)){3e.2S(F)}},c));q(3e.1f===0)?[c.J.N()]:3e},49:f(){j 1q=c.J.1c();j Y=c.J.Y(1q);if(c.1b.5s()){q[c.J.1r()]}R{j F=Y.fw;j aP=Y.9Q;if(F===aP){q[F]}j 49=[];6A(F&&F!==aP){49.2S(F=c.J.fx(F))}F=Y.fw;6A(F&&F!==Y.jk){49.jl(F);F=F.6z}j 8P=[];$.1E(49,f(i,s){if(!$(s).2T(\'C-3t-1l, C-J-23\')){8P.2S(s)}});q(8P.1f===0)?[L]:8P}},fx:f(F){if(F.jm()){q F.jn}R{6A(F&&!F.6p){F=F.6z}if(!F){q 2B}q F.6p}},3k:f(){j 1q=c.J.1c();j Y=c.J.Y(1q);j 3Q=c.J.23(1);c.1y.23(Y,3Q,1j);if(Y&&Y.5U===L){j 4i=c.J.23(2);c.1y.23(Y,4i,L)}c.fy=c.G.O().o()},2P:f(3A){j 3Q=c.G.O().1B(\'2f#J-23-1\');j 4i=c.G.O().1B(\'2f#J-23-2\');if(c.4o.ff()){c.G.O().2k()}if(3Q.1f!==0&&4i.1f!==0){c.1K.2H(3Q,4i)}R if(3Q.1f!==0){c.1K.2b(3Q)}R{c.G.O().2k()}if(3A!==L){c.J.3A();c.fy=L}},3A:f(){c.G.O().1B(\'.C-J-23\').1E(f(i,s){j 1p=$(s).1p().M(/\\42/g,\'\');if(1p===\'\'){$(s).1x()}R{$(s).30(f(){q $(c).2V()})}})},23:f(6B){if(15 6B===\'1e\'){6B=1}q $(\'<2f id="J-23-\'+6B+\'" 1W="C-J-23"  1C-jo="C">\'+c.E.bK+\'</2f>\')[0]},ex:f(6B){q c.1b.5E(c.J.23(6B))},F:f(F){$(F).63(c.J.23(1));$(F).1I(c.J.23(2));c.J.2P()},cX:f(){c.G.O().2k();j 1q=c.J.1c();j Y=c.J.Y(1q);Y.69(c.G.O()[0]);c.J.41(1q,Y)},1x:f(){c.J.1c().54()},M:f(o){c.1y.o(o)},1p:f(){q c.J.1c().4Z()},o:f(){j o=\'\';j 1q=c.J.1c();if(1q.8C){j aQ=1i.3u(\'1A\');j 2p=1q.8C;2K(j i=0;i<2p;++i){aQ.jp(1q.6s(i).jq())}o=c.2n.9T(aQ.3K)}q o}}},4I:f(){q{2L:f(e,1a){if(!c.E.4I){if((e.5W||e.4X)&&(1a===66||1a===73)){e.26()}q L}$.1E(c.E.4I,$.1k(f(56,3D){j 48=56.4n(\',\');j 2p=48.1f;j 57=$.1k(f(){j 1g;if(3D.1g.3p(/\\./)!==\'-1\'){1g=3D.1g.4n(\'.\');if(15 c[1g[0]]!==\'1e\'){c[1g[0]][1g[1]].4H(c,3D.4M)}}R{c[3D.1g].4H(c,3D.4M)}},c);2K(j i=0;i<2p;i++){if(15 48[i]===\'93\'){c.4I.57(e,$.2R(48[i]),57)}}},c))},57:f(e,48,fz){j fA={8:"jr",9:"3N",10:"q",13:"q",16:"5i",17:"3j",18:"8x",19:"js",20:"jt",27:"ju",32:"4j",33:"jv",34:"jw",35:"2X",36:"jx",37:"2y",38:"jy",39:"8Q",40:"jz",45:"1y",46:"4s",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",5X:"4",jA:"5",jB:"6",jC:"7",jD:"8",jE:"9",jF:"*",jG:"+",jH:"-",jI:".",jJ:"/",jK:"f1",jL:"f2",jM:"f3",jN:"f4",jO:"f5",jP:"f6",jQ:"f7",jR:"f8",jS:"f9",jT:"jU",jV:"jW",jX:"jY",jZ:"k0",k1:"8n",k2:"-",k3:";",k4:"=",k5:",",k6:"-",k7:".",k8:"/",k9:"`",as:"[",ka:"\\\\",ar:"]",kb:"\'"};j aR={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"kc","=":"+",";":": ","\'":"\\"",",":"<",".":">","/":"?","\\\\":"|"};48=48.2O().4n(" ");j 8R=fA[e.2C],7y=6b.kd(e.5p).2O(),6C="",6D={};$.1E(["8x","3j","4q","5i"],f(6Y,8S){if(e[8S+\'ke\']&&8R!==8S){6C+=8S+\'+\'}});if(8R){6D[6C+8R]=1j}if(7y){6D[6C+7y]=1j;6D[6C+aR[7y]]=1j;if(6C==="5i+"){6D[aR[7y]]=1j}}2K(j i=0,2p=48.1f;i<2p;i++){if(6D[48[i]]){e.26();q fz.4H(c,ba)}}}}},1m:f(){q{cN:f(){$(1i).1B(\'[1C-3v]\').1E($.1k(f(i,s){j $el=$(s);j 1g=$el.1C(\'3v\');j 2h=$el.1C(\'2h\');$el.21(\'C-1C-3v\');$el.1D(\'1H.C-1C-3v\',$.1k(f(e){e.26();if(1g===\'1g\'){j fn=2G[2h];if(15 fn===\'f\'){fn.4a(c,$el,e)}}R{j 3v=1g.4n(\'.\');if(15 c[3v[0]]!==\'1e\'){if(!$.7n(2h)){2h=(2h)?2h.4n(\'|\'):1e}c[3v[0]][3v[1]].4H(c,2h)}}},c))},c))},1Z:f(){c.14.9x();c.14.9y();if(c.E.3y.1f===0){q}c.$1m=c.1m.7X();c.1m.fB();c.1m.1I();c.14.$1m=c.$1m;c.14.9z();c.14.3c(c.$1m);c.1m.fC()},7X:f(){q $(\'<4e>\').21(\'C-1m\').Q({\'id\':\'C-1m-\'+c.1T,\'5o\':\'1m\'})},1I:f(){if(c.E.7H){c.$1m.21(\'C-1m-kf\');$(c.E.7H).o(c.$1m)}R{if(c.E.12===\'3a\'){c.$2c.63(c.$1m)}R{c.$1w.4y(c.$1m)}}},fB:f(){if(c.1b.4W()||c.E.bl){c.$1m.21(\'C-1m-8L\')}},fC:f(){if(!c.1b.8c()||!c.E.bk||c.E.7H){q}if(c.E.3M!==1i){j $el=$(c.E.3M);c.fD=($el.1f===0)?0:c.G.2c().3L().2i-$el.3L().2i}j fE=(c.G.2c().2r(\'.V-2Q\').1f!==0)?kg:0;3C($.1k(f(){c.1m.aS();$(c.E.3M).1D(\'8n.C.\'+c.1T,$.1k(c.1m.aS,c))},c),fE)},fF:f(){q(c.E.3M===1i)?c.G.2c().3L().2i:c.fD},aS:f(){j fG=(c.E.3M===1i)?20:0;j 3B=$(c.E.3M).3B();j 6E=c.1m.fF();if((3B+c.E.5g+fG)>6E){c.1m.fH(3B,6E)}R{c.1m.aT()}},fI:f(){c.$1m.2q({2F:c.G.2c().7Z(),2y:c.G.2c().3L().2y})},fH:f(3B,6E){if(15 c.fJ!==\'1e\'&&c.fJ.kh===L){c.1m.aT();q}j 2X=6E+c.G.2c().fa()-32;j 2F=c.G.2c().7Z();j 3d=\'58\';j 2i=c.E.5g;j 2y=c.G.2c().3L().2y;if(c.E.3M!==1i){3d=\'6g\';2i=c.E.5g+$(c.E.3M).3B()-6E-1;2y=0}c.$1m.21(\'1m-58-2c\');c.$1m.2q({3d:3d,2F:2F,2i:2i,2y:2y});if(3B>2X){$(\'.C-1d-\'+c.1T+\':aU\').2E()}c.1m.fK();c.$1m.2q(\'fL\',(3B<2X)?\'aU\':\'9H\');$(2G).1D(\'6w.C-1m.\'+c.1T,$.1k(c.1m.fI,c))},aT:f(){c.$1m.2q({3d:\'aO\',2F:\'cK\',2i:\'-ki\',2y:0,fL:\'aU\'});c.1m.fM();c.$1m.2u(\'1m-58-2c\');$(2G).2g(\'6w.C-1m.\'+c.1T)},fK:f(){j 3d=(c.E.3M===1i)?\'58\':\'6g\';c.1m.aV(3d)},fM:f(){c.1m.aV(\'6g\')},aV:f(3d){j 1L=c;$(\'.C-1d-\'+c.1T).1E(f(){j $el=$(c);j $14=1L.14.1c($el.Q(\'3J\'));j 2i=(3d===\'58\')?1L.E.5g:$14.3L().2i;$el.2q({3d:3d,2i:($14.8p()+2i)+\'3O\'})})}}},1o:f(){q{2L:f(id,29,1s){c.1o.44=L;c.1o.1s=1s;c.1o.29=29;c.1o.$el=$(id);c.1o.$3s=$(\'<1A id="C-3s" />\');c.1o.$aW=$(\'<1A id="C-3s-2t" />\').1p(c.1v.1c(\'1o-1U\'));c.1o.$3b=$(\'<3b 12="1O" 1M="1O" />\');c.1o.$aW.1I(c.1o.$3b);c.1o.$3s.1I(c.1o.$aW);c.1o.$el.1I(c.1o.$3s);c.1o.$3s.2g(\'C.1o\');c.1o.$3b.2g(\'C.1o\');c.1o.$3s.1D(\'dv.C.1o\',$.1k(c.1o.fN,c));c.1o.$3s.1D(\'kj.C.1o\',$.1k(c.1o.fO,c));c.1o.$3b.1D(\'a2.C.1o\',$.1k(f(e){e=e.7k||e;c.1o.8T(c.1o.$3b[0].5a[0],e)},c));c.1o.$3s.1D(\'4C.C.1o\',$.1k(f(e){e.26();c.1o.$3s.2u(\'6F-aX\').21(\'6F-4C\');c.1o.fP(e)},c))},dB:f(1O,e){c.1o.44=1j;c.1o.8T(1O,e)},fP:f(e){e=e.7k||e;j 5a=e.8v.5a;c.1o.8T(5a[0],e)},8T:f(1O,e){if(c.E.5L){c.1o.aY(1O);c.5H.4u(1O);q}j 3F=!!2G.8u?1N 8u():2B;if(2G.8u){c.1o.aY(1O);j 1M=(c.1o.12===\'1h\')?c.E.bg:c.E.bh;3F.1I(1M,1O)}c.4p.2w();c.G.1s(\'kk\',e,3F);c.1o.4u(3F,e)},aY:f(1O){c.1o.fQ(1O);if(c.1o.44){c.1o.29=(c.1o.12===\'1h\')?c.E.5e:c.E.5f;c.1o.1s=(c.1o.12===\'1h\')?c.1h.1y:c.1O.1y}},fQ:f(1O){c.1o.12=(c.E.bL.5r(1O.12)===-1)?\'1O\':\'1h\'},5q:f(4m,fd){if(4m===L||15 4m!==\'3g\'){q fd}$.1E(4m,$.1k(f(k,v){if(v!==2B&&v.4Z().5r(\'#\')===0){v=$(v).2J()}fd.1I(k,v)},c));q fd},4u:f(3F,e){if(c.1o.12===\'1h\'){3F=c.1o.5q(c.E.kl,3F);3F=c.1o.5q(c.1o.8U,3F)}R{3F=c.1o.5q(c.E.km,3F);3F=c.1o.5q(c.1o.8V,3F)}j 2m=1N 8W();2m.8X(\'kn\',c.1o.29);2m.aZ("X-ko-kp","8W");2m.fR=$.1k(f(){if(2m.b0===4){j 1C=2m.fS;1C=1C.M(/^\\[/,\'\');1C=1C.M(/\\]$/,\'\');j 2s;5Z{2s=(15 1C===\'93\'?$.cc(1C):1C)}60(kq){2s={6I:1j}}c.4p.2E();if(!c.1o.44){c.1o.$3s.2u(\'6F-4C\')}c.1o.1s(2s,c.1o.44,e)}},c);2m.4u(3F)},fN:f(e){e.26();c.1o.$3s.21(\'6F-aX\')},fO:f(e){e.26();c.1o.$3s.2u(\'6F-aX\')},kr:f(){c.1o.8U={}},ks:f(1M,1u){c.1o.8U[1M]=1u},kt:f(1M){5N c.1o.8U[1M]},ku:f(){c.1o.8V={}},kv:f(1M,1u){c.1o.8V[1M]=1u},kw:f(1M){5N c.1o.8V[1M]}}},5H:f(){q{4u:f(1O){c.5H.fT(1O,$.1k(f(fU){c.5H.fV(1O,fU)},c))},fT:f(1O,1s){j 2m=1N 8W();j 9o=(c.E.5L.3p(/\\?/)!==\'-1\')?\'?\':\'&\';2m.8X(\'kx\',c.E.5L+9o+\'1M=\'+1O.1M+\'&12=\'+1O.12,1j);if(2m.fW){2m.fW(\'1p/ky; fv=x-kz-kA\')}j fX=c;2m.fR=f(e){if(c.b0===4&&c.b1===6V){fX.4p.2w();1s(eN(c.fS))}R if(c.b0===4&&c.b1!==6V){}};2m.4u()},fY:f(7C,29){j 2m=1N 8W();if("kB"in 2m){2m.8X(7C,29,1j)}R if(15 fZ!=="1e"){2m=1N fZ();2m.8X(7C,29)}R{2m=2B}q 2m},fV:f(1O,29){j 2m=c.5H.fY(\'kC\',29);if(!2m){q}2m.kD=$.1k(f(){if(2m.b1!==6V){q}c.4p.2E();j 8Y=29.4n(\'?\');if(!8Y[0]){q L}if(!c.1o.44){c.1o.$3s.2u(\'6F-4C\')}j 2s={af:8Y[0]};if(c.1o.12===\'1O\'){j 2v=8Y[0].4n(\'/\');2s.4r=2v[2v.1f-1]}c.1o.1s(2s,c.1o.44,L)},c);2m.kE=f(){};2m.1o.kF=f(e){};2m.aZ(\'kG-kH\',1O.12);2m.aZ(\'x-kI-kJ\',\'kK-kL\');2m.4u(1O)}}},1b:f(){q{4D:f(o){o=(15 o===\'1e\')?c.G.O().o():o;o=o.M(/[\\42-\\kM\\kN]/g,\'\');o=o.M(/&5B;/gi,\'\');o=o.M(/<\\/?br\\s?\\/?>/g,\'\');o=o.M(/\\s/g,\'\');o=o.M(/^<p>[^\\W\\w\\D\\d]*?<\\/p>$/i,\'\');o=o.M(/<5k(.*?[^>])>$/i,\'5k\');o=o.M(/<5Y(.*?[^>])>$/i,\'5Y\');o=o.M(/<[^\\/>][^>]*><\\/[^>]+>/gi,\'\');o=o.M(/<[^\\/>][^>]*><\\/[^>]+>/gi,\'\');o=$.2R(o);q o===\'\'},ad:f(4m){5Z{q 4m kO kP}60(e){q(15 4m==="3g")&&(4m.6a===1)&&(15 4m.3h==="3g")&&(15 4m.kQ==="3g")}},4W:f(){q/(g0|g1|g2|g3)/.5t(6Q.4R)},8c:f(){q!/(g0|g1|kR|g2|g3)/.5t(6Q.4R)},5E:f(el){q $(\'<1A>\').1I($(el).eq(0).kS()).o()},eP:f(25){25=($.7n(25))?25:[25];j 2U=c.J.2U();j 2p=2U.1f;j 6G=L;2K(j i=0;i<2p;i++){j 1l=2U[i].1n.2O();if($.3P(1l,25)!==-1){6G=1j}}q 6G},kT:f(25){25=($.7n(25))?25:[25];j 3e=c.J.3e();j 2p=3e.1f;j 6G=L;2K(j i=0;i<2p;i++){j 1l=3e[i].1n.2O();if($.3P(1l,25)!==-1){6G=1j}}q 6G},3Z:f(1r,1l){j 1w=$(1r).2r(1l,c.G.O()[0]);if(1w.1f===1){q 1w[0]}q L},aD:f(T){T=T[0]||T;q T&&c.1b.5z(T.1n)},5z:f(1l){q(15 1l===\'1e\')?L:c.c1.5t(1l)},87:f(N){N=N[0]||N;q N&&c.1b.7b(N.1n)},7b:f(1l){q(15 1l===\'1e\')?L:c.c2.5t(1l)},7p:f(el){if(!el){q L}if($(el).aC(\'.C-in\').1f===0||$(el).2T(\'C-in\')){q L}q el},dO:f(){q c.1b.55([\'cf\',\'cg\',\'ch\',\'ci\',\'cj\',\'ck\'])},55:f(1n){j 1X=c.J.1X();j 1r=c.J.1r();if($.7n(1n)){j b2=0;$.1E(1n,$.1k(f(i,s){if(c.1b.b3(1r,1X,s)){b2++}},c));q(b2===0)?L:1j}R{q c.1b.b3(1r,1X,1n)}},b3:f(1r,1X,1n){1n=1n.7S();q 1X&&1X.1n===1n?1X:1r&&1r.1n===1n?1r:L},cU:f(){c.8Z=$(1i).3B();$(1i).3B(c.8Z)},cW:f(){if(15 c.8Z===\'1e\'){q}$(1i).3B(c.8Z)},7o:f(){c.b4=$(1i).3B()},ak:f(){if(15 c.b4===\'1e\'){q}$(1i).3B(c.b4)},5s:f(){q c.J.1c().5s},at:f(1w){if(15 1w===\'1e\'){1w=c.J.T();if(!1w){q L}}q(c.1K.3L(1w)===0)?1j:L},8B:f(1w){if(15 1w===\'1e\'){1w=c.J.T();if(!1w){q L}}j 1p=$.2R($(1w).1p()).M(/\\t\\n\\r\\n/g,\'\').M(/\\42/g,\'\');q(c.1K.3L(1w)===1p.1f)?1j:L},dV:f(el,Q){j $el=$(el);if(15 $el.Q(Q)===\'1e\'){q 1j}if($el.Q(Q)===\'\'){$el.2l(Q);q 1j}q L},51:f(F,1l){j 5A;$(F).30(f(){5A=$(\'<\'+1l+\' />\').1I($(c).2V());2K(j i=0;i<c.3Y.1f;i++){5A.Q(c.3Y[i].1M,c.3Y[i].1u)}q 5A});q 5A},7e:f(){q c.b5},es:f(){c.b5=1j},6h:f(){c.b5=L},a9:f(){j $2Q=$(\'o\');j 6x=2G.7Z;if(!6x){j b6=1i.kU.kV();6x=b6.8Q-dr.kW(b6.2y)}j g4=1i.2Q.g5<6x;j 92=c.1b.g6();$2Q.2q(\'8L\',\'9H\');if(g4){$2Q.2q(\'8O-8Q\',92)}},g6:f(){j $2Q=$(\'2Q\');j 6H=1i.3u(\'1A\');6H.8g=\'C-g7-g8\';$2Q.1I(6H);j 92=6H.kX-6H.g5;$2Q[0].kY(6H);q 92},8r:f(){$(\'o\').2q({\'8L\':\'\',\'8O-8Q\':\'\'});$(\'2Q\').1x(\'C-g7-g8\')}}}};$(2G).1D(\'3c.g9.C\',f(){$(\'[1C-g9="C"]\').C()});3f.4G.2L.4G=3f.4G})(kZ);',62,1302,'||||||||||||this|||function||||var|||||html||return||||||||||||redactor||opts|node|core|||selection|link|false|replace|inline|editor||attr|else||block||modal|||range||||type||button|typeof|||||key|utils|get|dropdown|undefined|length|func|image|document|true|proxy|tag|toolbar|tagName|upload|text|sel|current|callback|keydown|value|lang|element|remove|insert|title|div|find|data|on|each|code|pre|click|append|air|caret|self|name|new|file|events|observe|li|btn|uuid|label|target|class|parent|next|build||addClass|href|marker||tags|preventDefault||format|url|RegExp|start|box|prev|buffer|span|off|args|top|btnObject|focus|removeAttr|xhr|clean|blockquote|len|css|closest|json|placeholder|removeClass|arr|show|figure|left|btnName|autosave|null|keyCode|list|hide|width|window|set|after|val|for|init|linkify|edit|toLowerCase|restore|body|trim|push|hasClass|blocks|contents|match|end|item|options|replaceWith|first|||||||||textarea|input|load|position|inlines|Redactor|object|style|returned|ctrl|save|paragraphize|close|re|img|search|aria|last|droparea|script|createElement|cmd|tooltip|indent|buttons|to|removeMarkers|scrollTop|setTimeout|command|tmp|formData|toggle|currentTag|replaced|rel|innerHTML|offset|toolbarFixedTarget|tab|px|inArray|node1|collapse|modalBox|keyup|td|section|emptyHtml|join|attributes|isTag||update|u200B|arrow|direct|||getInlines|keys|nodes|call|paste|callbacks|linkProtocol|ul|setAttr|getBlocks|execCommand|node2|space|children|matches|obj|split|browser|progress|meta|filename|del|https|send|stopDetect|startDetect|height|before|getSelection|cloned|stop|drop|isEmpty|inlineStart|inlineEnd|prototype|apply|shortcuts|tabindex|bold|italic|params|langs|abbr|ol|figcaption|userAgent|regexps|ENTER|methods|enabled|isMobile|metaKey|shiftKey|toString||replaceToTag|btns|insertNode|removeAllRanges|isCurrentOrParent|str|handler|fixed||files|mutation|templateName|instance|imageUpload|fileUpload|toolbarFixedTopOffset|deleted|shift|unlink|iframe|form|extend|module|role|which|getHiddenFields|indexOf|isCollapsed|test|disabled|touchstart|textNode|createTextNode|addRange|isBlockTag|replacement|nbsp|gap|modalOverlay|getOuterHtml|blockElem|isFunction|uploads3|structure|plugins|enterKey|s3|underline|delete|Heading|www|BACKSPACE|DELETE|initToEdit|syncFire|collapsed|deleteContents|ctrlKey|100|source|try|catch||Attr|prepend|contenteditable|||out|createRange|selectNodeContents|nodeType|String|getEvent|hideAll|dropact|keyPosition|absolute|disableSelectAll|rtePaste|src|IMG|_blank|blank|pattern|re2|nextSibling|newEl|breakpoint|getRangeAt|pos|links|listParent|resize|windowWidth|action|parentNode|while|num|modif|possible|boxTop|drag|contains|scrollDiv|error|line|preSpaces|http|orderedlist|rebuffer|inlineTags|strike|navigator|dropdowns|linkyoutube|linkvimeo|ESC|200|mousedown|PRE|index|not|toggleClass|undo|toolbarsButtons||curLang|decrease|inactive|returnValue|isMobileUndoRedo|prepare|BR|isInlineTag|UL|OL|isSelectAll|z0|htmlCleaned|addEvent|event|closeHandler|originalEvent|ftp|LI|isArray|saveScroll|isRedactorParent|nodeValue|insertedList|tabber|active|modalHeader|modalFooter|modalClose|addProperties|character|bind|Array|methodVal|method|tabAsSpaces|autosaveFields|dragImageUpload|dragFileUpload|toolbarExternal|lists|horizontalrule|unorderedlist|outdent|strong|header|option|x200b|com|linkimage|toUpperCase|clickToCancelStorage|destroy|filter|property|createContainer|appendTo|innerWidth|fadeOut|autosaveTimeout|formatCollapsed|formatUncollapsed|unwrap|addAttr|redo|isInline|voice|onSync|increase|act|isDesktop|setStart|setEnd|setStartAfter|className|lastChild|th|amp|encodeEntities|sync|blur|scroll|plugin|innerHeight|300|enableBodyScroll|stopPropagation|blured|FormData|dataTransfer|lastNode|alt|prop|checked|oldEl|isEndOfElement|rangeCount|prev2|getData|inputUrl|re3|modalBody|showOnDesktop|windowHeight|marginTop|overflow|deleteProperties|xparagraphmarkerz|padding|resultNodes|right|special|specialKey|traverseFile|imageFields|fileFields|XMLHttpRequest|open|s3file|freezeScrollTop|||scrollbarWidth|string|modules|direction|||||minHeight|maxHeight|maxWidth|preClass|autosaveName|linkSize|formatting|formattingAdd|buttonsHide|buttonsHideOnMobile|removeFormat|cancel|quote|optional|mark|blockTags|footer|paragraphizeBlocks|TAB|clickToCancel|clickToSave|getModuleMethods|collapseToStart|hideButtons|hideButtonsOnMobile|setFormatting||leftFix|clientX|altKey|removeInlineTags|webkit|DIV|hidden|max|cleaned|RedactorPlugins|hideButtonsSlicer|addCallback|addDropdown|textnode|cloneRange|endContainer|onSet|parseHTML|onGet|onPaste|lt|getPlainText|singleLine|textContent|innerText|denied|removeSpacesHard|change|namespace|observer|dropdownObject|dropdownWidth|one|mouseover|disableBodyScroll|mouseout|focused|isCallback|isElement|nodeToCaretPositionFromPoint|filelink|createCancelButton|createActionButton|redactorImageLink|images|restoreScroll|insertBreakpoint|formatSet|converted|result|endRange|insertBreakLine|221|219|isStartOfElement|insertBreakLineProcessing|removeIt|isLink|inputText|mailto|iframeStart|iframeEnd|regexB|parents|isBlock|showOnMobile|createButton|buttonsSize|inValues|outValues|setDropdownProperties|setDropdownAttr|isDelete|closeTooltip|safes|relative|endNode|container|hotkeysShiftNums|observeScroll|observeScrollDisable|visible|setDropdownPosition|placeholdler|hover|setConfig|setRequestHeader|readyState|status|matched|isCurrentOrParentOne|tmpScrollTop|selectAll|documentElementRect|Function|scope|slice|arguments|settings|focusEnd|clickToEdit||tabKey|imageUploadParam|fileUploadParam|linkTooltip|linkNofollow|toolbarFixed|toolbarOverflow|toolbarCustom|superscript|subscript|shortcutsAdd|Insert||Edit|paragraph|heading1|heading2|heading3|heading4|heading5|heading6|List|accessibility|help|sup|sub|address|aside|article|table|select|invisibleSpace|imageTypes|png|gif|youtube|vimeo|UP|DOWN|SPACE|CTRL|META|SHIFT|ALT|LEFT_WIN|loadOptions|loadModules|loadToEdit|reIsBlock|reIsInline|startToEdit|bindModuleMethods|collapseToEnd|mouseup|clientY|bindHide|setInactiveAll|jsxhr|success|parseJSON|callbackName|clearInterval|H1|H2|H3|H4|H5|H6|splice|Class|removeAll|replaceClass|removeAllClass|replaceAttr|toggleAttr|removeAllAttr|setUndo|setRedo|getUndo|pop|getRedo|add|startTextarea|setIn|setId|enableEditor|setOptions|callEditor|createContainerBox|getName|loadFromTextarea|toolbarMobile|dir|auto|disableBrowsersEditing|setHelpers|custom|templates|enable|setEvent|haspopup|display|none|freezeScroll|clickCallback|unfreezeScroll|all|afterkey|beforekey|icon|setActive|invisible|setStartBefore|TABLE|endOffset|savePreCode|saveFormTags|head|stripTags|restoreFormTags|nofollow|chars||match1|match2|matchBR|matchNL|savePreFormatting|saveCodeFormatting|quot||removeSpaces|isSync|startSync|eventNamespace|destroyed|Math|slideDown||selected|dragover|dropUpload|changeHandler|mutations|detectRemoved|size|directUpload|700|imageDelete|setEditable|showEdit|buttonDelete|createDeleteButton|buttonSave|xn|removedNodes|lenChildren|normalize|formatblock|isCurrentOrParentHeader|strikethrough|formatConvert|formatted|unline|decoration|SPAN|removeEmptyAttr|endTag|raw|empty|deleteContent|caretPositionFromPoint|caretRangeFromPoint|createTextRange|moveToPoint|keydownStop|checkEvents|setupBuffer|addArrowsEvent|setupSelectAll|onArrowDown|onArrowUp|exitFromBlockquote|insertNewLine|replaceDivToParagraph|onTab|HR|removeInvisibleSpace|removeEmptyListInTable|removeEmptyLists|formatEmpty|checkKeyEvents||||insertAfterLastElement|insertBeforeFirstElement||u00a0|enableSelectAll|dbl|br1|br2|blockHtml|markerHtml|isKey|isCurrent|langVarModal|langVarBtn|buttonInsert|cleanUrl|thref|location|convertVideoLinks|convertImages|convertLinks|objects|inserted|500|substring|decodeURIComponent|regexp|inBlocks|checkbox|URL|template|getTemplate|enableEvents|setTitle|setDraggable|setContent|fadeIn|setButtonsWidth|setEnter||||||||||outerHeight|draggable|buildOverlay||disableEvents||isRedactor|properties|showTooltip|getTooltipPosition|aLink|aEdit|aUnlink||getSafes|convert|clear|restoreSafes|outerHTML|re1|clipboardData|charset|startContainer|nextNode|savedSel|origHandler|hotkeysSpecialKeys|setOverflow|setFixed|toolbarOffsetTop|late|getBoxTop|tolerance|observeScrollEnable|observeScrollResize|fullscreen|setDropdownsFixed|visibility|unsetDropdownsFixed|onDrag|onDragLeave|onDrop|getType|onreadystatechange|responseText|executeOnSignedUrl|signedURL|sendToS3|overrideMimeType|that|createCORSRequest|XDomainRequest|iPhone|iPod|BlackBerry|Android|isOverflowing|clientWidth|measureScrollbar|scrollbar|measure|tools|use|strict|No|such|VERSION|ltr|Format|Image||File|Link|Bold|Italic|Strikethrough|Underline|Lists|Open|Unlink|Cancel||Close|Save|Delete|Text|Title|Normal|Quote|Code|Name|Unordered|Ordered|Outdent|Indent|Line|Drop|here|or|Rich|ins|samp|kbd|cite|small|output|map|area|math|fieldset|legend|hgroup|nav|details|menu|||||||summary|jpeg|youtu|jpe|RIGHT|LEFT|Object|getOwnPropertyNames|collapsedEnd|bindMousemoveHide|mousemove|ajax|post|done|autosaveError|disable|firefox|msie|isNaN|Trident||rv|application|content|insertAfter|labelledby|presentation|TEXTAREA|min|margin|enableObjectResizing|enableInlineTableEditing|AutoUrlDetect|bull|javascript|void|addFirst|addAfter|addBefore|setIcon|setInactive|disableAll|enableAll|setEndBefore|reg|font|applet|u2122|trade|u00a9|copy|u2026|hellip|u2014|mdash|u2010|dash|syncBefore|_data|disconnect|removeData|linebreaks|dropdownShow|dropdownShown|slideUp|dropdownHide|dragenter|clearTimeout|||||MutationObserver|forEach|subtree|childList|characterData|characterDataOldValue||fileUploadError|activeElement|imageUploadError|dragstart||705|boolean|TR|formatBreak|through|offsetNode|duplicate|setEndPoint|EndToEnd|enter|insertParagraph|editter|insertDblBreakLine|cleanStyleOnEnter|600|host|php|insertedLink|deletedLink|addBack|281|frameborder|allowfullscreen|embed|player|video|grep|tr|desc|createTabber|addTab|addTemplate|getModal|150|modalOpened|focusin|email|20px|handle|cursor|move|dialog|times|overlay|bodyOveflow|modalClosed|unselectable|parseInt|xparagraphmarkerzxparagraphmarkerz|1500|Control|anchorNode|previousSibling|commonAncestorContainer|unshift|hasChildNodes|firstChild|verified|appendChild|cloneContents|backspace|pause|capslock|esc|pageup|pagedown|home|up|down|101|102|103|104|105|106|107|109|110|111|112|113|114|115|116|117|118|119|120|121|f10|122|f11|123|f12|144|numlock|145|173|186|187|188|189|190|191|192|220|222|_|fromCharCode|Key|external|1000|isOpened|1px|dragleave|uploadStart|uploadImageFields|uploadFileFields|POST|Requested|With|err|clearImageFields|addImageFields|removeImageFields|clearFileFields|addFileFields|removeFileFields|GET|plain|user|defined|withCredentials|PUT|onload|onerror|onprogress|Content|Type|amz|acl|public|read|u200D|uFEFF|instanceof|HTMLElement|ownerDocument|iPad|clone|inInlines|documentElement|getBoundingClientRect|abs|offsetWidth|removeChild|jQuery'.split('|'),0,{}))
\ No newline at end of file
index 5ebdce7158f1fb50fb97de1d7ec6a9ddd6e4708e..84df7855139bae195aad7a0198f4f705908256d5 100644 (file)
        li {
                display: block;
                
-               //@include textShadow($wcfDropdownText);
-               
                &:hover:not(.dropdownDivider):not(.dropdownList):not(.dropdownText),
                &.dropdownList > li:hover:not(.dropdownDivider),
                &.dropdownNavigationItem,
                &.active {
                        background-color: $wcfDropdownBackgroundActive;
                        color: $wcfDropdownLinkActive;
-                       
-                       //@include textShadow($wcfDropdownLinkActive);
                }
                
                &.dropdownDivider {
                        
                        &:hover {
                                color: $wcfDropdownLinkActive;
-                               
-                               @include textShadow($wcfDropdownLinkActive);
                        }
                }
                
index c4bf917699171e7ad3bdad6f936e71b3c09278bc..be38b859e50b053265a08db479295e4e4827909a 100644 (file)
@@ -1,51 +1,3 @@
-@font-face {
-       font-family: 'RedactorFont';
-       src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggi/NUAAAC8AAAAYGNtYXAaVcx2AAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5Zm8dIFkAAAFwAAATSGhlYWQACVb9AAAUuAAAADZoaGVhA+ECBQAAFPAAAAAkaG10eEEBA94AABUUAAAAkGxvY2FVlFE8AAAVpAAAAEptYXhwAC8AkgAAFfAAAAAgbmFtZRHEcG0AABYQAAABZnBvc3QAAwAAAAAXeAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmHwHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIOYf//3//wAAAAAAIOYA//3//wAB/+MaBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAwAAACUCAAGSAAQACQANAAA3EQURBQEFEQURATUXBwACAP4AAdv+SgG2/tySkiUBbgH+lAEBSgH+3AEBJv7/3G9sAAAGAAAASQIAAW4ABAAJAA4AEwAYAB0AABMhFSE1FSEVITUVIRUhNSczFSM1FTMVIzUVMxUjNZIBbv6SAW7+kgFu/pKSSUlJSUlJAW5JSW5JSW5JSdxJSW5JSW5JSQAAAAACAAAAJQH3AZIAFgAuAAAlLgMnBzIuAic+AyMXNh4CByUnMg4CBx4DIxcnHgMXNi4CBwH3Dik/XUABAR04Vjg+WDUYAQFNeEcZEv7MAQENHDMlHzIfEQEBASZUTDYHCSBIZj4lGCQaEARqFi5HLzJFKhJqDC1RZSzVPQoWIxkbJBQID0wCCQ4VDxo4KA8PAAACAG4AJQGSAZIABAAzAAA3IQchJzceAzMyPgI3PgMnNyMXDgMHDgMjIi4CJy4DNycjBx4DF24BJQH+3QFABRIUGg0QGBUQCAYKBgQBAUABAQEEBAQCCAgKBQYJCQcEAgUCAwEBPwEBAwcJCEkkJD8HCgYEBAYKBwcRFRkPtcMGCQkHAwMFAwEBAwUDAwcJCQbDtQ8ZFREHAAUAAP//AgABtwAGAA4AFgBHAF8AAAEzFTMVIzUfAQc1IzUzNS8BNxUzFSMVFx4DFRwBDgEHDgMHMh4CFx4DHwEjJzwBJjQjLgMrARUjNTMyHgIXBzMyPgI3PgM1NC4CJy4DKwEVAUkjS24mkZFvb96RkW9vDAMFAwECAwICBQUGBAECAgIBAQICAgEbIBMBAQIEBQUCCh0qCAwKCQM3DgMFBQMCAQIBAQEBAgECAwQGAw4BtpYgtv9cXEolSUhcXEklSlUDCAoNBwQJBwcCAwUDAgEBAQIBAQMEBANCLgEBAQIGBwYCSLYBAwUDRAECAgECBAQGAwQFBQQBAgIBATIAAAAAAwBtAAABkgGTAAMADAARAAAlIzcXBzM3MxczAyMDFyEVITUBI0YjI7ZKF2MXSmVbZQEBJP7c5nh4eUlJASb+2iRJSQAKAAAAJQIAAZIABAAJAA4AEwAYAB0AIgAnACwAMQAANxEFEQU3FzUHFTU3NScVJwcVFzUVJxU3NRUHFRc1NxUXNQclBxUXNRUnFTc1FQcVFzUAAgD+ALeSkpKSJW1tbW1tbSWSkgEkbW1tbW1tJQFuAf6UASUBSgFIbQFIAUq4AUgBSm8BSgFIbQFIAUrbSAFKAQEBSAFKbwFKAUhtAUgBSgAAAAIACQAlAgABkgAWAC4AACUOAxU1DgMHJj4CFzU0HgIXBT4DNxU1FD4CNy4DNRUmDgIXAgA5VTkcQVxAKA8RGEh3Thc2Vz/+PAY3S1UlECAxICYyHQw9Z0chCt8wRi8VAWsFDxsjGS1kUiwLaQETKUYxYBAUDwgDTRABCRMlGhoiFwkBPhAQJzkZAAAAAgBJAEkBtwFuAEcAjwAAAQ4DFRQeAhceAxc+Azc+AzU0LgInLgMHJg4CBwYiBiYHNAYmIicwLgE0NTQ+Ajc+Azc1DgMHJw4DFRQeAhceAxc+Azc+AzU0LgInLgMHJg4CBwYiBiYVJgYmIjUiJjQmNTQ+Ajc+Azc1DgMHATkJDQkEAwYKBgcOEBAJCA4NDAUGCAUDAwQHBQUKCgwGBQoICAMBAgIBAQEBAQEBAQMGCgYGDxITCxMhHBYJzQkNCQQDBwkHBg4QEQgIDg0MBgUIBQMCBQcFBAoLDAYFCQkIAwECAgEBAQEBAQEBAwcJBgcPERQLEyEcFwkBIgwYHBsQCxgUEgcICwgDAQECBggGBQ0MDwYIDA0KBgUIBAQBAQICBQECAgEBAQECAQQCBQEKEhQRCggQDAwDFwgQFBQNAQwYHBsQCxgUEgcICwgDAQECBggGBQ0MDwYIDA0KBgUIBAQBAQICBQECAgEBAQECAQQCBQEKEhQRCggQDAwDFwgQFBQNAAT//wBJAgABbgAEAAkADgASAAATIRUhNRchFSE1FSEVITUHNQcXAAIA/gC3AUn+twFJ/rclk5MBbklJbklJbklJSbdcWwAAAAUAAABJAgABbgAEAAkADgAaAG0AABMhFSE1FSEVITUVIRUhNSczNSM1IwcVNxUjFRc+Azc+Azc0PgE0NTQuAicuAyMiBioBByIOAiMVPgM3Mj4BMjM6AR4BFx4CFBUcAQYUBw4DBw4DDwEVMzUjPgM3MZIBbv6SAW7+kgFu/pKNRBgUFhYYIAUHBQMBAgICAQEBAQEDBAICBgcHBQEEAwQCAgMEBAICBAQDAgIDAwMCAgMDAwEBAgEBAQEBAgICAQQGCQULRC0BAwQEAgFuSUluSUluSUlrFF0GFAZJFJEFBwYEAQIDBAMBAgMDAwIDBwUFAgIEAgEBAQEBAhUBAgIBAQEBAQIBAQIDBAIBAgMCAQICAwMCAQUHCQYNExQBBAMFAgADAAAASQIAAW4ALAAxAGwAACUiLgInNTMeAzMyPgI1NC4CIyIOAgcjNT4DMzIeAhUUDgIjJzMVIzUnIg4CByMVDgMVFB4CFxUzHgMzMj4CNzMVDgMjIi4CNTQ+AjMyHgIXFSMuAyMBbgoUEhEIHgUKCwsGEyEZDg4ZIRMGCwsKBR4IERIUCh41KBcXKDUet5KSJQYLCwoFHgQHBQICBQcEHgUKCwsGBgsLCgUeCBESFAoeNSgXFyg1HgoUEhEIHgUKCwsGSQMGBwU0AgQDAQ0XHhESHhcNAQMEAjQFBwYDFyg1Hx41KBe3SUkvAQMEAhgFCw0OBwcNDQsGFwIEAwEBAwQCNAUHBgMXKDUeHzUoFwMGBwU0AgQDAQAAAAEAAAC3AgABAAAEAAATIRUhNQACAP4AAQBJSQABAJIASQGSAZIADAAAAQ8CFzcHNxc3DwEXAQcpQQvBC0ApQAvBC0EBWdYBOAE6AdgBOgE4AQAAAAQAAABJAgABbgAEAAkADgASAAATIRUhNRchFSE1FSEVITUHNRcHAAIA/gC3AUn+twFJ/re3k5MBbklJbklJbklJSbdcWwAAAAMAAAAlAgABkgAEAAkAEgAANxEFEQUBBREFEQc/ARcVJTU3FwACAP4AAdv+SgG2tiQwPv6Sbm4lAW4B/pQBAUoB/twBASa4AV5eSgFIk5MABAAlAAAB2wG3AAMAGgAeADUAAAEVJzMHHgIGDwEOAS4BJy4BNDY/AT4BHgEXARcnFTceATI2PwE+AS4BJy4CBg8BDgEeARcB29vbKgMDAQICcwIGBgYCAwMBAnQCBQYGAv5029sqAwYGBQJzAgEBAgMCBgYGAnICAgEDAgG33NwrAgYGBgJzAgEBAgMDBQYGAnMCAQECA/51AdvaKgMDAQJzAgUGBgMCAwECAnMCBQYGAgAABAAA/9sCAAHbAAMAGgAeADUAACU1Fwc3LgI2PwE+AR4BFx4BFAYPAQ4BIiYnBycXNQcuASIGDwEOAR4BFx4CNj8BPgEuAScBJdvbKgMDAQICcwIGBgYCAwMBAnQCBQYGAnTb2yoDBgYFAnMCAQECAwIGBgYCcgICAQMC/9zbASwCBgYGAnICAgEDAgMGBgUCcwIBAwN1AdzbKgMDAQJzAgUGBgMCAwECAnICBgYGAgABAG4AJQFuAZIAEgAAJREjESM1Ii4CNTQ+AjsBESMBSSRKFigeEREeKBaTJSUBSf63khEeKBcWKB4R/pMAAAAAAwAlAAEB3AG2AAoAVwB4AAAlMwcnMzUjNxcjFQcOAwcOAyMiLgInLgM1ND4CNz4DOwE1NC4CJy4DIyIOAgcOAwc1PgM3PgIyMzIeAhceAx0BIzU1IyIOAgcOAxUUHgIXHgMzMj4CNz4DPQEBkkpcXEpKXFxK6wIGBgcEAwgICQUIDw4LBQUHBQIDBQkGBQ8SFAwlAQMDAgMFBwgFBAoJCQQFCQkJBQQJCQkEBQkKCQUNFRENBQUIBQI0FQgMCggDAwUDAQECAwICBQUHAwUJCQcCAwUCApKRkZORkZMHBAYFBQECAwIBAgUHBQULDQ8JCRANCwQFBgUCCQMGBQQCAgICAQEBAgEBAwQFAy8CAwMCAQEBAQIFCAUGDhIXDXgYSwECAwICBgYIBQQGBgUCAgMCAQIEBgQECgsOBwQAAAAEACUASgHbAW4AAwAMAC0AegAANyM3FwczNzMXMwMjAyUVFA4CBw4DIyIuAicuAzU0PgI3PgM7ATcuAyMqAQ4BBw4DBxU+Azc+AzMyHgIXHgMdASMiDgIHDgMVFB4CFx4DMzI+Ajc+AzcVMzU0LgInrjUbGok4EUsSOE1ETQF/AQMFAwMHCQoFBAYGBQIDAwIBAgMEAwMJCw0IFiIFDhIWDQYKCgoFBAoJCgQFCgoJBQUJCgoFBAkHBgIDAwMBJg0WEw8GBgkGAwIFCAUFDA4QCQUJCQgEBAcHBgI3AgUIBsV1dXZHRwEf/uFlBAcOCwsEBAYEAwICAwICBQYHAwUJBwUCAgMCAWIFCAYCAQEBAQMCBAIwAwUEAwIBAgEBAQIDAQIEBgYDCQMEBwQFCw4QCgkPDgsFBQcFAgEBAwICBQUHAxh7DhcTDwUAAAIASQBJAbcBkwAEAIEAABMhFSE1Fx4DFx4DFRQOAgcOAyMiLgInLgMnFR4DFx4DMzI+Ajc+AzU0LgInLgMvAS4DJy4DNTQ+Ajc+AzMyHgIXHgMXNS4DJy4DIyIOAgcOAxUUHgIXHgMfAUkBbv6SvwQIBgYCAgMDAQIDBQQDCAkLBgYNDAwGBg0NDQYGCwwNBgYNDAwHDxoXEggHCwgDAgUHBAUMDxIKHAcNCQcDAgMDAQIDBQMDCAkKBgYLCgsGBQsLCgYGCwwLBgYLDAsGDBcUEQcICwcDAgQHBAUMERUNIAEAJSUxAgMFBAMDBgYHAwUICAYDAgQDAQECAwMCBQcIBEEDBAUDAgECAQEDBgkGBQ8SFQwJEA8NBgYKCggDCwIFBQQDAgUFBgMFBwcFAwIDAwEBAgMCAgQGBgM9AgUDBAEBAgEBAwcJBgYPERMLCA8ODAQFCgoJBQsAAAQAAABJAgABbgAEAAkADgATAAA/ARcHJxc3FwcnJScHFzcXJwcXNwAltiO4AbYluCMB/yO4JbYBuCO2Jdsdkh6TAZQekhwBHZIekwGUHpIcAAAAAAUAAP/bAgAB2wAEAAkADgATABgAABcRIREhASERIREHITUhFRUhNSEVFSE1IRUAAgD+AAHb/koBtkn+3AEk/twBJP7cASQlAgD+AAHc/kkBt5JJSW5JSW5JSQAAAwCTAEkBbQGSABcALwBbAAA3Mh4CFx4DFwYUDgEHDgMrATczNzIeAhceAhQXBhQOAQcOAysBNzMDMzI+Ajc+Ayc2LgInLgMnPgM3PgMnNi4CJy4DKwED+AcNCQkDBAMEAQEBBAQEAgkKDQcqASgBBQsIBwIDAwQBAQQCBAEICAsFKgEoZGQRGRgRCAYLBgQBAQMEBwQGCg8OCggMDQgFAwcDAwEBBAYLBgcQFBcOZAHeAQMEAwMICQwHBgsJCAIDBAMBYYECAgMDAgYHCQUFCQcGAgIEAgFN/uoDBQgGBQ4RFQsKEQ8NBgUJBgQBAQMFBwUECwwOCAsSDw0FBggFAv63AAADACUAAAHbAbcABAANABEAADcRIREhEyMDMzczFzMDBxcjNyUBtv5K/URMOBBLETdLIho0GgABt/5JAW7+20hIASU1eHgAAAACAEIAHwG8AZkAIQBLAAAlBycOAS4BJwcXBw4BIiYvAS4BNDY/AT4BMhYfAR4BFAYHJy4BIgYPAQ4BFBYXHgE+AT8BLgMnLgI2PwE+AhYXBxc3PgE0JicBvJQEBQsMCwYhHg8PJygnDw8PDw8P1w8nKCcPDw8QEA8lCxscHAvFCwwLCgsbHRsLJwMFBgUCCgwDBQhSBg8QEgl+JoYLCwoL9pQEAQECAwMgHg8PDw8PDxAmKCcP1w8QEA8PDycoJw9+CwoLC8YLGx0bCwoLAQsLJgIDBAUCChcXFQhSBgYBBAV9JYYLHBwbCwAAAAMAAABJAgABbgAEAAkADgAAEyEVITUXIRUhNRczFSM1AAIA/gCSAW7+kpPb2wFuSUluSUluSUkAAwAAAEkCAAFuAAQACQAOAAATIRUhNRUhFSE1FTMVIzUAAgD+AAFt/pPc3AFuSUluSUluSUkAAAADAAAASQIAAW4ABAAJAA4AABMhFSE1FSEVITUVIRUhNQAB//4BAf/+AQIA/gABbklJbklJbklJAAMAAABJAgABbgAEAAkADgAAEyEHIScHIRchNxchByEnbgElAf7dAW0B/wH9/wFtASUB/t0BAW5JSW5JSW5JSQAGAAAAJwIAAZUACAANABQAGAAdACEAADc1IxEhFTMRIQEhFSE1FyMVIRUhNQcjNxcXITUhFScXIzdJSQG3Sf5JAUn+kwFtSiX+twFu27hcXG3+2wElKSlJICdJASVK/twBSdzcSbcl3EltbSUlJW5JSQAAAAEAAAABAADCHXSvXw889QALAgAAAAAAz3WLJQAAAADPdYsl////2wIAAdsAAAAIAAIAAAAAAAAAAQAAAeD/4AAAAgD//wAAAgAAAQAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAABAAAAAgAAAAIAAAACAAAAAgAAbgIAAAACAABtAgAAAAIAAAkCAABJAgD//wIAAAACAAAAAgAAAAIAAJICAAAAAgAAAAIAACUCAAAAAgAAbgIAACUCAAAlAgAASQIAAAACAAAAAgAAkwIAACUCAABCAgAAAAIAAAACAAAAAgAAAAIAAAAAAAAAAAoAFAAeAEAAcAC4AQQBhgGoAfoCQAMCAyYDuARGBFQEcASUBLwFFgVuBY4GLgbUB4IHrAfaCFwIgAj2CRIJLglKCWoJpAAAAAEAAAAkAJAACgAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAYAAAAAQAAAAAAAgAOAGoAAQAAAAAAAwAYAC4AAQAAAAAABAAYAHgAAQAAAAAABQAWABgAAQAAAAAABgAMAEYAAQAAAAAACgAoAJAAAwABBAkAAQAYAAAAAwABBAkAAgAOAGoAAwABBAkAAwAYAC4AAwABBAkABAAYAHgAAwABBAkABQAWABgAAwABBAkABgAYAFIAAwABBAkACgAoAJAAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0UmVkYWN0b3JGb250AFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0AFIAZQBnAHUAbABhAHIAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('truetype'), url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AABIoAAoAAAAAEeAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAADgEAAA4Bg0Rie09TLzIAAA74AAAAYAAAAGAIIvzVY21hcAAAD1gAAABMAAAATBpVzHZnYXNwAAAPpAAAAAgAAAAIAAAAEGhlYWQAAA+sAAAANgAAADYACVb9aGhlYQAAD+QAAAAkAAAAJAPhAgVobXR4AAAQCAAAAJAAAACQQQED3m1heHAAABCYAAAABgAAAAYAJFAAbmFtZQAAEKAAAAFmAAABZhHEcG1wb3N0AAASCAAAACAAAAAgAAMAAAEABAQAAQEBDVJlZGFjdG9yRm9udAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeKZviU+HQFHQAAAT8PHQAAAUQRHQAAAAkdAAAN+BIAJQEBDRkbHSAlKi80OT5DSE1SV1xhZmtwdXp/hImOk5idoqessba7wFJlZGFjdG9yRm9udFJlZGFjdG9yRm9udHUwdTF1MjB1RTYwMHVFNjAxdUU2MDJ1RTYwM3VFNjA0dUU2MDV1RTYwNnVFNjA3dUU2MDh1RTYwOXVFNjBBdUU2MEJ1RTYwQ3VFNjBEdUU2MEV1RTYwRnVFNjEwdUU2MTF1RTYxMnVFNjEzdUU2MTR1RTYxNXVFNjE2dUU2MTd1RTYxOHVFNjE5dUU2MUF1RTYxQnVFNjFDdUU2MUR1RTYxRXVFNjFGAAACAYkAIgAkAgABAAQABwAKAA0AQQCYAPEBSQH6Ai8CxwMhA98EGwTXBYEFkQW0BfEGLwagBxEHOgf0CLUJaQmsCfwKhAq5C0QLdAuiC9AMAQxo/JQO/JQO/JQO+5QOi7AVi/gB+JSLi/wB/JSLBfhv990V/EqLi/u5+EqLi/e5Bfu4+5QVi/dv9yb7Avsm+wEFDvcm+AIV+AKLi0L8AouL1AWL+wIV+AKLi0L8AouL1AWL+wIV+AKLi0L8AouL1AX7JvdwFdSLi0JCi4vUBYv7AhXUi4tCQouL1AWL+wIV1IuLQkKLi9QFDviLsBVky0yq+0KWCIshBYuLQMb7LPcT9z33GsW4i4sIiyEF92Wr9wT7QV77Cgj7yfdpFYvIBYuLb3ImSOFBtnqLiwiLfIvXBe6F9yJ7nGSl0PsO6Ps2YwgO9wLUFfe4i4tn+7iLi68FysoVnHmngrGLsounlJydnJ2Up4uyCIv3SUyLi/tXBYt8hoCDg4ODgId8i32Lf4+Dk4OTh5aLmgiL91dLi4v7SQWLZJRvnXkIDvfd+EoVrouL+yrWi4tr+wKLi/dKBbH7kxX3JS/7JS+L1fsDi4uw9wOLi9QF+3LTFfsl5/cl54tC9wOLi2b7A4uLQQWXNhWTg499i3iLf4mBhoSGg4SHgYmOio6KjYiNiI6GjoQIpklri3i5BYuMio2KjYaZhZKEiwiBi4tDbouL90q1iwWfi5mHk4MIVEcVmYsFk4uRjY+Pjo+NkYuUi5SJkoiOh4+FjYOLCH2Li1kFDve393oVRYuu9wyu+wwF+0r7DRXVi6LU7ouiQtWLJve6MIsm+7oFjGcV97iLi0L7uIuL1AUOi7AVi/gB+JSLi/wB/JSLBfdLrxX3JouL1Psmi4tCBYv3AhX3JouL1Psmi4tCBWb3SxX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBbD3cBWLQvcmi4vU+yaLBfe4ixX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBQ74lPdzFfss+xNAUIuLCIv1BftCgExsZEte9wr3BPdB92VrCIv1BYuLxV73PfsaCPxYLBWcsvcim+6RCIs/i5oFi4u2nOHVJs5vpIuLCItOBfs2s/sOLqVGCA73zfe2FXNsgGiLY4tpk3Ccd513n4Gji6CLnJKZmpqakpyLn4uehZt+mH+ZfJJ7i32LgIeChQiIiYmKiYuKi4mMioyKjoqPi5GLpJOknKOco6KcqJYIi6EFWXhlcnRrCPthixV0bH9oi2OLaZNwnXecd6CBoougi5ySmpqZmpKci5+LnoWbfph/mX2Seot+i3+IgoQIiImJioqLiYuKjIqMiY6Kj4uRi6SUpJujnKOinKmWCIuhBVh4ZnJzawgOi/gCFfiUi4tC/JSLi9QF90v7AhX33YuLQvvdi4vUBYv7AhX33YuLQvvdi4vUBWZCFYv3S/snL/cnMAUO9yb4AhX4AouLQvwCi4vUBYv7AhX4AouLQvwCi4vUBYv7AhX4AouLQvwCi4vUBfsh9hXPi4ufc4uL6HeLdYWLd6GRi0Jzi4t3Bav7JRWXl5KTjY6PkI2PjY+Mj4yPi5CLlIiThJCFkYKOf4uHi4aKhoqGioaKhokIi3YFkI6QjZCNkIyPjI+LkIuPio6IjoiMh4uGi4iLiImIiYeJh4eHiIiDgX18CIB+i3jPi4ufXosFjo+QkJGRCIuLBQ74AtQVcItyk3aYCIu/qYsFmIWZh5uLvYu0sIu5i7pisFmLe4t9h36FCG2Li78FoJikk6aL3IvMSYs6iztKSTqLCPtL90sV9yaLi0L7JouL1AVmuhV8i3yHfoUIbYuLcwWAfYR6i3iLeZJ5ln0Ii3SpiwWYhZqHmoubi5mPmJEIqYuLVwV2fnKDcIs6i0rNi9uL3MzN3Iumi6SDoH4Ii1dtiwV+kX2Pe4sIDov3lBX4lIuLQvyUi4vUBQ73m/ftFWL7a0qLgFL3VYuWxEuLtPdry4uWxPtVi4BSzIsFDov4AhX4lIuLQvyUi4vUBfdL+wIV992Li0L73YuL1AWL+wIV992Li0L73YuL1AX7S0IVi/dL9ycv+ycwBQ6LsBWL+AH4lIuL/AH8lIsF+G/33RX8SouL+7n4SouL97kF+0r7SxWvi7vqySyLQvwCi4vU9wL3JvcC+yYFDvhv+EsVi/tw+2/3cPdviwVhYBWShIyChoUI+wf7BwWFhoKMhJKEkoqUkJEI9wj3BwWQkJWKkYQI/CD8HxX3b4r7b/dvi/tuBbW1FZKElYqQkAj3B/cHBZCQipWEkoSRgo2FhQj7BvsHBYWGjYGRhQgO97n3kxWL93D3b/tv+2+KBbW3FYSSipSQkQj3B/cGBZGRlIqShJKEjIGGhgj7CPsHBYaGgYyFkgj7CPsJFftvjPdv+3CL928FYWEVhJKBjIaGCPsH+wcFhoaMgZKEkoSUipGRCPcG9wYFkZGJlIWSCA733bAVi/fdZ4uL+91Bi4v3JgVPi1q8i8iLx7y8x4sI9yeLi/wBZosFDvgm9yYV1Ysv+yUv9yXVi4v3J0GL5/cl5/slQYuL+ycF+3+EFYWCgoSBhoGGgIh/i3WLeZF+mH6XhZ2Looujkp2blpqXopGriwiwi4uUBYuUiJKFj4SQgo1/i3+Lf4l/iH+If4V+hAiLugWWkJeOl46XjZiMmIusi6KEmH6ZfZFyi2gIi/sMV4uLowWL1hV2iwV3i32IhIaDhoeCi36LgY6EkIWQhpOIlIuZi5aQkpaTlo+ai58Ii48FDvdC91kVVoum9wml+wkF+x37ChXDi5zS1oudRMOLPvezR4s++7MF+BPwFYuHBYt3h3uDgIOAf4V9i4GLg46GkYWRiJOLlIuYj5WTkJSQmY6giwihiwWt7RV9mXOSaYt8i36Kfol/iH6Hf4YIi1sFmJOYkJiPl46YjZmLl4uViJGHkoaOhIuCCIuCZYsFaYtyhXt/e3+DeItyi3SReZl+mH6ehaOLmIuXjZWQlpCTk5KUCItzwouL9w8Fi6+EpX2ZCA7U95QV+AKLi2b8AouLsAX3U1oVloeUhZGEkYSOgouCi36GgYKEgoR/iHuLe4t6jnuRepB6lHqXCItKBZqEm4Wch5yIm4mci7OLqZOfm5+alKOLq4ujhZ9/mn6bd5dwlAhvlgV3kX6ShZGFkIiTi5OLl4+UlJGTkZeOm4uai5mImoaZhpqEmYIIi8gFfJF8kHuPfI58jXuLaYtxg3h6d3uCdItui3WQeZd+l32hf61+CKuABQ6L928Vr6n3S/snZ277S/cmBYuLFfdL9yevbvtL+ydnqAX4lIsVZ6n7S/snr273S/cmBYuLFftL9ydnbvdL+yevqAUOi2YVi/iU+JSLi/yU/JSLBfhv+HAV/EqLi/xL+EqLi/hLBUL7JhX7uIuL1Pe4i4tCBYv7AhX7uIuL1Pe4i4tCBYv7AhX7uIuL1Pe4i4tCBQ73jPdyFZ6LmYiUg5ODj36LeYt6h3+DhIOEfYd3iwhii4vstIsFi/cVFZuLloiShJKFjoKLfYt+iIGEhYSFgIh7iwhii4vYtIsFJvuqFfCLBbWLqJKemp2ZlKKLqoulhZ9/mn+ZeZRzjZ+NmpKVl5aXkJuLoIungqB5mHqZcJJoiwgmi4v73QUOsIsVi/hL+EqLi/xL/EqLBfeR+AIVR4s/+7nDi5vT1oucQ8KLQPe5BWlWFaX7DFeLpfcMBQ74UPeKFfso+yiHjwV9h3uNfJMIamupbXx8BWJiSYtitAh8mgVitIvNtLQI92v3awW0tM2LtGIImnwFtGKLSWJiCGb3EhVuqFyKbm4I+1n7WgVtbotcp26ob7qLqKkIsrEFg4+EkIWScKaGsJ+gCN3dBZuapIyifwj7EvsRsWb3GvcaBaiojLpuqAgOi/gCFfiUi4tC/JSLi9QF9yb7AhX4AouLQvwCi4vUBfcn+wIV92+Li0L7b4uL1AUOi/gCFfiUi4tC/JSLi9QFi/sCFfgBi4tC/AGLi9QFi/sCFfdwi4tC+3CLi9QFDov4AhX4k4uLQvyTi4vUBYv7AhX4k4uLQvyTi4vUBYv7AhX4lIuLQvyUi4vUBQ73AvgCFfe4i4tC+7iLi9QF+wL7AhX4lIuLQvyUi4vUBfcC+wIV97iLi0L7uIuL1AUO1LIVi9RCi4v3ufhLi4tB1IuL+7j8S4sF99333RX8AYuL+3D4AYuL93AF1UIVZouL+0v73YuLZvgCi4v3cAX7b0IV+0yL5/cB5/sBBfcBZhX7uYuLsPe5i4tmBWL3AhW0QkKLq9QFDviUFPiUFYsMCgAAAAADAgABkAAFAAABTAFmAAAARwFMAWYAAAD1ABkAhAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAEAAAOYfAeD/4P/gAeAAIAAAAAEAAAAAAAAAAAAAACAAAAAAAAIAAAADAAAAFAADAAEAAAAUAAQAOAAAAAoACAACAAIAAQAg5h///f//AAAAAAAg5gD//f//AAH/4xoEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAQAAhlBJsl8PPPUACwIAAAAAAM91iyUAAAAAz3WLJf///9sCAAHbAAAACAACAAAAAAAAAAEAAAHg/+AAAAIA//8AAAIAAAEAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAQAAAAIAAAACAAAAAgAAAAIAAG4CAAAAAgAAbQIAAAACAAAJAgAASQIA//8CAAAAAgAAAAIAAAACAACSAgAAAAIAAAACAAAlAgAAAAIAAG4CAAAlAgAAJQIAAEkCAAAAAgAAAAIAAJMCAAAlAgAAQgIAAAACAAAAAgAAAAIAAAACAAAAAABQAAAkAAAAAAAOAK4AAQAAAAAAAQAYAAAAAQAAAAAAAgAOAGoAAQAAAAAAAwAYAC4AAQAAAAAABAAYAHgAAQAAAAAABQAWABgAAQAAAAAABgAMAEYAAQAAAAAACgAoAJAAAwABBAkAAQAYAAAAAwABBAkAAgAOAGoAAwABBAkAAwAYAC4AAwABBAkABAAYAHgAAwABBAkABQAWABgAAwABBAkABgAYAFIAAwABBAkACgAoAJAAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0UmVkYWN0b3JGb250AFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0AFIAZQBnAHUAbABhAHIAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');
-       font-weight: normal;
-       font-style: normal;
-}
-.re-icon {
-       font-family: 'RedactorFont';
-       
-       > i:before {
-               position: relative;
-               font-size: 14px;
-       }
-}
-
-.re-video:before { content: "\e600"; }
-.re-unorderedlist:before { content: "\e601"; }
-.re-undo:before { content: "\e602"; }
-.re-underline:before { content: "\e603"; }
-.re-textdirection:before { content: "\e604"; }
-.re-fontcolor:before { content: "\e605"; }
-.re-table:before { content: "\e606"; }
-.re-redo:before { content: "\e607"; }
-.re-quote:before { content: "\e608"; }
-.re-outdent:before { content: "\e609"; }
-.re-orderedlist:before { content: "\e60a"; }
-.re-link:before { content: "\e60b"; }
-.re-horizontalrule:before { content: "\e60c"; }
-.re-italic:before { content: "\e60d"; }
-.re-indent:before { content: "\e60e"; }
-.re-image:before { content: "\e60f"; }
-.re-fullscreen:before { content: "\e610"; }
-.re-normalscreen:before { content: "\e611"; }
-.re-formatting:before { content: "\e612"; }
-.re-fontsize:before { content: "\e613"; }
-.re-fontfamily:before { content: "\e614"; }
-.re-deleted:before { content: "\e615"; }
-.re-html:before { content: "\e616"; }
-.re-clips:before { content: "\e617"; }
-.re-bold:before { content: "\e618"; }
-.re-backcolor:before { content: "\e619"; }
-.re-file:before { content: "\e61a"; }
-.re-alignright:before { content: "\e61b"; }
-.re-alignment:before, .re-alignleft:before { content: "\e61c"; }
-.re-alignjustify:before { content: "\e61d"; }
-.re-aligncenter:before { content: "\e61e"; }
-.re-gallery:before { content: "\e61f"; }
-
 .redactor-box {
        border: 1px solid $wcfContentBorder;
        font-size: 0;
@@ -99,6 +51,7 @@
 
 .redactor-editor {
        max-height: 500px;
+       min-height: 200px;
        padding: 10px;
        position: relative;
        outline: none;
                }
        }
        
-       .quoteBox {
+       .TODO_quoteBox {
                clear: none;
                
                > header {
                }
        }
        
-       .codeBox {
+       .TODO_codeBox {
                overflow: hidden;
                position: relative;
                
                }
        }
        
-       &.msie .quoteBox {
+       &.TODO_msie .quoteBox {
                /* resets 'hasLayout' causing IE to display resize handle and wonky editing behavior */
-               min-height: auto;
+               min-height: 0;
+       }
+}
+
+.redactor-dropdown {
+       > .dropdownMenu {
+               display: block;
+               
+               > li:hover {
+                       background-color: transparent !important;
+               }
+               
+               a:hover {
+                       background-color: $wcfDropdownBackgroundActive;
+               }
+       }
+       
+       .redactor-dropdown-link-inactive {
+               cursor: default;
+               opacity: .6;
+               
+               &:hover {
+                       background-color: transparent !important;
+                       color: $wcfDropdownText !important;
+               }
        }
 }
 
 .redactor-toolbar {
        background: repeating-linear-gradient(0deg, $wcfContentBorderInner 0px, $wcfContentBorderInner 3%, $wcfContentBackground 3%, $wcfContentBackground 100%);
        background-size: 100% 31px;
+       display: flex;
+       flex-wrap: wrap;
        
        > li {
-               display: inline-block;
+               flex: 0 0 auto;
                margin-bottom: 1px;
-               vertical-align: middle;
                
                &:last-of-type,
                &.separator {
                }
                
                > a {
-                       box-sizing: border-box;
                        color: $wcfButtonText;
                        display: block;
                        font-size: 14px;
                        height: 30px;
                        outline: none;
-                       padding: 6px 0;
+                       padding: 5px 8px;
                        text-align: center;
                        text-decoration: none;
-                       width: 30px;
                        
                        &.redactor-button-disabled,
                        &.redactor-button-disabled:before,
                                color: $wcfButtonDisabledText;
                        }
                        
-                       &:before {
-                               color: $wcfButtonText;
-                       }
-                       
-                       > i {
-                               height: 14px;
-                               width: 12px;
-                               
-                               &:before {
-                                       color: $wcfButtonText;
-                               }
-                       }
-                       
                        &:hover,
                        &.redactor-act,
                        &.dropact {
                                background-color: $wcfButtonBackgroundActive;
                                color: $wcfButtonTextActive;
-                               
-                               &::before,
-                               > i::before {
-                                       color: $wcfButtonTextActive;
-                                       text-shadow: none;
-                               }
-                       }
-                       
-                       &.fa-redactor-btn:before {
-                               content: "";
-                       }
-                       
-                       &.redactor-btn-image {
-                               background-position: center;
-                               background-repeat: no-repeat;
-                               
-                               &.redactor-button-disabled {
-                                       opacity: .5;
-                               }
                        }
                }
        }
        }
 }
 
+.re-bold {
+       font-weight: 600;
+}
+
+.re-italic {
+       font-style: italic;
+}
+
+.re-underline {
+       text-decoration: underline !important;
+}
+
+.re-deleted {
+       text-decoration: line-through !important;
+}
+
 #redactor-image-box {
        border: 1px dashed rgba(0, 0, 0, .5);
        display: inline-block;