From 86d65362e516fb285d8bc5baaae3562da3e162b4 Mon Sep 17 00:00:00 2001
From: WoltLab
Date: Thu, 4 Mar 2021 11:46:30 +0000
Subject: [PATCH] Updating minified JavaScript files
---
.../files/acp/js/WCF.ACP.Language.min.js | 2 +-
.../install/files/acp/js/WCF.ACP.Style.min.js | 2 +-
wcfsetup/install/files/acp/js/WCF.ACP.min.js | 2 +-
.../redactor2/redactor.combined.min.js | 72 +++++++++----------
wcfsetup/install/files/js/WCF.Combined.min.js | 38 +++++-----
.../install/files/js/WCF.Combined.tiny.min.js | 34 ++++-----
.../install/files/js/WoltLabSuite.Core.min.js | 23 +-----
.../files/js/WoltLabSuite.Core.tiny.min.js | 19 +----
8 files changed, 77 insertions(+), 115 deletions(-)
diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.Language.min.js b/wcfsetup/install/files/acp/js/WCF.ACP.Language.min.js
index 6a1d54d85a..9bc2a798ea 100644
--- a/wcfsetup/install/files/acp/js/WCF.ACP.Language.min.js
+++ b/wcfsetup/install/files/acp/js/WCF.ACP.Language.min.js
@@ -1 +1 @@
-WCF.ACP.Language={},WCF.ACP.Language.ItemList=Class.extend({_proxy:null,_dialog:null,_notification:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsLanguageItem").each($.proxy(function(e,t){var a=$(t),i=a.data("languageItemID"),n=this;a.click(function(){n._click(i)})},this))},_click:function(e){this._proxy.setOption("data",{actionName:"prepareEdit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.language.item.delete.confirmMessage"),function(e){"cancel"!==e&&(this._proxy.setOption("data",{actionName:"deleteCustomLanguageItems",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[$("#overlayLanguageItemID").val()]}),this._proxy.sendRequest())}.bind(this))},_success:function(e,t,a){e.returnValues?(this._showDialog(e.returnValues.template,e.returnValues.languageItem),this._dialog.find(".jsSubmitLanguageItem").click($.proxy(this._submit,this)),this._dialog.find(".jsDeleteLanguageItem").click($.proxy(this._delete,this))):(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._dialog.wcfDialog("close"),"deleteCustomLanguageItems"===e.actionName?this._notification.show(window.location.reload.bind(window.location)):this._notification.show())},_showDialog:function(e,t){null===this._dialog&&(this._dialog=$("#languageItemEdit"),this._dialog.length||(this._dialog=$('').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:t}).wcfDialog("render")},_submit:function(){var e=$("#overlayLanguageItemValue").val(),t=$("#overlayLanguageCustomItemValue").val(),a=$("#overlayLanguageUseCustomValue").is(":checked")?1:0,i=$("#overlayLanguageItemID").val();this._proxy.setOption("data",{actionName:"edit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[i],parameters:{languageItemValue:e,languageCustomItemValue:t,languageUseCustomValue:a}}),this._proxy.sendRequest()}});
\ No newline at end of file
+WCF.ACP.Language={},WCF.ACP.Language.ItemList=Class.extend({_proxy:null,_dialog:null,_notification:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsLanguageItem").each($.proxy((function(e,t){var a=$(t),i=a.data("languageItemID"),n=this;a.click((function(){n._click(i)}))}),this))},_click:function(e){this._proxy.setOption("data",{actionName:"prepareEdit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.language.item.delete.confirmMessage"),function(e){"cancel"!==e&&(this._proxy.setOption("data",{actionName:"deleteCustomLanguageItems",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[$("#overlayLanguageItemID").val()]}),this._proxy.sendRequest())}.bind(this))},_success:function(e,t,a){e.returnValues?(this._showDialog(e.returnValues.template,e.returnValues.languageItem),this._dialog.find(".jsSubmitLanguageItem").click($.proxy(this._submit,this)),this._dialog.find(".jsDeleteLanguageItem").click($.proxy(this._delete,this))):(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._dialog.wcfDialog("close"),"deleteCustomLanguageItems"===e.actionName?this._notification.show(window.location.reload.bind(window.location)):this._notification.show())},_showDialog:function(e,t){null===this._dialog&&(this._dialog=$("#languageItemEdit"),this._dialog.length||(this._dialog=$('').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:t}).wcfDialog("render")},_submit:function(){var e=$("#overlayLanguageItemValue").val(),t=$("#overlayLanguageCustomItemValue").val(),a=$("#overlayLanguageUseCustomValue").is(":checked")?1:0,i=$("#overlayLanguageItemID").val();this._proxy.setOption("data",{actionName:"edit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[i],parameters:{languageItemValue:e,languageCustomItemValue:t,languageUseCustomValue:a}}),this._proxy.sendRequest()}});
\ No newline at end of file
diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js b/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js
index 97711a3b81..7b0dbbc7fb 100644
--- a/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js
+++ b/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js
@@ -1 +1 @@
-WCF.ACP.Style={},WCF.ACP.Style.CopyStyle=Class.extend({_styleID:0,init:function(t){this._styleID=t;var e=this;$(".jsCopyStyle").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.style.copyStyle.confirmMessage"),$.proxy(e._copy,e),void 0,void 0,!0)})},_copy:function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\style\\StyleAction",objectIDs:[this._styleID]},success:$.proxy(this._success,this)})},_success:function(t,e,s){window.location=t.returnValues.redirectURL}}),WCF.ACP.Style.ImageUpload=WCF.Upload.extend({_button:null,_image:null,_styleID:0,_tmpHash:"",init:function(t,e){this._styleID=parseInt(t)||0,this._tmpHash=e,this._button=$("#uploadImage"),this._image=$("#styleImage"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction")},_initFile:function(t){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){e.returnValues.url?(this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.global.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".styleList .buttonList").each($.proxy(function(t,e){var s=$(e),n=s.data("styleID"),i=this;s.find(".jsSetAsDefault").click(function(t){t.preventDefault(),i._click("setAsDefault",n)}),s.find(".jsDelete").click(function(t){i._delete(t,n)})},this))},_click:function(t,e){this._proxy.setOption("data",{actionName:t,className:"wcf\\data\\style\\StyleAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(t,e){t.preventDefault();var s,n=$(t.currentTarget).data("confirmMessageHtml");n?(s=this,WCF.System.Confirmation.show(n,function(t){"confirm"===t&&s._click("delete",e)},void 0,void 0,!0)):this._click("delete",e)},_success:function(t,e,s){window.location.reload()}});
\ No newline at end of file
+WCF.ACP.Style={},WCF.ACP.Style.CopyStyle=Class.extend({_styleID:0,init:function(t){this._styleID=t;var e=this;$(".jsCopyStyle").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.style.copyStyle.confirmMessage"),$.proxy(e._copy,e),void 0,void 0,!0)}))},_copy:function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\style\\StyleAction",objectIDs:[this._styleID]},success:$.proxy(this._success,this)})},_success:function(t,e,s){window.location=t.returnValues.redirectURL}}),WCF.ACP.Style.ImageUpload=WCF.Upload.extend({_button:null,_image:null,_styleID:0,_tmpHash:"",init:function(t,e){this._styleID=parseInt(t)||0,this._tmpHash=e,this._button=$("#uploadImage"),this._image=$("#styleImage"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction")},_initFile:function(t){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){e.returnValues.url?(this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.global.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".styleList .buttonList").each($.proxy((function(t,e){var s=$(e),n=s.data("styleID"),i=this;s.find(".jsSetAsDefault").click((function(t){t.preventDefault(),i._click("setAsDefault",n)})),s.find(".jsDelete").click((function(t){i._delete(t,n)}))}),this))},_click:function(t,e){this._proxy.setOption("data",{actionName:t,className:"wcf\\data\\style\\StyleAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(t,e){var s,n;t.preventDefault(),(s=$(t.currentTarget).data("confirmMessageHtml"))?(n=this,WCF.System.Confirmation.show(s,(function(t){"confirm"===t&&n._click("delete",e)}),void 0,void 0,!0)):this._click("delete",e)},_success:function(t,e,s){window.location.reload()}});
\ No newline at end of file
diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.min.js b/wcfsetup/install/files/acp/js/WCF.ACP.min.js
index f056a9fa47..386d053f0d 100644
--- a/wcfsetup/install/files/acp/js/WCF.ACP.min.js
+++ b/wcfsetup/install/files/acp/js/WCF.ACP.min.js
@@ -1 +1 @@
-WCF.ACP={},WCF.ACP.Application={},WCF.ACP.Cronjob={},WCF.ACP.Cronjob.ExecutionHandler=Class.extend({_notification:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsCronjobRow .jsExecuteButton").click($.proxy(this._click,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")},_click:function(e){this._proxy.setOption("data",{actionName:"execute",className:"wcf\\data\\cronjob\\CronjobAction",objectIDs:[$(e.target).data("objectID")]}),this._proxy.sendRequest()},_success:function(i,e,t){$(".jsCronjobRow").each($.proxy(function(e,t){var a=$(t).find(".jsExecuteButton").data("objectID");if(WCF.inArray(a,i.objectIDs))return i.returnValues[a]&&($(t).find("td.columnNextExec").html(i.returnValues[a].formatted),$(t).wcfHighlight()),this._notification.show(),!1},this))}}),WCF.ACP.Cronjob.LogList=Class.extend({_dialog:null,init:function(){$(".jsCronjobLogDelete").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.cronjob.log.clear.confirm"),function(e){"confirm"==e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"clearAll",className:"wcf\\data\\cronjob\\log\\CronjobLogAction"},success:function(){window.location.reload()}})})}),$(".jsCronjobError").click($.proxy(this._showError,this))},_showError:function(e){var t=$(e.currentTarget);null===this._dialog?(this._dialog=$('").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html(""+t.next().html()+"
"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_additionalRequestParameters:{},_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i,n){this._actionName=t||"InstallPackage",this._allowRollback=!0===a,this._queueID=e,this._additionalRequestParameters=n||{},this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title","UninstallPackage"===this._actionName&&(this._dialogTitle="wcf.acp.package.uninstallation.title"),this._initProxy(),this._init()},_initProxy:function(){for(var e="",t=this._actionName.split(/([A-Z][a-z0-9]+)/),a=0,i=t.length;a').appendTo($("#packageInstallationInnerContent"));$('").appendTo(e).click($.proxy(this._rollback,this)),$("#packageInstallationInnerContentContainer").show(),this._dialog.wcfDialog("render")},this))},_rollback:function(e){this._setIcon("spinner"),e&&$(e.currentTarget).disable(),this._executeStep("rollback")},prepareInstallation:function(){document.activeElement&&document.activeElement.blur(),this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return $.extend({},this._additionalRequestParameters,{queueID:this._queueID,step:"prepare"})},_success:function(a,e,t){if(this._shouldRender=!1,"function"==typeof window._trackPackageStep&&window._trackPackageStep(this._actionName,a),null===this._dialog&&(this._dialog=$('').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==a.step)return this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter(function(e){e.stop(),(new WCF.ACP.Package.Uninstallation).start(a.packageID)},200);if(a.queueID&&(this._queueID=a.queueID),a.template&&!a.ignoreTemplate&&(this._dialog.html(a.template),this._shouldRender=!0),a.progress&&($("#packageInstallationProgress").attr("value",a.progress).text(a.progress+"%"),$("#packageInstallationProgressLabel").text(a.progress+"%")),a.currentAction&&$("#packageInstallationAction").html(a.currentAction),"success"===a.step)return this._setIcon("check"),void this._purgeTemplateContent($.proxy(function(){var e=$('').appendTo($("#packageInstallationInnerContent")),t=$('").appendTo(e).click(function(){$(this).disable(),window.location=a.redirectLocation});$("#packageInstallationInnerContentContainer").show(),$(document).keydown(function(e){e.which===$.ui.keyCode.ENTER&&t.trigger("click")}),this._dialog.wcfDialog("render")},this));if(a.innerTemplate){var i,n=this;return $("#packageInstallationInnerContent").html(a.innerTemplate).find("input").keyup(function(e){e.keyCode===$.ui.keyCode.ENTER&&n._submit(a)}),a.step&&a.node&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("question"),i=$('').appendTo($("#packageInstallationInnerContent")),$('").appendTo(i).click($.proxy(function(e){$(e.currentTarget).disable(),this._submit(a)},this))),$("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")}this._purgeTemplateContent($.proxy(function(){this._shouldRender&&this._dialog.wcfDialog("render"),a.step&&a.node&&this._executeStep(a.step,a.node)},this))},_submit:function(e){this._setIcon("spinner");var s={};$("#packageInstallationInnerContent input").each(function(e,t){var a,i=$(t),n=i.attr("type");("checkbox"!=n&&"radio"!=n||i.prop("checked"))&&((a=i.attr("name")).match(/(.*)\[([^[]*)\]$/)?(a=RegExp.$1,$key=RegExp.$2,void 0===s[a]&&($key?s[a]={}:s[a]=[]),$key?s[a][$key]=i.val():s[a].push(i.val())):s[a]=i.val())}),this._executeStep(e.step,e.node,s)},_purgeTemplateContent:function(e){$("#packageInstallationInnerContent").children().length&&($("#packageInstallationInnerContentContainer").hide(),$("#packageInstallationInnerContent").empty(),this._shouldRender=!0),e()},_executeStep:function(e,t,a){a=a||{};var i=$.extend({},this._additionalRequestParameters,{node:t,queueID:this._queueID,step:e},a);this._proxy.setOption("data",i),this._proxy.sendRequest()},_setIcon:function(e){this._dialog.find(".jsPackageInstallationStatus").removeClass("fa-check fa-question fa-times fa-spinner").addClass("fa-"+e)}}),WCF.ACP.Package.Installation.Cancel=Class.extend({init:function(e){$("#backButton").click(function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"cancelInstallation",className:"wcf\\data\\package\\installation\\queue\\PackageInstallationQueueAction",objectIDs:[e]},success:function(e){window.location=e.returnValues.url}})})}}),WCF.ACP.Package.Uninstallation=WCF.ACP.Package.Installation.extend({_elements:null,_packageID:0,_wcfPackageListURL:"",init:function(e,t){this._elements=e,this._packageID=0,this._wcfPackageListURL=t,void 0!==this._elements&&this._elements.length&&this._super(0,"UninstallPackage")},start:function(e){this._actionName="UninstallPackage",this._packageID=e,this._queueID=0,this._dialogTitle="wcf.acp.package.uninstallation.title",this._initProxy(),this.prepareInstallation()},_init:function(){this._elements.click($.proxy(this._showConfirmationDialog,this))},_showConfirmationDialog:function(e){var t,a=$(e.currentTarget);a.data("isApplication")&&this._wcfPackageListURL?window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,a.data("objectID"))):(t=this,WCF.System.Confirmation.show(a.data("confirmMessage"),function(e){"confirm"===e&&(t._packageID=a.data("objectID"),t.prepareInstallation())},void 0,void 0,!0))},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Server={},WCF.ACP.Package.Server.Installation=Class.extend({_proxy:null,_selectedPackage:"",init:function(){this._dialog=null,this._selectedPackage=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},bind:function(){$(".jsButtonPackageInstall").removeClass("jsButtonPackageInstall").click($.proxy(this._click,this))},_click:function(e){var t=$(e.currentTarget);WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(function(e){"confirm"===e&&(this._selectedPackage=t.data("package"),this._selectedPackageVersion=t.data("packageVersion"),this._prepareInstallation())},this),void 0,void 0,!0)},_success:function(e){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1).prepareInstallation()):e.returnValues.template&&(null===this._dialog?(this._dialog=$(""+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(t),i=!1),""===$.trim(a.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_prepareInstallation:function(e){var t={packages:{}};t.packages[this._selectedPackage]=this._selectedPackageVersion,e&&(t.authData={packageUpdateServerID:e,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()}}),WCF.ACP.Package.Update={},WCF.ACP.Package.Update.Manager=Class.extend({_dialog:null,_proxy:null,_submitButton:null,init:function(){this._dialog=null,this._submitButton=$(".formSubmit > button").click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsPackageUpdate").each($.proxy(function(e,t){var a=$(t);a.find("input[type=checkbox]").data("packageUpdate",a).change($.proxy(this._change,this))},this))},_change:function(e){var t=$(e.currentTarget);t.is(":checked")?(t.data("packageUpdate").find("select").enable(),t.data("packageUpdate").find("dl").removeClass("disabled"),this._submitButton.enable()):(t.data("packageUpdate").find("select").disable(),t.data("packageUpdate").find("dl").addClass("disabled"),$("input[type=checkbox]:checked").length?this._submitButton.enable():this._submitButton.disable())},_click:function(e,t){var a,i={};$(".jsPackageUpdate").each($.proxy(function(e,t){var a=$(t);a.find("input[type=checkbox]:checked").length&&(i[a.data("package")]=a.find("select").val())},this)),$.getLength(i)&&(this._submitButton.disable(),a={packages:i},t&&(a.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:a}),this._proxy.sendRequest())},_success:function(e,t,a){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0).prepareInstallation()):e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$(""+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.excludedPackages")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.excludedPackages")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._submitButton.enable()):e.returnValues.template&&(null===this._dialog?(this._dialog=$(""+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.unauthorized")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(t),i=!1),""===$.trim(a.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(a),i=!1),i&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_button:null,_dialog:null,init:function(e){!(this._dialog=null)==!e&&$(' '+WCF.Language.get("wcf.acp.package.searchForUpdates")+"").prependTo($(".contentHeaderNavigation > ul")),this._button=elBySel(".jsButtonSearchForUpdates"),this._button&&this._button.addEventListener("click",this._click.bind(this))},_click:function(e){e.preventDefault(),this._button.classList.contains("disabled")||(this._button.classList.add("disabled"),null===this._dialog?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"searchForUpdates",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{ignoreCache:1}},success:$.proxy(this._success,this)}):this._dialog.wcfDialog("open"))},_success:function(e,t,a){"function"!=typeof window._trackSearchForUpdates?e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$(""+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}),this._button.classList.remove("disabled")):window._trackSearchForUpdates(e)}}),WCF.ACP.PluginStore={},WCF.ACP.PluginStore.PurchasedItems={},WCF.ACP.PluginStore.PurchasedItems.Search=Class.extend({_dialog:null,_proxy:null,init:function(){this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(' '+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"").prependTo($(".contentHeaderNavigation > ul")).click($.proxy(this._click,this))},_click:function(){this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction"}),this._proxy.sendRequest()},_success:function(e,t,a){var i;e.returnValues.template?(null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.authorization")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open")),i=this._dialog.find("button").click($.proxy(this._submit,this)),this._dialog.find("input").keyup(function(e){if(e.which==$.ui.keyCode.ENTER)return i.trigger("click"),!1})):e.returnValues.noResults?null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.html(e.returnValues.noResults).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.purchasedItems")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.pluginStore.purchasedItems")),this._dialog.html(e.returnValues.noResults),this._dialog.wcfDialog("open")):e.returnValues.noSSL?null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.html(e.returnValues.noSSL).wcfDialog({title:WCF.Language.get("wcf.global.error.title")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.global.error.title")),this._dialog.html(e.returnValues.noSSL),this._dialog.wcfDialog("open")):e.returnValues.redirectURL&&(window.location=e.returnValues.redirectURL)},_submit:function(){this._dialog.wcfDialog("close"),this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction",parameters:{password:$("#pluginStorePassword").val(),username:$("#pluginStoreUsername").val()}}),this._proxy.sendRequest()}}),WCF.ACP.Worker=Class.extend({init:function(t,a,i,n,e){if("function"==typeof e)throw new Error("The callback parameter is no longer supported, please migrate to 'WoltLabSuite/Core/Acp/Ui/Worker'.");require(["WoltLabSuite/Core/Acp/Ui/Worker"],function(e){new e({dialogId:t,dialogTitle:i,className:a,parameters:n})})}}),WCF.ACP.Category={},WCF.ACP.Category.Collapsible=WCF.Collapsible.SimpleRemote.extend({init:function(e){var t=$('.formSubmit > button[data-type="submit"]');t&&t.click($.proxy(this._sort,this)),this._super(e)},_getButtonContainer:function(e){return $("#"+e+" > .buttons")},_getContainers:function(){return $(".jsCategory").has("ol").has("li")},_getTarget:function(e){return $("#"+e+" > ol")},_sort:function(){$(".collapsibleButton").remove(),this._containers={},this._containerData={};var e=this._getContainers();0==e.length&&console.debug("[WCF.ACP.Category.Collapsible] Empty container set given, aborting."),e.each($.proxy(function(e,t){var a=$(t),i=a.wcfIdentify();this._containers[i]=a,this._initContainer(i)},this))}}),WCF.ACP.Search=WCF.Search.Base.extend({_delay:250,_providerName:"",init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",function(e){e.preventDefault()}),WCF.Dropdown.getDropdownMenu("pageHeaderSearchType").find("a[data-provider-name]").on("click",$.proxy(function(e){e.preventDefault();var t=$(e.target);$(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").text(t.text());var a,i,n=this._providerName;this._providerName="everywhere"!=t.data("providerName")?t.data("providerName"):"",n==this._providerName||(a=$.trim(this._searchInput.val()))&&(i={data:{excludedSearchValues:this._excludedSearchValues,searchString:a}},this._queryServer(i))},this))},_createListItem:function(e){for(var t in 0').appendTo(this._list),$(''+e.title+"").appendTo(this._list),e.items){var a=e.items[t];$(''+WCF.String.escapeHTML(a.title)+""+(a.subtitle?""+WCF.String.escapeHTML(a.subtitle)+"":"")+"").appendTo(this._list),this._itemCount++}},_openDropdown:function(){this._list.find("small").each(function(e,t){for(;t.scrollWidth>t.clientWidth;)t.innerText="⦠"+t.innerText.substr(3)})},_handleEmptyResult:function(){return $(''+WCF.Language.get("wcf.acp.search.noResults")+"").appendTo(this._list),!0},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:not(.dropdownDivider):not(.dropdownText)").eq(this._itemIndex).addClass("dropdownNavigationItem")},_selectElement:function(e){if(-1===this._itemIndex)return!1;window.location=this._list.find("li.dropdownNavigationItem > a").attr("href")},_success:function(e){this._super(e);var t=elById("pageHeaderSearch");this._list[0].style.setProperty("top",t.offsetTop+t.clientHeight+"px","important"),this._list.addClass("acpSearchDropdown")},_getParameters:function(e){return e.data.providerName=this._providerName,e}}),WCF.ACP.User={},WCF.ACP.User.BanHandler={_callback:null,_dialog:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsBanButton").click($.proxy(function(e){var t=$(e.currentTarget);t.data("banned")?this.unban([t.data("objectID")]):this.ban([t.data("objectID")])},this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.ban"===e.data.actionName&&this.ban(e.data.parameters.objectIDs)},unban:function(e){this._proxy.setOption("data",{actionName:"unban",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},ban:function(e){null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.append($('")),this._dialog.append($('")),this._dialog.find("#userBanNeverExpires").change(function(){$("#userBanExpiresSettings").toggle()}),this._dialog.find("button").click($.proxy(this._submit,this))):($("#userBanReason").val(""),$("#userBanNeverExpires").prop("checked",!0),$("#userBanExpiresSettings").hide(),$("#userBanExpiresDatePicker, #userBanExpires").val("")),this._dialog.data("userIDs",e),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.user.ban.sure")})},_submit:function(){this._dialog.find(".innerError").remove();var e="";if(!$("#userBanNeverExpires").is(":checked")&&!(e=$("#userBanExpiresDatePicker").val()))return void this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('').text(WCF.Language.get("wcf.global.form.error.empty")));this._proxy.setOption("data",{actionName:"ban",className:"wcf\\data\\user\\UserAction",objectIDs:this._dialog.data("userIDs"),parameters:{banReason:$("#userBanReason").val(),banExpires:e}}),this._proxy.sendRequest()},_success:function(i,e,t){elBySelAll(".jsUserRow",void 0,function(e){var t=parseInt(elData(e,"object-id"),10);-1!==i.objectIDs.indexOf(t)&&elData(e,"banned","ban"===i.actionName)}),$(".jsBanButton").each(function(e,t){var a=$(t);WCF.inArray(a.data("objectID"),i.objectIDs)&&("unban"==i.actionName?a.data("banned",!1).attr("data-tooltip",a.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):a.data("banned",!0).attr("data-tooltip",a.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))}),(new WCF.System.Notification).show(),WCF.Clipboard.reload(),"ban"==i.actionName&&this._dialog.wcfDialog("close"),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:i.objectIDs})}},WCF.ACP.User.Group={},WCF.ACP.User.Group.Copy=Class.extend({_groupID:0,init:function(e){this._groupID=e,$(".jsButtonUserGroupCopy").click($.proxy(this._click,this))},_click:function(){var e=$('');e.append($('- "+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"
")),e.append($('- "+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"
")),e.append($('- "+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"
")),WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.group.copy.confirmMessage"),$.proxy(function(e){"confirm"===e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\user\\group\\UserGroupAction",objectIDs:[this._groupID],parameters:{copyACLOptions:$("#copyACLOptions").is(":checked"),copyMembers:$("#copyMembers").is(":checked"),copyUserGroupOptions:$("#copyUserGroupOptions").is(":checked")}},success:function(e){window.location=e.returnValues.redirectURL}})},this),"",e,!0)}}),WCF.ACP.User.EnableHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsEnableButton").click($.proxy(function(e){var t=$(e.currentTarget);t.data("enabled")?this.disable([t.data("objectID")]):this.enable([t.data("objectID")])},this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.enable"===e.data.actionName&&this.enable(e.data.parameters.objectIDs)},disable:function(e){this._proxy.setOption("data",{actionName:"disable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},enable:function(e){this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},_success:function(i,e,t){elBySelAll(".jsUserRow",void 0,function(e){var t=parseInt(elData(e,"object-id"),10);-1!==i.objectIDs.indexOf(t)&&elData(e,"enabled","enable"===i.actionName)}),$(".jsEnableButton").each(function(e,t){var a=$(t);WCF.inArray(a.data("objectID"),i.objectIDs)&&("disable"==i.actionName?a.data("enabled",!1).attr("data-tooltip",a.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):a.data("enabled",!0).attr("data-tooltip",a.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))}),(new WCF.System.Notification).show(function(){window.location.reload()}),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:i.objectIDs})}},WCF.ACP.User.SendNewPasswordHandler={init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(t){"com.woltlab.wcf.user.sendNewPassword"===t.data.actionName&&WCF.System.Confirmation.show(t.data.parameters.confirmMessage,function(e){"confirm"===e&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:t.data.parameters.objectIDs})})}},WCF.ACP.Import={},WCF.ACP.Import.Manager=Class.extend({_currentAction:"",_dialog:null,_index:-1,_objectTypes:[],_proxy:null,_redirectURL:"",init:function(e,t){this._currentAction="",this._index=-1,this._objectTypes=e,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._redirectURL=t,this._invoke()},_invoke:function(){var e;this._index++,this._index>=this._objectTypes.length?(this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check"),this._dialog.find("h1").text(WCF.Language.get("wcf.acp.dataImport.completed")),e=$('').appendTo(this._dialog.find("#workerContainer")),$("").click($.proxy(function(){new WCF.Action.Proxy({autoSend:!0,data:{noRedirect:1},dataType:"html",success:$.proxy(function(){window.location=this._redirectURL},this),url:"index.php?cache-clear/&t="+SECURITY_TOKEN})},this)).appendTo(e),this._dialog.wcfDialog("render")):this._run(WCF.Language.get("wcf.acp.dataImport.data."+this._objectTypes[this._index]),this._objectTypes[this._index])},_run:function(e,t){this._currentAction=e,this._proxy.setOption("data",{className:"wcf\\system\\worker\\ImportWorker",parameters:{objectType:t}}),this._proxy.sendRequest()},_success:function(e){null===this._dialog&&(this._dialog=$("").hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.dataImport")})),e.template&&this._dialog.html(e.template),this._currentAction&&this._dialog.find("h1").text(this._currentAction),this._dialog.find("progress").attr("value",e.progress).text(e.progress+"%").next("span").text(e.progress+"%"),e.progress<100?(this._proxy.setOption("data",{className:e.className,loopCount:e.loopCount,parameters:e.parameters}),this._proxy.sendRequest()):this._invoke()}}),WCF.ACP.Stat={},WCF.ACP.Stat.Chart=Class.extend({init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$("#statRefreshButton").click($.proxy(this._refresh,this)),this._refresh()},_refresh:function(){var e=[];$("input[name=objectTypeID]:checked").each(function(){e.push($(this).val())}),e.length&&(this._proxy.setOption("data",{className:"wcf\\data\\stat\\daily\\StatDailyAction",actionName:"getData",parameters:{startDate:$("#startDateDatePicker").val(),endDate:$("#endDateDatePicker").val(),value:$("input[name=value]:checked").val(),dateGrouping:$("input[name=dateGrouping]:checked").val(),objectTypeIDs:e}}),this._proxy.sendRequest())},_success:function(e){switch($("input[name=dateGrouping]:checked").val()){case"yearly":var t=[1,"year"],a=WCF.Language.get("wcf.acp.stat.timeFormat.yearly");break;case"monthly":t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:t=[1,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.daily")}var i={series:{lines:{show:!0},points:{show:!0}},grid:{hoverable:!0},xaxis:{mode:"time",minTickSize:t,timeformat:a,monthNames:WCF.Language.get("__monthsShort")},yaxis:{min:0,tickDecimals:0,tickFormatter:function(e){return WCF.String.addThousandsSeparator(e)}}},n=[];for(var s in e.returnValues){for(var o=e.returnValues[s],r=0;r'+WCF.Language.get("wcf.acp.stat.noData")+"
"),elBySel(".contentHeader > .contentTitle").scrollIntoView({behavior:"smooth"})}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageInputs:[],_pageSelectionContainer:null,init:function(e){this._variablesDescriptions=e,this._pageConditions=$("#pageConditions"),this._pageInputs=$('input[name="pageIDs[]"]'),this._variablesDescriptionsList=$("#ad").next("small").children("ul"),this._pageSelectionContainer=$(this._pageInputs[0]).parents("dl:eq(0)"),this._hidePageSelection(!0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_hidePageSelection:function(e){this._pageSelectionContainer.prev("dl").hide(),this._pageSelectionContainer.hide(),this._pageSelectionContainer.next("dl").css("margin-top",0);var t,a=this._pageSelectionContainer.parent("section");a.children("dl:visible").length||(a.hide(),(t=a.next("section"))&&(t.css("margin-top",0),e&&require(["EventHandler"],function(e){e.add("com.woltlab.wcf.pageConditionDependence","checkVisivility",function(){a.is(":visible")?t.css("margin-top","40px"):t.css("margin-top",0)})})))},_showPageSelection:function(){this._pageSelectionContainer.prev("dl").show(),this._pageSelectionContainer.show(),this._pageSelectionContainer.next("dl").css("margin-top","40px");var e=this._pageSelectionContainer.parent("section");e.show();var t=e.next("section");t&&t.css("margin-top","40px")},_setPageController:function(){var s=$("#objectTypeID").find("option:checked"),e=s.parent();e.is("optgroup")&&"com.woltlab.wcf.global"===e.data("categoryName")?this._showPageSelection():(this._hidePageSelection(),require(["Core"],function(e){for(var t,a,i=0,n=this._pageInputs.length;i').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(e.data.parameters.template),$button=this._dialog.find('button[data-type="submit"]').disable().click($.proxy(this._submit,this)),this._dialog.find("input[type=radio]").change(function(){$button.enable()}))},_submit:function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"setAsSynonyms",className:"wcf\\data\\tag\\TagAction",objectIDs:this._objectIDs,parameters:{tagID:this._dialog.find('input[name="tagID"]:checked').val()}},success:$.proxy(function(){this._dialog.wcfDialog("close"),(new WCF.System.Notification).show(function(){window.location.reload()})},this)})}});
\ No newline at end of file
+WCF.ACP={},WCF.ACP.Application={},WCF.ACP.Cronjob={},WCF.ACP.Cronjob.ExecutionHandler=Class.extend({_notification:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsCronjobRow .jsExecuteButton").click($.proxy(this._click,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")},_click:function(e){this._proxy.setOption("data",{actionName:"execute",className:"wcf\\data\\cronjob\\CronjobAction",objectIDs:[$(e.target).data("objectID")]}),this._proxy.sendRequest()},_success:function(e,t,a){$(".jsCronjobRow").each($.proxy((function(t,a){var i=$(a).find(".jsExecuteButton"),n=i.data("objectID");if(WCF.inArray(n,e.objectIDs))return e.returnValues[n]&&($(a).find("td.columnNextExec").html(e.returnValues[n].formatted),$(a).wcfHighlight()),this._notification.show(),!1}),this))}}),WCF.ACP.Cronjob.LogList=Class.extend({_dialog:null,init:function(){$(".jsCronjobLogDelete").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.cronjob.log.clear.confirm"),(function(e){"confirm"==e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"clearAll",className:"wcf\\data\\cronjob\\log\\CronjobLogAction"},success:function(){window.location.reload()}})}))})),$(".jsCronjobError").click($.proxy(this._showError,this))},_showError:function(e){var t=$(e.currentTarget);null===this._dialog?(this._dialog=$('").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html(""+t.next().html()+"
"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_additionalRequestParameters:{},_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i,n){this._actionName=t||"InstallPackage",this._allowRollback=!0===a,this._queueID=e,this._additionalRequestParameters=n||{},this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title","UninstallPackage"===this._actionName&&(this._dialogTitle="wcf.acp.package.uninstallation.title"),this._initProxy(),this._init()},_initProxy:function(){var e,t,a,i="",n=this._actionName.split(/([A-Z][a-z0-9]+)/);for(e=0,t=n.length;e').appendTo($("#packageInstallationInnerContent"));$('").appendTo(e).click($.proxy(this._rollback,this)),$("#packageInstallationInnerContentContainer").show(),this._dialog.wcfDialog("render")}),this))},_rollback:function(e){this._setIcon("spinner"),e&&$(e.currentTarget).disable(),this._executeStep("rollback")},prepareInstallation:function(){document.activeElement&&document.activeElement.blur(),this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return $.extend({},this._additionalRequestParameters,{queueID:this._queueID,step:"prepare"})},_success:function(e,t,a){var i,n;return this._shouldRender=!1,"function"==typeof window._trackPackageStep&&window._trackPackageStep(this._actionName,e),null===this._dialog&&(this._dialog=$('').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==e.step?(this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter((function(t){t.stop(),(new WCF.ACP.Package.Uninstallation).start(e.packageID)}),200)):(e.queueID&&(this._queueID=e.queueID),e.template&&!e.ignoreTemplate&&(this._dialog.html(e.template),this._shouldRender=!0),e.progress&&($("#packageInstallationProgress").attr("value",e.progress).text(e.progress+"%"),$("#packageInstallationProgressLabel").text(e.progress+"%")),e.currentAction&&$("#packageInstallationAction").html(e.currentAction),"success"===e.step?(this._setIcon("check"),void this._purgeTemplateContent($.proxy((function(){var t=$('').appendTo($("#packageInstallationInnerContent")),a=$('").appendTo(t).click((function(){$(this).disable(),window.location=e.redirectLocation}));$("#packageInstallationInnerContentContainer").show(),$(document).keydown((function(e){e.which===$.ui.keyCode.ENTER&&a.trigger("click")})),this._dialog.wcfDialog("render")}),this))):e.innerTemplate?(i=this,$("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup((function(t){t.keyCode===$.ui.keyCode.ENTER&&i._submit(e)})),e.step&&e.node&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("question"),n=$('').appendTo($("#packageInstallationInnerContent")),$('").appendTo(n).click($.proxy((function(t){$(t.currentTarget).disable(),this._submit(e)}),this))),$("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")):void this._purgeTemplateContent($.proxy((function(){this._shouldRender&&this._dialog.wcfDialog("render"),e.step&&e.node&&this._executeStep(e.step,e.node)}),this)))},_submit:function(e){this._setIcon("spinner");var t={};$("#packageInstallationInnerContent input").each((function(e,a){var i,n=$(a),s=n.attr("type");("checkbox"!=s&&"radio"!=s||n.prop("checked"))&&((i=n.attr("name")).match(/(.*)\[([^[]*)\]$/)?(i=RegExp.$1,$key=RegExp.$2,void 0===t[i]&&($key?t[i]={}:t[i]=[]),$key?t[i][$key]=n.val():t[i].push(n.val())):t[i]=n.val())})),this._executeStep(e.step,e.node,t)},_purgeTemplateContent:function(e){$("#packageInstallationInnerContent").children().length&&($("#packageInstallationInnerContentContainer").hide(),$("#packageInstallationInnerContent").empty(),this._shouldRender=!0),e()},_executeStep:function(e,t,a){a||(a={});var i=$.extend({},this._additionalRequestParameters,{node:t,queueID:this._queueID,step:e},a);this._proxy.setOption("data",i),this._proxy.sendRequest()},_setIcon:function(e){this._dialog.find(".jsPackageInstallationStatus").removeClass("fa-check fa-question fa-times fa-spinner").addClass("fa-"+e)}}),WCF.ACP.Package.Installation.Cancel=Class.extend({init:function(e){$("#backButton").click((function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"cancelInstallation",className:"wcf\\data\\package\\installation\\queue\\PackageInstallationQueueAction",objectIDs:[e]},success:function(e){window.location=e.returnValues.url}})}))}}),WCF.ACP.Package.Uninstallation=WCF.ACP.Package.Installation.extend({_elements:null,_packageID:0,_wcfPackageListURL:"",init:function(e,t){this._elements=e,this._packageID=0,this._wcfPackageListURL=t,void 0!==this._elements&&this._elements.length&&this._super(0,"UninstallPackage")},start:function(e){this._actionName="UninstallPackage",this._packageID=e,this._queueID=0,this._dialogTitle="wcf.acp.package.uninstallation.title",this._initProxy(),this.prepareInstallation()},_init:function(){this._elements.click($.proxy(this._showConfirmationDialog,this))},_showConfirmationDialog:function(e){var t,a=$(e.currentTarget);a.data("isApplication")&&this._wcfPackageListURL?window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,a.data("objectID"))):(t=this,WCF.System.Confirmation.show(a.data("confirmMessage"),(function(e){"confirm"===e&&(t._packageID=a.data("objectID"),t.prepareInstallation())}),void 0,void 0,!0))},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Server={},WCF.ACP.Package.Server.Installation=Class.extend({_proxy:null,_selectedPackage:"",init:function(){this._dialog=null,this._selectedPackage=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},bind:function(){$(".jsButtonPackageInstall").removeClass("jsButtonPackageInstall").click($.proxy(this._click,this))},_click:function(e){var t=$(e.currentTarget);WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy((function(e){"confirm"===e&&(this._selectedPackage=t.data("package"),this._selectedPackageVersion=t.data("packageVersion"),this._prepareInstallation())}),this),void 0,void 0,!0)},_success:function(e){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1).prepareInstallation()):e.returnValues.template&&(null===this._dialog?(this._dialog=$(""+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t,a=$("#packageUpdateServerUsername"),i=$("#packageUpdateServerPassword");a.next("small.innerError").remove(),i.next("small.innerError").remove(),t=!0,""===$.trim(a.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(a),t=!1),""===$.trim(i.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(i),t=!1),t&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_prepareInstallation:function(e){var t={packages:{}};t.packages[this._selectedPackage]=this._selectedPackageVersion,e&&(t.authData={packageUpdateServerID:e,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()}}),WCF.ACP.Package.Update={},WCF.ACP.Package.Update.Manager=Class.extend({_dialog:null,_proxy:null,_submitButton:null,init:function(){this._dialog=null,this._submitButton=$(".formSubmit > button").click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsPackageUpdate").each($.proxy((function(e,t){var a=$(t);a.find("input[type=checkbox]").data("packageUpdate",a).change($.proxy(this._change,this))}),this))},_change:function(e){var t=$(e.currentTarget);t.is(":checked")?(t.data("packageUpdate").find("select").enable(),t.data("packageUpdate").find("dl").removeClass("disabled"),this._submitButton.enable()):(t.data("packageUpdate").find("select").disable(),t.data("packageUpdate").find("dl").addClass("disabled"),$("input[type=checkbox]:checked").length?this._submitButton.enable():this._submitButton.disable())},_click:function(e,t){var a,i={};$(".jsPackageUpdate").each($.proxy((function(e,t){var a=$(t);a.find("input[type=checkbox]:checked").length&&(i[a.data("package")]=a.find("select").val())}),this)),$.getLength(i)&&(this._submitButton.disable(),a={packages:i},t&&(a.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:a}),this._proxy.sendRequest())},_success:function(e,t,a){e.returnValues.queueID?(null!==this._dialog&&this._dialog.wcfDialog("close"),new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0).prepareInstallation()):e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$(""+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.excludedPackages")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.excludedPackages")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._submitButton.enable()):e.returnValues.template&&(null===this._dialog?(this._dialog=$(""+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.unauthorized")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t,a=$("#packageUpdateServerUsername"),i=$("#packageUpdateServerPassword");a.next("small.innerError").remove(),i.next("small.innerError").remove(),t=!0,""===$.trim(a.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(a),t=!1),""===$.trim(i.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(i),t=!1),t&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_button:null,_dialog:null,init:function(e){this._dialog=null,!0==!e&&$(' '+WCF.Language.get("wcf.acp.package.searchForUpdates")+"").prependTo($(".contentHeaderNavigation > ul")),this._button=elBySel(".jsButtonSearchForUpdates"),this._button&&this._button.addEventListener("click",this._click.bind(this))},_click:function(e){e.preventDefault(),this._button.classList.contains("disabled")||(this._button.classList.add("disabled"),null===this._dialog?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"searchForUpdates",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{ignoreCache:1}},success:$.proxy(this._success,this)}):this._dialog.wcfDialog("open"))},_success:function(e,t,a){"function"!=typeof window._trackSearchForUpdates?e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$(""+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}),this._button.classList.remove("disabled")):window._trackSearchForUpdates(e)}}),WCF.ACP.PluginStore={},WCF.ACP.PluginStore.PurchasedItems={},WCF.ACP.PluginStore.PurchasedItems.Search=Class.extend({_dialog:null,_proxy:null,init:function(){this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(' '+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"").prependTo($(".contentHeaderNavigation > ul")).click($.proxy(this._click,this))},_click:function(){this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction"}),this._proxy.sendRequest()},_success:function(e,t,a){if(e.returnValues.template){null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.authorization")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open"));var i=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup((function(e){if(e.which==$.ui.keyCode.ENTER)return i.trigger("click"),!1}))}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.html(e.returnValues.noResults).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.purchasedItems")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.pluginStore.purchasedItems")),this._dialog.html(e.returnValues.noResults),this._dialog.wcfDialog("open")):e.returnValues.noSSL?null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.html(e.returnValues.noSSL).wcfDialog({title:WCF.Language.get("wcf.global.error.title")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.global.error.title")),this._dialog.html(e.returnValues.noSSL),this._dialog.wcfDialog("open")):e.returnValues.redirectURL&&(window.location=e.returnValues.redirectURL)},_submit:function(){this._dialog.wcfDialog("close"),this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction",parameters:{password:$("#pluginStorePassword").val(),username:$("#pluginStoreUsername").val()}}),this._proxy.sendRequest()}}),WCF.ACP.Worker=Class.extend({init:function(e,t,a,i,n){if("function"==typeof n)throw new Error("The callback parameter is no longer supported, please migrate to 'WoltLabSuite/Core/Acp/Ui/Worker'.");require(["WoltLabSuite/Core/Acp/Ui/Worker"],(function(n){new n({dialogId:e,dialogTitle:a,className:t,parameters:i})}))}}),WCF.ACP.Category={},WCF.ACP.Category.Collapsible=WCF.Collapsible.SimpleRemote.extend({init:function(e){var t=$('.formSubmit > button[data-type="submit"]');t&&t.click($.proxy(this._sort,this)),this._super(e)},_getButtonContainer:function(e){return $("#"+e+" > .buttons")},_getContainers:function(){return $(".jsCategory").has("ol").has("li")},_getTarget:function(e){return $("#"+e+" > ol")},_sort:function(){$(".collapsibleButton").remove(),this._containers={},this._containerData={};var e=this._getContainers();0==e.length&&console.debug("[WCF.ACP.Category.Collapsible] Empty container set given, aborting."),e.each($.proxy((function(e,t){var a=$(t),i=a.wcfIdentify();this._containers[i]=a,this._initContainer(i)}),this))}}),WCF.ACP.Search=WCF.Search.Base.extend({_delay:250,_providerName:"",init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",(function(e){e.preventDefault()})),WCF.Dropdown.getDropdownMenu("pageHeaderSearchType").find("a[data-provider-name]").on("click",$.proxy((function(e){var t,a,i,n;e.preventDefault(),t=$(e.target),$(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").text(t.text()),a=this._providerName,this._providerName="everywhere"!=t.data("providerName")?t.data("providerName"):"",a!=this._providerName&&(i=$.trim(this._searchInput.val()))&&(n={data:{excludedSearchValues:this._excludedSearchValues,searchString:i}},this._queryServer(n))}),this))},_createListItem:function(e){var t,a;for(t in this._list.children("li").length>0&&$('').appendTo(this._list),$(''+e.title+"").appendTo(this._list),e.items)a=e.items[t],$(''+WCF.String.escapeHTML(a.title)+""+(a.subtitle?""+WCF.String.escapeHTML(a.subtitle)+"":"")+"").appendTo(this._list),this._itemCount++},_openDropdown:function(){this._list.find("small").each((function(e,t){for(;t.scrollWidth>t.clientWidth;)t.innerText="⦠"+t.innerText.substr(3)}))},_handleEmptyResult:function(){return $(''+WCF.Language.get("wcf.acp.search.noResults")+"").appendTo(this._list),!0},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:not(.dropdownDivider):not(.dropdownText)").eq(this._itemIndex).addClass("dropdownNavigationItem")},_selectElement:function(e){if(-1===this._itemIndex)return!1;window.location=this._list.find("li.dropdownNavigationItem > a").attr("href")},_success:function(e){this._super(e);var t=elById("pageHeaderSearch");this._list[0].style.setProperty("top",t.offsetTop+t.clientHeight+"px","important"),this._list.addClass("acpSearchDropdown")},_getParameters:function(e){return e.data.providerName=this._providerName,e}}),WCF.ACP.User={},WCF.ACP.User.BanHandler={_callback:null,_dialog:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsBanButton").click($.proxy((function(e){var t=$(e.currentTarget);t.data("banned")?this.unban([t.data("objectID")]):this.ban([t.data("objectID")])}),this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.ban"===e.data.actionName&&this.ban(e.data.parameters.objectIDs)},unban:function(e){this._proxy.setOption("data",{actionName:"unban",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},ban:function(e){null===this._dialog?(this._dialog=$("").hide().appendTo(document.body),this._dialog.append($('")),this._dialog.append($('")),this._dialog.find("#userBanNeverExpires").change((function(){$("#userBanExpiresSettings").toggle()})),this._dialog.find("button").click($.proxy(this._submit,this))):($("#userBanReason").val(""),$("#userBanNeverExpires").prop("checked",!0),$("#userBanExpiresSettings").hide(),$("#userBanExpiresDatePicker, #userBanExpires").val("")),this._dialog.data("userIDs",e),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.user.ban.sure")})},_submit:function(){var e;this._dialog.find(".innerError").remove(),e="",$("#userBanNeverExpires").is(":checked")||(e=$("#userBanExpiresDatePicker").val())?(this._proxy.setOption("data",{actionName:"ban",className:"wcf\\data\\user\\UserAction",objectIDs:this._dialog.data("userIDs"),parameters:{banReason:$("#userBanReason").val(),banExpires:e}}),this._proxy.sendRequest()):this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('').text(WCF.Language.get("wcf.global.form.error.empty")))},_success:function(e,t,a){elBySelAll(".jsUserRow",void 0,(function(t){var a=parseInt(elData(t,"object-id"),10);-1!==e.objectIDs.indexOf(a)&&elData(t,"banned","ban"===e.actionName)})),$(".jsBanButton").each((function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("unban"==e.actionName?i.data("banned",!1).attr("data-tooltip",i.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):i.data("banned",!0).attr("data-tooltip",i.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))})),(new WCF.System.Notification).show(),WCF.Clipboard.reload(),"ban"==e.actionName&&this._dialog.wcfDialog("close"),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:e.objectIDs})}},WCF.ACP.User.Group={},WCF.ACP.User.Group.Copy=Class.extend({_groupID:0,init:function(e){this._groupID=e,$(".jsButtonUserGroupCopy").click($.proxy(this._click,this))},_click:function(){var e=$('');e.append($('- "+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"
")),e.append($('- "+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"
")),e.append($('- "+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"
")),WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.group.copy.confirmMessage"),$.proxy((function(e){"confirm"===e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\user\\group\\UserGroupAction",objectIDs:[this._groupID],parameters:{copyACLOptions:$("#copyACLOptions").is(":checked"),copyMembers:$("#copyMembers").is(":checked"),copyUserGroupOptions:$("#copyUserGroupOptions").is(":checked")}},success:function(e){window.location=e.returnValues.redirectURL}})}),this),"",e,!0)}}),WCF.ACP.User.EnableHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsEnableButton").click($.proxy((function(e){var t=$(e.currentTarget);t.data("enabled")?this.disable([t.data("objectID")]):this.enable([t.data("objectID")])}),this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.enable"===e.data.actionName&&this.enable(e.data.parameters.objectIDs)},disable:function(e){this._proxy.setOption("data",{actionName:"disable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},enable:function(e){this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},_success:function(e,t,a){elBySelAll(".jsUserRow",void 0,(function(t){var a=parseInt(elData(t,"object-id"),10);-1!==e.objectIDs.indexOf(a)&&elData(t,"enabled","enable"===e.actionName)})),$(".jsEnableButton").each((function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("disable"==e.actionName?i.data("enabled",!1).attr("data-tooltip",i.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):i.data("enabled",!0).attr("data-tooltip",i.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))})),(new WCF.System.Notification).show((function(){window.location.reload()})),WCF.System.Event.fireEvent("com.woltlab.wcf.acp.user","refresh",{userIds:e.objectIDs})}},WCF.ACP.User.SendNewPasswordHandler={init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.sendNewPassword"===e.data.actionName&&require(["Language","Ui/Confirmation","WoltLabSuite/Core/Acp/Ui/Worker"],(function(t,a,i){a.show({confirm:()=>{new i({dialogId:"sendingNewPasswords",dialogTitle:t.get("wcf.acp.user.sendNewPassword.workerTitle"),className:"wcf\\system\\worker\\SendNewPasswordWorker",parameters:{userIDs:e.data.parameters.objectIDs}})},message:e.data.parameters.confirmMessage})}))}},WCF.ACP.Import={},WCF.ACP.Import.Manager=Class.extend({_currentAction:"",_dialog:null,_index:-1,_objectTypes:[],_proxy:null,_redirectURL:"",init:function(e,t){this._currentAction="",this._index=-1,this._objectTypes=e,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._redirectURL=t,this._invoke()},_invoke:function(){if(this._index++,this._index>=this._objectTypes.length){this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check"),this._dialog.find("h1").text(WCF.Language.get("wcf.acp.dataImport.completed"));var e=$('').appendTo(this._dialog.find("#workerContainer"));$("").click($.proxy((function(){new WCF.Action.Proxy({autoSend:!0,data:{noRedirect:1},dataType:"html",success:$.proxy((function(){window.location=this._redirectURL}),this),url:"index.php?cache-clear/&t="+SECURITY_TOKEN})}),this)).appendTo(e),this._dialog.wcfDialog("render")}else this._run(WCF.Language.get("wcf.acp.dataImport.data."+this._objectTypes[this._index]),this._objectTypes[this._index])},_run:function(e,t){this._currentAction=e,this._proxy.setOption("data",{className:"wcf\\system\\worker\\ImportWorker",parameters:{objectType:t}}),this._proxy.sendRequest()},_success:function(e){null===this._dialog&&(this._dialog=$("").hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.dataImport")})),e.template&&this._dialog.html(e.template),this._currentAction&&this._dialog.find("h1").text(this._currentAction),this._dialog.find("progress").attr("value",e.progress).text(e.progress+"%").next("span").text(e.progress+"%"),e.progress<100?(this._proxy.setOption("data",{className:e.className,loopCount:e.loopCount,parameters:e.parameters}),this._proxy.sendRequest()):this._invoke()}}),WCF.ACP.Stat={},WCF.ACP.Stat.Chart=Class.extend({init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$("#statRefreshButton").click($.proxy(this._refresh,this)),this._refresh()},_refresh:function(){var e=[];$("input[name=objectTypeID]:checked").each((function(){e.push($(this).val())})),e.length&&(this._proxy.setOption("data",{className:"wcf\\data\\stat\\daily\\StatDailyAction",actionName:"getData",parameters:{startDate:$("#startDateDatePicker").val(),endDate:$("#endDateDatePicker").val(),value:$("input[name=value]:checked").val(),dateGrouping:$("input[name=dateGrouping]:checked").val(),objectTypeIDs:e}}),this._proxy.sendRequest())},_success:function(e){var t,a,i,n,s,o,r;switch($("input[name=dateGrouping]:checked").val()){case"yearly":t=[1,"year"],a=WCF.Language.get("wcf.acp.stat.timeFormat.yearly");break;case"monthly":t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:t=[1,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.daily")}for(s in i={series:{lines:{show:!0},points:{show:!0}},grid:{hoverable:!0},xaxis:{mode:"time",minTickSize:t,timeformat:a,monthNames:WCF.Language.get("__monthsShort")},yaxis:{min:0,tickDecimals:0,tickFormatter:function(e){return WCF.String.addThousandsSeparator(e)}}},n=[],e.returnValues){for(o=e.returnValues[s],r=0;r'+WCF.Language.get("wcf.acp.stat.noData")+""),elBySel(".contentHeader > .contentTitle").scrollIntoView({behavior:"smooth"})}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageInputs:[],_pageSelectionContainer:null,init:function(e){this._variablesDescriptions=e,this._pageConditions=$("#pageConditions"),this._pageInputs=$('input[name="pageIDs[]"]'),this._variablesDescriptionsList=$("#ad").next("small").children("ul"),this._pageSelectionContainer=$(this._pageInputs[0]).parents("dl:eq(0)"),this._hidePageSelection(!0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_hidePageSelection:function(e){var t,a;this._pageSelectionContainer.prev("dl").hide(),this._pageSelectionContainer.hide(),this._pageSelectionContainer.next("dl").css("margin-top",0),(t=this._pageSelectionContainer.parent("section")).children("dl:visible").length||(t.hide(),(a=t.next("section"))&&(a.css("margin-top",0),e&&require(["EventHandler"],(function(e){e.add("com.woltlab.wcf.pageConditionDependence","checkVisivility",(function(){t.is(":visible")?a.css("margin-top","40px"):a.css("margin-top",0)}))}))))},_showPageSelection:function(){var e,t;this._pageSelectionContainer.prev("dl").show(),this._pageSelectionContainer.show(),this._pageSelectionContainer.next("dl").css("margin-top","40px"),(e=this._pageSelectionContainer.parent("section")).show(),(t=e.next("section"))&&t.css("margin-top","40px")},_setPageController:function(){var e,t=$("#objectTypeID").find("option:checked"),a=t.parent();a.is("optgroup")&&"com.woltlab.wcf.global"===a.data("categoryName")?this._showPageSelection():(this._hidePageSelection(),require(["Core"],function(e){var a,i,n,s;for(n=0,s=this._pageInputs.length;n').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(e.data.parameters.template),$button=this._dialog.find('button[data-type="submit"]').disable().click($.proxy(this._submit,this)),this._dialog.find("input[type=radio]").change((function(){$button.enable()})))},_submit:function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"setAsSynonyms",className:"wcf\\data\\tag\\TagAction",objectIDs:this._objectIDs,parameters:{tagID:this._dialog.find('input[name="tagID"]:checked').val()}},success:$.proxy((function(){this._dialog.wcfDialog("close"),(new WCF.System.Notification).show((function(){window.location.reload()}))}),this)})}});
\ No newline at end of file
diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js
index 8f322ad873..38960c3113 100644
--- a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js
+++ b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js
@@ -1,125 +1,125 @@
// redactor.combined.min.js -- DO NOT EDIT
// redactor.js
-(function (window, undefined) { !function(m){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;return function(){return e.apply(t)}});var i=0,h=null;function l(t,e){return new l.prototype.init(t,e)}"function"==typeof window.require&&require(["Environment"],function(t){h=t}),m.fn.redactor=function(n){var r=[],s=Array.prototype.slice.call(arguments,1);return"string"==typeof n?this.each(function(){var t,e,i=m.data(this,"redactor");"-1"!==n.search(/\./)?void 0!==i[(t=n.split("."))[0]]&&(t=i[t[0]][t[1]]):t=i[n],void 0!==i&&m.isFunction(t)?void 0!==(e=t.apply(i,s))&&e!==i&&r.push(e):m.error('No such method "'+n+'" for Redactor')}):this.each(function(){m.data(this,"redactor",{}),m.data(this,"redactor",l(this,n))}),0===r.length?this:1===r.length?r[0]:r},m.Redactor=l,m.Redactor.VERSION="2.99",m.Redactor.modules=["air","autosave","block","buffer","build","button","caret","clean","code","core","detect","dropdown","events","file","focus","image","indent","inline","insert","keydown","keyup","lang","line","link","linkify","list","marker","modal","observe","offset","paragraphize","paste","placeholder","progress","selection","shortcuts","storage","toolbar","upload","uploads3","utils","browser"],m.Redactor.settings={},m.Redactor.opts={animation:!1,lang:"en",direction:"ltr",spellcheck:!0,overrideStyles:!0,stylesClass:!1,scrollTarget:document,focus:!1,focusEnd:!1,clickToEdit:!1,structure:!1,tabindex:!1,minHeight:!1,maxHeight:!1,maxWidth:!1,plugins:!1,callbacks:{},placeholder:!1,linkify:!0,enterKey:!0,pastePlainText:!1,pasteImages:!0,pasteLinks:!0,pasteBlockTags:["pre","h1","h2","h3","h4","h5","h6","table","tbody","thead","tfoot","th","tr","td","ul","ol","li","blockquote","p","figure","figcaption"],pasteInlineTags:["br","strong","ins","code","del","span","samp","kbd","sup","sub","mark","var","cite","small","b","u","em","i"],preClass:!1,preSpaces:4,tabAsSpaces:!1,tabKey:!0,autosave:!1,autosaveName:!1,autosaveFields:!1,imageUpload:null,imageUploadParam:"file",imageUploadFields:!1,imageUploadForms:!1,imageTag:"figure",imageEditable:!0,imageCaption:!0,imagePosition:!1,imageResizable:!1,imageFloatMargin:"10px",dragImageUpload:!0,multipleImageUpload:!0,clipboardImageUpload:!0,fileUpload:null,fileUploadParam:"file",fileUploadFields:!1,fileUploadForms:!1,dragFileUpload:!0,s3:!1,linkNewTab:!1,linkTooltip:!0,linkNofollow:!1,linkSize:30,linkValidation:!0,pasteLinkTarget:!1,videoContainerClass:"video-container",toolbar:!0,toolbarFixed:!0,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:!1,toolbarOverflow:!1,air:!1,airWidth:!1,formatting:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],formattingAdd:!1,buttons:["format","bold","italic","deleted","lists","image","file","link","horizontalrule"],buttonsTextLabeled:!1,buttonsHide:[],buttonsHideOnMobile:[],script:!0,removeNewlines:!1,removeComments:!0,replaceTags:{b:"strong",i:"em",strike:"del"},keepStyleAttr:[],keepInlineOnEnter:!1,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:!1,activeButtons:["deleted","italic","bold"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted"},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 ",caption:"Caption",bulletslist:"Bullets",numberslist:"Numbers","image-position":"Position",none:"None",left:"Left",right:"Right",center:"Center","accessibility-help-label":"Rich text editor"}},type:"textarea",inline:!1,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:!0,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:"
",invisibleSpace:"",emptyHtmlRendered:m("").html("â").html(),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.-]*/gi,linkvimeo:/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,linkimage:/((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/gi,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi}},l.fn=m.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:function(t,e){if(this.$element=m(t),this.uuid=i++,this.sBuffer=[],this.sRebuffer=[],this.loadOptions(e),this.loadModules(),this.opts.clickToEdit&&!this.$element.hasClass("redactor-click-to-edit"))return this.loadToEdit(e);this.$element.hasClass("redactor-click-to-edit")&&this.$element.removeClass("redactor-click-to-edit"),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i"),this.reIsInline=new RegExp("^("+this.opts.inlineTags.join("|").toUpperCase()+")$","i"),this.opts.dragImageUpload=null!==this.opts.imageUpload&&this.opts.dragImageUpload,this.opts.dragFileUpload=null!==this.opts.fileUpload&&this.opts.dragFileUpload,this.formatting={},this.lang.load(),m.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.$editor=this.$element,this.detectType(),this.core.callback("start"),this.core.callback("startToEdit"),this.start=!0,this.build.start()},detectType:function(){this.build.isInline()||this.opts.inline?this.opts.type="inline":this.build.isTag("DIV")?this.opts.type="div":this.build.isTag("PRE")&&(this.opts.type="pre")},loadToEdit:function(t){this.$element.on("click.redactor-click-to-edit",m.proxy(function(){this.initToEdit(t)},this)),this.$element.addClass("redactor-click-to-edit")},initToEdit:function(e){m.extend(e.callbacks,{startToEdit:function(){this.insert.node(this.marker.get(),!1)},initToEdit:function(){this.selection.restore(),this.clickToCancelStorage=this.code.get(),m(this.opts.clickToCancel).off(".redactor-click-to-edit"),m(this.opts.clickToCancel).show().on("click.redactor-click-to-edit",m.proxy(function(t){t.preventDefault(),this.core.destroy(),this.events.syncFire=!1,this.$element.html(this.clickToCancelStorage),this.core.callback("cancel",this.clickToCancelStorage),this.events.syncFire=!0,this.clickToCancelStorage="",m(this.opts.clickToCancel).hide(),m(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",m.proxy(function(){this.initToEdit(e)},this)),this.$element.addClass("redactor-click-to-edit")},this)),m(this.opts.clickToSave).off(".redactor-click-to-edit"),m(this.opts.clickToSave).show().on("click.redactor-click-to-edit",m.proxy(function(t){t.preventDefault(),this.core.destroy(),this.core.callback("save",this.code.get()),m(this.opts.clickToCancel).hide(),m(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",m.proxy(function(){this.initToEdit(e)},this)),this.$element.addClass("redactor-click-to-edit")},this))}}),this.$element.redactor(e),this.$element.off(".redactor-click-to-edit")},loadOptions:function(t){var e={};void 0!==m.Redactor.settings.namespace&&!this.$element.hasClass(m.Redactor.settings.namespace)||(e=m.Redactor.settings),this.opts=m.extend({},m.Redactor.opts,this.$element.data(),t),this.opts=m.extend({},this.opts,e)},getModuleMethods:function(e){return Object.getOwnPropertyNames(e).filter(function(t){return"function"==typeof e[t]})},loadModules:function(){for(var t=m.Redactor.modules.length,e=0;e` types are allowed.");this.build.startTextarea(),this.build.setIn(),this.build.setId(),this.build.enableEditor(),this.build.setOptions(),this.build.callEditor()},createContainerBox:function(){this.$box=m('')},setIn:function(){this.core.editor().addClass("redactor-in")},setId:function(){var t="textarea"===this.opts.type?"redactor-uuid-"+this.uuid:this.$element.attr("id");this.core.editor().attr("id",void 0===t?"redactor-uuid-"+this.uuid:t)},getName:function(){var t=this.$element.attr("name");return void 0===t?"content-"+this.uuid:t},buildTextarea:function(){},loadFromTextarea:function(){this.$editor=m(""),this.$textarea=this.$element,this.$element.attr("name",this.build.getName()),this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element),this.build.setStartAttrs(),this.$editor.addClass("redactor-layer"),this.opts.overrideStyles&&this.$editor.addClass("redactor-styles"),this.$element.hide(),this.$box.prepend(''+this.lang.get("accessibility-help-label")+"")},setStartAttrs:function(){this.$editor.attr({"aria-labelledby":"redactor-voice-"+this.uuid,role:"presentation"})},startTextarea:function(){this.build.createContainerBox(),this.build.loadFromTextarea(),this.code.start(this.core.textarea().val()),this.core.textarea().val(this.clean.onSync(this.$editor.html()))},isTag:function(t){return this.$element[0].tagName===t},isInline:function(){return!this.build.isTag("TEXTAREA")&&!this.build.isTag("DIV")&&!this.build.isTag("PRE")},enableEditor:function(){this.core.editor().attr({contenteditable:!0})},setOptions:function(){"inline"===this.opts.type&&(this.opts.enterKey=!1),"inline"!==this.opts.type&&"pre"!==this.opts.type||(this.opts.toolbarMobile=!1,this.opts.toolbar=!1),this.core.editor().attr("spellcheck",this.opts.spellcheck),this.opts.structure&&this.core.editor().addClass("redactor-structure"),this.opts.stylesClass&&this.core.editor().addClass(this.opts.stylesClass),"textarea"===this.opts.type&&(this.core.box().attr("dir",this.opts.direction),this.core.editor().attr("dir",this.opts.direction),this.opts.tabindex&&this.core.editor().attr("tabindex",this.opts.tabindex),this.opts.minHeight?this.core.editor().css("min-height",this.opts.minHeight):this.core.editor().css("min-height","40px"),this.opts.maxHeight&&this.core.editor().css("max-height",this.opts.maxHeight),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(),this.toolbarsButtons=this.button.init(),this.toolbar.build(),this.core.editor().on("mouseup.redactor-observe."+this.uuid+" keyup.redactor-observe."+this.uuid+" focus.redactor-observe."+this.uuid+" touchstart.redactor-observe."+this.uuid,m.proxy(this.observe.toolbar,this)),this.core.element().on("blur.callback.redactor",m.proxy(function(){this.button.setInactiveAll()},this)),this.modal.templates(),this.build.plugins(),this.code.html=this.code.cleaned(this.core.editor().html()),this.core.callback("init"),this.core.callback("initToEdit"),this.start=!1},setHelpers:function(){this.opts.focus?setTimeout(this.focus.start,100):this.opts.focusEnd&&setTimeout(this.focus.end,100)},disableBrowsersEditing:function(){try{document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1),document.execCommand("AutoUrlDetect",!1,!1)}catch(t){}},plugins:function(){this.opts.plugins&&m.each(this.opts.plugins,m.proxy(function(t,e){var i="undefined"!=typeof RedactorPlugins&&void 0!==RedactorPlugins[e]?RedactorPlugins:l.fn;if(m.isFunction(i[e])){this[e]=i[e]();for(var n,r,s=this.getModuleMethods(this[e]),o=s.length,a=0;a "+this.lang.get("indent"),func:"indent.increase",observe:{element:"li",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},ul:{title:"• "+this.lang.get("bulletslist"),icon:!0,func:"list.toggle"},ol:{title:"1. "+this.lang.get("numberslist"),icon:!0,func:"list.toggle"},outdent:{title:this.lang.get("outdent"),icon:!0,func:"indent.decrease"},indent:{title:this.lang.get("indent"),icon:!0,func:"indent.increase"},image:{title:this.lang.get("image"),icon:!0,func:"image.show"},file:{title:this.lang.get("file"),icon:!0,func:"file.show"},link:{title:this.lang.get("link"),icon:!0,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":!0}}}}}},horizontalrule:{title:this.lang.get("horizontalrule"),icon:!0,func:"line.insert"}}},setFormatting:function(){for(var t in this.toolbarsButtons.format.dropdown)this.toolbarsButtons.format.dropdown.hasOwnProperty(t)&&-1===this.opts.formatting.indexOf(t)&&delete this.toolbarsButtons.format.dropdown[t]},hideButtons:function(){0!==this.opts.buttonsHide.length&&this.button.hideButtonsSlicer(this.opts.buttonsHide)},hideButtonsOnMobile:function(){this.detect.isMobile()&&0!==this.opts.buttonsHideOnMobile.length&&this.button.hideButtonsSlicer(this.opts.buttonsHideOnMobile)},hideButtonsSlicer:function(t){m.each(t,m.proxy(function(t,e){var i=this.opts.buttons.indexOf(e);-1!==i&&this.opts.buttons.splice(i,1)},this))},load:function(i){this.button.buttons=[],this.opts.buttons.forEach(function(t){var e;("image"!==t||this.image.is())&&this.toolbarsButtons.hasOwnProperty(t)&&((e=elCreate("li")).appendChild(this.button.build(t,this.toolbarsButtons[t])[0]),i[0].appendChild(e))}.bind(this))},buildButtonTooltip:function(){},build:function(t,e){var i,n=m('');return n.addClass("re-button re-"+t),n.attr({role:"button",tabindex:"-1"}),n.html(e.title),(e.func||e.command||e.dropdown)&&this.button.setEvent(n,t,e),e.dropdown&&(n.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0),i=m(''),n.data("dropdown",i),this.dropdown.build(t,i,e.dropdown),this.button.setupDropdown(n[0],i[0])),this.button.buttons.push(n),n},setupDropdown:function(e,i){require(["Ui/SimpleDropdown"],function(t){t.initFragment(e,i),t.registerCallback(e.id,function(t,e){"close"===e&&this.dropdown.hideOut()}.bind(this)),elData(e,"a11y-mouse-event","mousedown"),elData(e,"aria-expanded",!1),e.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation()})}.bind(this))},getButtons:function(){return this.button.toolbar().find("a.re-button")},getButtonsKeys:function(){return this.button.buttons},setEvent:function(n,r,s){n.on("mousedown",m.proxy(function(t){if(t.preventDefault(),n.hasClass("redactor-button-disabled"))return!1;var e="func",i=s.func;return s.command?(e="command",i=s.command):s.dropdown&&(i=!(e="dropdown")),this.button.toggle(t,r,e,i),!1},this))},toggle:function(t,e,i,n,r){!this.detect.isIe()&&this.detect.isDesktop()||(this.utils.freezeScroll(),t.returnValue=!1),"command"===i?this.inline.format(n):"dropdown"===i?this.dropdown.show(t,e):this.button.clickCallback(t,n,e,r),"dropdown"!==i&&this.dropdown.hideAll(!1),!this.detect.isIe()&&this.detect.isDesktop()||this.utils.unfreezeScroll()},clickCallback:function(t,e,i,n){var r;if(t instanceof Event?t.preventDefault():t&&t.originalEvent&&t.originalEvent.preventDefault(),n=void 0===n?i:n,m.isFunction(e))e.call(this,i);else if("-1"!==e.search(/\./)){if(void 0===this[(r=e.split("."))[0]])return;"object"==typeof n?this[r[0]][r[1]].apply(this,n):this[r[0]][r[1]].call(this,n)}else"object"==typeof n?this[e].apply(this,n):this[e].call(this,n);this.observe.buttons(t,i)},all:function(){return this.button.buttons},get:function(t){if(!1!==this.opts.toolbar)return this.button.toolbar().find("a.re-"+t)},set:function(t,e){if(!1!==this.opts.toolbar){var i=this.button.toolbar().find("a.re-"+t);return i.html(e).attr("aria-label",e),i}},add:function(t,e){if(!0!==this.button.isAdded(t))return m();var i=this.button.build(t,{title:e});return this.button.toolbar().append(m("").append(i)),i},addFirst:function(t,e){if(!0!==this.button.isAdded(t))return m();var i=this.button.build(t,{title:e});return this.button.toolbar().prepend(m("").append(i)),i},addAfter:function(t,e,i){if(!0!==this.button.isAdded(e))return m();var n=this.button.build(e,{title:i}),r=this.button.get(t);return 0!==r.length?r.parent().after(m("").append(n)):this.button.toolbar().append(m("").append(n)),n},addBefore:function(t,e,i){if(!0!==this.button.isAdded(e))return m();var n=this.button.build(e,{title:i}),r=this.button.get(t);return 0!==r.length?r.parent().before(m("").append(n)):this.button.toolbar().append(m("").append(n)),n},isAdded:function(t){var e=this.opts.buttonsHideOnMobile.indexOf(t);return!(!1===this.opts.toolbar||-1!==e&&this.detect.isMobile())},setIcon:function(t,e){this.opts.buttonsTextLabeled||t.html(e).addClass("re-button-icon")},changeIcon:function(t,e){var i=this.button.get(t);0!==i.length&&i.find("i").removeAttr("class").addClass("re-icon-"+e)},addCallback:function(e,i){var n,r;void 0!==e&&!1!==this.opts.toolbar&&(n="dropdown"===i?"dropdown":"func",r=e.attr("rel"),e.on("mousedown",m.proxy(function(t){return!e.hasClass("redactor-button-disabled")&&void this.button.toggle(t,r,n,i)},this)))},addDropdown:function(t,e){if(!1!==this.opts.toolbar){t.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0);var i=t.attr("rel");this.button.addCallback(t,"dropdown");var n=m('');return t.data("dropdown",n),e&&(this.dropdown.build(i,n,e),this.button.setupDropdown(t[0],n[0])),n}},setActive:function(t){this.button.get(t).addClass("redactor-act").attr({"aria-pressed":!0,tabindex:0})},setInactive:function(t){this.button.get(t).removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},setInactiveAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(e=e.not(".re-"+t)),e.removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},disable:function(t){this.button.get(t).addClass("redactor-button-disabled").attr("aria-disabled",!0)},enable:function(t){this.button.get(t).removeClass("redactor-button-disabled").attr("aria-disabled",!1)},disableAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(Array.isArray(t)||(t=[t]),t=t.map(function(t){return".re-"+t}),e=e.not(t.join(","))),e.addClass("redactor-button-disabled").attr("aria-disabled",!0)},enableAll:function(){this.button.toolbar().find("a.re-button").removeClass("redactor-button-disabled").attr("aria-disabled",!1)},remove:function(t){this.button.get(t).remove()}}},caret:function(){return{set:function(t,e,i){var n=this.core.editor().scrollTop();this.core.editor().focus(),this.core.editor().scrollTop(n),i=void 0===i?0:1,t=t[0]||t,e=e[0]||e;var r=this.selection.get(),s=this.selection.range(r);try{s.setStart(t,0),s.setEnd(e,i)}catch(t){}this.selection.update(r,s)},prepare:function(t){return this.detect.isFirefox()&&void 0!==this.start&&this.core.editor().focus(),t[0]||t},start:function(t){var e,i;if(t=this.caret.prepare(t)){if("BR"===t.tagName)return this.caret.before(t);var n=m(t).children().first(),r=this.utils.isInlineTag(t.tagName);""===t.innerHTML||r?this.caret.setStartEmptyOrInline(t,r):n&&0!==n.length&&this.utils.isInlineTag(n[0].tagName)&&""===n.text()?this.caret.setStartEmptyOrInline(n[0],!0):((e=window.getSelection()).removeAllRanges(),(i=document.createRange()).selectNodeContents(t),i.collapse(!0),e.addRange(i))}},setStartEmptyOrInline:function(t,e){var i=window.getSelection(),n=document.createRange(),r=document.createTextNode("â");n.setStart(t,0),n.insertNode(r),n.setStartAfter(r),n.collapse(!0),i.removeAllRanges(),i.addRange(n),e||this.core.editor().on("keydown.redactor-remove-textnode",function(){m(r).remove(),m(this).off("keydown.redactor-remove-textnode")})},end:function(t){var e,i;if(t=this.caret.prepare(t)){if("BR"!==t.tagName&&""===t.innerHTML)return this.caret.start(t);if("BR"===t.tagName){var n=document.createElement("span");return n.className="redactor-invisible-space",n.innerHTML="",m(t).after(n),(e=window.getSelection()).removeAllRanges(),(i=document.createRange()).setStartBefore(n),i.setEndBefore(n),e.addRange(i),void m(n).replaceWith(function(){return m(this).contents()})}if(t.lastChild&&1===t.lastChild.nodeType)return this.caret.after(t.lastChild);if((e=window.getSelection()).getRangeAt||e.rangeCount)try{(i=e.getRangeAt(0)).selectNodeContents(t),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}catch(t){}}},after:function(t){var e,i,n,r;if(t=this.caret.prepare(t)){if("BR"===t.tagName)return this.caret.end(t);this.utils.isBlockTag(t.tagName)?void 0===(i=this.caret.next(t))?this.caret.end(t):("TABLE"===i.tagName?i=m(i).find("th, td").first()[0]:"UL"!==i.tagName&&"OL"!==i.tagName||(i=m(i).find("li").first()[0]),this.caret.start(i)):(n=document.createTextNode("â"),(r=window.getSelection()).removeAllRanges(),(e=document.createRange()).setStartAfter(t),e.insertNode(n),e.setStartAfter(n),e.collapse(!0),r.addRange(e))}},before:function(t){var e,i,n;(t=this.caret.prepare(t))&&(this.utils.isBlockTag(t.tagName)?void 0===(n=this.caret.prev(t))?this.caret.start(t):("TABLE"===n.tagName?n=m(n).find("th, td").last()[0]:"UL"!==n.tagName&&"OL"!==n.tagName||(n=m(n).find("li").last()[0]),this.caret.end(n)):((e=window.getSelection()).removeAllRanges(),(i=document.createRange()).setStartBefore(t),i.collapse(!0),e.addRange(i)))},next:function(t){var e=m(t).next();return e.hasClass("redactor-script-tag, redactor-selection-marker")?e.next()[0]:e[0]},prev:function(t){var e=m(t).prev();return e.hasClass("redactor-script-tag, redactor-selection-marker")?e.prev()[0]:e[0]},offset:function(t){return this.offset.get(t)}}},clean:function(){return{onSet:function(t){t=this.clean.savePreCode(t),this.opts.script&&(t=t.replace(/