From: WoltLab Date: Thu, 10 Oct 2024 14:31:43 +0000 (+0000) Subject: Updating minified JavaScript files X-Git-Tag: 6.1.0_RC_1~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d18fbdb91e1bddab167e7f617ffd3592aade3c6;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index cb29f0c4db..2c4fc9b707 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -34,7 +34,7 @@ (function (window, undefined) { "use strict";WCF.Message={},WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(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){$(i).find(e._buttonSelector).click($.proxy(e._click,e))}))},_click:function(e){var t,i=$(e.currentTarget);e.preventDefault(),i.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(i.data("confirmMessage"),(function(e){"cancel"!==e&&t._sendRequest(i)}),void 0,void 0,!0)):this._sendRequest(i)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):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).on("beforeunload",(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){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)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),this._ckeditorApi=void 0,require(["WoltLabSuite/Core/Component/Ckeditor"],(e=>{this._ckeditorApi=e}))):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){e.preventDefault();var t=this._getMessage();if(null!==t){if(0===t.trim().length){const e=this._textarea[0].parentElement.querySelector(".innerError");return e&&e.remove(),void elInnerError(this._getCkeditor().element,WCF.Language.get("wcf.global.form.error.empty"))}return 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}console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_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(){const e=this._getCkeditor();return void 0===e?null:e.getHtml()},_getCkeditor(e){return this._ckeditorApi.getCkeditorById(e||this._messageFieldID)},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){var t,i;return null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._previewButton.html(this._previewButtonLabel).enable(),(t=this._textarea.parent().children("small.innerError").empty()).length||(t=$('').appendTo(this._textarea.parent())),i="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage,e.returnValues.realErrorMessage&&(i=e.returnValues.realErrorMessage),t.html(i),!1)}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'
'+e.returnValues.message+"
")}.bind(this))},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&"messageFieldID"!==t&&"previewButtonID"!==t&&(i[t]=this._options[t]);return i},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){var t,i,s,n;for(this._messageFieldID="",this._textarea=null,t="",i=null,s=0,n=this._options.messageFields.length;s'+e.returnValues.message+"")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),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");$('
  • '+this._availableLanguages[0]+"
  • ").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,t,i){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=i||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var i;if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");i=parseInt(RegExp.$1)}else i=parseInt(t.activeTab.tab.data("smileyCategoryID"));i&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[i]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[i])))},_success:function(e,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+s+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:i||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_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({init:function(e,t,i,s,n,a,o){require(["WoltLabSuite/Core/Ui/Message/Quote"],(r=>{new r.default(e,t,i,s,n,a,o)}))}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){const t=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:i})=>{i(t).insertQuote({author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}))}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){var i,s;for(i in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers)this._handlers.hasOwnProperty(i)&&(s=t[i]||[],this._handlers[i].updateFullQuoteObjectIDs(s))},insertQuotes:function(e,t,i){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,i="showQuotes";this._count?(void 0===(t=e.get(i))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(i,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(i)):e.remove(i),this._hasTemplate=!1}.bind(this))},_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){var t,i,s;null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('
    ').hide().appendTo(document.body))),this._dialog.html(e),t=$('
    ').appendTo(this._dialog),this._supportPaste&&(this._buttons.insert=$('").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$('").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,i=this._dialog.find(".jsInsertQuote"),this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(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,i=$(e.currentTarget),s=i.parent("li").attr("data-quote-id");i.prop("checked")?this._removeOnSubmit.push(s):-1!==(t=this._removeOnSubmit.indexOf(s))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.wcfDialog("close"),window.setTimeout((()=>{this._dialog.find("input.jsCheckbox:checked").each($.proxy((function(e,t){this._insertQuote(null,t)}),this))}),0)},_insertQuote:function(e,t){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");const l=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(l).insertQuote({author:a,content:s,isText:r,link:o})})),this._removeOnSubmit.push(i.data("quote-id")),null!==e&&require(["WoltLabSuite/Core/Environment"],function(e){var t=function(){this._dialog.wcfDialog("close")}.bind(this);"ios"===e.platform()?window.setTimeout(t,100):t()}.bind(this))},_removeSelected:function(){var e,t,i;if(this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),e=[],this._dialog.find("input.jsCheckbox:checked").each((function(t,i){e.push($(i).parents("li").attr("data-quote-id"))})),e.length){for(i in t=[],this._handlers)this._handlers.hasOwnProperty(i)&&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(){var e,t,i;if(this._supportPaste&&this._removeOnSubmit.length>0)for(e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;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,t=[];for(e in this._handlers)this._handlers.hasOwnProperty(e)&&t.push(e);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:t.length>0,objectTypes:t}),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,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",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){var t,i,s,n,a,o;e.preventDefault(),i=(t=$(e.currentTarget)).prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode(),void 0===this._cache[n]?(a=!1,null===this._dialog?(this._dialog=$('
    ').hide().appendTo(document.body),a=!0):this._dialog.empty(),o=$('

    ").appendTo(this._dialog),$('').attr("value",i).appendTo(o),o=$('

    ").appendTo(this._dialog),$('').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o),o=$('

    ").appendTo(this._dialog),$('').attr("value",''+WCF.String.escapeHTML(s)+"").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('

    '+WCF.Language.get("wcf.message.share")+"

    "+this._shareButtonsTemplate+"
    ").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(i))),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):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)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,i,s,n,a,o,r,l,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),h=this.element.find("> div, > fieldset");if(u.length==h.length){for(e=this.element.data("preselect"),h.each((function(t,i){if(null!==elBySel(".innerError",i))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e ul > li[data-name] > a",o))&&$(r).trigger("mousedown");continue}if(!0===i)continue}a.tab.removeClass("active"),a.container.removeClass("active"),a.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==s&&this._trigger("show",{},{activeTab:s}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},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.User.js -(function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("
    "+this._cache[t]+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{var e,i;const s=Array.from(this._tab[0].querySelectorAll("textarea")).find((e=>{if(void 0===t(e))return!1;const i={api:{throwError:elInnerError},valid:!0};return WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5",`validate_${e.id}`,i),!1===i.valid}));s?s.parentElement.scrollIntoView({behavior:"smooth"}):(this._actionName="save",e=/values\[([a-zA-Z0-9._-]+)\]/,i={},this._tab.find("input, textarea, select").each((function(s,a){var n,o,r,c=$(a),l=null;switch(c.getTagName()){case"input":if(("radio"===(n=c.attr("type"))||"checkbox"===n)&&!c.prop("checked"))return;break;case"textarea":let e=t(a);void 0!==e&&(l=e.getHtml())}o=c.attr("name"),e.test(o)&&(r=RegExp.$1,null===l&&(l=c.val()),"checkbox"===c.attr("type")&&/\[\]$/.test(o)?(Array.isArray(i[r])||(i[r]=[]),i[r].push(l)):i[r]=l)})),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:i}}),this._proxy.sendRequest())}))},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html((function(s,a){return!0!==e&&(i._cachedTemplate=a),t.returnValues.template})),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup((function(t){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1}))},_destroyEditor:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{this._tab[0].querySelectorAll("textarea").forEach((e=>{const i=t(e);i?.destroy()}))}))}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsMarkAllAsConfirmed").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),(function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})}))})),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$(``).appendTo(i).click($.proxy(this._markAsConfirmed,this)))}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('

    '+WCF.Language.get("wcf.global.preview")+'

    ').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")),s[0].querySelector("fa-icon").setIcon("circle-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")),s[0].querySelector("fa-icon").setIcon("circle-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")),s[0].querySelector("fa-icon").setIcon("circle"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")),s[0].querySelector("fa-icon").setIcon("ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change((function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()})),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$(''),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy((function(t,e){var i,s,a=$(e);a.addClass("pointer"),i=a.data("objectType"),s=a.data("objectID"),void 0===this._buttons[i]&&(this._buttons[i]={}),this._buttons[i][s]=a.click($.proxy(this._click,this))}),this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("
    "+t.returnValues.template+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change((function(t){1==$(t.currentTarget).val()?s.enable():s.disable()})),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i[0].querySelector("fa-icon").setIcon("bookmark",!0),e.data("isSubscribed",!0),e.addClass("active");else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i[0].querySelector("fa-icon").setIcon("bookmark"),e.data("isSubscribed",!1),e.removeClass("active")),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this); +(function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("
    "+this._cache[t]+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),$("#profileContent").wcfTabs("select","about"),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{var e,i;const s=Array.from(this._tab[0].querySelectorAll("textarea")).find((e=>{if(void 0===t(e))return!1;const i={api:{throwError:elInnerError},valid:!0};return WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5",`validate_${e.id}`,i),!1===i.valid}));s?s.parentElement.scrollIntoView({behavior:"smooth"}):(this._actionName="save",e=/values\[([a-zA-Z0-9._-]+)\]/,i={},this._tab.find("input, textarea, select").each((function(s,a){var n,o,r,c=$(a),l=null;switch(c.getTagName()){case"input":if(("radio"===(n=c.attr("type"))||"checkbox"===n)&&!c.prop("checked"))return;break;case"textarea":let e=t(a);void 0!==e&&(l=e.getHtml())}o=c.attr("name"),e.test(o)&&(r=RegExp.$1,null===l&&(l=c.val()),"checkbox"===c.attr("type")&&/\[\]$/.test(o)?(Array.isArray(i[r])||(i[r]=[]),i[r].push(l)):i[r]=l)})),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:i}}),this._proxy.sendRequest())}))},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html((function(s,a){return!0!==e&&(i._cachedTemplate=a),t.returnValues.template})),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup((function(t){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1}))},_destroyEditor:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{this._tab[0].querySelectorAll("textarea").forEach((e=>{const i=t(e);i?.destroy()}))}))}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsMarkAllAsConfirmed").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),(function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})}))})),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$(``).appendTo(i).click($.proxy(this._markAsConfirmed,this)))}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('

    '+WCF.Language.get("wcf.global.preview")+'

    ').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")),s[0].querySelector("fa-icon").setIcon("circle-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")),s[0].querySelector("fa-icon").setIcon("circle-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")),s[0].querySelector("fa-icon").setIcon("circle"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")),s[0].querySelector("fa-icon").setIcon("ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change((function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()})),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$(''),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy((function(t,e){var i,s,a=$(e);a.addClass("pointer"),i=a.data("objectType"),s=a.data("objectID"),void 0===this._buttons[i]&&(this._buttons[i]={}),this._buttons[i][s]=a.click($.proxy(this._click,this))}),this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("
    "+t.returnValues.template+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change((function(t){1==$(t.currentTarget).val()?s.enable():s.disable()})),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i[0].querySelector("fa-icon").setIcon("bookmark",!0),e.data("isSubscribed",!0),e.addClass("active");else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i[0].querySelector("fa-icon").setIcon("bookmark"),e.data("isSubscribed",!1),e.removeClass("active")),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this); // WCF.Moderation.js (function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:null,_languageItem:"",_proxy:null,_queueID:0,_redirectURL:"",init:function(e,t,i){this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=i,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this))):console.debug("[WCF.Moderation.Management] Missing class name, aborting."):console.debug("[WCF.Moderation.Management] Missing button selector, aborting.")},_click:function(e){var t=$(e.currentTarget).wcfIdentify(),i="";this._confirmationTemplate[t]&&(i=this._confirmationTemplate[t]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,t)),$.proxy((function(e,i,o){if("confirm"===e){var n={actionName:t,className:this._className,objectIDs:[this._queueID]};this._confirmationTemplate[t]&&(n.parameters={},$(o).find("input, textarea").each((function(e,t){var i=$(t),o=i.val();"input"===i.getTagName()&&"checkbox"===i.attr("type")&&(i.is(":checked")||(o=null)),null!==o&&(n.parameters[i.attr("name")]=o)}))),this._proxy.setOption("data",n),this._proxy.sendRequest(),$(this._buttonSelector).disable()}}),this),{},i)},_success:function(e,t,i){var o=new WCF.System.Notification(WCF.Language.get("wcf.global.success")),n=this;o.show((function(){window.location=n._redirectURL}))}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(document).on("dblclick",".moderationList .new .columnAvatar",$.proxy(this._dblclick,this))},_dblclick:function(e){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[$(e.currentTarget).parents(".moderationQueueEntry:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(e,t,i){$(".moderationList .new").each((function(t,i){var o=$(i);WCF.inArray(o.data("queueID"),e.objectIDs)&&(o.removeClass("new"),o.find(".columnAvatar").off("dblclick"))}))}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".markAllAsReadButton").click($.proxy(this._click,this))},_click:function(e){e.preventDefault(),this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_success:function(e,t,i){$("#outstandingModeration .badgeUpdate").remove();var o=$(".moderationList");o.find(".new").removeClass("new"),o.find(".columnAvatar").off("dblclick")}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#enableContent, #removeContent",this._className="wcf\\data\\moderation\\queue\\ModerationQueueActivationAction",this._super(e,t,"wcf.moderation.activation.{actionName}.confirmMessage")}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_objectType:"",init:function(e,t){this._objectType=e,this._buttonSelector=t,this._buttons={},this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var e=this;$(this._buttonSelector).each(((t,i)=>{var o=$(i),n=o.wcfIdentify();e._buttons[n]||(e._buttons[n]=o,require(["WoltLabSuite/Core/Ui/Moderation/Report"],(({registerLegacyButton:e})=>{e(i,this._objectType)})))}))}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(e,t,i){this._buttonSelector="#removeContent, #removeReport, #changeJustifiedStatus",this._className="wcf\\data\\moderation\\queue\\ModerationQueueReportAction",this._super(e,t,"wcf.moderation.report.{actionName}.confirmMessage"),this._confirmationTemplate.removeContent=$('
    \n `;const c=l.querySelector("textarea");return i.content.append(l),i.show(e),new Promise((e=>{i.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),i.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token},o=i.__importDefault(o)})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class n{#Q=new Map;#J;constructor(e){this.#J=new URL(e)}async get(e){let t=this.#Q.get(e);if(void 0!==t)return t;this.#J.searchParams.set("id",e.toString());const n=await(0,i.prepareRequest)(this.#J).get().fetchAsResponse();return n?.ok?(t=await n.text(),this.#Q.set(e,t),t):""}reset(e){this.#Q.delete(e)}}t.SharedCache=n,t.default=n})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupFor=function(e){const{identifier:t,endpoint:i,selector:n}=e,o=new l.default(i);d.set(t,o),(0,r.wheneverFirstSeen)(n,(e=>{null===e.closest(".popover, .popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)},n=i.__importDefault(n),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importDefault(l);class c{#K;#Z=void 0;#ee=!0;#M;#te;#ie=void 0;#ne=void 0;constructor(e,t,i){this.#K=e,this.#M=t,this.#te=i,t.addEventListener("mouseenter",(()=>{this.#oe()})),t.addEventListener("mouseleave",(()=>{this.#re()}));const n=window.matchMedia("(hover:hover)");this.#ae(n.matches),n.addEventListener("change",(e=>{this.#ae(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#ae(!1)})),this.#oe()}#oe(){this.#ee&&(this.#ne?.stop(),void 0===this.#ie?this.#ie=new a.default((e=>{e.stop();const t=this.#se();this.#K.get(t).then((e=>{if(""===e)return;const t=this.#le();n.default.setInnerHtml(t,e),s.set(t,this.#M,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#ie.restart())}#re(){this.#ee&&(this.#ie?.stop(),void 0===this.#ne?this.#ne=new a.default((e=>{e.stop(),this.#Z?.setAttribute("aria-hidden","true")}),500):this.#ne.restart())}#ae(e){this.#ee=e,this.#Z?.setAttribute("aria-hidden","true")}#se(){return parseInt(this.#M.dataset.objectId)}#le(){return void 0===this.#Z&&(this.#Z=document.createElement("div"),this.#Z.classList.add("popoverContainer"),this.#Z.dataset.identifier=this.#te,this.#Z.setAttribute("aria-hidden","true"),this.#Z.addEventListener("transitionend",(()=>{"true"===this.#Z.getAttribute("aria-hidden")&&this.#Z.remove()})),this.#Z.addEventListener("mouseenter",(()=>{this.#ne?.stop()})),this.#Z.addEventListener("mouseleave",(()=>{this.#re()}))),null===this.#Z.parentNode&&(0,o.getPageOverlayContainer)().append(this.#Z),this.#Z}}const d=new Map})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map,n={add(e,t){if(i.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()},setupDialog(e,t){let i;return e.addEventListener("validate",(e=>{n.has(t)&&(i=n.getData(t),n.delete(t),i instanceof Promise&&(e.detail.push(new Promise((e=>{i.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==i?i instanceof Promise?i.then((e=>{t(e)})):t(i):t({})}))}))}};return n})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)},t.resetCache=function(e,t){l().resetCache(e,t)},n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((i=>{const n=r.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover, .popoverContainer"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;i.dataset.cacheId=a,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(i);a.childElementCount||(a=r.default.createFragmentFromHtml("

    "+i+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}resetCache(e,t){const i=`${e}-${t}`;this.cache.has(i)&&this.cache.set(i,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},i,i)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(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}Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowDown=function(e){return i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=function(e){let t=!1;return function(...i){return!t&&(t=!0,e(...i).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return e===s||e===l||e===c}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),n.error?i(n.error):i()})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function r(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");let r=t;for(let e=2;e{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),n.error?t(n.error):t()})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[r,a]=await Promise.all([t,n]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,r){const s=document.createElement("canvas");if(window.createImageBitmap&&(await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965");const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);s.width=Math.floor(e.width*d),s.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const p={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,p)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,i,n,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=i.toString(),m.appendChild(h)),function(e,t,i,n,c,d){function m(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",m),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),b.appendChild(n);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),n.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===i&&(g.innerHTML=o.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===i){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),i.append(t),e.appendChild(i)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const _=t.closest("form");if(null!==_){_.addEventListener("submit",l);let t=p.get(_);void 0===t&&(t=[],p.set(_,t)),t.push(e)}}(t,h,i,n,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)},n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a);const u=new Map,p=new WeakMap})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const n=d.get(e),o=r.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(n.languageId!==t){const o=p.get(e);if(n.languageId){const e=n.callbacks.get("beforeSelect");e&&e(n.element),o.set(n.languageId,n.element.value)}if(0===t?p.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=a,n.buttonLabel.querySelector("fa-icon")?.remove(),t){n.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),n.buttonLabel.append(e)}else n.buttonLabel.classList.remove("active");n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=r.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),a=p.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!a.get(t));const n=e.querySelector("span");if(n.querySelector("fa-icon")?.remove(),i){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),n.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=p.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,i,n){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,i,n,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const i=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),i&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const r=t instanceof HTMLElement;s(e,n,r)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let b;(a||i.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,i,n)},t.registerCallback=function(e,t,i){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const i=p.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),p.set(e,n),void s(e,0,!0);p.set(e,n),i.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const i=t.buttonLabel.parentElement;n.default.hide(i),i.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const i=t.buttonLabel.parentElement;n.default.show(i),i.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const i=d.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;const n=p.get(e),o=r.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t},n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const d=new Map,u=new WeakMap,p=new Map})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,i,n,o){"use strict";function r(e){(0,o.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,o.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,i,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected \n `;const c=l.querySelector("textarea");return i.content.append(l),i.show(e),new Promise((e=>{i.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),i.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token},o=i.__importDefault(o)})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class n{#Q=new Map;#J;constructor(e){this.#J=new URL(e)}async get(e){let t=this.#Q.get(e);if(void 0!==t)return t;this.#J.searchParams.set("id",e.toString());const n=await(0,i.prepareRequest)(this.#J).get().fetchAsResponse();return n?.ok?(t=await n.text(),this.#Q.set(e,t),t):""}reset(e){this.#Q.delete(e)}}t.SharedCache=n,t.default=n})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupFor=function(e){const{identifier:t,endpoint:i,selector:n}=e,o=new l.default(i);d.set(t,o),(0,r.wheneverFirstSeen)(n,(e=>{null===e.closest(".popover, .popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)},n=i.__importDefault(n),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importDefault(l);class c{#K;#Z=void 0;#ee=!0;#M;#te;#ie=void 0;#ne=void 0;constructor(e,t,i){this.#K=e,this.#M=t,this.#te=i,t.addEventListener("mouseenter",(()=>{this.#oe()})),t.addEventListener("mouseleave",(()=>{this.#re()}));const n=window.matchMedia("(hover:hover)");this.#ae(n.matches),n.addEventListener("change",(e=>{this.#ae(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#ae(!1)})),this.#oe()}#oe(){this.#ee&&(this.#ne?.stop(),void 0===this.#ie?this.#ie=new a.default((e=>{e.stop();const t=this.#se();this.#K.get(t).then((e=>{if(""===e)return;const t=this.#le();n.default.setInnerHtml(t,e),s.set(t,this.#M,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#ie.restart())}#re(){this.#ee&&(this.#ie?.stop(),void 0===this.#ne?this.#ne=new a.default((e=>{e.stop(),this.#Z?.setAttribute("aria-hidden","true")}),500):this.#ne.restart())}#ae(e){this.#ee=e,this.#Z?.setAttribute("aria-hidden","true")}#se(){return parseInt(this.#M.dataset.objectId)}#le(){return void 0===this.#Z&&(this.#Z=document.createElement("div"),this.#Z.classList.add("popoverContainer"),this.#Z.dataset.identifier=this.#te,this.#Z.setAttribute("aria-hidden","true"),this.#Z.addEventListener("transitionend",(()=>{"true"===this.#Z.getAttribute("aria-hidden")&&this.#Z.remove()})),this.#Z.addEventListener("mouseenter",(()=>{this.#ne?.stop()})),this.#Z.addEventListener("mouseleave",(()=>{this.#re()}))),null===this.#Z.parentNode&&(0,o.getPageOverlayContainer)().append(this.#Z),this.#Z}}const d=new Map})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map,n={add(e,t){if(i.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()},setupDialog(e,t){let i;return e.addEventListener("validate",(e=>{n.has(t)&&(i=n.getData(t),n.delete(t),i instanceof Promise&&(e.detail.push(new Promise((e=>{i.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==i?i instanceof Promise?i.then((e=>{t(e)})):t(i):t({})}))}))}};return n})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)},t.resetCache=function(e,t){l().resetCache(e,t)},n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((i=>{const n=r.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover, .popoverContainer"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;i.dataset.cacheId=a,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(i);a.childElementCount||(a=r.default.createFragmentFromHtml("

    "+i+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}resetCache(e,t){const i=`${e}-${t}`;this.cache.has(i)&&this.cache.set(i,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},i,i)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(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}Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowDown=function(e){return i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=function(e){let t=!1;return function(...i){return!t&&(t=!0,e(...i).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return e===s||e===l||e===c}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),n.error?i(n.error):i()})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function r(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");let r=t;for(let e=2;e{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),n.error?t(n.error):t()})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[r,a]=await Promise.all([t,n]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,r){const s=document.createElement("canvas");if(window.createImageBitmap&&(await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965");const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);s.width=Math.floor(e.width*d),s.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const p={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,p)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,i,n,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=i.toString(),m.appendChild(h)),function(e,t,i,n,c,d){function m(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",m),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),b.appendChild(n);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),n.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===i&&(g.innerHTML=o.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===i){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),i.append(t),e.appendChild(i)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const _=t.closest("form");if(null!==_){_.addEventListener("submit",l);let t=p.get(_);void 0===t&&(t=[],p.set(_,t)),t.push(e)}}(t,h,i,n,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)},n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a);const u=new Map,p=new WeakMap})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const n=d.get(e),o=r.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(n.languageId!==t){const o=p.get(e);if(n.languageId){const e=n.callbacks.get("beforeSelect");e&&e(n.element),o.set(n.languageId,n.element.value)}if(0===t?p.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=a,n.buttonLabel.querySelector("fa-icon")?.remove(),t){n.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),n.buttonLabel.append(e)}else n.buttonLabel.classList.remove("active");n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=r.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),a=p.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!a.get(t));const n=e.querySelector("span");if(n.querySelector("fa-icon")?.remove(),i){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),n.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=p.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,i,n){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,i,n,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const i=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),i&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const r=t instanceof HTMLElement;s(e,n,r)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let b;(a||i.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,i,n)},t.registerCallback=function(e,t,i){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const i=p.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),p.set(e,n),void s(e,0,!0);p.set(e,n),i.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const i=t.buttonLabel.parentElement;n.default.hide(i),i.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const i=t.buttonLabel.parentElement;n.default.show(i),i.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const i=d.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;const n=p.get(e),o=r.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t},n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const d=new Map,u=new WeakMap,p=new Map})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,i,n,o){"use strict";function r(e){(0,o.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,o.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,i,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected \n `;const c=l.querySelector("textarea");return n.content.append(l),n.show(e),new Promise((e=>{n.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),n.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,i.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token},o=n.__importDefault(o)})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class i{#T=new Map;#A;constructor(e){this.#A=new URL(e)}async get(e){let t=this.#T.get(e);if(void 0!==t)return t;this.#A.searchParams.set("id",e.toString());const i=await(0,n.prepareRequest)(this.#A).get().fetchAsResponse();return i?.ok?(t=await i.text(),this.#T.set(e,t),t):""}reset(e){this.#T.delete(e)}}t.SharedCache=i,t.default=i})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupFor=function(e){const{identifier:t,endpoint:n,selector:i}=e,o=new l.default(n);d.set(t,o),(0,r.wheneverFirstSeen)(i,(e=>{null===e.closest(".popover, .popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)},i=n.__importDefault(i),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l);class c{#P;#D=void 0;#j=!0;#O;#q;#B=void 0;#R=void 0;constructor(e,t,n){this.#P=e,this.#O=t,this.#q=n,t.addEventListener("mouseenter",(()=>{this.#F()})),t.addEventListener("mouseleave",(()=>{this.#N()}));const i=window.matchMedia("(hover:hover)");this.#U(i.matches),i.addEventListener("change",(e=>{this.#U(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#U(!1)})),this.#F()}#F(){this.#j&&(this.#R?.stop(),void 0===this.#B?this.#B=new a.default((e=>{e.stop();const t=this.#W();this.#P.get(t).then((e=>{if(""===e)return;const t=this.#H();i.default.setInnerHtml(t,e),s.set(t,this.#O,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#B.restart())}#N(){this.#j&&(this.#B?.stop(),void 0===this.#R?this.#R=new a.default((e=>{e.stop(),this.#D?.setAttribute("aria-hidden","true")}),500):this.#R.restart())}#U(e){this.#j=e,this.#D?.setAttribute("aria-hidden","true")}#W(){return parseInt(this.#O.dataset.objectId)}#H(){return void 0===this.#D&&(this.#D=document.createElement("div"),this.#D.classList.add("popoverContainer"),this.#D.dataset.identifier=this.#q,this.#D.setAttribute("aria-hidden","true"),this.#D.addEventListener("transitionend",(()=>{"true"===this.#D.getAttribute("aria-hidden")&&this.#D.remove()})),this.#D.addEventListener("mouseenter",(()=>{this.#R?.stop()})),this.#D.addEventListener("mouseleave",(()=>{this.#N()}))),null===this.#D.parentNode&&(0,o.getPageOverlayContainer)().append(this.#D),this.#D}}const d=new Map})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,i={add(e,t){if(n.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");n.set(e,t)},delete(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);n.delete(e)},has:e=>n.has(e),getData(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return n.get(e)()},setupDialog(e,t){let n;return e.addEventListener("validate",(e=>{i.has(t)&&(n=i.getData(t),i.delete(t),n instanceof Promise&&(e.detail.push(new Promise((e=>{n.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==n?n instanceof Promise?n.then((e=>{t(e)})):t(n):t({})}))}))}};return i})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,n,i,o,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e){l().init(e)},t.setContent=function(e,t,n){l().setContent(e,t,n)},t.ajaxApi=function(e,t,n){l().ajaxApi(e,t,n)},t.resetCache=function(e,t){l().resetCache(e,t)},i=n.__importStar(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((n=>{const i=r.default.identify(n);if(this.cache.has(i))return;if(null!==n.closest(".popover, .popoverContainer"))return void this.cache.set(i,{content:null,state:0});const o=e.legacy?i:~~n.getAttribute(e.attributeName);if(0===o)return;n.addEventListener("mouseenter",(e=>this.mouseEnter(e))),n.addEventListener("mouseleave",(()=>this.mouseLeave())),n instanceof HTMLAnchorElement&&n.href&&n.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;n.dataset.cacheId=a,this.elements.set(i,{element:n,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,n){const i=`${e}-${t}`,o=this.cache.get(i);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(n);a.childElementCount||(a=r.default.createFragmentFromHtml("

    "+n+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===i&&this.show()}resetCache(e,t){const n=`${e}-${t}`;this.cache.has(n)&&this.cache.set(n,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const n=t.element.dataset.cacheId,i=this.cache.get(n);switch(i.state){case 2:this.popoverContent.appendChild(i.content),this.rebuild();break;case 0:{i.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const n=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},n,n)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,n){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");i.api(this,e,t,n)}}let d})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowDown=function(e){return n(e,"ArrowDown",40)},t.ArrowLeft=function(e){return n(e,"ArrowLeft",37)},t.ArrowRight=function(e){return n(e,"ArrowRight",39)},t.ArrowUp=function(e){return n(e,"ArrowUp",38)},t.Comma=function(e){return n(e,",",44)},t.End=function(e){return n(e,"End",35)},t.Enter=function(e){return n(e,"Enter",13)},t.Escape=function(e){return n(e,"Escape",27)},t.Home=function(e){return n(e,"Home",36)},t.Space=function(e){return n(e,"Space",32)},t.Tab=function(e){return n(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=function(e){let t=!1;return function(...n){return!t&&(t=!0,e(...n).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t,n){const o=u.get(e);if(void 0===n&&void 0===(n=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),i.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(n)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const n=document.createElement("input");n.type="hidden",n.name=e,n.value=d(e).toString(),t.appendChild(n)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,n,i,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=n.toString(),m.appendChild(h)),function(e,t,n,i,c,d){function m(t){const n=t.currentTarget,i=~~n.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active"),s(e,i,n)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(i).forEach((([e,t])=>{const i=document.createElement("li");i.className="boxFlag",i.addEventListener("click",m),i.dataset.languageId=e,void 0!==t.languageCode&&(i.dataset.languageCode=t.languageCode),b.appendChild(i);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),i.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===n&&(g.innerHTML=o.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const i=document.createElement("a");i.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(i),0===n&&(g.innerHTML=i.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===n){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const n=document.createElement("span");n.textContent=o.get("wcf.global.language.noSelection"),n.append(t),e.appendChild(n)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const w=t.closest("form");if(null!==w){w.addEventListener("submit",l);let t=p.get(w);void 0===t&&(t=[],p.set(w,t)),t.push(e)}}(t,h,n,i,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)},i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t,n){const i=d.get(e),o=r.default.getDropdownMenu(i.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(i.languageId!==t){const o=p.get(e);if(i.languageId){const e=i.callbacks.get("beforeSelect");e&&e(i.element),o.set(i.languageId,i.element.value)}if(0===t?p.set(e,new Map):(i.buttonLabel.classList.contains("active")||n)&&(i.element.value=o.get(t)||""),i.buttonLabel.textContent=a,i.buttonLabel.querySelector("fa-icon")?.remove(),t){i.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),i.buttonLabel.append(e)}else i.buttonLabel.classList.remove("active");i.languageId=t}n||(i.element.blur(),i.element.focus()),i.callbacks.has("select")&&i.callbacks.get("select")(i.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),i=document.getElementById(e).dataset.inputId,o=d.get(i),a=p.get(i);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;o.languageId&&(n=t===o.languageId?""===o.element.value.trim():!a.get(t));const i=e.querySelector("span");if(i.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),i.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const n=d.get(e);if(!n.isEnabled)return;const i=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&i.set(n.languageId,n.element.value),i.size&&(i.forEach((function(n,i){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${i}]`,o.value=n,t.appendChild(o)})),n.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,n,i){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,n,i,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const n=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),n&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const i=~~n.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,i,r)};if(Object.entries(i).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const i=document.createElement("span");i.textContent=t,n.appendChild(i),n.addEventListener("click",g),f.appendChild(n)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const n=document.createElement("span");n.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(n),f.appendChild(t)}let b;(a||n.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,n,i)},t.registerCallback=function(e,t,n){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,n)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const n=p.get(e);return n.set(t.languageId,t.element.value),n},t.setValues=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);n.element.value="";const i=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(i.has(0))return n.element.value=i.get(0),i.delete(0),p.set(e,i),void s(e,0,!0);p.set(e,i),n.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const n=t.buttonLabel.parentElement;i.default.hide(n),n.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const n=t.buttonLabel.parentElement;i.default.show(n),n.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!n.isEnabled)return!0;const i=p.get(e),o=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&i.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(i.has(t)&&0!==i.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t},i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new i(e)};class n{#O;constructor(e){this.#O=e}collectMetaData(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class i{#O;constructor(e){this.#O=e}bbcode(e){return this.#O.addEventListener("ckeditor5:bbcode",(t=>{const n=e(t.detail);if(!0===n)t.preventDefault();else if(!1!==n)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#O.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#O.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#O.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#O.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#O.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#O.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#O.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#O.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#O.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#O.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#O.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#O.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#O.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#O.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#O.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})})).catch((()=>{}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{o.attachment&&(t.woltlabUpload={uploadImage:(t,n)=>i(e,t,n),uploadOther:t=>i(e,t)},(0,n.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,n.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:n})=>{""===n?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(``)}))}(e),function(e){(0,n.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)})))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,n;if(e&&e.__esModule)return e;if(t={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(o),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(t){(0,n.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:n})=>{!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>i(t,e,n),uploadOther:e=>i(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,n)=>{e(["../../Media/Manager/Editor"],t,n)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Api/Messages/MentionSuggestions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mentionSuggestions=async function(e){const t=new URL(window.WSC_RPC_API_URL+"core/messages/mentionsuggestions");let o;t.searchParams.set("query",e);try{o=await(0,n.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){return e.length>24?[]:(await(0,o.mentionSuggestions)(e)).unwrap().map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,n.createFragmentFromHtml)(`\n ${e.icon} ${e.text}\n `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){(0,i.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,i.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:i,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'


    ')).split("\n\n").map((e=>`

    ${e=e.replaceAll("\n","
    ")}

    `)).join("")),i=(0,n.escapeHTML)(i),r=(0,n.escapeHTML)(r),e.insertHtml(`${o}\n


    `)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,i,o,r){"use strict";function a(e){return`${(0,n.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let n;try{const e=window.localStorage.getItem(a(t));null!==e&&(n=JSON.parse(e))}catch{return void s(t)}if(void 0===n)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=n.timestamp)return;const c=e.data.get();if(c===n.html)return;e.data.set(n.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n
    \n ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft"))}\n
    \n
    \n \n \n \n
    \n `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const m=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n \n `,e}(),n=e.ui.view.toolbar.element,r=Array.from(n.children);r.forEach((e=>e.hidden=!0)),n.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,n){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let n,i;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{i=JSON.parse(n)}catch{}if(void 0===i||i.timestamp(function(e,t,n){if(""===n)return void s(t);const i={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(i)),(0,r.dispatchToCkeditor)(e).autosave(i)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,n,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(n))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(n)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=function(e){const t=new i(e);return t.build(),t.toConfig()};class i{#$;#V="|";#z=[];#Y=[];#G={};constructor(e){this.#$=e}#X(){this.#$.undo?this.#Y.push("undo","redo"):this.#z.push("Undo")}#K(){this.#Y.push("bold","italic")}#J(){const e=[];this.#$.heading?e.push("heading"):this.#z.push("Heading"),this.#$.underline?e.push("underline"):this.#z.push("Underline"),this.#$.strikethrough?e.push("strikethrough"):this.#z.push("Strikethrough"),e.push(this.#V),this.#$.mark?e.push("highlight"):this.#z.push("Highlight"),this.#$.fontColor?e.push("fontColor"):this.#z.push("FontColor"),this.#$.fontFamily?e.push("fontFamily"):this.#z.push("FontFamily"),this.#$.fontSize?e.push("fontSize"):this.#z.push("FontSize"),e.push(this.#V),this.#$.subscript?e.push("subscript"):this.#z.push("Subscript"),this.#$.superscript?e.push("superscript"):this.#z.push("Superscript"),0!==e.length&&e.push(this.#V,"removeFormat"),e.length>0&&(this.#Y.push({label:"woltlabToolbarGroup_format",items:e}),this.#G.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#Q(){this.#$.list?(this.#Y.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#G.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#z.push("List")}#Z(){this.#$.alignment?this.#Y.push("alignment"):this.#z.push("Alignment")}#ee(){this.#$.link?this.#Y.push("link"):this.#z.push("Link","LinkImage")}#te(){this.#$.image?(this.#Y.push("insertImage"),this.#$.attachment||this.#z.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#$.link&&this.#z.push("LinkImage")}#ne(){this.#$.codeBlock?this.#Y.push("codeBlock"):this.#z.push("CodeBlock","WoltlabCodeBlock"),this.#$.code?this.#Y.push("code"):this.#z.push("Code","WoltlabCode")}#ie(){this.#$.table?this.#Y.push("insertTable"):this.#z.push("Table","TableToolbar"),this.#$.quoteBlock?this.#Y.push("blockQuote"):this.#z.push("BlockQuote","WoltlabBlockQuote"),this.#$.spoiler?this.#Y.push("spoiler"):this.#z.push("WoltlabSpoiler"),this.#$.html?this.#Y.push("htmlEmbed"):this.#z.push("HtmlEmbed","WoltlabHtmlEmbed")}#oe(){this.#Y.push(this.#V)}#re(){this.#$.media||this.#z.push("WoltlabMedia")}#ae(){this.#$.mention||this.#z.push("Mention","WoltlabMention")}#se(){let e=!1;return this.#Y.filter((t=>"string"==typeof t&&t===this.#V?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#z.length>0||this.#Y.length>0)throw new Error("Cannot build the configuration twice.");this.#X(),this.#oe(),this.#oe(),this.#K(),this.#ee(),this.#J(),this.#oe(),this.#Q(),this.#Z(),this.#oe(),this.#te(),this.#ne(),this.#ie(),this.#oe(),this.#re(),this.#ae()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:i}=window.CKEDITOR_TRANSLATIONS[t];return i.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),i.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),i["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),i.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),i["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),i.Spoiler=(0,n.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,n.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,n.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,n.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,n.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#z,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#se(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#G,extraPlugins:[]}}}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){e.editing.view.document.on("enter",((e,i)=>{if(i.isSoft)return;i.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";function o(e,t){const n=e.closest("p");if(null===n)return;const i=document.createElement("figure");i.classList.add("image",t),i.append(e),n.insertAdjacentElement("beforebegin",i),""===n.innerHTML&&n.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&i.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const n=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const n=e.childNodes[0];n instanceof HTMLBRElement&&"true"!==n.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,n=e.length;t{e.remove()})),t+=o}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a \n `;const c=l.querySelector("textarea");return n.content.append(l),n.show(e),new Promise((e=>{n.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),n.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,i.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token},o=n.__importDefault(o)})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class i{#T=new Map;#A;constructor(e){this.#A=new URL(e)}async get(e){let t=this.#T.get(e);if(void 0!==t)return t;this.#A.searchParams.set("id",e.toString());const i=await(0,n.prepareRequest)(this.#A).get().fetchAsResponse();return i?.ok?(t=await i.text(),this.#T.set(e,t),t):""}reset(e){this.#T.delete(e)}}t.SharedCache=i,t.default=i})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupFor=function(e){const{identifier:t,endpoint:n,selector:i}=e,o=new l.default(n);d.set(t,o),(0,r.wheneverFirstSeen)(i,(e=>{null===e.closest(".popover, .popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)},i=n.__importDefault(i),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l);class c{#P;#D=void 0;#j=!0;#O;#q;#B=void 0;#R=void 0;constructor(e,t,n){this.#P=e,this.#O=t,this.#q=n,t.addEventListener("mouseenter",(()=>{this.#F()})),t.addEventListener("mouseleave",(()=>{this.#N()}));const i=window.matchMedia("(hover:hover)");this.#U(i.matches),i.addEventListener("change",(e=>{this.#U(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#U(!1)})),this.#F()}#F(){this.#j&&(this.#R?.stop(),void 0===this.#B?this.#B=new a.default((e=>{e.stop();const t=this.#W();this.#P.get(t).then((e=>{if(""===e)return;const t=this.#H();i.default.setInnerHtml(t,e),s.set(t,this.#O,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#B.restart())}#N(){this.#j&&(this.#B?.stop(),void 0===this.#R?this.#R=new a.default((e=>{e.stop(),this.#D?.setAttribute("aria-hidden","true")}),500):this.#R.restart())}#U(e){this.#j=e,this.#D?.setAttribute("aria-hidden","true")}#W(){return parseInt(this.#O.dataset.objectId)}#H(){return void 0===this.#D&&(this.#D=document.createElement("div"),this.#D.classList.add("popoverContainer"),this.#D.dataset.identifier=this.#q,this.#D.setAttribute("aria-hidden","true"),this.#D.addEventListener("transitionend",(()=>{"true"===this.#D.getAttribute("aria-hidden")&&this.#D.remove()})),this.#D.addEventListener("mouseenter",(()=>{this.#R?.stop()})),this.#D.addEventListener("mouseleave",(()=>{this.#N()}))),null===this.#D.parentNode&&(0,o.getPageOverlayContainer)().append(this.#D),this.#D}}const d=new Map})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,i={add(e,t){if(n.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");n.set(e,t)},delete(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);n.delete(e)},has:e=>n.has(e),getData(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return n.get(e)()},setupDialog(e,t){let n;return e.addEventListener("validate",(e=>{i.has(t)&&(n=i.getData(t),i.delete(t),n instanceof Promise&&(e.detail.push(new Promise((e=>{n.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==n?n instanceof Promise?n.then((e=>{t(e)})):t(n):t({})}))}))}};return i})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,n,i,o,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e){l().init(e)},t.setContent=function(e,t,n){l().setContent(e,t,n)},t.ajaxApi=function(e,t,n){l().ajaxApi(e,t,n)},t.resetCache=function(e,t){l().resetCache(e,t)},i=n.__importStar(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),o.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((n=>{const i=r.default.identify(n);if(this.cache.has(i))return;if(null!==n.closest(".popover, .popoverContainer"))return void this.cache.set(i,{content:null,state:0});const o=e.legacy?i:~~n.getAttribute(e.attributeName);if(0===o)return;n.addEventListener("mouseenter",(e=>this.mouseEnter(e))),n.addEventListener("mouseleave",(()=>this.mouseLeave())),n instanceof HTMLAnchorElement&&n.href&&n.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;n.dataset.cacheId=a,this.elements.set(i,{element:n,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,n){const i=`${e}-${t}`,o=this.cache.get(i);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(n);a.childElementCount||(a=r.default.createFragmentFromHtml("

    "+n+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===i&&this.show()}resetCache(e,t){const n=`${e}-${t}`;this.cache.has(n)&&this.cache.set(n,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const n=t.element.dataset.cacheId,i=this.cache.get(n);switch(i.state){case 2:this.popoverContent.appendChild(i.content),this.rebuild();break;case 0:{i.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const n=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},n,n)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,n){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");i.api(this,e,t,n)}}let d})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowDown=function(e){return n(e,"ArrowDown",40)},t.ArrowLeft=function(e){return n(e,"ArrowLeft",37)},t.ArrowRight=function(e){return n(e,"ArrowRight",39)},t.ArrowUp=function(e){return n(e,"ArrowUp",38)},t.Comma=function(e){return n(e,",",44)},t.End=function(e){return n(e,"End",35)},t.Enter=function(e){return n(e,"Enter",13)},t.Escape=function(e){return n(e,"Escape",27)},t.Home=function(e){return n(e,"Home",36)},t.Space=function(e){return n(e,"Space",32)},t.Tab=function(e){return n(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=function(e){let t=!1;return function(...n){return!t&&(t=!0,e(...n).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t,n){const o=u.get(e);if(void 0===n&&void 0===(n=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),i.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(n)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const n=document.createElement("input");n.type="hidden",n.name=e,n.value=d(e).toString(),t.appendChild(n)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,n,i,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=n.toString(),m.appendChild(h)),function(e,t,n,i,c,d){function m(t){const n=t.currentTarget,i=~~n.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active"),s(e,i,n)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(i).forEach((([e,t])=>{const i=document.createElement("li");i.className="boxFlag",i.addEventListener("click",m),i.dataset.languageId=e,void 0!==t.languageCode&&(i.dataset.languageCode=t.languageCode),b.appendChild(i);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),i.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===n&&(g.innerHTML=o.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",m),b.appendChild(t);const i=document.createElement("a");i.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(i),0===n&&(g.innerHTML=i.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===n){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const n=document.createElement("span");n.textContent=o.get("wcf.global.language.noSelection"),n.append(t),e.appendChild(n)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const w=t.closest("form");if(null!==w){w.addEventListener("submit",l);let t=p.get(w);void 0===t&&(t=[],p.set(w,t)),t.push(e)}}(t,h,n,i,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)},i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t,n){const i=d.get(e),o=r.default.getDropdownMenu(i.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(i.languageId!==t){const o=p.get(e);if(i.languageId){const e=i.callbacks.get("beforeSelect");e&&e(i.element),o.set(i.languageId,i.element.value)}if(0===t?p.set(e,new Map):(i.buttonLabel.classList.contains("active")||n)&&(i.element.value=o.get(t)||""),i.buttonLabel.textContent=a,i.buttonLabel.querySelector("fa-icon")?.remove(),t){i.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),i.buttonLabel.append(e)}else i.buttonLabel.classList.remove("active");i.languageId=t}n||(i.element.blur(),i.element.focus()),i.callbacks.has("select")&&i.callbacks.get("select")(i.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),i=document.getElementById(e).dataset.inputId,o=d.get(i),a=p.get(i);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;o.languageId&&(n=t===o.languageId?""===o.element.value.trim():!a.get(t));const i=e.querySelector("span");if(i.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),i.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const n=d.get(e);if(!n.isEnabled)return;const i=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&i.set(n.languageId,n.element.value),i.size&&(i.forEach((function(n,i){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${i}]`,o.value=n,t.appendChild(o)})),n.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,n,i){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,n,i,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const n=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),n&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const i=~~n.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,i,r)};if(Object.entries(i).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const i=document.createElement("span");i.textContent=t,n.appendChild(i),n.addEventListener("click",g),f.appendChild(n)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const n=document.createElement("span");n.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(n),f.appendChild(t)}let b;(a||n.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,m,h,n,i)},t.registerCallback=function(e,t,n){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,n)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const n=p.get(e);return n.set(t.languageId,t.element.value),n},t.setValues=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);n.element.value="";const i=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(i.has(0))return n.element.value=i.get(0),i.delete(0),p.set(e,i),void s(e,0,!0);p.set(e,i),n.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const n=t.buttonLabel.parentElement;i.default.hide(n),n.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const n=t.buttonLabel.parentElement;i.default.show(n),n.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!n.isEnabled)return!0;const i=p.get(e),o=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&i.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(i.has(t)&&0!==i.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t},i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new i(e)};class n{#O;constructor(e){this.#O=e}collectMetaData(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class i{#O;constructor(e){this.#O=e}bbcode(e){return this.#O.addEventListener("ckeditor5:bbcode",(t=>{const n=e(t.detail);if(!0===n)t.preventDefault();else if(!1!==n)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#O.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#O.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#O.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#O.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#O.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#O.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#O.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#O.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#O.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#O.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#O.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#O.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#O.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#O.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#O.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})})).catch((()=>{}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{o.attachment&&(t.woltlabUpload={uploadImage:(t,n)=>i(e,t,n),uploadOther:t=>i(e,t)},(0,n.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,n.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:n})=>{""===n?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(``)}))}(e),function(e){(0,n.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)})))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,n;if(e&&e.__esModule)return e;if(t={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(o),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(t){(0,n.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:n})=>{!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>i(t,e,n),uploadOther:e=>i(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,n)=>{e(["../../Media/Manager/Editor"],t,n)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Api/Messages/MentionSuggestions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mentionSuggestions=async function(e){const t=new URL(window.WSC_RPC_API_URL+"core/messages/mentionsuggestions");let o;t.searchParams.set("query",e);try{o=await(0,n.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){return e.length>24?[]:(await(0,o.mentionSuggestions)(e)).unwrap().map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,n.createFragmentFromHtml)(`\n ${e.icon} ${e.text}\n `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){(0,i.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,i.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:i,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'


    ')).split("\n\n").map((e=>`

    ${e=e.replaceAll("\n","
    ")}

    `)).join("")),i=(0,n.escapeHTML)(i),r=(0,n.escapeHTML)(r),e.insertHtml(`${o}\n


    `)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,i,o,r){"use strict";function a(e){return`${(0,n.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let n;try{const e=window.localStorage.getItem(a(t));null!==e&&(n=JSON.parse(e))}catch{return void s(t)}if(void 0===n)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=n.timestamp)return;const c=e.data.get();if(c===n.html)return;e.data.set(n.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n
    \n ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft"))}\n
    \n
    \n \n \n \n
    \n `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const m=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n \n `,e}(),n=e.ui.view.toolbar.element,r=Array.from(n.children);r.forEach((e=>e.hidden=!0)),n.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,n){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let n,i;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{i=JSON.parse(n)}catch{}if(void 0===i||i.timestamp(function(e,t,n){if(""===n)return void s(t);const i={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(i)),(0,r.dispatchToCkeditor)(e).autosave(i)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,n,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(n))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(n)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=function(e){const t=new i(e);return t.build(),t.toConfig()};class i{#$;#V="|";#z=[];#Y=[];#G={};constructor(e){this.#$=e}#X(){this.#$.undo?this.#Y.push("undo","redo"):this.#z.push("Undo")}#K(){this.#Y.push("bold","italic")}#J(){const e=[];this.#$.heading?e.push("heading"):this.#z.push("Heading"),this.#$.underline?e.push("underline"):this.#z.push("Underline"),this.#$.strikethrough?e.push("strikethrough"):this.#z.push("Strikethrough"),e.push(this.#V),this.#$.mark?e.push("highlight"):this.#z.push("Highlight"),this.#$.fontColor?e.push("fontColor"):this.#z.push("FontColor"),this.#$.fontFamily?e.push("fontFamily"):this.#z.push("FontFamily"),this.#$.fontSize?e.push("fontSize"):this.#z.push("FontSize"),e.push(this.#V),this.#$.subscript?e.push("subscript"):this.#z.push("Subscript"),this.#$.superscript?e.push("superscript"):this.#z.push("Superscript"),0!==e.length&&e.push(this.#V,"removeFormat"),e.length>0&&(this.#Y.push({label:"woltlabToolbarGroup_format",items:e}),this.#G.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#Q(){this.#$.list?(this.#Y.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#G.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#z.push("List")}#Z(){this.#$.alignment?this.#Y.push("alignment"):this.#z.push("Alignment")}#ee(){this.#$.link?this.#Y.push("link"):this.#z.push("Link","LinkImage")}#te(){this.#$.image?(this.#Y.push("insertImage"),this.#$.attachment||this.#z.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#$.link&&this.#z.push("LinkImage")}#ne(){this.#$.codeBlock?this.#Y.push("codeBlock"):this.#z.push("CodeBlock","WoltlabCodeBlock"),this.#$.code?this.#Y.push("code"):this.#z.push("Code","WoltlabCode")}#ie(){this.#$.table?this.#Y.push("insertTable"):this.#z.push("Table","TableToolbar"),this.#$.quoteBlock?this.#Y.push("blockQuote"):this.#z.push("BlockQuote","WoltlabBlockQuote"),this.#$.spoiler?this.#Y.push("spoiler"):this.#z.push("WoltlabSpoiler"),this.#$.html?this.#Y.push("htmlEmbed"):this.#z.push("HtmlEmbed","WoltlabHtmlEmbed")}#oe(){this.#Y.push(this.#V)}#re(){this.#$.media||this.#z.push("WoltlabMedia")}#ae(){this.#$.mention||this.#z.push("Mention","WoltlabMention")}#se(){let e=!1;return this.#Y.filter((t=>"string"==typeof t&&t===this.#V?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#z.length>0||this.#Y.length>0)throw new Error("Cannot build the configuration twice.");this.#X(),this.#oe(),this.#oe(),this.#K(),this.#ee(),this.#J(),this.#oe(),this.#Q(),this.#Z(),this.#oe(),this.#te(),this.#ne(),this.#ie(),this.#oe(),this.#re(),this.#ae()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:i}=window.CKEDITOR_TRANSLATIONS[t];return i.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),i.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),i["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),i.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),i["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),i.Spoiler=(0,n.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,n.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,n.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,n.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,n.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#z,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#se(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#G,extraPlugins:[]}}}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){e.editing.view.document.on("enter",((e,i)=>{if(i.isSoft)return;i.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";function o(e,t){const n=e.closest("p");if(null===n)return;const i=document.createElement("figure");i.classList.add("image",t),i.append(e),n.insertAdjacentElement("beforebegin",i),""===n.innerHTML&&n.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&i.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const n=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const n=e.childNodes[0];n instanceof HTMLBRElement&&"true"!==n.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,n=e.length;t{e.remove()})),t+=o}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a