Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Thu, 26 May 2016 10:21:15 +0000 (12:21 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Thu, 26 May 2016 10:21:15 +0000 (12:21 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js
wcfsetup/install/files/acp/js/WCF.ACP.min.js
wcfsetup/install/files/acp/js/wcombined.min.js
wcfsetup/install/files/js/WCF.Combined.min.js
wcfsetup/install/files/js/WCF.Core.min.js

index 32cd7ecd059c77dc87426b25d024ee2b81d2277b..c2d3a3a7c680d9daf2631f475b11c4836824e0d1 100644 (file)
@@ -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))})},_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){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(){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUpload=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogo"),this._image=$("#styleLogo"),this._imagePath=$("#imagePath"),this._pageLogo=$("#pageLogo"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogo"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=$("#logo > a > img").prop("src");this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').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(){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=$(t.currentTarget).data("confirmMessage");if(s){var n=this;WCF.System.Confirmation.show(s,function(t){"confirm"===t&&n._click("delete",e)})}else this._click("delete",e)},_success:function(){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){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(){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUpload=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogo"),this._image=$("#styleLogo"),this._imagePath=$("#imagePath"),this._pageLogo=$("#pageLogo"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogo"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=$("#logo > a > img").prop("src");this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').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),i=s.data("styleID"),n=this;s.find(".jsSetAsDefault").click(function(){n._click("setAsDefault",i)}),s.find(".jsDelete").click(function(t){n._delete(t,i)})},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=$(t.currentTarget).data("confirmMessage");if(s){var i=this;WCF.System.Confirmation.show(s,function(t){"confirm"===t&&i._click("delete",e)},void 0,void 0,!0)}else this._click("delete",e)},_success:function(){window.location.reload()}});
\ No newline at end of file
index 703707dea25fa4c7853ac3ab8d84f71cdea01cc9..7f6b733d07d3fe5a59cedcb01329940b93449b66 100644 (file)
@@ -1,2 +1,3 @@
-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){$(".jsCronjobRow").each($.proxy(function(t,a){var i=$(a).find(".jsExecuteButton"),n=i.data("objectID");return WCF.inArray(n,e.objectIDs)?(e.returnValues[n]&&($(a).find("td.columnNextExec").html(e.returnValues[n].formatted),$(a).wcfHighlight()),this._notification.show(),!1):void 0},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=$('<div style="overflow: auto"><pre>'+t.next().html()+"</pre></div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("<pre>"+t.next().html()+"</pre>"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Menu=Class.extend({init:function(e){this._headerNavigation=$("nav#mainMenu"),this._sidebarNavigation=$("aside.collapsibleMenu > div"),this._prepareElements(e)},_prepareElements:function(e){this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("legend").each($.proxy(function(e,t){$(t).click($.proxy(this._toggleItem,this))},this)),this._sidebarNavigation.find("nav ul").each(function(){$(this).hide()}),this._headerNavigation.find("li").click($.proxy(this._toggleSidebar,this)),0===e.length?this._renderSidebar(this._headerNavigation.find("li:first").data("menuItem"),[]):this._renderSidebar("",e)},_toggleItem:function(e){var t=$(e.currentTarget);t.parent().find("nav ul").stop(!0,!0).toggle("blind",{},200).end(),t.toggleClass("active")},_toggleSidebar:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._renderSidebar(t.data("menuItem"),[])},_renderSidebar:function(e,t){if(this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("> div").hide(),0===t.length)this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();else{e=t.shift(),this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();for(var a=0,i=t.length;i>a;a++){var n=t[a];if($.wcfIsset(n)){var s=$("#"+$.wcfEscapeID(n));"ul"===s.getTagName()?s.show().parents("fieldset").children("legend").addClass("active"):s.addClass("active")}}}}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i){switch(this._actionName=t?t:"InstallPackage",this._allowRollback=a===!0?!0:!1,this._queueID=e,this._actionName){case"InstallPackage":this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title";break;case"UninstallPackage":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;i>a;a++){var n=t[a];n.length&&(e.length&&(e+="-"),e+=n.toLowerCase())}this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?"+e+"/&t="+SECURITY_TOKEN})},_init:function(){$("#submitButton").click($.proxy(this.prepareInstallation,this))},_failure:function(){null!==this._dialog&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("times")),this._allowRollback&&null!==this._dialog&&this._purgeTemplateContent($.proxy(function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.acp.package.installation.rollback")+"</button>").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(){this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return{queueID:this._queueID,step:"prepare"}},_success:function(e){if(this._shouldRender=!1,null===this._dialog&&(this._dialog=$('<div id="packageInstallationDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==e.step)return this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter(function(t){t.stop();var a=new WCF.ACP.Package.Uninstallation;a.start(e.packageID)},200);if(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)return this._setIcon("check"),void this._purgeTemplateContent($.proxy(function(){var t=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),a=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").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));if(e.innerTemplate){var t=this;if($("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup(function(a){a.keyCode===$.ui.keyCode.ENTER&&t._submit(e)}),e.step&&e.node){$("#packageInstallationProgress").removeAttr("value"),this._setIcon("question");var a=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(a).click($.proxy(function(t){$(t.currentTarget).disable(),this._submit(e)},this))}return $("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")}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=$(a),n=i.attr("type");if("checkbox"!=n&&"radio"!=n||i.prop("checked")){var s=i.attr("name");s.match(/(.*)\[([^[]*)\]$/)?(s=RegExp.$1,$key=RegExp.$2,void 0===t[s]&&(t[s]=$key?{}:[]),$key?t[s][$key]=i.val():t[s].push(i.val())):t[s]=i.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({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=$(e.currentTarget);if(t.data("isApplication")&&this._wcfPackageListURL)return void(window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,t.data("objectID"))));var a=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"confirm"===e&&(a._packageID=t.data("objectID"),a.prepareInstallation())})},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Search=Class.extend({_button:null,_cache:{},_container:null,_dialog:null,_package:null,_packageDescription:null,_packageName:null,_packageSearchResultContainer:null,_packageSearchResultList:null,_pageCount:0,_pageNo:1,_proxy:null,_searchID:0,_selectedPackage:"",_selectedPackageVersion:"",init:function(){this._button=null,this._cache={},this._container=$("#packageSearch"),this._dialog=null,this._package=null,this._packageName=null,this._packageSearchResultContainer=$("#packageSearchResultContainer"),this._packageSearchResultList=$("#packageSearchResultList"),this._pageCount=0,this._pageNo=1,this._searchDescription=null,this._searchID=0,this._selectedPackage="",this._selectedPackageVersion="",this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements()},_initElements:function(){this._button=this._container.find(".formSubmit > button.jsButtonPackageSearch").disable().click($.proxy(this._search,this)),this._package=$("#package").keyup($.proxy(this._keyUp,this)),this._packageDescription=$("#packageDescription").keyup($.proxy(this._keyUp,this)),this._packageName=$("#packageName").keyup($.proxy(this._keyUp,this))},_keyUp:function(e){""===this._package.val()&&""===this._packageDescription.val()&&""===this._packageName.val()?this._button.disable():(this._button.enable(),13===e.which&&this._button.trigger("click"))},_search:function(){var e=this._getSearchValues();return this._validate(e)?(e.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"search",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:e}),void this._proxy.sendRequest()):!1},_getSearchValues:function(){return{package:$.trim(this._package.val()),packageDescription:$.trim(this._packageDescription.val()),packageName:$.trim(this._packageName.val())}},_validate:function(e){return""===e.package&&""===e.packageDescription&&""===e.packageName?!1:!0},_success:function(e){switch(e.actionName){case"getResultList":this._insertTemplate(e.returnValues.template);break;case"prepareInstallation":if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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)));break;case"search":this._pageCount=e.returnValues.pageCount,this._searchID=e.returnValues.searchID,this._insertTemplate(e.returnValues.template,void 0===e.returnValues.count?void 0:e.returnValues.count),this._setupPagination()}},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_insertTemplate:function(e,t){this._packageSearchResultContainer.show(),this._packageSearchResultList.html(e),void 0===t&&(this._content[this._pageNo]=e),void 0!==t&&(this._content={1:e},this._packageSearchResultContainer.find("> header > h2 > .badge").html(t)),this._packageSearchResultList.find(".jsInstallPackage").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))},_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?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()},_setupPagination:function(){this._content={1:this._packageSearchResultList.html()},this._packageSearchResultContainer.find(".pagination").wcfPages("destroy").remove(),this._pageCount>1&&$('<div class="contentNavigation" />').insertAfter(this._packageSearchResultList).wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){return t&&t.activePage&&(this._pageNo=t.activePage),this._pageNo<1||this._pageNo>this._pageCount?void console.debug("[WCF.ACP.Package.Search] Cannot access page "+this._pageNo+" of "+this._pageCount):void(void 0===this._content[this._pageNo]?(this._proxy.setOption("data",{actionName:"getResultList",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{pageNo:this._pageNo,searchID:this._searchID}}),this._proxy.sendRequest()):(this._packageSearchResultList.html(this._content[this._pageNo]),WCF.DOMNodeInsertedHandler.execute()))}}),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))},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").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?!0:!1,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={};if($(".jsPackageUpdate").each($.proxy(function(e,t){var i=$(t);i.find("input[type=checkbox]:checked").length&&(a[i.data("package")]=i.find("select").val())},this)),$.getLength(a)){this._submitButton.disable();var i={packages:a};t&&(i.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:$("#packageUpdateServerSaveCredentials:checked").length?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:i}),this._proxy.sendRequest()}},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0);t.prepareInstallation()}else e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_dialog:null,init:function(e){if(this._dialog=null,e===!0)$(".jsButtonPackageUpdate").click($.proxy(this._click,this));else{var t=$('<li><a class="button"><span class="icon icon16 fa-refresh"></span> <span>'+WCF.Language.get("wcf.acp.package.searchForUpdates")+"</span></a></li>");t.click($.proxy(this._click,this)).prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > ul"))}},_click:function(){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){e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("<div>"+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}))}}),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)});var e=$('<li><a class="button"><span class="icon icon16 fa-shopping-cart" /> <span>'+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"</span></a></li>");e.prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > 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){if(e.returnValues.template){null===this._dialog?(this._dialog=$("<div />").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 t=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup(function(e){return e.which==$.ui.keyCode.ENTER?(t.trigger("click"),!1):void 0})}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("<div />").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=$("<div />").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({_aborted:!1,_callback:null,_dialogID:null,_dialog:null,_proxy:null,_title:"",init:function(e,t,a,i,n){this._aborted=!1,this._callback=n||null,this._dialogID=e+"Worker",this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{className:t,parameters:i||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._title=a},_success:function(e){if(null===this._dialog&&(this._dialog=$('<div id="'+this._dialogID+'" />').hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.acp.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.template&&this._dialog.html(e.template),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();else if(null!==this._callback)this._callback(this,e);else{var t=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(t).focus().click(function(){window.location=e.proceedURL}),this._dialog.wcfDialog("render")}}}),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({init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",function(e){e.preventDefault()})},_createListItem:function(e){this._list.children("li").length>0&&$('<li class="dropdownDivider" />').appendTo(this._list),$('<li class="dropdownText">'+e.title+"</li>").appendTo(this._list);for(var t in e.items){var a=e.items[t];$('<li><a href="'+a.link+'"><span>'+WCF.String.escapeHTML(a.title)+"</span>"+(a.subtitle?"<small>"+WCF.String.escapeHTML(a.subtitle)+"</small>":"")+"</a></li>").appendTo(this._list),this._itemCount++}},_handleEmptyResult:function(){return $('<li class="dropdownText">'+WCF.Language.get("wcf.acp.search.noResults")+"</li>").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(){return-1===this._itemIndex?!1:void(window.location=this._list.find("li.dropdownNavigationItem > a").attr("href"))},_success:function(e){this._super(e),this._list.addClass("acpSearchDropdown")}}),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.ban"==a&&this.ban(i.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=$("<div />").hide().appendTo(document.body),this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">'+WCF.Language.get("wcf.acp.user.banReason")+'</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>'+WCF.Language.get("wcf.acp.user.banReason.description")+'</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked="checked" /> '+WCF.Language.get("wcf.acp.user.ban.neverExpires")+'</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">'+WCF.Language.get("wcf.acp.user.ban.expires")+'</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.acp.user.ban.expires.description")+"</small></dd></dl></div>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),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")){var e=$("#userBanExpiresDatePicker").val();if(!e)return void this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('<small class="innerError" />').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(e){$(".jsBanButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("unban"==e.actionName?i.data("banned",!1).data("tooltip",i.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):i.data("banned",!0).data("tooltip",i.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))});var t=new WCF.System.Notification;t.show(),WCF.Clipboard.reload(),"ban"==e.actionName&&this._dialog.wcfDialog("close")}},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=$('<div class="section" />');e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyMembers" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyMembers")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyUserGroupOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyACLOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyACLOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"</small></dd></dl>")),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)}}),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.enable"==a&&this.enable(i.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){$(".jsEnableButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("disable"==e.actionName?i.data("enabled",!1).data("tooltip",i.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):i.data("enabled",!0).data("tooltip",i.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))});var t=new WCF.System.Notification;t.show(function(){window.location.reload()})}},WCF.ACP.User.SendNewPasswordHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.sendNewPassword"==a&&WCF.System.Confirmation.show(i.confirmMessage,function(e){"confirm"===e&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:i.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(){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=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer"));$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").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=$("<div />").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":var t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":var t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:var 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<o.data.length;r++)o.data[r][0]*=1e3;n.push(o)}$.plot("#chart",n,i),$("#chart").on("plothover",function(e,t,a){a?$("#chartTooltip").html(a.series.xaxis.tickFormatter(a.datapoint[0],a.series.xaxis)+", "+WCF.String.formatNumeric(a.datapoint[1])+" "+a.series.label).css({top:a.pageY+5,left:a.pageX+5}).wcfFadeIn():$("#chartTooltip").hide()}),n.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>")}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageControllers:null,init:function(){this._pageConditions=$("#pageConditions"),this._pageControllers=$("#pageControllers");var e=this._pageControllers.parents("dl:eq(0)");e.hide();var t=e.parent("fieldset");t.children("dl:visible").length||t.hide();var a=t.next("fieldset");a&&(a.data("margin-top",a.css("margin-top")),a.css("margin-top",0)),e.next("dl").css("margin-top",0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_setPageController:function(){var e=$("#objectTypeID").find("option:checked");e.data("page")?this._pageControllers.val([this._pageControllers.find('option[data-object-type="'+e.data("page")+'"]').val()]).change():this._pageControllers.val([]).change()},_submit:function(){this._pageConditions.is(":hidden")?this._pageConditions.find("select, input").remove():this._pageControllers.val([])}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.tag",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.tag"===t&&"com.woltlab.wcf.tag.setAsSynonyms"===a&&(this._objectIDs=i.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(i.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){$(".jsCronjobRow").each($.proxy(function(t,a){var i=$(a).find(".jsExecuteButton"),n=i.data("objectID");return WCF.inArray(n,e.objectIDs)?(e.returnValues[n]&&($(a).find("td.columnNextExec").html(e.returnValues[n].formatted),$(a).wcfHighlight()),this._notification.show(),!1):void 0},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=$('<div style="overflow: auto"><pre>'+t.next().html()+"</pre></div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("<pre>"+t.next().html()+"</pre>"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Menu=Class.extend({init:function(e){this._headerNavigation=$("nav#mainMenu"),this._sidebarNavigation=$("aside.collapsibleMenu > div"),this._prepareElements(e)},_prepareElements:function(e){this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("legend").each($.proxy(function(e,t){$(t).click($.proxy(this._toggleItem,this))},this)),this._sidebarNavigation.find("nav ul").each(function(){$(this).hide()}),this._headerNavigation.find("li").click($.proxy(this._toggleSidebar,this)),0===e.length?this._renderSidebar(this._headerNavigation.find("li:first").data("menuItem"),[]):this._renderSidebar("",e)},_toggleItem:function(e){var t=$(e.currentTarget);t.parent().find("nav ul").stop(!0,!0).toggle("blind",{},200).end(),t.toggleClass("active")},_toggleSidebar:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._renderSidebar(t.data("menuItem"),[])},_renderSidebar:function(e,t){if(this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("> div").hide(),0===t.length)this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();else{e=t.shift(),this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();for(var a=0,i=t.length;i>a;a++){var n=t[a];if($.wcfIsset(n)){var s=$("#"+$.wcfEscapeID(n));"ul"===s.getTagName()?s.show().parents("fieldset").children("legend").addClass("active"):s.addClass("active")}}}}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i){switch(this._actionName=t?t:"InstallPackage",this._allowRollback=a===!0?!0:!1,this._queueID=e,this._actionName){case"InstallPackage":this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title";break;case"UninstallPackage":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;i>a;a++){var n=t[a];n.length&&(e.length&&(e+="-"),e+=n.toLowerCase())}this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?"+e+"/&t="+SECURITY_TOKEN})},_init:function(){$("#submitButton").click($.proxy(this.prepareInstallation,this))},_failure:function(){null!==this._dialog&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("times")),this._allowRollback&&null!==this._dialog&&this._purgeTemplateContent($.proxy(function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.acp.package.installation.rollback")+"</button>").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(){this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return{queueID:this._queueID,step:"prepare"}},_success:function(e){if(this._shouldRender=!1,null===this._dialog&&(this._dialog=$('<div id="packageInstallationDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==e.step)return this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter(function(t){t.stop();var a=new WCF.ACP.Package.Uninstallation;a.start(e.packageID)},200);if(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)return this._setIcon("check"),void this._purgeTemplateContent($.proxy(function(){var t=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),a=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").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));if(e.innerTemplate){var t=this;if($("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup(function(a){a.keyCode===$.ui.keyCode.ENTER&&t._submit(e)}),e.step&&e.node){$("#packageInstallationProgress").removeAttr("value"),this._setIcon("question");var a=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(a).click($.proxy(function(t){$(t.currentTarget).disable(),this._submit(e)},this))}return $("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")}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=$(a),n=i.attr("type");if("checkbox"!=n&&"radio"!=n||i.prop("checked")){var s=i.attr("name");s.match(/(.*)\[([^[]*)\]$/)?(s=RegExp.$1,$key=RegExp.$2,void 0===t[s]&&(t[s]=$key?{}:[]),$key?t[s][$key]=i.val():t[s].push(i.val())):t[s]=i.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({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=$(e.currentTarget);if(t.data("isApplication")&&this._wcfPackageListURL)return void(window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,t.data("objectID"))));var a=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"confirm"===e&&(a._packageID=t.data("objectID"),a.prepareInstallation())},void 0,void 0,!0)},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Search=Class.extend({_button:null,_cache:{},_container:null,_dialog:null,_package:null,_packageDescription:null,_packageName:null,_packageSearchResultContainer:null,_packageSearchResultList:null,_pageCount:0,_pageNo:1,_proxy:null,_searchID:0,_selectedPackage:"",_selectedPackageVersion:"",init:function(){this._button=null,this._cache={},this._container=$("#packageSearch"),this._dialog=null,this._package=null,this._packageName=null,this._packageSearchResultContainer=$("#packageSearchResultContainer"),this._packageSearchResultList=$("#packageSearchResultList"),this._pageCount=0,this._pageNo=1,this._searchDescription=null,this._searchID=0,this._selectedPackage="",this._selectedPackageVersion="",this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements()},_initElements:function(){this._button=this._container.find(".formSubmit > button.jsButtonPackageSearch").disable().click($.proxy(this._search,this)),this._package=$("#package").keyup($.proxy(this._keyUp,this)),this._packageDescription=$("#packageDescription").keyup($.proxy(this._keyUp,this)),this._packageName=$("#packageName").keyup($.proxy(this._keyUp,this))},_keyUp:function(e){""===this._package.val()&&""===this._packageDescription.val()&&""===this._packageName.val()?this._button.disable():(this._button.enable(),13===e.which&&this._button.trigger("click"))},_search:function(){var e=this._getSearchValues();return this._validate(e)?(e.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"search",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:e}),void this._proxy.sendRequest()):!1},_getSearchValues:function(){return{package:$.trim(this._package.val()),packageDescription:$.trim(this._packageDescription.val()),packageName:$.trim(this._packageName.val())}},_validate:function(e){return""===e.package&&""===e.packageDescription&&""===e.packageName?!1:!0},_success:function(e){switch(e.actionName){case"getResultList":this._insertTemplate(e.returnValues.template);break;case"prepareInstallation":if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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)));break;case"search":this._pageCount=e.returnValues.pageCount,this._searchID=e.returnValues.searchID,this._insertTemplate(e.returnValues.template,void 0===e.returnValues.count?void 0:e.returnValues.count),this._setupPagination()}},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_insertTemplate:function(e,t){this._packageSearchResultContainer.show(),this._packageSearchResultList.html(e),void 0===t&&(this._content[this._pageNo]=e),void 0!==t&&(this._content={1:e},this._packageSearchResultContainer.find("> header > h2 > .badge").html(t)),this._packageSearchResultList.find(".jsInstallPackage").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)},_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?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()},_setupPagination:function(){this._content={1:this._packageSearchResultList.html()},this._packageSearchResultContainer.find(".pagination").wcfPages("destroy").remove(),this._pageCount>1&&$('<div class="contentNavigation" />').insertAfter(this._packageSearchResultList).wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){return t&&t.activePage&&(this._pageNo=t.activePage),this._pageNo<1||this._pageNo>this._pageCount?void console.debug("[WCF.ACP.Package.Search] Cannot access page "+this._pageNo+" of "+this._pageCount):void(void 0===this._content[this._pageNo]?(this._proxy.setOption("data",{actionName:"getResultList",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{pageNo:this._pageNo,searchID:this._searchID}}),this._proxy.sendRequest()):(this._packageSearchResultList.html(this._content[this._pageNo]),WCF.DOMNodeInsertedHandler.execute()))}}),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){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").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?!0:!1,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={};if($(".jsPackageUpdate").each($.proxy(function(e,t){var i=$(t);i.find("input[type=checkbox]:checked").length&&(a[i.data("package")]=i.find("select").val())},this)),$.getLength(a)){this._submitButton.disable();var i={packages:a};t&&(i.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:$("#packageUpdateServerSaveCredentials:checked").length?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:i}),this._proxy.sendRequest()}},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0);t.prepareInstallation()}else e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_dialog:null,init:function(e){if(this._dialog=null,e===!0)$(".jsButtonPackageUpdate").click($.proxy(this._click,this));else{var t=$('<li><a class="button"><span class="icon icon16 fa-refresh"></span> <span>'+WCF.Language.get("wcf.acp.package.searchForUpdates")+"</span></a></li>");t.click($.proxy(this._click,this)).prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > ul"))}},_click:function(){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){e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("<div>"+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}))}}),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)});var e=$('<li><a class="button"><span class="icon icon16 fa-shopping-cart" /> <span>'+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"</span></a></li>");e.prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > 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){if(e.returnValues.template){null===this._dialog?(this._dialog=$("<div />").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 t=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup(function(e){return e.which==$.ui.keyCode.ENTER?(t.trigger("click"),!1):void 0})}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("<div />").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=$("<div />").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({_aborted:!1,_callback:null,_dialogID:null,_dialog:null,_proxy:null,_title:"",init:function(e,t,a,i,n){this._aborted=!1,this._callback=n||null,this._dialogID=e+"Worker",this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{className:t,parameters:i||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._title=a},_success:function(e){if(null===this._dialog&&(this._dialog=$('<div id="'+this._dialogID+'" />').hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.acp.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.template&&this._dialog.html(e.template),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();else if(null!==this._callback)this._callback(this,e);else{var t=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(t).focus().click(function(){window.location=e.proceedURL}),this._dialog.wcfDialog("render")}}}),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({init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",function(e){e.preventDefault()})},_createListItem:function(e){this._list.children("li").length>0&&$('<li class="dropdownDivider" />').appendTo(this._list),$('<li class="dropdownText">'+e.title+"</li>").appendTo(this._list);for(var t in e.items){var a=e.items[t];$('<li><a href="'+a.link+'"><span>'+WCF.String.escapeHTML(a.title)+"</span>"+(a.subtitle?"<small>"+WCF.String.escapeHTML(a.subtitle)+"</small>":"")+"</a></li>").appendTo(this._list),this._itemCount++}},_handleEmptyResult:function(){return $('<li class="dropdownText">'+WCF.Language.get("wcf.acp.search.noResults")+"</li>").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(){return-1===this._itemIndex?!1:void(window.location=this._list.find("li.dropdownNavigationItem > a").attr("href"))},_success:function(e){this._super(e),this._list.addClass("acpSearchDropdown")}}),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.ban"==a&&this.ban(i.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=$("<div />").hide().appendTo(document.body),this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">'+WCF.Language.get("wcf.acp.user.banReason")+'</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>'+WCF.Language.get("wcf.acp.user.banReason.description")+'</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked="checked" /> '+WCF.Language.get("wcf.acp.user.ban.neverExpires")+'</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">'+WCF.Language.get("wcf.acp.user.ban.expires")+'</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.acp.user.ban.expires.description")+"</small></dd></dl></div>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),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")){var e=$("#userBanExpiresDatePicker").val();if(!e)return void this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('<small class="innerError" />').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(e){$(".jsBanButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("unban"==e.actionName?i.data("banned",!1).data("tooltip",i.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):i.data("banned",!0).data("tooltip",i.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))});var t=new WCF.System.Notification;t.show(),WCF.Clipboard.reload(),"ban"==e.actionName&&this._dialog.wcfDialog("close")}},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=$('<div class="section" />');e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyMembers" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyMembers")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyUserGroupOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyACLOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyACLOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"</small></dd></dl>")),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.enable"==a&&this.enable(i.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){$(".jsEnableButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("disable"==e.actionName?i.data("enabled",!1).data("tooltip",i.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):i.data("enabled",!0).data("tooltip",i.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))});var t=new WCF.System.Notification;t.show(function(){window.location.reload()})}},WCF.ACP.User.SendNewPasswordHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.sendNewPassword"==a&&WCF.System.Confirmation.show(i.confirmMessage,function(e){"confirm"===e&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:i.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(){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=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer"));$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").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=$("<div />").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":var t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":var t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:var 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<o.data.length;r++)o.data[r][0]*=1e3;n.push(o)}$.plot("#chart",n,i),$("#chart").on("plothover",function(e,t,a){a?$("#chartTooltip").html(a.series.xaxis.tickFormatter(a.datapoint[0],a.series.xaxis)+", "+WCF.String.formatNumeric(a.datapoint[1])+" "+a.series.label).css({top:a.pageY+5,left:a.pageX+5}).wcfFadeIn():$("#chartTooltip").hide()}),n.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>")}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageControllers:null,init:function(){this._pageConditions=$("#pageConditions"),this._pageControllers=$("#pageControllers");var e=this._pageControllers.parents("dl:eq(0)");e.hide();var t=e.parent("fieldset");t.children("dl:visible").length||t.hide();var a=t.next("fieldset");a&&(a.data("margin-top",a.css("margin-top")),a.css("margin-top",0)),e.next("dl").css("margin-top",0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_setPageController:function(){var e=$("#objectTypeID").find("option:checked");e.data("page")?this._pageControllers.val([this._pageControllers.find('option[data-object-type="'+e.data("page")+'"]').val()]).change():this._pageControllers.val([]).change()},_submit:function(){this._pageConditions.is(":hidden")?this._pageConditions.find("select, input").remove():this._pageControllers.val([])}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.tag",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.tag"===t&&"com.woltlab.wcf.tag.setAsSynonyms"===a&&(this._objectIDs=i.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(i.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
index f113cbec6307ac458035643d2296f590600d6071..eea547607b05cfb55a1b9a95cb6b79f44216f9c7 100644 (file)
@@ -1,7 +1,8 @@
 // WCF.ACP.js
-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){$(".jsCronjobRow").each($.proxy(function(t,a){var i=$(a).find(".jsExecuteButton"),n=i.data("objectID");return WCF.inArray(n,e.objectIDs)?(e.returnValues[n]&&($(a).find("td.columnNextExec").html(e.returnValues[n].formatted),$(a).wcfHighlight()),this._notification.show(),!1):void 0},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=$('<div style="overflow: auto"><pre>'+t.next().html()+"</pre></div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("<pre>"+t.next().html()+"</pre>"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Menu=Class.extend({init:function(e){this._headerNavigation=$("nav#mainMenu"),this._sidebarNavigation=$("aside.collapsibleMenu > div"),this._prepareElements(e)},_prepareElements:function(e){this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("legend").each($.proxy(function(e,t){$(t).click($.proxy(this._toggleItem,this))},this)),this._sidebarNavigation.find("nav ul").each(function(){$(this).hide()}),this._headerNavigation.find("li").click($.proxy(this._toggleSidebar,this)),0===e.length?this._renderSidebar(this._headerNavigation.find("li:first").data("menuItem"),[]):this._renderSidebar("",e)},_toggleItem:function(e){var t=$(e.currentTarget);t.parent().find("nav ul").stop(!0,!0).toggle("blind",{},200).end(),t.toggleClass("active")},_toggleSidebar:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._renderSidebar(t.data("menuItem"),[])},_renderSidebar:function(e,t){if(this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("> div").hide(),0===t.length)this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();else{e=t.shift(),this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();for(var a=0,i=t.length;i>a;a++){var n=t[a];if($.wcfIsset(n)){var s=$("#"+$.wcfEscapeID(n));"ul"===s.getTagName()?s.show().parents("fieldset").children("legend").addClass("active"):s.addClass("active")}}}}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i){switch(this._actionName=t?t:"InstallPackage",this._allowRollback=a===!0?!0:!1,this._queueID=e,this._actionName){case"InstallPackage":this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title";break;case"UninstallPackage":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;i>a;a++){var n=t[a];n.length&&(e.length&&(e+="-"),e+=n.toLowerCase())}this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?"+e+"/&t="+SECURITY_TOKEN})},_init:function(){$("#submitButton").click($.proxy(this.prepareInstallation,this))},_failure:function(){null!==this._dialog&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("times")),this._allowRollback&&null!==this._dialog&&this._purgeTemplateContent($.proxy(function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.acp.package.installation.rollback")+"</button>").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(){this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return{queueID:this._queueID,step:"prepare"}},_success:function(e){if(this._shouldRender=!1,null===this._dialog&&(this._dialog=$('<div id="packageInstallationDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==e.step)return this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter(function(t){t.stop();var a=new WCF.ACP.Package.Uninstallation;a.start(e.packageID)},200);if(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)return this._setIcon("check"),void this._purgeTemplateContent($.proxy(function(){var t=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),a=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").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));if(e.innerTemplate){var t=this;if($("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup(function(a){a.keyCode===$.ui.keyCode.ENTER&&t._submit(e)}),e.step&&e.node){$("#packageInstallationProgress").removeAttr("value"),this._setIcon("question");var a=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(a).click($.proxy(function(t){$(t.currentTarget).disable(),this._submit(e)},this))}return $("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")}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=$(a),n=i.attr("type");if("checkbox"!=n&&"radio"!=n||i.prop("checked")){var s=i.attr("name");s.match(/(.*)\[([^[]*)\]$/)?(s=RegExp.$1,$key=RegExp.$2,void 0===t[s]&&(t[s]=$key?{}:[]),$key?t[s][$key]=i.val():t[s].push(i.val())):t[s]=i.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({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=$(e.currentTarget);if(t.data("isApplication")&&this._wcfPackageListURL)return void(window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,t.data("objectID"))));var a=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"confirm"===e&&(a._packageID=t.data("objectID"),a.prepareInstallation())})},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Search=Class.extend({_button:null,_cache:{},_container:null,_dialog:null,_package:null,_packageDescription:null,_packageName:null,_packageSearchResultContainer:null,_packageSearchResultList:null,_pageCount:0,_pageNo:1,_proxy:null,_searchID:0,_selectedPackage:"",_selectedPackageVersion:"",init:function(){this._button=null,this._cache={},this._container=$("#packageSearch"),this._dialog=null,this._package=null,this._packageName=null,this._packageSearchResultContainer=$("#packageSearchResultContainer"),this._packageSearchResultList=$("#packageSearchResultList"),this._pageCount=0,this._pageNo=1,this._searchDescription=null,this._searchID=0,this._selectedPackage="",this._selectedPackageVersion="",this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements()},_initElements:function(){this._button=this._container.find(".formSubmit > button.jsButtonPackageSearch").disable().click($.proxy(this._search,this)),this._package=$("#package").keyup($.proxy(this._keyUp,this)),this._packageDescription=$("#packageDescription").keyup($.proxy(this._keyUp,this)),this._packageName=$("#packageName").keyup($.proxy(this._keyUp,this))},_keyUp:function(e){""===this._package.val()&&""===this._packageDescription.val()&&""===this._packageName.val()?this._button.disable():(this._button.enable(),13===e.which&&this._button.trigger("click"))},_search:function(){var e=this._getSearchValues();return this._validate(e)?(e.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"search",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:e}),void this._proxy.sendRequest()):!1},_getSearchValues:function(){return{package:$.trim(this._package.val()),packageDescription:$.trim(this._packageDescription.val()),packageName:$.trim(this._packageName.val())}},_validate:function(e){return""===e.package&&""===e.packageDescription&&""===e.packageName?!1:!0},_success:function(e){switch(e.actionName){case"getResultList":this._insertTemplate(e.returnValues.template);break;case"prepareInstallation":if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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)));break;case"search":this._pageCount=e.returnValues.pageCount,this._searchID=e.returnValues.searchID,this._insertTemplate(e.returnValues.template,void 0===e.returnValues.count?void 0:e.returnValues.count),this._setupPagination()}},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_insertTemplate:function(e,t){this._packageSearchResultContainer.show(),this._packageSearchResultList.html(e),void 0===t&&(this._content[this._pageNo]=e),void 0!==t&&(this._content={1:e},this._packageSearchResultContainer.find("> header > h2 > .badge").html(t)),this._packageSearchResultList.find(".jsInstallPackage").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))},_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?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()},_setupPagination:function(){this._content={1:this._packageSearchResultList.html()},this._packageSearchResultContainer.find(".pagination").wcfPages("destroy").remove(),this._pageCount>1&&$('<div class="contentNavigation" />').insertAfter(this._packageSearchResultList).wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){return t&&t.activePage&&(this._pageNo=t.activePage),this._pageNo<1||this._pageNo>this._pageCount?void console.debug("[WCF.ACP.Package.Search] Cannot access page "+this._pageNo+" of "+this._pageCount):void(void 0===this._content[this._pageNo]?(this._proxy.setOption("data",{actionName:"getResultList",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{pageNo:this._pageNo,searchID:this._searchID}}),this._proxy.sendRequest()):(this._packageSearchResultList.html(this._content[this._pageNo]),WCF.DOMNodeInsertedHandler.execute()))}}),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))},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").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?!0:!1,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={};if($(".jsPackageUpdate").each($.proxy(function(e,t){var i=$(t);i.find("input[type=checkbox]:checked").length&&(a[i.data("package")]=i.find("select").val())},this)),$.getLength(a)){this._submitButton.disable();var i={packages:a};t&&(i.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:$("#packageUpdateServerSaveCredentials:checked").length?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:i}),this._proxy.sendRequest()}},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0);t.prepareInstallation()}else e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_dialog:null,init:function(e){if(this._dialog=null,e===!0)$(".jsButtonPackageUpdate").click($.proxy(this._click,this));else{var t=$('<li><a class="button"><span class="icon icon16 fa-refresh"></span> <span>'+WCF.Language.get("wcf.acp.package.searchForUpdates")+"</span></a></li>");t.click($.proxy(this._click,this)).prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > ul"))}},_click:function(){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){e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("<div>"+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}))}}),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)});var e=$('<li><a class="button"><span class="icon icon16 fa-shopping-cart" /> <span>'+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"</span></a></li>");e.prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > 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){if(e.returnValues.template){null===this._dialog?(this._dialog=$("<div />").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 t=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup(function(e){return e.which==$.ui.keyCode.ENTER?(t.trigger("click"),!1):void 0})}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("<div />").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=$("<div />").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({_aborted:!1,_callback:null,_dialogID:null,_dialog:null,_proxy:null,_title:"",init:function(e,t,a,i,n){this._aborted=!1,this._callback=n||null,this._dialogID=e+"Worker",this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{className:t,parameters:i||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._title=a},_success:function(e){if(null===this._dialog&&(this._dialog=$('<div id="'+this._dialogID+'" />').hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.acp.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.template&&this._dialog.html(e.template),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();else if(null!==this._callback)this._callback(this,e);else{var t=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(t).focus().click(function(){window.location=e.proceedURL}),this._dialog.wcfDialog("render")}}}),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({init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",function(e){e.preventDefault()})},_createListItem:function(e){this._list.children("li").length>0&&$('<li class="dropdownDivider" />').appendTo(this._list),$('<li class="dropdownText">'+e.title+"</li>").appendTo(this._list);for(var t in e.items){var a=e.items[t];$('<li><a href="'+a.link+'"><span>'+WCF.String.escapeHTML(a.title)+"</span>"+(a.subtitle?"<small>"+WCF.String.escapeHTML(a.subtitle)+"</small>":"")+"</a></li>").appendTo(this._list),this._itemCount++}},_handleEmptyResult:function(){return $('<li class="dropdownText">'+WCF.Language.get("wcf.acp.search.noResults")+"</li>").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(){return-1===this._itemIndex?!1:void(window.location=this._list.find("li.dropdownNavigationItem > a").attr("href"))},_success:function(e){this._super(e),this._list.addClass("acpSearchDropdown")}}),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.ban"==a&&this.ban(i.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=$("<div />").hide().appendTo(document.body),this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">'+WCF.Language.get("wcf.acp.user.banReason")+'</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>'+WCF.Language.get("wcf.acp.user.banReason.description")+'</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked="checked" /> '+WCF.Language.get("wcf.acp.user.ban.neverExpires")+'</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">'+WCF.Language.get("wcf.acp.user.ban.expires")+'</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.acp.user.ban.expires.description")+"</small></dd></dl></div>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),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")){var e=$("#userBanExpiresDatePicker").val();if(!e)return void this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('<small class="innerError" />').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(e){$(".jsBanButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("unban"==e.actionName?i.data("banned",!1).data("tooltip",i.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):i.data("banned",!0).data("tooltip",i.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))});var t=new WCF.System.Notification;t.show(),WCF.Clipboard.reload(),"ban"==e.actionName&&this._dialog.wcfDialog("close")}},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=$('<div class="section" />');e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyMembers" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyMembers")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyUserGroupOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyACLOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyACLOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"</small></dd></dl>")),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)}}),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.enable"==a&&this.enable(i.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){$(".jsEnableButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("disable"==e.actionName?i.data("enabled",!1).data("tooltip",i.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):i.data("enabled",!0).data("tooltip",i.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))});var t=new WCF.System.Notification;t.show(function(){window.location.reload()})}},WCF.ACP.User.SendNewPasswordHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.sendNewPassword"==a&&WCF.System.Confirmation.show(i.confirmMessage,function(e){"confirm"===e&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:i.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(){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=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer"));$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").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=$("<div />").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":var t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":var t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:var 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<o.data.length;r++)o.data[r][0]*=1e3;n.push(o)}$.plot("#chart",n,i),$("#chart").on("plothover",function(e,t,a){a?$("#chartTooltip").html(a.series.xaxis.tickFormatter(a.datapoint[0],a.series.xaxis)+", "+WCF.String.formatNumeric(a.datapoint[1])+" "+a.series.label).css({top:a.pageY+5,left:a.pageX+5}).wcfFadeIn():$("#chartTooltip").hide()}),n.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>")}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageControllers:null,init:function(){this._pageConditions=$("#pageConditions"),this._pageControllers=$("#pageControllers");var e=this._pageControllers.parents("dl:eq(0)");e.hide();var t=e.parent("fieldset");t.children("dl:visible").length||t.hide();var a=t.next("fieldset");a&&(a.data("margin-top",a.css("margin-top")),a.css("margin-top",0)),e.next("dl").css("margin-top",0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_setPageController:function(){var e=$("#objectTypeID").find("option:checked");e.data("page")?this._pageControllers.val([this._pageControllers.find('option[data-object-type="'+e.data("page")+'"]').val()]).change():this._pageControllers.val([]).change()},_submit:function(){this._pageConditions.is(":hidden")?this._pageConditions.find("select, input").remove():this._pageControllers.val([])}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.tag",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.tag"===t&&"com.woltlab.wcf.tag.setAsSynonyms"===a&&(this._objectIDs=i.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(i.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)})}});
+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){$(".jsCronjobRow").each($.proxy(function(t,a){var i=$(a).find(".jsExecuteButton"),n=i.data("objectID");return WCF.inArray(n,e.objectIDs)?(e.returnValues[n]&&($(a).find("td.columnNextExec").html(e.returnValues[n].formatted),$(a).wcfHighlight()),this._notification.show(),!1):void 0},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=$('<div style="overflow: auto"><pre>'+t.next().html()+"</pre></div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("<pre>"+t.next().html()+"</pre>"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Menu=Class.extend({init:function(e){this._headerNavigation=$("nav#mainMenu"),this._sidebarNavigation=$("aside.collapsibleMenu > div"),this._prepareElements(e)},_prepareElements:function(e){this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("legend").each($.proxy(function(e,t){$(t).click($.proxy(this._toggleItem,this))},this)),this._sidebarNavigation.find("nav ul").each(function(){$(this).hide()}),this._headerNavigation.find("li").click($.proxy(this._toggleSidebar,this)),0===e.length?this._renderSidebar(this._headerNavigation.find("li:first").data("menuItem"),[]):this._renderSidebar("",e)},_toggleItem:function(e){var t=$(e.currentTarget);t.parent().find("nav ul").stop(!0,!0).toggle("blind",{},200).end(),t.toggleClass("active")},_toggleSidebar:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._renderSidebar(t.data("menuItem"),[])},_renderSidebar:function(e,t){if(this._headerNavigation.find("li").removeClass("active"),this._sidebarNavigation.find("> div").hide(),0===t.length)this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();else{e=t.shift(),this._headerNavigation.find('li[data-menu-item="'+e+'"]').addClass("active"),this._sidebarNavigation.find('div[data-parent-menu-item="'+e+'"]').show();for(var a=0,i=t.length;i>a;a++){var n=t[a];if($.wcfIsset(n)){var s=$("#"+$.wcfEscapeID(n));"ul"===s.getTagName()?s.show().parents("fieldset").children("legend").addClass("active"):s.addClass("active")}}}}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i){switch(this._actionName=t?t:"InstallPackage",this._allowRollback=a===!0?!0:!1,this._queueID=e,this._actionName){case"InstallPackage":this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title";break;case"UninstallPackage":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;i>a;a++){var n=t[a];n.length&&(e.length&&(e+="-"),e+=n.toLowerCase())}this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?"+e+"/&t="+SECURITY_TOKEN})},_init:function(){$("#submitButton").click($.proxy(this.prepareInstallation,this))},_failure:function(){null!==this._dialog&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("times")),this._allowRollback&&null!==this._dialog&&this._purgeTemplateContent($.proxy(function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.acp.package.installation.rollback")+"</button>").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(){this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return{queueID:this._queueID,step:"prepare"}},_success:function(e){if(this._shouldRender=!1,null===this._dialog&&(this._dialog=$('<div id="packageInstallationDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==e.step)return this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter(function(t){t.stop();var a=new WCF.ACP.Package.Uninstallation;a.start(e.packageID)},200);if(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)return this._setIcon("check"),void this._purgeTemplateContent($.proxy(function(){var t=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),a=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").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));if(e.innerTemplate){var t=this;if($("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup(function(a){a.keyCode===$.ui.keyCode.ENTER&&t._submit(e)}),e.step&&e.node){$("#packageInstallationProgress").removeAttr("value"),this._setIcon("question");var a=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(a).click($.proxy(function(t){$(t.currentTarget).disable(),this._submit(e)},this))}return $("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")}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=$(a),n=i.attr("type");if("checkbox"!=n&&"radio"!=n||i.prop("checked")){var s=i.attr("name");s.match(/(.*)\[([^[]*)\]$/)?(s=RegExp.$1,$key=RegExp.$2,void 0===t[s]&&(t[s]=$key?{}:[]),$key?t[s][$key]=i.val():t[s].push(i.val())):t[s]=i.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({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=$(e.currentTarget);if(t.data("isApplication")&&this._wcfPackageListURL)return void(window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,t.data("objectID"))));var a=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"confirm"===e&&(a._packageID=t.data("objectID"),a.prepareInstallation())},void 0,void 0,!0)},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Search=Class.extend({_button:null,_cache:{},_container:null,_dialog:null,_package:null,_packageDescription:null,_packageName:null,_packageSearchResultContainer:null,_packageSearchResultList:null,_pageCount:0,_pageNo:1,_proxy:null,_searchID:0,_selectedPackage:"",_selectedPackageVersion:"",init:function(){this._button=null,this._cache={},this._container=$("#packageSearch"),this._dialog=null,this._package=null,this._packageName=null,this._packageSearchResultContainer=$("#packageSearchResultContainer"),this._packageSearchResultList=$("#packageSearchResultList"),this._pageCount=0,this._pageNo=1,this._searchDescription=null,this._searchID=0,this._selectedPackage="",this._selectedPackageVersion="",this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements()},_initElements:function(){this._button=this._container.find(".formSubmit > button.jsButtonPackageSearch").disable().click($.proxy(this._search,this)),this._package=$("#package").keyup($.proxy(this._keyUp,this)),this._packageDescription=$("#packageDescription").keyup($.proxy(this._keyUp,this)),this._packageName=$("#packageName").keyup($.proxy(this._keyUp,this))},_keyUp:function(e){""===this._package.val()&&""===this._packageDescription.val()&&""===this._packageName.val()?this._button.disable():(this._button.enable(),13===e.which&&this._button.trigger("click"))},_search:function(){var e=this._getSearchValues();return this._validate(e)?(e.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"search",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:e}),void this._proxy.sendRequest()):!1},_getSearchValues:function(){return{package:$.trim(this._package.val()),packageDescription:$.trim(this._packageDescription.val()),packageName:$.trim(this._packageName.val())}},_validate:function(e){return""===e.package&&""===e.packageDescription&&""===e.packageName?!1:!0},_success:function(e){switch(e.actionName){case"getResultList":this._insertTemplate(e.returnValues.template);break;case"prepareInstallation":if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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)));break;case"search":this._pageCount=e.returnValues.pageCount,this._searchID=e.returnValues.searchID,this._insertTemplate(e.returnValues.template,void 0===e.returnValues.count?void 0:e.returnValues.count),this._setupPagination()}},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_insertTemplate:function(e,t){this._packageSearchResultContainer.show(),this._packageSearchResultList.html(e),void 0===t&&(this._content[this._pageNo]=e),void 0!==t&&(this._content={1:e},this._packageSearchResultContainer.find("> header > h2 > .badge").html(t)),this._packageSearchResultList.find(".jsInstallPackage").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)},_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?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()},_setupPagination:function(){this._content={1:this._packageSearchResultList.html()},this._packageSearchResultContainer.find(".pagination").wcfPages("destroy").remove(),this._pageCount>1&&$('<div class="contentNavigation" />').insertAfter(this._packageSearchResultList).wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){return t&&t.activePage&&(this._pageNo=t.activePage),this._pageNo<1||this._pageNo>this._pageCount?void console.debug("[WCF.ACP.Package.Search] Cannot access page "+this._pageNo+" of "+this._pageCount):void(void 0===this._content[this._pageNo]?(this._proxy.setOption("data",{actionName:"getResultList",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{pageNo:this._pageNo,searchID:this._searchID}}),this._proxy.sendRequest()):(this._packageSearchResultList.html(this._content[this._pageNo]),WCF.DOMNodeInsertedHandler.execute()))}}),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){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").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?!0:!1,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={};if($(".jsPackageUpdate").each($.proxy(function(e,t){var i=$(t);i.find("input[type=checkbox]:checked").length&&(a[i.data("package")]=i.find("select").val())},this)),$.getLength(a)){this._submitButton.disable();var i={packages:a};t&&(i.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:$("#packageUpdateServerSaveCredentials:checked").length?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:i}),this._proxy.sendRequest()}},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0);t.prepareInstallation()}else e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(a),i=!1),i&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_dialog:null,init:function(e){if(this._dialog=null,e===!0)$(".jsButtonPackageUpdate").click($.proxy(this._click,this));else{var t=$('<li><a class="button"><span class="icon icon16 fa-refresh"></span> <span>'+WCF.Language.get("wcf.acp.package.searchForUpdates")+"</span></a></li>");t.click($.proxy(this._click,this)).prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > ul"))}},_click:function(){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){e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("<div>"+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}))}}),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)});var e=$('<li><a class="button"><span class="icon icon16 fa-shopping-cart" /> <span>'+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"</span></a></li>");e.prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > 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){if(e.returnValues.template){null===this._dialog?(this._dialog=$("<div />").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 t=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup(function(e){return e.which==$.ui.keyCode.ENTER?(t.trigger("click"),!1):void 0})}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("<div />").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=$("<div />").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({_aborted:!1,_callback:null,_dialogID:null,_dialog:null,_proxy:null,_title:"",init:function(e,t,a,i,n){this._aborted=!1,this._callback=n||null,this._dialogID=e+"Worker",this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{className:t,parameters:i||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._title=a},_success:function(e){if(null===this._dialog&&(this._dialog=$('<div id="'+this._dialogID+'" />').hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.acp.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.template&&this._dialog.html(e.template),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();else if(null!==this._callback)this._callback(this,e);else{var t=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(t).focus().click(function(){window.location=e.proceedURL}),this._dialog.wcfDialog("render")}}}),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({init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",function(e){e.preventDefault()})},_createListItem:function(e){this._list.children("li").length>0&&$('<li class="dropdownDivider" />').appendTo(this._list),$('<li class="dropdownText">'+e.title+"</li>").appendTo(this._list);for(var t in e.items){var a=e.items[t];$('<li><a href="'+a.link+'"><span>'+WCF.String.escapeHTML(a.title)+"</span>"+(a.subtitle?"<small>"+WCF.String.escapeHTML(a.subtitle)+"</small>":"")+"</a></li>").appendTo(this._list),this._itemCount++}},_handleEmptyResult:function(){return $('<li class="dropdownText">'+WCF.Language.get("wcf.acp.search.noResults")+"</li>").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(){return-1===this._itemIndex?!1:void(window.location=this._list.find("li.dropdownNavigationItem > a").attr("href"))},_success:function(e){this._super(e),this._list.addClass("acpSearchDropdown")}}),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.ban"==a&&this.ban(i.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=$("<div />").hide().appendTo(document.body),this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">'+WCF.Language.get("wcf.acp.user.banReason")+'</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>'+WCF.Language.get("wcf.acp.user.banReason.description")+'</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked="checked" /> '+WCF.Language.get("wcf.acp.user.ban.neverExpires")+'</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">'+WCF.Language.get("wcf.acp.user.ban.expires")+'</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.acp.user.ban.expires.description")+"</small></dd></dl></div>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),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")){var e=$("#userBanExpiresDatePicker").val();if(!e)return void this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('<small class="innerError" />').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(e){$(".jsBanButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("unban"==e.actionName?i.data("banned",!1).data("tooltip",i.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):i.data("banned",!0).data("tooltip",i.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))});var t=new WCF.System.Notification;t.show(),WCF.Clipboard.reload(),"ban"==e.actionName&&this._dialog.wcfDialog("close")}},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=$('<div class="section" />');e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyMembers" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyMembers")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyUserGroupOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyACLOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyACLOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"</small></dd></dl>")),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)),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.enable"==a&&this.enable(i.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){$(".jsEnableButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("disable"==e.actionName?i.data("enabled",!1).data("tooltip",i.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):i.data("enabled",!0).data("tooltip",i.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"))});var t=new WCF.System.Notification;t.show(function(){window.location.reload()})}},WCF.ACP.User.SendNewPasswordHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.user",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.user.sendNewPassword"==a&&WCF.System.Confirmation.show(i.confirmMessage,function(e){"confirm"===e&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:i.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(){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=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer"));$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").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=$("<div />").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":var t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":var t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:var 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<o.data.length;r++)o.data[r][0]*=1e3;n.push(o)}$.plot("#chart",n,i),$("#chart").on("plothover",function(e,t,a){a?$("#chartTooltip").html(a.series.xaxis.tickFormatter(a.datapoint[0],a.series.xaxis)+", "+WCF.String.formatNumeric(a.datapoint[1])+" "+a.series.label).css({top:a.pageY+5,left:a.pageX+5}).wcfFadeIn():$("#chartTooltip").hide()}),n.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>")}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageControllers:null,init:function(){this._pageConditions=$("#pageConditions"),this._pageControllers=$("#pageControllers");var e=this._pageControllers.parents("dl:eq(0)");e.hide();var t=e.parent("fieldset");t.children("dl:visible").length||t.hide();var a=t.next("fieldset");a&&(a.data("margin-top",a.css("margin-top")),a.css("margin-top",0)),e.next("dl").css("margin-top",0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_setPageController:function(){var e=$("#objectTypeID").find("option:checked");e.data("page")?this._pageControllers.val([this._pageControllers.find('option[data-object-type="'+e.data("page")+'"]').val()]).change():this._pageControllers.val([]).change()},_submit:function(){this._pageConditions.is(":hidden")?this._pageConditions.find("select, input").remove():this._pageControllers.val([])}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){$(".jsClipboardEditor").each($.proxy(function(index,container){var $container=$(container),$types=eval($container.data("types"));return WCF.inArray("com.woltlab.wcf.tag",$types)?($container.on("clipboardAction",$.proxy(this._execute,this)),!1):void 0},this))},_execute:function(e,t,a,i){"com.woltlab.wcf.tag"===t&&"com.woltlab.wcf.tag.setAsSynonyms"===a&&(this._objectIDs=i.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(i.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)})}});
 // WCF.ACP.Language.js
 WCF.ACP.Language={},WCF.ACP.Language.ItemList=Class.extend({_proxy:null,_dialog:null,_notification:null,init:function(a,e){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsLanguageItem").each($.proxy(function(a,e){var t=$(e),i=t.data("languageItemID"),n=this;t.click(function(){n._click(i)})},this)),a=parseInt(a)||0,a>100&&this._createPagination(a,e)},_createPagination:function(a,e){$(".contentNavigation").each(function(t,i){var n=$(i),o=$("<nav />").prependTo(n);o.wcfPages({activePage:parseInt(e)||1,maxPage:Math.ceil(a/100)}).on("wcfpagesswitched",function(a,e){var t=$("#languageItemSearchForm");$('<input type="hidden" name="pageNo" value="'+e.activePage+'" />').appendTo(t),t.submit()})})},_click:function(a){this._proxy.setOption("data",{actionName:"prepareEdit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[a]}),this._proxy.sendRequest()},_success:function(a){a.returnValues?(this._showDialog(a.returnValues.template,a.returnValues.languageItem),this._dialog.find(".jsSubmitLanguageItem").click($.proxy(this._submit,this))):(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._dialog.wcfDialog("close"),this._notification.show())},_showDialog:function(a,e){null===this._dialog&&(this._dialog=$("#languageItemEdit"),this._dialog.length||(this._dialog=$('<div id="languageItemEdit" />').hide().appendTo(document.body))),this._dialog.html(a).wcfDialog({title:e}).wcfDialog("render")},_submit:function(){var a=$("#overlayLanguageItemValue").val(),e=$("#overlayLanguageCustomItemValue").val(),t=$("#overlayLanguageUseCustomValue").is(":checked")?1:0,i=$("#overlayLanguageItemID").val();this._proxy.setOption("data",{actionName:"edit",className:"wcf\\data\\language\\item\\LanguageItemAction",objectIDs:[i],parameters:{languageItemValue:a,languageCustomItemValue:e,languageUseCustomValue:t}}),this._proxy.sendRequest()}});
 // WCF.ACP.Style.js
-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))})},_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){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(){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUpload=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogo"),this._image=$("#styleLogo"),this._imagePath=$("#imagePath"),this._pageLogo=$("#pageLogo"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogo"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=$("#logo > a > img").prop("src");this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').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(){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=$(t.currentTarget).data("confirmMessage");if(s){var n=this;WCF.System.Confirmation.show(s,function(t){"confirm"===t&&n._click("delete",e)})}else this._click("delete",e)},_success:function(){window.location.reload()}});
+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){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(){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUpload=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogo"),this._image=$("#styleLogo"),this._imagePath=$("#imagePath"),this._pageLogo=$("#pageLogo"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogo"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=$("#logo > a > img").prop("src");this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else 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=$('<small class="innerError" />').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),i=s.data("styleID"),n=this;s.find(".jsSetAsDefault").click(function(){n._click("setAsDefault",i)}),s.find(".jsDelete").click(function(t){n._delete(t,i)})},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=$(t.currentTarget).data("confirmMessage");if(s){var i=this;WCF.System.Confirmation.show(s,function(t){"confirm"===t&&i._click("delete",e)},void 0,void 0,!0)}else this._click("delete",e)},_success:function(){window.location.reload()}});
index 1cbe889c83df6cfd883629d5577be18b497ffd07..cbc681ef55b7a4120dfdc76bdef38b63d08c63f9 100755 (executable)
@@ -64,10 +64,10 @@ i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.t
 (function (window, undefined) {!function(){var e=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function r(){!e&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;e=!0;var o=new this;e=!1;for(var a in n)o[a]="function"==typeof n[a]&&"function"==typeof i[a]&&t.test(n[a])?function(e,t){return function(){var n=this._super;this._super=i[e];var r=t.apply(this,arguments);return this._super=n,r}}(a,n[a]):n[a];return r.prototype=o,r.prototype.constructor=r,r.extend=arguments.callee,r}}(),function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function i(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function o(e){return i("Function",e)}function a(e){return i("Array",e)}function l(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function u(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,i){var o="object"==typeof e?e:{test:e,success:t?a(t)?t:[t]:!1,failure:r?a(r)?r:[r]:!1,callback:i||n},l=!!o.test;return l&&o.success?(o.success.push(o.callback),N.load.apply(null,o.success)):l||!o.failure?i():(o.failure.push(o.callback),N.load.apply(null,o.failure)),N}function c(e){var t,n,r={};if("object"==typeof e)for(t in e)!e[t]||(r={name:t,url:e[t]});else r={name:l(e),url:e};return n=S[r.name],n&&n.url===r.url?n:(S[r.name]=r,r)}function d(e){e=e||S;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==F)return!1;return!0}function p(e){e.state=P,r(e.onpreload,function(e){e.call()})}function f(e){e.state===t&&(e.state=I,e.onpreload=[],b({url:e.url,type:"cache"},function(){p(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),i=n[0];return o(t)||(t=null),a(e[0])?(e[0].push(t),N.load.apply(null,e[0]),N):(i?(r(n,function(e){o(e)||!e||f(c(e))}),m(c(e[0]),o(i)?i:function(){N.load.apply(null,n)})):m(c(e[0])),N)}function g(){var e=arguments,t=e[e.length-1],n={};return o(t)||(t=null),a(e[0])?(e[0].push(t),N.load.apply(null,e[0]),N):(r(e,function(e){e!==t&&(e=c(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=c(e),m(e,function(){d(n)&&u(t)}))}),N)}function m(e,t){return t=t||n,e.state===F?void t():e.state===D?void N.ready(e.name,t):e.state===I?void e.onpreload.push(function(){m(e,t)}):(e.state=D,void b(e,function(){e.state=F,t(),r(k[e.name],function(e){u(e)}),O&&d()&&r(k.ALL,function(e){u(e)})}))}function v(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function b(t,r){function i(t){t=t||e.event,l.onload=l.onreadystatechange=l.onerror=null,r()}function o(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(l.readyState)&&(!x.documentMode||x.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),l.onload=l.onreadystatechange=l.onerror=null,r())}function a(){if(t.state!==F&&t.cssRetries<=20){for(var n=0,r=x.styleSheets.length;r>n;n++)if(x.styleSheets[n].href===l.href)return void o({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(a,250)}}var l,u,s;r=r||n,u=v(t.url),"css"===u?(l=x.createElement("link"),l.type="text/"+(t.type||"css"),l.rel="stylesheet",l.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(a,500)):(l=x.createElement("script"),l.type="text/"+(t.type||"javascript"),l.src=t.url),l.onload=l.onreadystatechange=o,l.onerror=i,l.async=!1,l.defer=!1,t.errorTimeout=e.setTimeout(function(){i({type:"timeout"})},7e3),s=x.head||x.getElementsByTagName("head")[0],s.insertBefore(l,s.lastChild)}function w(){for(var e,t=x.getElementsByTagName("script"),n=0,r=t.length;r>n;n++)if(e=t[n].getAttribute("data-headjs-load"),!!e)return void N.load(e)}function y(e,t){var n,i,l;return e===x?(O?u(t):L.push(t),N):(o(e)&&(t=e,e="ALL"),a(e)?(n={},r(e,function(e){n[e]=S[e],N.ready(e,function(){d(n)&&u(t)})}),N):"string"==typeof e&&o(t)?(i=S[e],i&&i.state===F||"ALL"===e&&d()&&O?(u(t),N):(l=k[e],l?l.push(t):l=k[e]=[t],N)):N)}function T(){return x.body?void(O||(O=!0,w(),r(L,function(e){u(e)}))):(e.clearTimeout(N.readyTimeout),void(N.readyTimeout=e.setTimeout(T,50)))}function E(){x.addEventListener?(x.removeEventListener("DOMContentLoaded",E,!1),T()):"complete"===x.readyState&&(x.detachEvent("onreadystatechange",E),T())}var O,A,x=e.document,L=[],k={},S={},C="async"in x.createElement("script")||"MozAppearance"in x.documentElement.style||e.opera,M=e.head_conf&&e.head_conf.head||"head",N=e[M]=e[M]||function(){N.ready.apply(null,arguments)},I=1,P=2,D=3,F=4;if("complete"===x.readyState)T();else if(x.addEventListener)x.addEventListener("DOMContentLoaded",E,!1),e.addEventListener("load",T,!1);else{x.attachEvent("onreadystatechange",E),e.attachEvent("onload",T),A=!1;try{A=!e.frameElement&&x.documentElement}catch(e){}A&&A.doScroll&&function t(){if(!O){try{A.doScroll("left")}catch(n){return e.clearTimeout(N.readyTimeout),void(N.readyTimeout=e.setTimeout(t,50))}T()}}()}N.load=N.js=C?g:h,N.test=s,N.ready=y,N.ready(x,function(){d()&&r(k.ALL,function(e){u(e)}),N.feature&&N.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=s),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var r=e(this),i=r.data(k);i||(i=new n(this,t),r.data(k,i))})}function n(t,n){function S(t){if(!(se()||e(t.target).closest(n.excludedElements,Xe).length>0)){var r,i=t.originalEvent?t.originalEvent:t,o=A?i.touches[0]:i;return Qe=y,A?Ye=i.touches.length:t.preventDefault(),Fe=0,ze=null,Ue=null,Re=0,_e=0,je=0,Ve=1,qe=0,Be=he(),He=ve(),le(),!A||Ye===n.fingers||n.fingers===b||H()?(de(0,o),We=Le(),2==Ye&&(de(1,i.touches[1]),_e=je=ye(Be[0].start,Be[1].start)),(n.swipeStatus||n.pinchStatus)&&(r=F(i,Qe))):r=!1,r===!1?(Qe=O,F(i,Qe),r):(n.hold&&(et=setTimeout(e.proxy(function(){Xe.trigger("hold",[i.target]),n.hold&&(r=n.hold.call(Xe,i,i.target))},this),n.longTapThreshold)),ce(!0),null)}}function C(e){var t=e.originalEvent?e.originalEvent:e;if(Qe!==E&&Qe!==O&&!ue()){var r,i=A?t.touches[0]:t,o=pe(i);if(Ze=Le(),A&&(Ye=t.touches.length),n.hold&&clearTimeout(et),Qe=T,2==Ye&&(0==_e?(de(1,t.touches[1]),_e=je=ye(Be[0].start,Be[1].start)):(pe(t.touches[1]),je=ye(Be[0].end,Be[1].end),Ue=Ee(Be[0].end,Be[1].end)),Ve=Te(_e,je),qe=Math.abs(_e-je)),Ye===n.fingers||n.fingers===b||!A||H()){if(ze=xe(o.start,o.end),q(e,ze),Fe=Oe(o.start,o.end),Re=we(),ge(ze,Fe),(n.swipeStatus||n.pinchStatus)&&(r=F(t,Qe)),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var a=!0;if(n.triggerOnTouchLeave){var l=ke(this);a=Se(o.end,l)}!n.triggerOnTouchEnd&&a?Qe=D(T):n.triggerOnTouchLeave&&!a&&(Qe=D(E)),(Qe==O||Qe==E)&&F(t,Qe)}}else Qe=O,F(t,Qe);r===!1&&(Qe=O,F(t,Qe))}}function M(e){var t=e.originalEvent;return A&&t.touches.length>0?(ae(),!0):(ue()&&(Ye=Ke),Ze=Le(),Re=we(),_()||!R()?(Qe=O,F(t,Qe)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Qe===T?(e.preventDefault(),Qe=E,F(t,Qe)):!n.triggerOnTouchEnd&&G()?(Qe=E,z(t,Qe,f)):Qe===T&&(Qe=O,F(t,Qe)),ce(!1),null)}function N(){Ye=0,Ze=0,We=0,_e=0,je=0,Ve=1,le(),ce(!1)}function I(e){var t=e.originalEvent;n.triggerOnTouchLeave&&(Qe=D(E),F(t,Qe))}function P(){Xe.unbind(Me,S),Xe.unbind(De,N),Xe.unbind(Ne,C),Xe.unbind(Ie,M),Pe&&Xe.unbind(Pe,I),ce(!1)}function D(e){var t=e,r=V(),i=R(),o=_();return!r||o?t=O:!i||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==E&&n.triggerOnTouchLeave&&(t=O):t=E,t}function F(e,t){var n=void 0;return B()||Y()?n=z(e,t,d):(X()||H())&&n!==!1&&(n=z(e,t,p)),ie()&&n!==!1?n=z(e,t,h):oe()&&n!==!1?n=z(e,t,g):re()&&n!==!1&&(n=z(e,t,f)),t===O&&N(e),t===E&&(A?0==e.touches.length&&N(e):N(e)),n}function z(t,s,c){var m=void 0;if(c==d){if(Xe.trigger("swipeStatus",[s,ze||null,Fe||0,Re||0,Ye,Be]),n.swipeStatus&&(m=n.swipeStatus.call(Xe,t,s,ze||null,Fe||0,Re||0,Ye,Be),m===!1))return!1;if(s==E&&Q()){if(Xe.trigger("swipe",[ze,Fe,Re,Ye,Be]),n.swipe&&(m=n.swipe.call(Xe,t,ze,Fe,Re,Ye,Be),m===!1))return!1;switch(ze){case r:Xe.trigger("swipeLeft",[ze,Fe,Re,Ye,Be]),n.swipeLeft&&(m=n.swipeLeft.call(Xe,t,ze,Fe,Re,Ye,Be));break;case i:Xe.trigger("swipeRight",[ze,Fe,Re,Ye,Be]),n.swipeRight&&(m=n.swipeRight.call(Xe,t,ze,Fe,Re,Ye,Be));break;case o:Xe.trigger("swipeUp",[ze,Fe,Re,Ye,Be]),n.swipeUp&&(m=n.swipeUp.call(Xe,t,ze,Fe,Re,Ye,Be));break;case a:Xe.trigger("swipeDown",[ze,Fe,Re,Ye,Be]),n.swipeDown&&(m=n.swipeDown.call(Xe,t,ze,Fe,Re,Ye,Be))}}}if(c==p){if(Xe.trigger("pinchStatus",[s,Ue||null,qe||0,Re||0,Ye,Ve,Be]),n.pinchStatus&&(m=n.pinchStatus.call(Xe,t,s,Ue||null,qe||0,Re||0,Ye,Ve,Be),m===!1))return!1;if(s==E&&U())switch(Ue){case l:Xe.trigger("pinchIn",[Ue||null,qe||0,Re||0,Ye,Ve,Be]),n.pinchIn&&(m=n.pinchIn.call(Xe,t,Ue||null,qe||0,Re||0,Ye,Ve,Be));break;case u:Xe.trigger("pinchOut",[Ue||null,qe||0,Re||0,Ye,Ve,Be]),n.pinchOut&&(m=n.pinchOut.call(Xe,t,Ue||null,qe||0,Re||0,Ye,Ve,Be))}}return c==f?(s===O||s===E)&&(clearTimeout(Je),clearTimeout(et),K()&&!ee()?($e=Le(),Je=setTimeout(e.proxy(function(){$e=null,Xe.trigger("tap",[t.target]),n.tap&&(m=n.tap.call(Xe,t,t.target))},this),n.doubleTapThreshold)):($e=null,Xe.trigger("tap",[t.target]),n.tap&&(m=n.tap.call(Xe,t,t.target)))):c==h?(s===O||s===E)&&(clearTimeout(Je),$e=null,Xe.trigger("doubletap",[t.target]),n.doubleTap&&(m=n.doubleTap.call(Xe,t,t.target))):c==g&&(s===O||s===E)&&(clearTimeout(Je),$e=null,Xe.trigger("longtap",[t.target]),n.longTap&&(m=n.longTap.call(Xe,t,t.target))),m}function R(){var e=!0;return null!==n.threshold&&(e=Fe>=n.threshold),e}function _(){var e=!1;return null!==n.cancelThreshold&&null!==ze&&(e=me(ze)-Fe>=n.cancelThreshold),e}function j(){return null!==n.pinchThreshold?qe>=n.pinchThreshold:!0}function V(){var e;return e=n.maxTimeThreshold&&Re>=n.maxTimeThreshold?!1:!0}function q(e,t){if(n.allowPageScroll===s||H())e.preventDefault();else{var l=n.allowPageScroll===c;switch(t){case r:(n.swipeLeft&&l||!l&&n.allowPageScroll!=m)&&e.preventDefault();break;case i:(n.swipeRight&&l||!l&&n.allowPageScroll!=m)&&e.preventDefault();break;case o:(n.swipeUp&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case a:(n.swipeDown&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault()}}}function U(){var e=W(),t=Z(),n=j();return e&&t&&n}function H(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function X(){return!(!U()||!H())}function Q(){var e=V(),t=R(),n=W(),r=Z(),i=_(),o=!i&&r&&n&&t&&e;return o}function Y(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function B(){return!(!Q()||!Y())}function W(){return Ye===n.fingers||n.fingers===b||!A}function Z(){return 0!==Be[0].end.x}function G(){return!!n.tap}function K(){return!!n.doubleTap}function $(){return!!n.longTap}function J(){if(null==$e)return!1;var e=Le();return K()&&e-$e<=n.doubleTapThreshold}function ee(){return J()}function te(){return(1===Ye||!A)&&(isNaN(Fe)||Fe<n.threshold)}function ne(){return Re>n.longTapThreshold&&w>Fe}function re(){return!(!te()||!G())}function ie(){return!(!J()||!K())}function oe(){return!(!ne()||!$())}function ae(){Ge=Le(),Ke=event.touches.length+1}function le(){Ge=0,Ke=0}function ue(){var e=!1;if(Ge){var t=Le()-Ge;t<=n.fingerReleaseThreshold&&(e=!0)}return e}function se(){return!(Xe.data(k+"_intouch")!==!0)}function ce(e){e===!0?(Xe.bind(Ne,C),Xe.bind(Ie,M),Pe&&Xe.bind(Pe,I)):(Xe.unbind(Ne,C,!1),Xe.unbind(Ie,M,!1),Pe&&Xe.unbind(Pe,I,!1)),Xe.data(k+"_intouch",e===!0)}function de(e,t){var n=void 0!==t.identifier?t.identifier:0;return Be[e].identifier=n,Be[e].start.x=Be[e].end.x=t.pageX||t.clientX,Be[e].start.y=Be[e].end.y=t.pageY||t.clientY,Be[e]}function pe(e){var t=void 0!==e.identifier?e.identifier:0,n=fe(t);return n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function fe(e){for(var t=0;t<Be.length;t++)if(Be[t].identifier==e)return Be[t]}function he(){for(var e=[],t=0;5>=t;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}function ge(e,t){t=Math.max(t,me(e)),He[e].distance=t}function me(e){return He[e]?He[e].distance:void 0}function ve(){var e={};return e[r]=be(r),e[i]=be(i),e[o]=be(o),e[a]=be(a),e}function be(e){return{direction:e,distance:0}}function we(){return Ze-We}function ye(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function Te(e,t){var n=t/e*1;return n.toFixed(2)}function Ee(){return 1>Ve?u:l}function Oe(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function Ae(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function xe(e,t){var n=Ae(e,t);return 45>=n&&n>=0?r:360>=n&&n>=315?r:n>=135&&225>=n?i:n>45&&135>n?a:o}function Le(){var e=new Date;return e.getTime()}function ke(t){t=e(t);var n=t.offset(),r={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return r}function Se(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}var Ce=A||L||!n.fallbackToMouseEvents,Me=Ce?L?x?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Ne=Ce?L?x?"MSPointerMove":"pointermove":"touchmove":"mousemove",Ie=Ce?L?x?"MSPointerUp":"pointerup":"touchend":"mouseup",Pe=Ce?null:"mouseleave",De=L?x?"MSPointerCancel":"pointercancel":"touchcancel",Fe=0,ze=null,Re=0,_e=0,je=0,Ve=1,qe=0,Ue=0,He=null,Xe=e(t),Qe="start",Ye=0,Be=null,We=0,Ze=0,Ge=0,Ke=0,$e=0,Je=null,et=null;try{Xe.bind(Me,S),Xe.bind(De,N)}catch(t){e.error("events not supported "+Me+","+De+" on jQuery.swipe")}this.enable=function(){return Xe.bind(Me,S),Xe.bind(De,N),Xe},this.disable=function(){return P(),Xe},this.destroy=function(){return P(),Xe.data(k,null),Xe},this.option=function(t,r){if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else e.error("Option "+t+" does not exist on jQuery.swipe.options");return null}}var r="left",i="right",o="up",a="down",l="in",u="out",s="none",c="auto",d="swipe",p="pinch",f="tap",h="doubletap",g="longtap",m="horizontal",v="vertical",b="all",w=10,y="start",T="move",E="end",O="cancel",A="ontouchstart"in window,x=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,L=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,k="TouchSwipe",S={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(n){var r=e(this),i=r.data(k);if(i&&"string"==typeof n){if(i[n])return i[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(i||"object"!=typeof n&&n))return t.apply(this,arguments);return r},e.fn.swipe.defaults=S,e.fn.swipe.phases={PHASE_START:y,PHASE_MOVE:T,PHASE_END:E,PHASE_CANCEL:O},e.fn.swipe.directions={LEFT:r,RIGHT:i,UP:o,DOWN:a,IN:l,OUT:u},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:m,VERTICAL:v,AUTO:c},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:b}}),function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(e){var t={init:function(){var t=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each(function(){function n(){for(var e=0;e<t.length;e++)a.css(t[e],o.css(t[e]))}function r(){var e=o.val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&").replace(/\n/g,"<br/>");a.html(e+"&nbsp;"),i()}function i(){var e=a.height(),t="hidden",n=l?e+c+u:e+c;n>p?(n=p,t="auto"):d>n&&(n=d),o.height()!==n&&o.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var o=e(this).css({resize:"none",overflow:"hidden"}),a=e("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);n();var l="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")||"border-box"==o.css("-webkit-box-sizing"),u=parseInt(o.css("border-top-width"))+parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"))+parseInt(o.css("border-bottom-width")),s=parseInt(o.css("height"),10),c=parseInt(o.css("line-height"),10)||parseInt(o.css("font-size"),10),d=2*c>s?2*c:s,p=parseInt(o.css("max-height"),10)>-1?parseInt(o.css("max-height"),10):Number.MAX_VALUE;o.bind("keyup change cut paste",function(){r()}),e(window).bind("resize",function(){var e=parseInt(o.width(),10);a.width()!==e&&(a.css({width:e+"px"}),r())}),o.bind("blur",function(){i()}),o.bind("updateHeight",function(){n(),r()}),e(function(){r()})})}};e.fn.flexible=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery),function(e,t,n,r){"use strict";function i(e,t){for(var n=0,r=e.length;r>n;n++)g(e[n],t)}function o(e){for(var t,n=0,r=e.length;r>n;n++)t=e[n],E(t,_[l(t)])}function a(e){return function(t){ne(t)&&(g(t,e),i(t.querySelectorAll(j),e))}}function l(e){var t=e.getAttribute("is"),n=e.nodeName.toUpperCase(),r=q.call(R,t?D+t.toUpperCase():P+n);return t&&r>-1&&!u(n,t)?-1:r}function u(e,t){return-1<j.indexOf(e+'[is="'+t+'"]')}function s(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;he&&(!i||i===t)&&t.attributeChangedCallback&&"style"!==r&&t.attributeChangedCallback(r,n===e[k]?null:e.prevValue,n===e[C]?null:e.newValue)}function c(e){var t=a(e);return function(e){m.push(t,e.target)}}function d(e){fe&&(fe=!1,e.currentTarget.removeEventListener(N,d)),i((e.target||t).querySelectorAll(j),e.detail===x?x:A),te&&h()}function p(e,t){var n=this;oe.call(n,e,t),v.call(n,{target:n})}function f(e,t){$(e,t),y?y.observe(e,ue):(pe&&(e.setAttribute=p,e[O]=w(e),e.addEventListener(I,v)),e.addEventListener(M,s)),e.createdCallback&&he&&(e.created=!0,e.createdCallback(),e.created=!1)}function h(){for(var e,t=0,n=re.length;n>t;t++)e=re[t],V.contains(e)||(re.splice(t,1),g(e,x))}function g(e,t){var n,r=l(e);r>-1&&(T(e,_[r]),r=0,t!==A||e[A]?t===x&&!e[x]&&(e[A]=!1,e[x]=!0,r=1):(e[x]=!1,e[A]=!0,r=1,te&&q.call(re,e)<0&&re.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}if(!(r in t)){var m,v,b,w,y,T,E,O="__"+r+(1e5*Math.random()>>0),A="attached",x="detached",L="extends",k="ADDITION",S="MODIFICATION",C="REMOVAL",M="DOMAttrModified",N="DOMContentLoaded",I="DOMSubtreeModified",P="<",D="=",F=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,z=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],R=[],_=[],j="",V=t.documentElement,q=R.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},U=n.prototype,H=U.hasOwnProperty,X=U.isPrototypeOf,Q=n.defineProperty,Y=n.getOwnPropertyDescriptor,B=n.getOwnPropertyNames,W=n.getPrototypeOf,Z=n.setPrototypeOf,G=!!n.__proto__,K=n.create||function e(t){return t?(e.prototype=t,new e):this},$=Z||(G?function(e,t){return e.__proto__=t,e}:B&&Y?function(){function e(e,t){for(var n,r=B(t),i=0,o=r.length;o>i;i++)n=r[i],H.call(e,n)||Q(e,n,Y(t,n))}return function(t,n){do e(t,n);while((n=W(n))&&!X.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),J=e.MutationObserver||e.WebKitMutationObserver,ee=(e.HTMLElement||e.Element||e.Node).prototype,te=!X.call(ee,V),ne=te?function(e){return 1===e.nodeType}:function(e){return X.call(ee,e)},re=te&&[],ie=ee.cloneNode,oe=ee.setAttribute,ae=ee.removeAttribute,le=t.createElement,ue=J&&{attributes:!0,characterData:!0,attributeOldValue:!0},se=J||function(){pe=!1,V.removeEventListener(M,se)},ce=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,10)},de=!1,pe=!0,fe=!0,he=!0;Z||G?(T=function(e,t){X.call(t,e)||f(e,t)},E=f):(T=function(e,t){e[O]||(e[O]=n(!0),f(e,t))},E=T),te?(pe=!1,function(){var e=Y(ee,"addEventListener"),t=e.value,n=function(e){var t=new CustomEvent(M,{bubbles:!0});t.attrName=e,t.prevValue=this.getAttribute(e),t.newValue=null,t[C]=t.attrChange=2,ae.call(this,e),this.dispatchEvent(t)},r=function(e,t){var n=this.hasAttribute(e),r=n&&this.getAttribute(e),i=new CustomEvent(M,{bubbles:!0});oe.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[S]=i.attrChange=1:i[k]=i.attrChange=0,this.dispatchEvent(i)},i=function(e){var t,n=e.currentTarget,r=n[O],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],t=new CustomEvent(M,{bubbles:!0}),t.attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[k]=t.attrChange=0:t[S]=t.attrChange=1,n.dispatchEvent(t))};e.value=function(e,o,a){e===M&&this.attributeChangedCallback&&this.setAttribute!==r&&(this[O]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",i)),t.call(this,e,o,a)},Q(ee,"addEventListener",e)}()):J||(V.addEventListener(M,se),V.setAttribute(O,1),V.removeAttribute(O),pe&&(v=function(e){var t,n,r,i=this;if(i===e.target){t=i[O],i[O]=n=w(i);for(r in n){if(!(r in t))return b(0,i,r,t[r],n[r],k);if(n[r]!==t[r])return b(1,i,r,t[r],n[r],S)}for(r in t)if(!(r in n))return b(2,i,r,t[r],n[r],C)}},b=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,s(a)},w=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;a>o;o++)t=i[o],n=t.name,"setAttribute"!==n&&(r[n]=t.value);return r})),t[r]=function(e,n){if(r=e.toUpperCase(),de||(de=!0,J?(y=function(e,t){function n(e,t){for(var n=0,r=e.length;r>n;t(e[n++]));}return new J(function(r){for(var i,o,a=0,l=r.length;l>a;a++)i=r[a],"childList"===i.type?(n(i.addedNodes,e),n(i.removedNodes,t)):(o=i.target,he&&o.attributeChangedCallback&&"style"!==i.attributeName&&o.attributeChangedCallback(i.attributeName,i.oldValue,o.getAttribute(i.attributeName)))})}(a(A),a(x)),y.observe(t,{childList:!0,subtree:!0})):(m=[],ce(function e(){for(;m.length;)m.shift().call(null,m.shift());ce(e)}),t.addEventListener("DOMNodeInserted",c(A)),t.addEventListener("DOMNodeRemoved",c(x))),t.addEventListener(N,d),t.addEventListener("readystatechange",d),t.createElement=function(e,n){var r=le.apply(t,arguments),i=""+e,o=q.call(R,(n?D:P)+(n||i).toUpperCase()),a=o>-1;return n&&(r.setAttribute("is",n=n.toLowerCase()),a&&(a=u(i.toUpperCase(),n))),he=!t.createElement.innerHTMLHelper,a&&E(r,_[o]),r},ee.cloneNode=function(e){var t=ie.call(this,!!e),n=l(t);return n>-1&&E(t,_[n]),e&&o(t.querySelectorAll(j)),t}),-2<q.call(R,D+r)+q.call(R,P+r))throw new Error("A "+e+" type is already registered");if(!F.test(r)||-1<q.call(z,r))throw new Error("The type "+e+" is invalid");var r,s=function(){return f?t.createElement(h,r):t.createElement(h)},p=n||U,f=H.call(p,L),h=f?n[L].toUpperCase():r,g=R.push((f?D:P)+r)-1;return j=j.concat(j.length?",":"",f?h+'[is="'+e.toLowerCase()+'"]':h),s.prototype=_[g]=H.call(p,"prototype")?p.prototype:K(ee),i(t.querySelectorAll(j),A),s}}}(window,document,Object,"registerElement"),!function(e,t,n){"use strict";function r(){return e.performance!==n&&e.performance.now!==n?e.performance.now():Date.now()}function i(e){return.5*(1-Math.cos(Math.PI*e))}function o(e){if("object"!=typeof e||e.behavior===n||"auto"===e.behavior||"instant"===e.behavior)return!0;if("smooth"===e.behavior)return!1;throw new TypeError(e.behavior+" is not a valid value for enumeration ScrollBehavior")}function a(e,t,n){e.scrollTop=n,e.scrollLeft=t}function l(t,o){function a(){var f,h,g,m=r(),v=(m-p)/c;return v=v>1?1:v,f=i(v),h=l+(t-l)*f,g=u+(o-u)*f,d(h,g),h===t&&g===o?(l=u=p=null,e.cancelAnimationFrame(s),n):(s=e.requestAnimationFrame(a),n)}var l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,p=r();s&&e.cancelAnimationFrame(s),s=e.requestAnimationFrame(a)}function u(o,u){function d(){var t,l,u,v=r(),b=(v-m)/c;return b=b>1?1:b,t=i(b),l=p+(h-p)*t,u=f+(g-f)*t,a(o,l,u),l===h&&u===g?(p=f=m=null,e.cancelAnimationFrame(s),n):(s=e.requestAnimationFrame(d),n)}if(o===t.documentElement||o===t.body)return l(u.left,u.top),n;var p=o.scrollLeft,f=o.scrollTop,h=u.left,g=u.top,m=r();s&&e.cancelAnimationFrame(s),s=e.requestAnimationFrame(d)}if(!("scrollBehavior"in t.documentElement.style)){var s,c=768,d=e.scrollTo,p=e.scrollBy,f=e.Element.prototype.scrollIntoView;e.scroll=e.scrollTo=function(){return o(arguments[0])?d.call(e,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):l.call(e,~~arguments[0].left,~~arguments[0].top)},e.scrollBy=function(){if(o(arguments[0]))return p.call(e,arguments[0].left||arguments[0],arguments[0].top||arguments[1]);var t=e.scrollX||e.pageXOffset,n=e.scrollY||e.pageYOffset;return l(~~arguments[0].left+t,~~arguments[0].top+n)},Element.prototype.scrollIntoView=function(){var n,r,i,a;return o(arguments[0])?f.call(this,arguments[0]||!0):(a=e.getComputedStyle(t.body,null),r=parseInt(a.getPropertyValue("padding-left"),10),i=parseInt(a.getPropertyValue("padding-top"),10),n={top:this.offsetTop-2*i,left:this.offsetLeft-2*r},u(t.body,n))}}}(window,document); })(this);
 
 // WCF.js
-(function (window, undefined) {"use strict";function wcfEval(expression){return eval(expression)}!function(){var e=jQuery.fn.data;jQuery.fn.data=function(t){if(t)switch(typeof t){case"object":for(var i in t)if(i.match(/ID$/)){var n=t[i];delete t[i],i=i.replace(/ID$/,"-id"),t[i]=n}arguments[0]=t;break;case"string":t.match(/ID$/)&&(arguments[0]=t.replace(/ID$/,"-id"))}var a=e.apply(this,arguments);if(void 0===t)for(var i in a)i.match(/Id$/)&&(a[i.replace(/Id$/,"ID")]=a[i],delete a[i]);return a},window.console||(window.console={});for(var t=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],i=0;i<t.length;i++)"undefined"==typeof console[t[i]]&&(console[t[i]]=function(){});"undefined"==typeof console.debug&&(console.debug=function(e){console.log(e)})}(),String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;n>i;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t},window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},a={};n.browser&&(a[n.browser]=!0,a.version=n.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,a),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,function(e){return t!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e=0,t=this.get(0);if(document.selection){this.focus();var i=document.selection.createRange();i.moveStart("character",-this.val().length),e=i.text.length}else(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart));return e},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t=this.get(0);if(this.focus(),document.selection){var i=document.selection.createRange();i.moveStart("character",e),i.moveEnd("character",0),i.select()}else(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e);return!0},wcfDropIn:function(e,t,i){return e||(e="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e||(e="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(e){var t=require("perfect-scrollbar");return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var i=e;$(this).data("psID")||t.initialize(this,i)}else{var n=e;"update"===n?t.update(this):"destroy"===n&&t.destroy(this)}return jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};i=i.split(";");for(var n=0,a=i.length;a>n;n++){var s=$.trim(i[n]);""!=s&&(s=s.split(":"),t[$.trim(s[0])]=$.trim(s[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,a=i.length;a>n;n++){var s=i[n];t[s]?e.css(s,t[s]):e.css(s,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),a=[],s=0;s<n.length;s+=i){for(var o=n.slice(s,s+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);a.push(c)}return new Blob(a,{type:t})},convertLegacyURL:function(e){return URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",a=0,s=i.length;s>a;a++){var o=i[a].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.remove(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e){window.bc_wcfSimpleDropdown._toggle(null,e)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)),window.addEventListener("scroll",this.closeAll.bind(this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n,n},open:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].open(),!0):!1},close:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].close(),!0):!1},closeAll:function(){$.each(this._dropdownMenus,function(e,t){t.close()})}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var a=null;if(n.staticDropdown===!0)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()});var s=$('<div class="interactiveDropdownHeader" />').appendTo(this._container);$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(s),this._linkList=$('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo(s),a=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(a),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)}this._pointer=$('<span class="elementPointer"><span /></span>').appendTo(this._container),require(["Environment"],function(e){"desktop"!==e.platform()&&null!==a&&a.perfectScrollbar({suppressScrollX:!0})}),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){window.matchMedia("(max-width: 767px)").matches?this._container.css({bottom:"",left:"",right:"",top:elById("pageHeader").clientHeight+"px"}):require(["Ui/Alignment"],function(e){e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0})}.bind(this))},rebuildScrollbar:function(){require(["Environment"],function(e){if("desktop"!==e.platform()){var t=this._itemList.parent();t.perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0})}}.bind(this))}}),WCF.Clipboard={init:function(e,t,i,n){require(["WoltLab/WCF/Controller/Clipboard"],function(i){i.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n})})},reload:function(){require(["WoltLab/WCF/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){return $.isFunction(e)?(this._callback=e,this._interval=t,void this.resume()):void console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,e=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php/AJAXProxy/?t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},e),"jsonp"===e.dataType?require(["AjaxJsonp"],function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})}):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(){},_success:function(){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsDeleteButton",this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i=$(t),n=i.wcfIdentify();if(!WCF.inArray(n,this._containers)){var a=i.find(this._buttonSelector);a.length&&(this._containers.push(n),a.click($.proxy(this._click,this)))}}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);if(WCF.inArray(n.data("objectID"),e)){var a=this;i.wcfBlindOut("up",function(){var e=$(this).remove();a._containers.splice(a._containers.indexOf(e.wcfIdentify()),1),a._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})})}}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]);if(WCF.inArray(i.find(this._buttonSelector).data("objectID"),e))if(i.has("ol").has("li").length)i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i);else{var n=this;i.wcfBlindOut("up",function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))})}}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),i=t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),t.attr("title",i)),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){return this._threshold=parseInt(e),0===this._threshold?void console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting."):($.isFunction(t)&&(this._callback=t),null===this._callback?void console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting."):(this._reference=$(i?i:window),this._target=$(n?n:document),this.start(),void this._scroll()))},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e?e:new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){var i=this._variables[t],n={key:t,value:i};e(n)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["WoltLab/WCF/Language"],function(i){i.add(e,t)})},addObject:function(e){require(["WoltLab/WCF/Language"],function(t){t.addObject(e)})},get:function(e){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:!1,_element:null,_insertedDataAfterInit:!1,_isEnabled:!1,_forceSelection:!1,_languageID:0,_list:null,_values:null,init:function(e,t,i,n){if(this._button=null,this._element=$("#"+$.wcfEscapeID(e)),this._forceSelection=t,this._values=i,this._availableLanguages=n,$.getLength(this._values))for(var a in this._values)this._values[a]=WCF.String.unescapeHTML(this._values[a]);if(this._languageID=LANGUAGE_ID,0==this._element.length)return void console.debug("[WCF.MultipleLanguageInput] element id '"+e+"' is unknown");var s=$.getLength(this._values)>0?!0:!1;this._insertedDataAfterInit=s,this._prepareElement(s),this._element.parents("form").submit($.proxy(this._submit,this)),this._didInit=!0},_prepareElement:function(e){this._element.wrap('<div class="dropdown preInput" />');var t=this._element.parent();this._button=$('<p class="button dropdownToggle"><span>'+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></p>").prependTo(t),this._list=$('<ul class="dropdownMenu"></ul>').insertAfter(this._button),this._button.addClass(this._button.nextAll("textarea").length?"dropdownCaptionTextarea":"dropdownCaption");for(var i in this._availableLanguages)$("<li><span>"+this._availableLanguages[i]+"</span></li>").data("languageID",i).click($.proxy(this._changeLanguage,this)).appendTo(this._list);this._forceSelection||($('<li class="dropdownDivider" />').appendTo(this._list),$("<li><span>"+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></li>").click($.proxy(this._disable,this)).appendTo(this._list)),WCF.Dropdown.initDropdown(this._button,e),(e||this._forceSelection)&&(this._isEnabled=!0,this._list.children("li").each($.proxy(function(e,t){var i=$(t);i.data("languageID")==this._languageID&&i.trigger("click")},this))),WCF.Dropdown.registerCallback(t.wcfIdentify(),$.proxy(this._handleAction,this))},_handleAction:function(e,t){"open"===t?this._enable():this._closeSelection()},_enable:function(){if(!this._isEnabled){var e=this._button.is("p")?this._button.children("span:eq(0)"):this._button;e.addClass("active"),this._isEnabled=!0}this._list.is(":visible")&&this._showSelection()},_showSelection:function(){this._isEnabled&&this._list.children("li").each($.proxy(function(e,t){var i=$(t),n=i.data("languageID");n&&(this._values[n]&&""!=this._values[n]?i.removeClass("missingValue"):i.addClass("missingValue"))},this))},_closeSelection:function(){this._disable()},_changeLanguage:function(e){var t=$(e.currentTarget);this._insertedDataAfterInit=!0,this._didInit&&(this._values[this._languageID]=this._element.val()),this._languageID=t.data("languageID"),this._element.val(this._values[this._languageID]?this._values[this._languageID]:""),this._list.children("li").removeClass("active"),t.addClass("active"),this._button.children("span").addClass("active").text(this._availableLanguages[this._languageID]),this._didInit&&this._element.blur().focus()},_disable:function(e){void 0===e&&this._insertedDataAfterInit&&(e=null),!this._forceSelection&&this._list&&null!==e&&(this._button.children("span").removeClass("active").text(WCF.Language.get("wcf.global.button.disabledI18n")),this._values[LANGUAGE_ID]?this._element.val(this._values[LANGUAGE_ID]):this._element.val(),e&&(this._list.children("li").removeClass("active"),$(e.currentTarget).addClass("active")),this._element.blur().focus(),this._insertedDataAfterInit=!1,this._isEnabled=!1,this._values={})},_submit:function(){if(!this._isEnabled)return 3735928559;this._languageID&&(this._values[this._languageID]=this._element.val());var e=$(this._element.parents("form")[0]),t=this._element.wcfIdentify();for(var i in this._availableLanguages)void 0===this._values[i]&&(this._values[i]=""),$('<input type="hidden" name="'+t+"_i18n["+i+']" value="'+WCF.String.escapeHTML(this._values[i])+'" />').appendTo(e);this._element.removeAttr("name")}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){e=String(WCF.Number.round(e,t||2));var i=e.split(".");return e=this.addThousandsSeparator(i[0]),i.length>1&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={_containers:{},_didInit:!1,init:function(){return void require(["WoltLab/WCF/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this._containers={},this.init()},_selectErroneousTab:function(){var e=!1;for(var t in this._containers){var i=this._containers[t];if(i.find(".formError").length&&(e=!0,!i.data("isParent"))){for(;;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}if(e)for(var t in this._containers){var i=this._containers[t],n=i.find(".formError:eq(0)");if(n.length){for(i.wcfTabs("selectTab",n.parents(".tabMenuContent").wcfIdentify());;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}return!1},_selectActiveTab:function(){for(var e in this._containers){var t=this._containers[e];if(t.data("active")){var i=t.data("active"),n=null;if(/-/.test(i)){var a=i.split("-");i=a[0],n=a[1]}t.find(".tabMenuContent").each(function(e,a){var s=$(a);return s.wcfIdentify()==i?(t.wcfTabs("select",e),null!==n&&(s.hasClass("tabMenuContainer")?s.wcfTabs("selectTab",t.data("active")):t.wcfTabs("selectTab",t.data("active"))),!1):void 0})}}},selectTabs:function(){if(location.hash){var e=location.hash.substr(1),t=$("#"+$.wcfEscapeID(e));if(1===t.length&&t.hasClass("ui-tabs-panel")&&(t=t.parent(".ui-tabs"),t.length))return t.wcfTabs("selectTab",e),t.hasClass("ui-tabs-panel")&&(e=t.wcfIdentify(),t=t.parent(".ui-tabs"),t.length&&t.wcfTabs("selectTab",e)),!0}return!1}},WCF.Template=Class.extend({init:function(e){var t=new WCF.Dictionary,i=0;e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n"),e=e.replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var i="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return t.add(i,e.replace(/\{\/?literal\}/g,"")),i},this)),e=e.replace(/\{\*.*?\*\}/g,"");var n=function(e){for(var t=e.split(""),i={},n=!0,a="",s="",o=!1,r=!1,l=!1,c=0,u=t.length;u>c;c++){var h=t[c];n&&"="!=h&&" "!=h?a+=h:n&&"="==h?(n=!1,r=!1,o=!1,l=!1):n||r||o||" "!=h?n||!r||l||"'"!=h?n||r||o||"'"!=h?n||!o||l||'"'!=h?n||r||o||'"'!=h?n||!o&&!r||l||"\\"!=h?n||(l=!1,s+=h):(l=!0,s+=h):(o=!0,s+=h):(o=!1,s+=h):(r=!0,s+=h):(r=!1,s+=h):(n=!0,i[a]=s,s=a="")}if(i[a]=s,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i},a=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")};e=e.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.escapeHTML("+t+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.formatNumeric("+t+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + "+t+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=n(t);if("undefined"==typeof i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\nif ("+t+") {\n        $output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\n}\nelse if ("+t+") {\n       $output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var a=n(t);if("undefined"==typeof a.from)throw new Error("Missing from attribute in implode-tag");if("undefined"==typeof a.item)throw new Error("Missing item attribute in implode-tag");return"undefined"==typeof a.glue&&(a.glue="', '"),a.from=a.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+i+" = false;\nfor ($implodeKey_"+i+" in "+a.from+") {\n      v["+a.item+"] = "+a.from+"[$implodeKey_"+i+"];\n"+("undefined"!=typeof a.key?"          v["+a.key+"] = $implodeKey_"+i+";\n":"")+"      if ($implode_"+i+") $output += "+a.glue+";\n    $implode_"+i+" = true;\n        $output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var a=n(t);if("undefined"==typeof a.from)throw new Error("Missing from attribute in foreach-tag");if("undefined"==typeof a.item)throw new Error("Missing item attribute in foreach-tag");return a.from=a.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+i+" = false;\nfor ($foreachKey_"+i+" in "+a.from+") {\n     $foreach_"+i+" = true;\n        break;\n}\nif ($foreach_"+i+") {\n      for ($foreachKey_"+i+" in "+a.from+") {\n               v["+a.item+"] = "+a.from+"[$foreachKey_"+i+"];\n"+("undefined"!=typeof a.key?"          v["+a.key+"] = $foreachKey_"+i+";\n":"")+"              $output += '"}).replace(/\{foreachelse\}/g,"';\n        }\n}\nelse {\n  {\n             $output += '").replace(/\{\/foreach\}/g,"';\n   }\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n       $output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '");for(var s in WCF.Template.callbacks)e=WCF.Template.callbacks[s](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),t.each(function(t){e=e.replace(t.key,t.value)}),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;t>e;e++){var i=this._showItems[e];$("#"+i).show()}for(var e=0,t=this._hideItems.length;t>e;e++){var i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e),i=t.data("isOpen");i||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer")));
+(function (window, undefined) {"use strict";function wcfEval(expression){return eval(expression)}!function(){var e=jQuery.fn.data;jQuery.fn.data=function(t){if(t)switch(typeof t){case"object":for(var i in t)if(i.match(/ID$/)){var n=t[i];delete t[i],i=i.replace(/ID$/,"-id"),t[i]=n}arguments[0]=t;break;case"string":t.match(/ID$/)&&(arguments[0]=t.replace(/ID$/,"-id"))}var a=e.apply(this,arguments);if(void 0===t)for(var i in a)i.match(/Id$/)&&(a[i.replace(/Id$/,"ID")]=a[i],delete a[i]);return a},window.console||(window.console={});for(var t=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],i=0;i<t.length;i++)"undefined"==typeof console[t[i]]&&(console[t[i]]=function(){});"undefined"==typeof console.debug&&(console.debug=function(e){console.log(e)})}(),String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;n>i;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t},window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},a={};n.browser&&(a[n.browser]=!0,a.version=n.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,a),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,function(e){return t!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e=0,t=this.get(0);if(document.selection){this.focus();var i=document.selection.createRange();i.moveStart("character",-this.val().length),e=i.text.length}else(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart));return e},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t=this.get(0);if(this.focus(),document.selection){var i=document.selection.createRange();i.moveStart("character",e),i.moveEnd("character",0),i.select()}else(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e);return!0},wcfDropIn:function(e,t,i){return e||(e="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e||(e="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(e){var t=require("perfect-scrollbar");return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var i=e;$(this).data("psID")||t.initialize(this,i)}else{var n=e;"update"===n?t.update(this):"destroy"===n&&t.destroy(this)}return jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};i=i.split(";");for(var n=0,a=i.length;a>n;n++){var s=$.trim(i[n]);""!=s&&(s=s.split(":"),t[$.trim(s[0])]=$.trim(s[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,a=i.length;a>n;n++){var s=i[n];t[s]?e.css(s,t[s]):e.css(s,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),a=[],s=0;s<n.length;s+=i){for(var o=n.slice(s,s+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);a.push(c)}return new Blob(a,{type:t})},convertLegacyURL:function(e){return URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",a=0,s=i.length;s>a;a++){var o=i[a].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.remove(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e){window.bc_wcfSimpleDropdown._toggle(null,e)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)),window.addEventListener("scroll",this.closeAll.bind(this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n,n},open:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].open(),!0):!1},close:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].close(),!0):!1},closeAll:function(){$.each(this._dropdownMenus,function(e,t){t.close()})}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var a=null;if(n.staticDropdown===!0)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()});var s=$('<div class="interactiveDropdownHeader" />').appendTo(this._container);$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(s),this._linkList=$('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo(s),a=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(a),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)}this._pointer=$('<span class="elementPointer"><span /></span>').appendTo(this._container),require(["Environment"],function(e){"desktop"!==e.platform()&&null!==a&&a.perfectScrollbar({suppressScrollX:!0})}),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){window.matchMedia("(max-width: 767px)").matches?this._container.css({bottom:"",left:"",right:"",top:elById("pageHeader").clientHeight+"px"}):require(["Ui/Alignment"],function(e){e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0})}.bind(this))},rebuildScrollbar:function(){require(["Environment"],function(e){if("desktop"!==e.platform()){var t=this._itemList.parent();t.perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0})}}.bind(this))}}),WCF.Clipboard={init:function(e,t,i,n){require(["WoltLab/WCF/Controller/Clipboard"],function(i){i.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n})})},reload:function(){require(["WoltLab/WCF/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){return $.isFunction(e)?(this._callback=e,this._interval=t,void this.resume()):void console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,e=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php/AJAXProxy/?t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},e),"jsonp"===e.dataType?require(["AjaxJsonp"],function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})}):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(){},_success:function(){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsDeleteButton",this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i=$(t),n=i.wcfIdentify();if(!WCF.inArray(n,this._containers)){var a=i.find(this._buttonSelector);a.length&&(this._containers.push(n),a.click($.proxy(this._click,this)))}}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data(t.data("confirmMessageHtml")?"confirmMessageHtml":"confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,t.data("confirmMessageHtml")?!0:!1):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);if(WCF.inArray(n.data("objectID"),e)){var a=this;i.wcfBlindOut("up",function(){var e=$(this).remove();a._containers.splice(a._containers.indexOf(e.wcfIdentify()),1),a._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})})}}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]);if(WCF.inArray(i.find(this._buttonSelector).data("objectID"),e))if(i.has("ol").has("li").length)i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i);else{var n=this;i.wcfBlindOut("up",function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))})}}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data(t.data("confirmMessageHtml")?"confirmMessageHtml":"confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,t.data("confirmMessageHtml")?!0:!1):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),i=t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),t.attr("title",i)),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){return this._threshold=parseInt(e),0===this._threshold?void console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting."):($.isFunction(t)&&(this._callback=t),null===this._callback?void console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting."):(this._reference=$(i?i:window),this._target=$(n?n:document),this.start(),void this._scroll()))},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e?e:new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){var i=this._variables[t],n={key:t,value:i};e(n)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["WoltLab/WCF/Language"],function(i){i.add(e,t)})},addObject:function(e){require(["WoltLab/WCF/Language"],function(t){t.addObject(e)})},get:function(e){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:!1,_element:null,_insertedDataAfterInit:!1,_isEnabled:!1,_forceSelection:!1,_languageID:0,_list:null,_values:null,init:function(e,t,i,n){if(this._button=null,this._element=$("#"+$.wcfEscapeID(e)),this._forceSelection=t,this._values=i,this._availableLanguages=n,$.getLength(this._values))for(var a in this._values)this._values[a]=WCF.String.unescapeHTML(this._values[a]);if(this._languageID=LANGUAGE_ID,0==this._element.length)return void console.debug("[WCF.MultipleLanguageInput] element id '"+e+"' is unknown");var s=$.getLength(this._values)>0?!0:!1;this._insertedDataAfterInit=s,this._prepareElement(s),this._element.parents("form").submit($.proxy(this._submit,this)),this._didInit=!0},_prepareElement:function(e){this._element.wrap('<div class="dropdown preInput" />');var t=this._element.parent();this._button=$('<p class="button dropdownToggle"><span>'+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></p>").prependTo(t),this._list=$('<ul class="dropdownMenu"></ul>').insertAfter(this._button),this._button.addClass(this._button.nextAll("textarea").length?"dropdownCaptionTextarea":"dropdownCaption");for(var i in this._availableLanguages)$("<li><span>"+this._availableLanguages[i]+"</span></li>").data("languageID",i).click($.proxy(this._changeLanguage,this)).appendTo(this._list);this._forceSelection||($('<li class="dropdownDivider" />').appendTo(this._list),$("<li><span>"+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></li>").click($.proxy(this._disable,this)).appendTo(this._list)),WCF.Dropdown.initDropdown(this._button,e),(e||this._forceSelection)&&(this._isEnabled=!0,this._list.children("li").each($.proxy(function(e,t){var i=$(t);i.data("languageID")==this._languageID&&i.trigger("click")},this))),WCF.Dropdown.registerCallback(t.wcfIdentify(),$.proxy(this._handleAction,this))},_handleAction:function(e,t){"open"===t?this._enable():this._closeSelection()},_enable:function(){if(!this._isEnabled){var e=this._button.is("p")?this._button.children("span:eq(0)"):this._button;e.addClass("active"),this._isEnabled=!0}this._list.is(":visible")&&this._showSelection()},_showSelection:function(){this._isEnabled&&this._list.children("li").each($.proxy(function(e,t){var i=$(t),n=i.data("languageID");n&&(this._values[n]&&""!=this._values[n]?i.removeClass("missingValue"):i.addClass("missingValue"))},this))},_closeSelection:function(){this._disable()},_changeLanguage:function(e){var t=$(e.currentTarget);this._insertedDataAfterInit=!0,this._didInit&&(this._values[this._languageID]=this._element.val()),this._languageID=t.data("languageID"),this._element.val(this._values[this._languageID]?this._values[this._languageID]:""),this._list.children("li").removeClass("active"),t.addClass("active"),this._button.children("span").addClass("active").text(this._availableLanguages[this._languageID]),this._didInit&&this._element.blur().focus()},_disable:function(e){void 0===e&&this._insertedDataAfterInit&&(e=null),!this._forceSelection&&this._list&&null!==e&&(this._button.children("span").removeClass("active").text(WCF.Language.get("wcf.global.button.disabledI18n")),this._values[LANGUAGE_ID]?this._element.val(this._values[LANGUAGE_ID]):this._element.val(),e&&(this._list.children("li").removeClass("active"),$(e.currentTarget).addClass("active")),this._element.blur().focus(),this._insertedDataAfterInit=!1,this._isEnabled=!1,this._values={})},_submit:function(){if(!this._isEnabled)return 3735928559;this._languageID&&(this._values[this._languageID]=this._element.val());var e=$(this._element.parents("form")[0]),t=this._element.wcfIdentify();for(var i in this._availableLanguages)void 0===this._values[i]&&(this._values[i]=""),$('<input type="hidden" name="'+t+"_i18n["+i+']" value="'+WCF.String.escapeHTML(this._values[i])+'" />').appendTo(e);this._element.removeAttr("name")}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){e=String(WCF.Number.round(e,t||2));var i=e.split(".");return e=this.addThousandsSeparator(i[0]),i.length>1&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={_containers:{},_didInit:!1,init:function(){return void require(["WoltLab/WCF/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this._containers={},this.init()},_selectErroneousTab:function(){var e=!1;for(var t in this._containers){var i=this._containers[t];if(i.find(".formError").length&&(e=!0,!i.data("isParent"))){for(;;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}if(e)for(var t in this._containers){var i=this._containers[t],n=i.find(".formError:eq(0)");if(n.length){for(i.wcfTabs("selectTab",n.parents(".tabMenuContent").wcfIdentify());;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}return!1},_selectActiveTab:function(){for(var e in this._containers){var t=this._containers[e];if(t.data("active")){var i=t.data("active"),n=null;if(/-/.test(i)){var a=i.split("-");i=a[0],n=a[1]}t.find(".tabMenuContent").each(function(e,a){var s=$(a);return s.wcfIdentify()==i?(t.wcfTabs("select",e),null!==n&&(s.hasClass("tabMenuContainer")?s.wcfTabs("selectTab",t.data("active")):t.wcfTabs("selectTab",t.data("active"))),!1):void 0})}}},selectTabs:function(){if(location.hash){var e=location.hash.substr(1),t=$("#"+$.wcfEscapeID(e));if(1===t.length&&t.hasClass("ui-tabs-panel")&&(t=t.parent(".ui-tabs"),t.length))return t.wcfTabs("selectTab",e),t.hasClass("ui-tabs-panel")&&(e=t.wcfIdentify(),t=t.parent(".ui-tabs"),t.length&&t.wcfTabs("selectTab",e)),!0}return!1}},WCF.Template=Class.extend({init:function(e){var t=new WCF.Dictionary,i=0;e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n"),e=e.replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var i="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return t.add(i,e.replace(/\{\/?literal\}/g,"")),i},this)),e=e.replace(/\{\*.*?\*\}/g,"");var n=function(e){for(var t=e.split(""),i={},n=!0,a="",s="",o=!1,r=!1,l=!1,c=0,u=t.length;u>c;c++){var h=t[c];n&&"="!=h&&" "!=h?a+=h:n&&"="==h?(n=!1,r=!1,o=!1,l=!1):n||r||o||" "!=h?n||!r||l||"'"!=h?n||r||o||"'"!=h?n||!o||l||'"'!=h?n||r||o||'"'!=h?n||!o&&!r||l||"\\"!=h?n||(l=!1,s+=h):(l=!0,s+=h):(o=!0,s+=h):(o=!1,s+=h):(r=!0,s+=h):(r=!1,s+=h):(n=!0,i[a]=s,s=a="")}if(i[a]=s,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i},a=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")};e=e.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.escapeHTML("+t+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.formatNumeric("+t+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + "+t+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=n(t);if("undefined"==typeof i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\nif ("+t+") {\n    $output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\n}\nelse if ("+t+") {\n       $output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var a=n(t);if("undefined"==typeof a.from)throw new Error("Missing from attribute in implode-tag");if("undefined"==typeof a.item)throw new Error("Missing item attribute in implode-tag");return"undefined"==typeof a.glue&&(a.glue="', '"),a.from=a.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+i+" = false;\nfor ($implodeKey_"+i+" in "+a.from+") {\n      v["+a.item+"] = "+a.from+"[$implodeKey_"+i+"];\n"+("undefined"!=typeof a.key?"          v["+a.key+"] = $implodeKey_"+i+";\n":"")+"      if ($implode_"+i+") $output += "+a.glue+";\n    $implode_"+i+" = true;\n        $output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var a=n(t);if("undefined"==typeof a.from)throw new Error("Missing from attribute in foreach-tag");if("undefined"==typeof a.item)throw new Error("Missing item attribute in foreach-tag");return a.from=a.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+i+" = false;\nfor ($foreachKey_"+i+" in "+a.from+") {\n     $foreach_"+i+" = true;\n        break;\n}\nif ($foreach_"+i+") {\n      for ($foreachKey_"+i+" in "+a.from+") {\n               v["+a.item+"] = "+a.from+"[$foreachKey_"+i+"];\n"+("undefined"!=typeof a.key?"          v["+a.key+"] = $foreachKey_"+i+";\n":"")+"              $output += '"}).replace(/\{foreachelse\}/g,"';\n        }\n}\nelse {\n  {\n             $output += '").replace(/\{\/foreach\}/g,"';\n   }\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n       $output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '");for(var s in WCF.Template.callbacks)e=WCF.Template.callbacks[s](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),t.each(function(t){e=e.replace(t.key,t.value)}),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;t>e;e++){var i=this._showItems[e];$("#"+i).show()}for(var e=0,t=this._hideItems.length;t>e;e++){var i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t);
 
-return i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(){},_getButtonContainer:function(){},_createButton:function(e,t){var i=(this._containers[e].data("isOpen"),$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t));return i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,a=n?"open":"close",s=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:a,newState:s},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(){return{}},_updateContent:function(e,t){this._containerData[e].target.html(t)},_success:function(e){if(e.returnValues.containerID){var t=e.returnValues.containerID;if(this._containers[t]){this._containerData[t].isOpen=e.returnValues.isOpen?!0:!1;var i=e.returnValues.isOpen?"open":"close";this._updateContent(t,$.trim(e.returnValues.content),i),this._exchangeIcon(this._containerData[t].button,e.returnValues.isOpen?"chevron-down":"chevron-right")}}}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,a=n?"open":"close",s=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:a,newState:s},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===s?"chevron-down":"chevron-right"),"open"===s?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===s?!0:!1}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,a=$(document).height(),s=$(window).height();return n>a-s&&(n=a-s,0>n&&(n=0)),i===!0?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,a){return-n*((t=t/a-1)*t*t*t-1)+i}),!1}}),WCF.Effect.SmoothScroll=WCF.Effect.Scroll.extend({init:function(){var e=this;$(document).on("click","a[href$=#top],a[href$=#bottom]",function(){var t=$(this.hash);return e.scrollTo(t,!0),!1})}}),WCF.CloseOverlayHandler={addCallback:function(e,t){require(["Ui/CloseOverlay"],function(i){i.add(e,t)})},removeCallback:function(e){require(["Ui/CloseOverlay"],function(t){t.remove(e)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLab/WCF/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLab/WCF/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver){var e=new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this));e.observe(document.body,{childList:!0,subtree:!0})}else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){option=$(option);var $disableOptions=eval(option.data("disableOptions")),$enableOptions=eval(option.data("enableOptions"));switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),$disableOptions,$enableOptions);break;case"radio":if(option.prop("checked")){var isActive=!0;option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,$disableOptions,$enableOptions)}}break;case"select":var $value=option.val(),$disableOptions=$enableOptions=[];if(option.data("disableOptions").length>0)for(var $index in option.data("disableOptions")){var $item=option.data("disableOptions")[$index];$item.value==$value&&$disableOptions.push($item.option)}if(option.data("enableOptions").length>0)for(var $index in option.data("enableOptions")){var $item=option.data("enableOptions")[$index];$item.value==$value&&$enableOptions.push($item.option)}this._execute(!0,$disableOptions,$enableOptions)}},_execute:function(e,t,i){if(t.length>0)for(var n=0,a=t.length;a>n;n++){var s=t[n];if($.wcfIsset(s))this._enableOption(s,!e);else{var o=$("."+s+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}}if(i.length>0)for(var n=0,a=i.length;a>n;n++){var s=i[n];if($.wcfIsset(s))this._enableOption(s,e);else{var o=$("."+s+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){e=$(e);var i=e.getTagName();"select"==i||"input"==i&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))?t?e.enable():e.disable():t?e.removeAttr("readonly"):e.attr("readonly",!0),t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;n>i;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;"undefined"!=typeof document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):"undefined"!=typeof document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,messageType:"info",refreshPage:!1,updatePageNumber:!1},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find("table tr."+this._rowClassName).length},_handleEmptyTable:function(){if(this._options.emptyMessage)this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage));else if(this._options.refreshPage)if(this._options.updatePageNumber){var e=window.location.href.match(/(\?|&)pageNo=(\d+)/g);if(e){var t=e[e.length-1].match(/\d+/g);this._options.updatePageNumber>0?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)}}else window.location.reload();else this._tableContainer.remove()},_remove:function(e){if($.getLength(e)){var t=$(e.target);if(t.hasClass(this._rowClassName)){var i=t.parents("tbody:eq(0)");1==i.children("tr").length&&this._handleEmptyTable()}}else this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,a){return null===t||void 0===t||$.isFunction(t)?(this._callback=t?t:null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=n?!0:!1,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:a!==!0?!1:!0,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),void WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):void console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):void console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter(function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()},250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():(t.data("preventSubmit")||-1!==this._itemIndex)&&e.preventDefault()}},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){var i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};if(this._delay){null!==this._timer&&this._timer.stop();var n=this;this._timer=new WCF.PeriodicalExecuter(function(){n._queryServer(i),n._timer.stop(),n._timer=null},this._delay)}else this._queryServer(i)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(){return 0===this._itemCount?!0:(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){var i=e.keyCode||e.which;if(i==$.ui.keyCode.COMMA)return"";for(var n=t.split(","),a=n.length,s=0;a>s;s++)n[s]=$.trim(n[s]);for(var s=0;a>s;s++){var o=n[s];if(!this._oldSearchString[s]){t=o;break}if(o!=this._oldSearchString[s]){t=o,this._caretAt=s;break}}this._oldSearchString=n}return t},_getParameters:function(e){return e},_success:function(e){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var n=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(n).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(n),this._itemIndex=-1,WCF.Dropdown.getDropdown(n).data("disableAutoFocus")||this._selectNextItem()},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t=!1,i=$(e.currentTarget);if(this._commaSeperated){var n=i.data("label");this._oldSearchString[this._caretAt]=n,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"});var a=this._searchInput.val().toLowerCase().indexOf(n.toLowerCase())+n.length;this._searchInput.focus().setCaret(a)}else null===this._callback?this._searchInput.val(i.data("label")):t=this._callback(i.data())===!0?!0:!1;this._clearList(t)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,a){this._includeUserGroups=i,this._super(e,t,n,a)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t=this._super(e),i=null;if(e.icon?i=$(e.icon):this._includeUserGroups&&"group"===e.type&&(i=$('<span class="icon icon16 fa-users" />')),i){var n=t.find("span").detach(),a=$("<div />").addClass("box16").appendTo(t);a.append(i),a.append($("<div />").append(n))}return t.data("type",e.type),t}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){return $.isFunction(t)?void(WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t))):void console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){return $.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),void this._setupCallbacks[e].push(t)):void console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;i>t;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(var t=0,i=this._callbacks[e].length;i>t;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.register(e)})},rebuild:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.rebuild(e)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_captchas:{},addCallback:function(e,t){return $.isFunction(t)?void(this._captchas[e]=t):void console.debug("[WCF.System.Captcha] Given callback is no function")},getData:function(e){return void 0===this._captchas[e]?void console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"'):this._captchas[e]()},removeCallback:function(e){delete this._captchas[e]}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(e,t,i,n){require(["Ui/Notification"],function(t){t.show(i||this._message,e,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(e,t,i,n){require(["Ui/Confirmation"],function(a){a.show({legacyCallback:t,message:e,parameters:i,template:"object"==typeof n?n.html():""})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var e=$("meta[name=viewport]");this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen?!0:!1}},WCF.System.PageNavigation={init:function(e,t){require(["WoltLab/WCF/Ui/Page/JumpTo"],function(i){for(var n=elBySelAll(e),a=0,s=n.length;s>a;a++)i.init(n[a],t)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,a){this._aborted=!1,this._actionName=e,this._callback=a||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){if(null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100){var t=e.returnValues.parameters||{};t.loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()}else if(null!==this._callback)this._callback(this,e);else{this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed"));var i=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click(function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()}),this._dialog.wcfDialog("render")}}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],init:function(e){var t=$(e);if(t.length){this._setOptions();for(var i="",n=0,a=this._options.length;a>n;n++)if(this._options[n].isQuickOption){i=this._options[n].optionName;break}var s=this;t.each(function(e,t){var n=$(t),a=n.wcfIdentify(),o=s._getTriggerElement(n);null!==o&&1===o.length&&(o.on(WCF_CLICK_EVENT,$.proxy(s._show,s)).data("elementID",a),i&&o.disableSelection().data("optionName",i).dblclick($.proxy(s._click,s)),s._elements[a]=n)}),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(){return null},_show:function(e){e.preventDefault();var t=$(e.currentTarget).data("elementID"),i=null;if(!this._dropdowns[t]){this._triggerElements[t]=i=this._getTriggerElement(this._elements[t]).addClass("dropdownToggle");var n=i[0].parentNode;n&&"LI"===n.nodeName&&1===n.childElementCount?n.classList.add("dropdown"):i.wrap('<span class="dropdown" />'),this._dropdowns[t]=$('<ul class="dropdownMenu" />').insertAfter(i)}this._dropdowns[t].empty();for(var a=!1,s="",o=0,r=this._options.length;r>o;o++){var l=this._options[o];if("divider"===l.optionName)""!==s&&"divider"!==s&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[t]),s=l.optionName);else if(this._validate(t,l.optionName)||this._validateCallbacks(t,l.optionName)){var c=$("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[t]);c.data("elementID",t).data("optionName",l.optionName).data("isQuickOption",l.isQuickOption?!0:!1).click($.proxy(this._click,this)),a=!0,s=l.optionName}}if(a){var u=this._dropdowns[t].children().last();u.hasClass("dropdownDivider")&&u.remove();var h=null,d=0;if(this._dropdowns[t].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?h=i:d++)}),!d)return h.trigger("click"),this._triggerElements[t]&&WCF.Dropdown.close(this._triggerElements[t].parents(".dropdown").wcfIdentify()),!1}return null!==i&&WCF.Dropdown.initDropdown(i,!0),!1},_validate:function(){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e){var t=this._updateData.length;t&&(this._updateState(e),this._updateData=[])},_updateState:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(){return!1},_executeCallback:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].execute(this._elements[e],t))return!0;return!1},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php/AJAXUpload/?t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url);var a=new XMLHttpRequest;this._supportsAJAXUpload=a&&"upload"in a&&"onprogress"in a.upload,this._createButton()},_createButton:function(){if(this._supportsAJAXUpload){this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this));var e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.prepend(this._fileUpload)}else{var e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.click($.proxy(this._showOverlay,this))}this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i){var n=null,a=[];if(t)a.push(t);else if(i){var s="";switch(i.type){case"image/png":s=".png";break;case"image/jpeg":s=".jpg";break;case"image/gif":s=".gif"}a.push({name:"pasted-from-clipboard"+s})}else a=this._fileUpload.prop("files");if(a.length){var o=new FormData;if(n=this._createUploadMatrix(a),!this._uploadMatrix[n].length)return null;for(var r=0,l=a.length;l>r;r++)if(this._uploadMatrix[n][r]){var c=this._uploadMatrix[n][r].data("internalFileID");i?o.append("__files["+c+"]",i,a[r].name):o.append("__files["+c+"]",a[r])}o.append("actionName",this._options.action),o.append("className",this._className);var u=this._getParameters();for(var h in u)o.append("parameters["+h+"]",u[h]);var d=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:o,contentType:!1,processData:!1,success:function(e){d._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){d._progress(n,e)},!1),e}})}return n},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;n>i;i++){var a=e[i],s=this._initFile(a);s.hasClass("uploadFailed")||(s.data("filename",a.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=s)}return t}return null},_success:function(){},_error:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){
-for(var e=this._fileUpload.prop("files"),t=0,i=e.length;i>t;t++){var n=e[t],a=new FormData,s=this._createUploadMatrix(n);if(this._uploadMatrix[s].length){a.append("__files["+s+"]",n),a.append("actionName",this._options.action),a.append("className",this._className);var o=this._getParameters();for(var r in o)a.append("parameters["+r+"]",o[r]);this._sendRequest(s,a)}}},_sendRequest:function(e,t){var i=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",function(t){i._progress(e,t)},!1),t}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,a,s){this._additionalParameters=s||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i?i:0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{});var o=$("#"+this._containerID+" .sortableList");if(o.is("tbody")&&"clone"===this._options.helper){this._options.helper=this._tableRowHelper.bind(this);var r=o.prev("thead");r&&r.find("th").each(function(e,t){t=$(t),t.width(t.width())})}if(a?o.sortable(this._options):o.nestedSortable(this._options),this._className){var l=this._container.find(".formSubmit");if(!l.length&&(l=this._container.next(".formSubmit"),!l.length))return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(e,t){return t.children("td").each(function(e,t){t=$(t),t.width(t.width())}),t},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy(function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy(function(e,t){var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)},this))},this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(e){var t=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(t=!0)}.bind(this)),t||(this._activeElementID="",this._identifier=e,require(["WoltLab/WCF/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){if(this._itemList=$(e),this._searchInput=$(t),this._data={},!this._itemList.length||!this._searchInput.length)return void console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.");if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)})}this._searchInput.parents(".dropdown").data("preventSubmit",!0)},_keyDown:function(e){return null===e?this._keyPress(null):!0},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t?!0:(this.addItem({objectID:0,label:t}),this._searchInput.val(e&&44===e.charCode?$.trim(this._searchInput.val().substr(this._searchInput.getCaret())):""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){var e=$.trim(this._searchInput.val());e=e.split(",");for(var t=0,i=e.length;i>t;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){if(this._data[e.objectID]&&(0!==e.objectID||!this._allowCustomInput))return!0;var t=$('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList);return t.click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(e,t,i,n,a,s){require(["WoltLab/WCF/Language/Chooser"],function(o){o.init(e,t,i,n,a,s)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){return this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1!=this._container.length?void console.debug("[WCF.UserPanel] Unable to find container identfied by '"+e+"', aborting."):void this._convert()},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e){var t=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());t.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(t),this._updateBadge(e.returnValues.totalCount),this._after(t)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(t),this._updateBadge(0))},_updateBadge:function(e){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle")),t.before(" ")),t.html(e)}else this._container.find(".badge").remove()},_after:function(){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var a=i.identify(this[0]);"close"===e?n.close(a):"render"===e?n.rebuild(a):"option"===e?3===t.length&&"title"===t[1]&&"string"==typeof t[2]&&n.setTitle(a,t[2]):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),n.openStatic(a,null,1===t.length&&"object"==typeof t[0]?t[0]:{}))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",e).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(t,i){$(i).show().css({height:e,left:(this._width+this.options.itemGap)*t,width:this._width})},this)),this.element.css({height:e,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var t=0;t<this._count;t++){var i=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList);0==t&&i.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;this._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval)}},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLab/WCF/Ui/TabMenu"],function(n,a){var s=a.getTabMenu(n.identify(t));null!==s&&s[e].apply(s,i)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLab/WCF/Ui/Pagination"],function(e){this._api=new e(this.element,{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){var t=this._trigger("shouldSwitch",void 0,{nextPage:e});return t!==!1}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){if("activePage"==e&&t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var e=this;$(".jsCategory").each(function(t,i){var n=$(i).data("parentCategoryID",null).change($.proxy(e._updateSelection,e));e._categories[n.val()]=n;var a=[];n.parents("li").find(".jsChildCategory").each(function(t,i){var s=$(i).data("parentCategoryID",n.val()).change($.proxy(e._updateSelection,e));e._categories[s.val()]=s,a.push(s.val()),s.is(":checked")&&n.prop("checked","checked")}),n.data("childCategoryIDs",a)})},_updateSelection:function(e){var t=$(e.currentTarget),i=t.data("parentCategoryID");if(t.is(":checked"))null!==i&&this._categories[i].prop("checked","checked");else if(null===i)for(var n=t.data("childCategoryIDs"),a=0,s=n.length;s>a;a++)this._categories[n[a]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){return this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2?void this._list.addClass("flexibleCategoryListDisabled"):void 0},_buildStructure:function(){var e=this;this._list.find(".jsCategory").each(function(t,i){var n=$(i).change(e._updateSelection.bind(e)),a=parseInt(n.val()),s=[];n.parents("li:eq(0)").find(".jsChildCategory").each(function(t,i){var a=$(i);a.data("parentCategory",n).change(e._updateSelection.bind(e));var o=parseInt(a.val());s.push(a);var r=[];a.parents("li:eq(0)").find(".jsSubChildCategory").each(function(t,i){var n=$(i);n.data("parentCategory",a).change(e._updateSelection.bind(e)),r.push(n)}),e._categories[o]=r}),e._categories[a]=s})},_updateSelection:function(e){var t=$(e.currentTarget),i=parseInt(t.val()),n=t.data("parentCategory");if(t.is(":checked"))n&&(n.prop("checked","checked"),n=n.data("parentCategory"),n&&n.prop("checked","checked"));else{if(this._categories[i])for(var a=0,s=this._categories[i].length;s>a;a++){var o=this._categories[i][a];o.prop("checked",!1);var r=parseInt(o.val());if(this._categories[r])for(var l=0,c=this._categories[r].length;c>l;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var u=parseInt(n.val()),a=0,s=this._categories[u].length;s>a;a++)if(this._categories[u][a].prop("checked"))return;if(n=n.data("parentCategory")){u=parseInt(n.val());for(var a=0,s=this._categories[u].length;s>a;a++)if(this._categories[u][a].prop("checked"))return}}}}}),WCF.Condition={},WCF.Notice={}; })(this);
+},this))},_initButton:function(e){var t=$(e),i=t.data("isOpen");i||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(){},_getButtonContainer:function(){},_createButton:function(e,t){var i=(this._containers[e].data("isOpen"),$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t));return i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,a=n?"open":"close",s=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:a,newState:s},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(){return{}},_updateContent:function(e,t){this._containerData[e].target.html(t)},_success:function(e){if(e.returnValues.containerID){var t=e.returnValues.containerID;if(this._containers[t]){this._containerData[t].isOpen=e.returnValues.isOpen?!0:!1;var i=e.returnValues.isOpen?"open":"close";this._updateContent(t,$.trim(e.returnValues.content),i),this._exchangeIcon(this._containerData[t].button,e.returnValues.isOpen?"chevron-down":"chevron-right")}}}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,a=n?"open":"close",s=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:a,newState:s},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===s?"chevron-down":"chevron-right"),"open"===s?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===s?!0:!1}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,a=$(document).height(),s=$(window).height();return n>a-s&&(n=a-s,0>n&&(n=0)),i===!0?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,a){return-n*((t=t/a-1)*t*t*t-1)+i}),!1}}),WCF.Effect.SmoothScroll=WCF.Effect.Scroll.extend({init:function(){var e=this;$(document).on("click","a[href$=#top],a[href$=#bottom]",function(){var t=$(this.hash);return e.scrollTo(t,!0),!1})}}),WCF.CloseOverlayHandler={addCallback:function(e,t){require(["Ui/CloseOverlay"],function(i){i.add(e,t)})},removeCallback:function(e){require(["Ui/CloseOverlay"],function(t){t.remove(e)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLab/WCF/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLab/WCF/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver){var e=new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this));e.observe(document.body,{childList:!0,subtree:!0})}else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){option=$(option);var $disableOptions=eval(option.data("disableOptions")),$enableOptions=eval(option.data("enableOptions"));switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),$disableOptions,$enableOptions);break;case"radio":if(option.prop("checked")){var isActive=!0;option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,$disableOptions,$enableOptions)}}break;case"select":var $value=option.val(),$disableOptions=$enableOptions=[];if(option.data("disableOptions").length>0)for(var $index in option.data("disableOptions")){var $item=option.data("disableOptions")[$index];$item.value==$value&&$disableOptions.push($item.option)}if(option.data("enableOptions").length>0)for(var $index in option.data("enableOptions")){var $item=option.data("enableOptions")[$index];$item.value==$value&&$enableOptions.push($item.option)}this._execute(!0,$disableOptions,$enableOptions)}},_execute:function(e,t,i){if(t.length>0)for(var n=0,a=t.length;a>n;n++){var s=t[n];if($.wcfIsset(s))this._enableOption(s,!e);else{var o=$("."+s+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}}if(i.length>0)for(var n=0,a=i.length;a>n;n++){var s=i[n];if($.wcfIsset(s))this._enableOption(s,e);else{var o=$("."+s+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){e=$(e);var i=e.getTagName();"select"==i||"input"==i&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))?t?e.enable():e.disable():t?e.removeAttr("readonly"):e.attr("readonly",!0),t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;n>i;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;"undefined"!=typeof document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):"undefined"!=typeof document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,messageType:"info",refreshPage:!1,updatePageNumber:!1},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find("table tr."+this._rowClassName).length},_handleEmptyTable:function(){if(this._options.emptyMessage)this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage));else if(this._options.refreshPage)if(this._options.updatePageNumber){var e=window.location.href.match(/(\?|&)pageNo=(\d+)/g);if(e){var t=e[e.length-1].match(/\d+/g);this._options.updatePageNumber>0?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)}}else window.location.reload();else this._tableContainer.remove()},_remove:function(e){if($.getLength(e)){var t=$(e.target);if(t.hasClass(this._rowClassName)){var i=t.parents("tbody:eq(0)");1==i.children("tr").length&&this._handleEmptyTable()}}else this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,a){return null===t||void 0===t||$.isFunction(t)?(this._callback=t?t:null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=n?!0:!1,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:a!==!0?!1:!0,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),void WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):void console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):void console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter(function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()},250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():(t.data("preventSubmit")||-1!==this._itemIndex)&&e.preventDefault()}},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){var i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};if(this._delay){null!==this._timer&&this._timer.stop();var n=this;this._timer=new WCF.PeriodicalExecuter(function(){n._queryServer(i),n._timer.stop(),n._timer=null},this._delay)}else this._queryServer(i)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(){return 0===this._itemCount?!0:(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){var i=e.keyCode||e.which;if(i==$.ui.keyCode.COMMA)return"";for(var n=t.split(","),a=n.length,s=0;a>s;s++)n[s]=$.trim(n[s]);for(var s=0;a>s;s++){var o=n[s];if(!this._oldSearchString[s]){t=o;break}if(o!=this._oldSearchString[s]){t=o,this._caretAt=s;break}}this._oldSearchString=n}return t},_getParameters:function(e){return e},_success:function(e){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var n=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(n).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(n),this._itemIndex=-1,WCF.Dropdown.getDropdown(n).data("disableAutoFocus")||this._selectNextItem()},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t=!1,i=$(e.currentTarget);if(this._commaSeperated){var n=i.data("label");this._oldSearchString[this._caretAt]=n,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"});var a=this._searchInput.val().toLowerCase().indexOf(n.toLowerCase())+n.length;this._searchInput.focus().setCaret(a)}else null===this._callback?this._searchInput.val(i.data("label")):t=this._callback(i.data())===!0?!0:!1;this._clearList(t)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,a){this._includeUserGroups=i,this._super(e,t,n,a)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t=this._super(e),i=null;if(e.icon?i=$(e.icon):this._includeUserGroups&&"group"===e.type&&(i=$('<span class="icon icon16 fa-users" />')),i){var n=t.find("span").detach(),a=$("<div />").addClass("box16").appendTo(t);a.append(i),a.append($("<div />").append(n))}return t.data("type",e.type),t}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){return $.isFunction(t)?void(WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t))):void console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){return $.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),void this._setupCallbacks[e].push(t)):void console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;i>t;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(var t=0,i=this._callbacks[e].length;i>t;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.register(e)})},rebuild:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.rebuild(e)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_captchas:{},addCallback:function(e,t){return $.isFunction(t)?void(this._captchas[e]=t):void console.debug("[WCF.System.Captcha] Given callback is no function")},getData:function(e){return void 0===this._captchas[e]?void console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"'):this._captchas[e]()},removeCallback:function(e){delete this._captchas[e]}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(e,t,i,n){require(["Ui/Notification"],function(t){t.show(i||this._message,e,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(e,t,i,n,a){if("object"==typeof n){var s=$("<div />");s.append(n),n=s.html()}require(["Ui/Confirmation"],function(s){s.show({legacyCallback:t,message:e,parameters:i,template:n||"",messageIsHtml:a===!0})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var e=$("meta[name=viewport]");this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen?!0:!1}},WCF.System.PageNavigation={init:function(e,t){require(["WoltLab/WCF/Ui/Page/JumpTo"],function(i){for(var n=elBySelAll(e),a=0,s=n.length;s>a;a++)i.init(n[a],t)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,a){this._aborted=!1,this._actionName=e,this._callback=a||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){if(null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100){var t=e.returnValues.parameters||{};t.loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()}else if(null!==this._callback)this._callback(this,e);else{this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed"));var i=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click(function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()}),this._dialog.wcfDialog("render")}}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],init:function(e){var t=$(e);if(t.length){this._setOptions();for(var i="",n=0,a=this._options.length;a>n;n++)if(this._options[n].isQuickOption){i=this._options[n].optionName;break}var s=this;t.each(function(e,t){var n=$(t),a=n.wcfIdentify(),o=s._getTriggerElement(n);null!==o&&1===o.length&&(o.on(WCF_CLICK_EVENT,$.proxy(s._show,s)).data("elementID",a),i&&o.disableSelection().data("optionName",i).dblclick($.proxy(s._click,s)),s._elements[a]=n)}),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(){return null},_show:function(e){e.preventDefault();var t=$(e.currentTarget).data("elementID"),i=null;if(!this._dropdowns[t]){this._triggerElements[t]=i=this._getTriggerElement(this._elements[t]).addClass("dropdownToggle");var n=i[0].parentNode;n&&"LI"===n.nodeName&&1===n.childElementCount?n.classList.add("dropdown"):i.wrap('<span class="dropdown" />'),this._dropdowns[t]=$('<ul class="dropdownMenu" />').insertAfter(i)}this._dropdowns[t].empty();for(var a=!1,s="",o=0,r=this._options.length;r>o;o++){var l=this._options[o];if("divider"===l.optionName)""!==s&&"divider"!==s&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[t]),s=l.optionName);else if(this._validate(t,l.optionName)||this._validateCallbacks(t,l.optionName)){var c=$("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[t]);c.data("elementID",t).data("optionName",l.optionName).data("isQuickOption",l.isQuickOption?!0:!1).click($.proxy(this._click,this)),a=!0,s=l.optionName}}if(a){var u=this._dropdowns[t].children().last();u.hasClass("dropdownDivider")&&u.remove();var h=null,d=0;if(this._dropdowns[t].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?h=i:d++)}),!d)return h.trigger("click"),this._triggerElements[t]&&WCF.Dropdown.close(this._triggerElements[t].parents(".dropdown").wcfIdentify()),!1}return null!==i&&WCF.Dropdown.initDropdown(i,!0),!1},_validate:function(){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e){var t=this._updateData.length;t&&(this._updateState(e),this._updateData=[])},_updateState:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(){return!1},_executeCallback:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].execute(this._elements[e],t))return!0;return!1},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php/AJAXUpload/?t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url);var a=new XMLHttpRequest;this._supportsAJAXUpload=a&&"upload"in a&&"onprogress"in a.upload,this._createButton()},_createButton:function(){if(this._supportsAJAXUpload){this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this));var e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.prepend(this._fileUpload)}else{var e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.click($.proxy(this._showOverlay,this))}this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i){var n=null,a=[];if(t)a.push(t);else if(i){var s="";switch(i.type){case"image/png":s=".png";break;case"image/jpeg":s=".jpg";break;case"image/gif":s=".gif"}a.push({name:"pasted-from-clipboard"+s})}else a=this._fileUpload.prop("files");if(a.length){var o=new FormData;if(n=this._createUploadMatrix(a),!this._uploadMatrix[n].length)return null;for(var r=0,l=a.length;l>r;r++)if(this._uploadMatrix[n][r]){var c=this._uploadMatrix[n][r].data("internalFileID");i?o.append("__files["+c+"]",i,a[r].name):o.append("__files["+c+"]",a[r])}o.append("actionName",this._options.action),o.append("className",this._className);var u=this._getParameters();for(var h in u)o.append("parameters["+h+"]",u[h]);var d=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:o,contentType:!1,processData:!1,success:function(e){d._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){d._progress(n,e)},!1),e}})}return n},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;n>i;i++){var a=e[i],s=this._initFile(a);s.hasClass("uploadFailed")||(s.data("filename",a.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=s)}return t}return null},_success:function(){},_error:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")
+})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;i>t;t++){var n=e[t],a=new FormData,s=this._createUploadMatrix(n);if(this._uploadMatrix[s].length){a.append("__files["+s+"]",n),a.append("actionName",this._options.action),a.append("className",this._className);var o=this._getParameters();for(var r in o)a.append("parameters["+r+"]",o[r]);this._sendRequest(s,a)}}},_sendRequest:function(e,t){var i=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",function(t){i._progress(e,t)},!1),t}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,a,s){this._additionalParameters=s||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i?i:0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{});var o=$("#"+this._containerID+" .sortableList");if(o.is("tbody")&&"clone"===this._options.helper){this._options.helper=this._tableRowHelper.bind(this);var r=o.prev("thead");r&&r.find("th").each(function(e,t){t=$(t),t.width(t.width())})}if(a?o.sortable(this._options):o.nestedSortable(this._options),this._className){var l=this._container.find(".formSubmit");if(!l.length&&(l=this._container.next(".formSubmit"),!l.length))return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(e,t){return t.children("td").each(function(e,t){t=$(t),t.width(t.width())}),t},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy(function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy(function(e,t){var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)},this))},this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(e){var t=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(t=!0)}.bind(this)),t||(this._activeElementID="",this._identifier=e,require(["WoltLab/WCF/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){if(this._itemList=$(e),this._searchInput=$(t),this._data={},!this._itemList.length||!this._searchInput.length)return void console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.");if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)})}this._searchInput.parents(".dropdown").data("preventSubmit",!0)},_keyDown:function(e){return null===e?this._keyPress(null):!0},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t?!0:(this.addItem({objectID:0,label:t}),this._searchInput.val(e&&44===e.charCode?$.trim(this._searchInput.val().substr(this._searchInput.getCaret())):""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){var e=$.trim(this._searchInput.val());e=e.split(",");for(var t=0,i=e.length;i>t;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){if(this._data[e.objectID]&&(0!==e.objectID||!this._allowCustomInput))return!0;var t=$('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList);return t.click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(e,t,i,n,a,s){require(["WoltLab/WCF/Language/Chooser"],function(o){o.init(e,t,i,n,a,s)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){return this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1!=this._container.length?void console.debug("[WCF.UserPanel] Unable to find container identfied by '"+e+"', aborting."):void this._convert()},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e){var t=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());t.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(t),this._updateBadge(e.returnValues.totalCount),this._after(t)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(t),this._updateBadge(0))},_updateBadge:function(e){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle")),t.before(" ")),t.html(e)}else this._container.find(".badge").remove()},_after:function(){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var a=i.identify(this[0]);"close"===e?n.close(a):"render"===e?n.rebuild(a):"option"===e?3===t.length&&"title"===t[1]&&"string"==typeof t[2]&&n.setTitle(a,t[2]):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),n.openStatic(a,null,1===t.length&&"object"==typeof t[0]?t[0]:{}))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",e).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(t,i){$(i).show().css({height:e,left:(this._width+this.options.itemGap)*t,width:this._width})},this)),this.element.css({height:e,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var t=0;t<this._count;t++){var i=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList);0==t&&i.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;this._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval)}},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLab/WCF/Ui/TabMenu"],function(n,a){var s=a.getTabMenu(n.identify(t));null!==s&&s[e].apply(s,i)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLab/WCF/Ui/Pagination"],function(e){this._api=new e(this.element,{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){var t=this._trigger("shouldSwitch",void 0,{nextPage:e});return t!==!1}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){if("activePage"==e&&t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var e=this;$(".jsCategory").each(function(t,i){var n=$(i).data("parentCategoryID",null).change($.proxy(e._updateSelection,e));e._categories[n.val()]=n;var a=[];n.parents("li").find(".jsChildCategory").each(function(t,i){var s=$(i).data("parentCategoryID",n.val()).change($.proxy(e._updateSelection,e));e._categories[s.val()]=s,a.push(s.val()),s.is(":checked")&&n.prop("checked","checked")}),n.data("childCategoryIDs",a)})},_updateSelection:function(e){var t=$(e.currentTarget),i=t.data("parentCategoryID");if(t.is(":checked"))null!==i&&this._categories[i].prop("checked","checked");else if(null===i)for(var n=t.data("childCategoryIDs"),a=0,s=n.length;s>a;a++)this._categories[n[a]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){return this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2?void this._list.addClass("flexibleCategoryListDisabled"):void 0},_buildStructure:function(){var e=this;this._list.find(".jsCategory").each(function(t,i){var n=$(i).change(e._updateSelection.bind(e)),a=parseInt(n.val()),s=[];n.parents("li:eq(0)").find(".jsChildCategory").each(function(t,i){var a=$(i);a.data("parentCategory",n).change(e._updateSelection.bind(e));var o=parseInt(a.val());s.push(a);var r=[];a.parents("li:eq(0)").find(".jsSubChildCategory").each(function(t,i){var n=$(i);n.data("parentCategory",a).change(e._updateSelection.bind(e)),r.push(n)}),e._categories[o]=r}),e._categories[a]=s})},_updateSelection:function(e){var t=$(e.currentTarget),i=parseInt(t.val()),n=t.data("parentCategory");if(t.is(":checked"))n&&(n.prop("checked","checked"),n=n.data("parentCategory"),n&&n.prop("checked","checked"));else{if(this._categories[i])for(var a=0,s=this._categories[i].length;s>a;a++){var o=this._categories[i][a];o.prop("checked",!1);var r=parseInt(o.val());if(this._categories[r])for(var l=0,c=this._categories[r].length;c>l;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var u=parseInt(n.val()),a=0,s=this._categories[u].length;s>a;a++)if(this._categories[u][a].prop("checked"))return;if(n=n.data("parentCategory")){u=parseInt(n.val());for(var a=0,s=this._categories[u].length;s>a;a++)if(this._categories[u][a].prop("checked"))return}}}}}),WCF.Condition={},WCF.Notice={}; })(this);
 
 // WCF.Like.js
 (function (window, undefined) {"use strict";WCF.Like=Class.extend({_allowForOwnContent:!1,_canLike:!1,_containers:{},_containerData:{},_enableDislikes:!0,_isBusy:!1,_likeDetails:{},_proxy:null,_showSummary:!0,init:function(t,e,i,a){this._canLike=t,this._enableDislikes=e,this._isBusy=!1,this._likeDetails={},this._showSummary=i,this._allowForOwnContent=a;var s=this._getContainers();this._initContainers(s),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});var n=new Date,o=n.toString().hashCode+n.getUTCMilliseconds();WCF.DOMNodeInsertedHandler.addCallback("WCF.Like"+o,$.proxy(this._domNodeInserted,this))},_domNodeInserted:function(){var t=this._getContainers();this._initContainers(t)},_initContainers:function(containers){var $createdWidgets=!1;containers.each($.proxy(function(index,container){var $container=$(container),$containerID=$container.wcfIdentify();this._containers[$containerID]||(this._containers[$containerID]=$container,this._containerData[$containerID]={likeButton:null,badge:null,dislikeButton:null,likes:$container.data("like-likes"),dislikes:$container.data("like-dislikes"),objectType:$container.data("objectType"),objectID:this._getObjectID($containerID),users:eval($container.data("like-users")),liked:$container.data("like-liked")},this._createWidget($containerID),$createdWidgets=!0)},this)),$createdWidgets&&new WCF.PeriodicalExecuter(function(t){t.stop(),WCF.DOMNodeInsertedHandler.execute()},250)},_getContainers:function(){},_getWidgetContainer:function(){},_getObjectID:function(){},_addWidget:function(t,e){var i=this._getWidgetContainer(t);e.appendTo(i)},_buildWidget:function(t,e,i,a){var s=$('<aside class="likesWidget"><ul></ul></aside>');this._canLike&&(e.appendTo(s.find("ul")),i.appendTo(s.find("ul"))),a.appendTo(s),this._addWidget(t,s)},_createWidget:function(t){var e=$('<li class="wcfLikeButton"><a href="#" title="'+WCF.Language.get("wcf.like.button.like")+'" class="jsTooltip"><span class="icon icon16 fa-thumbs-o-up" /> <span class="invisible">'+WCF.Language.get("wcf.like.button.like")+"</span></a></li>"),i=$('<li class="wcfDislikeButton"><a href="#" title="'+WCF.Language.get("wcf.like.button.dislike")+'" class="jsTooltip"><span class="icon icon16 fa-thumbs-o-down" /> <span class="invisible">'+WCF.Language.get("wcf.like.button.dislike")+"</span></a></li>");this._enableDislikes||i.hide(),this._allowForOwnContent||WCF.User.userID!=this._containers[t].data("userID")||(e=$(""),i=$(""));var a=$('<a class="badge jsTooltip likesBadge" />').data("containerID",t).click($.proxy(this._showLikeDetails,this)),s=null;this._showSummary&&(s=$('<p class="likesSummary"><span class="pointer" /></p>'),s.children("span").data("containerID",t).click($.proxy(this._showLikeDetails,this))),this._buildWidget(t,e,i,a,s),this._containerData[t].likeButton=e,this._containerData[t].dislikeButton=i,this._containerData[t].badge=a,this._containerData[t].summary=s,e.data("containerID",t).data("type","like").click($.proxy(this._click,this)),i.data("containerID",t).data("type","dislike").click($.proxy(this._click,this)),this._setActiveState(e,i,this._containerData[t].liked),this._updateBadge(t),this._showSummary&&this._updateSummary(t)},_showLikeDetails:function(t,e){var i=null===t?e:$(t.currentTarget).data("containerID");void 0===this._likeDetails[i]&&(this._likeDetails[i]=new WCF.User.List("wcf\\data\\like\\LikeAction",WCF.Language.get("wcf.like.details"),{data:{containerID:i,objectID:this._containerData[i].objectID,objectType:this._containerData[i].objectType}})),this._likeDetails[i].open()},_click:function(t){t.preventDefault();var e=$(t.currentTarget);return null===e?void console.debug("[WCF.Like] Unable to find target button, aborting."):void this._sendRequest(e.data("containerID"),e.data("type"))},_sendRequest:function(t,e){this._isBusy||(this._isBusy=!0,this._proxy.setOption("data",{actionName:e,className:"wcf\\data\\like\\LikeAction",parameters:{data:{containerID:t,objectID:this._containerData[t].objectID,objectType:this._containerData[t].objectType}}}),this._proxy.sendRequest())},_success:function(t){var e=t.returnValues.containerID;if(this._containers[e])switch(t.actionName){case"dislike":case"like":this._containerData[e].likes=parseInt(t.returnValues.likes),this._containerData[e].dislikes=parseInt(t.returnValues.dislikes),this._containerData[e].users=t.returnValues.users,$.each(this._containerData[e].users,function(t,e){e.username=WCF.String.escapeHTML(e.username)}),this._updateBadge(e),this._showSummary&&this._updateSummary(e);var i=this._containerData[e].likeButton,a=this._containerData[e].dislikeButton,s=0;t.returnValues.isLiked?s=1:t.returnValues.isDisliked&&(s=-1),this._setActiveState(i,a,s),void 0!==this._likeDetails[e]&&delete this._likeDetails[e],this._isBusy=!1}},_updateBadge:function(t){if(this._containerData[t].likes||this._containerData[t].dislikes){this._containerData[t].badge.show();var e=this._containerData[t].likes-this._containerData[t].dislikes,i=this._containerData[t].badge;i.removeClass("green red"),e>0?(i.text("+"+WCF.String.formatNumeric(e)),i.addClass("green")):0>e?(i.text(WCF.String.formatNumeric(e)),i.addClass("red")):i.text("±0");var a=this._containerData[t].likes,s=this._containerData[t].dislikes;i.data("tooltip",WCF.Language.get("wcf.like.tooltip",{likes:a,dislikes:s}))}else this._containerData[t].badge.hide()},_updateSummary:function(t){if(this._containerData[t].likes){this._containerData[t].summary.show();var e=this._containerData[t].users,i=[];for(var a in e)i.push(e[a].username);var s=this._containerData[t].likes-i.length;this._containerData[t].summary.children("span").html(WCF.Language.get("wcf.like.summary",{users:i,others:s}))}else this._containerData[t].summary.hide()},_setActiveState:function(t,e,i){t.removeClass("active"),e.removeClass("active"),1==i?t.addClass("active"):-1==i&&e.addClass("active")}}); })(this);
@@ -94,8 +94,8 @@ for(var e=this._fileUpload.prop("files"),t=0,i=e.length;i>t;t++){var n=e[t],a=ne
 (function (window, undefined) {"use strict";WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition(function(e){t(e.coords.latitude,e.coords.longitude)},function(){t(void 0,void 0)},{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&enquire.register("(max-width: 767px)",{setup:$.proxy(this._addSidebarMapListener,this),deferSetup:!0}),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy(function(){e.open(this._map,t)},this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});if(s&&a.setIcon(s),i){var n=new google.maps.InfoWindow({content:i});this._addInfoWindowEventListener(a,n),a.infoWindow=n}return this._markers.push(a),a},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t=null,e=null,o=null,s=null;for(var i in this._markers){var a=this._markers[i],n=a.getPosition().lat(),r=a.getPosition().lng();null===t?(t=e=n,o=s=r):(t>n?t=n:n>e&&(e=n),o>n?o=n:r>s&&(s=r))}this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(t,o),new google.maps.LatLng(e,s)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,init:function(t,e,o,s,i){this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy(function(t){t.infoWindow&&t.infoWindow.open(this._map,t)},this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng()?!1:(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t){if(t.returnValues&&t.returnValues.markers)for(var e in t.returnValues.markers){var o=t.returnValues.markers[e];this.addMarker(o.latitude,o.longitude,o.title,null,o.infoWindow),o.objectID?this._objectIDs.push(o.objectID):o.objectIDs&&(this._objectIDs=this._objectIDs.concat(o.objectIDs))}},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a=$(i),n=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);a.append($("<p />").append(n));var r=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",a.get(0));return n.data("marker",r),r},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t);for(var e=[],o=0,s=this._markers.length;s>o;o++){var i=this._markers[o];i.draggable||(i.setVisible(t),t&&e.push(i))}this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null},this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){var o=0;for(var s in t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var i=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy(function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))},this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(t){null!==t&&$(this._searchInput).val(t)},this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},function(e,o){t(o==google.maps.GeocoderStatus.OK?i?e:e[0].formatted_address:null)})}}; })(this);
 
 // WCF.Message.js
-(function (window, undefined) {"use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({_dialog:null,init:function(){this._dialog=null,this._initCodeBoxes(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.BBCode.CodeViewer",$.proxy(this._initCodeBoxes,this)),WCF.DOMNodeInsertedHandler.execute()},_initCodeBoxes:function(){$(".codeBox:not(.jsCodeViewer)").each($.proxy(function(e,t){var i=$(t).addClass("jsCodeViewer");$('<span class="icon icon16 fa-files-o pointer jsTooltip" title="'+WCF.Language.get("wcf.message.bbcode.code.copy")+'" />').appendTo(i.find("div > h3")).click($.proxy(this._click,this))},this))},_click:function(e){var t="";$(e.currentTarget).parents("div").next("ol").children("li").each(function(e,i){t&&(t+="\n"),t+=$(i).text().replace(/\n+$/,"")}),null===this._dialog?(this._dialog=$('<div><textarea cols="60" rows="12" readonly="readonly" /></div>').hide().appendTo(document.body),this._dialog.children("textarea").val(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.bbcode.code.copy")})):(this._dialog.children("textarea").val(t),this._dialog.wcfDialog("open")),this._dialog.children("textarea").select()}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s?s:".jsRevertButton",this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change(function(){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),e._oldIDInputs.each(function(){var e=parseInt($(this).val());"current"===$(this).val()&&(e=1/0),e>=t?$(this).disable():$(this).enable()})}),this._oldIDInputs.change(function(){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),e._newIDInputs.each(function(){var e=parseInt($(this).val());"current"===$(this).val()&&(e=1/0),t>=e?$(this).disable():$(this).enable()})}),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each(function(t,i){var s=$(i);s.find(e._buttonSelector).click($.proxy(e._click,e))})},_click:function(e){var t=$(e.currentTarget);if(e.preventDefault(),t.data("confirmMessage")){var i=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"cancel"!==e&&i._sendRequest(t)})}else this._sendRequest(t)},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(){window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).unload(function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){return this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),void(this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}))):void console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):void console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){var t=this._getMessage();return null===t?void console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'"):(this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1)},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each(function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))}),{data:{message:e},options:t}},_getMessage:function(){return $.browser.redactor?this._textarea.data("redactor")?this._textarea.redactor("wutil.getText"):null:$.trim(this._textarea.val())},_success:function(e){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(){},_failure:function(e){if(null===e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;this._previewButton.html(this._previewButtonLabel).enable();var t=this._textarea.next("small.innerError").empty();return t.length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent())),t.html(e.returnValues.errorType),!1}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_attachmentObjectType:null,_attachmentObjectID:null,_tmpHash:null,init:function(e,t,i){this._super("wcf\\data\\bbcode\\MessagePreviewAction","text","previewButton"),this._attachmentObjectType=e||null,this._attachmentObjectID=t||null,this._tmpHash=i||null},_handleResponse:function(e){var t=$("#previewContainer");t.length||(t=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="messageTextPreview"></div></section>').prependTo($("#messageContainer")).wcfFadeIn()),t.find("div:eq(0)").html(e.returnValues.message),(new WCF.Effect.Scroll).scrollTo(t)},_getParameters:function(e){var t=this._super(e);return null!=this._attachmentObjectType&&(t.attachmentObjectType=this._attachmentObjectType,t.attachmentObjectID=this._attachmentObjectID,t.tmpHash=this._tmpHash),t}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('<li class="dropdownDivider" />').appendTo(s),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,$("#smilies-"+this._wysiwygSelector).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){e.preventDefault();var i=parseInt(t.activeTab.tab.data("smileyCategoryID"));if(i&&!t.activeTab.container.children("ul.smileyList").length){if(void 0!==this._cache[i])return void t.activeTab.container.html(this._cache[i]);this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()}},_success:function(e){var t=parseInt(e.returnValues.smileyCategoryID);this._cache[t]=e.returnValues.template,$("#smilies-"+this._wysiwygSelector+"-"+t).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({_redactor:null,_wysiwygSelector:"",init:function(e){this._wysiwygSelector=e,WCF.System.Dependency.Manager.register("Redactor_"+this._wysiwygSelector,$.proxy(function(){this._redactor=$("#"+this._wysiwygSelector).redactor("core.getObject"),$(".messageTabMenu[data-wysiwyg-container-id="+this._wysiwygSelector+"]").on("click",".jsSmiley",$.proxy(this._smileyClick,this))},this))},_smileyClick:function(e){e.preventDefault();var t=$(e.currentTarget),i=t.data("smileyCode"),s=t.data("smileyPath");this._redactor.wbbcode.insertSmiley(i,s,!0)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t){require(["WoltLab/WCF/Ui/Message/InlineEditor"],function(i){i.init({extendedForm:t===!0,className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLab/WCF/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:null,_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:null,_quoteManager:null,init:function(e,t,i,s,n,a,o){return this._className=t,""==this._className?void console.debug("[WCF.Message.QuoteManager] Empty class name given, aborting."):(this._objectType=i,""==this._objectType?void console.debug("[WCF.Message.QuoteManager] Empty object type name given, aborting."):(this._containerSelector=s,this._message="",this._messageBodySelector=n,this._messageContentSelector=a,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initContainers(),o=o&&e.supportPaste()?!0:!1,this._initCopyQuote(o),$(document).mouseup($.proxy(this._mouseUp,this)),this._quoteManager=e,this._quoteManager.register(this._objectType,this),void WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Quote.Handler"+i.hashCode(),$.proxy(this._initContainers,this))))},_initContainers:function(){var e=this;$(this._containerSelector).each(function(t,i){var s=$(i),n=s.wcfIdentify();if(!e._containers[n]){if(e._containers[n]=s,s.hasClass("jsInvalidQuoteTarget"))return!0;null!==e._messageBodySelector&&(s=s.find(e._messageBodySelector).data("containerID",n)),s.mousedown($.proxy(e._mouseDown,e)),e._containers[n].find(".jsQuoteMessage").click($.proxy(e._saveFullQuote,e))}})},_mouseDown:function(e){this._copyQuote.hide();var t=$(e.currentTarget);if(this._messageBodySelector&&(t=this._containers[t.data("containerID")]),t.hasClass("jsInvalidQuoteTarget"))return void(this._activeContainerID="");for(var i=e.target;i!==t[0];){if("BLOCKQUOTE"===i.tagName)return void(this._activeContainerID="");i=i.parentElement}this._activeContainerID=t.wcfIdentify(),$.browser.mozilla&&t.find("img").each(function(){var e=$(this);e.data("__alt",e.attr("alt")).removeAttr("alt")})},_getNodeText:function(e){var t=function(e){switch(e.tagName){case"BLOCKQUOTE":case"H3":case"SCRIPT":return NodeFilter.FILTER_REJECT;default:return NodeFilter.FILTER_ACCEPT}};t.acceptNode=t;for(var i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,t,!0),s="";i.nextNode();){var n=i.currentNode;if(n.nodeType===Node.ELEMENT_NODE)switch(n.tagName){case"BR":case"LI":case"UL":s+="\n";break;case"TD":$.browser.msie||(s+="\n")}else s+=n.nodeValue.replace(/\n/g,"")}return s},_mouseUp:function(e){if(""==this._activeContainerID)return void this._copyQuote.hide();var t=this._containers[this._activeContainerID],i=this._getSelectedText(),s=$.trim(i);if(""==s)return void this._copyQuote.hide();for(var n=this._messageBodySelector?t.find(this._messageContentSelector)[0]:t[0],a=e.target;a!==t[0];){if(null===a||"BLOCKQUOTE"===a.tagName)return void this._copyQuote.hide();a=a.parentElement}var o=window.getSelection().getRangeAt(0);if(!this._elementInsideContainer(o.startContainer,n)||!this._elementInsideContainer(o.endContainer,n))return void this._copyQuote.hide();var r=this._getNodeText(n);if(-1!==this._normalize(r).indexOf(this._normalize(s))){this._copyQuote.show();var l=this._getBoundingRectangle(t,window.getSelection()),c=this._copyQuote.getDimensions("outer"),u=(l.right-l.left)/2-c.width/2+l.left;this._copyQuote.css({top:l.top-c.height-7+"px",left:u+"px"}),this._copyQuote.hide(),this._activeContainerID="";var h=this;new WCF.PeriodicalExecuter(function(e){e.stop();var i=$.trim(h._getSelectedText());""!=i&&(h._copyQuote.show(),h._message=i,h._objectID=t.data("objectID"),$.browser.mozilla&&t.find("img").each(function(){var e=$(this);e.attr("alt",e.data("__alt"))}))},10)}},_elementInsideContainer:function(e,t){for(e.nodeType===Node.TEXT_NODE&&(e=e.parentNode);e;){if(e===t)return!0;e=e.parentNode}return!1},_normalize:function(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")},_getOffset:function(e,t){e.collapse(t);var i=WCF.getRandomID(),s=document.createElement("span");s.innerHTML='<span id="'+i+'"></span>';for(var n,a=document.createDocumentFragment();n=s.firstChild;)a.appendChild(n);e.insertNode(a),s=$("#"+i);var o=s.offset();return o.top=o.top-$(window).scrollTop(),s.remove(),o},_getBoundingRectangle:function(e,t){var i=null;if(document.createRange&&"undefined"!=typeof document.createRange().getBoundingClientRect){if(t.rangeCount>0){var s=t.getRangeAt(0).getBoundingClientRect();i={left:s.left,right:s.right,top:s.top+$(document).scrollTop()}}}else if(document.selection&&"Control"!=document.selection.type){var n=document.selection.createRange();i={left:n.boundingLeft,right:n.boundingRight,top:n.boundingTop}}return i},_saveSelection:function(e){if(window.getSelection&&document.createRange){var t=window.getSelection().getRangeAt(0),i=t.cloneRange();i.selectNodeContents(e),i.setEnd(t.startContainer,t.startOffset);var s=i.toString().length;return{start:s,end:s+t.toString().length}}var n=document.selection.createRange(),a=document.body.createTextRange();a.moveToElementText(e),a.setEndPoint("EndToStart",n);var s=a.text.length;return{start:s,end:s+n.text.length}},_restoreSelection:function(e,t){if(window.getSelection&&document.createRange){var i=0,s=document.createRange();s.setStart(e,0),s.collapse(!0);for(var n,a=[e],o=!1,r=!1;!r&&(n=a.pop());)if(n.nodeType==Node.TEXT_NODE){var l=i+n.length;!o&&t.start>=i&&t.start<=l&&(s.setStart(n,t.start-i),o=!0),o&&t.end>=i&&t.end<=l&&(s.setEnd(n,t.end-i),r=!0),i=l}else for(var c=n.childNodes.length;c--;)a.push(n.childNodes[c]);var u=window.getSelection();u.removeAllRanges(),u.addRange(s)}else{var h=document.body.createTextRange();h.moveToElementText(e),h.collapse(!0),h.moveEnd("character",t.end),h.moveStart("character",t.start),h.select()}},_initCopyQuote:function(e){if(this._copyQuote=$("#quoteManagerCopy"),!this._copyQuote.length){this._copyQuote=$('<div id="quoteManagerCopy" class="balloonTooltip"><span class="jsQuoteManagerStore">'+WCF.Language.get("wcf.message.quote.quoteSelected")+'</span><span class="pointer"><span></span></span></div>').hide().appendTo(document.body);var t=this._copyQuote.children("span.jsQuoteManagerStore").click($.proxy(this._saveQuote,this));e&&$('<span class="jsQuoteManagerQuoteAndInsert">'+WCF.Language.get("wcf.message.quote.quoteAndReply")+"</span>").click($.proxy(this._saveAndInsertQuote,this)).insertAfter(t)}},_getSelectedText:function(){var e=window.getSelection();return e.rangeCount?this._getNodeText(e.getRangeAt(0).cloneContents()):""},_saveFullQuote:function(e){var t=$(e.currentTarget);this._proxy.setOption("data",{actionName:"saveFullQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[t.data("objectID")]}),this._proxy.sendRequest(),t.data("isQuoted")?t.data("isQuoted",!1).children("a").removeClass("active"):t.data("isQuoted",!0).children("a").addClass("active");var i=t.parents(".buttonGroupNavigation");return i.hasClass("jsMobileButtonGroupNavigation")&&i.children(".dropdownLabel").trigger("click"),e.stopPropagation(),!1},_saveQuote:function(e){e=e===!0?!0:!1,this._proxy.setOption("data",{actionName:"saveQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[this._objectID],parameters:{message:this._message,renderQuote:e}}),this._proxy.sendRequest()},_saveAndInsertQuote:function(){this._saveQuote(!0)},_success:function(e){if(void 0!==e.returnValues.count){void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs);var t=void 0!==e.returnValues.fullQuoteObjectIDs?e.returnValues.fullQuoteObjectIDs:{};this._quoteManager.updateCount(e.returnValues.count,t)}switch(e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&WCF.System.Event.fireEvent("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName?!0:!1,quote:e.returnValues.renderedQuote})}},updateFullQuoteObjectIDs:function(e){for(var t in this._containers)this._containers[t].find(".jsQuoteMessage").each(function(t,i){var s=$(i).data("isQuoted",0);s.children("a").removeClass("active"),WCF.inArray(s.data("objectID"),e)&&s.data("isQuoted",1).children("a").addClass("active")})}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorElement:null,_editorElementAlternative:null,_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_showQuotes:null,_supportPaste:!1,init:function(e,t,i,s){this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorElement=null,this._editorElementAlternative=null,this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._showQuotes=null,this._supportPaste=!1,t&&(this._editorElement=$("#"+t),this._editorElement.length&&(this._supportPaste=!0,this._form=this._editorElement.parents("form:eq(0)"),this._form.length?(this._form.submit($.proxy(this._submit,this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=i===!0?!0:!1))),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php/MessageQuote/?t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){this._insertQuote(null,void 0,e)}.bind(this))},setAlternativeEditor:function(e){this._editorElementAlternative=e},clearAlternativeEditor:function(){this._editorElementAlternative=null},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){this._count=parseInt(e)||0,this._toggleShowQuotes();for(var i in this._handlers){var s=t[i]||[];this._handlers[i].updateFullQuoteObjectIDs(s)}},insertQuotes:function(e,t,i){return this._insertQuotes?void new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):void(this._insertQuotes=!0)},_toggleShowQuotes:function(){if(this._count){null===this._showQuotes&&(this._showQuotes=$("#showQuotes"),this._showQuotes.length||(this._showQuotes=$('<div id="showQuotes" class="balloonTooltip" />').click($.proxy(this._click,this)).appendTo(document.body)));var e=WCF.Language.get("wcf.message.quote.showQuotes").replace(/#count#/,this._count);this._showQuotes.text(e).show()}else null!==this._showQuotes&&this._showQuotes.hide();this._hasTemplate=!1},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e);var t=$('<div class="formSubmit" />').appendTo(this._dialog);this._supportPaste&&(this._buttons.insert=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("<button>"+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0;var i=this._dialog.find(".jsInsertQuote");if(this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length){var s=this;this._dialog.find("input.jsRemoveQuote").each(function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})}},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t=$(e.currentTarget),i=t.parent("li").attr("data-quote-id");if(t.prop("checked"))this._removeOnSubmit.push(i);else for(var s in this._removeOnSubmit)if(this._removeOnSubmit[s]==i){delete this._removeOnSubmit[s];break}},_insertSelected:function(){if(null===this._editorElementAlternative){var e=$(".jsQuickReply:eq(0)").data("__api");e&&!e.getContainer().is(":visible")&&(this._insertQuotes=!1,e.click(null))}this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.find("input.jsCheckbox:checked").each($.proxy(function(e,t){this._insertQuote(null,t)},this)),this._dialog.wcfDialog("close")},_insertQuote:function(e,t,i){var s,n,a,o=null;if(void 0===i){o=null===e?$(t).parents("li"):$(e.currentTarget).parents("li"),s=$.trim(o.children("div.jsFullQuote").text());var r=o.parents("article.message");n=r.attr("data-username"),a=r.data("link"),i={forceInsert:!0}}else s=i.quote.text,n=i.quote.username,a=i.quote.link;if($.browser.redactor)if(null===this._editorElementAlternative){var l=!0;if(null!==e||null!==i){var c=$(".jsQuickReply:eq(0)").data("__api");c&&!c.getContainer().is(":visible")&&(i.forceInsert?(this._insertQuotes=!1,c.click(null)):l=!1)}l&&this._editorElement.length&&this._editorElement.redactor("wbbcode.insertQuoteBBCode",n,a,s,s)}else this._editorElementAlternative.redactor("wbbcode.insertQuoteBBCode",n,a,s,s);else{s="[quote='"+n+"','"+a+"']"+s+"[/quote]";var u=null===this._editorElementAlternative?this._editorElement:this._editorElementAlternative,h=u.val();if(s+="\n\n",0==h.length)u.val(s);else{var d=u.getCaret();u.val(h.substr(0,d)+s+h.substr(d))}}null!==o&&this._removeOnSubmit.push(o.attr("data-quote-id")),null!==e&&this._dialog.wcfDialog("close")},_removeSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked");var e=[];if(this._dialog.find("input.jsCheckbox:checked").each(function(t,i){e.push($(i).parents("li").attr("data-quote-id"))}),e.length){var t=[];for(var i in this._handlers)t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){if(this._supportPaste&&this._removeOnSubmit.length>0){var e=this._form.find(".formSubmit");for(var t in this._removeOnSubmit)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)}},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e=[];for(var t in this._handlers)e.push(t);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:e.length>0,objectTypes:e}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,init:function(){this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t=$(e.currentTarget),i=t.prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode();if(void 0===this._cache[n]){var a=!1;null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),a=!0):this._dialog.empty();var o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog);$('<input type="text" id="__sharePermalink" class="long" readonly="readonly" />').attr("value",i).appendTo(o);var o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog);$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly="readonly" />').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o);var o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog);$('<input type="text" id="__sharePermalinkHTML" class="long" readonly="readonly" />').attr("value",'<a href="'+i+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(o),this._cache[n]=this._dialog.html(),this._dialog.wcfDialog(a?{title:WCF.Language.get("wcf.message.share")}:"open")}else this._dialog.html(this._cache[n]).wcfDialog("open");this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click(function(){$(this).select()});navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown(function(){return!1}).removeAttr("readonly").click(function(){this.setSelectionRange(0,9999)})}}),WCF.Message.Share.Page=Class.extend({_dialog:null,_fetchObjectCount:!1,_pageDescription:"",_pageURL:"",_privacySettings:{},_provider:{},_proxy:null,init:function(e,t){this._dialog=null,this._fetchObjectCount=e===!0?!0:!1,this._pageDescription=encodeURIComponent($('meta[property="og:title"]').prop("content")),this._pageURL=encodeURIComponent($('meta[property="og:url"]').prop("content")),this._privacySettings=$.extend({facebook:!1,google:!1,twitter:!1,reddit:!1},t||{}),this._proxy=null,this._initProvider()},_initProvider:function(){var e=$(".messageShareButtons"),t=this;if(this._provider={facebook:{fetch:function(){t._fetchFacebook()},link:e.find(".jsShareFacebook"),share:function(){t._share("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0)}},google:{fetch:void 0,link:e.find(".jsShareGoogle"),share:function(){t._share("google","https://plus.google.com/share?url={pageURL}",!0)}},reddit:{fetch:function(){t._fetchReddit()},link:e.find(".jsShareReddit"),share:function(){t._share("reddit","https://ssl.reddit.com/submit?url={pageURL}",!0)}},twitter:{fetch:void 0,link:e.find(".jsShareTwitter"),share:function(){t._share("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1)}}},$.each(this._provider,function(e,i){t._privacySettings[e]?t._fetchObjectCount&&i.fetch&&i.fetch():i.link.addClass("disabled"),i.link.data("provider",e).click($.proxy(t._click,t))}),WCF.User.userID&&!e.find(".jsShowPrivacySettings").length){var i=$('<li class="jsShowPrivacySettings"><a><span class="icon icon32 fa-gear jsTooltip" title="'+WCF.Language.get("wcf.message.share.privacy")+'" /></a></li>');i.appendTo(e.children("ul")).children("a").click($.proxy(this._openPrivacySettings,this))}},_click:function(e){var t=$(e.currentTarget),i=t.data("provider");t.hasClass("disabled")?WCF.User.userID?this._openPrivacySettings():t.removeClass("disabled"):this._provider[i].share()},_openPrivacySettings:function(){null===this._proxy&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})),this._proxy.setOption("data",{actionName:"getSocialNetworkPrivacySettings",className:"wcf\\data\\user\\UserAction"}),this._proxy.sendRequest()},_success:function(e){switch(e.actionName){case"getSocialNetworkPrivacySettings":this._renderDialog(e);break;case"saveSocialNetworkPrivacySettings":this._updatePrivacySettings(e)}},_renderDialog:function(e){null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share.privacy")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find("input[type=submit]").click($.proxy(this._save,this))},_save:function(){this._proxy.setOption("data",{actionName:"saveSocialNetworkPrivacySettings",className:"wcf\\data\\user\\UserAction",parameters:{facebook:this._dialog.find("input[name=facebook]").is(":checked"),google:this._dialog.find("input[name=google]").is(":checked"),reddit:this._dialog.find("input[name=reddit]").is(":checked"),twitter:this._dialog.find("input[name=twitter]").is(":checked")}}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")},_updatePrivacySettings:function(e){this._privacySettings=$.extend(this._privacySettings,e.returnValues.settings);var t=this;$.each(e.returnValues.settings,function(e,i){t._privacySettings[e]=i?!0:!1,i?(t._provider[e].link.removeClass("disabled"),t._fetchObjectCount&&t._provider[e].fetch&&t._provider[e].fetch()):t._provider[e].link.addClass("disabled")}),(new WCF.System.Notification).show()},_share:function(e,t,i){window.open(t.replace(/{pageURL}/,this._pageURL).replace(/{text}/,this._pageDescription+(i?" "+this._pageURL:"")),e,"height=600,width=600")},_fetchCount:function(e,t,i){var s={autoSend:!0,dataType:"jsonp",showLoadingOverlay:!1,success:t,suppressErrors:!0,type:"GET",url:e.replace(/{pageURL}/,this._pageURL)};i&&(s.jsonp=i),new WCF.Action.Proxy(s)},_fetchFacebook:function(){this._fetchCount("https://graph.facebook.com/?id={pageURL}",$.proxy(function(e){e.shares&&this._provider.facebook.link.children("span.badge").show().text(e.shares)},this))},_fetchReddit:function(){window.location.protocol.match(/^https/)||this._fetchCount("http://www.reddit.com/api/info.json?url={pageURL}",$.proxy(function(e){e.data.children.length&&this._provider.reddit.link.children("span.badge").show().text(e.data.children[0].data.score)},this),"jsonp")}}),WCF.Message.UserMention=Class.extend({_caretPosition:null,_className:"wcf\\data\\user\\UserAction",_dropdown:null,_dropdownMenu:null,_itemIndex:-1,_lineHeight:null,_mentionStart:"",
-_redactor:null,_timer:null,init:function(e){$.browser.mobile&&$.browser.mozilla||(this._textarea=$("#"+e),this._redactor=this._textarea.redactor("core.getObject"),this._dropdown=this._textarea.redactor("core.getEditor"),this._dropdownMenu=$('<ul class="dropdownMenu userSuggestionList" />').appendTo(this._textarea.parent()),WCF.Dropdown.initDropdownFragment(this._dropdown,this._dropdownMenu),this._proxy=new WCF.Action.Proxy({autoAbortPrevious:!0,success:$.proxy(this._success,this)}),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+e,$.proxy(this._keydown,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keyup_"+e,$.proxy(this._keyup,this)))},_clearList:function(){this._hideList(),this._dropdownMenu.empty()},_click:function(e){if($.browser.mozilla&&"P"==this._caretPosition.startContainer.nodeName){var t=this._caretPosition.startContainer.childNodes[this._caretPosition.startOffset-1];this._caretPosition=document.createRange(),this._caretPosition.selectNodeContents(t),this._caretPosition.collapse()}this._redactor.wutil.replaceRangesWith(this._caretPosition),this._setUsername($(e.currentTarget).data("username"))},_createListItem:function(e){var t=$("<li />").data("username",e.label).click($.proxy(this._click,this)).appendTo(this._dropdownMenu),i=$("<div />").addClass("box16").appendTo(t);i.append($(e.icon)),i.append($("<div />").append($("<span />").text(e.label)))},_getDropdownMenuPosition:function(){var e=getSelection().getRangeAt(0).cloneRange(),t=document.createRange();t.setStart(e.startContainer,e.startOffset-(this._mentionStart.length+1)),t.setEnd(e.startContainer,e.startOffset),this._redactor.wutil.replaceRangesWith(t);var i=getSelection().getRangeAt(0),s=i.getBoundingClientRect(),n=$(window),a={top:Math.round(s.bottom)+n.scrollTop(),left:Math.round(s.left)+n.scrollLeft()};return null===this._lineHeight&&(this._lineHeight=Math.round(s.bottom-s.top)),this._redactor.wutil.replaceRangesWith(e),this._caretPosition=e,a},_setUsername:function(e){null!==this._timer&&(this._timer.stop(),this._timer=null),this._proxy.abortPrevious();var t=getSelection().getRangeAt(0).cloneRange();this._redactor.buffer.set();var i=t.startContainer,s=t.startOffset-(this._mentionStart.length+1);0>s&&(i=i.previousSibling,s=i.length-(this._mentionStart.length+1)-(t.startOffset-1));var n=document.createRange();n.setStart(i,s),n.setEnd(t.startContainer,t.startOffset),this._redactor.wutil.replaceRangesWith(n);var a=getSelection().getRangeAt(0);a.deleteContents(),a.collapse(!0),-1!==e.indexOf("'")&&(e=e.replace(/'/g,"''")),e="'"+e+"'";var o=document.createTextNode("@"+e);a.insertNode(o);var n=document.createRange();n.setStart(o,e.length+1),n.setEnd(o,e.length+1),this._redactor.wutil.replaceRangesWith(n),this._hideList()},_getParameters:function(){return{data:{includeUserGroups:!1,searchString:this._mentionStart}}},_getTextLineInFrontOfCaret:function(){if(this._redactor.selection.getHtml().length)return"";var e=getSelection().getRangeAt(0);$.browser.mozilla&&3==e.startContainer.nodeType&&e.startContainer.parentNode.normalize();var t=e.startContainer.textContent.substr(0,e.startOffset),i=t;t="";for(var s=!1,n=0;n<i.length;n++){var a=i.charCodeAt(n).toString(16);"200b"==a||/\s/.test(i[n])&&("a0"!=a&&"20"!=a||s)?(s=!1,t=""):(("a0"==a||"20"==a)&&(s=!0),"@"===i[n]&&n&&/\s/.test(i[n-1])&&(s=!1,t=""),t+=i[n])}return t},_hideList:function(){this._dropdown.removeClass("dropdownOpen"),this._dropdownMenu.removeClass("dropdownOpen"),this._itemIndex=-1},_keydown:function(e){if(!this._redactor.wutil.inPlainMode()&&this._dropdownMenu.is(":visible"))switch(e.event.which){case $.ui.keyCode.ENTER:e.event.preventDefault(),e.cancel=!0,this._dropdownMenu.children("li").eq(this._itemIndex).trigger("click");break;case $.ui.keyCode.UP:e.cancel=!0,e.event.preventDefault(),this._selectItem(this._itemIndex-1);break;case $.ui.keyCode.DOWN:e.cancel=!0,e.event.preventDefault(),this._selectItem(this._itemIndex+1)}},_keyup:function(e){if(this._redactor.wutil.inPlainMode())return!0;if(null!==this._timer&&(this._timer.stop(),this._timer=null),this._proxy.abortPrevious(),e.event.which!==$.ui.keyCode.ENTER&&!(this._dropdownMenu.is(":visible")&&e.event.which in{13:1,38:1,40:1})){var t=this._getTextLineInFrontOfCaret();if(t){var i=t.match(/@([^,]{3,})$/);i?(!i.index||t[i.index-1].match(/\s/))&&(this._mentionStart=i[1],null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters()}),this._proxy.sendRequest(),this._timer.stop(),this._timer=null},this),500)):this._hideList()}else this._hideList()}},_selectItem:function(e){var t=this._dropdownMenu.children("li");0>e?e=t.length-1:e+1>t.length&&(e=0),t.removeClass("dropdownNavigationItem"),t.eq(e).addClass("dropdownNavigationItem"),this._itemIndex=e},_showList:function(){this._dropdown.addClass("dropdownOpen"),this._dropdownMenu.addClass("dropdownOpen")},_success:function(e){if(this._clearList(!1),$.getLength(e.returnValues)){for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}this._updateSuggestionListPosition(),this._showList()}},_updateSuggestionListPosition:function(){try{var e=this._getDropdownMenuPosition();e.top+=5,this._dropdownMenu.css(e),this._selectItem(0),e.top+this._dropdownMenu.outerHeight()+10>$(window).height()+$(document).scrollTop()?(this._dropdownMenu.addClass("dropdownArrowBottom"),this._dropdownMenu.css({top:e.top-this._dropdownMenu.outerHeight()-2*this._lineHeight+5})):this._dropdownMenu.removeClass("dropdownArrowBottom")}catch(e){}}}),$.widget("wcf.messageTabMenu",{_span:null,_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e=this.element.find("> nav"),t=e.find("> ul > li:not(.jsFlexibleMenuDropdown)"),i=this.element.find("> div, > fieldset");if(t.length!=i.length)return void console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.");this._span=$("<span />").appendTo(e);var s=this.element.data("preselect");this._tabs=[],this._tabsByName={};for(var n=0;n<t.length;n++){var a=$(t[n]),o=$(i[n]),r=a.data("name");if(void 0===r){var l=a.children("a").prop("href");void 0!==l&&l.match(/#([a-zA-Z_-]+)$/)&&(r=RegExp.$1),void 0===r&&(r=a.wcfIdentify(),console.debug("[wcf.messageTabMenu] Missing name attribute, assuming generic ID '"+r+"'"))}this._tabs.push({container:o,name:r,tab:a}),this._tabsByName[r]=n;var c=a.children("a").data("index",n).click($.proxy(this._showTab,this));s==r&&c.trigger("click")}s===!0&&this._tabs.length&&this._tabs[0].tab.children("a").trigger("click");var u=this.element.data("collapsible");void 0!==u&&(this.options.collapsible=u)},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,i){var s=null===e?t:$(e.currentTarget).data("index");i=this.options.collapsible&&i!==!0?!1:!0;for(var n=null,a=0;a<this._tabs.length;a++){var o=this._tabs[a];if(a==s){if(!o.tab.hasClass("active")){o.tab.addClass("active"),o.container.addClass("active"),n=o;continue}if(i===!0)continue}o.tab.removeClass("active"),o.container.removeClass("active")}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==n&&this._trigger("show",{},{activeTab:n}),this._span.css({transform:"translateX("+n.tab[0].offsetLeft+"px)",width:n.tab[0].clientWidth+"px"}),$(window).trigger("resize")},showTab:function(e,t){return $.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0===this._tabs[e]?void console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'"):void this._showTab(null,e,t)},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
+(function (window, undefined) {"use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({_dialog:null,init:function(){this._dialog=null,this._initCodeBoxes(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.BBCode.CodeViewer",$.proxy(this._initCodeBoxes,this)),WCF.DOMNodeInsertedHandler.execute()},_initCodeBoxes:function(){$(".codeBox:not(.jsCodeViewer)").each($.proxy(function(e,t){var i=$(t).addClass("jsCodeViewer");$('<span class="icon icon16 fa-files-o pointer jsTooltip" title="'+WCF.Language.get("wcf.message.bbcode.code.copy")+'" />').appendTo(i.find("div > h3")).click($.proxy(this._click,this))},this))},_click:function(e){var t="";$(e.currentTarget).parents("div").next("ol").children("li").each(function(e,i){t&&(t+="\n"),t+=$(i).text().replace(/\n+$/,"")}),null===this._dialog?(this._dialog=$('<div><textarea cols="60" rows="12" readonly="readonly" /></div>').hide().appendTo(document.body),this._dialog.children("textarea").val(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.bbcode.code.copy")})):(this._dialog.children("textarea").val(t),this._dialog.wcfDialog("open")),this._dialog.children("textarea").select()}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s?s:".jsRevertButton",this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change(function(){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),e._oldIDInputs.each(function(){var e=parseInt($(this).val());"current"===$(this).val()&&(e=1/0),e>=t?$(this).disable():$(this).enable()})}),this._oldIDInputs.change(function(){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),e._newIDInputs.each(function(){var e=parseInt($(this).val());"current"===$(this).val()&&(e=1/0),t>=e?$(this).disable():$(this).enable()})}),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each(function(t,i){var s=$(i);s.find(e._buttonSelector).click($.proxy(e._click,e))})},_click:function(e){var t=$(e.currentTarget);if(e.preventDefault(),t.data("confirmMessage")){var i=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"cancel"!==e&&i._sendRequest(t)},void 0,void 0,!0)}else this._sendRequest(t)},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(){window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).unload(function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){return this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),void(this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}))):void console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):void console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){var t=this._getMessage();return null===t?void console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'"):(this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1)},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each(function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))}),{data:{message:e},options:t}},_getMessage:function(){return $.browser.redactor?this._textarea.data("redactor")?this._textarea.redactor("wutil.getText"):null:$.trim(this._textarea.val())},_success:function(e){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(){},_failure:function(e){if(null===e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;this._previewButton.html(this._previewButtonLabel).enable();var t=this._textarea.next("small.innerError").empty();return t.length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent())),t.html(e.returnValues.errorType),!1}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_attachmentObjectType:null,_attachmentObjectID:null,_tmpHash:null,init:function(e,t,i){this._super("wcf\\data\\bbcode\\MessagePreviewAction","text","previewButton"),this._attachmentObjectType=e||null,this._attachmentObjectID=t||null,this._tmpHash=i||null},_handleResponse:function(e){var t=$("#previewContainer");t.length||(t=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="messageTextPreview"></div></section>').prependTo($("#messageContainer")).wcfFadeIn()),t.find("div:eq(0)").html(e.returnValues.message),(new WCF.Effect.Scroll).scrollTo(t)},_getParameters:function(e){var t=this._super(e);return null!=this._attachmentObjectType&&(t.attachmentObjectType=this._attachmentObjectType,t.attachmentObjectID=this._attachmentObjectID,t.tmpHash=this._tmpHash),t}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('<li class="dropdownDivider" />').appendTo(s),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,$("#smilies-"+this._wysiwygSelector).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){e.preventDefault();var i=parseInt(t.activeTab.tab.data("smileyCategoryID"));if(i&&!t.activeTab.container.children("ul.smileyList").length){if(void 0!==this._cache[i])return void t.activeTab.container.html(this._cache[i]);this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()}},_success:function(e){var t=parseInt(e.returnValues.smileyCategoryID);this._cache[t]=e.returnValues.template,$("#smilies-"+this._wysiwygSelector+"-"+t).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({_redactor:null,_wysiwygSelector:"",init:function(e){this._wysiwygSelector=e,WCF.System.Dependency.Manager.register("Redactor_"+this._wysiwygSelector,$.proxy(function(){this._redactor=$("#"+this._wysiwygSelector).redactor("core.getObject"),$(".messageTabMenu[data-wysiwyg-container-id="+this._wysiwygSelector+"]").on("click",".jsSmiley",$.proxy(this._smileyClick,this))},this))},_smileyClick:function(e){e.preventDefault();var t=$(e.currentTarget),i=t.data("smileyCode"),s=t.data("smileyPath");this._redactor.wbbcode.insertSmiley(i,s,!0)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t){require(["WoltLab/WCF/Ui/Message/InlineEditor"],function(i){i.init({extendedForm:t===!0,className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLab/WCF/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:null,_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:null,_quoteManager:null,init:function(e,t,i,s,n,a,o){return this._className=t,""==this._className?void console.debug("[WCF.Message.QuoteManager] Empty class name given, aborting."):(this._objectType=i,""==this._objectType?void console.debug("[WCF.Message.QuoteManager] Empty object type name given, aborting."):(this._containerSelector=s,this._message="",this._messageBodySelector=n,this._messageContentSelector=a,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initContainers(),o=o&&e.supportPaste()?!0:!1,this._initCopyQuote(o),$(document).mouseup($.proxy(this._mouseUp,this)),this._quoteManager=e,this._quoteManager.register(this._objectType,this),void WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Quote.Handler"+i.hashCode(),$.proxy(this._initContainers,this))))},_initContainers:function(){var e=this;$(this._containerSelector).each(function(t,i){var s=$(i),n=s.wcfIdentify();if(!e._containers[n]){if(e._containers[n]=s,s.hasClass("jsInvalidQuoteTarget"))return!0;null!==e._messageBodySelector&&(s=s.find(e._messageBodySelector).data("containerID",n)),s.mousedown($.proxy(e._mouseDown,e)),e._containers[n].find(".jsQuoteMessage").click($.proxy(e._saveFullQuote,e))}})},_mouseDown:function(e){this._copyQuote.hide();var t=$(e.currentTarget);if(this._messageBodySelector&&(t=this._containers[t.data("containerID")]),t.hasClass("jsInvalidQuoteTarget"))return void(this._activeContainerID="");for(var i=e.target;i!==t[0];){if("BLOCKQUOTE"===i.tagName)return void(this._activeContainerID="");i=i.parentElement}this._activeContainerID=t.wcfIdentify(),$.browser.mozilla&&t.find("img").each(function(){var e=$(this);e.data("__alt",e.attr("alt")).removeAttr("alt")})},_getNodeText:function(e){var t=function(e){switch(e.tagName){case"BLOCKQUOTE":case"H3":case"SCRIPT":return NodeFilter.FILTER_REJECT;default:return NodeFilter.FILTER_ACCEPT}};t.acceptNode=t;for(var i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,t,!0),s="";i.nextNode();){var n=i.currentNode;if(n.nodeType===Node.ELEMENT_NODE)switch(n.tagName){case"BR":case"LI":case"UL":s+="\n";break;case"TD":$.browser.msie||(s+="\n")}else s+=n.nodeValue.replace(/\n/g,"")}return s},_mouseUp:function(e){if(""==this._activeContainerID)return void this._copyQuote.hide();var t=this._containers[this._activeContainerID],i=this._getSelectedText(),s=$.trim(i);if(""==s)return void this._copyQuote.hide();for(var n=this._messageBodySelector?t.find(this._messageContentSelector)[0]:t[0],a=e.target;a!==t[0];){if(null===a||"BLOCKQUOTE"===a.tagName)return void this._copyQuote.hide();a=a.parentElement}var o=window.getSelection().getRangeAt(0);if(!this._elementInsideContainer(o.startContainer,n)||!this._elementInsideContainer(o.endContainer,n))return void this._copyQuote.hide();var r=this._getNodeText(n);if(-1!==this._normalize(r).indexOf(this._normalize(s))){this._copyQuote.show();var l=this._getBoundingRectangle(t,window.getSelection()),c=this._copyQuote.getDimensions("outer"),u=(l.right-l.left)/2-c.width/2+l.left;this._copyQuote.css({top:l.top-c.height-7+"px",left:u+"px"}),this._copyQuote.hide(),this._activeContainerID="";var h=this;new WCF.PeriodicalExecuter(function(e){e.stop();var i=$.trim(h._getSelectedText());""!=i&&(h._copyQuote.show(),h._message=i,h._objectID=t.data("objectID"),$.browser.mozilla&&t.find("img").each(function(){var e=$(this);e.attr("alt",e.data("__alt"))}))},10)}},_elementInsideContainer:function(e,t){for(e.nodeType===Node.TEXT_NODE&&(e=e.parentNode);e;){if(e===t)return!0;e=e.parentNode}return!1},_normalize:function(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")},_getOffset:function(e,t){e.collapse(t);var i=WCF.getRandomID(),s=document.createElement("span");s.innerHTML='<span id="'+i+'"></span>';for(var n,a=document.createDocumentFragment();n=s.firstChild;)a.appendChild(n);e.insertNode(a),s=$("#"+i);var o=s.offset();return o.top=o.top-$(window).scrollTop(),s.remove(),o},_getBoundingRectangle:function(e,t){var i=null;if(document.createRange&&"undefined"!=typeof document.createRange().getBoundingClientRect){if(t.rangeCount>0){var s=t.getRangeAt(0).getBoundingClientRect();i={left:s.left,right:s.right,top:s.top+$(document).scrollTop()}}}else if(document.selection&&"Control"!=document.selection.type){var n=document.selection.createRange();i={left:n.boundingLeft,right:n.boundingRight,top:n.boundingTop}}return i},_saveSelection:function(e){if(window.getSelection&&document.createRange){var t=window.getSelection().getRangeAt(0),i=t.cloneRange();i.selectNodeContents(e),i.setEnd(t.startContainer,t.startOffset);var s=i.toString().length;return{start:s,end:s+t.toString().length}}var n=document.selection.createRange(),a=document.body.createTextRange();a.moveToElementText(e),a.setEndPoint("EndToStart",n);var s=a.text.length;return{start:s,end:s+n.text.length}},_restoreSelection:function(e,t){if(window.getSelection&&document.createRange){var i=0,s=document.createRange();s.setStart(e,0),s.collapse(!0);for(var n,a=[e],o=!1,r=!1;!r&&(n=a.pop());)if(n.nodeType==Node.TEXT_NODE){var l=i+n.length;!o&&t.start>=i&&t.start<=l&&(s.setStart(n,t.start-i),o=!0),o&&t.end>=i&&t.end<=l&&(s.setEnd(n,t.end-i),r=!0),i=l}else for(var c=n.childNodes.length;c--;)a.push(n.childNodes[c]);var u=window.getSelection();u.removeAllRanges(),u.addRange(s)}else{var h=document.body.createTextRange();h.moveToElementText(e),h.collapse(!0),h.moveEnd("character",t.end),h.moveStart("character",t.start),h.select()}},_initCopyQuote:function(e){if(this._copyQuote=$("#quoteManagerCopy"),!this._copyQuote.length){this._copyQuote=$('<div id="quoteManagerCopy" class="balloonTooltip"><span class="jsQuoteManagerStore">'+WCF.Language.get("wcf.message.quote.quoteSelected")+'</span><span class="pointer"><span></span></span></div>').hide().appendTo(document.body);var t=this._copyQuote.children("span.jsQuoteManagerStore").click($.proxy(this._saveQuote,this));e&&$('<span class="jsQuoteManagerQuoteAndInsert">'+WCF.Language.get("wcf.message.quote.quoteAndReply")+"</span>").click($.proxy(this._saveAndInsertQuote,this)).insertAfter(t)}},_getSelectedText:function(){var e=window.getSelection();return e.rangeCount?this._getNodeText(e.getRangeAt(0).cloneContents()):""},_saveFullQuote:function(e){var t=$(e.currentTarget);this._proxy.setOption("data",{actionName:"saveFullQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[t.data("objectID")]}),this._proxy.sendRequest(),t.data("isQuoted")?t.data("isQuoted",!1).children("a").removeClass("active"):t.data("isQuoted",!0).children("a").addClass("active");var i=t.parents(".buttonGroupNavigation");return i.hasClass("jsMobileButtonGroupNavigation")&&i.children(".dropdownLabel").trigger("click"),e.stopPropagation(),!1},_saveQuote:function(e){e=e===!0?!0:!1,this._proxy.setOption("data",{actionName:"saveQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[this._objectID],parameters:{message:this._message,renderQuote:e}}),this._proxy.sendRequest()},_saveAndInsertQuote:function(){this._saveQuote(!0)},_success:function(e){if(void 0!==e.returnValues.count){void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs);var t=void 0!==e.returnValues.fullQuoteObjectIDs?e.returnValues.fullQuoteObjectIDs:{};this._quoteManager.updateCount(e.returnValues.count,t)}switch(e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&WCF.System.Event.fireEvent("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName?!0:!1,quote:e.returnValues.renderedQuote})}},updateFullQuoteObjectIDs:function(e){for(var t in this._containers)this._containers[t].find(".jsQuoteMessage").each(function(t,i){var s=$(i).data("isQuoted",0);s.children("a").removeClass("active"),WCF.inArray(s.data("objectID"),e)&&s.data("isQuoted",1).children("a").addClass("active")})}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorElement:null,_editorElementAlternative:null,_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_showQuotes:null,_supportPaste:!1,init:function(e,t,i,s){this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorElement=null,this._editorElementAlternative=null,this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._showQuotes=null,this._supportPaste=!1,t&&(this._editorElement=$("#"+t),this._editorElement.length&&(this._supportPaste=!0,this._form=this._editorElement.parents("form:eq(0)"),this._form.length?(this._form.submit($.proxy(this._submit,this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=i===!0?!0:!1))),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php/MessageQuote/?t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){this._insertQuote(null,void 0,e)}.bind(this))},setAlternativeEditor:function(e){this._editorElementAlternative=e},clearAlternativeEditor:function(){this._editorElementAlternative=null},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){this._count=parseInt(e)||0,this._toggleShowQuotes();for(var i in this._handlers){var s=t[i]||[];this._handlers[i].updateFullQuoteObjectIDs(s)}},insertQuotes:function(e,t,i){return this._insertQuotes?void new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):void(this._insertQuotes=!0)},_toggleShowQuotes:function(){if(this._count){null===this._showQuotes&&(this._showQuotes=$("#showQuotes"),this._showQuotes.length||(this._showQuotes=$('<div id="showQuotes" class="balloonTooltip" />').click($.proxy(this._click,this)).appendTo(document.body)));var e=WCF.Language.get("wcf.message.quote.showQuotes").replace(/#count#/,this._count);this._showQuotes.text(e).show()}else null!==this._showQuotes&&this._showQuotes.hide();this._hasTemplate=!1},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e);var t=$('<div class="formSubmit" />').appendTo(this._dialog);this._supportPaste&&(this._buttons.insert=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("<button>"+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0;var i=this._dialog.find(".jsInsertQuote");if(this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length){var s=this;this._dialog.find("input.jsRemoveQuote").each(function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})}},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t=$(e.currentTarget),i=t.parent("li").attr("data-quote-id");if(t.prop("checked"))this._removeOnSubmit.push(i);else for(var s in this._removeOnSubmit)if(this._removeOnSubmit[s]==i){delete this._removeOnSubmit[s];break}},_insertSelected:function(){if(null===this._editorElementAlternative){var e=$(".jsQuickReply:eq(0)").data("__api");e&&!e.getContainer().is(":visible")&&(this._insertQuotes=!1,e.click(null))}this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.find("input.jsCheckbox:checked").each($.proxy(function(e,t){this._insertQuote(null,t)},this)),this._dialog.wcfDialog("close")},_insertQuote:function(e,t,i){var s,n,a,o=null;if(void 0===i){o=null===e?$(t).parents("li"):$(e.currentTarget).parents("li"),s=$.trim(o.children("div.jsFullQuote").text());var r=o.parents("article.message");n=r.attr("data-username"),a=r.data("link"),i={forceInsert:!0}}else s=i.quote.text,n=i.quote.username,a=i.quote.link;if($.browser.redactor)if(null===this._editorElementAlternative){var l=!0;if(null!==e||null!==i){var c=$(".jsQuickReply:eq(0)").data("__api");c&&!c.getContainer().is(":visible")&&(i.forceInsert?(this._insertQuotes=!1,c.click(null)):l=!1)}l&&this._editorElement.length&&this._editorElement.redactor("wbbcode.insertQuoteBBCode",n,a,s,s)}else this._editorElementAlternative.redactor("wbbcode.insertQuoteBBCode",n,a,s,s);else{s="[quote='"+n+"','"+a+"']"+s+"[/quote]";var u=null===this._editorElementAlternative?this._editorElement:this._editorElementAlternative,h=u.val();if(s+="\n\n",0==h.length)u.val(s);else{var d=u.getCaret();u.val(h.substr(0,d)+s+h.substr(d))}}null!==o&&this._removeOnSubmit.push(o.attr("data-quote-id")),null!==e&&this._dialog.wcfDialog("close")},_removeSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked");var e=[];if(this._dialog.find("input.jsCheckbox:checked").each(function(t,i){e.push($(i).parents("li").attr("data-quote-id"))}),e.length){var t=[];for(var i in this._handlers)t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){if(this._supportPaste&&this._removeOnSubmit.length>0){var e=this._form.find(".formSubmit");for(var t in this._removeOnSubmit)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)}},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e=[];for(var t in this._handlers)e.push(t);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:e.length>0,objectTypes:e}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,init:function(){this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t=$(e.currentTarget),i=t.prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode();if(void 0===this._cache[n]){var a=!1;null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),a=!0):this._dialog.empty();var o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog);$('<input type="text" id="__sharePermalink" class="long" readonly="readonly" />').attr("value",i).appendTo(o);var o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog);$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly="readonly" />').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o);var o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog);$('<input type="text" id="__sharePermalinkHTML" class="long" readonly="readonly" />').attr("value",'<a href="'+i+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(o),this._cache[n]=this._dialog.html(),this._dialog.wcfDialog(a?{title:WCF.Language.get("wcf.message.share")}:"open")}else this._dialog.html(this._cache[n]).wcfDialog("open");this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click(function(){$(this).select()});navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown(function(){return!1}).removeAttr("readonly").click(function(){this.setSelectionRange(0,9999)})}}),WCF.Message.Share.Page=Class.extend({_dialog:null,_fetchObjectCount:!1,_pageDescription:"",_pageURL:"",_privacySettings:{},_provider:{},_proxy:null,init:function(e,t){this._dialog=null,this._fetchObjectCount=e===!0?!0:!1,this._pageDescription=encodeURIComponent($('meta[property="og:title"]').prop("content")),this._pageURL=encodeURIComponent($('meta[property="og:url"]').prop("content")),this._privacySettings=$.extend({facebook:!1,google:!1,twitter:!1,reddit:!1},t||{}),this._proxy=null,this._initProvider()},_initProvider:function(){var e=$(".messageShareButtons"),t=this;if(this._provider={facebook:{fetch:function(){t._fetchFacebook()},link:e.find(".jsShareFacebook"),share:function(){t._share("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0)}},google:{fetch:void 0,link:e.find(".jsShareGoogle"),share:function(){t._share("google","https://plus.google.com/share?url={pageURL}",!0)}},reddit:{fetch:function(){t._fetchReddit()},link:e.find(".jsShareReddit"),share:function(){t._share("reddit","https://ssl.reddit.com/submit?url={pageURL}",!0)}},twitter:{fetch:void 0,link:e.find(".jsShareTwitter"),share:function(){t._share("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1)}}},$.each(this._provider,function(e,i){t._privacySettings[e]?t._fetchObjectCount&&i.fetch&&i.fetch():i.link.addClass("disabled"),i.link.data("provider",e).click($.proxy(t._click,t))}),WCF.User.userID&&!e.find(".jsShowPrivacySettings").length){var i=$('<li class="jsShowPrivacySettings"><a><span class="icon icon32 fa-gear jsTooltip" title="'+WCF.Language.get("wcf.message.share.privacy")+'" /></a></li>');i.appendTo(e.children("ul")).children("a").click($.proxy(this._openPrivacySettings,this))}},_click:function(e){var t=$(e.currentTarget),i=t.data("provider");t.hasClass("disabled")?WCF.User.userID?this._openPrivacySettings():t.removeClass("disabled"):this._provider[i].share()},_openPrivacySettings:function(){null===this._proxy&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})),this._proxy.setOption("data",{actionName:"getSocialNetworkPrivacySettings",className:"wcf\\data\\user\\UserAction"}),this._proxy.sendRequest()},_success:function(e){switch(e.actionName){case"getSocialNetworkPrivacySettings":this._renderDialog(e);break;case"saveSocialNetworkPrivacySettings":this._updatePrivacySettings(e)}},_renderDialog:function(e){null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share.privacy")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find("input[type=submit]").click($.proxy(this._save,this))},_save:function(){this._proxy.setOption("data",{actionName:"saveSocialNetworkPrivacySettings",className:"wcf\\data\\user\\UserAction",parameters:{facebook:this._dialog.find("input[name=facebook]").is(":checked"),google:this._dialog.find("input[name=google]").is(":checked"),reddit:this._dialog.find("input[name=reddit]").is(":checked"),twitter:this._dialog.find("input[name=twitter]").is(":checked")}}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")},_updatePrivacySettings:function(e){this._privacySettings=$.extend(this._privacySettings,e.returnValues.settings);var t=this;$.each(e.returnValues.settings,function(e,i){t._privacySettings[e]=i?!0:!1,i?(t._provider[e].link.removeClass("disabled"),t._fetchObjectCount&&t._provider[e].fetch&&t._provider[e].fetch()):t._provider[e].link.addClass("disabled")}),(new WCF.System.Notification).show()},_share:function(e,t,i){window.open(t.replace(/{pageURL}/,this._pageURL).replace(/{text}/,this._pageDescription+(i?" "+this._pageURL:"")),e,"height=600,width=600")},_fetchCount:function(e,t,i){var s={autoSend:!0,dataType:"jsonp",showLoadingOverlay:!1,success:t,suppressErrors:!0,type:"GET",url:e.replace(/{pageURL}/,this._pageURL)};i&&(s.jsonp=i),new WCF.Action.Proxy(s)},_fetchFacebook:function(){this._fetchCount("https://graph.facebook.com/?id={pageURL}",$.proxy(function(e){e.shares&&this._provider.facebook.link.children("span.badge").show().text(e.shares)},this))},_fetchReddit:function(){window.location.protocol.match(/^https/)||this._fetchCount("http://www.reddit.com/api/info.json?url={pageURL}",$.proxy(function(e){e.data.children.length&&this._provider.reddit.link.children("span.badge").show().text(e.data.children[0].data.score)},this),"jsonp")}}),WCF.Message.UserMention=Class.extend({_caretPosition:null,_className:"wcf\\data\\user\\UserAction",_dropdown:null,_dropdownMenu:null,_itemIndex:-1,_lineHeight:null,
+_mentionStart:"",_redactor:null,_timer:null,init:function(e){$.browser.mobile&&$.browser.mozilla||(this._textarea=$("#"+e),this._redactor=this._textarea.redactor("core.getObject"),this._dropdown=this._textarea.redactor("core.getEditor"),this._dropdownMenu=$('<ul class="dropdownMenu userSuggestionList" />').appendTo(this._textarea.parent()),WCF.Dropdown.initDropdownFragment(this._dropdown,this._dropdownMenu),this._proxy=new WCF.Action.Proxy({autoAbortPrevious:!0,success:$.proxy(this._success,this)}),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+e,$.proxy(this._keydown,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keyup_"+e,$.proxy(this._keyup,this)))},_clearList:function(){this._hideList(),this._dropdownMenu.empty()},_click:function(e){if($.browser.mozilla&&"P"==this._caretPosition.startContainer.nodeName){var t=this._caretPosition.startContainer.childNodes[this._caretPosition.startOffset-1];this._caretPosition=document.createRange(),this._caretPosition.selectNodeContents(t),this._caretPosition.collapse()}this._redactor.wutil.replaceRangesWith(this._caretPosition),this._setUsername($(e.currentTarget).data("username"))},_createListItem:function(e){var t=$("<li />").data("username",e.label).click($.proxy(this._click,this)).appendTo(this._dropdownMenu),i=$("<div />").addClass("box16").appendTo(t);i.append($(e.icon)),i.append($("<div />").append($("<span />").text(e.label)))},_getDropdownMenuPosition:function(){var e=getSelection().getRangeAt(0).cloneRange(),t=document.createRange();t.setStart(e.startContainer,e.startOffset-(this._mentionStart.length+1)),t.setEnd(e.startContainer,e.startOffset),this._redactor.wutil.replaceRangesWith(t);var i=getSelection().getRangeAt(0),s=i.getBoundingClientRect(),n=$(window),a={top:Math.round(s.bottom)+n.scrollTop(),left:Math.round(s.left)+n.scrollLeft()};return null===this._lineHeight&&(this._lineHeight=Math.round(s.bottom-s.top)),this._redactor.wutil.replaceRangesWith(e),this._caretPosition=e,a},_setUsername:function(e){null!==this._timer&&(this._timer.stop(),this._timer=null),this._proxy.abortPrevious();var t=getSelection().getRangeAt(0).cloneRange();this._redactor.buffer.set();var i=t.startContainer,s=t.startOffset-(this._mentionStart.length+1);0>s&&(i=i.previousSibling,s=i.length-(this._mentionStart.length+1)-(t.startOffset-1));var n=document.createRange();n.setStart(i,s),n.setEnd(t.startContainer,t.startOffset),this._redactor.wutil.replaceRangesWith(n);var a=getSelection().getRangeAt(0);a.deleteContents(),a.collapse(!0),-1!==e.indexOf("'")&&(e=e.replace(/'/g,"''")),e="'"+e+"'";var o=document.createTextNode("@"+e);a.insertNode(o);var n=document.createRange();n.setStart(o,e.length+1),n.setEnd(o,e.length+1),this._redactor.wutil.replaceRangesWith(n),this._hideList()},_getParameters:function(){return{data:{includeUserGroups:!1,searchString:this._mentionStart}}},_getTextLineInFrontOfCaret:function(){if(this._redactor.selection.getHtml().length)return"";var e=getSelection().getRangeAt(0);$.browser.mozilla&&3==e.startContainer.nodeType&&e.startContainer.parentNode.normalize();var t=e.startContainer.textContent.substr(0,e.startOffset),i=t;t="";for(var s=!1,n=0;n<i.length;n++){var a=i.charCodeAt(n).toString(16);"200b"==a||/\s/.test(i[n])&&("a0"!=a&&"20"!=a||s)?(s=!1,t=""):(("a0"==a||"20"==a)&&(s=!0),"@"===i[n]&&n&&/\s/.test(i[n-1])&&(s=!1,t=""),t+=i[n])}return t},_hideList:function(){this._dropdown.removeClass("dropdownOpen"),this._dropdownMenu.removeClass("dropdownOpen"),this._itemIndex=-1},_keydown:function(e){if(!this._redactor.wutil.inPlainMode()&&this._dropdownMenu.is(":visible"))switch(e.event.which){case $.ui.keyCode.ENTER:e.event.preventDefault(),e.cancel=!0,this._dropdownMenu.children("li").eq(this._itemIndex).trigger("click");break;case $.ui.keyCode.UP:e.cancel=!0,e.event.preventDefault(),this._selectItem(this._itemIndex-1);break;case $.ui.keyCode.DOWN:e.cancel=!0,e.event.preventDefault(),this._selectItem(this._itemIndex+1)}},_keyup:function(e){if(this._redactor.wutil.inPlainMode())return!0;if(null!==this._timer&&(this._timer.stop(),this._timer=null),this._proxy.abortPrevious(),e.event.which!==$.ui.keyCode.ENTER&&!(this._dropdownMenu.is(":visible")&&e.event.which in{13:1,38:1,40:1})){var t=this._getTextLineInFrontOfCaret();if(t){var i=t.match(/@([^,]{3,})$/);i?(!i.index||t[i.index-1].match(/\s/))&&(this._mentionStart=i[1],null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters()}),this._proxy.sendRequest(),this._timer.stop(),this._timer=null},this),500)):this._hideList()}else this._hideList()}},_selectItem:function(e){var t=this._dropdownMenu.children("li");0>e?e=t.length-1:e+1>t.length&&(e=0),t.removeClass("dropdownNavigationItem"),t.eq(e).addClass("dropdownNavigationItem"),this._itemIndex=e},_showList:function(){this._dropdown.addClass("dropdownOpen"),this._dropdownMenu.addClass("dropdownOpen")},_success:function(e){if(this._clearList(!1),$.getLength(e.returnValues)){for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}this._updateSuggestionListPosition(),this._showList()}},_updateSuggestionListPosition:function(){try{var e=this._getDropdownMenuPosition();e.top+=5,this._dropdownMenu.css(e),this._selectItem(0),e.top+this._dropdownMenu.outerHeight()+10>$(window).height()+$(document).scrollTop()?(this._dropdownMenu.addClass("dropdownArrowBottom"),this._dropdownMenu.css({top:e.top-this._dropdownMenu.outerHeight()-2*this._lineHeight+5})):this._dropdownMenu.removeClass("dropdownArrowBottom")}catch(e){}}}),$.widget("wcf.messageTabMenu",{_span:null,_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e=this.element.find("> nav"),t=e.find("> ul > li:not(.jsFlexibleMenuDropdown)"),i=this.element.find("> div, > fieldset");if(t.length!=i.length)return void console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.");this._span=$("<span />").appendTo(e);var s=this.element.data("preselect");this._tabs=[],this._tabsByName={};for(var n=0;n<t.length;n++){var a=$(t[n]),o=$(i[n]),r=a.data("name");if(void 0===r){var l=a.children("a").prop("href");void 0!==l&&l.match(/#([a-zA-Z_-]+)$/)&&(r=RegExp.$1),void 0===r&&(r=a.wcfIdentify(),console.debug("[wcf.messageTabMenu] Missing name attribute, assuming generic ID '"+r+"'"))}this._tabs.push({container:o,name:r,tab:a}),this._tabsByName[r]=n;var c=a.children("a").data("index",n).click($.proxy(this._showTab,this));s==r&&c.trigger("click")}s===!0&&this._tabs.length&&this._tabs[0].tab.children("a").trigger("click");var u=this.element.data("collapsible");void 0!==u&&(this.options.collapsible=u)},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,i){var s=null===e?t:$(e.currentTarget).data("index");i=this.options.collapsible&&i!==!0?!1:!0;for(var n=null,a=0;a<this._tabs.length;a++){var o=this._tabs[a];if(a==s){if(!o.tab.hasClass("active")){o.tab.addClass("active"),o.container.addClass("active"),n=o;continue}if(i===!0)continue}o.tab.removeClass("active"),o.container.removeClass("active")}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==n&&this._trigger("show",{},{activeTab:n}),this._span.css({transform:"translateX("+n.tab[0].offsetLeft+"px)",width:n.tab[0].clientWidth+"px"}),$(window).trigger("resize")},showTab:function(e,t){return $.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0===this._tabs[e]?void console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'"):void this._showTab(null,e,t)},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
 
 // WCF.Poll.js
 (function (window, undefined) {"use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:null,_count:0,_maxOptions:0,init:function(t,e,i){return this._count=0,this._maxOptions=i||-1,this._container=$("#"+t).children("ol:eq(0)"),this._container.length?(e=e||[],this._createOptionList(e),this._container.parents("form").submit($.proxy(this._submit,this)),void new WCF.Sortable.List(t,"",void 0,{toleranceElement:"> div"},!0)):void console.debug("[WCF.Poll.Management] Invalid container id given, aborting.")},_createOptionList:function(t){for(var e=0,i=t.length;i>e;e++){var n=t[e];this._createOption(n.optionValue,n.optionID)}this._createOption()},_createOption:function(t,e,i){t=t||"",e=parseInt(e)||0,i=i||null;var n=$('<li class="sortableNode" />').data("optionID",e);null===i?n.appendTo(this._container):n.insertAfter(i);var o=$('<div class="pollOptionInput" />').appendTo(n);$('<span class="icon icon16 fa-plus jsTooltip jsAddOption pointer" title="'+WCF.Language.get("wcf.poll.button.addOption")+'" />').click($.proxy(this._addOption,this)).appendTo(o),$('<span class="icon icon16 fa-times jsTooltip jsDeleteOption pointer" title="'+WCF.Language.get("wcf.poll.button.removeOption")+'" />').click($.proxy(this._removeOption,this)).appendTo(o);var s=$('<input type="text" value="'+t+'" maxlength="255" />').keydown($.proxy(this._keyDown,this)).appendTo(o);s.click(function(){document.activeElement!==this&&this.focus()}),null!==i&&s.focus(),WCF.DOMNodeInsertedHandler.execute(),this._count++,this._count===this._maxOptions&&this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")},_keyDown:function(t){return 13!==t.which?!0:($(t.currentTarget).prev(".sortableButtonContainer").children(".jsAddOption").trigger("click"),t.preventDefault(),t.stopPropagation(),!1)},_addOption:function(t){if(this._count===this._maxOptions)return!1;var e=$(t.currentTarget).parents("li");this._createOption(void 0,void 0,e)},_removeOption:function(t){$(t.currentTarget).parents("li").remove(),this._count--,this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled"),0==this._container.children("li").length&&this._createOption()},_submit:function(){var t=[];if(this._container.children("li").each(function(e,i){var n=$(i),o=$.trim(n.find("input").val());""!=o&&t.push({optionID:n.data("optionID"),optionValue:o})}),t.length)for(var e=this._container.parents("form").find(".formSubmit"),i=0,n=t.length;n>i;i++){var o=t[i];$('<input type="hidden" name="pollOptions['+i+']" />').val(o.optionID+"_"+o.optionValue).appendTo(e)}}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var e=$(t);if(!e.length)return void console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.");this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php/Poll/?t="+SECURITY_TOKEN});var i=this;e.each(function(t,e){var n=$(e),o=n.data("pollID");void 0===i._polls[o]&&(i._cache[o]={result:"",vote:""},i._polls[o]=n,i._canViewParticipants[o]=n.data("canViewParticipants")?!0:!1,i._canViewResult[o]=n.data("canViewResult")?!0:!1,i._canVote[o]=n.data("canVote")?!0:!1,i._bindListeners(o),n.data("inVote")&&i._prepareVote(o),i._toggleButtons(o))})},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[i]&&this._polls[i].data("inVote")&&(this._cache[i].result?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].result),this._polls[i].data("inVote",!1),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getResult",pollID:i}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canVote[i]&&(this._polls[i].data("inVote")||(this._cache[i].vote?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].vote),this._polls[i].data("inVote",!0),this._prepareVote(i),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getVote",pollID:i}),this._proxy.sendRequest())))},_success:function(t){if(t&&t.actionName){var e=t.pollID;switch(t.resultTemplate&&(this._cache[e].result=t.resultTemplate),t.voteTemplate&&(this._cache[e].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,e);break;case"getVote":this._showVote(null,e);break;case"vote":this._canViewResult[e]=!0,this._canVote[e]=t.canVote?!0:!1,this._showResult(null,e)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),i=this;this._inputElements[t]=e.find("input").change(function(){i._handleVoteButton(t)}),this._handleVoteButton(t);var n=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){i._enforceMaxVotes(t,n)}),this._enforceMaxVotes(t,n))},_enforceMaxVotes:function(t,e){var i=this._inputElements[t];i.filter(":checked").length==e?i.filter(":not(:checked)").disable():i.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],i=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?i.enable():i.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var i=!0;this._polls[t].data("inVote")?(i=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(i=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(i=!1,e.find(".jsButtonPollShowParticipants").show())),i&&e.hide()},_vote:function(t){var e=$(t.currentTarget).data("pollID");if(this._canVote[e]){var i=[];this._inputElements[e].each(function(t,e){var n=$(e);n.is(":checked")&&i.push(n.data("optionID"))}),i.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:i,pollID:e}),this._proxy.sendRequest())}}}); })(this);
index 7d065647c09c57c5ff60e7fd502817b97886c5e1..566d32b4c79a1349f23786f3030267b4d07621a2 100644 (file)
@@ -1,7 +1,7 @@
 var requirejs,require,define;!function(global){function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e){var i;for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}}function eachReverse(e,t){if(e){var i;for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,function(t,a){(i||!hasProp(e,a))&&(!n||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[a]=t:(e[a]||(e[a]={}),mixin(e[a],t,i,n)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,n){var a=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return a.requireType=e,a.requireModules=n,i&&(a.originalError=i),a}function newContext(e){function t(e){var t,i;for(t=0;t<e.length;t++)if(i=e[t],"."===i)e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}function i(e,i,n){var a,r,o,s,l,c,d,u,h,p,f,m,g=i&&i.split("/"),v=L.map,b=v&&v["*"];if(e&&(e=e.split("/"),d=e.length-1,L.nodeIdCompat&&jsSuffixRegExp.test(e[d])&&(e[d]=e[d].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&g&&(m=g.slice(0,g.length-1),e=m.concat(e)),t(e),e=e.join("/")),n&&v&&(g||b)){o=e.split("/");e:for(s=o.length;s>0;s-=1){if(c=o.slice(0,s).join("/"),g)for(l=g.length;l>0;l-=1)if(r=getOwn(v,g.slice(0,l).join("/")),r&&(r=getOwn(r,c))){u=r,h=s;break e}!p&&b&&getOwn(b,c)&&(p=getOwn(b,c),f=s)}!u&&p&&(u=p,h=f),u&&(o.splice(0,h,u),e=o.join("/"))}return a=getOwn(L.pkgs,e),a?a:e}function n(e){isBrowser&&each(scripts(),function(t){return t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===y.contextName?(t.parentNode.removeChild(t),!0):void 0})}function a(e){var t=getOwn(L.paths,e);return t&&isArray(t)&&t.length>1?(t.shift(),y.require.undef(e),y.makeRequire(null,{skipMap:!0})([e]),!0):void 0}function r(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function o(e,t,n,a){var o,s,l,c,d=null,u=t?t.name:null,h=e,p=!0,f="";return e||(p=!1,e="_@r"+(I+=1)),c=r(e),d=c[0],e=c[1],d&&(d=i(d,u,a),s=getOwn(S,d)),e&&(d?f=s&&s.normalize?s.normalize(e,function(e){return i(e,u,a)}):-1===e.indexOf("!")?i(e,u,a):e:(f=i(e,u,a),c=r(f),d=c[0],f=c[1],n=!0,o=y.nameToUrl(f))),l=!d||s||n?"":"_unnormalized"+(N+=1),{prefix:d,name:f,parentMap:t,unnormalized:!!l,url:o,originalName:h,isDefine:p,id:(d?d+"!"+f:f)+l}}function s(e){var t=e.id,i=getOwn(E,t);return i||(i=E[t]=new y.Module(e)),i}function l(e,t,i){var n=e.id,a=getOwn(E,n);!hasProp(S,n)||a&&!a.defineEmitComplete?(a=s(e),a.error&&"error"===t?i(a.error):a.on(t,i)):"defined"===t&&i(S[n])}function c(e,t){var i=e.requireModules,n=!1;t?t(e):(each(i,function(t){var i=getOwn(E,t);i&&(i.error=e,i.events.error&&(n=!0,i.emit("error",e)))}),n||req.onError(e))}function d(){globalDefQueue.length&&(apsp.apply(D,[D.length,0].concat(globalDefQueue)),globalDefQueue=[])}function u(e){delete E[e],delete x[e]}function h(e,t,i){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,each(e.depMaps,function(n,a){var r=n.id,o=getOwn(E,r);!o||e.depMatched[a]||i[r]||(getOwn(t,r)?(e.defineDep(a,S[r]),e.check()):h(o,t,i))}),i[n]=!0)}function p(){var e,t,i=1e3*L.waitSeconds,r=i&&y.startTime+i<(new Date).getTime(),o=[],s=[],l=!1,d=!0;if(!b){if(b=!0,eachProp(x,function(e){var i=e.map,c=i.id;if(e.enabled&&(i.isDefine||s.push(e),!e.error))if(!e.inited&&r)a(c)?(t=!0,l=!0):(o.push(c),n(c));else if(!e.inited&&e.fetched&&i.isDefine&&(l=!0,!i.prefix))return d=!1}),r&&o.length)return e=makeError("timeout","Load timeout for modules: "+o,null,o),e.contextName=y.contextName,c(e);d&&each(s,function(e){h(e,{},{})}),r&&!t||!l||!isBrowser&&!isWebWorker||C||(C=setTimeout(function(){C=0,p()},50)),b=!1}}function f(e){hasProp(S,e[0])||s(o(e[0],null,!0)).init(e[1],e[2])}function m(e,t,i,n){e.detachEvent&&!isOpera?n&&e.detachEvent(n,t):e.removeEventListener(i,t,!1)}function g(e){var t=e.currentTarget||e.srcElement;return m(t,y.onScriptLoad,"load","onreadystatechange"),m(t,y.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function v(){var e;for(d();D.length;){if(e=D.shift(),null===e[0])return c(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));f(e)}}var b,_,y,w,C,L={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},E={},x={},T={},D=[],S={},k={},M={},I=1,N=1;return w={require:function(e){return e.require?e.require:e.require=y.makeRequire(e.map)},exports:function(e){return e.usingExports=!0,e.map.isDefine?e.exports?S[e.map.id]=e.exports:e.exports=S[e.map.id]={}:void 0},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(L.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},_=function(e){this.events=getOwn(T,e.id)||{},this.map=e,this.shim=getOwn(L.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},_.prototype={init:function(e,t,i,n){n=n||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=n.ignore,n.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,y.startTime=(new Date).getTime();var e=this.map;return this.shim?void y.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()})):e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;k[e]||(k[e]=!0,y.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,a=this.exports,r=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(r)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{a=y.execCb(i,r,n,a)}catch(o){e=o}else a=y.execCb(i,r,n,a);if(this.map.isDefine&&void 0===a&&(t=this.module,t?a=t.exports:this.usingExports&&(a=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",c(this.error=e)}else a=r;this.exports=a,this.map.isDefine&&!this.ignore&&(S[i]=a,req.onResourceLoad&&req.onResourceLoad(y,this.map,this.depMaps)),u(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,n=o(e.prefix);this.depMaps.push(n),l(n,"defined",bind(this,function(n){var a,r,d,h=getOwn(M,this.map.id),p=this.map.name,f=this.map.parentMap?this.map.parentMap.name:null,m=y.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(n.normalize&&(p=n.normalize(p,function(e){return i(e,f,!0)})||""),r=o(e.prefix+"!"+p,this.map.parentMap),l(r,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),d=getOwn(E,r.id),void(d&&(this.depMaps.push(r),this.events.error&&d.on("error",bind(this,function(e){this.emit("error",e)})),d.enable()))):h?(this.map.url=y.nameToUrl(h),void this.load()):(a=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),a.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(E,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&u(e.map.id)}),c(e)}),a.fromText=bind(this,function(i,n){var r=e.name,l=o(r),d=useInteractive;n&&(i=n),d&&(useInteractive=!1),s(l),hasProp(L.config,t)&&(L.config[r]=L.config[t]);try{req.exec(i)}catch(u){return c(makeError("fromtexteval","fromText eval for "+t+" failed: "+u,u,[t]))}d&&(useInteractive=!0),this.depMaps.push(l),y.completeLoad(r),m([r],a)}),void n.load(e.name,m,a,L))})),y.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){x[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,n,a;if("string"==typeof e){if(e=o(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(w,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,l(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?l(e,"error",bind(this,this.errback)):this.events.error&&l(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,n=E[i],hasProp(w,i)||!n||n.enabled||y.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(E,e.id);t&&!t.enabled&&y.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},y={config:L,contextName:e,registry:E,defined:S,urlFetched:k,defQueue:D,Module:_,makeModuleMap:o,nextTick:req.nextTick,onError:c,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=L.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){i[t]?(L[t]||(L[t]={}),mixin(L[t],e,!0,!0)):L[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(M[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,i){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=y.makeShimExports(e)),t[i]=e}),L.shim=t),e.packages&&each(e.packages,function(e){var t,i;e="string"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(L.paths[i]=e.location),L.pkgs[i]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(E,function(e,t){e.inited||e.map.unnormalized||(e.map=o(t,null,!0))}),(e.deps||e.callback)&&y.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,a){function r(i,n,l){var d,u,h;return a.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0),"string"==typeof i?isFunction(n)?c(makeError("requireargs","Invalid require call"),l):t&&hasProp(w,i)?w[i](E[t.id]):req.get?req.get(y,i,t,r):(u=o(i,t,!1,!0),d=u.id,hasProp(S,d)?S[d]:c(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(v(),y.nextTick(function(){v(),h=s(o(null,t)),h.skipMap=a.skipMap,h.init(i,n,l,{enabled:!0}),p()}),r)}return a=a||{},mixin(r,{isBrowser:isBrowser,toUrl:function(e){var n,a=e.lastIndexOf("."),r=e.split("/")[0],o="."===r||".."===r;return-1!==a&&(!o||a>1)&&(n=e.substring(a,e.length),e=e.substring(0,a)),y.nameToUrl(i(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(S,o(e,t,!1,!0).id)},specified:function(e){return e=o(e,t,!1,!0).id,hasProp(S,e)||hasProp(E,e)}}),t||(r.undef=function(e){d();var i=o(e,t,!0),a=getOwn(E,e);a.undefed=!0,n(e),delete S[e],delete k[i.url],delete T[e],eachReverse(D,function(t,i){t[0]===e&&D.splice(i,1)}),a&&(a.events.defined&&(T[e]=a.events),u(e))}),r},enable:function(e){var t=getOwn(E,e.id);t&&s(e).enable()},completeLoad:function(e){var t,i,n,r=getOwn(L.shim,e)||{},o=r.exports;for(d();D.length;){if(i=D.shift(),null===i[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);f(i)}if(n=getOwn(E,e),!t&&!hasProp(S,e)&&n&&!n.inited){if(!(!L.enforceDefine||o&&getGlobal(o)))return a(e)?void 0:c(makeError("nodefine","No define call for "+e,null,[e]));f([e,r.deps||[],r.exportsFn])}p()},nameToUrl:function(e,t,i){var n,a,r,o,s,l,c,d=getOwn(L.pkgs,e);if(d&&(e=d),c=getOwn(M,e))return y.nameToUrl(c,t,i);if(req.jsExtRegExp.test(e))s=e+(t||"");else{for(n=L.paths,a=e.split("/"),r=a.length;r>0;r-=1)if(o=a.slice(0,r).join("/"),l=getOwn(n,o)){isArray(l)&&(l=l[0]),a.splice(0,r,l);break}s=a.join("/"),s+=t||(/^data\:|\?/.test(s)||i?"":".js"),s=("/"===s.charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":L.baseUrl)+s}return L.urlArgs?s+((-1===s.indexOf("?")?"?":"&")+L.urlArgs):s},load:function(e,t){req.load(y,e,t)},execCb:function(e,t,i,n){return t.apply(n,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=g(e);y.completeLoad(t.id)}},onScriptError:function(e){var t=g(e);return a(t.id)?void 0:c(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},y.require=y.makeRequire(),y}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){return"interactive"===e.readyState?interactiveScript=e:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.19",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,n){var a,r,o=defContextName;return isArray(e)||"string"==typeof e||(r=e,isArray(t)?(e=t,t=i,i=n):e=[]),r&&r.context&&(o=r.context),a=getOwn(contexts,o),a||(a=contexts[o]=req.s.newContext(o)),r&&a.configure(r),a.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return n.type=e.scriptType||"text/javascript",n.charset="utf-8",n.async=!0,n},req.load=function(e,t,i){var n,a=e&&e.config||{};if(isBrowser)return n=req.createNode(a,t,i),a.onNodeCreated&&a.onNodeCreated(n,a,t,i),n.setAttribute("data-requirecontext",e.contextName),n.setAttribute("data-requiremodule",t),!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera?(n.addEventListener("load",e.onScriptLoad,!1),n.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,n.attachEvent("onreadystatechange",e.onScriptLoad)),n.src=i,currentlyAddingScript=n,baseElement?head.insertBefore(n,baseElement):head.appendChild(n),currentlyAddingScript=null,n;if(isWebWorker)try{importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){return head||(head=e.parentNode),dataMain=e.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(e,t,i){var n,a;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(n=currentlyAddingScript||getInteractiveScript(),n&&(e||(e=n.getAttribute("data-requiremodule")),a=contexts[n.getAttribute("data-requirecontext")])),(a?a.defQueue:globalDefQueue).push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),define("requireLib",function(){}),requirejs.config({paths:{enquire:"3rdParty/enquire",favico:"3rdParty/favico","perfect-scrollbar":"3rdParty/perfect-scrollbar"},shim:{enquire:{exports:"enquire"},favico:{exports:"Favico"},"perfect-scrollbar":{exports:"PerfectScrollbar"}},map:{"*":{Ajax:"WoltLab/WCF/Ajax",AjaxJsonp:"WoltLab/WCF/Ajax/Jsonp",AjaxRequest:"WoltLab/WCF/Ajax/Request",CallbackList:"WoltLab/WCF/CallbackList",Core:"WoltLab/WCF/Core",DateUtil:"WoltLab/WCF/Date/Util",Dictionary:"WoltLab/WCF/Dictionary","Dom/ChangeListener":"WoltLab/WCF/Dom/Change/Listener","Dom/Traverse":"WoltLab/WCF/Dom/Traverse","Dom/Util":"WoltLab/WCF/Dom/Util",Environment:"WoltLab/WCF/Environment",EventHandler:"WoltLab/WCF/Event/Handler",EventKey:"WoltLab/WCF/Event/Key",Language:"WoltLab/WCF/Language",List:"WoltLab/WCF/List",ObjectMap:"WoltLab/WCF/ObjectMap",Permission:"WoltLab/WCF/Permission",StringUtil:"WoltLab/WCF/StringUtil","Ui/Alignment":"WoltLab/WCF/Ui/Alignment","Ui/CloseOverlay":"WoltLab/WCF/Ui/CloseOverlay","Ui/Confirmation":"WoltLab/WCF/Ui/Confirmation","Ui/Dialog":"WoltLab/WCF/Ui/Dialog","Ui/Notification":"WoltLab/WCF/Ui/Notification","Ui/ReusableDropdown":"WoltLab/WCF/Ui/Dropdown/Reusable","Ui/Screen":"WoltLab/WCF/Ui/Screen","Ui/SimpleDropdown":"WoltLab/WCF/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLab/WCF/Ui/TabMenu",Upload:"WoltLab/WCF/Upload"}}}),define("require.config",function(){}),function(e,t){e.elAttr=function(e,t,i){return void 0===i?e.getAttribute(t)||"":void e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var a=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(a,n),a},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elData=function(e,t,i){return t="data-"+t,void 0===i?e.getAttribute(t)||"":void e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.forEach=function(e,t){for(var i=0,n=e.length;n>i;i++)t(e[i],i)},e.objOwns=function(e,t){return e.hasOwnProperty(t)};var i="touchstart"in t.documentElement||"ontouchstart"in e||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0?"touchstart":"click";Object.defineProperty(e,"WCF_CLICK_EVENT",{value:i})}(window,document),define("wcf.globalHelper",function(){}),define("WoltLab/WCF/Core",[],function(){"use strict";var e=function(e){return"object"==typeof e&&(Array.isArray(e)||i.isPlainObject(e))?t(e):e},t=function(t){if(!t)return null;if(Array.isArray(t))return t.slice();var i={};for(var n in t)objOwns(t,n)&&"undefined"!=typeof t[n]&&(i[n]=e(t[n]));return i},i={clone:function(t){return e(t)},convertLegacyUrl:function(e){return URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),t="",n=0,a=i.length;a>n;n++){var r=i[n].trim();r.length&&(t.length&&(t+="-"),t+=r.toLowerCase())}return"index.php?"+t+"/&"})},extend:function(e){e=e||{};for(var t=this.clone(e),i=1,n=arguments.length;n>i;i++){var a=arguments[i];if(a)for(var r in a)objOwns(a,r)&&(Array.isArray(a[r])||"object"!=typeof a[r]?t[r]=a[r]:this.isPlainObject(a[r])?t[r]=this.extend(e[r],a[r]):t[r]=a[r])}return t},inherit:function(e,t,n){if(void 0===e||null===e)throw new TypeError("The constructor must not be undefined or null.");if(void 0===t||null===t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=i.extend(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),n||{})},isPlainObject:function(e){return"object"!=typeof e||null===e||e.nodeType?!1:Object.getPrototypeOf(e)===Object.prototype},getType:function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1")},getUuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})},serialize:function(e,t){var i=[];for(var n in e)if(objOwns(e,n)){var a=t?t+"["+n+"]":n,r=e[n];"object"==typeof r?i.push(this.serialize(r,a)):i.push(encodeURIComponent(a)+"="+encodeURIComponent(r))}return i.join("&")},triggerEvent:function(e,t){var i;try{i=new Event(t,{bubbles:!0,cancelable:!0})}catch(n){i=document.createEvent("Event"),i.initEvent(t,!0,!0)}e.dispatchEvent(i)}};return i}),define("WoltLab/WCF/Dictionary",["Core"],function(e){"use strict";function t(){this._dictionary=i?new Map:{}}var i=objOwns(window,"Map")&&"function"==typeof window.Map;return t.prototype={set:function(e,t){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new TypeError("Only strings can be used as keys, rejected '"+e+"' ("+typeof e+").");i?this._dictionary.set(e,t):this._dictionary[e]=t},"delete":function(e){"number"==typeof e&&(e=e.toString()),i?this._dictionary["delete"](e):this._dictionary[e]=void 0},has:function(e){return"number"==typeof e&&(e=e.toString()),i?this._dictionary.has(e):objOwns(this._dictionary,e)&&"undefined"!=typeof this._dictionary[e]},get:function(e){return"number"==typeof e&&(e=e.toString()),this.has(e)?i?this._dictionary.get(e):this._dictionary[e]:void 0},forEach:function(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");if(i)this._dictionary.forEach(e);else for(var t=Object.keys(this._dictionary),n=0,a=t.length;a>n;n++)e(this._dictionary[t[n]],t[n])},merge:function(){for(var e=0,i=arguments.length;i>e;e++){var n=arguments[e];if(!(n instanceof t))throw new TypeError("Expected an object of type Dictionary, but argument "+e+" is not.");n.forEach(function(e,t){this.set(t,e)}.bind(this))}},toObject:function(){if(!i)return e.clone(this._dictionary);var t={};return this._dictionary.forEach(function(e,i){t[i]=e}),t}},t.fromObject=function(e){var i=new t;for(var n in e)objOwns(e,n)&&i.set(n,e[n]);return i},Object.defineProperty(t.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return i?this._dictionary.size:Object.keys(this._dictionary).length}}),t}),define("WoltLab/WCF/Template.grammar",["require"],function(e){var t=function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i},i=[2,47],n=[5,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,32,33,35,36,37,39,40,41,42,44,46,48],a=[1,33],r=[1,37],o=[1,38],s=[1,39],l=[1,42],c=[1,40],d=[1,44],u=[11,12,14,15,17,20,21,22,23],h=[11,12,14,15,16,17,18,19,20,21,22,23],p=[9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,33,36,39,40,41,42,44,46],f=[28,44,46],m=[12,14],g={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,"}":12,"{":13,T_WS:14,"]":15,"[":16,")":17,"(":18,".":19,"=":20,T_VARIABLE:21,T_VARIABLE_NAME:22,T_QUOTED_STRING:23,"{if":24,COMMAND_PARAMETERS:25,COMMAND_repetition0:26,COMMAND_option0:27,"{/if}":28,"{include":29,COMMAND_PARAMETER_LIST:30,"{implode":31,"{/implode}":32,"{foreach":33,COMMAND_option1:34,"{/foreach}":35,"{lang}":36,"{/lang}":37,VARIABLE:38,"{#":39,"{@":40,"{ldelim}":41,"{rdelim}":42,ELSE:43,"{else}":44,ELSE_IF:45,"{elseif":46,FOREACH_ELSE:47,"{foreachelse}":48,VARIABLE_repetition0:49,VARIABLE_SUFFIX:50,VARIABLE_SUFFIX_option0:51,COMMAND_PARAMETER_VALUE:52,COMMAND_PARAMETERS_repetition_plus0:53,COMMAND_PARAMETER:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"}",13:"{",14:"T_WS",15:"]",16:"[",17:")",18:"(",19:".",20:"=",21:"T_VARIABLE",22:"T_VARIABLE_NAME",23:"T_QUOTED_STRING",24:"{if",28:"{/if}",29:"{include",31:"{implode",32:"{/implode}",33:"{foreach",35:"{/foreach}",36:"{lang}",37:"{/lang}",39:"{#",40:"{@",41:"{ldelim}",42:"{rdelim}",44:"{else}",46:"{elseif",48:"{foreachelse}"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[43,2],[45,4],[47,2],[38,3],[50,3],[50,2],[50,3],[30,5],[30,3],[52,1],[52,1],[25,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[6,0],[6,2],[26,0],[26,2],[27,0],[27,1],[34,0],[34,1],[49,0],[49,2],[51,0],[51,1],[53,1],[53,2]],performAction:function(e,t,i,n,a,r,o){var s=r.length-1;switch(a){case 1:return r[s-1]+";";case 2:var l=r[s].reduce(function(e,t){return t.encode&&!e[1]?e[0]+=" + '"+t.value:t.encode&&e[1]?e[0]+=t.value:!t.encode&&e[1]?e[0]+="' + "+t.value:t.encode||e[1]||(e[0]+=" + "+t.value),e[1]=t.encode,e},["''",!1]);l[1]&&(l[0]+="'"),this.$=l[0];break;case 3:case 4:this.$={encode:!0,value:r[s].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:r[s]};break;case 8:this.$=r[s-1]+r[s];break;case 19:this.$="(function() { if ("+r[s-5]+") { return "+r[s-3]+"; } "+r[s-2].join(" ")+" "+(r[s-1]||"")+" return ''; })()";break;case 20:if(!r[s-1].file)throw new Error("Missing parameter file");this.$=r[s-1].file+".fetch(v)";break;case 21:if(!r[s-3].from)throw new Error("Missing parameter from");if(!r[s-3].item)throw new Error("Missing parameter item");r[s-3].glue||(r[s-3].glue="', '"),this.$="(function() { return "+r[s-3].from+".map(function(item) { v["+r[s-3].item+"] = item; return "+r[s-1]+"; }).join("+r[s-3].glue+"); })()";break;case 22:if(!r[s-4].from)throw new Error("Missing parameter from");if(!r[s-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+r[s-4].from+" instanceof Array) {for (var i = 0; i < "+r[s-4].from+".length; i++) { looped = true;v["+r[s-4].key+"] = i;v["+r[s-4].item+"] = "+r[s-4].from+"[i];result += "+r[s-2]+";}} else {for (var key in "+r[s-4].from+") {if (!"+r[s-4].from+".hasOwnProperty(key)) continue;looped = true;v["+r[s-4].key+"] = key;v["+r[s-4].item+"] = "+r[s-4].from+"[key];result += "+r[s-2]+";}}return (looped ? result : "+(r[s-1]||"''")+"); })()";break;case 23:this.$="Language.get("+r[s-1]+")";break;case 24:this.$="StringUtil.escapeHTML("+r[s-1]+")";break;case 25:this.$="StringUtil.formatNumeric("+r[s-1]+")";break;case 26:this.$=r[s-1];break;case 27:this.$="'{'";break;case 28:this.$="'}'";break;case 29:this.$="else { return "+r[s]+"; }";break;case 30:this.$="else if ("+r[s-2]+") { return "+r[s]+"; }";break;case 31:this.$=r[s];break;case 32:this.$="v['"+r[s-1]+"']"+r[s].join("");break;case 33:this.$=r[s-2]+r[s-1]+r[s];break;case 34:this.$="['"+r[s]+"']";break;case 35:this.$=r[s-2]+(r[s-1]||"")+r[s];break;case 36:this.$=r[s],this.$[r[s-4]]=r[s-2];break;case 37:this.$={},this.$[r[s-2]]=r[s];break;case 40:this.$=r[s].join("");break;case 47:case 49:case 55:this.$=[];break;case 48:case 50:case 56:case 60:r[s-1].push(r[s]);break;case 59:this.$=[r[s]]}},table:[t([5,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,39,40,41,42],i,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,28,32,35,37,44,46,48],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],14:[1,21],15:[1,12],16:[1,13],17:[1,14],18:[1,15],19:[1,16],20:[1,17],21:[1,18],22:[1,19],23:[1,20],24:[1,22],29:[1,23],31:[1,24],33:[1,25],36:[1,26],39:[1,27],40:[1,28],41:[1,29],42:[1,30]}),{1:[2,1]},t(n,[2,48]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),{14:[1,31],21:a,38:32},t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),{11:r,14:o,20:s,21:a,22:l,23:c,25:34,38:41,53:35,54:36},{22:d,30:43},{22:d,30:45},{22:d,30:46},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,37,39,40,41,42],i,{6:3,4:47}),{21:a,38:48},{21:a,38:49},t(n,[2,27]),t(n,[2,28]),t(n,[2,8]),{12:[1,50]},{22:[1,51]},{12:[1,52]},t([12,15,17],[2,40],{38:41,54:53,11:r,14:o,20:s,21:a,22:l,23:c}),t(u,[2,59]),t(u,[2,41]),t(u,[2,42]),t(u,[2,43]),t(u,[2,44]),t(u,[2,45]),t(u,[2,46]),{12:[1,54]},{20:[1,55]},{12:[1,56]},{12:[1,57]},{37:[1,58]},{12:[1,59]},{12:[1,60]},t(n,[2,24]),t(h,[2,55],{49:61}),t(p,i,{6:3,4:62}),t(u,[2,60]),t(n,[2,20]),{21:a,23:[1,64],38:65,52:63},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,32,33,36,39,40,41,42],i,{6:3,4:66}),t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,35,36,39,40,41,42,48],i,{6:3,4:67}),t(n,[2,23]),t(n,[2,25]),t(n,[2,26]),t(u,[2,32],{50:68,16:[1,69],18:[1,71],19:[1,70]}),t(f,[2,49],{26:72}),{12:[2,37],14:[1,73]},t(m,[2,38]),t(m,[2,39]),{32:[1,74]},{34:75,35:[2,53],47:76,48:[1,77]},t(h,[2,56]),{11:r,14:o,20:s,21:a,22:l,23:c,25:78,38:41,53:35,54:36},{22:[1,79]},{11:r,14:o,17:[2,57],20:s,21:a,22:l,23:c,25:81,38:41,51:80,53:35,54:36},{27:82,28:[2,51],43:84,44:[1,86],45:83,46:[1,85]},{22:d,30:87},t(n,[2,21]),{35:[1,88]},{35:[2,54]},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,35,36,39,40,41,42],i,{6:3,4:89}),{15:[1,90]},t(h,[2,34]),{17:[1,91]},{17:[2,58]},{28:[1,92]},t(f,[2,50]),{28:[2,52]},{11:r,14:o,20:s,21:a,22:l,23:c,25:93,38:41,53:35,54:36},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,33,36,39,40,41,42],i,{6:3,4:94}),{12:[2,36]},t(n,[2,22]),{35:[2,31]},t(h,[2,33]),t(h,[2,35]),t(n,[2,19]),{12:[1,95]},{28:[2,29]},t(p,i,{6:3,4:96}),t(f,[2,30])],defaultActions:{4:[2,1],76:[2,54],81:[2,58],84:[2,52],87:[2,36],89:[2,31],94:[2,29]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||h,"number"!=typeof e&&(e=i.symbols_[e]||e),e}var i=this,n=[0],a=[null],r=[],o=this.table,s="",l=0,c=0,d=0,u=2,h=1,p=r.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(m.yy[g]=this.yy[g]);f.setInput(e,m.yy),m.yy.lexer=f,m.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var v=f.yylloc;r.push(v);var b=f.options&&f.options.ranges;"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,y,w,C,L,E,x,T,D,S={};;){if(w=n[n.length-1],this.defaultActions[w]?C=this.defaultActions[w]:((null===_||"undefined"==typeof _)&&(_=t()),C=o[w]&&o[w][_]),"undefined"==typeof C||!C.length||!C[0]){var k="";D=[];for(E in o[w])this.terminals_[E]&&E>u&&D.push("'"+this.terminals_[E]+"'");k=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(k,{text:f.match,token:this.terminals_[_]||_,line:f.yylineno,loc:v,expected:D})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(C[0]){case 1:n.push(_),a.push(f.yytext),r.push(f.yylloc),n.push(C[1]),_=null,y?(_=y,y=null):(c=f.yyleng,s=f.yytext,l=f.yylineno,v=f.yylloc,d>0&&d--);break;case 2:if(x=this.productions_[C[1]][1],
-S.$=a[a.length-x],S._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},b&&(S._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),L=this.performAction.apply(S,[s,c,l,m.yy,C[1],a,r].concat(p)),"undefined"!=typeof L)return L;x&&(n=n.slice(0,-1*x*2),a=a.slice(0,-1*x),r=r.slice(0,-1*x)),n.push(this.productions_[C[1]][0]),a.push(S.$),r.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},v=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,n,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in a)this[r]=a[r];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,i,n;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),r=0;r<a.length;r++)if(i=this._input.match(this.rules[a[r]]),i&&(!t||i[0].length>t[0].length)){if(t=i,n=r,this.options.backtrack_lexer){if(e=this.test_match(i,a[r]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,a[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:return 23;case 3:return 23;case 4:return 21;case 5:return 22;case 6:return 19;case 7:return 16;case 8:return 15;case 9:return 18;case 10:return 17;case 11:return 20;case 12:return 41;case 13:return 42;case 14:return 39;case 15:return 40;case 16:return this.begin("command"),24;case 17:return this.begin("command"),46;case 18:return this.begin("command"),46;case 19:return 44;case 20:return 28;case 21:return 36;case 22:return 37;case 23:return this.begin("command"),29;case 24:return this.begin("command"),31;case 25:return 32;case 26:return this.begin("command"),33;case 27:return 48;case 28:return 35;case 29:return 13;case 30:return this.popState(),12;case 31:return 12;case 32:return 14;case 33:return 5;case 34:return 11}},rules:[/^(?:\{\*.*\*\})/,/^(?:\{literal\}.*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{)/,/^(?:\})/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],inclusive:!0},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34],inclusive:!0}}};return e}();return g.lexer=v,g}),define("WoltLab/WCF/NumberUtil",[],function(){"use strict";var e={round:function(e,t){return"undefined"==typeof t||0===+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!==0?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}};return e}),define("WoltLab/WCF/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{addThousandsSeparator:function(t){return void 0===e&&(e=require("Language")),String(t).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+e.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(i,n){void 0===e&&(e=require("Language")),i=String(t.round(i,n||-2));var a=i.split(".");return i=this.addThousandsSeparator(a[0]),a.length>1&&(i+=e.get("wcf.global.decimalPoint")+a[1]),i=i.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}}}),define("WoltLab/WCF/Template",["./Template.grammar","./StringUtil","Language"],function(e,t,i){"use strict";function n(){this.yy={}}function a(n){void 0===i&&(i=require("Language")),void 0===t&&(t=require("StringUtil"));try{n=e.parse(n),n="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+n,this.fetch=new Function("StringUtil","Language","v",n).bind(void 0,t,i)}catch(a){throw console.debug(a.message),a}}return n.prototype=e,e.Parser=n,e=new n,Object.defineProperty(a,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(e){throw new Error("WCF.Template.callbacks is no longer supported")}}),a.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},a}),define("WoltLab/WCF/Language",["Dictionary","./Template"],function(e,t){"use strict";var i=new e,n={addObject:function(t){i.merge(e.fromObject(t))},add:function(e,t){i.set(e,t)},get:function(e,n){n||(n={});var a=i.get(e);return void 0===a?e:("string"==typeof a&&(i.set(e,new t(a)),a=i.get(e)),a instanceof t&&(a=a.fetch(n)),a)}};return n}),define("WoltLab/WCF/CallbackList",["Dictionary"],function(e){"use strict";function t(){this._dictionary=new e}return t.prototype={add:function(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._dictionary.has(e)||this._dictionary.set(e,[]),this._dictionary.get(e).push(t)},remove:function(e){this._dictionary["delete"](e)},forEach:function(e,t){if(null===e)this._dictionary.forEach(function(e,i){e.forEach(t)});else{var i=this._dictionary.get(e);void 0!==i&&i.forEach(t)}}},t}),define("WoltLab/WCF/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,i=!1;return{add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!i)try{i=!0,t.forEach(null,function(e){e()})}finally{i=!1}}}}),define("WoltLab/WCF/Environment",[],function(){"use strict";var e="other",t="none",i="desktop",n=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var a=window.getComputedStyle(document.documentElement),r=0,o=a.length;o>r;r++){var s=a[r];0===s.indexOf("-ms-")?e="microsoft":0===s.indexOf("-moz-")?e="firefox":0===s.indexOf("-webkit-")&&(e="safari")}var l=window.navigator.userAgent.toLowerCase();-1!==l.indexOf("crios")?(e="chrome",i="ios"):/(?:iphone|ipad|ipod)/.test(l)?(e="safari",i="ios"):-1!==l.indexOf("android")?i="android":-1!==l.indexOf("iemobile")&&(e="microsoft",i="windows"),"desktop"!==i||-1===l.indexOf("mobile")&&-1===l.indexOf("tablet")||(i="mobile"),t="redactor",n=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return i},touch:function(){return n}}}),define("WoltLab/WCF/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function i(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var n,a=i+"Sibling";null!==e&&e!==t;){if(null!==e[i+"ElementSibling"])return!1;if(e[a])for(n=e[a];n;){if(""!==n.textContent.trim())return!1;n=n[a]}e=e.parentNode}return!0}var n=0,a={createFragmentFromHtml:function(e){var t=elCreate("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId:function(){var e;do e="wcf"+n++;while(null!==elById(e));return e},identify:function(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight},outerDimensions:function(e){var t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.scrollY,left:t.left+window.scrollX}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(t,i){var n=!1;for(var a in i)objOwns(i,a)&&(/ !important$/.test(i[a])?(n=!0,i[a]=i[a].replace(/ !important$/,"")):n=!1,"safari"!==e.browser()||"important"!==t.style.getPropertyPriority(a)||n||t.style.removeProperty(a),t.style.setProperty(a,i[a],n?"important":""))},styleAsInt:function(e,t){var i=e.getPropertyValue(t);return null===i?0:parseInt(i)},setInnerHtml:function(e,t){e.innerHTML=t;for(var i,n,a=elBySelAll("script",e),r=0,o=a.length;o>r;r++)n=a[r],i=elCreate("script"),n.src?i.src=n.src:i.textContent=n.textContent,e.appendChild(i),elRemove(n)},insertHtml:function(e,t,i){var n=elCreate("div");if(this.setInnerHtml(n,e),"append"===i||"after"===i)for(;n.childNodes.length;)"append"===i?t.appendChild(n.childNodes[0]):this.insertAfter(n.childNodes[0],t);else{if("prepend"!==i&&"before"!==i)throw new Error("Unknown insert method '"+i+"'.");for(var a=n.childNodes.length-1;a>=0;a--)"prepend"===i?this.prepend(n.childNodes[a],t):t.parentNode.insertBefore(n.childNodes[a],t)}},contains:function(e,t){for(;null!==t;)if(t=t.parentNode,e===t)return!0;return!1},getDataAttributes:function(e,i,n,a){i=i||"",/^data-/.test(i)||(i="data-"+i),n=n===!0,a=a===!0;for(var r,o,s,l={},c=0,d=e.attributes.length;d>c;c++)if(r=e.attributes[c],0===r.name.indexOf(i)){if(o=r.name.replace(new RegExp("^"+i),""),n){s=o.split("-"),o="";for(var u=0,h=s.length;h>u;u++)o.length&&(a&&"id"===s[u]?s[u]="ID":s[u]=t.ucfirst(s[u])),o+=s[u]}l[o]=r.value}return l},unwrapChildNodes:function(e){for(var t=e.parentNode;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);elRemove(e)},replaceElement:function(e,t){for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),elRemove(e)},isAtNodeStart:function(e,t){return i(e,t,"previous")},isAtNodeEnd:function(e,t){return i(e,t,"next")}};return window.bc_wcfDomUtil=a,a}),function(e,t,i){var n=window.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=i(n):"function"==typeof define&&define.amd?define("enquire",[],function(){return t[e]=i(n)}):t[e]=i(n)}("enquire",this,function(e){"use strict";function t(e,t){var i,n=0,a=e.length;for(n;a>n&&(i=t(e[n],n),i!==!1);n++);}function i(e){return"[object Array]"===Object.prototype.toString.apply(e)}function n(e){return"function"==typeof e}function a(e){this.options=e,!e.deferSetup&&this.setup()}function r(t,i){this.query=t,this.isUnconditional=i,this.handlers=[],this.mql=e(t);var n=this;this.listener=function(e){n.mql=e,n.assess()},this.mql.addListener(this.listener)}function o(){if(!e)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!e("only all").matches}return a.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},r.prototype={addHandler:function(e){var t=new a(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var i=this.handlers;t(i,function(t,n){return t.equals(e)?(t.destroy(),!i.splice(n,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){t(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";t(this.handlers,function(t){t[e]()})}},o.prototype={register:function(e,a,o){var s=this.queries,l=o&&this.browserIsIncapable;return s[e]||(s[e]=new r(e,l)),n(a)&&(a={match:a}),i(a)||(a=[a]),t(a,function(t){n(t)&&(t={match:t}),s[e].addHandler(t)}),this},unregister:function(e,t){var i=this.queries[e];return i&&(t?i.removeHandler(t):(i.clear(),delete this.queries[e])),this}},new o}),define("WoltLab/WCF/ObjectMap",[],function(){"use strict";function e(){this._map=t?new WeakMap:{key:[],value:[]}}var t=objOwns(window,"WeakMap")&&"function"==typeof window.WeakMap;return e.prototype={set:function(e,i){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof i||null===i)throw new TypeError("Only objects can be used as value");t?this._map.set(e,i):(this._map.key.push(e),this._map.value.push(i))},"delete":function(e){if(t)this._map["delete"](e);else{var i=this._map.key.indexOf(e);this._map.key.splice(i),this._map.value.splice(i)}},has:function(e){return t?this._map.has(e):-1!==this._map.key.indexOf(e)},get:function(e){if(t)return this._map.get(e);var i=this._map.key.indexOf(e);return-1!==i?this._map.value[i]:void 0}},e}),define("WoltLab/WCF/Dom/Traverse",[],function(){"use strict";var e=0,t=1,i=2,n=3,a=[function(e,t){return!0},function(e,t){return e.matches(t)},function(e,t){return e.classList.contains(t)},function(e,t){return e.nodeName===t}],r=function(e,t,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(var n=[],r=0;r<e.childElementCount;r++)a[t](e.children[r],i)&&n.push(e.children[r]);return n},o=function(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(e=e.parentNode;e instanceof Element;){if(e===n)return null;if(a[t](e,i))return e;e=e.parentNode}return null},s=function(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&a[i](e[t],n)?e[t]:null};return{childBySel:function(e,i){return r(e,t,i)[0]||null},childByClass:function(e,t){return r(e,i,t)[0]||null},childByTag:function(e,t){return r(e,n,t)[0]||null},childrenBySel:function(e,i){return r(e,t,i)},childrenByClass:function(e,t){return r(e,i,t)},childrenByTag:function(e,t){return r(e,n,t)},parentBySel:function(e,i,n){return o(e,t,i,n)},parentByClass:function(e,t,n){return o(e,i,t,n)},parentByTag:function(e,t,i){return o(e,n,t,i)},next:function(t){return s(t,"nextElementSibling",e,null)},nextBySel:function(e,i){return s(e,"nextElementSibling",t,i)},nextByClass:function(e,t){return s(e,"nextElementSibling",i,t)},nextByTag:function(e,t){return s(e,"nextElementSibling",n,t)},prev:function(t){return s(t,"previousElementSibling",e,null)},prevBySel:function(e,i){return s(e,"previousElementSibling",t,i)},prevByClass:function(e,t){return s(e,"previousElementSibling",i,t)},prevByTag:function(e,t){return s(e,"previousElementSibling",n,t)}}}),define("WoltLab/WCF/Ui/Confirmation",["Core","Language","Ui/Dialog"],function(e,t,i){"use strict";var n=!1,a=null,r=null,o={},s=null,l={show:function(t){if(void 0===i&&(i=require("Ui/Dialog")),!n){if(o=e.extend({cancel:null,confirm:null,legacyCallback:null,message:"",parameters:{},template:""},t),o.message="string"==typeof o.message?o.message.trim():"",!o.message.length)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof o.confirm&&"function"!=typeof o.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");null===r&&this._createDialog(),r.innerHTML="string"==typeof t.template?t.template.trim():"",s.textContent=o.message,n=!0,i.open(this)}},_dialogSetup:function(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:t.get("wcf.global.confirmation.title")}}},getContentElement:function(){return r},_createDialog:function(){var e=elCreate("div");elAttr(e,"id","wcfSystemConfirmation"),e.classList.add("systemConfirmation"),s=elCreate("p"),e.appendChild(s),r=elCreate("div"),elAttr(r,"id","wcfSystemConfirmationContent"),e.appendChild(r);var n=elCreate("div");n.classList.add("formSubmit"),e.appendChild(n),a=elCreate("button"),a.classList.add("buttonPrimary"),a.textContent=t.get("wcf.global.confirmation.confirm"),a.addEventListener("click",this._confirm.bind(this)),n.appendChild(a);var o=elCreate("button");o.textContent=t.get("wcf.global.confirmation.cancel"),o.addEventListener("click",function(){i.close("wcfSystemConfirmation")}),n.appendChild(o),document.body.appendChild(e)},_confirm:function(){"function"==typeof o.legacyCallback?o.legacyCallback("confirm",o.parameters):o.confirm(o.parameters),n=!1,i.close("wcfSystemConfirmation")},_onClose:function(){n&&(a.blur(),n=!1,"function"==typeof o.legacyCallback?o.legacyCallback("cancel",o.parameters):"function"==typeof o.cancel&&o.cancel(o.parameters))},_onShow:function(){a.blur(),a.focus()}};return l}),define("WoltLab/WCF/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";var u=null,h=null,p=new n,f=new o,m=!1,g=null,v=elByClass("jsStaticDialog");return{setup:function(){void 0===t&&(t=require("Ajax")),h=elCreate("div"),h.classList.add("dialogOverlay"),elAttr(h,"aria-hidden","true"),h.addEventListener("click",this._closeOnBackdrop.bind(this)),elById("content").appendChild(h),g=function(e){return 27===e.keyCode&&"INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName?(this.close(u),!1):!0}.bind(this),e.register("(max-width: 767px)",{match:function(){m=!0},unmatch:function(){m=!1},setup:function(){m=!0},deferSetup:!0}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this))},_initStaticDialogs:function(){for(var e,t,i;v.length;)e=v[0],e.classList.remove("jsStaticDialog"),i=elData(e,"dialog-id"),i&&(t=elById(i))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elHide(t),e.addEventListener("click",this.openStatic.bind(this,t.id,null,{title:elData(t,"title")}))}.bind(this)(e,t)},open:function(e,n){var a=f.get(e);if(i.isPlainObject(a))return this.openStatic(a.id,n);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=e._dialogSetup();if(!i.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");a={id:r.id};var o=!0;if(void 0===r.source){var s=elById(r.id);if(null===s)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given.");r.source=document.createDocumentFragment(),r.source.appendChild(s),s.removeAttribute("id"),elShow(s)}else if(null===r.source)r.source=n;else if("function"==typeof r.source)r.source();else if(i.isPlainObject(r.source)){if("string"!=typeof n||""===n.trim())return t.api(this,r.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof r.source.after&&r.source.after(p.get(r.id).content,t))}.bind(this)),{};r.source=n}else{if("string"==typeof r.source){var s=elCreate("div");elAttr(s,"id",r.id),s.innerHTML=r.source,r.source=document.createDocumentFragment(),r.source.appendChild(s)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return f.set(e,a),this.openStatic(r.id,r.source,r.options,o)},openStatic:function(e,t,n,a){return p.has(e)?this._updateDialog(e,t):(n=i.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:r.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},n),n.closable||(n.backdropCloseOnClick=!1),n.closeConfirmMessage&&(n.onBeforeClose=function(e){d.show({confirm:this.close.bind(this,e),message:n.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,n)),p.get(e)},setTitle:function(e,t){if("object"==typeof e){var i=f.get(e);void 0!==i&&(e=i.id)}var n=p.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var a=elByClass("dialogTitle",n.dialog);a.length&&(a[0].textContent=t)},_createDialog:function(e,t,i,n){var a=null;if(null===t&&(a=elById(e),null===a))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var o=elCreate("header");r.appendChild(o);var s=c.getUniqueId();elAttr(r,"aria-labelledby",s);var l=elCreate("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,elAttr(l,"id",s),o.appendChild(l),i.closable){var d=elCreate("a");d.className="dialogCloseButton jsTooltip",elAttr(d,"title",i.closeButtonLabel),elAttr(d,"aria-label",i.closeButtonLabel),d.addEventListener("click",this._close.bind(this)),o.appendChild(d);var u=elCreate("span");u.className="icon icon24 fa-times",d.appendChild(u)}var f=elCreate("div");f.classList.add("dialogContent"),i.disableContentPadding&&f.classList.add("dialogContentNoPadding"),r.appendChild(f);var m;null===a?"string"==typeof t?(m=elCreate("div"),m.id=e,m.innerHTML=t):t instanceof DocumentFragment&&("div"!==t.children[0].nodeName||t.childElementCount>1?(m=elCreate("div"),m.id=e,m.appendChild(t)):m=t):m=a,f.appendChild(m),"none"===m.style.getPropertyValue("display")&&elShow(m),p.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,content:m,dialog:r,header:o,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow}),c.prepend(r,h),"function"==typeof i.onSetup&&i.onSetup(m),n!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var i=p.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t){i.content.innerHTML="";var n=elCreate("div");n.innerHTML=t;for(var a=elBySelAll("script",n),r=0,o=a.length;o>r;r++){var l=a[r],c=elCreate("script");c.innerHTML=l.innerHTML,n.appendChild(c),elRemove(l)}i.content.appendChild(n)}if("true"===elAttr(i.dialog,"aria-hidden")){"true"===elAttr(h,"aria-hidden")&&window.addEventListener("keyup",g),elAttr(i.dialog,"aria-hidden","false"),elAttr(h,"aria-hidden","false"),elData(h,"close-on-click",i.backdropCloseOnClick?"true":"false"),u=e,this.rebuild(e);var d=elBySel(".jsDialogAutoFocus",i.dialog);null!==d&&null!==d.offsetParent&&d.focus(),"function"==typeof i.onShow&&i.onShow(e)}s.trigger()},rebuild:function(e){var t=p.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("true"!==elAttr(t.dialog,"aria-hidden")){var i=t.content.parentNode,n=elBySel(".formSubmit",t.content),r=0;null!==n?(i.classList.add("dialogForm"),n.classList.add("dialogFormSubmit"),r+=c.outerHeight(n),i.style.setProperty("margin-bottom",r+"px")):i.classList.remove("dialogForm"),r+=c.outerHeight(t.header);var o=window.innerHeight*(m?1:.8)-r;i.style.setProperty("max-height",~~o+"px"),"chrome"===a.browser()&&(t.content.scrollHeight>o?t.content.style.setProperty("margin-right","-1px"):t.content.style.removeProperty("margin-right"))}},_close:function(e){e.preventDefault();var t=p.get(u);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(u),!1):void this.close(u)},_closeOnBackdrop:function(e){return e.target!==h?!0:void("true"===elData(h,"close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=f.get(e);void 0!==t&&(e=t.id)}var i=p.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");"function"==typeof i.onClose&&i.onClose(e),elAttr(i.dialog,"aria-hidden","true"),u=null;for(var n=0;n<h.childElementCount;n++){var a=h.children[n];if("false"===elAttr(a,"aria-hidden")){u=elData(a,"id");break}}null===u?(elAttr(h,"aria-hidden","true"),elData(h,"close-on-click","false"),window.removeEventListener("keyup",g)):(i=p.get(u),elData(h,"close-on-click",i.backdropCloseOnClick?"true":"false"))},getDialog:function(e){return p.get(e)},_ajaxSetup:function(){return{}}}}),define("WoltLab/WCF/Ajax/Status",["Language"],function(e){"use strict";var t=0,i=null,n=null,a={_init:function(){i=elCreate("div"),i.classList.add("spinner");var t=elCreate("span");t.className="icon icon48 fa-spinner",i.appendChild(t);var n=elCreate("span");n.textContent=e.get("wcf.global.loading"),i.appendChild(n),document.body.appendChild(i)},show:function(){null===i&&this._init(),t++,null===n&&(n=window.setTimeout(function(){t&&i.classList.add("active"),n=null},250))},hide:function(){t--,0===t&&(null!==n&&window.clearTimeout(n),i.classList.remove("active"))}};return a}),define("WoltLab/WCF/Ajax/Request",["Core","Language","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLab/WCF/Ajax/Status"],function(e,t,i,n,a,r){"use strict";function o(e){this._data=null,this._options={},this._previousXhr=null,this._xhr=null,this._init(e)}var s=!1,l=!1;return o.prototype={_init:function(t){this._options=e.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},t),"object"==typeof t.callbackObject&&(this._options.callbackObject=t.callbackObject),this._options.url=e.convertLegacyUrl(this._options.url),this._options.pinData&&(this._data=e.extend({},this._options.data)),null!==this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),s===!1&&(s=!0,window.addEventListener("beforeunload",function(){l=!0}))},sendRequest:function(t){(t===!0||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||r.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");var i=this,n=e.clone(this._options);if(this._xhr.onload=function(){this.readyState===XMLHttpRequest.DONE&&(this.status>=200&&this.status<300||304===this.status?n.responseType&&n.responseType!==this.getResponseHeader("Content-Type")?i._failure(this,n):i._success(this,n):i._failure(this,n))},this._xhr.onerror=function(){i._failure(this,n)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){var a=this._options.data;"object"==typeof a&&"FormData"!==e.getType(a)&&(a=e.serialize(a)),
-this._xhr.send(a)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,e)?this._options[e]:null},setData:function(t){null!==this._data&&"FormData"!==e.getType(t)&&(t=e.extend(this._data,t)),this._options.data=t},_success:function(e,t){if(t.silent||r.hide(),"function"==typeof t.success){var i=null;if("application/json"===e.getResponseHeader("Content-Type")){try{i=JSON.parse(e.responseText)}catch(n){return void this._failure(e,t)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim())}t.success(i,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,i){if(!l){i.silent||r.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(s){}var c=!0;if("function"==typeof i.failure&&(c=i.failure(o,e.responseText,e,i.data)),i.ignoreError!==!0&&c!==!1){var d="",u="";if(null!==o?(o.stacktrace?d="<br /><p>Stacktrace:</p><p>"+o.stacktrace+"</p>":o.exceptionID&&(d="<br /><p>Exception ID: <code>"+o.exceptionID+"</code></p>"),u=o.message):u=e.responseText,!u||"undefined"===u)return;var h='<div class="ajaxDebugMessage"><p>'+u+"</p>"+d+"</div>";void 0===a&&(a=require("Ui/Dialog")),a.openStatic(n.getUniqueId(),h,{title:t.get("wcf.global.error.title")})}this._finalize(i)}},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,i.trigger();for(var t=elBySelAll('a[href*="#"]'),n=0,a=t.length;a>n;n++){var r=t[n],o=elAttr(r,"href");(-1!==o.indexOf("AJAXProxy")||-1!==o.indexOf("ajax-proxy"))&&(o=o.substr(o.indexOf("#")),elAttr(r,"href",document.location.toString().replace(/#.*/,"")+o))}}},o}),define("WoltLab/WCF/Ajax",["AjaxRequest","Core","ObjectMap"],function(e,t,i){"use strict";var n=new i,a={api:function(t,i,a,r){"object"!=typeof i&&(i={});var o=n.get(t);if(void 0===o){if("function"!=typeof t._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");var s=t._ajaxSetup();s.pinData=!0,s.callbackObject=t,s.url||(s.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN),o=new e(s),n.set(t,o)}var l=null,c=null;return"function"==typeof a&&(l=o.getOption("success"),o.setOption("success",a)),"function"==typeof r&&(c=o.getOption("failure"),o.setOption("failure",r)),o.setData(i),o.sendRequest(),null!==l&&o.setOption("success",l),null!==c&&o.setOption("failure",c),o},apiOnce:function(t){t.pinData=!1,t.callbackObject=null,t.url||(t.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN);var i=new e(t);i.sendRequest()}};return a}),function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||g)return!1;try{d.clearRect(0,0,l,s),d.drawImage(e,0,0,l,s)}catch(i){}_=setTimeout(t,I.duration,e),M.setIcon(c)}function i(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,i,n){return t+t+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:!1}function n(e,t){var i,n={};for(i in e)n[i]=e[i];for(i in t)n[i]=t[i];return n}function a(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}e=e?e:{};var r,o,s,l,c,d,u,h,p,f,m,g,v,b,_,y={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,dataUrl:!1};v={},v.ff="undefined"!=typeof InstallTrigger,v.chrome=!!window.chrome,v.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var w=[];m=function(){},h=g=!1;var C=function(){r=n(y,e),r.bgColor=i(r.bgColor),r.textColor=i(r.textColor),r.position=r.position.toLowerCase(),r.animation=I.types[""+r.animation]?r.animation:y.animation;var t=r.position.indexOf("up")>-1,a=r.position.indexOf("left")>-1;if(t||a)for(var h=0;h<I.types[""+r.animation].length;h++){var p=I.types[""+r.animation][h];t&&(p.y<.6?p.y=p.y-.4:p.y=p.y-2*p.y+(1-p.w)),a&&(p.x<.6?p.x=p.x-.4:p.x=p.x-2*p.x+(1-p.h)),I.types[""+r.animation][h]=p}r.type=E[""+r.type]?r.type:y.type,o=M.getIcon(),c=document.createElement("canvas"),u=document.createElement("img"),o.hasAttribute("href")?(u.setAttribute("src",o.getAttribute("href")),u.onload=function(){s=u.height>0?u.height:32,l=u.width>0?u.width:32,c.height=s,c.width=l,d=c.getContext("2d"),L.ready()}):(u.setAttribute("src",""),s=32,l=32,u.height=s,u.width=l,c.height=s,c.width=l,d=c.getContext("2d"),L.ready())},L={};L.ready=function(){h=!0,L.reset(),m()},L.reset=function(){h&&(w=[],p=!1,f=!1,d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),M.setIcon(c),window.clearTimeout(b),window.clearTimeout(_))},L.start=function(){if(h&&!f){var e=function(){p=w[0],f=!1,w.length>0&&(w.shift(),L.start())};if(w.length>0){f=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in w[0].options&&(r[e]=w[0].options[e])}),I.run(w[0].options,function(){e()},!1)};p?I.run(p.options,function(){t()},!0):t()}}};var E={},x=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=l*e.x,e.y=s*e.y,e.w=l*e.w,e.h=s*e.h,e.len=(""+e.n).length,e};E.circle=function(e){e=x(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.fontFamily,d.textAlign="center",t?(d.moveTo(e.x+e.w/2,e.y),d.lineTo(e.x+e.w-e.h/2,e.y),d.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),d.lineTo(e.x+e.w,e.y+e.h-e.h/2),d.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),d.lineTo(e.x+e.h/2,e.y+e.h),d.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),d.lineTo(e.x,e.y+e.h/2),d.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):d.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fill(),d.closePath(),d.beginPath(),d.stroke(),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()},E.rectangle=function(e){e=x(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,d.textAlign="center",d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fillRect(e.x,e.y,e.w,e.h),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()};var T=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&I.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&E[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=i(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),w.push(n),w.length>100)throw"Too many badges requests in queue.";L.start()}else L.reset()}catch(a){throw"Error setting badge. Message: "+a.message}},h&&m()},D=function(e){m=function(){try{var t=e.width,i=e.height,n=document.createElement("img"),a=i/s>t/l?t/l:i/s;n.setAttribute("src",e.getAttribute("src")),n.height=i/a,n.width=t/a,d.clearRect(0,0,l,s),d.drawImage(n,0,0,l,s),M.setIcon(c)}catch(r){throw"Error setting image. Message: "+r.message}},h&&m()},S=function(e){m=function(){try{if("stop"===e)return g=!0,L.reset(),void(g=!1);e.addEventListener("play",function(){t(this)},!1)}catch(i){throw"Error setting video. Message: "+i.message}},h&&m()},k=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),v.supported){var i=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,m=function(){try{if("stop"===e)return g=!0,L.reset(),void(g=!1);i=document.createElement("video"),i.width=l,i.height=s,navigator.getUserMedia({video:!0,audio:!1},function(e){i.src=URL.createObjectURL(e),i.play(),t(i)},function(){})}catch(n){throw"Error setting webcam. Message: "+n.message}},h&&m()}},M={};M.getIcon=function(){var e=!1,t=function(){for(var e=document.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length,i=t-1;i>=0;i--)if(/(^|\s)icon(\s|$)/i.test(e[i].getAttribute("rel")))return e[i];return!1};return r.element?e=r.element:r.elementId?(e=document.getElementById(r.elementId),e.setAttribute("href",e.getAttribute("src"))):(e=t(),e===!1&&(e=document.createElement("link"),e.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(e))),e.setAttribute("type","image/png"),e},M.setIcon=function(e){var t=e.toDataURL("image/png");if(r.dataUrl&&r.dataUrl(t),r.element)r.element.setAttribute("src",t);else if(r.elementId)document.getElementById(r.elementId).setAttribute("src",t);else if(v.ff||v.opera){var i=o;o=document.createElement("link"),v.opera&&o.setAttribute("rel","icon"),o.setAttribute("rel","icon"),o.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(o),o.setAttribute("href",t),i.parentNode&&i.parentNode.removeChild(i)}else o.setAttribute("href",t)};var I={};return I.duration=40,I.types={},I.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],I.run=function(e,t,i,o){var s=I.types[a()?"none":r.animation];return o=i===!0?"undefined"!=typeof o?o:s.length-1:"undefined"!=typeof o?o:0,t=t?t:function(){},o<s.length&&o>=0?(E[r.type](n(e,s[o])),b=setTimeout(function(){i?o-=1:o+=1,I.run(e,t,i,o)},I.duration),M.setIcon(c),void 0):void t()},C(),{badge:T,video:S,image:D,webcam:k,reset:L.reset,browser:{supported:v.supported}}};"undefined"!=typeof define&&define.amd?define("favico",[],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(e,t,i){"use strict";var n=e("../main");"function"==typeof define&&define.amd?define("perfect-scrollbar",n):(window.PerfectScrollbar=n,"undefined"==typeof window.Ps&&(window.Ps=n))},{"../main":7}],2:[function(e,t,i){"use strict";function n(e,t){var i=e.className.split(" ");i.indexOf(t)<0&&i.push(t),e.className=i.join(" ")}function a(e,t){var i=e.className.split(" "),n=i.indexOf(t);n>=0&&i.splice(n,1),e.className=i.join(" ")}i.add=function(e,t){e.classList?e.classList.add(t):n(e,t)},i.remove=function(e,t){e.classList?e.classList.remove(t):a(e,t)},i.list=function(e){return e.classList?e.classList:e.className.split(" ")}},{}],3:[function(e,t,i){"use strict";function n(e,t){return window.getComputedStyle(e)[t]}function a(e,t,i){return"number"==typeof i&&(i=i.toString()+"px"),e.style[t]=i,e}function r(e,t){for(var i in t){var n=t[i];"number"==typeof n&&(n=n.toString()+"px"),e.style[i]=n}return e}i.e=function(e,t){var i=document.createElement(e);return i.className=t,i},i.appendTo=function(e,t){return t.appendChild(e),e},i.css=function(e,t,i){return"object"==typeof t?r(e,t):"undefined"==typeof i?n(e,t):a(e,t,i)},i.matches=function(e,t){return"undefined"!=typeof e.matches?e.matches(t):"undefined"!=typeof e.matchesSelector?e.matchesSelector(t):"undefined"!=typeof e.webkitMatchesSelector?e.webkitMatchesSelector(t):"undefined"!=typeof e.mozMatchesSelector?e.mozMatchesSelector(t):"undefined"!=typeof e.msMatchesSelector?e.msMatchesSelector(t):void 0},i.remove=function(e){"undefined"!=typeof e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}},{}],4:[function(e,t,i){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var i="undefined"!=typeof t;this.events[e]=this.events[e].filter(function(n){return i&&n!==t?!0:(this.element.removeEventListener(e,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var a=function(){this.eventElements=[]};a.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new n(e),this.eventElements.push(t)),t},a.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},a.prototype.unbind=function(e,t,i){this.eventElement(e).unbind(t,i)},a.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},a.prototype.once=function(e,t,i){var n=this.eventElement(e),a=function(e){n.unbind(t,a),i(e)};n.bind(t,a)},t.exports=a},{}],5:[function(e,t,i){"use strict";t.exports=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}()},{}],6:[function(e,t,i){"use strict";var n=e("./class"),a=e("./dom");i.toInt=function(e){return"string"==typeof e?parseInt(e,10):~~e},i.clone=function(e){if(null===e)return null;if("object"==typeof e){var t={};for(var i in e)t[i]=this.clone(e[i]);return t}return e},i.extend=function(e,t){var i=this.clone(e);for(var n in t)i[n]=this.clone(t[n]);return i},i.isEditable=function(e){return a.matches(e,"input,[contenteditable]")||a.matches(e,"select,[contenteditable]")||a.matches(e,"textarea,[contenteditable]")||a.matches(e,"button,[contenteditable]")},i.removePsClasses=function(e){for(var t=n.list(e),i=0;i<t.length;i++){var a=t[i];0===a.indexOf("ps-")&&n.remove(e,a)}},i.outerWidth=function(e){return this.toInt(a.css(e,"width"))+this.toInt(a.css(e,"paddingLeft"))+this.toInt(a.css(e,"paddingRight"))+this.toInt(a.css(e,"borderLeftWidth"))+this.toInt(a.css(e,"borderRightWidth"))},i.startScrolling=function(e,t){n.add(e,"ps-in-scrolling"),"undefined"!=typeof t?n.add(e,"ps-"+t):(n.add(e,"ps-x"),n.add(e,"ps-y"))},i.stopScrolling=function(e,t){n.remove(e,"ps-in-scrolling"),"undefined"!=typeof t?n.remove(e,"ps-"+t):(n.remove(e,"ps-x"),n.remove(e,"ps-y"))},i.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(e,t,i){"use strict";var n=e("./plugin/destroy"),a=e("./plugin/initialize"),r=e("./plugin/update");t.exports={initialize:a,update:r,destroy:n}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":20}],8:[function(e,t,i){"use strict";t.exports={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0}},{}],9:[function(e,t,i){"use strict";var n=e("../lib/dom"),a=e("../lib/helper"),r=e("./instances");t.exports=function(e){var t=r.get(e);t.event.unbindAll(),n.remove(t.scrollbarX),n.remove(t.scrollbarY),n.remove(t.scrollbarXRail),n.remove(t.scrollbarYRail),a.removePsClasses(e),r.remove(e)}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(e,t,i){"use strict";function n(e,t){function i(e){return e.getBoundingClientRect()}var n=window.Event.prototype.stopPropagation.bind;t.event.bind(t.scrollbarY,"click",n),t.event.bind(t.scrollbarYRail,"click",function(n){var r=a.toInt(t.scrollbarYHeight/2),s=n.pageY-i(t.scrollbarYRail).top-r,l=t.containerHeight-t.scrollbarYHeight,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,o(e)}),t.event.bind(t.scrollbarX,"click",n),t.event.bind(t.scrollbarXRail,"click",function(n){var r=a.toInt(t.scrollbarXWidth/2),s=n.pageX-i(t.scrollbarXRail).left-r;console.log(n.pageX,t.scrollbarXRail.offsetLeft);var l=t.containerWidth-t.scrollbarXWidth,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,o(e)})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t,i){"use strict";function n(e,t){function i(i){var a=n+i,r=t.containerWidth-t.scrollbarXWidth;0>a?t.scrollbarXLeft=0:a>r?t.scrollbarXLeft=r:t.scrollbarXLeft=a;var s=o.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var n=null,a=null,s=function(t){i(t.pageX-a),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(i){a=i.pageX,n=o.toInt(r.css(t.scrollbarX,"left")),o.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}function a(e,t){function i(i){var a=n+i,r=t.containerHeight-t.scrollbarYHeight;0>a?t.scrollbarYTop=0:a>r?t.scrollbarYTop=r:t.scrollbarYTop=a;var s=o.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var n=null,a=null,s=function(t){i(t.pageY-a),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(i){a=i.pageY,n=o.toInt(r.css(t.scrollbarY,"top")),o.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}var r=e("../../lib/dom"),o=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);n(e,t),a(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&0>n)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&0>i||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}var n=!1;t.event.bind(e,"mouseenter",function(){n=!0}),t.event.bind(e,"mouseleave",function(){n=!1});var r=!1;t.event.bind(t.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&n){var l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(a.isEditable(l))return}var c=0,d=0;switch(s.which){case 37:c=-30;break;case 38:d=30;break;case 39:c=30;break;case 40:d=-30;break;case 33:d=90;break;case 32:case 34:d=-90;break;case 35:d=s.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:d=s.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-d,e.scrollLeft=e.scrollLeft+c,o(e),r=i(c,d),r&&s.preventDefault()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&0>n)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&0>i||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}function n(e){var t=e.deltaX,i=-1*e.deltaY;return("undefined"==typeof t||"undefined"==typeof i)&&(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=e.wheelDelta),[t,i]}function r(t,i){var n=e.querySelector("textarea:hover");if(n){var a=n.scrollHeight-n.clientHeight;if(a>0&&!(0===n.scrollTop&&i>0||n.scrollTop===a&&0>i))return!0;var r=n.scrollLeft-n.clientWidth;if(r>0&&!(0===n.scrollLeft&&0>t||n.scrollLeft===r&&t>0))return!0}return!1}function s(s){if(a.env.isWebKit||!e.querySelector("select:focus")){var c=n(s),d=c[0],u=c[1];r(d,u)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(u?e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed:e.scrollTop=e.scrollTop+d*t.settings.wheelSpeed,l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(d?e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed:e.scrollLeft=e.scrollLeft-u*t.settings.wheelSpeed,l=!0):(e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed),o(e),l=l||i(d,u),l&&(s.stopPropagation(),s.preventDefault()))}}var l=!1;"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",s):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",s)}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t,i){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=a.get(e);n(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,i){"use strict";function n(e,t){function i(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function n(){l||(l=setInterval(function(){return r.get(e)?(e.scrollTop=e.scrollTop+c.top,e.scrollLeft=e.scrollLeft+c.left,void o(e)):void clearInterval(l)},50))}function s(){l&&(clearInterval(l),l=null),a.stopScrolling(e)}var l=null,c={top:0,left:0},d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(i())?d=!0:(d=!1,s())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,s())}),t.event.bind(window,"mousemove",function(t){if(d){var i={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};i.x<r.left+3?(c.left=-5,a.startScrolling(e,"x")):i.x>r.right-3?(c.left=5,a.startScrolling(e,"x")):c.left=0,i.y<r.top+3?(r.top+3-i.y<5?c.top=-5:c.top=-20,a.startScrolling(e,"y")):i.y>r.bottom-3?(i.y-r.bottom+3<5?c.top=5:c.top=20,a.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():n()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t,i){"use strict";function n(e,t,i,n){function o(i,n){var a=e.scrollTop,r=e.scrollLeft,o=Math.abs(i),s=Math.abs(n);if(s>o){if(0>n&&a===t.contentHeight-t.containerHeight||n>0&&0===a)return!t.settings.swipePropagation}else if(o>s&&(0>i&&r===t.contentWidth-t.containerWidth||i>0&&0===r))return!t.settings.swipePropagation;return!0}function s(t,i){e.scrollTop=e.scrollTop-i,e.scrollLeft=e.scrollLeft-t,r(e)}function l(){_=!0}function c(){_=!1}function d(e){return e.targetTouches?e.targetTouches[0]:e}function u(e){return e.targetTouches&&1===e.targetTouches.length?!0:e.pointerType&&"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE?!0:!1}function h(e){if(u(e)){y=!0;var t=d(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function p(e){if(!_&&y&&u(e)){var t=d(e),i={pageX:t.pageX,pageY:t.pageY},n=i.pageX-m.pageX,a=i.pageY-m.pageY;s(n,a),m=i;var r=(new Date).getTime(),l=r-g;l>0&&(v.x=n/l,v.y=a/l,g=r),o(n,a)&&(e.stopPropagation(),e.preventDefault())}}function f(){!_&&y&&(y=!1,clearInterval(b),b=setInterval(function(){return a.get(e)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(b):(s(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(b)},10))}var m={},g=0,v={},b=null,_=!1,y=!1;i&&(t.event.bind(window,"touchstart",l),t.event.bind(window,"touchend",c),t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",p),t.event.bind(e,"touchend",f)),n&&(window.PointerEvent?(t.event.bind(window,"pointerdown",l),t.event.bind(window,"pointerup",c),t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",p),t.event.bind(e,"pointerup",f)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",l),t.event.bind(window,"MSPointerUp",c),t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",p),t.event.bind(e,"MSPointerUp",f)))}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,i){var r=a.get(e);n(e,r,t,i)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,i){"use strict";var n=e("../lib/class"),a=e("../lib/helper"),r=e("./instances"),o=e("./update-geometry"),s=e("./handler/click-rail"),l=e("./handler/drag-scrollbar"),c=e("./handler/keyboard"),d=e("./handler/mouse-wheel"),u=e("./handler/native-scroll"),h=e("./handler/selection"),p=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},n.add(e,"ps-container");var i=r.add(e);i.settings=a.extend(i.settings,t),s(e),l(e),d(e),u(e),h(e),(a.env.supportsTouch||a.env.supportsIePointer)&&p(e,a.env.supportsTouch,a.env.supportsIePointer),i.settings.useKeyboard&&c(e),o(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,i){"use strict";function n(e){var t=this;t.settings=u.clone(l),t.containerWidth=null,t.containerHeight=null,t.contentWidth=null,t.contentHeight=null,t.isRtl="rtl"===s.css(e,"direction"),t.event=new c,t.ownerDocument=e.ownerDocument||document,t.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),e),t.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),t.scrollbarXRail),t.scrollbarXActive=null,t.scrollbarXWidth=null,t.scrollbarXLeft=null,t.scrollbarXBottom=u.toInt(s.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:u.toInt(s.css(t.scrollbarXRail,"top")),t.railBorderXWidth=u.toInt(s.css(t.scrollbarXRail,"borderLeftWidth"))+u.toInt(s.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=u.toInt(s.css(t.scrollbarXRail,"marginLeft"))+u.toInt(s.css(t.scrollbarXRail,"marginRight")),t.railXWidth=null,t.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),e),t.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),t.scrollbarYRail),t.scrollbarYActive=null,t.scrollbarYHeight=null,t.scrollbarYTop=null,t.scrollbarYRight=u.toInt(s.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:u.toInt(s.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?u.outerWidth(t.scrollbarY):null,t.railBorderYWidth=u.toInt(s.css(t.scrollbarYRail,"borderTopWidth"))+u.toInt(s.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=u.toInt(s.css(t.scrollbarYRail,"marginTop"))+u.toInt(s.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function a(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function r(e,t){"undefined"==typeof e.dataset?e.setAttribute("data-ps-id",t):e.dataset.psId=t}function o(e){"undefined"==typeof e.dataset?e.removeAttribute("data-ps-id"):delete e.dataset.psId}var s=e("../lib/dom"),l=e("./default-setting"),c=e("../lib/event-manager"),d=e("../lib/guid"),u=e("../lib/helper"),h={};i.add=function(e){var t=d();return r(e,t),h[t]=new n(e),h[t]},i.remove=function(e){delete h[a(e)],o(e)},i.get=function(e){return h[a(e)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t,i){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function a(e,t){var i={width:t.railXWidth};t.isRtl?i.left=e.scrollLeft+t.containerWidth-t.contentWidth:i.left=e.scrollLeft,t.isScrollbarXUsingBottom?i.bottom=t.scrollbarXBottom-e.scrollTop:i.top=t.scrollbarXTop+e.scrollTop,o.css(t.scrollbarXRail,i);var n={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?n.right=t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:n.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?n.left=e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:n.left=t.scrollbarYLeft+e.scrollLeft,o.css(t.scrollbarYRail,n),o.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),o.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/class"),o=e("../lib/dom"),s=e("../lib/helper"),l=e("./instances");t.exports=function(e){var t=l.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||o.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||o.appendTo(t.scrollbarYRail,e),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.scrollbarXWidth=n(t,s.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=s.toInt(e.scrollLeft*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):(t.scrollbarXActive=!1,t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.scrollbarYHeight=n(t,s.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=s.toInt(e.scrollTop*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):(t.scrollbarYActive=!1,t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0),t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),a(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t,i){"use strict";var n=e("../lib/dom"),a=e("./instances"),r=e("./update-geometry");t.exports=function(e){var t=a.get(e);
-n.css(t.scrollbarXRail,"display","none"),n.css(t.scrollbarYRail,"display","none"),r(e),n.css(t.scrollbarXRail,"display","block"),n.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLab/WCF/Date/Util",["Language"],function(e){"use strict";var t={formatDate:function(t){return this.format(t,e.get("wcf.date.dateFormat"))},formatTime:function(t){return this.format(t,e.get("wcf.date.timeFormat"))},formatDateTime:function(t){return this.format(t,e.get("wcf.date.dateTimeFormat").replace(/%date%/,e.get("wcf.date.dateFormat")).replace(/%time%/,e.get("wcf.date.timeFormat")))},format:function(t,i){var n,a="";"c"===i&&(i="Y-m-dTH:i:sP");for(var r=0,o=i.length;o>r;r++){switch(i[r]){case"s":n=("0"+t.getSeconds().toString()).slice(-2);break;case"i":n=t.getMinutes();break;case"a":n=t.getHours()>11?"pm":"am";break;case"g":n=t.getHours(),0===n?n=12:n>12&&(n-=12);break;case"h":n=t.getHours(),0===n?n=12:n>12&&(n-=12),n=("0"+n.toString()).slice(-2);break;case"A":n=t.getHours()>11?"PM":"AM";break;case"G":n=t.getHours();break;case"H":n=t.getHours(),n=("0"+n.toString()).slice(-2);break;case"d":n=t.getDate(),n=("0"+n.toString()).slice(-2);break;case"j":n=t.getDate();break;case"l":n=e.get("__days")[t.getDay()];break;case"D":n=e.get("__daysShort")[t.getDay()];break;case"S":n="";break;case"m":n=t.getMonth()+1,n=("0"+n.toString()).slice(-2);break;case"n":n=t.getMonth()+1;break;case"F":n=e.get("__months")[t.getMonth()];break;case"M":n=e.get("__monthsShort")[t.getMonth()];break;case"y":n=t.getYear().toString().replace(/^\d{2}/,"");break;case"Y":n=t.getFullYear();break;case"P":var s=t.getTimezoneOffset();n=s>0?"-":"+",s=Math.abs(s),n+=("0"+(~~(s/60)).toString()).slice(-2),n+=":",n+=("0"+(s%60).toString()).slice(-2);break;case"r":n=t.toString();break;case"U":n=Math.round(t.getTime()/1e3);break;default:n=i[r]}a+=n}return a},gmdate:function(e){return date instanceof Date||(date=new Date),Math.round(Date.UTC(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDay(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}};return t}),define("WoltLab/WCF/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(0>t||t>864e5)throw new RangeError("Invalid delta "+t+". Delta must be in the interval [0, 86400000].");this._callback=e.bind(void 0,this),this._delta=t,this._timer=void 0,this.restart()}return e.prototype={restart:function(){this.stop(),this._timer=setInterval(this._callback,this._delta)},stop:function(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)},setDelta:function(e){this._delta=e,this.restart()}},e}),define("WoltLab/WCF/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLab/WCF/Date/Util","WoltLab/WCF/Timer/Repeating"],function(e,t,i,n){"use strict";var a=elByTag("time"),r=null;return{setup:function(){this._refresh(),new n(this._refresh.bind(this),6e4),e.add("WoltLab/WCF/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,n=(e.getTime()-e.getMilliseconds())/1e3;null===r&&(r=n-TIME_NOW);for(var o=0,s=a.length;s>o;o++){var l=a[o];if(l.classList.contains("datetime")&&!elData(l,"is-future-date")){var c=~~elData(l,"timestamp")+r,d=elData(l,"date"),u=elData(l,"time"),h=elData(l,"offset");if(elAttr(l,"title")||elAttr(l,"title",t.get("wcf.date.dateTimeFormat").replace(/%date%/,d).replace(/%time%/,u)),c>=n||c+60>n)l.textContent=t.get("wcf.date.relative.now");else if(c+3540>n){var p=Math.max(Math.round((n-c)/60),1);l.textContent=t.get("wcf.date.relative.minutes",{minutes:p})}else if(c+86400>n){var f=Math.round((n-c)/3600);l.textContent=t.get("wcf.date.relative.hours",{hours:f})}else if(c+518400>n){var m=new Date(e.getFullYear(),e.getMonth(),e.getDate()),g=Math.ceil((m/1e3-c)/86400),v=i.getTimezoneDate(1e3*c,1e3*h),b=v.getDay(),_=t.get("__days")[b];l.textContent=t.get("wcf.date.relative.pastDays",{days:g,day:_,time:u})}else l.textContent=t.get("wcf.date.shortDateTimeFormat").replace(/%date%/,d).replace(/%time%/,u)}}}}}),define("WoltLab/WCF/Ui/Alignment",["Core","Language","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";return{set:function(a,r,o){o=e.extend({verticalOffset:0,pointer:!1,pointerOffset:4,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},o),Array.isArray(o.pointerClassNames)&&o.pointerClassNames.length===(o.pointer?1:2)||(o.pointerClassNames=[]),-1===["left","right","center"].indexOf(o.horizontal)&&(o.horizontal="left"),"bottom"!==o.vertical&&(o.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(o.allowFlip)&&(o.allowFlip="both"),n.setStyles(a,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});var s=n.outerDimensions(a),l=n.outerDimensions(o.refDimensionsElement instanceof Element?o.refDimensionsElement:r),c=n.offset(r),d=window.innerHeight,u=document.body.clientWidth,h={result:null},p=!1;if("center"===o.horizontal&&(p=!0,h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),h.result||("both"===o.allowFlip||"horizontal"===o.allowFlip?o.horizontal="left":h.result=!0)),"rtl"===t.get("wcf.global.pageDirection")&&(o.horizontal="left"===o.horizontal?"right":"left"),!h.result){var f=h;if(h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),!h.result&&("both"===o.allowFlip||"horizontal"===o.allowFlip)){var m=this._tryAlignmentHorizontal("left"===o.horizontal?"right":"left",s,l,c,u);m.result?h=m:p&&(h=f)}}var g=h.left,v=h.right,b=this._tryAlignmentVertical(o.vertical,s,l,c,d,o.verticalOffset);if(!b.result&&("both"===o.allowFlip||"vertical"===o.allowFlip)){var _=this._tryAlignmentVertical("top"===o.vertical?"bottom":"top",s,l,c,d,o.verticalOffset);_.result&&(b=_)}var y=b.bottom,w=b.top;if(o.pointer){var C=i.childrenByClass(a,"elementPointer");if(C=C[0]||null,null===C)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(C.classList.add("center"),C.classList.remove("left"),C.classList.remove("right")):(C.classList.add(h.align),C.classList.remove("center"),C.classList.remove("left"===h.align?"right":"left")),"top"===b.align?C.classList.add("flipVertical"):C.classList.remove("flipVertical")}else if(2===o.pointerClassNames.length){var L=0,E=1;a.classList["auto"===w?"add":"remove"](o.pointerClassNames[L]),a.classList["auto"===g?"add":"remove"](o.pointerClassNames[E])}"auto"!==y&&(y=Math.round(y)+"px"),"auto"!==g&&(g=Math.ceil(g)+"px"),"auto"!==v&&(v=Math.floor(v)+"px"),"auto"!==w&&(w=Math.round(w)+"px"),n.setStyles(a,{bottom:y,left:g,right:v,top:w}),elShow(a),a.style.removeProperty("visibility")},_tryAlignmentHorizontal:function(e,t,i,n,a){var r="auto",o="auto",s=!0;return"left"===e?(r=n.left,r+t.width>a&&(s=!1)):"right"===e?(o=a-(n.left+i.width),0>o&&(s=!1)):(r=n.left+i.width/2-t.width/2,r=~~r,(0>r||r+t.width>a)&&(s=!1)),{align:e,left:r,right:o,result:s}},_tryAlignmentVertical:function(e,t,i,n,a,r){var o="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;o=c-n.top+r,c-(o+t.height)<window.scrollY&&(l=!1)}else s=n.top+i.height+r,s+t.height-window.scrollY>a&&(l=!1);return{align:e,bottom:o,top:s,result:l}}}}),define("WoltLab/WCF/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,i={setup:function(){document.body.addEventListener("click",this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return i.setup(),i}),define("WoltLab/WCF/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=new e,d=!1,u=new i,h=new i,p=null;return{setup:function(){d||(d=!0,p=elCreate("div"),p.className="dropdownMenuContainer",document.body.appendChild(p),l=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLab/WCF/Ui/Dropdown/Simple",this.closeAll.bind(this)),a.add("WoltLab/WCF/Ui/Dropdown/Simple",this.initAll.bind(this)),document.addEventListener("scroll",this._onScroll.bind(this)),window.bc_wcfSimpleDropdown=this)},initAll:function(){for(var e=0,t=l.length;t>e;e++)this.init(l[e],!1)},init:function(e,i){if(this.setup(),e.classList.contains("jsDropdownEnabled")||elData(e,"target"))return!1;var n=r.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a parent with .dropdown.");var a=r.nextByClass(e,"dropdownMenu");if(null===a)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a menu as next sibling.");p.appendChild(a);var s=o.identify(n);u.has(s)||(e.classList.add("jsDropdownEnabled"),e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this)),u.set(s,n),h.set(s,a),s.match(/^wcf\d+$/)||elData(a,"source",s)),elData(e,"target",s),i&&setTimeout(function(){t.triggerEvent(e,WCF_CLICK_EVENT)},10)},initFragment:function(e,t){this.setup();var i=o.identify(e);u.has(i)||(u.set(i,e),p.appendChild(t),h.set(i,t))},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return u.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e,t){this._toggle(null,e,t)},setAlignment:function(e,t,i){var a,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(a=r),n.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:a||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom"})},setAlignmentById:function(e){var t=u.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var i=h.get(e);this.setAlignment(t,i)},isOpen:function(e){var t=h.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open:function(e){var t=h.get(e);void 0===t||t.classList.contains("dropdownOpen")||this.toggleDropdown(e)},close:function(e){var t=u.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),h.get(e).classList.remove("dropdownOpen"))},closeAll:function(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),h.get(t).classList.remove("dropdownOpen"),this._notifyCallbacks(t,"close"))}.bind(this))},destroy:function(e){if(!u.has(e))return!1;this.close(e);var t=h.get(e);return h.parentNode.removeChild(t),h["delete"](e),u["delete"](e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,i=elBySelAll(".dropdown.dropdownOpen",t),n=0,a=i.length;a>n;n++){var r=i[n],s=o.identify(r),l=o.offset(r),c=o.offset(t);l.top+r.clientHeight<=c.top?this.toggleDropdown(s):l.top>=c.top+t.offsetHeight?this.toggleDropdown(s):l.left<=c.left?this.toggleDropdown(s):l.left>=c.left+t.offsetWidth?this.toggleDropdown(s):this.setAlignment(s,h.get(s))}},_onScroll:function(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(elDataBool(e,"is-overlay-dropdown-button")?this.setAlignment(e,h.get(t)):this.close(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(i){i(e,t)})},_toggle:function(e,t,i){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"));var n=u.get(t),a=!1;if(void 0!==n&&(elDataBool(n,"dropdown-prevent-toggle")&&n.classList.contains("dropdownOpen")&&(a=!0),null===elData(n,"is-overlay-dropdown-button"))){var o=r.parentByClass(n,"dialogContent");elData(n,"is-overlay-dropdown-button",null!==o),null!==o&&o.addEventListener("scroll",this._onDialogScroll.bind(this))}return u.forEach(function(e,n){var r=h.get(n);e.classList.contains("dropdownOpen")?a===!1&&(e.classList.remove("dropdownOpen"),r.classList.remove("dropdownOpen"),this._notifyCallbacks(n,"close")):n===t&&r.childElementCount>0&&(e.classList.add("dropdownOpen"),r.classList.add("dropdownOpen"),this._notifyCallbacks(n,"open"),this.setAlignment(e,r,i))}.bind(this)),WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),define("WoltLab/WCF/Ui/Screen",["Core","Dictionary"],function(e,t){"use strict";var i=new t,n=0,a=t.fromObject({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 1024px)","screen-lg":"(min-width: 1025px)"});return{on:function(t,i){var n=e.getUuid(),a=this._getQueryObject(t);return"function"==typeof i.match&&a.callbacksMatch.set(n,i.match),"function"==typeof i.unmatch&&a.callbacksUnmatch.set(n,i.unmatch),"function"==typeof i.setup&&(a.mql.matches?i.setup():a.callbacksSetup.set(n,i.setup)),n},remove:function(e,t){var i=this._getQueryObject(e);i.callbacksMatch["delete"](t),i.callbacksUnmatch["delete"](t),i.callbacksSetup["delete"](t)},is:function(e){return this._getQueryObject(e).mql.matches},scrollDisable:function(){0===n&&document.documentElement.classList.add("disableScrolling"),n++},scrollEnable:function(){n&&(n--,0===n&&document.documentElement.classList.remove("disableScrolling"))},_getQueryObject:function(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");a.has(e)&&(e=a.get(e));var n=i.get(e);return n||(n={callbacksMatch:new t,callbacksUnmatch:new t,callbacksSetup:new t,mql:window.matchMedia(e)},n.mql.addListener(this._mqlChange.bind(this)),i.set(e,n)),n},_mqlChange:function(e){var i=this._getQueryObject(e.media);e.matches?(i.callbacksSetup.size&&(i.callbacksSetup.forEach(function(e){e()}),i.callbacksSetup=new t),i.callbacksMatch.forEach(function(e){e()})):i.callbacksUnmatch.forEach(function(e){e()})}}}),define("WoltLab/WCF/Event/Handler",["Core","Dictionary"],function(e,t){"use strict";var i=new t;return{add:function(n,a,r){if("function"!=typeof r)throw new TypeError("[WoltLab/WCF/Event/Handler] Expected a valid callback for '"+a+"@"+n+"'.");var o=i.get(n);void 0===o&&(o=new t,i.set(n,o));var s=o.get(a);void 0===s&&(s=new t,o.set(a,s));var l=e.getUuid();return s.set(l,r),l},fire:function(e,t,n){n=n||{};var a=i.get(e);if(void 0!==a){var r=a.get(t);void 0!==r&&r.forEach(function(e){e(n)})}},remove:function(e,t,n){var a=i.get(e);if(void 0!==a){var r=a.get(t);void 0!==r&&r["delete"](n)}},removeAll:function(e,t){"string"!=typeof t&&(t=void 0);var n=i.get(e);void 0!==n&&("undefined"==typeof t?i["delete"](e):n["delete"](t))}}}),define("WoltLab/WCF/Ui/Page/Menu/Abstract",["Environment","EventHandler","ObjectMap","Dom/Traverse","Dom/Util","Ui/Screen"],function(e,t,i,n,a,r){"use strict";function o(e,t,i){this.init(e,t,i)}var s=elById("pageContainer");return o.prototype={init:function(e,n,r){this._activeList=[],this._depth=0,this._enabled=!0,this._eventIdentifier=e,this._items=new i,this._menu=elById(n),this._removeActiveList=!1;var o=this.open.bind(this),s=elBySel(r);s.addEventListener(WCF_CLICK_EVENT,o),this._initItems(),this._initHeader(),t.add(this._eventIdentifier,"open",o),t.add(this._eventIdentifier,"close",this.close.bind(this));var l,c=elByClass("menuOverlayItemList",this._menu);this._menu.addEventListener("animationend",function(){if(!this._menu.classList.contains("open"))for(var e=0,t=c.length;t>e;e++)l=c[e],l.classList.remove("active"),l.classList.remove("hidden")}.bind(this)),this._menu.children[0].addEventListener("transitionend",function(){if(this._menu.classList.add("allowScroll"),this._removeActiveList){this._removeActiveList=!1;var e=this._activeList.pop();e&&e.classList.remove("activeList")}}.bind(this));var d=elCreate("div");d.className="menuOverlayMobileBackdrop",d.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),a.insertAfter(d,this._menu)},open:function(e){this._enabled&&(e instanceof Event&&e.preventDefault(),this._menu.classList.add("open"),this._menu.classList.add("allowScroll"),this._menu.children[0].classList.add("activeList"),r.scrollDisable(),s.classList.add("menuOverlay-"+this._menu.id))},close:function(e){e instanceof Event&&e.preventDefault(),this._menu.classList.contains("open")&&(this._menu.classList.remove("open"),r.scrollEnable(),s.classList.remove("menuOverlay-"+this._menu.id))},enable:function(){this._enabled=!0},disable:function(){this._enabled=!1,this.close(!0)},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var i=e.parentNode,a=elData(i,"more");if(a)return void e.addEventListener(WCF_CLICK_EVENT,function(n){n.preventDefault(),n.stopPropagation(),t.fire(this._eventIdentifier,"more",{handler:this,identifier:a,item:e,parent:i})}.bind(this));var r,o=e.nextElementSibling;if(null!==o)if("OL"!==o.nodeName&&o.classList.contains("menuOverlayItemLinkIcon"))for(r=elCreate("span"),r.className="menuOverlayItemWrapper",i.insertBefore(r,e),r.appendChild(e);r.nextElementSibling;)r.appendChild(r.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=i.parentNode,c=elData(o,"title");this._items.set(e,{itemList:o,parentItemList:l}),""===c&&(c=n.childByClass(e,"menuOverlayItemTitle").textContent,elData(o,"title",c));var d=this._showItemList.bind(this,e);if(s){r=elCreate("span"),r.className="menuOverlayItemWrapper",i.insertBefore(r,e),r.appendChild(e);var u=elCreate("a");elAttr(u,"href","#"),u.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),u.innerHTML='<span class="icon icon24 fa-angle-right"></span>',u.addEventListener(WCF_CLICK_EVENT,d),r.appendChild(u)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,d);var h=elCreate("li");h.className="menuOverlayHeader",r=elCreate("span"),r.className="menuOverlayItemWrapper";var p=elCreate("a");elAttr(p,"href","#"),p.className="menuOverlayItemLink menuOverlayBackLink",p.textContent=elData(l,"title"),p.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var f=elCreate("a");if(elAttr(f,"href","#"),f.className="menuOverlayItemLinkIcon",f.innerHTML='<span class="icon icon24 fa-times"></span>',f.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),r.appendChild(p),r.appendChild(f),h.appendChild(r),o.insertBefore(h,o.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),o.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var i=elCreate("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);var a=elCreate("span");a.className="menuOverlayLogo",a.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(a);var r=elCreate("a");elAttr(r,"href","#"),r.className="menuOverlayItemLinkIcon",r.innerHTML='<span class="icon icon24 fa-times"></span>',r.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(r);var o=n.childByClass(this._menu,"menuOverlayItemList");o.insertBefore(e,o.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0;var i=this._items.get(e);i.parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,i){i instanceof Event&&i.preventDefault();var n=this._items.get(e),a=elData(n.itemList,"load");if(a&&!elDataBool(e,"loaded")){var r=i.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void t.fire(this._eventIdentifier,"load_"+a)}this._menu.classList.remove("allowScroll"),n.itemList.classList.add("activeList"),n.parentItemList.classList.add("hidden"),this._activeList.push(n.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1,this._menu.children[0].style.setProperty("transform","translateX("+-100*this._depth+"%)","")}},o}),define("WoltLab/WCF/Ui/Page/Menu/Main",["Core","./Abstract"],function(e,t){"use strict";function i(){this.init()}return e.inherit(i,t,{init:function(){i._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu")}}),i}),define("WoltLab/WCF/Ui/Page/Menu/User",["Core","EventHandler","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}return e.inherit(n,i,{init:function(){n._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel")}}),n}),define("WoltLab/WCF/Ui/Mobile",["Core","Environment","Language","Dom/ChangeListener","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=!1,d=null,u={},h=null,p=null;return{setup:function(i){u=e.extend({enableMobileMenu:!0},i),l=elByClass("buttonGroupNavigation"),d=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile"),r.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)})},enable:function(){c=!0,u.enableMobileMenu&&(h.enable(),p.enable())},disable:function(){c=!1,u.enableMobileMenu&&(h.disable(),p.disable())},_init:function(){this._initSearchBar(),this._initButtonGroupNavigation(),this._initMobileMenu(),a.add("WoltLab/WCF/Ui/Mobile",this._closeAllMenus.bind(this)),n.add("WoltLab/WCF/Ui/Mobile",this._initButtonGroupNavigation.bind(this))},_initSearchBar:function(){var e=elBySel(".searchBar");e.addEventListener("click",function(){return c?(e.classList.add("searchBarOpen"),!1):!1}),d.addEventListener("click",function(){e.classList.remove("searchBarOpen")})},_initButtonGroupNavigation:function(){for(var e=0,t=l.length;t>e;e++){var i=l[e];if(!i.classList.contains("jsMobileButtonGroupNavigation")){i.classList.add("jsMobileButtonGroupNavigation");var n=elCreate("a");n.classList.add("dropdownLabel");var a=elCreate("span");a.className="icon icon24 fa-list",n.appendChild(a),function(e){e.addEventListener("click",function(t){var i=e.nextElementSibling;return null!==i?(i.classList.toggle("open"),t.stopPropagation(),!1):!0})}(n),i.insertBefore(n,i.firstChild)}}},_initMobileMenu:function(){u.enableMobileMenu&&(h=new o,p=new s)},_closeAllMenus:function(){for(var e=elBySelAll(".jsMobileButtonGroupNavigation > ul.open"),t=0,i=e.length;i>t;t++)e[t].classList.remove("open")}}}),define("WoltLab/WCF/Ui/TabMenu/Simple",["Dictionary","EventHandler","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";function a(t){this._container=t,this._containers=new e,this._isLegacy=null,this._store=null,this._tabs=new e}return a.prototype={validate:function(){if(!this._container.classList.contains("tabMenuContainer"))return!1;var e=i.childByTag(this._container,"NAV");if(null===e)return!1;var t=elByTag("li",e);if(0===t.length)return!1;var a,r,o,s,l=i.childrenByTag(this._container,"DIV");for(o=0,s=l.length;s>o;o++)a=l[o],r=elData(a,"name"),r||(r=n.identify(a)),elData(a,"name",r),this._containers.set(r,a);var c,d=this._container.id;for(o=0,s=t.length;s>o;o++)if(c=t[o],r=this._getTabName(c)){if(this._tabs.has(r))throw new Error("Tab names must be unique, li[data-name='"+r+"'] (tab menu id: '"+d+"') exists more than once.");if(a=this._containers.get(r),void 0===a)throw new Error("Expected content element for li[data-name='"+r+"'] (tab menu id: '"+d+"').");if(a.parentNode!==this._container)throw new Error("Expected content element '"+r+"' (tab menu id: '"+d+"') to be a direct children.");if(1!==c.childElementCount||"A"!==c.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+r+"'] (tab menu id: '"+d+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+d+"').");return this._isLegacy&&(elData(this._container,"is-legacy",!0),this._tabs.forEach(function(e,t){elAttr(e,"aria-controls",t)})),!0},init:function(e){e=e||null,this._tabs.forEach(function(t){e&&e.get(elData(t,"name"))===t||t.children[0].addEventListener("click",this._onClick.bind(this))}.bind(this));var t=null;if(!e){var i=window.location.hash.replace(/^#/,""),n=null;if(""!==i&&(n=this._tabs.get(i),n&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!n){var a=elData(this._container,"preselect")||elData(this._container,"active");"true"!==a&&a||(a=!0),a===!0?this._tabs.forEach(function(e){n||e.previousElementSibling||(n=e)}):"false"!==a&&(n=this._tabs.get(a))}n&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,n,!0));var r=elData(this._container,"store");if(r){var o=elCreate("input");o.type="hidden",o.name=r,this._container.appendChild(o),this._store=o}}return t},select:function(e,i,n){if(i=i||this._tabs.get(e),!i){if(~~e==e){e=~~e;var a=0;this._tabs.forEach(function(t){a===e&&(i=t),a++})}if(!i)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elData(i,"name");var r=this.getActiveTab(),o=null;if(r){if(elData(r,"name")===e)return;r.classList.remove("active"),o=this._containers.get(elData(r,"name")),o.classList.remove("active"),o.classList.add("hidden"),this._isLegacy&&(r.classList.remove("ui-state-active"),o.classList.remove("ui-state-active"))}i.classList.add("active");var s=this._containers.get(e);if(s.classList.add("active"),this._isLegacy&&(i.classList.add("ui-state-active"),s.classList.add("ui-state-active"),s.classList.remove("hidden")),this._store&&(this._store.value=e),!n){t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:i,activeName:e,previous:r,previousName:r?elData(r,"name"):null});var l=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;l&&l(this._container).trigger("wcftabsbeforeactivate",{newTab:l(i),oldTab:l(r),newPanel:l(s),oldPanel:l(o)}),window.history.replaceState(void 0,void 0,window.location.href.replace(/#[^#]+$/,"")+"#"+e)}},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"name");return t||1===e.childElementCount&&"A"===e.children[0].nodeName&&e.children[0].href.match(/#([^#]+)$/)&&(t=RegExp.$1,null===elById(t)?t=null:(this._isLegacy=!0,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},a}),define("WoltLab/WCF/Ui/TabMenu",["Dictionary","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","./TabMenu/Simple"],function(e,t,i,n,a){"use strict";var r=null,o=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),t.add("WoltLab/WCF/Ui/TabMenu",this._init.bind(this)),n.add("WoltLab/WCF/Ui/TabMenu",function(){r&&(r.classList.remove("active"),r=null)})},_init:function(){for(var e,t,n,s,l,c=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),d=0,u=c.length;u>d;d++)e=c[d],t=i.identify(e),o.has(t)||(l=new a(e),l.validate()&&(s=l.init(),o.set(t,l),s instanceof Element&&(l=this.getTabMenu(s.parentNode.id),l.select(s.id,null,!0)),n=elBySel("#"+t+" > nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),r=e):(e.classList.remove("active"),r=null)})}(n)))},_selectErroneousTabs:function(){o.forEach(function(e){var t=!1;e.getContainers().forEach(function(i){!t&&elByClass("formError",i).length&&(t=!0,e.select(i.id))})})},getTabMenu:function(e){return o.get(e)}}}),define("WoltLab/WCF/Ui/FlexibleMenu",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o=new t,s=new t,l=new t,c=new t,d={setup:function(){null!==elById("mainMenu")&&this.register("mainMenu");var e=elBySel(".navigationHeader");null!==e&&this.register(a.identify(e)),window.addEventListener("resize",this.rebuildAll.bind(this)),i.add("WoltLab/WCF/Ui/FlexibleMenu",this.registerTabMenus.bind(this))},register:function(e){var t=elById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(!o.has(e)){var i=n.childByTag(t,"UL");if(null===i)throw"Expected an <ul> element as child of container '"+e+"'.";o.set(e,t),c.set(e,i),this.rebuild(e)}},registerTabMenus:function(){for(var e=elBySelAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)"),t=0,i=e.length;i>t;t++){var r=e[t],o=n.childByTag(r,"NAV");null!==o&&(r.classList.add("jsFlexibleMenuEnabled"),this.register(a.identify(o)))}},rebuildAll:function(){o.forEach(function(e,t){this.rebuild(t)}.bind(this))},rebuild:function(t){var i=o.get(t);if(void 0===i)throw"Expected a valid element id, '"+t+"' is unknown.";var d=window.getComputedStyle(i),u=i.parentNode.clientWidth;u-=a.styleAsInt(d,"margin-left"),u-=a.styleAsInt(d,"margin-right");var h=c.get(t),p=n.childrenByTag(h,"LI"),f=s.get(t),m=0;if(void 0!==f){for(var g=0,v=p.length;v>g;g++){var b=p[g];b.classList.contains("dropdown")||elShow(b)}null!==f.parentNode&&(m=a.outerWidth(f))}var _=h.scrollWidth-m,y=[];if(_>u)for(var g=p.length-1;g>=0;g--){var b=p[g];if(!(b.classList.contains("dropdown")||b.classList.contains("active")||b.classList.contains("ui-state-active"))&&(y.push(b),elHide(b),h.scrollWidth<u))break}if(y.length){var w;if(void 0===f){f=elCreate("li"),f.className="dropdown jsFlexibleMenuDropdown";var C=elCreate("a");C.className="icon icon16 fa-list",f.appendChild(C),w=elCreate("ul"),w.classList.add("dropdownMenu"),f.appendChild(w),s.set(t,f),l.set(t,w),r.init(C)}else w=l.get(t);null===f.parentNode&&h.appendChild(f);var L=document.createDocumentFragment(),E=this;y.forEach(function(i){var n=elCreate("li");n.innerHTML=i.innerHTML,n.addEventListener("click",function(n){n.preventDefault(),e.triggerEvent(elBySel("a",i),"click"),setTimeout(function(){E.rebuild(t)},59)}.bind(this)),L.appendChild(n)}),w.innerHTML="",w.appendChild(L)}else void 0!==f&&null!==f.parentNode&&elRemove(f)}};return d}),define("WoltLab/WCF/Ui/Tooltip",["Environment","Dom/ChangeListener","Ui/Alignment"],function(e,t,i){"use strict";var n=null,a=null,r=null,o=null;return{setup:function(){"desktop"===e.platform()&&(o=elCreate("div"),elAttr(o,"id","balloonTooltip"),o.classList.add("balloonTooltip"),r=elCreate("span"),elAttr(r,"id","balloonTooltipText"),o.appendChild(r),a=elCreate("span"),a.classList.add("elementPointer"),a.appendChild(elCreate("span")),o.appendChild(a),document.body.appendChild(o),n=elByClass("jsTooltip"),this.init(),t.add("WoltLab/WCF/Ui/Tooltip",this.init.bind(this)),window.addEventListener("scroll",this._mouseLeave.bind(this)))},init:function(){for(var e,t;n.length;)e=n[0],e.classList.remove("jsTooltip"),t=elAttr(e,"title").trim(),t.length&&(elData(e,"tooltip",t),e.removeAttribute("title"),e.addEventListener("mouseenter",this._mouseEnter.bind(this)),e.addEventListener("mouseleave",this._mouseLeave.bind(this)),e.addEventListener("click",this._mouseLeave.bind(this)))},_mouseEnter:function(e){var t=e.currentTarget,n=elAttr(t,"title");return n="string"==typeof n?n.trim():"",""!==n&&(elData(t,"tooltip",n),t.removeAttribute("title")),n=elData(t,"tooltip"),o.style.removeProperty("top"),o.style.removeProperty("left"),n.length?(o.classList.add("active"),r.textContent=n,void i.set(o,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):void o.classList.remove("active")},_mouseLeave:function(){o.classList.remove("active")}}}),define("WoltLab/WCF/Date/Picker",["DateUtil","Language","ObjectMap","Dom/ChangeListener","Ui/Alignment","WoltLab/WCF/Ui/CloseOverlay"],function(e,t,i,n,a,r){"use strict";var o=!1,s=0,l=new i,c=null,d=0,u=0,h=[],p=null,f=null,m=null,g=null,v=null,b=null,_=null,y=null,w=null,C=null,L={
+S.$=a[a.length-x],S._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},b&&(S._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),L=this.performAction.apply(S,[s,c,l,m.yy,C[1],a,r].concat(p)),"undefined"!=typeof L)return L;x&&(n=n.slice(0,-1*x*2),a=a.slice(0,-1*x),r=r.slice(0,-1*x)),n.push(this.productions_[C[1]][0]),a.push(S.$),r.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},v=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,n,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in a)this[r]=a[r];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,i,n;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),r=0;r<a.length;r++)if(i=this._input.match(this.rules[a[r]]),i&&(!t||i[0].length>t[0].length)){if(t=i,n=r,this.options.backtrack_lexer){if(e=this.test_match(i,a[r]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,a[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:return 23;case 3:return 23;case 4:return 21;case 5:return 22;case 6:return 19;case 7:return 16;case 8:return 15;case 9:return 18;case 10:return 17;case 11:return 20;case 12:return 41;case 13:return 42;case 14:return 39;case 15:return 40;case 16:return this.begin("command"),24;case 17:return this.begin("command"),46;case 18:return this.begin("command"),46;case 19:return 44;case 20:return 28;case 21:return 36;case 22:return 37;case 23:return this.begin("command"),29;case 24:return this.begin("command"),31;case 25:return 32;case 26:return this.begin("command"),33;case 27:return 48;case 28:return 35;case 29:return 13;case 30:return this.popState(),12;case 31:return 12;case 32:return 14;case 33:return 5;case 34:return 11}},rules:[/^(?:\{\*.*\*\})/,/^(?:\{literal\}.*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{)/,/^(?:\})/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],inclusive:!0},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34],inclusive:!0}}};return e}();return g.lexer=v,g}),define("WoltLab/WCF/NumberUtil",[],function(){"use strict";var e={round:function(e,t){return"undefined"==typeof t||0===+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!==0?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}};return e}),define("WoltLab/WCF/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{addThousandsSeparator:function(t){return void 0===e&&(e=require("Language")),String(t).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+e.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(i,n){void 0===e&&(e=require("Language")),i=String(t.round(i,n||-2));var a=i.split(".");return i=this.addThousandsSeparator(a[0]),a.length>1&&(i+=e.get("wcf.global.decimalPoint")+a[1]),i=i.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}}}),define("WoltLab/WCF/Template",["./Template.grammar","./StringUtil","Language"],function(e,t,i){"use strict";function n(){this.yy={}}function a(n){void 0===i&&(i=require("Language")),void 0===t&&(t=require("StringUtil"));try{n=e.parse(n),n="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+n,this.fetch=new Function("StringUtil","Language","v",n).bind(void 0,t,i)}catch(a){throw console.debug(a.message),a}}return n.prototype=e,e.Parser=n,e=new n,Object.defineProperty(a,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(e){throw new Error("WCF.Template.callbacks is no longer supported")}}),a.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},a}),define("WoltLab/WCF/Language",["Dictionary","./Template"],function(e,t){"use strict";var i=new e,n={addObject:function(t){i.merge(e.fromObject(t))},add:function(e,t){i.set(e,t)},get:function(e,n){n||(n={});var a=i.get(e);return void 0===a?e:("string"==typeof a&&(i.set(e,new t(a)),a=i.get(e)),a instanceof t&&(a=a.fetch(n)),a)}};return n}),define("WoltLab/WCF/CallbackList",["Dictionary"],function(e){"use strict";function t(){this._dictionary=new e}return t.prototype={add:function(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._dictionary.has(e)||this._dictionary.set(e,[]),this._dictionary.get(e).push(t)},remove:function(e){this._dictionary["delete"](e)},forEach:function(e,t){if(null===e)this._dictionary.forEach(function(e,i){e.forEach(t)});else{var i=this._dictionary.get(e);void 0!==i&&i.forEach(t)}}},t}),define("WoltLab/WCF/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,i=!1;return{add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!i)try{i=!0,t.forEach(null,function(e){e()})}finally{i=!1}}}}),define("WoltLab/WCF/Environment",[],function(){"use strict";var e="other",t="none",i="desktop",n=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var a=window.getComputedStyle(document.documentElement),r=0,o=a.length;o>r;r++){var s=a[r];0===s.indexOf("-ms-")?e="microsoft":0===s.indexOf("-moz-")?e="firefox":0===s.indexOf("-webkit-")&&(e="safari")}var l=window.navigator.userAgent.toLowerCase();-1!==l.indexOf("crios")?(e="chrome",i="ios"):/(?:iphone|ipad|ipod)/.test(l)?(e="safari",i="ios"):-1!==l.indexOf("android")?i="android":-1!==l.indexOf("iemobile")&&(e="microsoft",i="windows"),"desktop"!==i||-1===l.indexOf("mobile")&&-1===l.indexOf("tablet")||(i="mobile"),t="redactor",n=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return i},touch:function(){return n}}}),define("WoltLab/WCF/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function i(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var n,a=i+"Sibling";null!==e&&e!==t;){if(null!==e[i+"ElementSibling"])return!1;if(e[a])for(n=e[a];n;){if(""!==n.textContent.trim())return!1;n=n[a]}e=e.parentNode}return!0}var n=0,a={createFragmentFromHtml:function(e){var t=elCreate("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId:function(){var e;do e="wcf"+n++;while(null!==elById(e));return e},identify:function(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight},outerDimensions:function(e){var t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.scrollY,left:t.left+window.scrollX}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(t,i){var n=!1;for(var a in i)objOwns(i,a)&&(/ !important$/.test(i[a])?(n=!0,i[a]=i[a].replace(/ !important$/,"")):n=!1,"safari"!==e.browser()||"important"!==t.style.getPropertyPriority(a)||n||t.style.removeProperty(a),t.style.setProperty(a,i[a],n?"important":""))},styleAsInt:function(e,t){var i=e.getPropertyValue(t);return null===i?0:parseInt(i)},setInnerHtml:function(e,t){e.innerHTML=t;for(var i,n,a=elBySelAll("script",e),r=0,o=a.length;o>r;r++)n=a[r],i=elCreate("script"),n.src?i.src=n.src:i.textContent=n.textContent,e.appendChild(i),elRemove(n)},insertHtml:function(e,t,i){var n=elCreate("div");if(this.setInnerHtml(n,e),"append"===i||"after"===i)for(;n.childNodes.length;)"append"===i?t.appendChild(n.childNodes[0]):this.insertAfter(n.childNodes[0],t);else{if("prepend"!==i&&"before"!==i)throw new Error("Unknown insert method '"+i+"'.");for(var a=n.childNodes.length-1;a>=0;a--)"prepend"===i?this.prepend(n.childNodes[a],t):t.parentNode.insertBefore(n.childNodes[a],t)}},contains:function(e,t){for(;null!==t;)if(t=t.parentNode,e===t)return!0;return!1},getDataAttributes:function(e,i,n,a){i=i||"",/^data-/.test(i)||(i="data-"+i),n=n===!0,a=a===!0;for(var r,o,s,l={},c=0,d=e.attributes.length;d>c;c++)if(r=e.attributes[c],0===r.name.indexOf(i)){if(o=r.name.replace(new RegExp("^"+i),""),n){s=o.split("-"),o="";for(var u=0,h=s.length;h>u;u++)o.length&&(a&&"id"===s[u]?s[u]="ID":s[u]=t.ucfirst(s[u])),o+=s[u]}l[o]=r.value}return l},unwrapChildNodes:function(e){for(var t=e.parentNode;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);elRemove(e)},replaceElement:function(e,t){for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),elRemove(e)},isAtNodeStart:function(e,t){return i(e,t,"previous")},isAtNodeEnd:function(e,t){return i(e,t,"next")}};return window.bc_wcfDomUtil=a,a}),function(e,t,i){var n=window.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=i(n):"function"==typeof define&&define.amd?define("enquire",[],function(){return t[e]=i(n)}):t[e]=i(n)}("enquire",this,function(e){"use strict";function t(e,t){var i,n=0,a=e.length;for(n;a>n&&(i=t(e[n],n),i!==!1);n++);}function i(e){return"[object Array]"===Object.prototype.toString.apply(e)}function n(e){return"function"==typeof e}function a(e){this.options=e,!e.deferSetup&&this.setup()}function r(t,i){this.query=t,this.isUnconditional=i,this.handlers=[],this.mql=e(t);var n=this;this.listener=function(e){n.mql=e,n.assess()},this.mql.addListener(this.listener)}function o(){if(!e)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!e("only all").matches}return a.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},r.prototype={addHandler:function(e){var t=new a(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var i=this.handlers;t(i,function(t,n){return t.equals(e)?(t.destroy(),!i.splice(n,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){t(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";t(this.handlers,function(t){t[e]()})}},o.prototype={register:function(e,a,o){var s=this.queries,l=o&&this.browserIsIncapable;return s[e]||(s[e]=new r(e,l)),n(a)&&(a={match:a}),i(a)||(a=[a]),t(a,function(t){n(t)&&(t={match:t}),s[e].addHandler(t)}),this},unregister:function(e,t){var i=this.queries[e];return i&&(t?i.removeHandler(t):(i.clear(),delete this.queries[e])),this}},new o}),define("WoltLab/WCF/ObjectMap",[],function(){"use strict";function e(){this._map=t?new WeakMap:{key:[],value:[]}}var t=objOwns(window,"WeakMap")&&"function"==typeof window.WeakMap;return e.prototype={set:function(e,i){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof i||null===i)throw new TypeError("Only objects can be used as value");t?this._map.set(e,i):(this._map.key.push(e),this._map.value.push(i))},"delete":function(e){if(t)this._map["delete"](e);else{var i=this._map.key.indexOf(e);this._map.key.splice(i),this._map.value.splice(i)}},has:function(e){return t?this._map.has(e):-1!==this._map.key.indexOf(e)},get:function(e){if(t)return this._map.get(e);var i=this._map.key.indexOf(e);return-1!==i?this._map.value[i]:void 0}},e}),define("WoltLab/WCF/Dom/Traverse",[],function(){"use strict";var e=0,t=1,i=2,n=3,a=[function(e,t){return!0},function(e,t){return e.matches(t)},function(e,t){return e.classList.contains(t)},function(e,t){return e.nodeName===t}],r=function(e,t,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(var n=[],r=0;r<e.childElementCount;r++)a[t](e.children[r],i)&&n.push(e.children[r]);return n},o=function(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(e=e.parentNode;e instanceof Element;){if(e===n)return null;if(a[t](e,i))return e;e=e.parentNode}return null},s=function(e,t,i,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&a[i](e[t],n)?e[t]:null};return{childBySel:function(e,i){return r(e,t,i)[0]||null},childByClass:function(e,t){return r(e,i,t)[0]||null},childByTag:function(e,t){return r(e,n,t)[0]||null},childrenBySel:function(e,i){return r(e,t,i)},childrenByClass:function(e,t){return r(e,i,t)},childrenByTag:function(e,t){return r(e,n,t)},parentBySel:function(e,i,n){return o(e,t,i,n)},parentByClass:function(e,t,n){return o(e,i,t,n)},parentByTag:function(e,t,i){return o(e,n,t,i)},next:function(t){return s(t,"nextElementSibling",e,null)},nextBySel:function(e,i){return s(e,"nextElementSibling",t,i)},nextByClass:function(e,t){return s(e,"nextElementSibling",i,t)},nextByTag:function(e,t){return s(e,"nextElementSibling",n,t)},prev:function(t){return s(t,"previousElementSibling",e,null)},prevBySel:function(e,i){return s(e,"previousElementSibling",t,i)},prevByClass:function(e,t){return s(e,"previousElementSibling",i,t)},prevByTag:function(e,t){return s(e,"previousElementSibling",n,t)}}}),define("WoltLab/WCF/Ui/Confirmation",["Core","Language","Ui/Dialog"],function(e,t,i){"use strict";var n=!1,a=null,r=null,o={},s=null,l={show:function(t){if(void 0===i&&(i=require("Ui/Dialog")),!n){if(o=e.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},t),o.message="string"==typeof o.message?o.message.trim():"",!o.message.length)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof o.confirm&&"function"!=typeof o.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");null===r&&this._createDialog(),r.innerHTML="string"==typeof o.template?o.template.trim():"",o.messageIsHtml?s.innerHTML=o.message:s.textContent=o.message,n=!0,i.open(this)}},_dialogSetup:function(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:t.get("wcf.global.confirmation.title")}}},getContentElement:function(){return r},_createDialog:function(){var e=elCreate("div");elAttr(e,"id","wcfSystemConfirmation"),e.classList.add("systemConfirmation"),s=elCreate("p"),e.appendChild(s),r=elCreate("div"),elAttr(r,"id","wcfSystemConfirmationContent"),e.appendChild(r);var n=elCreate("div");n.classList.add("formSubmit"),e.appendChild(n),a=elCreate("button"),a.classList.add("buttonPrimary"),a.textContent=t.get("wcf.global.confirmation.confirm"),a.addEventListener("click",this._confirm.bind(this)),n.appendChild(a);var o=elCreate("button");o.textContent=t.get("wcf.global.confirmation.cancel"),o.addEventListener("click",function(){i.close("wcfSystemConfirmation")}),n.appendChild(o),document.body.appendChild(e)},_confirm:function(){"function"==typeof o.legacyCallback?o.legacyCallback("confirm",o.parameters):o.confirm(o.parameters),n=!1,i.close("wcfSystemConfirmation")},_onClose:function(){n&&(a.blur(),n=!1,"function"==typeof o.legacyCallback?o.legacyCallback("cancel",o.parameters):"function"==typeof o.cancel&&o.cancel(o.parameters))},_onShow:function(){a.blur(),a.focus()}};return l}),define("WoltLab/WCF/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";var u=null,h=null,p=new n,f=new o,m=!1,g=null,v=elByClass("jsStaticDialog");return{setup:function(){void 0===t&&(t=require("Ajax")),h=elCreate("div"),h.classList.add("dialogOverlay"),elAttr(h,"aria-hidden","true"),h.addEventListener("click",this._closeOnBackdrop.bind(this)),elById("content").appendChild(h),g=function(e){return 27===e.keyCode&&"INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName?(this.close(u),!1):!0}.bind(this),e.register("(max-width: 767px)",{match:function(){m=!0},unmatch:function(){m=!1},setup:function(){m=!0},deferSetup:!0}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this))},_initStaticDialogs:function(){for(var e,t,i;v.length;)e=v[0],e.classList.remove("jsStaticDialog"),i=elData(e,"dialog-id"),i&&(t=elById(i))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elHide(t),e.addEventListener("click",this.openStatic.bind(this,t.id,null,{title:elData(t,"title")}))}.bind(this)(e,t)},open:function(e,n){var a=f.get(e);if(i.isPlainObject(a))return this.openStatic(a.id,n);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=e._dialogSetup();if(!i.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");a={id:r.id};var o=!0;if(void 0===r.source){var s=elById(r.id);if(null===s)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given.");r.source=document.createDocumentFragment(),r.source.appendChild(s),s.removeAttribute("id"),elShow(s)}else if(null===r.source)r.source=n;else if("function"==typeof r.source)r.source();else if(i.isPlainObject(r.source)){if("string"!=typeof n||""===n.trim())return t.api(this,r.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof r.source.after&&r.source.after(p.get(r.id).content,t))}.bind(this)),{};r.source=n}else{if("string"==typeof r.source){var s=elCreate("div");elAttr(s,"id",r.id),s.innerHTML=r.source,r.source=document.createDocumentFragment(),r.source.appendChild(s)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return f.set(e,a),this.openStatic(r.id,r.source,r.options,o)},openStatic:function(e,t,n,a){return p.has(e)?this._updateDialog(e,t):(n=i.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:r.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},n),n.closable||(n.backdropCloseOnClick=!1),n.closeConfirmMessage&&(n.onBeforeClose=function(e){d.show({confirm:this.close.bind(this,e),message:n.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,n)),p.get(e)},setTitle:function(e,t){if("object"==typeof e){var i=f.get(e);void 0!==i&&(e=i.id)}var n=p.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var a=elByClass("dialogTitle",n.dialog);a.length&&(a[0].textContent=t)},_createDialog:function(e,t,i,n){var a=null;if(null===t&&(a=elById(e),null===a))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var o=elCreate("header");r.appendChild(o);var s=c.getUniqueId();elAttr(r,"aria-labelledby",s);var l=elCreate("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,elAttr(l,"id",s),o.appendChild(l),i.closable){var d=elCreate("a");d.className="dialogCloseButton jsTooltip",elAttr(d,"title",i.closeButtonLabel),elAttr(d,"aria-label",i.closeButtonLabel),d.addEventListener("click",this._close.bind(this)),o.appendChild(d);var u=elCreate("span");u.className="icon icon24 fa-times",d.appendChild(u)}var f=elCreate("div");f.classList.add("dialogContent"),i.disableContentPadding&&f.classList.add("dialogContentNoPadding"),r.appendChild(f);var m;null===a?"string"==typeof t?(m=elCreate("div"),m.id=e,m.innerHTML=t):t instanceof DocumentFragment&&("div"!==t.children[0].nodeName||t.childElementCount>1?(m=elCreate("div"),m.id=e,m.appendChild(t)):m=t):m=a,f.appendChild(m),"none"===m.style.getPropertyValue("display")&&elShow(m),p.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,content:m,dialog:r,header:o,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow}),c.prepend(r,h),"function"==typeof i.onSetup&&i.onSetup(m),n!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var i=p.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t){i.content.innerHTML="";var n=elCreate("div");n.innerHTML=t;for(var a=elBySelAll("script",n),r=0,o=a.length;o>r;r++){var l=a[r],c=elCreate("script");c.innerHTML=l.innerHTML,n.appendChild(c),elRemove(l)}i.content.appendChild(n)}if("true"===elAttr(i.dialog,"aria-hidden")){"true"===elAttr(h,"aria-hidden")&&window.addEventListener("keyup",g),elAttr(i.dialog,"aria-hidden","false"),elAttr(h,"aria-hidden","false"),elData(h,"close-on-click",i.backdropCloseOnClick?"true":"false"),u=e,this.rebuild(e);var d=elBySel(".jsDialogAutoFocus",i.dialog);null!==d&&null!==d.offsetParent&&d.focus(),"function"==typeof i.onShow&&i.onShow(e)}s.trigger()},rebuild:function(e){var t=p.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("true"!==elAttr(t.dialog,"aria-hidden")){var i=t.content.parentNode,n=elBySel(".formSubmit",t.content),r=0;null!==n?(i.classList.add("dialogForm"),n.classList.add("dialogFormSubmit"),r+=c.outerHeight(n),i.style.setProperty("margin-bottom",r+"px")):i.classList.remove("dialogForm"),r+=c.outerHeight(t.header);var o=window.innerHeight*(m?1:.8)-r;i.style.setProperty("max-height",~~o+"px"),"chrome"===a.browser()&&(t.content.scrollHeight>o?t.content.style.setProperty("margin-right","-1px"):t.content.style.removeProperty("margin-right"))}},_close:function(e){e.preventDefault();var t=p.get(u);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(u),!1):void this.close(u)},_closeOnBackdrop:function(e){return e.target!==h?!0:void("true"===elData(h,"close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=f.get(e);void 0!==t&&(e=t.id)}var i=p.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");"function"==typeof i.onClose&&i.onClose(e),elAttr(i.dialog,"aria-hidden","true"),u=null;for(var n=0;n<h.childElementCount;n++){var a=h.children[n];if("false"===elAttr(a,"aria-hidden")){u=elData(a,"id");break}}null===u?(elAttr(h,"aria-hidden","true"),elData(h,"close-on-click","false"),window.removeEventListener("keyup",g)):(i=p.get(u),elData(h,"close-on-click",i.backdropCloseOnClick?"true":"false"))},getDialog:function(e){return p.get(e)},_ajaxSetup:function(){return{}}}}),define("WoltLab/WCF/Ajax/Status",["Language"],function(e){"use strict";var t=0,i=null,n=null,a={_init:function(){i=elCreate("div"),i.classList.add("spinner");var t=elCreate("span");t.className="icon icon48 fa-spinner",i.appendChild(t);var n=elCreate("span");n.textContent=e.get("wcf.global.loading"),i.appendChild(n),document.body.appendChild(i)},show:function(){null===i&&this._init(),t++,null===n&&(n=window.setTimeout(function(){t&&i.classList.add("active"),n=null},250))},hide:function(){t--,0===t&&(null!==n&&window.clearTimeout(n),i.classList.remove("active"))}};return a}),define("WoltLab/WCF/Ajax/Request",["Core","Language","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLab/WCF/Ajax/Status"],function(e,t,i,n,a,r){"use strict";function o(e){this._data=null,this._options={},this._previousXhr=null,this._xhr=null,this._init(e)}var s=!1,l=!1;return o.prototype={_init:function(t){this._options=e.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},t),"object"==typeof t.callbackObject&&(this._options.callbackObject=t.callbackObject),this._options.url=e.convertLegacyUrl(this._options.url),this._options.pinData&&(this._data=e.extend({},this._options.data)),null!==this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),s===!1&&(s=!0,window.addEventListener("beforeunload",function(){l=!0}))},sendRequest:function(t){(t===!0||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||r.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");var i=this,n=e.clone(this._options);if(this._xhr.onload=function(){this.readyState===XMLHttpRequest.DONE&&(this.status>=200&&this.status<300||304===this.status?n.responseType&&n.responseType!==this.getResponseHeader("Content-Type")?i._failure(this,n):i._success(this,n):i._failure(this,n))},this._xhr.onerror=function(){i._failure(this,n)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){
+var a=this._options.data;"object"==typeof a&&"FormData"!==e.getType(a)&&(a=e.serialize(a)),this._xhr.send(a)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,e)?this._options[e]:null},setData:function(t){null!==this._data&&"FormData"!==e.getType(t)&&(t=e.extend(this._data,t)),this._options.data=t},_success:function(e,t){if(t.silent||r.hide(),"function"==typeof t.success){var i=null;if("application/json"===e.getResponseHeader("Content-Type")){try{i=JSON.parse(e.responseText)}catch(n){return void this._failure(e,t)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim())}t.success(i,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,i){if(!l){i.silent||r.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(s){}var c=!0;if("function"==typeof i.failure&&(c=i.failure(o,e.responseText,e,i.data)),i.ignoreError!==!0&&c!==!1){var d="",u="";if(null!==o?(o.stacktrace?d="<br /><p>Stacktrace:</p><p>"+o.stacktrace+"</p>":o.exceptionID&&(d="<br /><p>Exception ID: <code>"+o.exceptionID+"</code></p>"),u=o.message):u=e.responseText,!u||"undefined"===u)return;var h='<div class="ajaxDebugMessage"><p>'+u+"</p>"+d+"</div>";void 0===a&&(a=require("Ui/Dialog")),a.openStatic(n.getUniqueId(),h,{title:t.get("wcf.global.error.title")})}this._finalize(i)}},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,i.trigger();for(var t=elBySelAll('a[href*="#"]'),n=0,a=t.length;a>n;n++){var r=t[n],o=elAttr(r,"href");(-1!==o.indexOf("AJAXProxy")||-1!==o.indexOf("ajax-proxy"))&&(o=o.substr(o.indexOf("#")),elAttr(r,"href",document.location.toString().replace(/#.*/,"")+o))}}},o}),define("WoltLab/WCF/Ajax",["AjaxRequest","Core","ObjectMap"],function(e,t,i){"use strict";var n=new i,a={api:function(t,i,a,r){"object"!=typeof i&&(i={});var o=n.get(t);if(void 0===o){if("function"!=typeof t._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");var s=t._ajaxSetup();s.pinData=!0,s.callbackObject=t,s.url||(s.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN),o=new e(s),n.set(t,o)}var l=null,c=null;return"function"==typeof a&&(l=o.getOption("success"),o.setOption("success",a)),"function"==typeof r&&(c=o.getOption("failure"),o.setOption("failure",r)),o.setData(i),o.sendRequest(),null!==l&&o.setOption("success",l),null!==c&&o.setOption("failure",c),o},apiOnce:function(t){t.pinData=!1,t.callbackObject=null,t.url||(t.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN);var i=new e(t);i.sendRequest()}};return a}),function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||g)return!1;try{d.clearRect(0,0,l,s),d.drawImage(e,0,0,l,s)}catch(i){}_=setTimeout(t,I.duration,e),M.setIcon(c)}function i(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,i,n){return t+t+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:!1}function n(e,t){var i,n={};for(i in e)n[i]=e[i];for(i in t)n[i]=t[i];return n}function a(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}e=e?e:{};var r,o,s,l,c,d,u,h,p,f,m,g,v,b,_,y={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,dataUrl:!1};v={},v.ff="undefined"!=typeof InstallTrigger,v.chrome=!!window.chrome,v.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var w=[];m=function(){},h=g=!1;var C=function(){r=n(y,e),r.bgColor=i(r.bgColor),r.textColor=i(r.textColor),r.position=r.position.toLowerCase(),r.animation=I.types[""+r.animation]?r.animation:y.animation;var t=r.position.indexOf("up")>-1,a=r.position.indexOf("left")>-1;if(t||a)for(var h=0;h<I.types[""+r.animation].length;h++){var p=I.types[""+r.animation][h];t&&(p.y<.6?p.y=p.y-.4:p.y=p.y-2*p.y+(1-p.w)),a&&(p.x<.6?p.x=p.x-.4:p.x=p.x-2*p.x+(1-p.h)),I.types[""+r.animation][h]=p}r.type=E[""+r.type]?r.type:y.type,o=M.getIcon(),c=document.createElement("canvas"),u=document.createElement("img"),o.hasAttribute("href")?(u.setAttribute("src",o.getAttribute("href")),u.onload=function(){s=u.height>0?u.height:32,l=u.width>0?u.width:32,c.height=s,c.width=l,d=c.getContext("2d"),L.ready()}):(u.setAttribute("src",""),s=32,l=32,u.height=s,u.width=l,c.height=s,c.width=l,d=c.getContext("2d"),L.ready())},L={};L.ready=function(){h=!0,L.reset(),m()},L.reset=function(){h&&(w=[],p=!1,f=!1,d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),M.setIcon(c),window.clearTimeout(b),window.clearTimeout(_))},L.start=function(){if(h&&!f){var e=function(){p=w[0],f=!1,w.length>0&&(w.shift(),L.start())};if(w.length>0){f=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in w[0].options&&(r[e]=w[0].options[e])}),I.run(w[0].options,function(){e()},!1)};p?I.run(p.options,function(){t()},!0):t()}}};var E={},x=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=l*e.x,e.y=s*e.y,e.w=l*e.w,e.h=s*e.h,e.len=(""+e.n).length,e};E.circle=function(e){e=x(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.fontFamily,d.textAlign="center",t?(d.moveTo(e.x+e.w/2,e.y),d.lineTo(e.x+e.w-e.h/2,e.y),d.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),d.lineTo(e.x+e.w,e.y+e.h-e.h/2),d.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),d.lineTo(e.x+e.h/2,e.y+e.h),d.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),d.lineTo(e.x,e.y+e.h/2),d.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):d.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fill(),d.closePath(),d.beginPath(),d.stroke(),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()},E.rectangle=function(e){e=x(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,d.textAlign="center",d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fillRect(e.x,e.y,e.w,e.h),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()};var T=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&I.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&E[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=i(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),w.push(n),w.length>100)throw"Too many badges requests in queue.";L.start()}else L.reset()}catch(a){throw"Error setting badge. Message: "+a.message}},h&&m()},D=function(e){m=function(){try{var t=e.width,i=e.height,n=document.createElement("img"),a=i/s>t/l?t/l:i/s;n.setAttribute("src",e.getAttribute("src")),n.height=i/a,n.width=t/a,d.clearRect(0,0,l,s),d.drawImage(n,0,0,l,s),M.setIcon(c)}catch(r){throw"Error setting image. Message: "+r.message}},h&&m()},S=function(e){m=function(){try{if("stop"===e)return g=!0,L.reset(),void(g=!1);e.addEventListener("play",function(){t(this)},!1)}catch(i){throw"Error setting video. Message: "+i.message}},h&&m()},k=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),v.supported){var i=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,m=function(){try{if("stop"===e)return g=!0,L.reset(),void(g=!1);i=document.createElement("video"),i.width=l,i.height=s,navigator.getUserMedia({video:!0,audio:!1},function(e){i.src=URL.createObjectURL(e),i.play(),t(i)},function(){})}catch(n){throw"Error setting webcam. Message: "+n.message}},h&&m()}},M={};M.getIcon=function(){var e=!1,t=function(){for(var e=document.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length,i=t-1;i>=0;i--)if(/(^|\s)icon(\s|$)/i.test(e[i].getAttribute("rel")))return e[i];return!1};return r.element?e=r.element:r.elementId?(e=document.getElementById(r.elementId),e.setAttribute("href",e.getAttribute("src"))):(e=t(),e===!1&&(e=document.createElement("link"),e.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(e))),e.setAttribute("type","image/png"),e},M.setIcon=function(e){var t=e.toDataURL("image/png");if(r.dataUrl&&r.dataUrl(t),r.element)r.element.setAttribute("src",t);else if(r.elementId)document.getElementById(r.elementId).setAttribute("src",t);else if(v.ff||v.opera){var i=o;o=document.createElement("link"),v.opera&&o.setAttribute("rel","icon"),o.setAttribute("rel","icon"),o.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(o),o.setAttribute("href",t),i.parentNode&&i.parentNode.removeChild(i)}else o.setAttribute("href",t)};var I={};return I.duration=40,I.types={},I.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],I.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],I.run=function(e,t,i,o){var s=I.types[a()?"none":r.animation];return o=i===!0?"undefined"!=typeof o?o:s.length-1:"undefined"!=typeof o?o:0,t=t?t:function(){},o<s.length&&o>=0?(E[r.type](n(e,s[o])),b=setTimeout(function(){i?o-=1:o+=1,I.run(e,t,i,o)},I.duration),M.setIcon(c),void 0):void t()},C(),{badge:T,video:S,image:D,webcam:k,reset:L.reset,browser:{supported:v.supported}}};"undefined"!=typeof define&&define.amd?define("favico",[],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(e,t,i){"use strict";var n=e("../main");"function"==typeof define&&define.amd?define("perfect-scrollbar",n):(window.PerfectScrollbar=n,"undefined"==typeof window.Ps&&(window.Ps=n))},{"../main":7}],2:[function(e,t,i){"use strict";function n(e,t){var i=e.className.split(" ");i.indexOf(t)<0&&i.push(t),e.className=i.join(" ")}function a(e,t){var i=e.className.split(" "),n=i.indexOf(t);n>=0&&i.splice(n,1),e.className=i.join(" ")}i.add=function(e,t){e.classList?e.classList.add(t):n(e,t)},i.remove=function(e,t){e.classList?e.classList.remove(t):a(e,t)},i.list=function(e){return e.classList?e.classList:e.className.split(" ")}},{}],3:[function(e,t,i){"use strict";function n(e,t){return window.getComputedStyle(e)[t]}function a(e,t,i){return"number"==typeof i&&(i=i.toString()+"px"),e.style[t]=i,e}function r(e,t){for(var i in t){var n=t[i];"number"==typeof n&&(n=n.toString()+"px"),e.style[i]=n}return e}i.e=function(e,t){var i=document.createElement(e);return i.className=t,i},i.appendTo=function(e,t){return t.appendChild(e),e},i.css=function(e,t,i){return"object"==typeof t?r(e,t):"undefined"==typeof i?n(e,t):a(e,t,i)},i.matches=function(e,t){return"undefined"!=typeof e.matches?e.matches(t):"undefined"!=typeof e.matchesSelector?e.matchesSelector(t):"undefined"!=typeof e.webkitMatchesSelector?e.webkitMatchesSelector(t):"undefined"!=typeof e.mozMatchesSelector?e.mozMatchesSelector(t):"undefined"!=typeof e.msMatchesSelector?e.msMatchesSelector(t):void 0},i.remove=function(e){"undefined"!=typeof e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}},{}],4:[function(e,t,i){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var i="undefined"!=typeof t;this.events[e]=this.events[e].filter(function(n){return i&&n!==t?!0:(this.element.removeEventListener(e,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var a=function(){this.eventElements=[]};a.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new n(e),this.eventElements.push(t)),t},a.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},a.prototype.unbind=function(e,t,i){this.eventElement(e).unbind(t,i)},a.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},a.prototype.once=function(e,t,i){var n=this.eventElement(e),a=function(e){n.unbind(t,a),i(e)};n.bind(t,a)},t.exports=a},{}],5:[function(e,t,i){"use strict";t.exports=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}()},{}],6:[function(e,t,i){"use strict";var n=e("./class"),a=e("./dom");i.toInt=function(e){return"string"==typeof e?parseInt(e,10):~~e},i.clone=function(e){if(null===e)return null;if("object"==typeof e){var t={};for(var i in e)t[i]=this.clone(e[i]);return t}return e},i.extend=function(e,t){var i=this.clone(e);for(var n in t)i[n]=this.clone(t[n]);return i},i.isEditable=function(e){return a.matches(e,"input,[contenteditable]")||a.matches(e,"select,[contenteditable]")||a.matches(e,"textarea,[contenteditable]")||a.matches(e,"button,[contenteditable]")},i.removePsClasses=function(e){for(var t=n.list(e),i=0;i<t.length;i++){var a=t[i];0===a.indexOf("ps-")&&n.remove(e,a)}},i.outerWidth=function(e){return this.toInt(a.css(e,"width"))+this.toInt(a.css(e,"paddingLeft"))+this.toInt(a.css(e,"paddingRight"))+this.toInt(a.css(e,"borderLeftWidth"))+this.toInt(a.css(e,"borderRightWidth"))},i.startScrolling=function(e,t){n.add(e,"ps-in-scrolling"),"undefined"!=typeof t?n.add(e,"ps-"+t):(n.add(e,"ps-x"),n.add(e,"ps-y"))},i.stopScrolling=function(e,t){n.remove(e,"ps-in-scrolling"),"undefined"!=typeof t?n.remove(e,"ps-"+t):(n.remove(e,"ps-x"),n.remove(e,"ps-y"))},i.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(e,t,i){"use strict";var n=e("./plugin/destroy"),a=e("./plugin/initialize"),r=e("./plugin/update");t.exports={initialize:a,update:r,destroy:n}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":20}],8:[function(e,t,i){"use strict";t.exports={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0}},{}],9:[function(e,t,i){"use strict";var n=e("../lib/dom"),a=e("../lib/helper"),r=e("./instances");t.exports=function(e){var t=r.get(e);t.event.unbindAll(),n.remove(t.scrollbarX),n.remove(t.scrollbarY),n.remove(t.scrollbarXRail),n.remove(t.scrollbarYRail),a.removePsClasses(e),r.remove(e)}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(e,t,i){"use strict";function n(e,t){function i(e){return e.getBoundingClientRect()}var n=window.Event.prototype.stopPropagation.bind;t.event.bind(t.scrollbarY,"click",n),t.event.bind(t.scrollbarYRail,"click",function(n){var r=a.toInt(t.scrollbarYHeight/2),s=n.pageY-i(t.scrollbarYRail).top-r,l=t.containerHeight-t.scrollbarYHeight,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,o(e)}),t.event.bind(t.scrollbarX,"click",n),t.event.bind(t.scrollbarXRail,"click",function(n){var r=a.toInt(t.scrollbarXWidth/2),s=n.pageX-i(t.scrollbarXRail).left-r;console.log(n.pageX,t.scrollbarXRail.offsetLeft);var l=t.containerWidth-t.scrollbarXWidth,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,o(e)})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t,i){"use strict";function n(e,t){function i(i){var a=n+i,r=t.containerWidth-t.scrollbarXWidth;0>a?t.scrollbarXLeft=0:a>r?t.scrollbarXLeft=r:t.scrollbarXLeft=a;var s=o.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var n=null,a=null,s=function(t){i(t.pageX-a),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(i){a=i.pageX,n=o.toInt(r.css(t.scrollbarX,"left")),o.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}function a(e,t){function i(i){var a=n+i,r=t.containerHeight-t.scrollbarYHeight;0>a?t.scrollbarYTop=0:a>r?t.scrollbarYTop=r:t.scrollbarYTop=a;var s=o.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var n=null,a=null,s=function(t){i(t.pageY-a),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(i){a=i.pageY,n=o.toInt(r.css(t.scrollbarY,"top")),o.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}var r=e("../../lib/dom"),o=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);n(e,t),a(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&0>n)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&0>i||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}var n=!1;t.event.bind(e,"mouseenter",function(){n=!0}),t.event.bind(e,"mouseleave",function(){n=!1});var r=!1;t.event.bind(t.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&n){var l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(a.isEditable(l))return}var c=0,d=0;switch(s.which){case 37:c=-30;break;case 38:d=30;break;case 39:c=30;break;case 40:d=-30;break;case 33:d=90;break;case 32:case 34:d=-90;break;case 35:d=s.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:d=s.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-d,e.scrollLeft=e.scrollLeft+c,o(e),r=i(c,d),r&&s.preventDefault()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&0>n)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&0>i||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}function n(e){var t=e.deltaX,i=-1*e.deltaY;return("undefined"==typeof t||"undefined"==typeof i)&&(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=e.wheelDelta),[t,i]}function r(t,i){var n=e.querySelector("textarea:hover");if(n){var a=n.scrollHeight-n.clientHeight;if(a>0&&!(0===n.scrollTop&&i>0||n.scrollTop===a&&0>i))return!0;var r=n.scrollLeft-n.clientWidth;if(r>0&&!(0===n.scrollLeft&&0>t||n.scrollLeft===r&&t>0))return!0}return!1}function s(s){if(a.env.isWebKit||!e.querySelector("select:focus")){var c=n(s),d=c[0],u=c[1];r(d,u)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(u?e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed:e.scrollTop=e.scrollTop+d*t.settings.wheelSpeed,l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(d?e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed:e.scrollLeft=e.scrollLeft-u*t.settings.wheelSpeed,l=!0):(e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed),o(e),l=l||i(d,u),l&&(s.stopPropagation(),s.preventDefault()))}}var l=!1;"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",s):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",s)}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t,i){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=a.get(e);n(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,i){"use strict";function n(e,t){function i(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function n(){l||(l=setInterval(function(){return r.get(e)?(e.scrollTop=e.scrollTop+c.top,e.scrollLeft=e.scrollLeft+c.left,void o(e)):void clearInterval(l)},50))}function s(){l&&(clearInterval(l),l=null),a.stopScrolling(e)}var l=null,c={top:0,left:0},d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(i())?d=!0:(d=!1,s())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,s())}),t.event.bind(window,"mousemove",function(t){if(d){var i={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};i.x<r.left+3?(c.left=-5,a.startScrolling(e,"x")):i.x>r.right-3?(c.left=5,a.startScrolling(e,"x")):c.left=0,i.y<r.top+3?(r.top+3-i.y<5?c.top=-5:c.top=-20,a.startScrolling(e,"y")):i.y>r.bottom-3?(i.y-r.bottom+3<5?c.top=5:c.top=20,a.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():n()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t,i){"use strict";function n(e,t,i,n){function o(i,n){var a=e.scrollTop,r=e.scrollLeft,o=Math.abs(i),s=Math.abs(n);if(s>o){if(0>n&&a===t.contentHeight-t.containerHeight||n>0&&0===a)return!t.settings.swipePropagation}else if(o>s&&(0>i&&r===t.contentWidth-t.containerWidth||i>0&&0===r))return!t.settings.swipePropagation;return!0}function s(t,i){e.scrollTop=e.scrollTop-i,e.scrollLeft=e.scrollLeft-t,r(e)}function l(){_=!0}function c(){_=!1}function d(e){return e.targetTouches?e.targetTouches[0]:e}function u(e){return e.targetTouches&&1===e.targetTouches.length?!0:e.pointerType&&"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE?!0:!1}function h(e){if(u(e)){y=!0;var t=d(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function p(e){if(!_&&y&&u(e)){var t=d(e),i={pageX:t.pageX,pageY:t.pageY},n=i.pageX-m.pageX,a=i.pageY-m.pageY;s(n,a),m=i;var r=(new Date).getTime(),l=r-g;l>0&&(v.x=n/l,v.y=a/l,g=r),o(n,a)&&(e.stopPropagation(),e.preventDefault())}}function f(){!_&&y&&(y=!1,clearInterval(b),b=setInterval(function(){return a.get(e)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(b):(s(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(b)},10))}var m={},g=0,v={},b=null,_=!1,y=!1;i&&(t.event.bind(window,"touchstart",l),t.event.bind(window,"touchend",c),t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",p),t.event.bind(e,"touchend",f)),n&&(window.PointerEvent?(t.event.bind(window,"pointerdown",l),t.event.bind(window,"pointerup",c),t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",p),t.event.bind(e,"pointerup",f)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",l),t.event.bind(window,"MSPointerUp",c),t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",p),t.event.bind(e,"MSPointerUp",f)))}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,i){var r=a.get(e);n(e,r,t,i)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,i){"use strict";var n=e("../lib/class"),a=e("../lib/helper"),r=e("./instances"),o=e("./update-geometry"),s=e("./handler/click-rail"),l=e("./handler/drag-scrollbar"),c=e("./handler/keyboard"),d=e("./handler/mouse-wheel"),u=e("./handler/native-scroll"),h=e("./handler/selection"),p=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},n.add(e,"ps-container");var i=r.add(e);i.settings=a.extend(i.settings,t),s(e),l(e),d(e),u(e),h(e),(a.env.supportsTouch||a.env.supportsIePointer)&&p(e,a.env.supportsTouch,a.env.supportsIePointer),i.settings.useKeyboard&&c(e),o(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,i){"use strict";function n(e){var t=this;t.settings=u.clone(l),t.containerWidth=null,t.containerHeight=null,t.contentWidth=null,t.contentHeight=null,t.isRtl="rtl"===s.css(e,"direction"),t.event=new c,t.ownerDocument=e.ownerDocument||document,t.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),e),t.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),t.scrollbarXRail),t.scrollbarXActive=null,t.scrollbarXWidth=null,t.scrollbarXLeft=null,t.scrollbarXBottom=u.toInt(s.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:u.toInt(s.css(t.scrollbarXRail,"top")),t.railBorderXWidth=u.toInt(s.css(t.scrollbarXRail,"borderLeftWidth"))+u.toInt(s.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=u.toInt(s.css(t.scrollbarXRail,"marginLeft"))+u.toInt(s.css(t.scrollbarXRail,"marginRight")),t.railXWidth=null,t.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),e),t.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),t.scrollbarYRail),t.scrollbarYActive=null,t.scrollbarYHeight=null,t.scrollbarYTop=null,t.scrollbarYRight=u.toInt(s.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:u.toInt(s.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?u.outerWidth(t.scrollbarY):null,t.railBorderYWidth=u.toInt(s.css(t.scrollbarYRail,"borderTopWidth"))+u.toInt(s.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=u.toInt(s.css(t.scrollbarYRail,"marginTop"))+u.toInt(s.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function a(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function r(e,t){"undefined"==typeof e.dataset?e.setAttribute("data-ps-id",t):e.dataset.psId=t}function o(e){"undefined"==typeof e.dataset?e.removeAttribute("data-ps-id"):delete e.dataset.psId}var s=e("../lib/dom"),l=e("./default-setting"),c=e("../lib/event-manager"),d=e("../lib/guid"),u=e("../lib/helper"),h={};i.add=function(e){var t=d();return r(e,t),h[t]=new n(e),h[t]},i.remove=function(e){delete h[a(e)],o(e)},i.get=function(e){return h[a(e)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t,i){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function a(e,t){var i={width:t.railXWidth};t.isRtl?i.left=e.scrollLeft+t.containerWidth-t.contentWidth:i.left=e.scrollLeft,t.isScrollbarXUsingBottom?i.bottom=t.scrollbarXBottom-e.scrollTop:i.top=t.scrollbarXTop+e.scrollTop,o.css(t.scrollbarXRail,i);var n={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?n.right=t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:n.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?n.left=e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:n.left=t.scrollbarYLeft+e.scrollLeft,o.css(t.scrollbarYRail,n),o.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),o.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/class"),o=e("../lib/dom"),s=e("../lib/helper"),l=e("./instances");t.exports=function(e){var t=l.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||o.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||o.appendTo(t.scrollbarYRail,e),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.scrollbarXWidth=n(t,s.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=s.toInt(e.scrollLeft*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):(t.scrollbarXActive=!1,t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.scrollbarYHeight=n(t,s.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=s.toInt(e.scrollTop*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):(t.scrollbarYActive=!1,t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0),t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),a(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t,i){"use strict";var n=e("../lib/dom"),a=e("./instances"),r=e("./update-geometry");
+t.exports=function(e){var t=a.get(e);n.css(t.scrollbarXRail,"display","none"),n.css(t.scrollbarYRail,"display","none"),r(e),n.css(t.scrollbarXRail,"display","block"),n.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLab/WCF/Date/Util",["Language"],function(e){"use strict";var t={formatDate:function(t){return this.format(t,e.get("wcf.date.dateFormat"))},formatTime:function(t){return this.format(t,e.get("wcf.date.timeFormat"))},formatDateTime:function(t){return this.format(t,e.get("wcf.date.dateTimeFormat").replace(/%date%/,e.get("wcf.date.dateFormat")).replace(/%time%/,e.get("wcf.date.timeFormat")))},format:function(t,i){var n,a="";"c"===i&&(i="Y-m-dTH:i:sP");for(var r=0,o=i.length;o>r;r++){switch(i[r]){case"s":n=("0"+t.getSeconds().toString()).slice(-2);break;case"i":n=t.getMinutes();break;case"a":n=t.getHours()>11?"pm":"am";break;case"g":n=t.getHours(),0===n?n=12:n>12&&(n-=12);break;case"h":n=t.getHours(),0===n?n=12:n>12&&(n-=12),n=("0"+n.toString()).slice(-2);break;case"A":n=t.getHours()>11?"PM":"AM";break;case"G":n=t.getHours();break;case"H":n=t.getHours(),n=("0"+n.toString()).slice(-2);break;case"d":n=t.getDate(),n=("0"+n.toString()).slice(-2);break;case"j":n=t.getDate();break;case"l":n=e.get("__days")[t.getDay()];break;case"D":n=e.get("__daysShort")[t.getDay()];break;case"S":n="";break;case"m":n=t.getMonth()+1,n=("0"+n.toString()).slice(-2);break;case"n":n=t.getMonth()+1;break;case"F":n=e.get("__months")[t.getMonth()];break;case"M":n=e.get("__monthsShort")[t.getMonth()];break;case"y":n=t.getYear().toString().replace(/^\d{2}/,"");break;case"Y":n=t.getFullYear();break;case"P":var s=t.getTimezoneOffset();n=s>0?"-":"+",s=Math.abs(s),n+=("0"+(~~(s/60)).toString()).slice(-2),n+=":",n+=("0"+(s%60).toString()).slice(-2);break;case"r":n=t.toString();break;case"U":n=Math.round(t.getTime()/1e3);break;default:n=i[r]}a+=n}return a},gmdate:function(e){return date instanceof Date||(date=new Date),Math.round(Date.UTC(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDay(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}};return t}),define("WoltLab/WCF/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(0>t||t>864e5)throw new RangeError("Invalid delta "+t+". Delta must be in the interval [0, 86400000].");this._callback=e.bind(void 0,this),this._delta=t,this._timer=void 0,this.restart()}return e.prototype={restart:function(){this.stop(),this._timer=setInterval(this._callback,this._delta)},stop:function(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)},setDelta:function(e){this._delta=e,this.restart()}},e}),define("WoltLab/WCF/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLab/WCF/Date/Util","WoltLab/WCF/Timer/Repeating"],function(e,t,i,n){"use strict";var a=elByTag("time"),r=null;return{setup:function(){this._refresh(),new n(this._refresh.bind(this),6e4),e.add("WoltLab/WCF/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,n=(e.getTime()-e.getMilliseconds())/1e3;null===r&&(r=n-TIME_NOW);for(var o=0,s=a.length;s>o;o++){var l=a[o];if(l.classList.contains("datetime")&&!elData(l,"is-future-date")){var c=~~elData(l,"timestamp")+r,d=elData(l,"date"),u=elData(l,"time"),h=elData(l,"offset");if(elAttr(l,"title")||elAttr(l,"title",t.get("wcf.date.dateTimeFormat").replace(/%date%/,d).replace(/%time%/,u)),c>=n||c+60>n)l.textContent=t.get("wcf.date.relative.now");else if(c+3540>n){var p=Math.max(Math.round((n-c)/60),1);l.textContent=t.get("wcf.date.relative.minutes",{minutes:p})}else if(c+86400>n){var f=Math.round((n-c)/3600);l.textContent=t.get("wcf.date.relative.hours",{hours:f})}else if(c+518400>n){var m=new Date(e.getFullYear(),e.getMonth(),e.getDate()),g=Math.ceil((m/1e3-c)/86400),v=i.getTimezoneDate(1e3*c,1e3*h),b=v.getDay(),_=t.get("__days")[b];l.textContent=t.get("wcf.date.relative.pastDays",{days:g,day:_,time:u})}else l.textContent=t.get("wcf.date.shortDateTimeFormat").replace(/%date%/,d).replace(/%time%/,u)}}}}}),define("WoltLab/WCF/Ui/Alignment",["Core","Language","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";return{set:function(a,r,o){o=e.extend({verticalOffset:0,pointer:!1,pointerOffset:4,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},o),Array.isArray(o.pointerClassNames)&&o.pointerClassNames.length===(o.pointer?1:2)||(o.pointerClassNames=[]),-1===["left","right","center"].indexOf(o.horizontal)&&(o.horizontal="left"),"bottom"!==o.vertical&&(o.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(o.allowFlip)&&(o.allowFlip="both"),n.setStyles(a,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});var s=n.outerDimensions(a),l=n.outerDimensions(o.refDimensionsElement instanceof Element?o.refDimensionsElement:r),c=n.offset(r),d=window.innerHeight,u=document.body.clientWidth,h={result:null},p=!1;if("center"===o.horizontal&&(p=!0,h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),h.result||("both"===o.allowFlip||"horizontal"===o.allowFlip?o.horizontal="left":h.result=!0)),"rtl"===t.get("wcf.global.pageDirection")&&(o.horizontal="left"===o.horizontal?"right":"left"),!h.result){var f=h;if(h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,u),!h.result&&("both"===o.allowFlip||"horizontal"===o.allowFlip)){var m=this._tryAlignmentHorizontal("left"===o.horizontal?"right":"left",s,l,c,u);m.result?h=m:p&&(h=f)}}var g=h.left,v=h.right,b=this._tryAlignmentVertical(o.vertical,s,l,c,d,o.verticalOffset);if(!b.result&&("both"===o.allowFlip||"vertical"===o.allowFlip)){var _=this._tryAlignmentVertical("top"===o.vertical?"bottom":"top",s,l,c,d,o.verticalOffset);_.result&&(b=_)}var y=b.bottom,w=b.top;if(o.pointer){var C=i.childrenByClass(a,"elementPointer");if(C=C[0]||null,null===C)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(C.classList.add("center"),C.classList.remove("left"),C.classList.remove("right")):(C.classList.add(h.align),C.classList.remove("center"),C.classList.remove("left"===h.align?"right":"left")),"top"===b.align?C.classList.add("flipVertical"):C.classList.remove("flipVertical")}else if(2===o.pointerClassNames.length){var L=0,E=1;a.classList["auto"===w?"add":"remove"](o.pointerClassNames[L]),a.classList["auto"===g?"add":"remove"](o.pointerClassNames[E])}"auto"!==y&&(y=Math.round(y)+"px"),"auto"!==g&&(g=Math.ceil(g)+"px"),"auto"!==v&&(v=Math.floor(v)+"px"),"auto"!==w&&(w=Math.round(w)+"px"),n.setStyles(a,{bottom:y,left:g,right:v,top:w}),elShow(a),a.style.removeProperty("visibility")},_tryAlignmentHorizontal:function(e,t,i,n,a){var r="auto",o="auto",s=!0;return"left"===e?(r=n.left,r+t.width>a&&(s=!1)):"right"===e?(o=a-(n.left+i.width),0>o&&(s=!1)):(r=n.left+i.width/2-t.width/2,r=~~r,(0>r||r+t.width>a)&&(s=!1)),{align:e,left:r,right:o,result:s}},_tryAlignmentVertical:function(e,t,i,n,a,r){var o="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;o=c-n.top+r,c-(o+t.height)<window.scrollY&&(l=!1)}else s=n.top+i.height+r,s+t.height-window.scrollY>a&&(l=!1);return{align:e,bottom:o,top:s,result:l}}}}),define("WoltLab/WCF/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,i={setup:function(){document.body.addEventListener("click",this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return i.setup(),i}),define("WoltLab/WCF/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=new e,d=!1,u=new i,h=new i,p=null;return{setup:function(){d||(d=!0,p=elCreate("div"),p.className="dropdownMenuContainer",document.body.appendChild(p),l=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLab/WCF/Ui/Dropdown/Simple",this.closeAll.bind(this)),a.add("WoltLab/WCF/Ui/Dropdown/Simple",this.initAll.bind(this)),document.addEventListener("scroll",this._onScroll.bind(this)),window.bc_wcfSimpleDropdown=this)},initAll:function(){for(var e=0,t=l.length;t>e;e++)this.init(l[e],!1)},init:function(e,i){if(this.setup(),e.classList.contains("jsDropdownEnabled")||elData(e,"target"))return!1;var n=r.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a parent with .dropdown.");var a=r.nextByClass(e,"dropdownMenu");if(null===a)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a menu as next sibling.");p.appendChild(a);var s=o.identify(n);u.has(s)||(e.classList.add("jsDropdownEnabled"),e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this)),u.set(s,n),h.set(s,a),s.match(/^wcf\d+$/)||elData(a,"source",s)),elData(e,"target",s),i&&setTimeout(function(){t.triggerEvent(e,WCF_CLICK_EVENT)},10)},initFragment:function(e,t){this.setup();var i=o.identify(e);u.has(i)||(u.set(i,e),p.appendChild(t),h.set(i,t))},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return u.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e,t){this._toggle(null,e,t)},setAlignment:function(e,t,i){var a,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(a=r),n.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:a||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom"})},setAlignmentById:function(e){var t=u.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var i=h.get(e);this.setAlignment(t,i)},isOpen:function(e){var t=h.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open:function(e){var t=h.get(e);void 0===t||t.classList.contains("dropdownOpen")||this.toggleDropdown(e)},close:function(e){var t=u.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),h.get(e).classList.remove("dropdownOpen"))},closeAll:function(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),h.get(t).classList.remove("dropdownOpen"),this._notifyCallbacks(t,"close"))}.bind(this))},destroy:function(e){if(!u.has(e))return!1;this.close(e);var t=h.get(e);return h.parentNode.removeChild(t),h["delete"](e),u["delete"](e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,i=elBySelAll(".dropdown.dropdownOpen",t),n=0,a=i.length;a>n;n++){var r=i[n],s=o.identify(r),l=o.offset(r),c=o.offset(t);l.top+r.clientHeight<=c.top?this.toggleDropdown(s):l.top>=c.top+t.offsetHeight?this.toggleDropdown(s):l.left<=c.left?this.toggleDropdown(s):l.left>=c.left+t.offsetWidth?this.toggleDropdown(s):this.setAlignment(s,h.get(s))}},_onScroll:function(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(elDataBool(e,"is-overlay-dropdown-button")?this.setAlignment(e,h.get(t)):this.close(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(i){i(e,t)})},_toggle:function(e,t,i){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"));var n=u.get(t),a=!1;if(void 0!==n&&(elDataBool(n,"dropdown-prevent-toggle")&&n.classList.contains("dropdownOpen")&&(a=!0),null===elData(n,"is-overlay-dropdown-button"))){var o=r.parentByClass(n,"dialogContent");elData(n,"is-overlay-dropdown-button",null!==o),null!==o&&o.addEventListener("scroll",this._onDialogScroll.bind(this))}return u.forEach(function(e,n){var r=h.get(n);e.classList.contains("dropdownOpen")?a===!1&&(e.classList.remove("dropdownOpen"),r.classList.remove("dropdownOpen"),this._notifyCallbacks(n,"close")):n===t&&r.childElementCount>0&&(e.classList.add("dropdownOpen"),r.classList.add("dropdownOpen"),this._notifyCallbacks(n,"open"),this.setAlignment(e,r,i))}.bind(this)),WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),define("WoltLab/WCF/Ui/Screen",["Core","Dictionary"],function(e,t){"use strict";var i=new t,n=0,a=t.fromObject({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 1024px)","screen-lg":"(min-width: 1025px)"});return{on:function(t,i){var n=e.getUuid(),a=this._getQueryObject(t);return"function"==typeof i.match&&a.callbacksMatch.set(n,i.match),"function"==typeof i.unmatch&&a.callbacksUnmatch.set(n,i.unmatch),"function"==typeof i.setup&&(a.mql.matches?i.setup():a.callbacksSetup.set(n,i.setup)),n},remove:function(e,t){var i=this._getQueryObject(e);i.callbacksMatch["delete"](t),i.callbacksUnmatch["delete"](t),i.callbacksSetup["delete"](t)},is:function(e){return this._getQueryObject(e).mql.matches},scrollDisable:function(){0===n&&document.documentElement.classList.add("disableScrolling"),n++},scrollEnable:function(){n&&(n--,0===n&&document.documentElement.classList.remove("disableScrolling"))},_getQueryObject:function(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");a.has(e)&&(e=a.get(e));var n=i.get(e);return n||(n={callbacksMatch:new t,callbacksUnmatch:new t,callbacksSetup:new t,mql:window.matchMedia(e)},n.mql.addListener(this._mqlChange.bind(this)),i.set(e,n)),n},_mqlChange:function(e){var i=this._getQueryObject(e.media);e.matches?(i.callbacksSetup.size&&(i.callbacksSetup.forEach(function(e){e()}),i.callbacksSetup=new t),i.callbacksMatch.forEach(function(e){e()})):i.callbacksUnmatch.forEach(function(e){e()})}}}),define("WoltLab/WCF/Event/Handler",["Core","Dictionary"],function(e,t){"use strict";var i=new t;return{add:function(n,a,r){if("function"!=typeof r)throw new TypeError("[WoltLab/WCF/Event/Handler] Expected a valid callback for '"+a+"@"+n+"'.");var o=i.get(n);void 0===o&&(o=new t,i.set(n,o));var s=o.get(a);void 0===s&&(s=new t,o.set(a,s));var l=e.getUuid();return s.set(l,r),l},fire:function(e,t,n){n=n||{};var a=i.get(e);if(void 0!==a){var r=a.get(t);void 0!==r&&r.forEach(function(e){e(n)})}},remove:function(e,t,n){var a=i.get(e);if(void 0!==a){var r=a.get(t);void 0!==r&&r["delete"](n)}},removeAll:function(e,t){"string"!=typeof t&&(t=void 0);var n=i.get(e);void 0!==n&&("undefined"==typeof t?i["delete"](e):n["delete"](t))}}}),define("WoltLab/WCF/Ui/Page/Menu/Abstract",["Environment","EventHandler","ObjectMap","Dom/Traverse","Dom/Util","Ui/Screen"],function(e,t,i,n,a,r){"use strict";function o(e,t,i){this.init(e,t,i)}var s=elById("pageContainer");return o.prototype={init:function(e,n,r){this._activeList=[],this._depth=0,this._enabled=!0,this._eventIdentifier=e,this._items=new i,this._menu=elById(n),this._removeActiveList=!1;var o=this.open.bind(this),s=elBySel(r);s.addEventListener(WCF_CLICK_EVENT,o),this._initItems(),this._initHeader(),t.add(this._eventIdentifier,"open",o),t.add(this._eventIdentifier,"close",this.close.bind(this));var l,c=elByClass("menuOverlayItemList",this._menu);this._menu.addEventListener("animationend",function(){if(!this._menu.classList.contains("open"))for(var e=0,t=c.length;t>e;e++)l=c[e],l.classList.remove("active"),l.classList.remove("hidden")}.bind(this)),this._menu.children[0].addEventListener("transitionend",function(){if(this._menu.classList.add("allowScroll"),this._removeActiveList){this._removeActiveList=!1;var e=this._activeList.pop();e&&e.classList.remove("activeList")}}.bind(this));var d=elCreate("div");d.className="menuOverlayMobileBackdrop",d.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),a.insertAfter(d,this._menu)},open:function(e){this._enabled&&(e instanceof Event&&e.preventDefault(),this._menu.classList.add("open"),this._menu.classList.add("allowScroll"),this._menu.children[0].classList.add("activeList"),r.scrollDisable(),s.classList.add("menuOverlay-"+this._menu.id))},close:function(e){e instanceof Event&&e.preventDefault(),this._menu.classList.contains("open")&&(this._menu.classList.remove("open"),r.scrollEnable(),s.classList.remove("menuOverlay-"+this._menu.id))},enable:function(){this._enabled=!0},disable:function(){this._enabled=!1,this.close(!0)},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var i=e.parentNode,a=elData(i,"more");if(a)return void e.addEventListener(WCF_CLICK_EVENT,function(n){n.preventDefault(),n.stopPropagation(),t.fire(this._eventIdentifier,"more",{handler:this,identifier:a,item:e,parent:i})}.bind(this));var r,o=e.nextElementSibling;if(null!==o)if("OL"!==o.nodeName&&o.classList.contains("menuOverlayItemLinkIcon"))for(r=elCreate("span"),r.className="menuOverlayItemWrapper",i.insertBefore(r,e),r.appendChild(e);r.nextElementSibling;)r.appendChild(r.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=i.parentNode,c=elData(o,"title");this._items.set(e,{itemList:o,parentItemList:l}),""===c&&(c=n.childByClass(e,"menuOverlayItemTitle").textContent,elData(o,"title",c));var d=this._showItemList.bind(this,e);if(s){r=elCreate("span"),r.className="menuOverlayItemWrapper",i.insertBefore(r,e),r.appendChild(e);var u=elCreate("a");elAttr(u,"href","#"),u.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),u.innerHTML='<span class="icon icon24 fa-angle-right"></span>',u.addEventListener(WCF_CLICK_EVENT,d),r.appendChild(u)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,d);var h=elCreate("li");h.className="menuOverlayHeader",r=elCreate("span"),r.className="menuOverlayItemWrapper";var p=elCreate("a");elAttr(p,"href","#"),p.className="menuOverlayItemLink menuOverlayBackLink",p.textContent=elData(l,"title"),p.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var f=elCreate("a");if(elAttr(f,"href","#"),f.className="menuOverlayItemLinkIcon",f.innerHTML='<span class="icon icon24 fa-times"></span>',f.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),r.appendChild(p),r.appendChild(f),h.appendChild(r),o.insertBefore(h,o.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),o.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var i=elCreate("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);var a=elCreate("span");a.className="menuOverlayLogo",a.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(a);var r=elCreate("a");elAttr(r,"href","#"),r.className="menuOverlayItemLinkIcon",r.innerHTML='<span class="icon icon24 fa-times"></span>',r.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(r);var o=n.childByClass(this._menu,"menuOverlayItemList");o.insertBefore(e,o.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0;var i=this._items.get(e);i.parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,i){i instanceof Event&&i.preventDefault();var n=this._items.get(e),a=elData(n.itemList,"load");if(a&&!elDataBool(e,"loaded")){var r=i.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void t.fire(this._eventIdentifier,"load_"+a)}this._menu.classList.remove("allowScroll"),n.itemList.classList.add("activeList"),n.parentItemList.classList.add("hidden"),this._activeList.push(n.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1,this._menu.children[0].style.setProperty("transform","translateX("+-100*this._depth+"%)","")}},o}),define("WoltLab/WCF/Ui/Page/Menu/Main",["Core","./Abstract"],function(e,t){"use strict";function i(){this.init()}return e.inherit(i,t,{init:function(){i._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu")}}),i}),define("WoltLab/WCF/Ui/Page/Menu/User",["Core","EventHandler","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}return e.inherit(n,i,{init:function(){n._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel")}}),n}),define("WoltLab/WCF/Ui/Mobile",["Core","Environment","Language","Dom/ChangeListener","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=!1,d=null,u={},h=null,p=null;return{setup:function(i){u=e.extend({enableMobileMenu:!0},i),l=elByClass("buttonGroupNavigation"),d=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile"),r.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)})},enable:function(){c=!0,u.enableMobileMenu&&(h.enable(),p.enable())},disable:function(){c=!1,u.enableMobileMenu&&(h.disable(),p.disable())},_init:function(){this._initSearchBar(),this._initButtonGroupNavigation(),this._initMobileMenu(),a.add("WoltLab/WCF/Ui/Mobile",this._closeAllMenus.bind(this)),n.add("WoltLab/WCF/Ui/Mobile",this._initButtonGroupNavigation.bind(this))},_initSearchBar:function(){var e=elBySel(".searchBar");e.addEventListener("click",function(){return c?(e.classList.add("searchBarOpen"),!1):!1}),d.addEventListener("click",function(){e.classList.remove("searchBarOpen")})},_initButtonGroupNavigation:function(){for(var e=0,t=l.length;t>e;e++){var i=l[e];if(!i.classList.contains("jsMobileButtonGroupNavigation")){i.classList.add("jsMobileButtonGroupNavigation");var n=elCreate("a");n.classList.add("dropdownLabel");var a=elCreate("span");a.className="icon icon24 fa-list",n.appendChild(a),function(e){e.addEventListener("click",function(t){var i=e.nextElementSibling;return null!==i?(i.classList.toggle("open"),t.stopPropagation(),!1):!0})}(n),i.insertBefore(n,i.firstChild)}}},_initMobileMenu:function(){u.enableMobileMenu&&(h=new o,p=new s)},_closeAllMenus:function(){for(var e=elBySelAll(".jsMobileButtonGroupNavigation > ul.open"),t=0,i=e.length;i>t;t++)e[t].classList.remove("open")}}}),define("WoltLab/WCF/Ui/TabMenu/Simple",["Dictionary","EventHandler","Dom/Traverse","Dom/Util"],function(e,t,i,n){"use strict";function a(t){this._container=t,this._containers=new e,this._isLegacy=null,this._store=null,this._tabs=new e}return a.prototype={validate:function(){if(!this._container.classList.contains("tabMenuContainer"))return!1;var e=i.childByTag(this._container,"NAV");if(null===e)return!1;var t=elByTag("li",e);if(0===t.length)return!1;var a,r,o,s,l=i.childrenByTag(this._container,"DIV");for(o=0,s=l.length;s>o;o++)a=l[o],r=elData(a,"name"),r||(r=n.identify(a)),elData(a,"name",r),this._containers.set(r,a);var c,d=this._container.id;for(o=0,s=t.length;s>o;o++)if(c=t[o],r=this._getTabName(c)){if(this._tabs.has(r))throw new Error("Tab names must be unique, li[data-name='"+r+"'] (tab menu id: '"+d+"') exists more than once.");if(a=this._containers.get(r),void 0===a)throw new Error("Expected content element for li[data-name='"+r+"'] (tab menu id: '"+d+"').");if(a.parentNode!==this._container)throw new Error("Expected content element '"+r+"' (tab menu id: '"+d+"') to be a direct children.");if(1!==c.childElementCount||"A"!==c.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+r+"'] (tab menu id: '"+d+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+d+"').");return this._isLegacy&&(elData(this._container,"is-legacy",!0),this._tabs.forEach(function(e,t){elAttr(e,"aria-controls",t)})),!0},init:function(e){e=e||null,this._tabs.forEach(function(t){e&&e.get(elData(t,"name"))===t||t.children[0].addEventListener("click",this._onClick.bind(this))}.bind(this));var t=null;if(!e){var i=window.location.hash.replace(/^#/,""),n=null;if(""!==i&&(n=this._tabs.get(i),n&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!n){var a=elData(this._container,"preselect")||elData(this._container,"active");"true"!==a&&a||(a=!0),a===!0?this._tabs.forEach(function(e){n||e.previousElementSibling||(n=e)}):"false"!==a&&(n=this._tabs.get(a))}n&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,n,!0));var r=elData(this._container,"store");if(r){var o=elCreate("input");o.type="hidden",o.name=r,this._container.appendChild(o),this._store=o}}return t},select:function(e,i,n){if(i=i||this._tabs.get(e),!i){if(~~e==e){e=~~e;var a=0;this._tabs.forEach(function(t){a===e&&(i=t),a++})}if(!i)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elData(i,"name");var r=this.getActiveTab(),o=null;if(r){if(elData(r,"name")===e)return;r.classList.remove("active"),o=this._containers.get(elData(r,"name")),o.classList.remove("active"),o.classList.add("hidden"),this._isLegacy&&(r.classList.remove("ui-state-active"),o.classList.remove("ui-state-active"))}i.classList.add("active");var s=this._containers.get(e);if(s.classList.add("active"),this._isLegacy&&(i.classList.add("ui-state-active"),s.classList.add("ui-state-active"),s.classList.remove("hidden")),this._store&&(this._store.value=e),!n){t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:i,activeName:e,previous:r,previousName:r?elData(r,"name"):null});var l=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;l&&l(this._container).trigger("wcftabsbeforeactivate",{newTab:l(i),oldTab:l(r),newPanel:l(s),oldPanel:l(o)}),window.history.replaceState(void 0,void 0,window.location.href.replace(/#[^#]+$/,"")+"#"+e)}},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"name");return t||1===e.childElementCount&&"A"===e.children[0].nodeName&&e.children[0].href.match(/#([^#]+)$/)&&(t=RegExp.$1,null===elById(t)?t=null:(this._isLegacy=!0,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},a}),define("WoltLab/WCF/Ui/TabMenu",["Dictionary","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","./TabMenu/Simple"],function(e,t,i,n,a){"use strict";var r=null,o=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),t.add("WoltLab/WCF/Ui/TabMenu",this._init.bind(this)),n.add("WoltLab/WCF/Ui/TabMenu",function(){r&&(r.classList.remove("active"),r=null)})},_init:function(){for(var e,t,n,s,l,c=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),d=0,u=c.length;u>d;d++)e=c[d],t=i.identify(e),o.has(t)||(l=new a(e),l.validate()&&(s=l.init(),o.set(t,l),s instanceof Element&&(l=this.getTabMenu(s.parentNode.id),l.select(s.id,null,!0)),n=elBySel("#"+t+" > nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),r=e):(e.classList.remove("active"),r=null)})}(n)))},_selectErroneousTabs:function(){o.forEach(function(e){var t=!1;e.getContainers().forEach(function(i){!t&&elByClass("formError",i).length&&(t=!0,e.select(i.id))})})},getTabMenu:function(e){return o.get(e)}}}),define("WoltLab/WCF/Ui/FlexibleMenu",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o=new t,s=new t,l=new t,c=new t,d={setup:function(){null!==elById("mainMenu")&&this.register("mainMenu");var e=elBySel(".navigationHeader");null!==e&&this.register(a.identify(e)),window.addEventListener("resize",this.rebuildAll.bind(this)),i.add("WoltLab/WCF/Ui/FlexibleMenu",this.registerTabMenus.bind(this))},register:function(e){var t=elById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(!o.has(e)){var i=n.childByTag(t,"UL");if(null===i)throw"Expected an <ul> element as child of container '"+e+"'.";o.set(e,t),c.set(e,i),this.rebuild(e)}},registerTabMenus:function(){for(var e=elBySelAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)"),t=0,i=e.length;i>t;t++){var r=e[t],o=n.childByTag(r,"NAV");null!==o&&(r.classList.add("jsFlexibleMenuEnabled"),this.register(a.identify(o)))}},rebuildAll:function(){o.forEach(function(e,t){this.rebuild(t)}.bind(this))},rebuild:function(t){var i=o.get(t);if(void 0===i)throw"Expected a valid element id, '"+t+"' is unknown.";var d=window.getComputedStyle(i),u=i.parentNode.clientWidth;u-=a.styleAsInt(d,"margin-left"),u-=a.styleAsInt(d,"margin-right");var h=c.get(t),p=n.childrenByTag(h,"LI"),f=s.get(t),m=0;if(void 0!==f){for(var g=0,v=p.length;v>g;g++){var b=p[g];b.classList.contains("dropdown")||elShow(b)}null!==f.parentNode&&(m=a.outerWidth(f))}var _=h.scrollWidth-m,y=[];if(_>u)for(var g=p.length-1;g>=0;g--){var b=p[g];if(!(b.classList.contains("dropdown")||b.classList.contains("active")||b.classList.contains("ui-state-active"))&&(y.push(b),elHide(b),h.scrollWidth<u))break}if(y.length){var w;if(void 0===f){f=elCreate("li"),f.className="dropdown jsFlexibleMenuDropdown";var C=elCreate("a");C.className="icon icon16 fa-list",f.appendChild(C),w=elCreate("ul"),w.classList.add("dropdownMenu"),f.appendChild(w),s.set(t,f),l.set(t,w),r.init(C)}else w=l.get(t);null===f.parentNode&&h.appendChild(f);var L=document.createDocumentFragment(),E=this;y.forEach(function(i){var n=elCreate("li");n.innerHTML=i.innerHTML,n.addEventListener("click",function(n){n.preventDefault(),e.triggerEvent(elBySel("a",i),"click"),setTimeout(function(){E.rebuild(t)},59)}.bind(this)),L.appendChild(n)}),w.innerHTML="",w.appendChild(L)}else void 0!==f&&null!==f.parentNode&&elRemove(f)}};return d}),define("WoltLab/WCF/Ui/Tooltip",["Environment","Dom/ChangeListener","Ui/Alignment"],function(e,t,i){"use strict";var n=null,a=null,r=null,o=null;return{setup:function(){"desktop"===e.platform()&&(o=elCreate("div"),elAttr(o,"id","balloonTooltip"),o.classList.add("balloonTooltip"),r=elCreate("span"),elAttr(r,"id","balloonTooltipText"),o.appendChild(r),a=elCreate("span"),a.classList.add("elementPointer"),a.appendChild(elCreate("span")),o.appendChild(a),document.body.appendChild(o),n=elByClass("jsTooltip"),this.init(),t.add("WoltLab/WCF/Ui/Tooltip",this.init.bind(this)),window.addEventListener("scroll",this._mouseLeave.bind(this)))},init:function(){for(var e,t;n.length;)e=n[0],e.classList.remove("jsTooltip"),t=elAttr(e,"title").trim(),t.length&&(elData(e,"tooltip",t),e.removeAttribute("title"),e.addEventListener("mouseenter",this._mouseEnter.bind(this)),e.addEventListener("mouseleave",this._mouseLeave.bind(this)),e.addEventListener("click",this._mouseLeave.bind(this)))},_mouseEnter:function(e){var t=e.currentTarget,n=elAttr(t,"title");return n="string"==typeof n?n.trim():"",""!==n&&(elData(t,"tooltip",n),t.removeAttribute("title")),n=elData(t,"tooltip"),o.style.removeProperty("top"),o.style.removeProperty("left"),n.length?(o.classList.add("active"),r.textContent=n,void i.set(o,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):void o.classList.remove("active")},_mouseLeave:function(){o.classList.remove("active")}}}),define("WoltLab/WCF/Date/Picker",["DateUtil","Language","ObjectMap","Dom/ChangeListener","Ui/Alignment","WoltLab/WCF/Ui/CloseOverlay"],function(e,t,i,n,a,r){"use strict";var o=!1,s=0,l=new i,c=null,d=0,u=0,h=[],p=null,f=null,m=null,g=null,v=null,b=null,_=null,y=null,w=null,C=null,L={
 init:function(){this._setup();for(var t=elBySelAll('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)'),i=new Date,n=0,a=t.length;a>n;n++){var r=t[n];r.classList.add("inputDatePicker"),r.readOnly=!0;var o="datetime"===elAttr(r,"type");elData(r,"is-date-time",o);var s=null,c=elAttr(r,"value");elAttr(r,"value")&&(s=new Date(c),elData(r,"value",s.getTime()),c=e["formatDate"+(o?"Time":"")](s));var d=0===c.length;if(r.classList.contains("birthday")&&(elData(r,"min-date","100"),elData(r,"max-date","now")),this._initDateRange(r,i,!0),this._initDateRange(r,i,!1),elData(r,"min-date")===elData(r,"max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+r.id+"').");r.type="text",r.value=c,elData(r,"empty",d),elData(r,"placeholder")&&elAttr(r,"placeholder",elData(r,"placeholder"));var u=elCreate("input");u.id=r.id+"DatePicker",u.name=r.name,u.type="hidden",null!==s&&(u.value=e.format(s,o?"c":"Y-m-d")),r.parentNode.insertBefore(u,r),r.removeAttribute("name"),r.addEventListener("click",C);var h=elCreate("div");h.className="inputAddon";var p=elCreate("a");p.className="inputSuffix button",p.addEventListener("click",C),h.appendChild(p);var f=elCreate("span");f.className="icon icon16 fa-calendar",p.appendChild(f),r.parentNode.insertBefore(h,r),h.insertBefore(r,p);for(var m=!1,g=["tiny","short","medium","long"],v=0;4>v;v++)r.classList.contains(g[v])&&(m=!0);m||r.classList.add("short"),l.set(r,{shadow:u,isDateTime:o,isEmpty:d,onClose:null})}},_initDateRange:function(e,t,i){var n="data-"+(i?"min":"max")+"-date",a=e.hasAttribute(n)?elAttr(e,n).trim():"";if(a.match(/^(\d{4})-(\d{2})-(\d{2})$/))a=new Date(a).getTime();else if("now"===a)a=t.getTime();else if(a.match(/^\d{1,3}$/)){var r=new Date(t.getTime());r.setFullYear(r.getFullYear()+~~a*(i?-1:1)),a=r.getTime()}else if(a.match(/^datePicker-(.+)$/)){if(a=RegExp.$1,null===elById(a))throw new Error("Reference date picker identified by '"+a+"' does not exists (element id: '"+e.id+"').")}else a=new Date(i?1970:2038,0,1).getTime();elAttr(e,n,a)},_setup:function(){o||(o=!0,s=~~t.get("wcf.date.firstDayOfTheWeek"),C=this._open.bind(this),n.add("WoltLab/WCF/Date/Picker",this.init.bind(this)),r.add("WoltLab/WCF/Date/Picker",this._close.bind(this)))},_open:function(e){e.preventDefault(),e.stopPropagation(),this._createPicker();var t="INPUT"===e.currentTarget.nodeName?e.currentTarget:e.currentTarget.previousElementSibling;if(t!==c){c=t;var i,n=l.get(c),r=elData(c,"value");r?(i=new Date(+r),"Invalid Date"===i.toString()&&(i=new Date)):i=new Date,u=elData(c,"min-date"),u.match(/^datePicker-(.+)$/)&&(u=elData(elById(RegExp.$1),"value")),u=new Date(+u),d=elData(c,"max-date"),d.match(/^datePicker-(.+)$/)&&(d=elData(elById(RegExp.$1),"value")),d=new Date(+d),n.isDateTime&&(f.value=i.getHours(),m.value=i.getMinutes()),this._renderPicker(i.getDate(),i.getMonth(),i.getFullYear()),a.set(w,c,{pointer:!0})}},_close:function(){if(null!==w&&w.classList.contains("active")){w.classList.remove("active");var e=l.get(c);"function"==typeof e.onClose&&e.onClose(),c=null,u=0,d=0}},_renderPicker:function(e,t,i){this._renderGrid(e,t,i);for(var n="",a=u.getFullYear(),r=d.getFullYear();r>=a;a++)n+='<option value="'+a+'">'+a+"</option>";y.innerHTML=n,y.value=i,g.value=t,w.classList.add("active")},_renderGrid:function(e,t,i){var n,a=void 0!==e,r=void 0!==t;if(e=~~e||~~elData(p,"day"),t=~~t,i=~~i,r||i){var o=0!==i,l=document.createDocumentFragment();l.appendChild(p),r||(t=~~elData(p,"month")),i=i||~~elData(p,"year");var c=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(u>c?(i=u.getFullYear(),t=u.getMonth(),e=u.getDate(),g.value=t,y.value=i,o=!0):c>d&&(i=d.getFullYear(),t=d.getMonth(),e=d.getDate(),g.value=t,y.value=i,o=!0),c=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-01");c.getDay()!==s;)c.setDate(c.getDate()-1);for(var f,m=0;35>m;m++)n=h[m],n.textContent=c.getDate(),f=c.getMonth()===t,f&&(u>c?f=!1:c>d&&(f=!1)),n.classList[f?"remove":"add"]("otherMonth"),c.setDate(c.getDate()+1);if(elData(p,"month",t),elData(p,"year",i),w.insertBefore(l,_),!a&&(c=new Date(i,t,e),c.getDate()!==e)){for(;c.getMonth()!==t;)c.setDate(c.getDate()-1);e=c.getDate()}if(o){for(var m=0;12>m;m++){var C=g.children[m];C.disabled=i===u.getFullYear()&&C.value<u.getMonth()||i===d.getFullYear()&&C.value>d.getMonth()}var L=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-01");L.setMonth(L.getMonth()+1),v.classList[d>L?"add":"remove"]("active");var E=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-01");E.setDate(E.getDate()-1),b.classList[E>u?"add":"remove"]("active")}}if(e){for(var m=0;35>m;m++)n=h[m],n.classList[n.classList.contains("otherMonth")||~~n.textContent!==e?"remove":"add"]("active");elData(p,"day",e)}this._formatValue()},_formatValue:function(){var t,i,n,a=l.get(c);"true"!==elData(c,"empty")&&(a.isDateTime?(t=new Date(elData(p,"year"),elData(p,"month"),elData(p,"day"),f.value,m.value),i=e.formatDateTime(t),n=e.format(t,"c")):(t=new Date(elData(p,"year"),elData(p,"month"),elData(p,"day")),i=e.formatDate(t),n=e.format(t,"Y-m-d")),c.value=i,elData(c,"value",t.getTime()),a.shadow.value=n)},_createPicker:function(){if(null===w){w=elCreate("div"),w.className="datePicker",w.addEventListener("click",function(e){e.stopPropagation()});var i=elCreate("span");i.className="elementPointer",i.innerHTML="<span></span>",w.appendChild(i);var n=elCreate("header");w.appendChild(n),b=elCreate("a"),b.className="icon icon16 fa-arrow-left previous",b.addEventListener("click",this.previousMonth.bind(this)),n.appendChild(b);var a=elCreate("span");n.appendChild(a),g=elCreate("select"),g.className="month",g.addEventListener("change",this._changeMonth.bind(this));var r=elCreate("label");r.className="selectDropdown",r.appendChild(g),a.appendChild(r);for(var o="",l=t.get("__monthsShort"),c=0;12>c;c++)o+='<option value="'+c+'">'+l[c]+"</option>";g.innerHTML=o,y=elCreate("select"),y.className="year",y.addEventListener("change",this._changeYear.bind(this)),r=elCreate("label"),r.className="selectDropdown",r.appendChild(y),a.appendChild(r),v=elCreate("a"),v.className="icon icon16 fa-arrow-right next",v.addEventListener("click",this.nextMonth.bind(this)),n.appendChild(v),p=elCreate("ul"),w.appendChild(p);var d=elCreate("li");d.className="weekdays",p.appendChild(d);for(var u,C=t.get("__daysShort"),c=0;7>c;c++){var L=c+s;L>6&&(L-=7),u=elCreate("span"),u.textContent=C[L],d.appendChild(u)}for(var E,x,T=this._click.bind(this),c=0;5>c;c++){x=elCreate("li"),p.appendChild(x);for(var D=0;7>D;D++)E=elCreate("a"),E.addEventListener("click",T),h.push(E),x.appendChild(E)}_=elCreate("footer"),w.appendChild(_),f=elCreate("select"),f.className="hour",f.addEventListener("change",this._formatValue.bind(this));for(var S="",k=new Date(2e3,0,1),M=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,""),c=0;24>c;c++)k.setHours(c),S+='<option value="'+c+'">'+e.format(k,M)+"</option>";f.innerHTML=S,_.appendChild(f),_.appendChild(document.createTextNode(" : ")),m=elCreate("select"),m.className="minute",m.addEventListener("change",this._formatValue.bind(this));for(var S="",c=0;60>c;c++)S+='<option value="'+c+'">'+(10>c?"0"+c.toString():c)+"</option>";m.innerHTML=S,_.appendChild(m),document.body.appendChild(w)}},previousMonth:function(){"0"===g.value?(g.value=11,y.value=~~y.value-1):g.value=~~g.value-1,this._renderGrid(void 0,g.value,y.value)},nextMonth:function(){"11"===g.value?(g.value=0,y.value=~~y.value+1):g.value=~~g.value+1,this._renderGrid(void 0,g.value,y.value)},_changeMonth:function(e){this._renderGrid(void 0,e.currentTarget.value)},_changeYear:function(e){this._renderGrid(void 0,void 0,e.currentTarget.value)},_click:function(e){e.currentTarget.classList.contains("otherMonth")||(elData(c,"empty",!1),this._renderGrid(e.currentTarget.textContent),this._close())},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+elData(e,"value")):null},setDate:function(t,i){t=this._getElement(t);var n=l.get(t);elData(t,"value",i.getTime()),t.value=e["formatDate"+(n.isDateTime?"Time":"")](i),n.shadow.value=e.format(i,n.isDateTime?"c":"Y-m-d")},clear:function(e){e=this._getElement(e);var t=l.get(e);e.removeAttribute("data-value"),e.value="",t.isEmpty=!0,t.shadow.value=""},destroy:function(e){e=this._getElement(e);var t=l.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),elRemove(i),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",C),elRemove(t.shadow),e.classList.remove("inputDatePicker"),e.readOnly=!1,l["delete"](e)},setCloseCallback:function(e,t){e=this._getElement(e),l.get(e).onClose=t},_getElement:function(e){if("string"==typeof e&&(e=elById(e)),!(e instanceof Element&&e.classList.contains("inputDatePicker")&&l.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}};return window.__wcf_bc_datePicker=L,L}),define("WoltLab/WCF/Ui/Page/Action",["Dictionary","Dom/Util"],function(e,t){"use strict";var i=new e,n=null,a=!1;return{setup:function(){a=!0,n=elCreate("ul"),n.className="pageAction",document.body.appendChild(n)},add:function(e,r,o){a===!1&&this.setup();var s=elCreate("li");if(s.appendChild(r),elAttr(s,"aria-hidden","toTop"===e?"true":"false"),elData(s,"name",e),"toTop"===e)s.className="toTop initiallyHidden",n.appendChild(s);else{var l=null;o&&(l=i.get(o),void 0!==l&&(l=l.parentNode)),null===l&&n.childElementCount&&(l=n.children[0]),null===l?t.prepend(s,n):n.insertBefore(s,l)}i.set(e,r),this._renderContainer()},remove:function(e){var t=i.get(e);if(void 0!==t){var a=t.parentNode;a.addEventListener("animationend",function(){n.removeChild(a),i["delete"](e)}),this.hide(e)}},hide:function(e){var t=i.get(e);t&&(elAttr(t.parentNode,"aria-hidden","true"),this._renderContainer())},show:function(e){var t=i.get(e);t&&(t.parentNode.classList.contains("initiallyHidden")&&t.parentNode.classList.remove("initiallyHidden"),elAttr(t.parentNode,"aria-hidden","false"),this._renderContainer())},_renderContainer:function(){var e=!1;if(n.childElementCount)for(var t=0,i=n.childElementCount;i>t;t++)if("false"===elAttr(n.children[t],"aria-hidden")){e=!0;break}n.classList[e?"add":"remove"]("active")}}}),define("WoltLab/WCF/Ui/Page/JumpToTop",["Environment","Language","./Action"],function(e,t,i){"use strict";function n(){this.init()}return n.prototype={init:function(){if("desktop"===e.platform()){this._callbackScrollEnd=this._afterScroll.bind(this),this._timeoutScroll=null;var n=elCreate("a");n.className="jsTooltip",n.href="#",elAttr(n,"title",t.get("wcf.global.scrollUp")),n.innerHTML='<span class="icon icon16 fa-arrow-up"></span>',n.addEventListener("click",this._jump.bind(this)),i.add("toTop",n),window.addEventListener("scroll",this._scroll.bind(this)),this._afterScroll()}},_jump:function(e){e.preventDefault(),elById("top").scrollIntoView({behavior:"smooth"})},_scroll:function(){null!==this._timeoutScroll&&window.clearTimeout(this._timeoutScroll),this._timeoutScroll=window.setTimeout(this._callbackScrollEnd,100)},_afterScroll:function(){this._timeoutScroll=null,i[window.scrollY>=window.innerHeight/2?"show":"hide"]("toTop")}},n}),define("WoltLab/WCF/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLab/WCF/Date/Time/Relative","Ui/SimpleDropdown","WoltLab/WCF/Ui/Mobile","WoltLab/WCF/Ui/TabMenu","WoltLab/WCF/Ui/FlexibleMenu","Ui/Dialog","WoltLab/WCF/Ui/Tooltip","WoltLab/WCF/Language","WoltLab/WCF/Environment","WoltLab/WCF/Date/Picker","EventHandler","Core","WoltLab/WCF/Ui/Page/JumpToTop"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,p,f,m){"use strict";return window.Favico=e,window.enquire=t,null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=p,{setup:function(e){e=f.extend({enableMobileMenu:!0},e),u.setup(),n.setup(),h.init(),a.setup(),r.setup({enableMobileMenu:e.enableMobileMenu}),o.setup(),l.setup(),c.setup(),new m;for(var t=elBySelAll("form[method=get]"),i=0,s=t.length;s>i;i++)t[i].setAttribute("method","post");"microsoft"===u.browser()&&(window.onbeforeunload=function(){});var d=0;d=window.setInterval(function(){"function"==typeof window.jQuery&&(window.clearInterval(d),window.jQuery.holdReady(!1))},20)}}}),define("WoltLab/WCF/Controller/Sitemap",["Ajax","EventHandler","Language","Dom/Util","Ui/Dialog","Ui/TabMenu"],function(e,t,i,n,a,r){"use strict";var o=[];return{setup:function(){elBySel("#sitemap > a").addEventListener(WCF_CLICK_EVENT,this.open.bind(this))},open:function(e){e.preventDefault(),a.open(this)},_ajaxSetup:function(){return{data:{actionName:"getSitemap",className:"wcf\\data\\sitemap\\SitemapAction"}}},_ajaxSuccess:function(e){o.push(e.returnValues.sitemapName),elById("sitemap_"+e.returnValues.sitemapName).children[0].innerHTML=e.returnValues.template},_dialogSetup:function(){return{id:"sitemapDialog",options:{title:i.get("wcf.page.sitemap")},source:{data:{actionName:"getSitemap",className:"wcf\\data\\sitemap\\SitemapAction"},after:function(e,i){o.push(i.returnValues.sitemapName);var a=elBySel(".tabMenuContainer",e),s=n.identify(a);r.getTabMenu(s).select("sitemap_"+i.returnValues.sitemapName),t.add("com.woltlab.wcf.simpleTabMenu_"+s,"select",this.showTab.bind(this))}.bind(this)}}},showTab:function(t){var i=elAttr(t.active,"data-name").replace(/^sitemap_/,"");-1===o.indexOf(i)&&e.api(this,{parameters:{sitemapName:i}})}}}),define("WoltLab/WCF/Controller/Style/Changer",["Ajax","Language","Ui/Dialog"],function(e,t,i){"use strict";var n={setup:function(){var e=elBySel("#footerNavigation > ul.navigationItems");if(null!==e){var i=elCreate("li");i.classList.add("styleChanger"),i.addEventListener("click",this.showDialog.bind(this));var n=elCreate("a");elAttr(n,"href","#"),n.textContent=t.get("wcf.style.changeStyle"),i.appendChild(n),e.appendChild(i)}},showDialog:function(e){e.preventDefault(),i.open(this)},_dialogSetup:function(){return{id:"styleChanger",options:{disableContentPadding:!0,title:t.get("wcf.style.changeStyle")},source:{data:{actionName:"getStyleChooser",className:"wcf\\data\\style\\StyleAction"},after:function(e){for(var t=elBySelAll(".styleList > li",e),i=0,n=t.length;n>i;i++){var a=t[i];a.classList.add("pointer"),a.addEventListener("click",this._click.bind(this))}}.bind(this)}}},_click:function(t){t.preventDefault(),e.apiOnce({data:{actionName:"changeStyle",className:"wcf\\data\\style\\StyleAction",objectIDs:[elData(t.currentTarget,"style-id")]},success:function(){window.location.reload()}})}};return n}),define("WoltLab/WCF/Controller/Popover",["Ajax","Dictionary","Environment","Dom/ChangeListener","Dom/Util","Ui/Alignment"],function(e,t,i,n,a,r){"use strict";var o=null,s=new t,l=new t,c=new t,d=null,u=!1,h=null,p=null,f=null,m=null,g=null,v=null,b=null,_=null,y=0,w=1,C=2,L=500,E=300;return{_setup:function(){if(null===f){f=elCreate("div"),f.className="popover forceHide",m=elCreate("div"),m.className="popoverContent",f.appendChild(m);var e=elCreate("span");e.className="elementPointer",e.appendChild(elCreate("span")),f.appendChild(e),document.body.appendChild(f),g=this._hide.bind(this),b=this._mouseEnter.bind(this),_=this._mouseLeave.bind(this),f.addEventListener("mouseenter",this._popoverMouseEnter.bind(this)),f.addEventListener("mouseleave",_),f.addEventListener("animationend",this._clearContent.bind(this)),window.addEventListener("beforeunload",function(){u=!0,null!==h&&window.clearTimeout(h),this._hide(!0)}.bind(this)),n.add("WoltLab/WCF/Controller/Popover",this._init.bind(this))}},init:function(e){"desktop"===i.platform()&&(e.attributeName=e.attributeName||"data-object-id",e.legacy=e.legacy===!0,this._setup(),c.has(e.identifier)||(c.set(e.identifier,{attributeName:e.attributeName,elements:e.legacy?e.className:elByClass(e.className),legacy:e.legacy,loadCallback:e.loadCallback}),this._init(e.identifier)))},_init:function(e){"string"==typeof e&&e.length?this._initElements(c.get(e),e):c.forEach(this._initElements.bind(this))},_initElements:function(e,t){for(var i=e.legacy?elBySelAll(e.elements):e.elements,n=0,r=i.length;r>n;n++){var o=i[n],c=a.identify(o);if(s.has(c))return;var d=e.legacy?c:~~o.getAttribute(e.attributeName);if(0!==d){o.addEventListener("mouseenter",b),o.addEventListener("mouseleave",_),"A"===o.nodeName&&elAttr(o,"href")&&o.addEventListener("click",g);var u=t+"-"+d;elData(o,"cache-id",u),l.set(c,{element:o,identifier:t,objectId:d}),s.has(u)||s.set(t+"-"+d,{content:null,state:y})}}},setContent:function(e,t,i){var n=e+"-"+t,r=s.get(n);if(void 0===r)throw new Error("Unable to find element for object id '"+t+"' (identifier: '"+e+"').");if(r.content=a.createFragmentFromHtml(i),r.state=C,o){var c=l.get(o).element;elData(c,"cache-id")===n&&this._show()}},_mouseEnter:function(e){if(!u){null!==h&&(window.clearTimeout(h),h=null);var t=a.identify(e.currentTarget);o===t&&null!==p&&(window.clearTimeout(p),p=null),d=t,h=window.setTimeout(function(){h=null,d===t&&this._show()}.bind(this),E)}},_mouseLeave:function(){d=null,null===p&&(null===v&&(v=this._hide.bind(this)),null!==p&&window.clearTimeout(p),p=window.setTimeout(v,L))},_popoverMouseEnter:function(){null!==p&&(window.clearTimeout(p),p=null)},_show:function(){null!==p&&(window.clearTimeout(p),p=null);var e=!1;f.classList.contains("active")?(this._hide(),e=!0):m.childElementCount&&(e=!0),e&&(f.classList.add("forceHide"),f.offsetTop,this._clearContent(),f.classList.remove("forceHide")),o=d;var t=l.get(o),i=s.get(elData(t.element,"cache-id"));i.state===C?(m.appendChild(i.content),this._rebuild(o)):i.state===y&&(i.state=w,c.get(t.identifier).loadCallback(t.objectId,this))},_hide:function(){null!==p&&(window.clearTimeout(p),p=null),f.classList.remove("active")},_clearContent:function(){if(o&&m.childElementCount&&!f.classList.contains("active"))for(var e=s.get(elData(l.get(o).element,"cache-id"));m.childNodes.length;)e.content.appendChild(m.childNodes[0])},_rebuild:function(){f.classList.contains("active")||(f.classList.remove("forceHide"),f.classList.add("active"),r.set(f,l.get(o).element,{pointer:!0,vertical:"top"}))},_ajaxSetup:function(){return{}},ajaxApi:function(t,i,n){if("function"!=typeof i)throw new TypeError("Expected a valid callback for parameter 'success'.");e.api(this,t,i,n)}}}),define("WoltLab/WCF/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=objOwns(window,"Set")&&"function"==typeof window.Set;return e.prototype={add:function(e){t?this._set.add(e):this.has(e)||this._set.push(e)},clear:function(){t?this._set.clear():this._set=[]},"delete":function(e){if(t)return this._set["delete"](e);var i=this._set.indexOf(e);return-1===i?!1:(this._set.splice(i,1),!0)},forEach:function(e){if(t)this._set.forEach(e);else for(var i=0,n=this._set.length;n>i;i++)e(this._set[i])},has:function(e){return t?this._set.has(e):-1!==this._set.indexOf(e)}},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return t?this._set.size:this._set.length}}),e}),define("WoltLab/WCF/Ui/User/Ignore",["List","Dom/ChangeListener"],function(e,t){"use strict";var i=elByClass("ignoredUserMessage"),n=null,a=new e;return{init:function(){n=this._removeClass.bind(this),this._rebuild(),t.add("WoltLab/WCF/Ui/User/Ignore",this._rebuild.bind(this))},_rebuild:function(){for(var e,t=0,r=i.length;r>t;t++)e=i[t],a.has(e)||(e.addEventListener(WCF_CLICK_EVENT,n),a.add(e))},_removeClass:function(e){e.preventDefault();var t=e.currentTarget;t.classList.remove("ignoredUserMessage"),t.removeEventListener(WCF_CLICK_EVENT,n),a["delete"](t)}}}),define("WoltLab/WCF/BootstrapFrontend",["Ajax","WoltLab/WCF/Bootstrap","WoltLab/WCF/Controller/Sitemap","WoltLab/WCF/Controller/Style/Changer","WoltLab/WCF/Controller/Popover","WoltLab/WCF/Ui/User/Ignore"],function(e,t,i,n,a,r){"use strict";var o=0;return{setup:function(e){t.setup(),i.setup(),e.styleChanger,this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueue.url,e.backgroundQueue.force),r.init()},_initUserPopover:function(){a.init({attributeName:"data-user-id",className:"userLink",identifier:"com.woltlab.wcf.user",loadCallback:function(e,t){var i=function(i){t.setContent("com.woltlab.wcf.user",e,i.returnValues.template)};t.ajaxApi({actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]},i,i)}})},_invokeBackgroundQueue:function(t,i){var n=this._invokeBackgroundQueue.bind(this,t,!0);(Math.random()<.1||i)&&e.apiOnce({url:t,ignoreError:!0,silent:!0,success:function(e){o++,e>0&&5>o&&setTimeout(n,1e3)}.bind(this)})}}}),define("WoltLab/WCF/ColorUtil",[],function(){"use strict";var e={hexToRgb:function(e){return e=e.replace(/^#/,""),/^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)?(e=e.split(""),3===e.length?{r:parseInt(e[0]+""+e[0],16),g:parseInt(e[1]+""+e[1],16),b:parseInt(e[2]+""+e[2],16)}:{r:parseInt(e[0]+""+e[1],16),g:parseInt(e[2]+""+e[3],16),b:parseInt(e[4]+""+e[5],16)}):Number.NaN},rgbToHex:function(e,t,i){var n="0123456789ABCDEF";return void 0===t&&e.match(/^rgba?\((\d+), ?(\d+), ?(d\+)(?:, ?[0-9.]+)?\)$/)&&(e=RegExp.$1,t=RegExp.$2,i=RegExp.$3),n.charAt((e-e%16)/16)+""+n.charAt(e%16)+(n.charAt((t-t%16)/16)+""+n.charAt(t%16))+(n.charAt((i-i%16)/16)+""+n.charAt(i%16))}};return e}),define("WoltLab/WCF/Permission",["Dictionary"],function(e){"use strict";var t=new e,i={add:function(e,i){if("boolean"!=typeof i)throw new TypeError("Permission value has to be boolean.");t.set(e,i)},addObject:function(e){for(var t in e)objOwns(e,t)&&this.addPermission(t,e[t])},get:function(e){return t.has(e)?t.get(e):!1}};return i}),define("WoltLab/WCF/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse"],function(e,t,i,n,a,r){"use strict";function o(e,i,n){if(n=n||{},void 0===n.className)throw new Error("Missing class name.");if(this._options=t.extend({action:"upload",multiple:!1,name:"__files[]",singleFileRequests:!1,url:"index.php/AJAXUpload/?t="+SECURITY_TOKEN},n),this._options.url=WCF.convertLegacyURL(this._options.url),this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(i),null===i)throw new Error("Element id '"+i+"' is unknown.");if(n.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName)throw new Error("Target element has to be list when allowing upload of multiple files.");this._fileElements=[],this._internalFileId=0,this._createButton()}return o.prototype={_createButton:function(){this._fileUpload=elCreate("input"),elAttr(this._fileUpload,"type","file"),elAttr(this._fileUpload,"name",this._options.name),this._options.multiple&&elAttr(this._fileUpload,"multiple","true"),this._fileUpload.addEventListener("change",this._upload.bind(this)),this._button=elCreate("p"),this._button.classList.add("button"),this._button.classList.add("uploadButton");var e=elCreate("span");e.textContent=n.get("wcf.global.button.upload"),this._button.appendChild(e),a.prepend(this._fileUpload,this._button),this._insertButton(),i.trigger()},_createFileElement:function(e){var t=elCreate("progress");if(elAttr(t,"max",100),"OL"===this._target.nodeName||"UL"===this._target.nodeName){var i=elCreate("li");return i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i}var n=elCreate("p");return n.appendChild(t),this._target.appendChild(n),n},_createFileElements:function(e){if(e.length){var t=this._fileElements.length;this._fileElements[t]=[];for(var n=0,a=e.length;a>n;n++){var r=e[n],o=this._createFileElement(r);o.classList.contains("uploadFailed")||(elData(o,"filename",r.name),elData(o,"internal-file-id",this._internalFileId++),this._fileElements[t][n]=o)}return i.trigger(),t}return null},_failure:function(e,t,i,n,a){return!0},_getParameters:function(){return{}},_insertButton:function(){a.prepend(this._button,this._buttonContainer)},_progress:function(e,t){var i=Math.round(t.loaded/t.total*100);for(var n in this._fileElements[e]){var a=elByTag("PROGRESS",this._fileElements[e][n]);1===a.length&&elAttr(a[0],"value",i)}},_removeButton:function(){elRemove(this._button),i.trigger()},_success:function(e,t,i,n,a){},_upload:function(e,t,i){for(var n=r.childrenByClass(this._target,"uploadFailed"),a=0,o=n.length;o>a;a++)elRemove(n[a]);var s=null,l=[];if(t)l.push(t);else if(i){var c="";switch(i.type){case"image/jpeg":c=".jpg";break;case"image/gif":c=".gif";break;case"image/png":c=".png"}l.push({name:"pasted-from-clipboard"+c})}else l=this._fileUpload.files;if(l.length)if(this._options.singleFileRequests){s=[];for(var a=0,o=l.length;o>a;a++)s.push(this._uploadFiles([l[a]],i))}else s=this._uploadFiles(l,i);return this._removeButton(),this._createButton(),s},_uploadFiles:function(t,i){var n=this._createFileElements(t);if(!this._fileElements[n].length)return null;for(var a=new FormData,r=0,o=t.length;o>r;r++)if(this._fileElements[n][r]){var s=elData(this._fileElements[n][r],"internal-file-id");i?a.append("__files["+s+"]",i,t[r].name):a.append("__files["+s+"]",t[r])}a.append("actionName",this._options.action),a.append("className",this._options.className),a.append("interfaceName","wcf\\data\\IUploadAction");var l=function(e,t){t=t||"";for(var i in e)"object"==typeof e[i]?l(e[i],t+"["+i+"]"):a.append("parameters"+t+"["+i+"]",e[i])};l(this._getParameters());var c=new e({data:a,contentType:!1,failure:this._failure.bind(this,n),silent:!0,success:this._success.bind(this,n),uploadProgress:this._progress.bind(this,n),url:this._options.url});return c.sendRequest(),n}},o}),define("WoltLab/WCF/Ajax/Jsonp",["Core"],function(e){"use strict";var t={send:function(t,i,n,a){if(t="string"==typeof t?t.trim():"",0===t.length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof i)throw new TypeError("Expected a valid callback function for parameter 'success'.");a=e.extend({parameterName:"callback",timeout:10},a||{});var r="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),o=window.setTimeout(function(){window[r]=function(){},"function"==typeof n&&n()},1e3*(~~a.timeout||10));window[r]=function(){window.clearTimeout(o),i.apply(null,arguments)},t+=-1===t.indexOf("?")?"?":"&",t+=a.parameterName+"="+r;var s=elCreate("script");s.async=!0,elAttr(s,"src",t),document.head.appendChild(s)}};return t}),define("WoltLab/WCF/Attachment/Upload",["Core","Dom/ChangeListener","Dom/Traverse","Language","List","Upload"],function(e,t,i,n,a,r){"use strict";function o(e,t,o,s,l,c,d,u,h){this._tmpHash=o,this._objectType=s,this._objectId=~~l,this._parentObjectId=~~parentObjectID,this._wysiwygContainerId=h,this._autoInsert=new a,r.call(this,"uploadImage","styleImage",{className:"wcf\\data\\attachment\\AttachmentAction",maxSize:~~u,maxUploads:~~d,multiple:!0}),i.childByClass(this._button,".button").addEventListener("click",this._validateLimit.bind(this)),elByClass(this._target,"jsButtonInsertAttachment").addEventListener("click",this._insert.bind(this)),elByClass(this._target,"jsButtonAttachmentInsertThumbnail").addEventListener("click",this._insert.bind(this)),elByClass(this._target,"jsButtonAttachmentInsertFull").addEventListener("click",this._insert.bind(this)),this._insertAllButton=elCreate("p"),this._insertAllButton.className="button jsButtonAttachmentInsertAll",this._insertAllButton.textContent=n.get("wcf.attachment.insertAll"),i.childBySel(this._target,"li:not(.uploadFailed)")&&elHide(this._insertAllButton),this._insertAllButton.addEventListener("click",this._insertAll.bind(this)),this._button.appendChild(this._insertAllButton),this._wysiwygContainerId}e.inherit(o,r,{_createFileElement:function(e){var t=elCreate("li");t.className="box64",elData(t,"filename",filename),this._target.appendChild(t),elShow(this._target);var i=elCreate("span");this._options.maxSize>=e.size?i.className="icon icon48 fa-spinnner":i.className="icon icon48 fa-ban-circle",t.appendChild(i);var a=elCreate("div");t.appendChild(a);var r=elCreate("div");a.appendChild(r);var o=elCreate("p");o.textContent=e.name,r.appendChild(o);var s=elCreate("small");if(r.appendChild(s),this._options.maxSize>=e.size){var l=elCreate("progress");elAttr(l,"max",100)}a.appendChild(elCreate("ul")),this._options.maxSize<e.size&&(s=elCreate("small"),s.className="innerError",s.textContent=n.get("wcf.attachment.upload.error.tooLarge"),r.appendChild(s),t.classList.add("uploadFailed"))},_createFileElements:function(e){for(var t=i.childrenBySel(this._target,"li.uploadFailed"),n=0,a=t.length;a>n;n++)this._target.removeChild(t[n]);return r.prototype._createFileElements.call(this,e)},_getParameters:function(){return{objectID:this._objectId,objectType:this._objectType,parentObjectID:this._parentObjectId,tmpHash:this._tmpHash}},_success:function(e,a){for(var r=0,o=this._fileElements[e].length;o>r;r++){var s=this._fileElements[e][r],l=elByTag(s,"PROGRESS");elRemove(l);var c=elData(s,"filename"),d=elData(s,"internal-file-id"),u=i.childByClass(s,"fa-spinner");if(a.returnValues&&a.returnValues.attachments[d]){var h=a.returnValues.attachments[d];if(h.tinyURL){var p=elCreate("img");p.className="attachmentTinyThumbnail",elAttr(p,"src",h.tinyURL),elAttr(p,"alt",""),u.parentNode.replaceChild(u,p),elData(s,"height",h.height),elData(s,"width",h.width)}else u.classList.remove("fa-spinner"),u.classList.add("fa-paper-clip");var f=elByTag(s,"P");f.innerHtml="";var m=elCreate("a");m.textContent=c,elAttr(m,"href",h.url),h.isImage&&(m.className="jsImageViewer",elAttr(m,"title",c)),f.appendChild(m),elByTag(s,"SMALL").textContent=h.formattedFilesize;var g=elByTag(s,"UL");g.classList.add("buttonGroup");var v=elCreate("li");g.appendChild(v);var b=elCreate("span");if(b.className="button small jsDeleteButton",b.textContent=n.get("wcf.global.button.delete"),elData(b,"object-id",h.attachmentID),elData(b,"confirm-message",n.get("wcf.attachment.delete.sure")),this._wysiwygContainerId&&elData(b,"event-name","attachment_"+this._wysiwygContainerId),v.appendChild(b),elData(b,"object-id",h.attachmentID),this._wysiwygContainerId)if(h.tinyURL){var _=elCreate("li");g.appendChild(_),b=elCreate("span"),b.className="button small jsButtonAttachmentInsertThumbnail",b.textContent=n.get("wcf.global.button.insertThumbnail"),elData(b,"object-id",h.attachmentID),b.addEventListener("click",this._insert.bind(this)),_.appendChild(b);var y=elCreate("li");g.appendChild(y),b=elCreate("span"),b.className="button small jsButtonAttachmentInsertFull",b.textContent=n.get("wcf.global.button.insertFull"),elData(b,"object-id",h.attachmentID),b.addEventListener("click",this._insert.bind(this)),y.appendChild(b)}else{var w=elCreate("li");g.appendChild(w),b=elCreate("span"),b.className="button small jsButtonAttachmentInsertPlain",b.textContent=n.get("wcf.global.button.insert"),elData(b,"object-id",h.attachmentID),b.addEventListener("click",this._insert.bind(this)),w.appendChild(b)}}else{u.classList.removeClass("fa-spinner"),u.classList.addClass("fa-ban-circle");var C="uploadFailed";a.returnValues&&a.returnValues.errors[d]&&(C=a.returnValues.errors[d].errorType);var L=elCreate("small");L.className="innerError",L.textContent=n.get("wcf.attachment.upload.error."+C),elBySel(s,"div > div").appendChild(L),s.classList.add("uploadFailed")}s.style.setProperty("display","block"),this._autoInsert.has(e)&&(this._autoInsert["delete"](e),s.classList.contains("uploadFailed"))}i.childrenBySel(this._target,"li:not(.uploadFailed)").length?elShow(this._insertAllButton):elHide(this._insertAllButton),t.trigger()},_upload:function(e,t,i){this._validateLimit()&&r.prototype._upload.call(this,e,t,i)},_validateLimit:function(){var e=i.nextBySel(this._button,"small.innerError"),t=this._options.maxUploads-i.childrenBySel(this._target,"li:not(.uploadFailed)").length;return 0>=t||t<this._fileUpload.files.length?(e||(e=elCreate("small"),e.className="innerError",DomUtil.insertAfter(e,this._button)),0>=t?e.textContent=n.get("wcf.attachment.upload.error.reachedLimit"):e.textContent=n.get("wcf.attachment.upload.error.reachedRemainingLimit",{remaining:t}),!1):(e&&elRemove(e),!0)}})}),define("WoltLab/WCF/Bbcode/Collapsible",[],function(){
 "use strict";var e=elByClass("jsCollapsibleBbcode"),t={observe:function(){for(var t,i;e.length;)t=e[0],t.classList.remove("jsCollapsibleBbcode"),i=elBySel(".toggleButton"),null!==i&&!function(e,t){var i=function(){var i=e.classList.contains("collapsed");e.classList[i?"remove":"add"]("collapsed"),t.textContent=elData(t,"title-"+(i?"collapse":"expand"))};t.addEventListener("click",i),e.addEventListener("scroll",i),0!==e.scrollTop&&i()}(t,i)}};return t}),define("WoltLab/WCF/Bbcode/FromHtml",["EventHandler","StringUtil","Dom/Traverse"],function(e,t,i){"use strict";function n(e,t){var i=e[t?"previousSibling":"nextSibling"];return null!==i&&i.nodeType===Node.TEXT_NODE&&/\s$/.test(i.textContent)?!1:!0}var a=[],r={},o=[],s={convert:function(t){t.length&&this._setup();var i=elCreate("div");i.innerHTML=t;for(var n=elByTag("P",i);n.length;)n[0].outerHTML=n[0].innerHTML;for(n=elByTag("BR",i);n.length;)n[0].outerHTML="\n";var r=this._preserveSourceElements(i);e.fire("com.woltlab.wcf.bbcode.fromHtml","beforeConvert",{container:i});for(var o=0,s=a.length;s>o;o++)this._convert(i,a[o]);for(e.fire("com.woltlab.wcf.bbcode.fromHtml","afterConvert",{container:i}),this._restoreSourceElements(i,r),n=elByTag("*",i);n.length;)n[0].outerHTML=n[0].innerHTML;return t=this._convertSpecials(i.innerHTML)},_preserveSourceElements:function(e){for(var t,i,n=[],a=0,r=o.length;r>a;a++){t=elBySelAll(o[a].selector,e),i=[];for(var s=0,l=t.length;l>s;s++)this._preserveSourceElement(t[s],i);n.push(i)}return n},_preserveSourceElement:function(e,t){var i=elCreate("var");elData(i,"source","wcf"),e.parentNode.insertBefore(i,e);var n=document.createDocumentFragment();n.appendChild(e),t.push({fragment:n,placeholder:i})},_restoreSourceElements:function(e,t){for(var i,n,a,r=0,s=t.length;s>r;r++)if(n=t[r],0!==n.length)for(var l=0,c=n.length;c>l;l++)i=n[l],a=i.placeholder,a.parentNode.insertBefore(i.fragment,a),o[r].callback(a.previousElementSibling),elRemove(a)},_convertSpecials:function(e){return e=e.replace(/&amp;/g,"&"),e=e.replace(/&lt;/g,"<"),e=e.replace(/&gt;/g,">")},_setup:function(){a.length||(a=[{tagName:"STRONG",bbcode:"b"},{tagName:"DEL",bbcode:"s"},{tagName:"EM",bbcode:"i"},{tagName:"SUB",bbcode:"sub"},{tagName:"SUP",bbcode:"sup"},{tagName:"U",bbcode:"u"},{tagName:"KBD",bbcode:"tt"},{tagName:"A",callback:this._convertUrl.bind(this)},{tagName:"IMG",callback:this._convertImage.bind(this)},{tagName:"LI",callback:this._convertListItem.bind(this)},{tagName:"OL",callback:this._convertList.bind(this)},{tagName:"TABLE",callback:this._convertTable.bind(this)},{tagName:"UL",callback:this._convertList.bind(this)},{tagName:"BLOCKQUOTE",callback:this._convertBlockquote.bind(this)},{tagName:"SPAN",callback:this._convertSpan.bind(this)},{tagName:"DIV",callback:this._convertDiv.bind(this)}],r={span:[{style:"color",callback:this._convertInlineColor.bind(this)},{style:"font-size",callback:this._convertInlineFontSize.bind(this)},{style:"font-family",callback:this._convertInlineFontFamily.bind(this)}],div:[{style:"text-align",callback:this._convertInlineTextAlign.bind(this)}]},o=[{selector:"div.codeBox",callback:this._convertSourceCodeBox.bind(this)}],e.fire("com.woltlab.wcf.bbcode.fromHtml","init",{converter:a,inlineConverter:r,sourceConverter:o}))},_convert:function(e,t){if("function"==typeof t)return void t(e);for(var i,n=elByTag(t.tagName,e);n.length;)i=n[0],t.bbcode?i.outerHTML="["+t.bbcode+"]"+i.innerHTML+"[/"+t.bbcode+"]":t.callback(i)},_convertBlockquote:function(e){var n=elData(e,"author"),a=elAttr(e,"cite"),r="[quote]";n&&(n=t.escapeHTML(n).replace(/(\\)?'/g,function(e,t){return t?e:"\\'"}),r=a?"[quote='"+n+"','"+t.escapeHTML(a)+"']":"[quote='"+n+"']");var o=i.childByTag(e,"HEADER");null!==o&&e.removeChild(o);for(var s=i.childrenByTag(e,"DIV"),l=0,c=s.length;c>l;l++)s[l].outerHTML=s[l].innerHTML+"\n";e.outerHTML=r+e.innerHTML.replace(/^\n*/,"").replace(/\n*$/,"")+"[/quote]\n"},_convertImage:function(e){if(e.classList.contains("smiley"))return void(e.outerHTML=(n(e,!0)?" ":"")+elAttr(e,"alt")+(n(e,!1)?" ":""));var t=e.style.getPropertyValue("float")||"none",i=e.style.getPropertyValue("width");if(i="string"==typeof i?~~i.replace(/px$/,""):0,e.classList.contains("redactorEmbeddedAttachment")){var a=elData(e,"attachment-id");i>0?e.outerHTML="[attach="+a+","+t+","+i+"][/attach]":"none"!==t?e.outerHTML="[attach="+a+","+t+"][/attach]":e.outerHTML="[attach="+a+"][/attach]"}else{var r=e.src.trim();i>0?e.outerHTML="[img='"+r+"',"+t+","+i+"][/img]":"none"!==t?e.outerHTML="[img='"+r+"',"+t+"][/img]":e.outerHTML="[img]"+r+"[/img]"}},_convertList:function(e){var t;if("OL"===e.nodeName)t="[list=1]";else{var i=e.style.getPropertyValue("list-style-type")||"";t=""===i?"[list]":"[list="+("lower-latin"===i?"a":i)+"]"}e.outerHTML=t+e.innerHTML+"[/list]"},_convertListItem:function(e){"UL"!==e.parentNode.nodeName&&"OL"!==e.parentNode.nodeName?e.outerHTML=e.innerHTML:e.outerHTML="[*]"+e.innerHTML},_convertSpan:function(e){if(e.style.length||e.className)for(var t,i,n=0,a=r.span.length;a>n;n++)t=r.span[n],t.style?(i=e.style.getPropertyValue(t.style)||"",i&&t.callback(e,i)):e.classList.contains(t.className)&&t.callback(e);e.outerHTML=e.innerHTML},_convertDiv:function(e){if(e.className.length||e.style.length)for(var t,i,n=0,a=r.div.length;a>n;n++)t=r.div[n],t.className&&e.classList.contains(t.className)?t.callback(e):t.style&&(i=e.style.getPropertyValue(t.style)||"",i&&t.callback(e,i));e.outerHTML=e.innerHTML},_convertInlineColor:function(e,t){if(t.match(/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/i)){var i=RegExp.$1,n=RegExp.$2,a=RegExp.$3,r="0123456789ABCDEF";t="#"+(r.charAt((i-i%16)/16)+""+r.charAt(i%16))+(r.charAt((n-n%16)/16)+""+r.charAt(n%16))+(r.charAt((a-a%16)/16)+""+r.charAt(a%16))}e.innerHTML="[color="+t+"]"+e.innerHTML+"[/color]"},_convertInlineFontSize:function(e,t){t.match(/^(\d+)pt$/)?t=RegExp.$1:t.match(/^(\d+)(px|em|rem|%)$/)?(t=window.getComputedStyle(t).fontSize.replace(/^(\d+).*$/,"$1"),t=Math.round(t)):t="",t&&(t=Math.min(Math.max(t,8),36),e.innerHTML="[size="+t+"]"+e.innerHTML+"[/size]")},_convertInlineFontFamily:function(e,t){e.innerHTML="[font="+t.replace(/'/g,"")+"]"+e.innerHTML+"[/font]"},_convertInlineTextAlign:function(e,t){-1!==["center","justify","left","right"].indexOf(t)&&(e.innerHTML="[align="+t+"]"+e.innerHTML+"[/align]")},_convertTable:function(e){for(var t=elByTag("TD",e);t.length;)t[0].outerHTML="[td]"+t[0].innerHTML+"[/td]\n";for(t=elByTag("TR",e);t.length;)t[0].outerHTML="\n[tr]\n"+t[0].innerHTML+"[/tr]";var n=i.childByTag(e,"TBODY"),a=null===n?e.innerHTML:n.innerHTML;e.outerHTML="\n[table]"+a+"\n[/table]\n"},_convertUrl:function(e){var t=e.textContent.trim(),i=e.href.trim(),n="url";return""===i||""===t?void(e.outerHTML=e.innerHTML):(0===i.indexOf("mailto:")&&(i=i.substr(7),n="email"),void(i===t?e.outerHTML="["+n+"]"+i+"[/"+n+"]":e.outerHTML="["+n+"='"+i+"']"+e.innerHTML+"[/"+n+"]"))},_convertSourceCodeBox:function(e){var t=elData(e,"filename").trim()||"",n=elData(e,"highlighter");window.dtdesign=e;for(var a=i.childByTag(e.children[0],"OL"),r=~~elAttr(a,"start")||1,o="",s=0,l=a.childElementCount;l>s;s++)o&&(o+="\n"),o+=a.children[s].textContent;var c="[code='"+n+"',"+r+",'"+t+"']";e.outerHTML=c+o+"[/code]"}};return s}),define("WoltLab/WCF/Bbcode/Parser",[],function(){"use strict";var e={parse:function(e){var t=this._splitTags(e);return this._buildLinearTree(t),t},_splitTags:function(e){for(var t,i,n=__REDACTOR_BBCODES.join("|"),a="(\\[(?:/(?:"+n+")|(?:"+n+")(?:=(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*\\'|[^,\\]]*)(?:,(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*'|[^,\\]]*))*)?)\\])",r=new RegExp("^"+a+"$","i"),o=e.split(new RegExp(a,"i")),s=[],l=0,c=o.length;c>l;l++)t=o[l],""!==t&&(t.match(r)?(i={name:"",closing:!1,attributes:[],source:t},"/"===t[1]?(i.name=t.substring(2,t.length-1),i.closing=!0):t.match(/^\[([a-z0-9]+)=?(.*)\]$/i)&&(i.name=RegExp.$1,RegExp.$2&&(i.attributes=this._parseAttributes(RegExp.$2))),s.push(i)):s.push(t));return s},_buildLinearTree:function(e){for(var t,i,n=[],a="",r=0;r<e.length;r++)if(t=e[r],"object"==typeof t){if(a.length&&(t.name!==a||!t.closing)){e[r]=t.source;continue}if(t.closing){if(this._hasOpenTag(n,t.name)){i=this._closeUnclosedTags(e,n,t.name);for(var o=0,s=i.length;s>o;o++)e.splice(r,i[o]),r++;n.pop().pair=r}else e[r]=t.source;a===t.name&&(a="")}else n.push(t),-1!==__REDACTOR_SOURCE_BBCODES.indexOf(t.name)&&(a=t.name)}this._closeUnclosedTags(e,n,"")},_closeUnclosedTags:function(e,t,i){for(var n,a,r=[],o=t.length-1;o>=0&&(n=t[o],n.name!==i);o--)a={name:n.name,closing:!0,attributes:n.attributes.slice(),source:"[/"+n.name+"]"},n.pair=e.length,e.push(a),t.pop(),r.push({name:n.name,closing:!1,attributes:n.attributes.slice(),source:n.source});return r.reverse()},_hasOpenTag:function(e,t){for(var i=e.length-1;i>=0;i--)if(e[i].name===t)return!0;return!1},_parseAttributes:function(e){for(var t,i=e.split(/(?:^|,)('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'|[^,]*)/g),n=[],a=0,r=i.length;r>a;a++)t=i[a],""!==t&&("'"===t.charAt(0)&&"'"===t.substr(-1)?n.push(t.substring(1,t.length-1).trim()):n.push(t.trim()));return n}};return e}),define("WoltLab/WCF/Bbcode/ToHtml",["Core","EventHandler","Language","StringUtil","WoltLab/WCF/Bbcode/Parser"],function(e,t,i,n,a){"use strict";function r(e){return e&&e==~~e}function o(e){return-1!==e.indexOf(".")||!r(e)&&!s(e)}function s(e){return objOwns(__REDACTOR_CODE_HIGHLIGHTERS,e)}var l=null,c={},d=[],u=[],h={convert:function(i,n){c=e.extend({attachments:{images:{},thumbnailUrl:"",url:""}},n),this._convertSpecials(i);var r=a.parse(i);r.length&&this._initBBCodes(),t.fire("com.woltlab.wcf.bbcode.toHtml","beforeConvert",{stack:r});for(var o,s,l=0,d=r.length;d>l;l++)o=r[l],"object"==typeof o&&(s=this._convert(r,o,l),Array.isArray(s)?(r[l]=null===s[0]?o.source:s[0],r[o.pair]=null===s[1]?r[o.pair].source:s[1]):r[l]=s);return t.fire("com.woltlab.wcf.bbcode.toHtml","afterConvert",{stack:r}),i=r.join(""),i=i.replace(/\n/g,"<br>")},_convertSpecials:function(e){return e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;")},_initBBCodes:function(){null===l&&(l={b:"strong",i:"em",u:"u",s:"del",sub:"sub",sup:"sup",table:"table",td:"td",tr:"tr",tt:"kbd",align:this._convertAlignment.bind(this),attach:this._convertAttachment.bind(this),color:this._convertColor.bind(this),code:this._convertCode.bind(this),email:this._convertEmail.bind(this),list:this._convertList.bind(this),quote:this._convertQuote.bind(this),size:this._convertSize.bind(this),url:this._convertUrl.bind(this),img:this._convertImage.bind(this)},d=["quote","table","td","tr"],u=["table","td","tr"],t.fire("com.woltlab.wcf.bbcode.toHtml","init",{bbcodes:l,removeNewlineAfter:d,removeNewlineBefore:u}))},_convert:function(e,t,i){var n,a=l[t.name];return void 0===a?[null,null]:(-1!==d.indexOf(t.name)&&(n=e[i+1],"string"==typeof n&&(e[i+1]=n.replace(/^\n/,"")),e.length>t.pair+1&&(n=e[t.pair+1],"string"==typeof n&&(e[t.pair+1]=n.replace(/^\n/,"")))),-1!==u.indexOf(t.name)&&(i-1>=0&&(n=e[i-1],"string"==typeof n&&(e[i-1]=n.replace(/\n$/,""))),n=e[t.pair-1],"string"==typeof n&&(e[t.pair-1]=n.replace(/\n$/,""))),this._convertSmilies(e),"string"==typeof a?["<"+a+">","</"+a+">"]:a(e,t,i))},_convertAlignment:function(e,t,i){var n=t.attributes.length?t.attributes[0]:"";return-1===["center","justify","left","right"].indexOf(n)?[null,null]:['<div style="text-align: '+n+'">',"</div>"]},_convertAttachment:function(e,t,i){var n=0,a=t.attributes,r=a.length;if(c.attachments.url?r>0&&(n=~~a[0],objOwns(c.attachments.images,n)||(r=0)):r=0,0===r)return[null,null];var o=~~c.attachments.images[n].height,s=~~c.attachments.images[n].width,l=["max-height: "+o+"px","max-width: "+s+"px"];r>1&&("left"===t.attributes[1]||"right"===a[1])&&(l.push("float: "+a[1]),l.push("margin: "+("left"===a[1]?"0 15px 7px 0":"0 0 7px 15px")));var d,u=c.attachments.thumbnailUrl;return r>2&&(d=~~a[2]||0,d&&(d>s&&(d=s),l.push("width: "+d+"px"),u=c.attachments.url)),['<img src="'+u.replace(/987654321/,n)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+n+'"'+(l.length?' style="'+l.join(";")+'"':"")+">",""]},_convertCode:function(e,t,i){var a=t.attributes,l="",c="auto",d=0;switch(a.length){case 1:r(a[0])?d=~~a[0]:o(a[0])?l=a[0]:s(a[0])&&(c=a[0]);break;case 2:r(a[0])?(d=~~a[0],s(a[1])?c=a[1]:o(a[1])&&(l=a[1])):(s(a[0])&&(c=a[0]),o(a[1])&&(l=a[1]));break;case 3:s(a[0])&&(c=a[0]),r(a[1])&&(d=~~a[1]),o(a[2])&&(l=a[2])}for(var u,h,p=!0,f=-1,m=i+1;m<t.pair;m++){if(h=e[m],""===h.trim()){if(p){e[m]="";continue}-1===f&&(f=m)}else p=!1,f=-1;u=h.split("\n");for(var g=0,v=u.length;v>g;g++)u[g]="<li>"+(u[g]?n.escapeHTML(u[g]):"​")+"</li>";e[m]=u.join("")}if(!p&&-1!==f)for(var m=t.pair-1;m>=f;m--)e[m]="";return['<div class="codeBox container" contenteditable="false" data-highlighter="'+c+'" data-filename="'+(l?n.escapeHTML(l):"")+'"><div><div><h3>'+__REDACTOR_CODE_HIGHLIGHTERS[c]+(l?": "+n.escapeHTML(l):"")+'</h3></div><ol start="'+(d>1?d:1)+'">',"</ol></div></div>"]},_convertColor:function(e,t,i){return t.attributes.length&&t.attributes[0].match(/^[a-z0-9#]+$/i)?['<span style="color: '+n.escapeHTML(t.attributes[0])+'">',"</span>"]:[null,null]},_convertEmail:function(e,t,i){var a="";if(t.attributes.length)a=t.attributes[0];else{for(var r,o=i+1;o<t.pair;o++){if(r=e[o],"object"==typeof r){a="";break}a+=r}if(""===a.trim())return[null,null]}return['<a href="mailto:'+n.escapeHTML(a)+'">',"</a>"]},_convertImage:function(e,t,i){var a="none",r="",o=0;switch(t.attributes.length){case 0:if(!(i+1<t.pair&&"string"==typeof e[i+1]))return"";r=e[i+1],e[i+1]="";break;case 1:r=t.attributes[0];break;case 2:r=t.attributes[0],a=t.attributes[1];break;case 3:r=t.attributes[0],a=t.attributes[1],o=~~t.attributes[2]}"left"!==a&&"right"!==a&&(a="none");var s=[];return o>0&&s.push("width: "+o+"px"),"none"!==a&&(s.push("float: "+a),s.push("margin: "+("left"===a?"0 15px 7px 0":"0 0 7px 15px"))),['<img src="'+n.escapeHTML(r)+'"'+(s.length?' style="'+s.join(";")+'"':"")+">",""]},_convertList:function(e,t,i){for(var n=t.attributes.length?t.attributes[0]:"",a=i+1;a<t.pair;a++)"string"==typeof e[a]&&(e[a]=e[a].replace(/\[\*\]/g,"<li>"));return"1"==n||"decimal"===n?["<ol>","</ol>"]:n.length&&n.match(/^(?:none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)$/)?['<ul style="list-style-type: '+n+'">',"</ul>"]:["<ul>","</ul>"]},_convertQuote:function(e,t,a){var r="",o="";t.attributes.length>1?(r=t.attributes[0],o=t.attributes[1]):1===t.attributes.length&&(r=t.attributes[0]);for(var s=t.pair-1;s>a;s--)if("string"==typeof e[s]){e[s]=e[s].replace(/\n$/,"");break}var l="";return r?(o&&(l='<a href="'+n.escapeHTML(o)+'" tabindex="-1">'),l+=i.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:r.replace(/\\'/g,"'")}),o&&(l+="</a>")):l="<small>"+i.get("wcf.bbcode.quote.title.clickToSet")+"</small>",['<blockquote class="quoteBox container containerPadding quoteBoxSimple" cite="'+n.escapeHTML(o)+'" data-author="'+n.escapeHTML(r)+'"><header contenteditable="false"><h3>'+l+'</h3><a class="redactorQuoteEdit"></a></header><div>​',"</div></blockquote>"]},_convertSmilies:function(e){for(var t,i,a,r=0,o=e.length;o>r;r++)if(i=e[r],"string"==typeof i){for(var s in __REDACTOR_SMILIES)objOwns(__REDACTOR_SMILIES,s)&&(t=s.replace(/</g,"&lt;").replace(/>/g,"&gt;"),a=new RegExp("(\\s|^)"+n.escapeRegExp(s)+"(?=\\s|$)","gi"),i=i.replace(a,'$1<img src="'+__REDACTOR_SMILIES[s]+'" class="smiley" alt="'+t+'">'));e[r]=i}else-1!==__REDACTOR_SOURCE_BBCODES.indexOf(i.name)&&(r=i.pair)},_convertSize:function(e,t,i){return t.attributes.length&&0!==~~t.attributes[0]?['<span style="font-size: '+~~t.attributes[0]+'pt">',"</span>"]:[null,null]},_convertUrl:function(e,t,i){return t.attributes.length?['<a href="'+n.escapeHTML(t.attributes[0])+'">',"</a>"]:[null,null]}};return h}),define("WoltLab/WCF/Controller/Clipboard",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/SimpleDropdown","WoltLab/WCF/Ui/Page/Action"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";var p=new i,f=new i,m=new i,g=elByClass("jsClipboardContainer"),v=new o,b=new r,_={},y=null,w=null,C=null;return{setup:function(e){if(y=this._mark.bind(this),w=this._executeAction.bind(this),C=this._unmarkAll.bind(this),_=t.extend({hasMarkedItems:!1,pageClassName:"",pageObjectId:0},e),!_.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");this._initContainers(),_.hasMarkedItems&&g.length&&this._loadMarkedItems(),s.add("WoltLab/WCF/Controller/Clipboard",this._initContainers.bind(this))},reload:function(){p.size&&this._loadMarkedItems()},_initContainers:function(){for(var e=0,t=g.length;t>e;e++){var i=g[e],n=c.identify(i),a=p.get(n);if(void 0===a){var o=elBySel(".jsClipboardMarkAll",i);null!==o&&(elData(o,"container-id",n),o.addEventListener("click",this._markAll.bind(this))),a={checkboxes:elByClass("jsClipboardItem",i),element:i,markAll:o,markedObjectIds:new r},p.set(n,a)}for(var s=0,l=a.checkboxes.length;l>s;s++){var d=a.checkboxes[s];b.has(d)||(elData(d,"container-id",n),d.addEventListener("click",y),b.add(d))}}},_loadMarkedItems:function(){e.api(this,{actionName:"getMarkedItems",parameters:{pageClassName:_.pageClassName,pageObjectID:_.pageObjectId}})},_markAll:function(e){for(var t=e.currentTarget,i="INPUT"!==t.nodeName||t.checked,n=[],a=elData(t,"container-id"),r=p.get(a),o=elData(r.element,"type"),s=0,c=r.checkboxes.length;c>s;s++){var d=r.checkboxes[s],u=~~elData(d,"object-id");i?d.checked||(d.checked=!0,r.markedObjectIds.add(u),n.push(u)):d.checked&&(d.checked=!1,r.markedObjectIds["delete"](u),n.push(u));var h=l.parentByClass(t,"jsClipboardObject");null!==h&&h.classList[i?"addClass":"removeClass"]("jsMarked")}this._saveState(o,n,i)},_mark:function(e){var t=e.currentTarget,i=~~elData(t,"object-id"),n=t.checked,a=elData(t,"container-id"),r=p.get(a),o=elData(r.element,"type"),s=l.parentByClass(t,"jsClipboardObject");if(r.markedObjectIds[n?"add":"delete"](i),s.classList[n?"add":"remove"]("jsMarked"),null!==r.markAll){for(var c=!0,d=0,u=r.checkboxes.length;u>d;d++)if(!r.checkboxes[d].checked){c=!1;break}r.markAll.checked=c}this._saveState(o,[i],n)},_saveState:function(t,i,n){e.api(this,{actionName:n?"mark":"unmark",parameters:{pageClassName:_.pageClassName,pageObjectID:_.pageObjectId,objectIDs:i,objectType:t}})},_executeAction:function(e){var t=e.currentTarget,i=v.get(t);if(i.url)return void(window.location.href=i.url);var a=function(){var e=elData(t,"type");n.fire("com.woltlab.wcf.clipboard",e,{data:i,listItem:t,responseData:null})},r="string"==typeof i.internalData.confirmMessage?i.internalData.confirmMessage:"",o=!0;if("object"==typeof i.parameters&&i.parameters.actionName&&i.parameters.className){if("unmarkAll"===i.parameters.actionName||Array.isArray(i.parameters.objectIDs))if(r.length){var s="string"==typeof i.internalData.template?i.internalData.template:"";d.show({confirm:function(){var e={};if(s.length)for(var n=elBySelAll("input, select, textarea",d.getContentElement()),a=0,r=n.length;r>a;a++){var o=n[a],l=elAttr(o,"name");switch(o.nodeName){case"INPUT":o.checked&&(e[l]=elAttr(o,"value"));break;case"SELECT":e[l]=o.value;break;case"TEXTAREA":e[l]=o.value.trim()}}this._executeProxyAction(t,i,e)}.bind(this),message:r,template:s})}else this._executeProxyAction(t,i)}else r.length&&(o=!1,d.show({confirm:a,message:r}));o&&a()},_executeProxyAction:function(t,i,a){a=a||{};var r="unmarkAll"!==i.parameters.actionName?i.parameters.objectIDs:[],o={data:a};if("object"==typeof i.internalData.parameters)for(var s in i.internalData.parameters)objOwns(i.internalData.parameters,s)&&(o[s]=i.internalData.parameters[s]);e.api(this,{actionName:i.parameters.actionName,className:i.parameters.className,objectIDs:r,parameters:o},function(e){if("unmarkAll"!==i.actionName){var a=elData(t,"type");n.fire("com.woltlab.wcf.clipboard",a,{data:i,listItem:t,responseData:e})}this._loadMarkedItems()}.bind(this))},_unmarkAll:function(t){var i=elData(t.currentTarget,"type");e.api(this,{actionName:"unmarkAll",parameters:{objectType:i}})},_ajaxSetup:function(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}},_ajaxSuccess:function(e){if("unmarkAll"===e.actionName)return void p.forEach(function(t){if(elData(t.element,"type")===e.returnValues.objectType){for(var i=elByClass("jsMarked",t.element);i.length;)i[0].classList.remove("jsMarked");null!==t.markAll&&(t.markAll.checked=!1);for(var n=0,a=t.checkboxes.length;a>n;n++)t.checkboxes[n].checked=!1;h.remove("wcfClipboard-"+e.returnValues.objectType)}}.bind(this));v=new o,p.forEach(function(t){var i=elData(t.element,"type"),n=e.returnValues.markedItems&&objOwns(e.returnValues.markedItems,i)?e.returnValues.markedItems[i]:[];this._rebuildMarkings(t,n)}.bind(this));var t,i=[];if(e.returnValues&&e.returnValues.items)for(t in e.returnValues.items)objOwns(e.returnValues.items,t)&&i.push(t);if(f.forEach(function(e,t){-1===i.indexOf(t)&&(h.remove("wcfClipboard-"+t),m.get(t).innerHTML="")}),e.returnValues&&e.returnValues.items){var n,r,s,l,c,d,g,b,_,y;for(t in e.returnValues.items)if(objOwns(e.returnValues.items,t)){l=e.returnValues.items[t],n=!1,s=f.get(t),r=m.get(t),void 0===s?(n=!0,s=elCreate("a"),s.className="dropdownToggle",s.textContent=l.label,f.set(t,s),r=elCreate("ol"),r.className="dropdownMenu",m.set(t,r)):(s.textContent=l.label,r.innerHTML="");for(b in l.items)objOwns(l.items,b)&&(g=l.items[b],d=elCreate("li"),_=elCreate("span"),_.textContent=g.label,d.appendChild(_),r.appendChild(d),elData(d,"type",t),d.addEventListener("click",w),v.set(d,g));c=elCreate("li"),c.classList.add("dropdownDivider"),r.appendChild(c),y=elCreate("li"),elData(y,"type",t),_=elCreate("span"),_.textContent=a.get("wcf.clipboard.item.unmarkAll"),y.appendChild(_),y.addEventListener("click",C),r.appendChild(y),-1!==i.indexOf(t)&&h.add("wcfClipboard-"+t,s),n&&(s.parentNode.classList.add("dropdown"),s.parentNode.appendChild(r),u.init(s))}}},_rebuildMarkings:function(e,t){for(var i=!0,n=0,a=e.checkboxes.length;a>n;n++){var r=e.checkboxes[n],o=l.parentByClass(r,"jsClipboardObject"),s=-1!==t.indexOf(~~elData(r,"object-id"));s||(i=!1),r.checked=s,o.classList[s?"add":"remove"]("jsMarked")}null!==e.markAll&&(e.markAll.checked=i)}}}),define("WoltLab/WCF/Event/Key",[],function(){"use strict";function e(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}return{ArrowDown:function(t){return e(t,"ArrowDown",40)},ArrowLeft:function(t){return e(t,"ArrowLeft",37)},ArrowRight:function(t){return e(t,"ArrowRight",39)},ArrowUp:function(t){return e(t,"ArrowUp",38)},Enter:function(t){return e(t,"Enter",13)},Escape:function(t){return e(t,"Escape",27)}}}),define("WoltLab/WCF/File/Util",[],function(){var e={getIconClassByMimeType:function(e){if("image/"==e.substr(0,6))return"fa-file-image-o";if("video/"==e.substr(0,6))return"fa-file-video-o";if("audio/"==e.substr(0,6))return"fa-file-sound-o";if("text/"==e.substr(0,5))return"fa-file-text-o";switch(e){case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return"fa-file-word-o";case"application/pdf":return"fa-file-pdf-o";case"application/vnd.ms-powerpoint":case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return"fa-file-powerpoint-o";case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return"fa-file-excel-o";case"application/zip":case"application/x-tar":case"application/x-gzip":return"fa-file-archive-o";case"application/xml":return"fa-file-text-o"}return"fa-file-o"}};return e}),define("WoltLab/WCF/Language/Chooser",["Dictionary","Language","Dom/Traverse","Dom/Util","ObjectMap","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o=new e,s=!1,l=new a,c=null;return{init:function(e,t,i,n,a,r){if(!o.has(t)){var s=elById(e);if(null===s)throw new Error("Expected a valid container id, cannot find '"+t+"'.");var l=elById(t);null===l&&(l=elCreate("input"),elAttr(l,"type","hidden"),elAttr(l,"id",t),elAttr(l,"name",t),elAttr(l,"value",i),s.appendChild(l)),this._initElement(t,l,i,n,a,r)}},_setup:function(){s||(s=!0,c=this._submit.bind(this))},_initElement:function(e,n,a,s,d,u){var h;"DD"===n.parentNode.nodeName?(h=elCreate("div"),h.className="dropdown",n.parentNode.insertBefore(h,n)):(h=n.parentNode,h.classList.add("dropdown")),elHide(n);var p=elCreate("a");p.className="dropdownToggle boxFlag box24 inputPrefix"+("DD"===n.parentNode.nodeName?" button":""),h.appendChild(p);var f=elCreate("ul");f.className="dropdownMenu",h.appendChild(f);var m,g,v,b,_,y=function(t){var n=~~elData(t.currentTarget,"language-id"),a=i.childByClass(f,"active");null!==a&&a.classList.remove("active"),n&&t.currentTarget.classList.add("active"),this._select(e,n,t.currentTarget)}.bind(this);for(var w in s)if(objOwns(s,w)){var C=s[w];_=elCreate("li"),_.className="boxFlag",_.addEventListener("click",y),elData(_,"language-id",w),f.appendChild(_),m=elCreate("a"),m.className="box24",_.appendChild(m),g=elCreate("div"),m.appendChild(g),b=elCreate("img"),elAttr(b,"src",C.iconPath),elAttr(b,"alt",""),b.className="iconFlag",g.appendChild(b),g=elCreate("div"),m.appendChild(g),v=elCreate("h3"),v.textContent=C.languageName,g.appendChild(v),w==a&&(p.innerHTML=_.firstChild.innerHTML)}if(u)_=elCreate("li"),_.className="dropdownDivider",f.appendChild(_),_=elCreate("li"),elData(_,"language-id",w),_.addEventListener("click",y),f.appendChild(_),m=elCreate("a"),m.textContent=t.get("wcf.global.language.noSelection"),_.appendChild(m),0===a&&(p.innerHTML=_.firstChild.innerHTML),_.addEventListener("click",y);else if(0===a){p.innerHTML=null,g=elCreate("div"),p.appendChild(g);var L=elCreate("span");L.className="icon icon24 fa-question",g.appendChild(L),g=elCreate("div"),p.appendChild(g),v=elCreate("h3"),v.textContent=t.get("wcf.global.language.noSelection"),g.appendChild(v)}r.init(p),o.set(e,{callback:d,dropdownMenu:f,dropdownToggle:p,element:n});var E=i.parentByTag(n,"FORM");if(null!==E){E.addEventListener("submit",c);var x=l.get(E);void 0===x&&(x=[],l.set(E,x)),x.push(e)}},_select:function(e,t,i){var n=o.get(e);if(void 0===i){for(var a=n.dropdownMenu.childNodes,r=0,s=a.length;s>r;r++){var l=a[r];if(~~elData(l,"language-id")===t){i=l;break}}if(void 0===i)throw new Error("Cannot select unknown language id '"+t+"'")}n.element.value=t,n.dropdownToggle.innerHTML=i.firstChild.innerHTML,o.set(e,n),"function"==typeof n.callback&&n.callback(i)},_submit:function(e){for(var t,i=l.get(e.currentTarget),n=0,a=i.length;a>n;n++)t=elCreate("input"),t.type="hidden",t.name=i[n],t.value=this.getLanguageId(i[n]),e.currentTarget.appendChild(t)},getChooser:function(e){var t=o.get(e);if(void 0===t)throw new Error("Expected a valid language chooser input element, '"+e+"' is not i18n input field.");return t},getLanguageId:function(e){return~~this.getChooser(e).element.value},setLanguageId:function(e,t){if(void 0===o.get(e))throw new Error("Expected a valid  input element, '"+e+"' is not i18n input field.");this._select(e,t)}}}),define("WoltLab/WCF/Language/Input",["Core","Dictionary","Language","ObjectMap","StringUtil","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o,s){"use strict";var l=new t,c=!1,d=new n,u=new t,h=null,p=null,f={init:function(e,i,n,r){if(!u.has(e)){var o=elById(e);if(null===o)throw new Error("Expected a valid element id, cannot find '"+e+"'.");this._setup();var s=new t;for(var l in i)objOwns(i,l)&&s.set(~~l,a.unescapeHTML(i[l]));u.set(e,s),this._initElement(e,o,s,n,r)}},_setup:function(){c||(c=!0,h=this._dropdownToggle.bind(this),p=this._submit.bind(this))},_initElement:function(e,t,n,a,c){var u=t.parentNode;u.classList.contains("inputAddon")||(u=elCreate("div"),u.className="inputAddon"+("TEXTAREA"===t.nodeName?" inputAddonTextarea":""),elData(u,"input-id",e),t.parentNode.insertBefore(u,t),u.appendChild(t)),u.classList.add("dropdown");var f=elCreate("span");f.className="button dropdownToggle inputPrefix";var m=elCreate("span");m.textContent=i.get("wcf.global.button.disabledI18n"),f.appendChild(m),u.insertBefore(f,t);var g=elCreate("ul");g.className="dropdownMenu",o.insertAfter(g,f);var v=function(t,i){var n=~~elData(t.currentTarget,"language-id"),a=r.childByClass(g,"active");null!==a&&a.classList.remove("active"),n&&t.currentTarget.classList.add("active"),this._select(e,n,i||!1)}.bind(this);for(var b in a)if(objOwns(a,b)){var _=elCreate("li");elData(_,"language-id",b),m=elCreate("span"),m.textContent=a[b],_.appendChild(m),_.addEventListener("click",v),g.appendChild(_)}if(c!==!0){var _=elCreate("li");_.className="dropdownDivider",g.appendChild(_),_=elCreate("li"),elData(_,"language-id",0),m=elCreate("span"),m.textContent=i.get("wcf.global.button.disabledI18n"),_.appendChild(m),_.addEventListener("click",v),g.appendChild(_)}var y=null;if(c===!0||n.size)for(var w=0,C=g.childElementCount;C>w;w++)if(~~elData(g.children[w],"language-id")===LANGUAGE_ID){y=g.children[w];break}s.init(f),s.registerCallback(u.id,h),l.set(e,{buttonLabel:f.children[0],element:t,languageId:0,isEnabled:!0,forceSelection:c});var L=r.parentByTag(t,"FORM");if(null!==L){L.addEventListener("submit",p);var E=d.get(L);void 0===E&&(E=[],d.set(L,E)),E.push(e)}null!==y&&v({currentTarget:y},!0)},_select:function(e,i,n){for(var a,r=l.get(e),o=s.getDropdownMenu(r.element.parentNode.id),c="",d=0,h=o.childElementCount;h>d;d++){a=o.children[d];var p=elData(a,"language-id");p.length&&i===~~p&&(c=a.children[0].textContent)}if(r.languageId!==i){var f=u.get(e);r.languageId&&f.set(r.languageId,r.element.value),0===i?u.set(e,new t):(r.buttonLabel.classList.contains("active")||n===!0)&&(r.element.value=f.has(i)?f.get(i):""),r.buttonLabel.textContent=c,r.buttonLabel.classList[i?"add":"remove"]("active"),r.languageId=i}r.element.blur(),r.element.focus()},_dropdownToggle:function(e,t){if("open"===t)for(var i,n,a=s.getDropdownMenu(e),r=elData(elById(e),"input-id"),o=u.get(r),l=0,c=a.childElementCount;c>l;l++)i=a.children[l],n=~~elData(i,"language-id"),n&&i.classList[o.has(n)||!o.size?"remove":"add"]("missingValue")},_submit:function(e){for(var t,i,n,a,r=d.get(e.currentTarget),o=0,s=r.length;s>o;o++)i=r[o],t=l.get(i),t.isEnabled&&(a=u.get(i),t.languageId&&a.set(t.languageId,t.element.value),a.size&&(a.forEach(function(t,a){n=elCreate("input"),n.type="hidden",n.name=i+"_i18n["+a+"]",n.value=t,e.currentTarget.appendChild(n)}),t.element.removeAttribute("name")))},getValues:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");var i=u.get(e);return i.set(t.languageId,t.element.value),i},setValues:function(i,n){var a=l.get(i);if(void 0===a)throw new Error("Expected a valid i18n input element, '"+i+"' is not i18n input field.");e.isPlainObject(n)&&(n=t.fromObject(n)),a.element.value="",n.has(0)&&(a.element.value=n.get(0),n["delete"](0)),u.set(i,n),a.languageId=0,this._select(i,LANGUAGE_ID,!0)},disable:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(t.isEnabled){t.isEnabled=!1,elHide(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.remove("inputAddon"),i.classList.remove("dropdown")}},enable:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(!t.isEnabled){t.isEnabled=!0,elShow(t.buttonLabel.parentNode);var i=t.buttonLabel.parentNode.parentNode;i.classList.add("inputAddon"),i.classList.add("dropdown")}},isEnabled:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");return t.isEnabled},validate:function(e,t){var i=l.get(e);if(void 0===i)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(!i.isEnabled)return!0;var n=u.get(e),a=s.getDropdownMenu(i.element.parentNode.id);
 i.languageId&&n.set(i.languageId,i.element.value);for(var r,o,c=!1,d=!1,h=0,p=a.childElementCount;p>h;h++)if(r=a.children[h],o=~~elData(r,"language-id"))if(n.has(o)&&0!==n.get(o).length){if(c)return!1;d=!0}else{if(d)return!1;c=!0}return c&&!t?!1:!0}};return f}),define("WoltLab/WCF/Ui/Notification",["Language"],function(e){"use strict";var t=!1,i=null,n=null,a=null,r=null,o=null,s={show:function(s,l,c){t||(this._init(),i="function"==typeof l?l:null,n.className=c||"success",n.textContent=e.get(s||"wcf.global.success"),t=!0,a.classList.add("active"),r=setTimeout(o,2e3))},_init:function(){null===a&&(o=this._hide.bind(this),a=elCreate("div"),a.id="systemNotification",n=elCreate("p"),n.addEventListener("click",o),a.appendChild(n),document.body.appendChild(a))},_hide:function(){clearTimeout(r),a.classList.remove("active"),null!==i&&i(),t=!1}};return s}),define("WoltLab/WCF/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Language","Ui/Dialog","Ui/Notification","WoltLab/WCF/Language/Chooser","WoltLab/WCF/Language/Input","WoltLab/WCF/File/Util"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";function u(e){if("object"!=typeof e)throw new TypeError("Parameter 'callbackObject' has to be an object, "+typeof e+" given.");if("function"!=typeof e._editorClose)throw new TypeError("Callback object has no function '_editorClose'.");if("function"!=typeof e._editorSuccess)throw new TypeError("Callback object has no function '_editorSuccess'.");this._callbackObject=e,this._media=null,this._elements={}}return u.prototype={_ajaxSetup:function(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}},_ajaxSuccess:function(e){s.show(),this._callbackObject._editorSuccess(this._media),o.close("mediaEditor"),this._media=null},_close:function(){this._media=null,this._callbackObject._editorClose()},_dialogSetup:function(){return{id:"mediaEditor",options:{backdropCloseOnClick:!1,onClose:this._close.bind(this),title:r.get("wcf.media.edit")},source:{after:function(e,t){var i=o.getDialog("mediaEditor").content;this._elements.thumbnail=elById("mediaThumbnail"),this._elements.filename=elById("mediaFilename"),this._elements.filesize=elById("mediaFilesize"),this._elements.imageDimensions=elById("mediaImageDimensions"),this._elements.fileIcon=elById("mediaFileIcon"),this._elements.uploader=elById("mediaUploader"),this._elements.altText=elById("altText"),this._elements.caption=elById("caption"),this._elements.isMultilingual=elById("isMultilingual"),this._elements.isMultilingual.addEventListener("change",this._updateLanguageFields.bind(this)),this._elements.title=elById("title"),this._elements.languageIdContainer=elById("languageIDContainer");var n=this._keyPress.bind(this);this._elements.altText.addEventListener("keypress",n),this._elements.title.addEventListener("keypress",n),setTimeout(this._setData.bind(this),100),elBySel('button[data-type="submit"]',i).addEventListener("click",this._saveData.bind(this))}.bind(this),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction"}}}},_keyPress:function(e){13===e.charCode&&(e.preventDefault(),this._saveData())},_saveData:function(){var t=!1,i=a.childByClass(this._elements.altText.parentNode.parentNode,"innerError"),n=a.childByClass(this._elements.caption.parentNode.parentNode,"innerError"),o=a.childByClass(this._elements.title.parentNode.parentNode,"innerError");if(this._media.isMultilingual=~~this._elements.isMultilingual.checked,this._media.languageID=this._media.isMultilingual?null:l.getLanguageId("languageID"),this._media.altText={},this._media.caption={},this._media.title={},this._media.isMultilingual){if(!c.validate("altText",!0)&&(t=!0,!i)){var s=elCreate("small");s.className="innerError",s.textContent=r.get("wcf.global.form.error.multilingual"),this._elements.altText.parentNode.parentNode.appendChild(s)}if(!c.validate("caption",!0)&&(t=!0,!n)){var s=elCreate("small");s.className="innerError",s.textContent=r.get("wcf.global.form.error.multilingual"),this._elements.caption.parentNode.parentNode.appendChild(s)}if(!c.validate("title",!0)&&(t=!0,!o)){var s=elCreate("small");s.className="innerError",s.textContent=r.get("wcf.global.form.error.multilingual"),this._elements.title.parentNode.parentNode.appendChild(s)}this._media.altText=c.getValues("altText").toObject(),this._media.caption=c.getValues("caption").toObject(),this._media.title=c.getValues("title").toObject()}else this._media.altText[this._media.languageID]=this._elements.altText.value,this._media.caption[this._media.languageID]=this._elements.caption.value,this._media.title[this._media.languageID]=this._elements.title.value;t||(i&&elRemove(i),n&&elRemove(n),o&&elRemove(o),e.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{altText:this._media.altText,caption:this._media.caption,data:{isMultilingual:this._media.isMultilingual,languageID:this._media.languageID},title:this._media.title}}))},_setData:function(){if(this._elements.thumbnail.innerHTML="",this._elements.filename.textContent=this._media.filename,this._elements.filesize.textContent=this._media.formattedFilesize,this._elements.uploader.innerHTML="",this._media.userLink){var e=elCreate("a");e.className="userLink",elAttr(e,"href",this._media.userLink),elData(e,"user-id",this._media.userID),e.textContent=this._media.username,this._elements.uploader.appendChild(e)}else this._elements.uploader.textContent=this._media.username;if(this._media.isImage){if(this._media.smallThumbnailLink){var t=elCreate("img");elAttr(t,"src",this._media.smallThumbnailLink),elAttr(t,"alt",""),this._elements.thumbnail.appendChild(t)}this._elements.imageDimensions.textContent=r.get("wcf.media.imageDimensions.value",{height:this._media.height,width:this._media.width}),elShow(this._elements.imageDimensions),elShow(this._elements.imageDimensions.previousElementSibling),this._elements.fileIcon.className="icon icon48 fa-file-image-o"}else elHide(this._elements.imageDimensions),elHide(this._elements.imageDimensions.previousElementSibling),this._elements.fileIcon.className="icon icon48 "+d.getIconClassByMimeType(this._media.fileType);this._elements.isMultilingual.checked=this._media.isMultilingual,l.setLanguageId("languageID",this._media.languageID||LANGUAGE_ID),this._media.isMultilingual?(c.setValues("altText",i.fromObject(this._media.altText||{})),c.setValues("caption",i.fromObject(this._media.caption||{})),c.setValues("title",i.fromObject(this._media.title||{}))):(this._elements.altText.value=this._media.altText?this._media.altText[this._media.languageID]:"",this._elements.caption.value=this._media.caption?this._media.caption[this._media.languageID]:"",this._elements.title.value=this._media.title?this._media.title[this._media.languageID]:""),this._updateLanguageFields(),n.trigger()},_updateLanguageFields:function(){this._elements.isMultilingual.checked?(c.enable("title"),c.enable("caption"),c.enable("altText"),elHide(this._elements.languageIdContainer.parentNode)):(c.disable("title"),c.disable("caption"),c.disable("altText"),elShow(this._elements.languageIdContainer.parentNode))},edit:function(e){if(null!==this._media)throw new Error("Cannot edit media with id '"+e.mediaID+"' while editing media with id '"+this._media.mediaID+"'");this._media=e,void 0!==o.getDialog("mediaEditor")&&this._setData(),o.open(this)}},u}),define("WoltLab/WCF/Media/Search",["Ajax","Dom/Traverse","Dom/Util","Language","Ui/SimpleDropdown"],function(e,t,i,n,a){"use strict";function r(e){this._fileType="all";var i=a.getDropdownMenu(this._getIdPrefix()+"Search");if(i){this._fileTypes=t.childrenBySel(i,"li:not(.dropdownDivider)");for(var n=this._selectFileType.bind(this),r=0,o=this._fileTypes.length;o>r;r++){var s=this._fileTypes[r];e&&elData(s,"file-type")==e&&(this._fileType=e),this._fileTypes[r].addEventListener("click",n)}e&&e.length&&this._updateDropdownButtonLabel(),a.registerCallback(this._getIdPrefix()+"Search",this._updateFileTypeDropdown.bind(this));var l=t.parentByTag(elById(this._getIdPrefix()+"Search"),"FORM");l&&l.addEventListener("submit",function(){var e=elCreate("input");elAttr(e,"type","hidden"),elAttr(e,"name","fileType"),elAttr(e,"value",this._fileType),l.appendChild(e)}.bind(this))}else this._fileType=null}return r.prototype={_getIdPrefix:function(){return"media"},_selectFileType:function(e){this._fileType=elData(e.currentTarget,"file-type"),this._updateDropdownButtonLabel(e)},_updateDropdownButtonLabel:function(e){var i=a.getDropdown(this._getIdPrefix()+"Search"),r=t.childBySel(t.childByClass(i,"dropdownToggle"),"SPAN");if("all"!==this._fileType){var o;if(e)o=e.currentTarget;else for(var s=0,l=this._fileTypes.length;l>s;s++){var c=this._fileTypes[s];if(elData(c,"file-type")==this._fileType){o=c;break}}r.textContent=t.childBySel(o,"SPAN").textContent}else r.textContent=n.get("wcf.media.search.filetype")},_updateFileTypeDropdown:function(){for(var e=0,t=this._fileTypes.length;t>e;e++){var i=this._fileTypes[e];i.classList[elData(i,"file-type")===this._fileType?"add":"remove"]("active")}}},r}),define("WoltLab/WCF/Media/Upload",["Core","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload","WoltLab/WCF/File/Util"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(t,i,n){n=n||{},this._mediaManager=null,n.mediaManager&&(this._mediaManager=n.mediaManager,delete n.mediaManager),s.call(this,t,i,e.extend({className:"wcf\\data\\media\\MediaAction",multiple:this._mediaManager?!0:!1,singleFileRequests:!0},n))}return e.inherit(c,s,{_createFileElement:function(e){var i;i="OL"===this._target.nodeName||"UL"===this._target.nodeName?elCreate("li"):elCreate("p");var a=elCreate("div");a.className="mediaThumbnail",i.appendChild(a);var r=elCreate("span");r.className="icon icon144 fa-spinner",a.appendChild(r);var o=elCreate("div");o.className="mediaInformation",i.appendChild(o);var s=elCreate("p");s.className="mediaTitle",s.textContent=e.name,o.appendChild(s);var l=elCreate("progress");return elAttr(l,"max",100),o.appendChild(l),n.prepend(i,this._target),t.trigger(),i},_getParameters:function(){return this._mediaManager?e.extend(c._super.prototype._getParameters.call(this),{fileTypeFilters:this._mediaManager.getOption("fileTypeFilters")}):c._super.prototype._getParameters.call(this)},_success:function(e,n){for(var o=this._fileElements[e],s=0,c=o.length;c>s;s++){var d=o[s],u=elData(d,"internal-file-id"),h=n.returnValues.media[u];if(elRemove(i.childByTag(i.childByClass(d,"mediaInformation"),"PROGRESS")),h){var p=i.childByTag(i.childByClass(d,"mediaThumbnail"),"SPAN");if(h.tinyThumbnailType){var f=p.parentNode;elRemove(p);var m=elCreate("img");elAttr(m,"src",h.tinyThumbnailLink),elAttr(m,"alt",""),m.style.setProperty("width","144px"),m.style.setProperty("height","144px"),f.appendChild(m)}else p.classList.remove("fa-spinner"),p.classList.add(l.getIconClassByMimeType(h.fileType));d.className="jsClipboardObject",elData(d,"object-id",h.mediaID),this._mediaManager&&(this._mediaManager.setupMediaElement(h,d),this._mediaManager.resetMedia(),this._mediaManager.addMedia(h,d))}else{var g=n.returnValues.errors[u];g||(g={errorType:"uploadFailed",filename:elData(d,"filename")});var p=i.childByTag(i.childByClass(d,"mediaThumbnail"),"SPAN");p.classList.remove("fa-spinner"),p.classList.add("fa-remove"),p.classList.add("pointer"),d.classList.add("uploadFailed"),d.addEventListener("click",function(){elRemove(this)});var v=i.childByClass(i.childByClass(d,"mediaInformation"),"mediaTitle");v.innerText=r.get("wcf.media.upload.error."+g.errorType,{filename:g.filename})}t.trigger()}a.fire("com.woltlab.wcf.media.upload","success",{files:o,media:n.returnValues.media,upload:this})}}),c}),define("WoltLab/WCF/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,i){"use strict";function n(e,t){this.init(e,t)}return n.prototype={init:function(e,i){if(this._dropdownMenu=null,this._value="",this._element=elById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],treshold:3},i),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener("click",function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keyDown:function(e){if(null===this._dropdownMenu||!i.isOpen(this._element.id))return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,n=0,a=this._dropdownMenu.childElementCount;a>n&&(t=this._dropdownMenu.children[n],!t.classList.contains("active"));)n++;if(13===e.keyCode)i.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!i.isOpen(this._element.id))return!0;i.close(this._element.id)}else{var r=0;38===e.keyCode?r=(0===n?a:n)-1:40===e.keyCode&&(r=n+1,r===a&&(r=0)),r!==n&&(t.classList.remove("active"),this._dropdownMenu.children[r].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode),this._options.callbackSelect(this._element.id,{objectId:elData(e.children[0],"object-id"),value:e.textContent}),t&&this._element.focus()},_keyUp:function(t){var n=t.currentTarget.value.trim();if(this._value!==n){if(n.length<this._options.treshold)return null!==this._dropdownMenu&&i.close(this._element.id),void(this._value=n);this._value=n,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:n}}})}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=elCreate("div"),this._dropdownMenu.className="dropdownMenu",i.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,n,a,r=0,o=e.returnValues.length;o>r;r++)n=e.returnValues[r],t=elCreate("a"),t.textContent=n.label,elData(t,"object-id",n.objectID),t.addEventListener("click",this._select.bind(this)),a=elCreate("li"),0===r&&(a.className="active"),a.appendChild(t),this._dropdownMenu.appendChild(a);i.open(this._element.id)}else i.close(this._element.id)}},n}),define("WoltLab/WCF/Ui/ItemList",["Core","Dictionary","Language","Dom/Traverse","WoltLab/WCF/Ui/Suggestion"],function(e,t,i,n,a){"use strict";var r="",o=new t,s=!1,l=null,c=null,d=null,u=null,h={init:function(t,i,r){var s=elById(t);if(null===s)throw new Error("Expected a valid element id.");r=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},r);var l=n.parentByTag(s,"FORM");if(null!==l&&r.isCSV===!1){if(!r.submitFieldName.length&&"function"!=typeof r.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");l.addEventListener("submit",function(){var e=this.getValues(t);if(r.submitFieldName.length)for(var i,n=0,a=e.length;a>n;n++)i=elCreate("input"),i.type="hidden",i.name=r.submitFieldName.replace(/{$objectId}/,e[n].objectId),i.value=e[n].value,l.appendChild(i);else r.callbackSubmit(l,e)}.bind(this))}this._setup();var c=this._createUI(s,r,i),d=new a(t,{ajax:r.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:r.excludedSearchValues});if(o.set(t,{dropdownMenu:null,element:c.element,list:c.list,listItem:c.element.parentNode,options:r,shadow:c.shadow,suggestion:d}),i=c.values.length?c.values:i,Array.isArray(i))for(var u,h=0,p=i.length;p>h;h++)u=i[h],"string"==typeof u&&(u={objectId:0,value:u}),this._addItem(t,u)},getValues:function(e){if(!o.has(e))throw new Error("Element id '"+e+"' is unknown.");for(var t,i,a=o.get(e),r=n.childrenByClass(a.list,"item"),s=[],l=0,c=r.length;c>l;l++)i=r[l],t={objectId:elData(i,"object-id"),value:n.childByTag(i,"SPAN").textContent},s.push(t);return s},_setup:function(){s||(s=!0,l=this._keyDown.bind(this),c=this._keyPress.bind(this),d=this._keyUp.bind(this),u=this._removeItem.bind(this))},_createUI:function(e,t){var i=elCreate("ol");i.className="inputItemList",elData(i,"element-id",e.id),i.addEventListener("click",function(t){t.target===i&&e.focus()});var n=elCreate("li");n.className="input",i.appendChild(n),e.addEventListener("keydown",l),e.addEventListener("keypress",c),e.addEventListener("keyup",d),e.parentNode.insertBefore(i,e),n.appendChild(e),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var a=null,r=[];if(t.isCSV&&(a=elCreate("input"),a.className="itemListInputShadow",a.type="hidden",a.name=e.name,e.removeAttribute("name"),i.parentNode.insertBefore(a,i),"TEXTAREA"===e.nodeName)){for(var o,s=e.value.split(","),u=0,h=s.length;h>u;u++)o=s[u].trim(),o.length&&r.push(o);var p=elCreate("input");e.parentNode.insertBefore(p,e),p.id=e.id,elRemove(e),e=p}return{element:e,list:i,shadow:a,values:r}},_handleLimit:function(e){var t=o.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,elAttr(t.element,"placeholder",i.get("wcf.global.form.input.maxItems"))))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;r=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(13===e.charCode||44===e.charCode){if(e.preventDefault(),o.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=o.get(e),n=elCreate("li");n.className="item";var a=elCreate("span");a.className="content",elData(a,"object-id",t.objectId),a.textContent=t.value;var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener("click",u),n.appendChild(a),n.appendChild(r),i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",this._handleLimit(e);var s=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===s&&(s=this.getValues(e)),i.options.callbackChange(e,s))},_removeItem:function(e,t){t=null===e?t:e.currentTarget.parentNode;var i=t.parentNode,n=elData(i,"element-id"),a=o.get(n);a.suggestion.removeExcludedValue(t.children[0].textContent),i.removeChild(t),a.element.focus(),this._handleLimit(n);var r=this._syncShadow(a);"function"==typeof a.options.callbackChange&&(null===r&&(r=this.getValues(n)),a.options.callbackChange(n,r))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;a>n;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i}};return h}),define("WoltLab/WCF/Ui/Page/JumpTo",["Language","ObjectMap","Ui/Dialog"],function(e,t,i){"use strict";var n=null,a=null,r=null,o=new t,s=null,l={init:function(e,t){if(t=t||null,null===t){var i=elData(e,"link");t=i?function(e){window.location=i.replace(/pageNo=%d/,"pageNo="+e)}:function(){}}else if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.");if(!o.has(e)){var n=elBySel(".jumpTo",e);null!==n&&(n.addEventListener("click",this._click.bind(this,e)),o.set(e,{callback:t}))}},_click:function(t,a){n=t,"object"==typeof a&&a.preventDefault(),i.open(this);var o=elData(t,"pages");s.value=o,s.setAttribute("max",o),r.textContent=e.get("wcf.global.page.jumpTo.description").replace(/#pages#/,o)},_keyUp:function(e){if(13===e.which&&a.disabled===!1)return void this._submit();var t=~~s.value;1>t||t>~~elAttr(s,"max")?a.disabled=!0:a.disabled=!1},_submit:function(e){o.get(n).callback(~~s.value),i.close(this)},_dialogSetup:function(){var t='<dl><dt><label for="jsPaginationPageNo">'+e.get("wcf.global.page.jumpTo")+'</label></dt><dd><input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny"><small></small></dd></dl><div class="formSubmit"><button class="buttonPrimary">'+e.get("wcf.global.button.submit")+"</button></div>";return{id:"paginationOverlay",options:{onSetup:function(e){s=elByTag("input",e)[0],s.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],a=elByTag("button",e)[0],a.addEventListener("click",this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}};return l}),define("WoltLab/WCF/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLab/WCF/Ui/Page/JumpTo"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,i){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},i),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._element.classList.add("small"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var i,n=elCreate("ul"),r=elCreate("li");r.className="skip",n.appendChild(r);var o="icon icon16 fa-angle-double-left";this._options.activePage>1?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.previous"),r.appendChild(i),i.addEventListener("click",this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='<span class="'+o+'"></span>',r.classList.add("disabled")),n.appendChild(this._createLink(1,this._options));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;0>l&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);0>c&&(c=0),this._options.activePage>1&&this._options.activePage<this._options.maxPage&&s--;var d=s/2,u=this._options.activePage,h=this._options.activePage;1>u&&(u=1),1>h&&(h=1),h>this._options.maxPage-1&&(h=this._options.maxPage-1),l>=d?u-=d:(u-=l,h+=d-l),c>=d?h+=d:(h+=c,u-=d-c),h=Math.ceil(h),u=Math.ceil(u),1>u&&(u=1),h>this._options.maxPage&&(h=this._options.maxPage);var p='<a class="jsTooltip" title="'+t.get("wcf.global.page.jumpTo")+'">&hellip;</a>';if(u>1)if(2>u-1)n.appendChild(this._createLink(2,this._options));else{var r=elCreate("li");r.className="jumpTo",r.innerHTML=p,n.appendChild(r),e=!0}for(var f=u+1;h>f;f++)n.appendChild(this._createLink(f,this._options));if(h<this._options.maxPage)if(this._options.maxPage-h<2)n.appendChild(this._createLink(this._options.maxPage-1,this._options));else{var r=elCreate("li");r.className="jumpTo",r.innerHTML=p,n.appendChild(r),e=!0}n.appendChild(this._createLink(this._options.maxPage,this._options)),r=elCreate("li"),r.className="skip",n.appendChild(r),o="icon icon16 fa-angle-double-right",this._options.activePage<this._options.maxPage?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.next"),r.appendChild(i),i.addEventListener("click",this.switchPage.bind(this,this._options.activePage+1))):(r.innerHTML='<span class="'+o+'"></span>',r.classList.add("disabled")),e&&(elData(n,"pages",this._options.maxPage),a.init(n,this.switchPage.bind(this))),this._element.appendChild(n)},_createLink:function(e){var i=elCreate("li");if(e!==this._options.activePage){var a=elCreate("a");a.textContent=n.addThousandsSeparator(e),a.addEventListener("click",this.switchPage.bind(this,e)),i.appendChild(a)}else i.classList.add("active"),i.innerHTML="<span>"+n.addThousandsSeparator(e)+'</span><span class="invisible">'+t.get("wcf.page.pagePosition",{pageNo:e,pages:this._options.maxPage})+"</span>";return i},switchPage:function(e,t){if("object"==typeof t&&t.preventDefault(),e=~~e,e>0&&this._options.activePage!==e&&e<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&this._options.callbackShouldSwitch(e)!==!0)return;this._options.activePage=e,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(e)}}},r}),define("WoltLab/WCF/Ui/Scroll",["Dom/Util"],function(e){"use strict";var t=null,i=null,n=null;return{element:function(n,a){if(!(n instanceof Element))throw new TypeError("Expected a valid DOM element.");if(void 0!==a&&"function"!=typeof a)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(n))throw new Error("Element must be part of the visible DOM.");if(null!==t)throw new Error("Cannot scroll to element, a concurrent request is running.");a&&(t=a,null===i&&(i=this._onScroll.bind(this)),window.addEventListener("scroll",i));var r=e.offset(n).top;50>=r?r=0:r-=50,window.scrollTo({left:0,top:r,behavior:"smooth"})},_onScroll:function(){null!==n&&window.clearTimeout(n),n=window.setTimeout(function(){t(),window.removeEventListener("scroll",i),t=null,n=null},100)}}}),define("WoltLab/WCF/Controller/Notice/Dismiss",["Ajax"],function(e){"use strict";var t={setup:function(){var e=elByClass("jsDismissNoticeButton");if(e.length)for(var t=this._click.bind(this),i=0,n=e.length;n>i;i++)e[i].addEventListener("click",t)},_click:function(t){var i=t.currentTarget;e.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[elData(i,"object-id")]},success:function(){var e=i.parentNode;e.addEventListener("transitionend",function(){elRemove(e)}),e.classList.remove("active")}})}};return t}),define("WoltLab/WCF/Media/Manager/Search",["Ajax","Core","Dom/Traverse","Dom/Util","Language","WoltLab/WCF/Media/Search","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o){"use strict";function s(e){r.call(this),this._mediaManager=e,this._searchMode=!1,this._input=elById(this._getIdPrefix()+"SearchField"),this._input.addEventListener("keypress",this._keyPress.bind(this)),this._cancelButton=elById(this._getIdPrefix()+"SearchCancelButton"),this._cancelButton.addEventListener("click",this._cancelSearch.bind(this))}return t.inherit(s,r,{_ajaxSetup:function(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\media\\MediaAction",interfaceName:"wcf\\data\\ISearchAction"}}},_ajaxSuccess:function(e){this._mediaManager.setMedia(e.returnValues.media||{},e.returnValues.template||"")},_cancelSearch:function(){this._searchMode&&(this._searchMode=!1,this._mediaManager.resetMedia(),this.resetSearch())},_getIdPrefix:function(){return"mediaManager"},_keyPress:function(e){if(13===e.charCode){e.preventDefault();var t=i.childByClass(this._input.parentNode.parentNode,"innerInfo");this._input.value.length>=3?(t&&elHide(t),this._search()):t?elShow(t):(t=elCreate("p"),t.className="innerInfo",t.textContent=a.get("wcf.media.search.info.searchStringTreshold"),n.insertAfter(t,this._input.parentNode))}},_search:function(){this._searchMode=!0,e.api(this,{parameters:{fileType:this._fileType,fileTypeFilters:this._mediaManager.getOption("fileTypeFilters"),mode:this._mediaManager.getMode(),searchString:this._input.value}})},_selectFileType:function(e){s._super.prototype._selectFileType.call(this,e),this._search()},hideSearch:function(){elHide(elById(this._getIdPrefix()+"Search"))},resetSearch:function(){this._input.value="",this._fileType="all",this._updateDropdownButtonLabel()},showSearch:function(){elShow(elById(this._getIdPrefix()+"Search"))}}),s}),define("WoltLab/WCF/Media/Manager/Base",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","List","Permission","Ui/Dialog","Ui/Notification","WoltLab/WCF/Controller/Clipboard","WoltLab/WCF/Media/Editor","WoltLab/WCF/Media/Upload","WoltLab/WCF/Media/Manager/Search"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,p,f){"use strict";function m(n){this._options=e.extend({dialogTitle:o.get("wcf.media.manager"),fileTypeFilters:{}},n),this._media=new t,this._mediaData=new t,this._mediaCache=null,this._mediaManagerMediaList=null,this._search=null,l.get("admin.content.cms.canManageMedia")&&(this._mediaEditor=new h(this)),i.add("WoltLab/WCF/Media/Manager",this._addButtonEventListeners.bind(this))}return m.prototype={_addButtonEventListeners:function(){if(this._mediaManagerMediaList)for(var e=n.childrenByTag(this._mediaManagerMediaList,"LI"),t=0,i=e.length;i>t;t++){var a=e[t];if(l.get("admin.content.cms.canManageMedia")){var r=elByClass("jsMediaEditIcon",a)[0];r&&(r.classList.remove("jsMediaEditIcon"),r.addEventListener("click",this._editMedia.bind(this)))}}},_click:function(e){e.preventDefault(),c.open(this)},_clipboardAction:function(e){if(null!==e.responseData)switch(e.data.actionName){case"com.woltlab.wcf.media.delete":for(var t=e.responseData.objectIDs,i=0,n=t.length;n>i;i++)this.removeMedia(~~t[i],!0);d.show()}},_dialogSetup:function(){return{id:"mediaManager",options:{title:this._options.dialogTitle},source:{after:this._initDialog.bind(this),data:{actionName:"getManagementDialog",className:"wcf\\data\\media\\MediaAction",parameters:{mode:this.getMode(),fileTypeFilters:this._options.fileTypeFilters}}}}},_editMedia:function(e){if(!l.get("admin.content.cms.canManageMedia"))throw new Error("You are not allowed to edit media files.");c.close("mediaManager"),this._mediaEditor.edit(this._mediaData.get(~~elData(e.currentTarget,"object-id")))},_editorClose:function(){c.open(this)},_editorSuccess:function(e){c.open(this),this._mediaData.set(~~e.mediaID,e);var t=this._media.get(~~e.mediaID),i=elByClass("mediaTitle",t)[0];e.isMultilingual?i.textContent=e.title[LANGUAGE_ID]||e.filename:i.textContent=e.title[e.languageID]||e.filename},_initDialog:function(e,t){var i=t.returnValues.media||{};for(var a in i)objOwns(i,a)&&this._mediaData.set(~~a,i[a]);this._mediaManagerMediaList=elById("mediaManagerMediaList");for(var o=n.childrenByTag(this._mediaManagerMediaList,"LI"),s=0,c=o.length;c>s;s++){var d=o[s];this._media.set(~~elData(d,"object-id"),d)}l.get("admin.content.cms.canManageMedia")&&(new p("mediaManagerMediaUploadButton","mediaManagerMediaList",{mediaManager:this}),u.setup({hasMarkedItems:t.returnValues.hasMarkedItems?!0:!1,pageClassName:"menuManagerDialog-"+this.getMode()}),r.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",this._clipboardAction.bind(this))),this._search=new f(this),o.length||this._search.hideSearch()},_setMedia:function(r){e.isPlainObject(r)?this._media=t.fromObject(r):this._media=r;var s=n.nextByClass(this._mediaManagerMediaList,"info");this._media.size?s&&elHide(s):(null===s&&(s=elCreate("p"),s.className="info",s.textContent=o.get("wcf.media.search.noResults")),elShow(s),a.insertAfter(s,this._mediaManagerMediaList));for(var l=n.childrenByTag(this._mediaManagerMediaList,"LI"),c=0,d=l.length;d>c;c++){var h=l[c];this._media.has(elData(h,"object-id"))?elShow(h):elHide(h)}i.trigger(),u.reload()},addMedia:function(e,t){e.languageID||(e.isMultilingual=1),this._mediaData.set(~~e.mediaID,e),this._media.set(~~e.mediaID,t),1===this._media.size&&this._search.showSearch()},getMode:function(){return""},getOption:function(e){return this._options[e]?this._options[e]:null},removeMedia:function(e,t){this._media.has(e)&&(elRemove(this._media.get(e)),this._media["delete"](e),this._mediaData["delete"](e)),t&&this._mediaCache&&this._mediaCache.has(e)&&this._mediaCache["delete"](e)},resetMedia:function(){null!==this._mediaCache&&(this._setMedia(this._mediaCache),this._mediaCache=null,this._search.resetSearch())},setMedia:function(e,t){this._mediaCache||(this._mediaCache=this._media);var i=!1;for(var a in e)objOwns(e,a)&&(i=!0);if(i){var r=elCreate("ul");r.innerHTML=t;for(var o=n.childrenByTag(r,"LI"),s=0,l=o.length;l>s;s++){var c=o[s];