1var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__createBinding,__addDisposableResource,__disposeResources,__rewriteRelativeImportExtension,__setModuleDefault,_self,Prism,Reflect;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,i){return t&&eachProp(t,(function(t,o){!n&&hasProp(e,o)||(!i||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,n,i)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,n){var i,o,r,a,s,l,c,d,u,h,p=t&&t.split("/"),f=I.map,m=f&&f["*"];if(e&&(l=(e=e.split("/")).length-1,I.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),function(e){var t,n,i=e.length;for(t=0;t<i;t++)if("."===(n=e[t]))e.splice(t,1),t-=1;else if(".."===n){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),n&&f&&(p||m)){e:for(r=(o=e.split("/")).length;r>0;r-=1){if(s=o.slice(0,r).join("/"),p)for(a=p.length;a>0;a-=1)if((i=getOwn(f,p.slice(0,a).join("/")))&&(i=getOwn(i,s))){c=i,d=r;break e}!u&&m&&getOwn(m,s)&&(u=getOwn(m,s),h=r)}!c&&u&&(c=u,d=h),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(I.pkgs,e)||e}function n(e){var t,n,i,o;for(t=0;t<queue.length;t+=1){if("string"!=typeof queue[t][0]){if(!e)break;queue[t].unshift(e),e=undef}t-=1,(n=(i=queue.shift())[0])in A||n in L||(n in T?v.apply(undef,i):L[n]=i)}e&&(o=getOwn(I.shim,e)||{},v(e,o.deps||[],o.exportsFn))}function i(e,i){var o=function(t,r,a,s){var l,c;if(i&&n(),"string"==typeof t){if(E[t])return E[t](e);if(!((l=y(t,e,!0).id)in A))throw new Error("Not loaded: "+l);return A[l]}return t&&!Array.isArray(t)&&(c=t,t=undef,Array.isArray(r)&&(t=r,r=
1a,a=s),i)?o.config(c)(t,r,a):(r=r||function(){return slice.call(arguments,0)},F.then((function(){return n(),v(undef,t||[],r,a,e)})))};return o.isBrowser="undefined"!=typeof document&&"undefined"!=typeof navigator,o.nameToUrl=function(e,t,n){var i,r,a,s,l,c,d=getOwn(I.pkgs,e);if(d&&(e=d),c=getOwn(N,e))return o.nameToUrl(c,t,n);if(urlRegExp.test(e))s=e+(t||"");else{for(i=I.paths,a=(r=e.split("/")).length;a>0;a-=1)if(l=getOwn(i,r.slice(0,a).join("/"))){Array.isArray(l)&&(l=l[0]),r.splice(0,a,l);break}s=r.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||n?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":I.baseUrl)+s}return I.urlArgs&&!/^blob\:/.test(s)?s+I.urlArgs(e,s):s},o.toUrl=function(n){var i,r=n.lastIndexOf("."),a=n.split("/")[0];return-1!==r&&(!("."===a||".."===a)||r>1)&&(i=n.substring(r,n.length),n=n.substring(0,r)),o.nameToUrl(t(n,e),i,!0)},o.defined=function(t){return y(t,e,!0).id in A},o.specified=function(t){return(t=y(t,e,!0).id)in A||t in T},o}function o(e,t,n){e&&(A[e]=n,requirejs.onResourceLoad&&requirejs.onResourceLoad(C,t.map,t.deps)),t.finished=!0,t.resolve(n)}function r(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function a(e){e.factoryCalled=!0;var t,n=e.map.id;try{t=C.execCb(n,e.factory,e.values,A[n])}catch(t){return r(e,t)}n?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=A[n])):k.splice(k.indexOf(e),1),o(n,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||a(this))}function l(e,t){var n={};return n.promise=new Promise((function(t,i){n.resolve=t,n.reject=function(t){e||k.splice(k.indexOf(n),1),i(t)}})),n.map=e?t||y(e):{},n.depCount=0,n.depMax=0,n.values=[],n.depDefined=[],n.depFinished=s,n.map.pr&&(n.deps=[y(n.map.pr)]),n}function c(e,t){var n;return e?(n=e in T&&T[e])||(n=T[e]=l(e,t)):(n=l(),k.push(n)),n}function d(e,t){return function(n){e.rejected||(n.dynaId||(n.dynaId="id"+(O+=1),n.requireModules=[t]),r(e,n))}}function u(e,t,n,i){n.depMax+=1,w(e,t).then((function(e){n.depFinished(e,i)}
1),d(n,e.id)).catch(d(n,n.map.id))}function h(e,t,a){e.load(t.n,i(a),function(e){function t(t){i||o(e,c(e),t)}var i;return t.error=function(t){r(c(e),t)},t.fromText=function(t,o){var a,s=c(e),l=y(y(e).n),d=l.id;i=!0,s.factory=function(e,t){return t},o&&(t=o),hasProp(I.config,e)&&(I.config[d]=I.config[e]);try{b.exec(t)}catch(e){(a=new Error("fromText eval for "+d+" failed: "+e)).requireType="fromtexteval",r(s,a)}n(d),s.deps=[l],u(l,null,s,s.deps.length)},t}(t.id),I)}function p(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function f(e,t,n){var i=e.map.id;t[i]=!0,!e.finished&&e.deps&&e.deps.forEach((function(i){var o=i.id,r=!hasProp(E,o)&&c(o,i);!r||r.finished||n[o]||(hasProp(t,o)?e.deps.forEach((function(t,n){t.id===o&&e.depFinished(A[o],n)})):f(r,t,n))})),n[i]=!0}function m(e){var t,n,i,o=[],a=1e3*I.waitSeconds,s=a&&B+a<(new Date).getTime();if(0===D&&(e?e.finished||f(e,{},{}):k.length&&k.forEach((function(e){f(e,{},{})}))),s){for(n in T)(i=T[n]).finished||o.push(i.map.id);(t=new Error("Timeout for modules: "+o)).requireModules=o,t.requireType="timeout",o.forEach((function(e){r(c(e),t)}))}else(D||k.length)&&(S||(S=!0,setTimeout((function(){S=!1,m()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&R[e.dynaId]||(R[e.dynaId]=!0,b.onError(e))})),e}var b,v,y,w,E,S,_,C,A=obj(),L=obj(),I={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},x=obj(),k=[],T=obj(),M=obj(),P=obj(),D=0,B=(new Date).getTime(),O=0,R=obj(),j=obj(),N=obj(),F=Promise.resolve();return _="function"==typeof importScripts?function(e){var t=e.url;j[t]||(j[t]=!0,c(e.id),importScripts(t),n(e.id))}:function(e){var t,i=e.id,o=e.url;j[o]||(j[o]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",i),t.type=I.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,D+=1,t.addEventListener("load",(function(){D-=1,n(i)}),!1),t.addEventListener("error",(function(){var e,n,o;D-=1,(n=getOwn(I.paths,i))&&Array.isArray(n)&&n.length>1?(t.parentNode.removeChild(t),n.shift(),(o=c(i)).map=y(i),o.map.url=b.nameToUrl(i),_(o.map)):((e=new Error("Load failed: "+i+": "+t.src)).requireModules=[i],e.requireType="scripterror",r(c(i),e))}),!1),t.src=o,I.onNodeCreated&&I.onNodeCreated(t,I,i,o),10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},w=function(e,t){var n,i,o=e.id,r=I.shim[o];if(o in L)n=L[o],delete L[o],v.apply(undef,n);else if(!(o in T))if(e.pr){if(!(i=getOwn(N,o)))return w(y(e.pr)).then((function(n){var i=e.prn?e:y(o,t,!0),r=i.id,a=getOwn(I.shim,r);return r in P||(P[r]=!0,a&&a.deps?b(a.deps,(function(){h(n,i,t)})):h(n,i,t)),c(r).promise}));e.url=b.nameToUrl(i),_(e)}else r&&r.deps?b(r.deps,(function(){_(e)})):_(e);return c(o).promise},y=function(e,n,i){if("string"!=typeof e)return e;var o,r,a,s,l,c,d=e+" & "+(n||"")+" & "+!!i;return s=(a=p(e))[0],e=a[1],!s&&d in x?x[d]:(s&&(o=(s=t(s,n,i))in A&&A[s]),s?o&&o.normalize?(e=o.normalize(e,function(e){return function(n){return t(n,e,!0)}}(n)),c=!0):e=-1===e.indexOf("!")?t(e,n,i):e:(s=(a=p(e=t(e,n,i)))[0],e=a[1],r=b.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&c},s||(x[d]=l),l)},E={require:function(e){return i(e)},exports:function(e){var t=A[e];return void 0!==t?t:A[e]={}},module:function(e,t){return{id:e,uri:t||"",exports:E.exports(e),config:function(){return getOwn(I.config,e)||{}}}}},v=function(e,t,n,i,r){if(e){if(e in M)return;M[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(n=t,t=[]),t=t?slice.call(t,0):null,i||(hasProp(I,"defaultErrback")?I.defaultErrback&&(i=I.defaultErrback):i=g),i&&s.promise.catch(i),r=r||e,"function"==typeof n?(!t.length&&n.length&&(n.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,n){t.push(n)})),t=(1===n.length?["require"]:["require","exports","module"]).concat(t)),s.factory=n,s.deps=t,s.depending=!0,t.forEach((function(n,i){var o;t[i]=o=y(n,r,!0),"require"===(n=o.id)?s.values[i]=E.require(e):"exports"===n?(s.values[i]=E.exports(e),s.usingExports=!0):"module"===n?s.values[i]=s.cjsModule=E.module(e,s.map.url):void 0===n?s.values[i]=void 0:u(o,r,s,i)})),s.depending=!1,s.depCount===s.depMax&&a(s)):e&&o(e,s,n),B=(new Date).getTime(),e||m(s),s.promise},(b=i(null,!0)).config=function(t){var n,i,o,r;return t.context&&t.context!==e?(n=getOwn(contexts,t.context))?n.req.config(t):newContext(t.context).config(t):(x=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(i=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+i}),o=I.shim,r={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){r[t]?(I[t]||(I[t]={}),mixin(I[t],e,!0,!0)):I[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(N[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;
1return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),o[t]=e})),I.shim=o),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(I.paths[t]=e.location),I.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&b(t.deps,t.callback),b)},b.onError=function(e){throw e},C={id:e,defined:A,waiting:L,config:I,deferreds:T,req:b,execCb:function(e,t,n,i){return t.apply(i,n)}},contexts[e]=C,b}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{"focus-trap":"3rdParty/focus-trap/focus-trap.umd.min","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min","reflect-metadata":"3rdParty/reflect-metadata",tabbable:"3rdParty/focus-trap/index.umd.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn","@googlemaps/markerclusterer":"3rdParty/googlemaps/markerclusterer/index.umd","@ckeditor/ckeditor5-inspector":"3rdParty/ckeditor/ckeditor5-inspector/inspector","@woltlab/editor":"3rdParty/ckeditor/ckeditor5.bundle","ckeditor5-translation":"3rdParty/ckeditor/translations","diff-match-patch":"3rdParty/diff-match-patch/diff_match_patch.min","hash-wasm":"3rdParty/hash-wasm/sha256.umd.min",sortablejs:"3rdParty/Sortable.min",cropperjs:"3rdParty/cropper.min",exifreader:"3rdParty/exif-reader"},packages:[{name:"codemirror",location:"3rdParty/codemirror",main:"lib/codemirror"},{name:"@woltlab/visual-dom-diff",location:"3rdParty/visual-dom-diff",main:"index"},{name:"@fancyapps/ui",location:"3rdParty/fancybox",main:"fancybox.umd"}],shim:{"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){e.elAttr=function(e,t,n){if(void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elAttrBool=function(e,t){var n=elAttr(e,t);return"1"===n||"true"===n},e.elByClass=function(e,n){return(n||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,n){return(n||t).querySelector(e)},e.elBySelAll=function(e,n,i){var o=(n||t).querySelectorAll(e);return"function"==typeof i&&Array.prototype.forEach.call(o,i),o},e.elByTag=function(e,n){return(n||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");
1return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,n){if(t="data-"+t,void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elDataBool=function(e,t){var n=elData(e,t);return"1"===n||"true"===n},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,n){var i,o,r,a=e.parentNode;if(null===a)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return o=e,(i=a).classList.contains("inputAddon")&&(i=a.parentElement,o=a),null!==(r=o.nextElementSibling)&&"SMALL"===r.nodeName&&r.classList.contains("innerError")||(""===t?r=null:((r=elCreate("small")).className="innerError",i.insertBefore(r,o.nextSibling))),""===t?null!==r&&(a.removeChild(r),r=null):r[n?"innerHTML":"textContent"]=t,r},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},e.objOwns=function(e,t){return e.hasOwnProperty(t)},e.debounce=function(e,t,n){var i;return function(){var o=this,r=arguments;clearTimeout(i),i=setTimeout((function(){i=null,n||e.apply(o,r)}),t),n&&!i&&e.apply(o,r)}},Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),e.String.prototype.hashCode=function(){var e,t,n=0;if(this.length)for(e=0,t=this.length;e<t;e++)n=(n<<5)-n+this.charCodeAt(e),n&=n;return n},Object.defineProperty(e,"SECURITY_TOKEN",{configurable:!1,get(){const e=t.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[n,i]=e.split(/=/,2);return decodeURIComponent(i.trim())}})}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==n&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,i){return e[n]=t?t(n,i):i}}var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(i){e(t(n,t(i)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(n,t(module.exports))):e(t(n))}((function(e){var t,n,i,o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};__extends=function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__assign=Object.assign||function(e){var t,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__rest=function(e,t){var n,i,o={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]]);return o},__decorate=function(e,t,n,i){var o,r,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},__param=function(e,t){return function(n,i){t(n,i,e)}},__esDecorate=function(e,t,n,i,o,r){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}var s,l,c,d,u,h=i.kind,p="getter"===h?"get":"setter"===h?"set":"value",f=!t&&e?i.static?e:e.prototype:null,m=t||(f?Object.getOwnPropertyDescriptor(f,i.name):{}),g=!1;for(l=n.length-1;l>=0;l--){for(d in c={},i)c[d]="access"===d?{}:i[d];for(d in i.access)c.access[d]=i.access[d];if(c.addInitializer=function(e){if(g)throw new TypeError("Cannot add initializer
1s after decoration has completed");r.push(a(e||null))},u=(0,n[l])("accessor"===h?{get:m.get,set:m.set}:m[p],c),"accessor"===h){if(void 0===u)continue;if(null===u||"object"!=typeof u)throw new TypeError("Object expected");(s=a(u.get))&&(m.get=s),(s=a(u.set))&&(m.set=s),(s=a(u.init))&&o.unshift(s)}else(s=a(u))&&("field"===h?o.unshift(s):m[p]=s)}f&&Object.defineProperty(f,i.name,m),g=!0},__runInitializers=function(e,t,n){var i,o=arguments.length>2;for(i=0;i<t.length;i++)n=o?t[i].call(e,n):t[i].call(e);return o?n:void 0},__propKey=function(e){return"symbol"==typeof e?e:"".concat(e)},__setFunctionName=function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))},__generator=function(e,t){function n(n){return function(l){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,n[0]&&(a=0)),a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,l])}}var i,o,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=n(0),s.throw=n(1),s.return=n(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},__exportStar=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,n)},__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]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var n,i,o,r,a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;n=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return o},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){var e,t,n,i,o,r,a,s;for(e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(i=Array(e),o=0,t=0;t<n;t++)for(a=0,s=(r=arguments[t]).length;a<s;a++,o++)i[o]=r[a];return i},__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,n){function i(e,t){c[e]&&(l[e]=function(t){return new Promise((function(n,i){d.push([e,t,n,i])>1||o(e,t)}))},t&&(l[e]=t(l[e])))}function o(e,t){try{(n=c[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(r,a):s(d[0][2],n)}catch(e){s(d[0][3],e)}var n}function r(e){o("next",e)}function a(e){o("throw",e)}function s(e,t){e(t),d.shift(),d.length&&o(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=n.apply(e,t||[]),d=[];return l=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",(function(e){return function(t){return Promise.resolve(t).then(e,a)}})),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,o){n[t]=e[t]?function(n){return(i=!i)?{value:__await(e[t](n)),done:!1}:o?o(n):n}:o}var n,i;return n={},t("next"),t("throw",(function(e){throw e})),t("return"),n[Symbol.iterator]=function(){return this},n},__asyncValues=function(e){function t(t){n[t]=e[t]&&function(n){return new Promise((function(i,o){!function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)}(i,o,(n=e[t](n)).done,n.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n)}
vendor: 3,724 bytes, line 1
1,__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},n=function(e){return n=Object.getOwnPropertyNames||function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},n(e)},__importStar=function(e){var i,o,r;if(e&&e.__esModule)return e;if(i={},null!=e)for(o=n(e),r=0;r<o.length;r++)"default"!==o[r]&&__createBinding(i,e,o[r]);return t(i,e),i},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},__classPrivateFieldSet=function(e,t,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(e,n):o?o.value=n:t.set(e,n),n},__classPrivateFieldIn=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__addDisposableResource=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],n&&(o=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");o&&(i=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t},i="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i},__disposeResources=function(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,o=0;return function i(){for(;n=e.stack.pop();)try{if(!n.async&&1===o)return o=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var r=n.dispose.call(n.value);if(n.async)return o|=2,Promise.resolve(r).then(i,(function(e){return t(e),i()}))}else o|=1}catch(e){t(e)}if(1===o)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()},__rewriteRelativeImportExtension=function(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,i,o,r){return n?t?".jsx":".js":!i||o&&r?i+o+"."+r.toLowerCase()+"js":e})):e},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__esDecorate",__esDecorate),e("__runInitializers",__runInitializers),e("__propKey",__propKey),e("__setFunctionName",__setFunctionName),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__spreadArray",__spreadArray),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateOb
1ject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet),e("__classPrivateFieldIn",__classPrivateFieldIn),e("__addDisposableResource",__addDisposableResource),e("__disposeResources",__disposeResources),e("__rewriteRelativeImportExtension",__rewriteRelativeImportExtension)})),define("WoltLabSuite/Core/Helper/PageOverlay",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adoptPageOverlayContainer=function(e){i.push(e),"moveBefore"in Element.prototype&&document.body.contains(n)?e.moveBefore(n,null):e.append(n)},t.releasePageOverlayContainer=function(e){if(!i.includes(e))throw new Error("Cannot release the page overlay from a container that (no longer) adopts it.",{cause:{element:e}});const t=i.indexOf(e);if(0===t)throw new Error("Cannot release the page overlay, there is no previous owner.",{cause:{element:e}});if(t!==i.length-1)i.splice(t,1);else{i.pop();const e=i[i.length-1];"moveBefore"in Element.prototype?e.moveBefore(n,null):e.append(n)}},t.getPageOverlayContainer=function(){return n};const n=document.createElement("div");n.id="pageOverlayContainer";const i=[]})),define("WoltLabSuite/Core/Ajax/Status",["require","exports","../Helper/PageOverlay"],(function(e,t,n){"use strict";function i(){return void 0===r&&(r=new o),r}Object.defineProperty(t,"__esModule",{value:!0}),t.show=function(){i().show()},t.hide=function(){i().hide()};class o{_activeRequests=0;_overlay;_timer=null;constructor(){this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("woltlab-core-loading-indicator");e.size=48,this._overlay.append(e),(0,n.getPageOverlayContainer)().append(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._overlay.classList.remove("active"))}}let r})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function n(e){return r(e)}function i(e,...t){const r=n(e=e||{});for(let n=0,a=t.length;n<a;n++){const a=t[n];a&&Object.keys(a).forEach((t=>{Array.isArray(a[t])||"object"!=typeof a[t]?r[t]=a[t]:o(a[t])?r[t]=i(e[t],a[t]):r[t]=a[t]}))}return r}function o(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.clone=n,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const n=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,i=n.length;e<i;e++){const i=n[e].trim();i.length&&(t.length&&(t+="-"),t+=i.toLowerCase())}return`index.php?${t}/&`}))},t.extend=i,t.inherit=function(e,t,n){if(null==e)throw new TypeError("The constructor must not be undefined or null.");if(null==t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=i(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),n||{})},t.isPlainObject=o,t.getType=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1")},t.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,n){if(null===t)return"";const i=[];return Object.keys(t).forEach((o=>{const r=n?n+"["+o+"]":o,a=t[o];"object"==typeof a?i.push(e(a,r)):i.push(encodeURIComponent(r)+"="+encodeURIComponent(a))})),i.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const n=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(n)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,n={isImmediate:!1}){let i;return function(...o){const r=n.isImmediate&&void 0===i;void 0!==i&&clearTimeout(i),i=setTimeout((()=>{i=void 0,n.isImmediate||e.apply(this,o)}),t),r&&e.apply(this,o)}},t.enableLegacyInheritance=function(e){console.error("Relying on the legacy inheritance is no longer supported. Please migrate your co
1de to use ES6 classes and inheritance.",e)},t.getXsrfToken=function(){const e=document.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[t,n]=e.split(/=/,2);return decodeURIComponent(n.trim())};const r=function(e){return"object"==typeof e&&(Array.isArray(e)||o(e))?a(e):e},a=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((n=>t[n]=r(e[n]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-"})),define("WoltLabSuite/Core/CallbackList",["require","exports"],(function(e,t){"use strict";return class{_callbacks=new Map;add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){null===e?this._callbacks.forEach(((e,n)=>{e.forEach(t)})):this._callbacks.get(e)?.forEach(t)}}})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,n,i){"use strict";const o=new((i=n.__importDefault(i)).default);let r=!1;return{add:o.add.bind(o),remove:o.remove.bind(o),trigger(){if(!r)try{r=!0,o.forEach(null,(e=>e()))}finally{r=!1}}}})),define("WoltLabSuite/Core/Language",["require","exports"],(function(e,t){"use strict";function n(e,t={}){return window.WoltLabLanguage.getPhrase(e,t)}function i(e,t){window.WoltLabLanguage.registerPhrase(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getPhrase=n,t.registerPhrase=i,t.get=function(e,t={}){return n(e,t)},t.add=function(e,t){i(e,t)},t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{i(e,t)}))}})),define("WoltLabSuite/Core/Component/Dialog/Controls",["require","exports","tslib","../../Language"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogControls=void 0,i=n.__importStar(i);class o{#e;constructor(e){this.#e=e}asAlert(e){const t={cancel:void 0,extra:void 0,isAlert:!0,primary:e?.primary||i.get("wcf.dialog.button.primary")};return this.#e.attachControls(t),this.#e}asConfirmation(e){const t={cancel:"",extra:void 0,isAlert:!0,primary:e?.primary||i.get("wcf.dialog.button.primary.confirm")};return this.#e.attachControls(t),this.#e}asPrompt(e){const t={cancel:"",extra:e?.extra,isAlert:!1,primary:e?.primary||i.get("wcf.dialog.button.primary.submit")};return this.#e.attachControls(t),this.#e}withoutControls(){return this.#e}}t.DialogControls=o,t.default=o})),define("WoltLabSuite/Core/StringUtil",["require","exports"],(function(e,t){"use strict";function n(e,t){const n=t?-t:2;return e.toLocaleString(document.documentElement.lang,{maximumFractionDigits:n}).replace("-","â")}function i(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.addThousandsSeparator=function(e){return e.toLocaleString(document.documentElement.lang)},t.escapeHTML=function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=n,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=i,t.unescapeHTML=function(e){return String(e).replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},t.shortUnit=function(e){let t="";return e>=1e6?((e/=1e6)>10&&(e=Math.floor(e)),t="M"):e>=1e3&&((e/=1e3)>10&&(e=Math.floor(e)),t="k"),n(e,-1)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=i(e)),e))).join(""):e}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,n,i){"use strict";function o(e,t,n){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let i,o=e;const r=n+"Sibling";for(;null!==o&&o!==t;){if(null!==o[n+"ElementSibling"])return!1;if(o[r])for(i=o[r];i;){if(""!==i.textContent.trim())return!1;i=i[r]}o=o.parentNode}return!0}i=n.__importStar(i);let r=0;const a={createFragmentFromHtml(e){const t=document.createElement("template");a.setInnerHtml(t,e);const n=document.createDocumentFragment();return n.append(t.content.cloneNode(!0)),n},getUniqueId(){let e;do{e="wcf"+r++}while(null!==document.getElementById(e));return e},escapeAttributeSelector:e=>e.replace(/(["\\])/g,"\\$1"),identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=a.getUniqueId(),e.id=t),t},innerHeight(e,t){t=t||window.getComputedStyle(e);let n=e.clientHeight;return n-=~~t.paddingTop+~~t.paddingBottom,n},innerWidth(e,t){t=t||window.getComputedStyle(e);let n=e.clientWidth;return n-=~~parseInt(t.paddingLeft)+~~parseInt(t.paddingRight),n},innerDimensions(e){const t=window.getComputedStyle(e);return{height:a.innerHeight(e,t),width:a.innerWidth(e,t)}},outerHeight(e,t){t=t||window.getComputedStyle(e);let n=e.offsetHeight;return n+=~~t.marginTop+~~t.marginBottom,n},outerWidth(e,t){t=t||window.getComputedStyle(e);let n=e.offsetWidth;return n+=~~t.marginLeft+~~t.marginRight,n},outerDimensions(e){const t=window.getComputedStyle(e);return{height:a.outerHeight(e,t),width:a.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let n=!1;Object.keys(t).forEach((i=>{/ !important$/.test(t[i])?(n=!0,t[i]=t[i].replace(/ !important$/,"")):n=!1,"important"!==e.style.getPropertyPriority(i)||n||e.style.removeProperty(i),e.style.setProperty(i,t[i],n?"important":"")}))},styleAsInt(e,t){const n=e.getPropertyValue(t);return null===n?0:parseInt(n,10)},setInnerHtml(e,t){let n;e.innerHTML=t,n=e instanceof HTMLTemplateElement?e.content:e;const i=n.querySelectorAll("script");for(let e=0,t=i.length;e<t;e++){const t=i[e],o=document.createElement("script");t.src?o.src=t.src:o.textContent=t.textContent,n.appendChild(o),t.remove()}},insertHtml(e,t,n){const i=document.createElement("template");a.setInnerHtml(i,e);const o=document.importNode(i.content,!0);switch(n){case"append":t.appendChild(o);break;case"after":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'after'.");t.parentNode.insertBefore(o,t.nextSibling);break;
1case"prepend":t.insertBefore(o,t.firstChild);break;case"before":if(null===t.parentNode)throw new Error("The reference element has no parent, but the insert position was set to 'before'.");t.parentNode.insertBefore(o,t);break;default:throw new Error("Unknown insert method '"+n+"'.")}},contains:(e,t)=>e.contains(t),getDataAttributes(e,t,n,o){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),n=!0===n,o=!0===o;const r={};for(let a=0,s=e.attributes.length;a<s;a++){const s=e.attributes[a];if(0===s.name.indexOf(t)){let e=s.name.replace(new RegExp("^"+t),"");if(n){const t=e.split("-");e="";for(let n=0,r=t.length;n<r;n++)e.length&&(o&&"id"===t[n]?t[n]="ID":t[n]=i.ucfirst(t[n])),e+=t[n]}r[e]=s.value}}return r},unwrapChildNodes(e){if(null===e.parentNode)throw new Error("The element has no parent.");const t=e.parentNode;for(;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);e.remove()},replaceElement(e,t){if(null===e.parentNode)throw new Error("The old element has no parent.");for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);e.parentNode.insertBefore(t,e),e.remove()},isAtNodeStart:(e,t)=>o(e,t,"previous"),isAtNodeEnd:(e,t)=>o(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){a.isHidden(e)?a.show(e):a.hide(e)},innerError(e,t,n){const i=e.parentNode;if(null===i)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=i,r=e;o.classList.contains("inputAddon")&&(o=i.parentElement,r=i);let a=r.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=document.createElement("small"),a.className="innerError",o.insertBefore(a,r.nextSibling))),""===t?null!==a&&(a.remove(),a=null):n?a.innerHTML=t:a.textContent=t,a},innerSuccess(e,t,n){const i=e.parentNode;if(null===i)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerSuccess")||(""===t?o=null:(o=document.createElement("small"),o.className="innerSuccess",i.insertBefore(o,e.nextSibling))),""===t?null!==o&&(o.remove(),o=null):n?o.innerHTML=t:o.textContent=t,o},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=a,a})),define("WoltLabSuite/Core/Ajax/Error",["require","exports","tslib","../Component/Dialog","../Core","../Language","../StringUtil"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidJson=t.ExpectedJson=t.StatusNotOk=t.ConnectionError=t.ApiError=void 0,t.registerGlobalRejectionHandler=function(){h||(window.addEventListener("unhandledrejection",(e=>{e.reason instanceof s&&(e.preventDefault(),async function(e){const t=await async function(e){let t="",n="";if(e instanceof l)n=e.originalError instanceof TypeError?r.get("wcf.global.error.ajax.network",{message:e.message}):e.message;else if(e instanceof u)n=await e.response.clone().text();else if(e instanceof d||e instanceof c){let i;try{i=await e.response.clone().json()}catch{n=await e.response.clone().text()}if(i&&o.isPlainObject(i)&&Object.keys(i).length>0)i.returnValues&&i.returnValues.description&&(t+=`<br><p>Description:</p><p>${i.returnValues.description}</p>`),i.file&&i.line&&(t+=`<br><p>File:</p><p>${i.file} in line ${i.line}</p>`),i.exception?t+=`<br>Exception: <div style="white-space: pre;">${(0,a.escapeHTML)(i.exception)}</div>`:i.stacktrace?t+=`<br><p>Stacktrace:</p><p>${i.stacktrace}</p>`:i.exceptionID&&(t+=`<br><p>Exception ID: <code>${i.exceptionID}</code></p>
1`),n=i.message,i.previous&&i.previous.forEach((e=>{t+=`<hr><p>${e.message}</p>`,t+=`<br><p>Stacktrace</p><p>${e.stacktrace}</p>`}));else if(void 0===i){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.sandbox="",e.srcdoc=n,e}}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return"";n="fetch() failed without a response body. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${n}</p>${t}</div>`}(e);if(t instanceof HTMLIFrameElement){const e=(0,i.dialogFactory)().fromHtml(`<div class="dialog__iframeContainer">${t.outerHTML}</div>`).asAlert();e.show(r.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else""!==t&&(0,i.dialogFactory)().fromHtml(t).asAlert().show(r.get("wcf.global.error.title"))}(e.reason))})),h=!0)},o=n.__importStar(o),r=n.__importStar(r);class s extends Error{name="ApiError"}t.ApiError=s;class l extends s{originalError;constructor(e){let t="Unknown error";e instanceof Error&&(t=e.message),super(t),this.name="ConnectionError",this.originalError=e}}t.ConnectionError=l;class c extends s{response;constructor(e){super("The API request returned a status code outside of the 200-299 range."),this.name="StatusNotOk",this.response=e}}t.StatusNotOk=c;class d extends s{response;constructor(e){super("The API did not return a JSON response."),this.name="ExpectedJson",this.response=e}}t.ExpectedJson=d;class u extends s{response;constructor(e){super("Failed to decode the JSON response from the API."),this.name="InvalidJson",this.response=e}}t.InvalidJson=u;let h=!1})),define("WoltLabSuite/Core/Ajax/Backend",["require","exports","tslib","./Status","./Error","../Core"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=function(e){return new a(e.toString())},i=n.__importStar(i);class a{url;constructor(e){this.url=e}delete(){return new l(this.url,0)}get(){return new c(this.url,1)}post(e){return new l(this.url,2,e)}}let s=!1;window.addEventListener("beforeunload",(()=>s=!0));class l{#t=new Map;#n;#i;#o;#r;#a=!0;#s=!1;constructor(e,t,n){this.#n=e,this.#i=t,this.#o=n}getAbortController(){return void 0===this.#r&&(this.#r=new AbortController),this.#r}disableLoadingIndicator(){return this.#a=!1,this}withHeader(e,t){return this.#t.set(e,t),this}allowCaching(){return this.#s=!0,this}async fetchAsJson(){const e=await this.#l({headers:{accept:"application/json"}});if(void 0===e)return;const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new o.ExpectedJson(e);let n;try{n=await e.json()}catch{throw new o.InvalidJson(e)}return n}async fetchAsResponse(){return this.#l()}async#l(t={}){(0,o.registerGlobalRejectionHandler)(),this.#t.set("X-Requested-With","XMLHttpRequest"),this.#t.set("X-XSRF-TOKEN",(0,r.getXsrfToken)());const a=Object.fromEntries(this.#t),l=(0,r.extend)({headers:a,mode:"same-origin",credentials:"same-origin",cache:this.#s?"default":"no-store",redirect:"error"},t);2===this.#i?(l.method="POST",this.#o&&(this.#o instanceof Blob?(l.headers["Content-Type"]="application/octet-stream",l.body=this.#o):this.#o instanceof FormData?(l.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8",l.body=this.#o):(l.headers["Content-Type"]="application/json; charset=UTF-8",l.body=JSON.stringify(this.#o)))):0===this.#i?l.method="DELETE":l.method="GET",this.#r&&(l.signal=this.#r.signal);const c=this.#a;c&&i.show();try{const t=await fetch(this.#n,l);if(!t.ok)throw new o.StatusNotOk(t);return"yes"===t.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),t}catch(e){if(e instanceof o.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new o.ConnectionError(e)}finally{c&&i.hide()}}}class c extends l{allowCaching(){return super.allowCaching(),this}}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function n(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(i))}let i={editorAutosave:!0,editorInspector:!1,eventLogging:!1,persistentPopover:!1};const o={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(o).filter((e=>
1"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){i.editorAutosave=!e&&!i.editorAutosave,n(),window.console.log("%c\tEditor autosave "+(i.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEditorInspector(e){i.editorInspector=!!e||!i.editorInspector,n(),window.console.log("%c\tEditor inspector "+(i.editorInspector?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){i.eventLogging=!!e||!i.eventLogging,n(),window.console.log("%c\tEvent logging "+(i.eventLogging?"enabled":"disabled"),"font-style: italic")},togglePersistentPopover(e){i.persistentPopover=!!e||!i.persistentPopover,n(),window.console.log("%c\tPersistent popover "+(i.persistentPopover?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=o,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(i=JSON.parse(e))}catch{}i.editorAutosave||o.toggleEditorAutosave(!0),i.editorInspector&&o.toggleEditorInspector(!0),i.eventLogging&&o.toggleEventLogging(!0),i.persistentPopover&&o.togglePersistentPopover(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>i.editorAutosave,editorInspector:()=>i.editorInspector,eventLog(e,t){i.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)},persistentPopover:()=>i.persistentPopover}};return o})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,n,i,o){"use strict";function r(e,t){"string"!=typeof t&&(t=void 0);const n=a.get(e);void 0!==n&&(void 0===t?a.delete(e):n.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.add=function(e,t,n){if("function"!=typeof n)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let o=a.get(e);void 0===o&&(o=new Map,a.set(e,o));let r=o.get(t);void 0===r&&(r=new Map,o.set(t,r));const s=i.getUuid();return r.set(s,n),s},t.fire=function(e,t,n){o.default._internal_.eventLog(e,t),n=n||{},a.get(e)?.get(t)?.forEach((e=>e(n)))},t.remove=function(e,t,n){a.get(e)?.get(t)?.delete(n)},t.removeAll=r,t.removeAllBySuffix=function(e,t){const n=a.get(e);if(void 0===n)return;const i=-1*(t="_"+t).length;n.forEach(((n,o)=>{o.substr(i)===t&&r(e,o)}))},i=n.__importStar(i),o=n.__importDefault(o);const a=new Map})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports"],(function(e,t){"use strict";return class{_fieldId;_field;constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,n,i,o){"use strict";function r(){!0!==h?(h=!0,p=!1,o.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),h=!1,p&&r()):p=!0}function a(){const e=[];d.forEach(((t,n)=>{const o=document.getElementById(n);if(null===o)return void e.push(n);let r=!0;var a;t.forEach((e=>{var t;e.checkDependency()||(t=o,i.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&i.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,n=e.getAttribute("max");n&&(t.set("max",n),e.removeAttribute("max"));const i=e.getAttribute("maxlength");i&&(t.set("maxlength",i),e.removeAttribute("maxlength"));const o=e.getAttribute("min");o&&(t.set("min",o),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),r=!1)})),r&&(a=o,i.default.show(a),s.delete(a),a.classList.contains("tabMenuContent")&&a.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===a.dataset.name&&i.default.show(e)})),a.querySelectorAll("input, select, textarea").forEach((e=>{let t=e.parentNode;for(;t!==a&&!i.default.isHidden(t);)t=t.parentNode;if(t===a&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),r()}
1Object.defineProperty(t,"__esModule",{value:!0}),t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");o.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=i.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>a())):e.addEventListener("change",(()=>a())))}))},t.checkContainers=r,t.checkDependencies=a,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((n=>{n.contains(e)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,n)=>{t.contains(document.getElementById(n))&&d.delete(n),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))},i=n.__importDefault(i),o=n.__importStar(o);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let h=!1,p=!0})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,n,i,o,r,a){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const n=e.getData();if(!(n instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(n)})),Promise.all(t).then((e=>e.reduce(((e,t)=>i.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof r.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const n=t.getId();if(s(e,n))throw new Error("Form field with id '"+n+"' has already been registered for form with id '"+e+"'.");c.get(e).set(n,t),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");o.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),a.unregister(e),o.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})},i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);const c=new Map,d=new Map})),define("WoltLabSuite/Core/Component/FormBuilder/Setup",["require","exports","tslib","../../Ajax/Backend","../../Dom/Util","../../Form/Builder/Manager"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderSetup=void 0,o=n.__importStar(o),r=n.__importStar(r);class a{async fromEndpoint(t){const a=await(0,i.prepareRequest)(t).get().fetchAsJson(),{dialogFactory:s}=await new Promise(((t,n)=>{e(["../Dialog"],t,n)})).then(n.__importStar),l=s().fromHtml(a.dialog).asPrompt();return new Promise((e=>{l.addEventListener("validate",(n=>{const s=r.getData(a.formId).then((async n=>{n instanceof Promise&&(n=await n);const s=await(0,i.prepareRequest)(t).post(n).fetchAsJson();return"dialog"in s?(r.unregisterForm(a.formId),o.setInnerHtml(l.content,s.dialog),!1):(l.addEventListener("primary",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!0,result:s.result})})),!0)}));n.detail.push(s)})),l.addEventListener("afterClose",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!1,result:void 0})})),l.show(a.title)}))}}t.FormBuilderSetup=a,t.default=a})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);
1o&&!("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(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},e(t)};return function(t){var n,i,o;if(t&&t.__esModule)return t;if(n={},null!=t)for(i=e(t),o=0;o<i.length;o++)"default"!==i[o]&&__createBinding(n,t,i[o]);return __setModuleDefault(n,t),n}}(),define("WoltLabSuite/Core/Component/GridView/Setup",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GridViewSetup=void 0;class i{async fromPreset(t,i,o=1,r="",a="ASC",s,l){const c=new URL(`${window.WSC_RPC_API_URL}core/grid-views/render`);c.searchParams.set("gridView",i),c.searchParams.set("pageNo",o.toString()),c.searchParams.set("sortField",r),c.searchParams.set("sortOrder",a),s&&s.forEach(((e,t)=>{c.searchParams.set(`filters[${t}]`,e)})),l&&l.forEach(((e,t)=>{c.searchParams.set(`gridViewParameters[${t}]`,e)}));const d=await(0,n.prepareRequest)(c).get().fetchAsJson(),{dialogFactory:u}=await new Promise(((t,n)=>{e(["../Dialog"],t,n)})).then(__importStar),h=u().fromHtml(d.gridView).withoutControls();return h.show(t),h}}t.GridViewSetup=i,t.default=i})),define("WoltLabSuite/Core/Component/Dialog/Setup",["require","exports","tslib","./Controls","../../Dom/Util","../FormBuilder/Setup","WoltLabSuite/Core/Component/GridView/Setup"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogSetup=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a);class s{fromElement(e){e instanceof HTMLTemplateElement&&(e=e.content.cloneNode(!0));const t=document.createElement("woltlab-core-dialog");return t.content.append(e),e instanceof HTMLElement&&(e.hidden=!1),new i.default(t)}fromId(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find the element identified by '${e}'.`);return this.fromElement(t)}fromHtml(e){const t=o.createFragmentFromHtml(e);if(0===t.childElementCount&&""===t.textContent.trim())throw new TypeError("The provided HTML string was empty.");return this.fromElement(t)}usingFormBuilder(){return new r.default}usingGridView(){return new a.default}withoutContent(){const e=document.createElement("woltlab-core-dialog");return new i.default(e)}}t.DialogSetup=s,t.default=s})),function(e,t){var n,i;"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("tabbable",["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.tabbable,t(i=e.tabbable={}),i.noConflict=function(){return e.tabbable=n,i})}(this,(function(e){"use strict";var t=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],n=t.join(","),i="undefined"==typeof Element,o=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!i&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},a=function(e,t){var n,i;return void 0===t&&(t=!0),""===(i=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert"))||"true"===i||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):a(e.parentNode))},s=function(e,t,i){if(a(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(n));return t&&o.call(e,n)&&r.unshift(e),r.filter(i)},l=function(e,t,i){var r,s,c,d,u,h,p,f,m;for(r=[],s=Array.from(e);s.length;)c=s.shift(),a(c,!1)||("SLOT"===c.tagName?(u=(d=c.assignedElements()).length?d:c.children,h=l(u,!0,i),i.flatten?r.pu
1sh.apply(r,h):r.push({scopeParent:c,candidates:h})):(o.call(c,n)&&i.filter(c)&&(t||!e.includes(c))&&r.push(c),p=c.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(c),f=!a(p,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c)),p&&f?(m=l(!0===p?c.children:p.children,!0,i),i.flatten?r.push.apply(r,m):r.push({scopeParent:c,candidates:m})):s.unshift.apply(s,c.children)));return r},c=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},d=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!c(e)?0:e.tabIndex},u=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},h=function(e){return"INPUT"===e.tagName},p=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return 0===n&&0===i},f=function(e,t){return!(t.disabled||function(e){return h(e)&&"hidden"===e.type}(t)||function(e,t){var n,i,a,s,l,c=t.displayCheck,d=t.getShadowRoot;if("full-native"===c&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===(n=getComputedStyle(e).visibility)||"collapse"===n)return!0;if(i=o.call(e,"details>summary:first-of-type")?e.parentElement:e,o.call(i,"details:not([open]) *"))return!0;if(c&&"full"!==c&&"full-native"!==c&&"legacy-full"!==c){if("non-zero-area"===c)return p(e)}else{if("function"==typeof d){for(a=e;e;){if(s=e.parentElement,l=r(e),s&&!s.shadowRoot&&!0===d(s))return p(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=a}if(function(e){var t,n,i,o,a,s,l,c=e&&r(e),d=null===(t=c)||void 0===t?void 0:t.host,u=!1;if(c&&c!==e)for(u=!!(null!==(n=d)&&void 0!==n&&null!==(i=n.ownerDocument)&&void 0!==i&&i.contains(d)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&d;)u=!(null===(s=d=null===(a=c=r(d))||void 0===a?void 0:a.host)||void 0===s||null===(l=s.ownerDocument)||void 0===l||!l.contains(d));return u}(e))return!e.getClientRects().length;if("legacy-full"!==c)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){var t,n,i;if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(n=0;n<t.children.length;n++)if("LEGEND"===(i=t.children.item(n)).tagName)return!!o.call(t,"fieldset[disabled] *")||!i.contains(e);return!0}t=t.parentElement}return!1}(t))},m=function(e,t){return!(function(e){return function(e){return h(e)&&"radio"===e.type}(e)&&!function(e){var t,n,i,o;if(!e.name)return!0;if(n=e.form||r(e),i=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')},"undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}return o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form),!o||o===e}(e)}(t)||d(t)<0||!f(e,t))},g=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},b=function(e){var t=[],n=[];return e.forEach((function(e,i){var o=!!e.scopeParent,r=o?e.scopeParent:e,a=function(e,t){var n=d(e);return n<0&&t&&!c(e)?0:n}(r,o),s=o?b(e.candidates):r;0===a?o?t.push.apply(t,s):t.push(r):n.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:s})})),n.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(t)},v=t.concat("iframe:not([inert]):not([inert] *)").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:f.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,f.bind(null,t))},e.getTabIndex=d,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,v)&&f(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,n)&&m(t,e)},e.tabbable=function(e,t){var n;return n=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:m.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):s(e,t.includeContainer,m.bind(null,t)),b(n)}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core"],(function(e,t,n,i){"use strict";function o(e){return r(e).mql.matches}function r(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");p.has(e)&&(e=p.get(e)),h.has(e)&&(e=h.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(a),s.set(e,t),e!==t.mql.media&&p.set(t.mql.media,e)),t}function a(e){const t=r(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()}
1)),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.on=function(e,t){const n=i.getUuid(),o=r(e);return"function"==typeof t.match&&o.callbacksMatch.set(n,t.match),"function"==typeof t.unmatch&&o.callbacksUnmatch.set(n,t.unmatch),"function"==typeof t.setup&&(o.mql.matches?t.setup():o.callbacksSetup.set(n,t.setup)),n},t.remove=function(e,t){const n=r(e);n.callbacksMatch.delete(t),n.callbacksUnmatch.delete(t),n.callbacksSetup.delete(t)},t.is=o,t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");o("screen-md-down")&&(e.style.removeProperty("position"),e.style.removeProperty("top")),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){},i=n.__importStar(i);const s=new Map;let l,c=0,d=0,u=0;const h=new Map(Object.entries({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),p=new Map})),define("WoltLabSuite/Core/Element/woltlab-core-dialog",["require","exports","tslib","tabbable","../Dom/Util","../Helper/PageOverlay","../Language","../Ui/Screen"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogElement=void 0,o=n.__importDefault(o),a=n.__importStar(a);const l=document.createElement("div");class c extends HTMLElement{#c;#e;#d;#u;constructor(){super(),this.#c=document.createElement("div"),this.#e=document.createElement("dialog"),this.#u=document.createElement("div")}show(e){if(0===e.trim().length)throw new Error("Cannot open the modal dialog without a title.");if(this.#u.textContent=e,this.open)return;null===l.parentElement&&document.getElementById("content").append(l),this.parentElement!==l&&l.append(this),this.#e.showModal(),(0,r.adoptPageOverlayContainer)(this.#e),(0,s.scrollDisable)();const t=(0,i.tabbable)(this.#e);t.length>0&&t[0].focus()}close(){this.#e.close(),this.#h()}#h(){if(null===this.parentNode)return;const e=new CustomEvent("afterClose");this.dispatchEvent(e),(0,r.releasePageOverlayContainer)(this.#e),(0,s.scrollEnable)(),this.remove()}get dialog(){return this.#e}get content(){return this.#c}get open(){return this.#e.open}get incomplete(){return this.hasAttribute("incomplete")}set incomplete(e){e?this.setAttribute("incomplete",""):this.removeAttribute("incomplete")}attachControls(e){if(void 0!==this.#d)throw new Error("There is already a form control attached to this dialog.");void 0!==e.extra&&void 0===e.cancel&&(e.cancel="");const t=document.createElement("woltlab-core-dialog-control");t.primary=e.primary,void 0!==e.cancel&&(t.cancel=e.cancel),void 0!==e.extra&&(t.extra=e.extra),this.#d=document.createElement("form"),this.#d.method="dialog",this.#d.classList.add("dialog__form"),this.#c.insertAdjacentElement("beforebegin",this.#d),this.#d.append(this.#c,t),e.isAlert&&(void 0===e.cancel?this.#e.setAttribute("role","alert"):this.#e.setAttribute("role","alertdialog")),this.#d.addEventListener("submit",(e=>{if(this.incomplete)return void e.preventDefault();const t=new CustomEvent("validate",{cancelable:!0,detail:[]});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():t.detail.length>0?(e.preventDefault(),this.incomplete=!0,Promise.all(t.detail).then((e=>{this.incomplete=!1,e.some((e=>!1===e))||(this.#p(),this.#f()&&this.close())}))):this.#f()||(e.preventDefault(),this.#p())})),this.#e.addEventListener("close",(()=>{""===this.#e.returnValue||this.#p(),this.#h()})),t.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this.#f()&&this.close()})),void 0!==e.extra&&t.addEventListener("extra",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)}))}#p(){const e=new CustomEvent("primary");this.dispatchEvent(e)}connectedCallback(){if(null!==this.#e.parentElement)return;let e;const t=this.#e.getAttribute("role");"alert"!==t&&"alertdialog"!==t&&(e=document.createElement("button"),e.type="button",e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>
1',e.classList.add("dialog__closeButton","jsTooltip"),e.title=a.get("wcf.dialog.button.close"),e.addEventListener("click",(()=>{if(this.#f()){const e=new CustomEvent("cancel",{cancelable:!1});this.dispatchEvent(e),this.close()}})));const n=document.createElement("div");n.classList.add("dialog__header"),this.#u.classList.add("dialog__title"),n.append(this.#u),e&&n.append(e);const i=document.createElement("div");i.classList.add("dialog__document"),i.setAttribute("role","document"),i.append(n),this.#c.classList.add("dialog__content"),this.#d?i.append(this.#d):i.append(this.#c),this.#e.append(i),this.#e.classList.add("dialog"),this.#e.setAttribute("aria-labelledby",o.default.identify(this.#u)),this.#e.addEventListener("cancel",(e=>{const t=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():this.#f()?this.close():e.preventDefault()})),this.#e.addEventListener("mousedown",(e=>{if(e.target===this.#e){const e=new CustomEvent("backdrop",{cancelable:!0});if(this.dispatchEvent(e),e.defaultPrevented)return;this.#f()&&this.close()}})),this.append(this.#e)}#f(){const e=new CustomEvent("close",{cancelable:!0});return this.dispatchEvent(e),!1===e.defaultPrevented}}t.WoltlabCoreDialogElement=c,window.customElements.define("woltlab-core-dialog",c),t.default=c})),define("WoltLabSuite/Core/Element/woltlab-core-dialog-control",["require","exports","tslib","../Language"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogControlElement=void 0,i=n.__importStar(i);class o extends HTMLElement{#m;#g;#b;constructor(){super(),new ResizeObserver((()=>{this.#v()})).observe(this)}set primary(e){this.setAttribute("primary",e)}get primary(){let e=this.getAttribute("primary");return e||(e=i.get("wcf.dialog.button.primary")),e}set cancel(e){void 0===e?this.removeAttribute("cancel"):this.setAttribute("cancel",e)}get cancel(){let e=this.getAttribute("cancel");if(null!==e)return""===e&&(e=i.get("wcf.global.confirmation.cancel")),e}set extra(e){void 0===e?this.removeAttribute("extra"):this.setAttribute("extra",e)}get extra(){const e=this.getAttribute("extra");if(null!==e)return e}connectedCallback(){const e=this.closest("woltlab-core-dialog");this.classList.add("dialog__control"),this.hasAttribute("primary")||this.setAttribute("primary",""),void 0===this.#b&&(this.#b=document.createElement("button"),this.#b.type="submit",this.#b.value="primary",this.#b.autofocus=!0,this.#b.classList.add("button","buttonPrimary","dialog__control__button","dialog__control__button--primary"),this.#b.textContent=this.primary,this.append(this.#b),new MutationObserver((()=>{this.#b.disabled=e.incomplete})).observe(e,{attributeFilter:["incomplete"]}),e.incomplete&&(this.#b.disabled=!0)),void 0===this.#m&&void 0!==this.cancel&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.value="cancel",this.#m.classList.add("button","dialog__control__button","dialog__control__button--cancel"),this.#m.textContent=this.cancel,this.#m.addEventListener("click",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e)})),this.append(this.#m),e.addEventListener("backdrop",(e=>{e.preventDefault(),this.#m.click()}))),void 0===this.#g&&void 0!==this.extra&&(this.#g=document.createElement("button"),this.#g.type="button",this.#g.value="extra",this.#g.classList.add("button","dialog__control__button","dialog__control__button--extra"),this.#g.textContent=this.extra,this.#g.addEventListener("click",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)})),this.append(this.#g)),this.#v()}#v(){const e=void 0!==this.#m,t=void 0!==this.#g;if(!e)return;const n=parseInt(window.getComputedStyle(this).columnGap.replace(/^px/,""),10),i=this.#b.clientWidth+n+this.#m.clientWidth,o=t?n+this.#g.clientWidth:0;t?i>this.clientWidth?(this.classList.add("dialog__control--tripple-stacked"),this.classList.remove("dialog__control--extra-stacked")):i+o>this.clientWidth?(this.classList.add("dialog__control--extra-stacked"),this.classList.remove("dialog__control--tripple-stacked")):this.classList.remove("dialog__control--tripple-stacked","dialog__control--extra-stacked"):i>this.clientWidth?this.classList.add("dialog__control--duo-stacked"):this.classList.remove("dialog__control--duo-stacked")}}t.WoltlabCoreDialogControlElement=o,window.customElements.define("woltlab-core-dialog-control",o),t.default=o})),define("WoltLabSuite/Core/Component/Dialog",["require","exports","./Dialog/Setup","../Element/woltlab-core-dialog","../Element/woltlab-core-dialog-control"],(function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.dialogFactory=function(){return new n.DialogSetup}})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Language","../Component/Dialog","../StringUtil"],(function(e,t,n,i,o,r,a,s,l){"use strict";i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);let c=!1,d=!1;return class{_options;_data;_xhr;constructor(e){this._options=o.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),c||(c=!0,window.addEventListener("beforeunload",(()=>d=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||i.show(),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.responseType&&this._xhr.setRequestHeader("Accept",this._options.responseType),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=o.clone(this._options),n=this._xhr;if(n.onload=()=>{n.readyState===XMLHttpRequest.DONE&&(n.status>=200&&n.status<300||304===n.status?204===n.status?this._success(n,t):t.responseType&&this.getContentType(n)!==t.responseType?this._failure(n,t):this._success(n,t):this._failure(n,t))},n.onerror=()=>{this._failure(n,t)},this._options.progress&&(n.onprogress=this._options.progress),this._options.uploadProgress&&(n.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==o.getType(e)&&(e=o.serialize(e)),n.send(e)}else n.send()}abortPrevious(){void 0!==this._xhr&&(this._xhr.abort(),this._xhr=void 0,this._options.silent||i.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==o.getType(e)&&(e=o.extend(this._data,e)),this._options.data=e}_success(t,o){if(o.silent||i.hide(),"function"==typeof o.success){let i=null;if("application/json"===this.getContentType(t)){try{i=JSON.parse(t.responseText)}catch{return void this._failure(t,o)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim()),"yes"===t.getResponseHeader("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke()))}o.success(i||{},t.responseText,t,o.data)}this._finalize(t,o)}_failure(e,t){if(d)return;t.silent||i.hide();let n=null;try{n=JSON.parse(e.responseText)}catch{}let o=!0;if("function"==typeof t.failure&&(o=!1!==t.failure(n||{},e.responseText||"",e,t.data)),!0!==t.ignoreError&&o){const t=this.getErrorHtml(n,e);if(t instanceof HTMLIFrameElement){const e=(0,s.dialogFactory)().fromHtml(`<div class="dialog__iframeC
1ontainer">${t.outerHTML}</div>`).asAlert();e.show(a.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else t&&(0,s.dialogFactory)().fromHtml(t).asAlert().show(a.get("wcf.global.error.title"))}this._finalize(e,t)}getErrorHtml(e,t){let n,i="";if(null!==e&&Object.keys(e).length>0)e.returnValues&&e.returnValues.description&&(i+=`<br><p>Description:</p><p>${(0,l.escapeHTML)(e.returnValues.description)}</p>`),e.file&&e.line&&(i+=`<br><p>File:</p><p>${(0,l.escapeHTML)(e.file)} in line ${e.line}</p>`),e.extraInformation&&(i+="<br>",i+=e.extraInformation.map((([e,t])=>`<p>${(0,l.escapeHTML)(e)}: <code>${(0,l.escapeHTML)(t.toString())}</code></p>`)).join("")),e.exception?i+=`<br>Exception: <div style="white-space: pre;">${(0,l.escapeHTML)(e.exception)}</div>`:e.stacktrace?i+=`<br><p>Stacktrace:</p><pre>${(0,l.escapeHTML)(e.stacktrace)}</pre>`:e.exceptionID&&(i+=`<br><p>Exception ID: <code>${(0,l.escapeHTML)(e.exceptionID)}</code></p>`),n=e.message,e.previous&&e.previous.forEach((e=>{i+=`<hr><p>${(0,l.escapeHTML)(e.message)}</p>`,i+=`<br><p>Stacktrace</p><pre>${(0,l.escapeHTML)(e.stacktrace)}</pre>`}));else{if(t.getResponseHeader("content-type")?.startsWith("text/html")){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.sandbox="",e.srcdoc=t.responseText,e}n=(0,l.escapeHTML)(t.responseText)}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return null;n="XMLHttpRequest failed without a responseText. Check your browser console."}return`<div class="ajaxDebugMessage"><p>${n}</p>${i}</div>`}_finalize(e,t){"function"==typeof t.finalize&&t.finalize(e),this._xhr===e&&(this._xhr=void 0),r.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}getContentType(e){const t=e.getResponseHeader("content-type");return null===t?null:t.split(";",1)[0].trim()}}})),define("WoltLabSuite/Core/Ajax/DboAction",["require","exports","tslib","./Error","./Status","../Core"],(function(e,t,n,i,o,r){"use strict";async function a(e){const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new i.ExpectedJson(e);let n;try{n=await e.json()}catch{throw new i.InvalidJson(e)}return n}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.DboAction=void 0,t.handleValidationErrors=async function(e,t){if(!(e instanceof i.StatusNotOk))throw e;const n=e.response.clone();try{const e=await a(n);if(function(e){return"code"in e&&"returnValues"in e}(e)&&412===e.code&&!0===t(e.returnValues))return}catch{}throw e},o=n.__importStar(o),r=n.__importStar(r);class l{#y;#w;#E=[];#o={};#a=!0;#S;constructor(e,t){this.#y=e,this.#w=t}static prepare(e,t){return void 0===s&&(s=!1,window.addEventListener("beforeunload",(()=>{s=!0}))),new l(e,t)}getAbortController(){return void 0===this.#S&&(this.#S=new AbortController),this.#S}objectIds(e){return this.#E=e,this}payload(e){return this.#o=e,this}disableLoadingIndicator(){return this.#a=!1,this}async dispatch(){(0,i.registerGlobalRejectionHandler)();const t=window.WSC_API_URL+"index.php?ajax-proxy/&t="+r.getXsrfToken(),l={actionName:this.#y,className:this.#w};this.#E&&(l.objectIDs=this.#E),this.#o&&(l.parameters=this.#o);const c={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":r.getXsrfToken(),Accept:"application/json"},body:r.serialize(l),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error"};this.#S&&(c.signal=this.#S.signal);const d=this.#a;d&&o.show();try{const o=await fetch(t,c);if(!o.ok)throw new i.StatusNotOk(o);const r=await a(o);return"yes"===o.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),r.returnValues}catch(e){if(e instanceof i.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new i.ConnectionError(e)}finally{d&&o.hide()}}}t.DboAction=l,t.default=l})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request","./Core","./Ajax/DboAction","./Ajax/DboAction"],(function(e,t,n,i,o,r,a){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=void 0,t.api=function(e,t,n,r){"object"!=typeof t&&(t={});let a=s.get(e);if(void 0===a){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),t.withCredentials=!0),a=new i.default(t),s.set(e,a)}let l=null,c=null;return"function"==typeof n&&(l=a.getOption("success"),a.setOption("success",n)),"function"==typeof r&&(c=a.getOption("failure"),a.setOption("failure",r)),a.setData(t),a.sendRequest(),null!==l&&a.setOption("success",l),null!==c&&a.setOption("failure",c),a},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+o.getXsrfToken(),e.withCredentials=!0),new i.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!s.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return s.get(e)},t.dboAction=function(e,t){return r.default.prepare(e,t)},i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r);const s=new WeakMap;Object.defineProperty(t,"handleValidationErrors",{enumerable:!0,get:function(){return a.handleValidationErrors}})})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setUrl=function(e){r||(r=new o(e))},t.invoke=function(){r?r.invoke():console.error("The background queue has not been initialized yet.")},i=n.__importStar(i);class o{_invocations=0;_isBusy=!1;_url;constructor(e){this._url=e}invoke(){this._isBusy||(this._isBusy=!0,i.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let r})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDate=function(e){return r.format(e)},t.formatTime=function(e){return a.format(e)},t.formatDateTime=function(e){return s.format(e)},t.format=function(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let n="";for(let o=0,r=t.length;o<r;o++){let a;switch(t[o]){case"s":a=e.getSeconds().toString().padStart(2,"0");break;case"i":a=e.getMinutes().toString().padStart(2,"0");break;case"a":a=e.getHours()>11?"pm":"am";break;case"g":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString(),a=a.padStart(2,"0");break}case"A":a=e.getHours()>11?"PM":"AM";break;case"G":a=e.getHours().toString();break;case"H":a=e.getHours().toString().padStart(2,"0");break;case"d":a=e.getDate().toString().padStart(2,"0");break;case"j":a=e.getDate().toString();break;case"l":a=i.get("__days")[e.getDay()];break;case"D":a=i.get("__daysShort")[e.getDay()];break;case"S":a="";break;case"m":a=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":a=(e.getMonth()+1).toString();break;case"F":a=i.get("__months")[e.getMonth()];break;case"M":a=i.get("__monthsShort")[e.getMonth()];break;case"y":a=e.getFullYear().toString().slice(-2);break;case"Y":a=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();a=t>0?"-":"+",t=Math.abs(t),a+=(~~(t/60)).toString().padStart(2,"0"),a+=":",a+=(t%60).toString().padStart(2,"0");break}case"r":a=e.toString();break;case"U":a=Math.round(e.getTime()/1e3).toString();break;case"\\":a="",o+1<r&&(a=t[++o]);break;default:a=t[o]}n+=a}return n},t.gmdate=function(e){return e instanceof Date||(e=new Date),Math.round(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDay(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())/1e3)},t.getTimeElement=function(e){const t=document.createElement("woltlab-core-date-time");return t.date=e,e.getTime()>Date.now()&&(t.static=!0),t},t.getTimezoneDate=function(e,t){const n=6e4*new Date(e).getTimezoneOffset();return new Date(e+n+t)},i=n.__importStar(i);const o=document.documentElement.lang,r=new Intl.DateTimeFormat(o,{dateStyle:"long"}),a=new Intl.DateTimeFormat(o,{hour:"numeric",minute:"numeric"}),s=new Intl.DateTimeFormat(o,{year:"numeric",day:"numeric",month:"long",hour:"numeric",minute:"numeric"})})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const i=[];for(let o=0;o<e.childElementCount;o++)r.get(t)(e.children[o],n)&&i.push(e.children[o]);return i}function i(e,t,n,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");let o=e.parentNode;for(;o instanceof Element;){if(o===i)return null;if(r.get(t)(o,n))return o;o=o.parentNode}return null}function o(e,t,n,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&r.get(n)(e[t],i)?e[t]:null}
1Object.defineProperty(t,"__esModule",{value:!0}),t.childBySel=function(e,t){return n(e,1,t)[0]||null},t.childByClass=function(e,t){return n(e,2,t)[0]||null},t.childByTag=function(e,t){return n(e,3,t)[0]||null},t.childrenBySel=function(e,t){return n(e,1,t)},t.childrenByClass=function(e,t){return n(e,2,t)},t.childrenByTag=function(e,t){return n(e,3,t)},t.parentBySel=function(e,t,n){return i(e,1,t,n)},t.parentByClass=function(e,t,n){return i(e,2,t,n)},t.parentByTag=function(e,t,n){return i(e,3,t,n)},t.next=function(e){return o(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return o(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return o(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return o(e,"nextElementSibling",3,t)},t.prev=function(e){return o(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return o(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return o(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return o(e,"previousElementSibling",3,t)};const r=new Map([[0,()=>!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]])})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){if("object"==typeof window.chrome)n="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,i=e.length;t<i;t++){const i=e[t];0===i.indexOf("-ms-")?n="microsoft":0===i.indexOf("-moz-")?n="firefox":"firefox"!==n&&0===i.indexOf("-webkit-")&&(n="safari")}}const e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("crios")?(n="chrome",i="ios"):/(?:iphone|ipad|ipod)/.test(e)?(n="safari",i="ios"):-1!==e.indexOf("android")?i="android":-1!==e.indexOf("iemobile")&&(n="microsoft",i="windows"),"desktop"!==i||-1===e.indexOf("mobile")&&-1===e.indexOf("tablet")||(i="mobile"),o="ontouchstart"in window||"msMaxTouchPoints"in window.navigator&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(n="safari",i="ios")},t.browser=function(){return n},t.platform=function(){return i},t.touch=function(){return o};let n="other",i="desktop",o=!1})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language","../Environment"],(function(e,t,n,i,o,r,a,s){"use strict";function l(e,t,n,i,o,r,a){let s="auto",l="auto",c=!0,d=50;const u=document.getElementById("pageHeaderPanel");if(null!==u){const e=window.getComputedStyle(u).position;d="fixed"===e||"static"===e?u.offsetHeight:0}if(a)if("top"===e){const e=i.top-r;s=o-e,e-t.height<d&&(c=!1)}else l=i.top+n.height+r,l+t.height>o&&(c=!1);else{const a=i.top+window.scrollY;if("top"===e){const{clientHeight:e}=document.body;s=e-a+r,e-(s+t.height)<window.scrollY+d&&(c=!1)}else l=a+n.height+r,l+t.height-window.scrollY>o&&(c=!1)}return{align:e,bottom:s,top:l,result:c}}function c(e,t,n,i,o){let r="auto",a="auto",s=!0;return"left"===e?(r=i.left,r+t.width>o&&(s=!1)):"right"===e?i.left+n.width<t.width?s=!1:(a=o-(i.left+n.width),a<0&&(s=!1)):(r=i.left+n.width/2-t.width/2,r=~~r,(r<0||r+t.width>o)&&(s=!1)),{align:e,left:r,right:a,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=function(e,t,n){let d;n=i.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},n||{}),Array.isArray(n.pointerClassNames)&&n.pointerClassNames.length===(n.pointer?1:2)||(n.pointerClassNames=[]),-1===["left","right","center"].indexOf(n.horizontal)&&(n.horizontal="left"),"bottom"!==n.vertical&&(n.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(n.allowFlip)&&(n.allowFlip="both"),"none"===window.getComputedStyle(e).display&&(d=e.style.getPropertyValue("display"),e.style.setProperty("display","block")),r.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const u=r.default.outerDimensions(e),h=r.default.outerDimensions(n.refDimensionsElement instanceof HTMLElement?n.refDimensionsElement:t),p=t.getBoundingClientRect(),f=window.innerHeight,m=document.body.clientWidth;let g=null,b=!1;if("center"===n.horizontal&&(b=!0,g=c(n.horizontal,u,h,p,m),g.result||("both"===n.allowFlip||"horizontal"===n.allowFlip?n.horizontal="left":g.result=!0)),"rtl"===a.get("wcf.global.pageDirection")&&(n.horizontal="left"===n.horizontal?"right":"left"),null===g||!g.result){const e=g;if(g=c(n.horizontal,u,h,p,m),!g.result&&("both"===n.allowFlip||"horizontal"===n.allowFlip)){const t=c("left"===n.horizontal?"right":"left",u,h,p,m);if(t.result)g=t;else if(b)g=e;else if(u.width===m)g={align:"left",left:0,result:!0,right:0};else if(u.width<m){const e=m-(p.left+h.width),t=p.left<=e;g={align:t?"left":"right",left:t?0:"auto",result:!0,right:t?"auto":0}}}}const v="fixed"===window.getComputedStyle(e).position,y=g.left,w=g.right;let E=l(n.vertical,u,h,p,f,n.verticalOffset,v);if(!E.result&&("both"===n.allowFlip||"vertical"===n.allowFlip)){const e=l("top"===n.vertical?"bottom":"top",u,h,p,f,n.verticalOffset,v);if(e.result)E=e;else if("desktop"!==s.platform())if(u.height===f)E={align:"top",bottom:0,result:!0,top:0};else if(u.height<f){const e=f-(p.top+h.height),t=p.top<=e;E={align:t?"top":"bottom",bottom:t?0:"auto",result:!0,top:t?"auto":0}}}const S=E.bottom,_=E.top;if(n.pointer){const t=o.childrenByClass(e,"elementPointer")[0]||null;if(null===t)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===g.align?(t.classList.add("center"),t.classList.remove("left","right")):(t.classList.add(g.align),t.classList.remove("center"),t.classList.remove("left"===g.align?"right":"left")),"top"===E.align?t.classList.add("flipVertical"):t.classList.remove("flipVertical")}else 2===n.pointerClassNames.length&&(e.classList["auto"===_?"add":"remove"](n.pointerClassNames[0]),e.classList["auto"===y?"add":"remove"](n.pointerClassNames[1]));r.default.setStyles(e,{bottom:"auto"===S?S:Math.round(S).toString()+"px",left:"auto"===y?y:Math.ceil(y).toString()+"px",right:"auto"===w?w:Math.floor(w).toString()+"px",top:"auto"===_?_:Math.round(_).toString()+"px"}),r.default.show(e),e.style.removeProperty("visibility"),void 0!==d&&(""===d?e.style.removeProperty("display"):e.style.setProperty("display",d))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s)})),define("WoltLabSuite/Core/Ui/CloseOverlay",["require","exports","tslib","../CallbackList"],(function(e,t,n,i){"use strict";function o(e,t){s.add(e,t),c||(document.body.addEventListener("click",(()=>{a(l.Document)})),c=!0)}function r(e){s.remove(e)}
1function a(e,t){s.forEach(null,(n=>n(e,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.Origin=void 0,t.add=o,t.remove=r,t.execute=a;const s=new((i=n.__importDefault(i)).default);var l;!function(e){e.Document="document",e.DropDown="dropdown",e.Search="search"}(l||(t.Origin=l={}));let c=!1;const d={add:o,remove:r,execute:a};t.default=d})),function(e,t){var n,i;"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define("focus-trap",["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.focusTrap,t(i=e.focusTrap={},e.tabbable),i.noConflict=function(){return e.focusTrap=n,i})}(this,(function(e,t){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(e,t){var n,i,o,r,a,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!s){if(Array.isArray(e)||(s=l(e))||t)return s&&(e=s),n=0,{s:i=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return r=!0,a=!1,{s:function(){s=s.call(e)},n:function(){var e=s.next();return r=e.done,e},e:function(e){a=!0,o=e},f:function(){try{r||null==s.return||s.return()}finally{if(a)throw o}}}}function o(e,t,n){return(t=function(e){var t=function(e,t){var n,i;if("object"!=typeof e||!e)return e;if(void 0!==(n=e[Symbol.toPrimitive])){if("object"!=typeof(i=n.call(e,"string")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)),i}function a(e){var t,n;for(t=1;t<arguments.length;t++)n=null!=arguments[t]?arguments[t]:{},t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}));return e}function s(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}var c={getActiveTrap:function(e){return(null==e?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){t!==c.getActiveTrap(e)&&c.pauseTrap(e);var n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),c.unpauseTrap(e)},pauseTrap:function(e){var t=c.getActiveTrap(e);null==t||t._setPausedState(!0)},unpauseTrap:function(e){var t=c.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},d=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},u=function(e){return d(e)&&!e.shiftKey},h=function(e){return d(e)&&e.shiftKey},p=function(e){return setTimeout(e,0)},f=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return"function"==typeof e?e.apply(void 0,n):e},m=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},g=[];e.createFocusTrap=function(e,n){var o,r=(null==n?void 0:n.document)||document,l=(null==n?void 0:n.trapStack)||g,b=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:u,isKeyBackward:h},n),v={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},y=function(e,t,n){return e&&void 0!==e[t]?e[t]:b[n||t]},w=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return v.containerGroups.findIndex((function(t){var i=t.container,o=t.tabbableNodes;return i.contains(e)||(null==n?void 0:n.includes(i))||o.find((function(t){return t===e}))}))},E=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.hasFallback,o=void 0!==i&&i,a=n.params,l=void 0===a?[]:a,c=b[e];if("function"==typeof c&&(c=c.apply(void 0,s(l))),!0===c&&(c=void 0),!c){
1if(void 0===c||!1===c)return c;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}if(t=c,"string"==typeof c){try{t=r.querySelector(c)}catch(n){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(n.message,'"'))}if(!t&&!o)throw new Error("`".concat(e,"` as selector refers to no known node"))}return t},S=function(e){var t=e.activeElement;return t?t.shadowRoot&&null!==t.shadowRoot.activeElement?S(t.shadowRoot):t:null},_=function(){var e,n,i=E("initialFocus",{hasFallback:!0});if(!1===i)return!1;if(void 0===i||i&&!t.isFocusable(i,b.tabbableOptions)?(e=S(r),i=w(e)>=0?e:(n=v.tabbableGroups[0])&&n.firstTabbableNode||E("fallbackFocus")):null===i&&(i=E("fallbackFocus")),!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},C=function(){if(v.containerGroups=v.containers.map((function(e){var n=t.tabbable(e,b.tabbableOptions),i=t.focusable(e,b.tabbableOptions),o=n.length>0?n[0]:void 0,r=n.length>0?n[n.length-1]:void 0,a=i.find((function(e){return t.isTabbable(e)})),s=i.slice().reverse().find((function(e){return t.isTabbable(e)})),l=!!n.find((function(e){return t.getTabIndex(e)>0}));return{container:e,tabbableNodes:n,focusableNodes:i,posTabIndexesFound:l,firstTabbableNode:o,lastTabbableNode:r,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.indexOf(e);return r<0?o?i.slice(i.indexOf(e)+1).find((function(e){return t.isTabbable(e)})):i.slice(0,i.indexOf(e)).reverse().find((function(e){return t.isTabbable(e)})):n[r+(o?1:-1)]}}})),v.tabbableGroups=v.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),v.tabbableGroups.length<=0&&!E("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(v.containerGroups.find((function(e){return e.posTabIndexesFound}))&&v.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},A=function(e){!1!==e&&e!==S(document)&&(e&&e.focus?(e.focus({preventScroll:!!b.preventScroll}),v.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):A(_()))},L=function(e){var t=E("setReturnFocus",{params:[e]});return t||!1!==t&&e},I=function(e){var n,i,o,r,a,s,l,c,u,h=e.target,p=e.event,f=e.isBackward,g=void 0!==f&&f;return h=h||m(p),C(),n=null,v.tabbableGroups.length>0?(o=(i=w(h,p))>=0?v.containerGroups[i]:void 0,i<0?n=g?v.tabbableGroups[v.tabbableGroups.length-1].lastTabbableNode:v.tabbableGroups[0].firstTabbableNode:g?(r=v.tabbableGroups.findIndex((function(e){var t=e.firstTabbableNode;return h===t})),r<0&&(o.container===h||t.isFocusable(h,b.tabbableOptions)&&!t.isTabbable(h,b.tabbableOptions)&&!o.nextTabbableNode(h,!1))&&(r=i),r>=0?(a=0===r?v.tabbableGroups.length-1:r-1,s=v.tabbableGroups[a],n=t.getTabIndex(h)>=0?s.lastTabbableNode:s.lastDomTabbableNode):d(p)||(n=o.nextTabbableNode(h,!1))):(l=v.tabbableGroups.findIndex((function(e){var t=e.lastTabbableNode;return h===t})),l<0&&(o.container===h||t.isFocusable(h,b.tabbableOptions)&&!t.isTabbable(h,b.tabbableOptions)&&!o.nextTabbableNode(h))&&(l=i),l>=0?(c=l===v.tabbableGroups.length-1?0:l+1,u=v.tabbableGroups[c],n=t.getTabIndex(h)>=0?u.firstTabbableNode:u.firstDomTabbableNode):d(p)||(n=o.nextTabbableNode(h)))):n=E("fallbackFocus"),n},x=function(e){var t=m(e);w(t,e)>=0||(f(b.clickOutsideDeactivates,e)?o.deactivate({returnFocus:b.returnFocusOnDeactivate}):f(b.allowOutsideClick,e)||e.preventDefault())},k=function(e){var n,i,o,r,a,s=m(e),l=w(s,e)>=0;l||s instanceof Document?l&&(v.mostRecentlyFocusedNode=s):(e.stopImmediatePropagation(),i=!0,v.mostRecentlyFocusedNode?t.getTabIndex(v.mostRecentlyFocusedNode)>0?(o=w(v.mostRecentlyFocusedNode),(r=v.containerGroups[o].tabbableNodes).length>0&&(a=r.findIndex((function(e){return e===v.mostRecentlyFocusedNode})),a>=0&&(b.isKeyForward(v.recentNavEvent)?a+1<r.length&&(n=r[a+1],i=!1):a-1>=0&&(n=r[a-1],i=!1)))):v.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return t.getTabIndex(e)>0}))}))||(i=!1):i=!1,i&&(n=I({target:v.mostRecentlyFocusedNode,isBackward:b.isKeyBackward(v.recentNavEvent)})),A(n||v.mostRecentlyFocusedNode||_())),v.recentNavEvent=void 0},T=function(e){(b.isKeyForward(e)||b.isKeyBackward(e))&&function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];v.recentNavEvent=e,(t=I({event:e,isBackward:n}))&&(d(e)&&e.preventDefault(),A(t))}(e,b.isKeyBackward(e))},M=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===f(b.escapeDeactivates,e)||(e.preventDefault(),o.deactivate())},P=function(e){var t=m(e);w(t,e)>=0||f(b.clickOutsideDeactivates,e)||f(b.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},D=function(){var e;if(v.active)return c.activateTrap(l,o),b.delayInitialFocus?e=new Promise((function(e){v.delayInitialFocusTimer=p((function(){A(_()),e()}))})):A(_()),r.addEventListener("focusin",k,!0),r.addEventListener("mousedown",x,{capture:!0,passive:!1}),r.addEventListener("touchstart",x,{capture:!0,passive:!1}),r.addEventListener("click",P,{capture:!0,passive:!1}),r.addEventListener("keydown",T,{capture:!0,passive:!1}),r.addEventListener("keydown",M),e},B=function(){if(v.active)return r.removeEventListener("focusin",k,!0),r.removeEventListener("mousedown",x,!0),r.removeEventListener("touchstart",x,!0),r.removeEventListener("click",P,!0),r.removeEventListener("keydown",T,!0),r.removeEventListener("keydown",M),o},O="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){var t,n=v.mostRecentlyFocusedNode;
1n&&e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===n||"function"==typeof e.contains&&e.contains(n)}))}))&&v.containers.some((function(e){return null==e?void 0:e.isConnected}))&&(C(),t=_(),A(t))})):void 0,R=function(){O&&(O.disconnect(),v.active&&!v.paused&&v.containers.map((function(e){O.observe(e,{subtree:!0,childList:!0})})))};return o={get active(){return v.active},get paused(){return v.paused},activate:function(e){var t,n,i,a,s,d,u,h;if(v.active)return this;n=y(e,"onActivate"),i=y(e,"onPostActivate"),a=y(e,"checkCanFocusTrap"),d=!1,(s=c.getActiveTrap(l))&&!s.paused&&(null===(t=s._setSubtreeIsolation)||void 0===t||t.call(s,!1),d=!0);try{if(a||C(),v.active=!0,v.paused=!1,v.nodeFocusedBeforeActivation=S(r),null==n||n({trap:o}),u=function(){a&&C();var e=function(){o._setSubtreeIsolation(!0),R(),null==i||i({trap:o})},t=D();t?t.then(e):e()},a)return a(v.containers.concat()).then(u,u),this;u()}catch(e){throw s===c.getActiveTrap(l)&&d&&(null===(h=s._setSubtreeIsolation)||void 0===h||h.call(s,!0)),e}return this},deactivate:function(e){var t,n,i,r,s,d,u,h;return v.active?(t=a({onDeactivate:b.onDeactivate,onPostDeactivate:b.onPostDeactivate,checkCanReturnFocus:b.checkCanReturnFocus},e),clearTimeout(v.delayInitialFocusTimer),v.delayInitialFocusTimer=void 0,v.paused||o._setSubtreeIsolation(!1),v.alreadySilent.clear(),B(),v.active=!1,v.paused=!1,R(),c.deactivateTrap(l,o),n=y(t,"onDeactivate"),i=y(t,"onPostDeactivate"),r=y(t,"checkCanReturnFocus"),s=y(t,"delayReturnFocus"),d=y(t,"returnFocus","returnFocusOnDeactivate"),null==n||n({trap:o}),u=function(){d&&A(L(v.nodeFocusedBeforeActivation)),null==i||i({trap:o})},h=function(){s&&d?p(u):u()},d&&r?(r(L(v.nodeFocusedBeforeActivation)).then(h,h),this):(h(),this)):this},pause:function(e){return v.active?(v.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return v.active?(v.manuallyPaused=!1,l[l.length-1]!==this?this:this._setPausedState(!1,e)):this}
1,updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return v.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),b.isolateSubtrees&&function(e){var t,n,r,a,s,l,c,d,u,h,p,f;v.active&&!v.paused&&o._setSubtreeIsolation(!1),v.adjacentElements.clear(),v.alreadySilent.clear(),n=new Set,r=new Set,a=i(e);try{for(a.s();!(t=a.n()).done;)for(s=t.value,n.add(s),l="undefined"!=typeof ShadowRoot&&s.getRootNode()instanceof ShadowRoot,c=s;c;){n.add(c),d=c.parentElement,u=[],d?u=d.children:!d&&l&&(u=c.getRootNode().children,d=c.getRootNode().host,l="undefined"!=typeof ShadowRoot&&d.getRootNode()instanceof ShadowRoot),p=i(u);try{for(p.s();!(h=p.n()).done;)f=h.value,r.add(f)}catch(e){p.e(e)}finally{p.f()}c=d}}catch(e){a.e(e)}finally{a.f()}n.forEach((function(e){r.delete(e)})),v.adjacentElements=r}(v.containers),v.active&&(C(),v.paused||o._setSubtreeIsolation(!0)),R(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function(){return v.manuallyPaused}},_setPausedState:{value:function(e,t){var n,i,r,a;return v.paused===e||(v.paused=e,e?(n=y(t,"onPause"),i=y(t,"onPostPause"),null==n||n({trap:o}),B(),o._setSubtreeIsolation(!1),R(),null==i||i({trap:o})):(r=y(t,"onUnpause"),a=y(t,"onPostUnpause"),null==r||r({trap:o}),function(){C();var e=function(){o._setSubtreeIsolation(!0),R(),null==a||a({trap:o})},t=D();t?t.then(e):e()}())),this}},_setSubtreeIsolation:{value:function(e){b.isolateSubtrees&&v.adjacentElements.forEach((function(t){var n;e?"aria-hidden"===b.isolateSubtrees?("true"!==t.ariaHidden&&"true"!==(null===(n=t.getAttribute("aria-hidden"))||void 0===n?void 0:n.toLowerCase())||v.alreadySilent.add(t),t.setAttribute("aria-hidden","true")):((t.inert||t.hasAttribute("inert"))&&v.alreadySilent.add(t),t.setAttribute("inert",!0)):v.alreadySilent.has(t)||("aria-hidden"===b.isolateSubtrees?t.removeAttribute("aria-hidden"):t.removeAttribute("inert"))}))}}}),o.updateContainerElements(e),o}})),define("WoltLabSuite/Core/Helper/Selector",["require","exports"],(function(e,t){"use strict";function n(e){for(const[t,n]of a.entries()){e.matches(t)&&i(e,n);const o=e.querySelectorAll(t);for(const e of o)i(e,n)}}function i(e,t){for(const n of t)n(e)}function o(e,t){a.has(e)||a.set(e,[]),a.get(e).push(t),n(document.body),void 0===r&&(r=new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)})),r.observe(document,{subtree:!0,childList:!0}))}let r;Object.defineProperty(t,"__esModule",{value:!0}),t.wheneverSeen=o,t.wheneverFirstSeen=function(e,t){const n=new WeakSet;o(e,(e=>{n.has(e)||(n.add(e),t(e))}))};const a=new Map})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util","../Helper/PageOverlay","focus-trap","../Helper/Selector"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h){"use strict";function p(e,t,n){const i=n?"minDate":"maxDate";let o=(e.dataset[i]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(o))o=new Date(o).getTime().toString();else if("now"===o)o=t.getTime().toString();else if(/^\d{1,3}$/.exec(o)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~o*(n?-1:1)),o=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(o)){if(o=RegExp.$1,null===document.getElementById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}-\d{2}-\d{2}T/.test(o)?new Date(o).getTime().toString():new Date(n?1902:2038,0,1).getTime().toString();e.dataset[i]=o}function f(e){let t=M.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function m(e){e.stopPropagation(),function(){if(null!==U)return;U=document.createElement("div"),U.className="datePicker",U.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");U.appendChild(e),N=document.createElement("button"),N.type="button",N.className="previous jsTooltip",N.title=a.get("wcf.date.datePicker.previousMonth"),N.setAttribute("aria-label",a.get("wcf.date.datePicker.previousMonth")),N.innerHTML='<fa-icon name="arrow-left" solid></fa-icon>',N.addEventListener("click",(()=>$.previousMonth())),e.appendChild(N);const t=document.createElement("span");e.appendChild(t),R=document.createElement("select"),R.className="month jsTooltip",R.title=a.get("wcf.date.datePicker.month"),R.setAttribute("aria-label",a.get("wcf.date.datePicker.month")),R.addEventListener("change",w),t.appendChild(R);let n="";const i=new Intl.DateTimeFormat(document.documentElement.lang,{month:"long"});for(let e=0;e<12;e++)n+=`<option value="${e}">${i.format(new Date(2e3,e,15))}</option>`;R.innerHTML=n,q=document.createElement("select"),q.className="year jsTooltip",q.title=a.get("wcf.date.datePicker.year"),q.setAttribute("aria-label",a.get("wcf.date.datePicker.year")),q.addEventListener("change",E),t.appendChild(q),j=document.createElement("button"),j.type="button",j.className="next jsTooltip",j.title=a.get("wcf.date.datePicker.nextMonth"),j.setAttribute("aria-label",a.get("wcf.date.datePicker.nextMonth")),j.innerHTML='<fa-icon name="arrow-right" solid></fa-icon>',j.addEventListener("click",(()=>$.nextMonth())),e.appendChild(j),D=document.createElement("ul"),U.appendChild(D);const o=document.createElement("li");o.className="weekdays",D.appendChild(o);const r=new Intl.DateTimeFormat(document.documentElement.lang,{weekday:"short"}),s=new Date,l=s.getDay()-I;for(let e=0;e<7;e++){const t=e-l,n=new Date((new Date).setDate(s.getDate()+t)),i=document.createElement("span");i.textContent=r.format(n),o.appendChild(i)}for(let e=0;e<6;e++){const e=document.createElement("li");D.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",S),P.push(t),e.appendChild(t)}}F=document.createElement("footer"),U.appendChild(F),B=document.createElement("select"),B.className="hour",B.title=a.get("wcf.date.datePicker.hour"),B.setAttribute("aria-label",a.get("wcf.date.datePicker.hour")),B.addEventListener("change",y);const c=new Date(2e3,0,1),h=new Intl.DateTimeFormat(document.documentElement.lang,{hour:"numeric"});let p="";for(let e=0;e<24;e++){c.setHours(e);let t=h.formatToParts(c);const n=t.some((e=>"dayPeriod"===e.type));2!==t.length||n||(t=t.filter((e=>"literal"!==e.type))),p+=`<option value="${e}">${t.map((e=>e.value)).join("")}</option>`}B.innerHTML=p,F.appendChild(B),F.appendChild(document.createTextNode("Â :Â ")),O=document.createElement("select"),O.className="minute",O.title=a.get("wcf.date.datePicker.minute"),O.setAttribute("aria-label",a.get("wcf.date.datePicker.minute")),O.addEventListener("change",y),p="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;p+=`<option value="${e}">${t}</option>`}O.innerHTML=p,F.appendChild(O),(0,d.getPageOverlayContainer)().appendChild(U),C=(0,u.createFocusTrap)(U,{allowOutsideClick:!0,escapeDeactivates:()=>(g(),!1)})}();const t=e.currentTarget,n="INPUT"===t.nodeName?t:t.previousElementSibling;if(n===M)return void g();const o=n.closest(".dialogContent");null!==o&&(i.stringToBool(o.dataset.hasDatepickerScrollListener||"")||(o.addEventListener("scroll",b),o.dataset.hasDatepickerScrollListener="1")),M=n;const r=x.get(M),l=M.dataset.value;
1let c;l?(c=new Date(parseInt(l,10)),"Invalid Date"===c.toString()&&(c=new Date)):c=new Date,T=f("minDate"),T.getTime()>c.getTime()&&(c=T),k=f("maxDate"),M.dataset.maxDate&&k.getTime()<c.getTime()&&(c=k),r.isDateTime?(B.value=c.getHours().toString(),O.value=c.getMinutes().toString(),U.classList.add("datePickerTime")):U.classList.remove("datePickerTime"),U.classList[r.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),function(e,t,n){v(e,t,n);let i="";for(let e=T.getFullYear(),t=k.getFullYear();e<=t;e++)i+=`<option value="${e}">${e}</option>`;q.innerHTML=i,q.value=n.toString(),R.value=t.toString(),U.classList.add("active")}(c.getDate(),c.getMonth(),c.getFullYear()),A=()=>{s.set(U,M)},A(),window.addEventListener("scroll",A,{passive:!1}),M.nextElementSibling.setAttribute("aria-expanded","true"),C.activate()}function g(){if(null===U||!U.classList.contains("active"))return;U.classList.remove("active");const e=x.get(M);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:M}),void 0!==A&&(window.removeEventListener("scroll",A),A=void 0),M.nextElementSibling.setAttribute("aria-expanded","false"),M=null,C.deactivate()}function b(e){if(null===M)return;const t=e.currentTarget,n=c.default.offset(M),i=c.default.offset(t);n.top+M.clientHeight<=i.top||n.top>=i.top+t.offsetHeight||n.left<=i.left||n.left>=i.left+t.offsetWidth?g():s.set(U,M)}function v(e,t,n){const i=void 0!==e,r=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||D.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof n&&(n=parseInt(n||"0",10)),r||n){let a=0!==n;const s=document.createDocumentFragment();s.appendChild(D),r||(t=parseInt(D.dataset.month,10)),n||(n=parseInt(D.dataset.year,10));let l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(l<T?(n=T.getFullYear(),t=T.getMonth(),e=T.getDate(),R.value=t.toString(),q.value=n.toString(),a=!0):l>k&&(n=k.getFullYear(),t=k.getMonth(),e=k.getDate(),R.value=t.toString(),q.value=n.toString(),a=!0),l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");l.getDay()!==I;)l.setDate(l.getDate()-1);c.default.show(P[35].parentNode);const d=new Date(T.getFullYear(),T.getMonth(),T.getDate());for(let e=0;e<42;e++){if(35===e&&l.getMonth()!==t){c.default.hide(P[35].parentNode);break}const n=P[e];n.textContent=l.getDate().toString();const i=l.getMonth()===t;i?n.classList.remove("otherMonth"):n.classList.add("otherMonth");let r=!0;(l<d||l>k)&&(r=!1),r?n.classList.remove("disabled"):n.classList.add("disabled"),i&&r&&(n.href="#",n.setAttribute("role","button"),n.tabIndex=0,n.title=o.formatDate(l),n.setAttribute("aria-label",o.formatDate(l))),l.setDate(l.getDate()+1)}if(D.dataset.month=t.toString(),D.dataset.year=n.toString(),U.insertBefore(s,F),!i&&(l=new Date(n,t,e),l.getDate()!==e)){for(;l.getMonth()!==t;)l.setDate(l.getDate()-1);e=l.getDate()}if(a){for(let e=0;e<12;e++){const t=R.children[e];t.disabled=n===T.getFullYear()&&+t.value<T.getMonth()||n===k.getFullYear()&&+t.value>k.getMonth()}const e=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),j.classList[e<k?"add":"remove"]("active");const i=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");i.setDate(i.getDate()-1),N.classList[i>T?"add":"remove"]("active")}}if(e){for(let t=0;t<37;t++){const n=P[t];let i=+n.textContent===e;(n.classList.contains("otherMonth")||n.classList.contains("disabled"))&&(i=!1),i?n.classList.add("active"):n.classList.remove("active")}D.dataset.day=e.toString()}y()}function y(){const e=x.get(M);let t;i.stringToBool(M.dataset.empty||"")||(t=e.isDateTime?new Date(+D.dataset.year,+D.dataset.month,+D.dataset.day,+B.value,+O.value):new Date(+D.dataset.year,+D.dataset.month,+D.dataset.day),$.setDate(M,t))}function w(e){v(void 0,+e.currentTarget.value)}function E(e){v(void 0,void 0,+e.currentTarget.value)}function S(e){e.preventDefault();const t=e.currentTarget;t.classList.contains("otherMonth")||t.classList.contains("disabled")||(M.dataset.empty="false",v(+t.textContent),x.get(M).isDateTime||g())}function _(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&x.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l),c=n.__importDefault(c);let C,A,L=!1,I=0;const x=new Map;let k,T,M=null;const P=[];let D,B,O,R,j,N,F,q,U=null;const $={init(){L||(L=!0,I=parseInt(a.get("wcf.date.firstDayOfTheWeek"),10),(0,h.wheneverSeen)('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)',(e=>{const t=new Date;e.classList.add("inputDatePicker"),e.readOnly=!0;const n="datetime"===e.getAttribute("type"),r=n&&i.stringToBool(e.dataset.timeOnly||""),s=i.stringToBool(e.dataset.disableClear||""),l=n&&i.stringToBool(e.dataset.ignoreTimezone||""),c=e.classList.contains("birthday");e.dataset.isDateTime=n?"true":"false",e.dataset.isTimeOnly=r?"true":"false";let d=null,u=e.value;u||(u=e.getAttribute("value")||"");const h=/^\d+-\d+-\d+$/.test(u);if(u){if(r){d=new Date;const e=u.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||h){let e=new Date(u).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const n=Math.floor(e/60).toString(),i=(e%60).toString();t+=2===n.length?n:"0"+n,t+=":",t+=2===i.length?i:"0"+i,c||h?u+="T00:00:00"+t:u=u.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(u)}const t=d.getTime();
1isNaN(t)?u="":(e.dataset.value=t.toString(),u=r?o.formatTime(d):n?o.formatDateTime(d):o.formatDate(d))}const f=0===u.length;if(c?(e.dataset.minDate="120",e.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(e.min&&(e.dataset.minDate=e.min),e.max&&(e.dataset.maxDate=e.max)),p(e,t,!0),p(e,t,!1),(e.dataset.minDate||"")===(e.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+e.id+"').");e.type="text",e.value=u,e.dataset.empty=f?"true":"false";const g=e.dataset.placeholder||"";g&&(e.placeholder=g);const b=document.createElement("input");b.id=e.id+"DatePicker",b.name=e.name,b.type="hidden",null!==d&&(b.value=r?o.format(d,"H:i"):l?o.format(d,"Y-m-dTH:i:s"):o.format(d,n?"c":"Y-m-d")),e.parentNode.insertBefore(b,e),e.removeAttribute("name"),e.addEventListener("click",m);const v=document.createElement("div");v.className="inputAddon inputAddonDatePicker";const y=document.createElement("button");y.type="button",y.className="inputSuffix button jsTooltip",y.title=r?a.getPhrase("wcf.date.datePicker.time"):a.getPhrase("wcf.date.datePicker"),y.setAttribute("aria-haspopup","true"),y.setAttribute("aria-expanded","false"),y.addEventListener("click",(t=>{e.disabled||m(t)})),v.appendChild(y);let w=document.createElement("fa-icon");r?w.setIcon("clock"):w.setIcon("calendar"),y.appendChild(w),e.parentNode.insertBefore(v,e),v.insertBefore(e,y);let E=null;s||(E=document.createElement("button"),E.type="button",E.className="inputSuffix button jsTooltip",E.title=r?a.getPhrase("wcf.date.datePicker.time.clear"):a.getPhrase("wcf.date.datePicker.clear"),E.addEventListener("click",(()=>{e.disabled||$.clear(e)})),f&&(E.hidden=!0),v.appendChild(E),w=document.createElement("fa-icon"),w.setIcon("xmark"),E.appendChild(w));const S=["tiny","short","medium","long"];let _=!1;for(let t=0;t<4;t++)e.classList.contains(S[t])&&(_=!0);_||e.classList.add("short"),new MutationObserver((()=>{e.disabled?(y.classList.add("disabled"),E?.classList.add("disabled")):(y.classList.remove("disabled"),E?.classList.remove("disabled"))})).observe(e,{attributeFilter:["disabled"]}),e.disabled&&(y.classList.add("disabled"),E?.classList.add("disabled")),x.set(e,{clearButton:E,shadow:b,disableClear:s,isDateTime:n,isEmpty:f,isTimeOnly:r,ignoreTimezone:l,onClose:null})})),l.default.add("WoltLabSuite/Core/Date/Picker",(()=>g())))},previousMonth(){"0"===R.value?(R.value="11",q.value=(+q.value-1).toString()):R.value=(+R.value-1).toString(),v(void 0,+R.value,+q.value)},nextMonth(){"11"===R.value?(R.value="0",q.value=(+q.value+1).toString()):R.value=(+R.value+1).toString(),v(void 0,+R.value,+q.value)},getDate(e){const t=(e=_(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=_(e);const n=x.get(e);let i,r;e.dataset.value=t.getTime().toString(),e.dataset.empty="false",n.isDateTime?n.isTimeOnly?(r=o.formatTime(t),i="H:i"):n.ignoreTimezone?(r=o.formatDateTime(t),i="Y-m-dTH:i:s"):(r=o.formatDateTime(t),i="c"):(r=o.formatDate(t),i="Y-m-d"),e.value=r,n.shadow.value=o.format(t,i),n.disableClear||(n.clearButton.hidden=!1)},getValue(e){e=_(e);const t=x.get(e);return t?t.shadow.value:""},clear(e){e=_(e);const t=x.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||(t.clearButton.hidden=!0),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=_(e);const t=x.get(e),n=e.parentNode;n.parentNode.insertBefore(e,n),n.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",m),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,x.delete(e)},setCloseCallback(e,t){e=_(e),x.get(e).onClose=t}};return window.__wcf_bc_datePicker=$,$})),define("WoltLabSuite/Core/Form/XsrfToken",["require","exports","../Core","../Helper/Selector"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){const e=(0,n.getXsrfToken)();(0,i.wheneverFirstSeen)(".xsrfTokenInput",(t=>{(function(e){return"INPUT"===e.nodeName})(t)&&(t.value=e,t.classList.add("xsrfTokenInputHandled"))}))}})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./CloseOverlay","focus-trap","../Helper/PageOverlay"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h){"use strict";i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d);let p,f=null;const m=new Map;let g=!1;const b=new WeakMap,v=new Map;let y;const w=["onBeforeClose","onClose","onShow"],E=["number","password","search","tel","text","url"],S={setup(){p=document.createElement("div"),p.classList.add("dialogOverlay"),p.setAttribute("aria-hidden","true"),p.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),p.addEventListener("wheel",(e=>{e.target===p&&e.preventDefault()}),{passive:!1});let e=!1;new MutationObserver((()=>{"true"===p.getAttribute("aria-hidden")?((0,h.releasePageOverlayContainer)(p),e=!1):e||((0,h.adoptPageOverlayContainer)(p),e=!0)})).observe(p,{attributes:!0,attributeFilter:["aria-hidden"]}),document.getElementById("content").appendChild(p),y=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName){const e=m.get(f);return!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(f),!1):(this.close(f),!1))}}return!0},r.on("screen-xs",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),this._initStaticDialogs(),o.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{m.forEach((e=>
1{i.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const n=document.getElementById(t);null!==n&&(n.classList.remove("jsStaticDialogContent"),n.dataset.isStaticDialog="true",a.default.hide(n),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(n.id,null,{title:n.dataset.title||""})})))}}))},open(t,o){let r=b.get(t);if(r&&i.isPlainObject(r))return this.openStatic(r.id,void 0===o?null:o);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!i.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(r={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),a.default.show(c)}else if(null===s.source)s.source=o;else if("function"==typeof s.source)s.source();else if(i.isPlainObject(s.source)){if("string"!=typeof o||""===o.trim())return new Promise(((t,n)=>{e(["../Ajax"],t,n)})).then(n.__importStar).then((e=>{const n=s.source;e.api(this,n.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof n.after&&n.after(m.get(l).content,e))}))})),{};s.source=o}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,a.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return b.set(t,r),v.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,o,a){this.isOpen(t)||r.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||r.scrollDisable()),m.has(t)?this._updateDialog(t,o):((a=i.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},a||{})).closable||(a.backdropCloseOnClick=!1),a.closeConfirmMessage&&(a.onBeforeClose=t=>{new Promise(((t,n)=>{e(["./Confirmation"],t,n)})).then(n.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:a.closeConfirmMessage||""})}))}),this._createDialog(t,o,a));const c=m.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{c.content.querySelector("input, textarea")?.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const n=m.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const i=n.dialog.querySelector(".dialogTitle");i&&(i.textContent=t)},setCallback(e,t,n){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const i=m.get(e);if(void 0===i)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof n&&null!==n)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof n+"' given).");i[t]=n},removeCallback(e,t){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const n=m.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");n[t]=void 0},_createDialog(e,t,n){let i=null;if(null===t&&(i=document.getElementById(e),null===i))throw new Error("Expected either a HTML string or an existing element id.");const o=document.createElement("div");o.classList.add("dialogContainer"),o.setAttribute("aria-hidden","true"),o.setAttribute("role","dialog"),o.dataset.id=e;const r=document.createElement("header");o.appendChild(r);const s=a.default.getUniqueId();o.setAttribute("aria-labelledby",s);const l=document.createElement("span");
1if(l.classList.add("dialogTitle"),l.textContent=n.title,l.id=s,r.appendChild(l),n.closable){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon size="24" name="xmark"></fa-icon>',e.classList.add("dialogCloseButton","jsTooltip"),e.title=n.closeButtonLabel,e.setAttribute("aria-label",n.closeButtonLabel),e.addEventListener("click",(()=>this._close())),r.appendChild(e)}new ResizeObserver((()=>{if("false"===o.getAttribute("aria-hidden")){const e=Math.floor(o.getBoundingClientRect().width/2);o.style.setProperty("--translate-x",`-${e}px`)}})).observe(o);const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),n.disableContentPadding&&c.classList.add("dialogContentNoPadding"),o.appendChild(c),c.addEventListener("wheel",(e=>{let t,n,i,o=!1,r=e.target;for(;;){if(t=r.clientHeight,n=r.scrollHeight,t<n){if(i=r.scrollTop,e.deltaY<0&&i>0){o=!0;break}if(e.deltaY>0&&i+t<n){o=!0;break}}if(!r||r===c)break;r=r.parentNode}o||e.preventDefault()}),{passive:!1}),null===i)if("string"==typeof t)d=document.createElement("div"),d.id=e,a.default.setInnerHtml(d,t);else{if(!(t instanceof DocumentFragment))throw new TypeError("'html' must either be a string or a DocumentFragment");{const n=[];let i;for(let e=0,o=t.childNodes.length;e<o;e++)i=t.childNodes[e],i.nodeType===Node.ELEMENT_NODE&&n.push(i);"DIV"!==n[0].nodeName||n.length>1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=n[0]}}else d=i;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&a.default.show(d);const h=(0,u.createFocusTrap)(o,{allowOutsideClick:!0,escapeDeactivates:()=>(m.get(e).closable&&S.close(e),!1),fallbackFocus:o});m.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,closable:n.closable,content:d,dialog:o,focusTrap:h,header:r,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow,submitButton:null,inputFields:new Set}),p.insertBefore(o,p.firstChild),"function"==typeof n.onSetup&&n.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const n=m.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&a.default.setInnerHtml(n.content,t),i.stringToBool(n.dialog.getAttribute("aria-hidden"))){d.default.execute(),n.closable&&i.stringToBool(p.getAttribute("aria-hidden"))&&window.addEventListener("keyup",y),n.dialog.parentNode.insertBefore(n.dialog,n.dialog.parentNode.firstChild),n.dialog.setAttribute("aria-hidden","false"),p.setAttribute("aria-hidden","false"),p.setAttribute("close-on-click",n.backdropCloseOnClick?"true":"false"),f=e;const t=n.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),t&&t.removeAttribute("inert"),"function"==typeof n.onShow&&n.onShow(n.content),i.stringToBool(n.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:n.content,id:e})}this.rebuild(e),o.default.trigger(),n.focusTrap.activate()},rebuild(e){const t=this._getDialogId(e),n=m.get(t);if(void 0===n)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(i.stringToBool(n.dialog.getAttribute("aria-hidden")))return;const o=n.content.parentNode,r=n.content.querySelector(".formSubmit");let s=0;null!==r?(o.classList.add("dialogForm"),r.classList.add("dialogFormSubmit"),s+=a.default.outerHeight(r),s-=1,o.style.setProperty("margin-bottom",`${s}px`,"")):(o.classList.remove("dialogForm"),o.style.removeProperty("margin-bottom")),s+=a.default.outerHeight(n.header);const l=window.innerHeight*(g?1:.8)-s;if(o.style.setProperty("max-height",~~l+"px",""),""===n.dialog.style.getPropertyValue("--translate-x")){const e=Math.floor(n.dialog.getBoundingClientRect().width/2);n.dialog.style.setProperty("--translate-x",`-${e}px`)}const c=v.get(t);if(void 0!==c&&"function"==typeof c._dialogSubmit){const e=n.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),i=n.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===i)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",n.content));if(n.submitButton!==i){n.submitButton=i,i.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const o=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let r;for(let t=0,i=e.length;t<i;t++)r=e[t],n.inputFields.has(r)||(-1!==E.indexOf(r.type)?(n.inputFields.add(r),r.addEventListener("keydown",o)):console.warn("Unsupported input type.",r))}}},_submit(e){const t=m.get(e);let n=!0;if(t.inputFields.forEach((e=>{e.required&&(""===e.value.trim()?(a.default.innerError(e,s.get("wcf.global.form.error.empty")),e.closest("dl")?.classList.add("formError"),n=!1):(a.default.innerError(e,!1),e.closest("dl")?.classList.remove("formError")))})),n){const t=v.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(){const e=m.get(f);return void 0===e||!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(f),!1):(this.close(f),!0))},_closeOnBackdrop(e){e.target===p&&(i.stringToBool(p.getAttribute("close-on-click"))?(e.preventDefault(),this._close()):e.preventDefault())},close(e){e=this._getDialogId(e);let t=m.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");try{t.focusTrap.deactivate()}catch(e){const t="Your focus-trap must have at least one container with at least one tabbable node in it at all times";if(e.message!==t)throw e}t.dialog.setAttribute("aria-hidden","true");const n=document.activeElement;n.closest(".dialogContainer")===t.dialog&&n.blur(),"function"==typeof t.onClose&&t.onClose(e),f=null;for(let e=0;e<p.childElementCount;e++){const t=p.children[e];if(t.classList.contains("dialogContainer")&&!i.stringToBool(t.getAttribute("aria-hidden"))){f=t.dataset.id||"";break}}r.pageOverlayClose(),null===f?(p.setAttribute("aria-hidden","true"),p.dataset.closeOnClick="false",t.closable&&window.removeEventListener("keyup",y)):(t=m.get(f),p.dataset.closeOnClick=t.backdropCloseOnClick?"true":"false"),"desktop"!==l.platform()&&r.scrollEnable()},getDialog(e){return m.get(this._getDialogId(e))},isOpen(e){const t=this.getDialog(e);return void 0!==t&&"false"===t.dialog.getAttribute("aria-hidden")},destroy(e){if("object"!=typeof e)throw new TypeError("Expected the callback object as parameter.");if(b.has(e)){const t=b.get(e).id;this.isOpen(t)&&this.close(t),m.has(t)&&(m.get(t).dialog.remove(),m.delete(t)),b.delete(e)}},_getDialogId(e){if("object"==typeof e){const t=b.get(e);if(void 0!==t)return t.id}return e.toString()},_ajaxSetup:()=>({})};return S})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay","../../Helper/PageOverlay","../../Helper/Selector","WoltLabSuite/Core/Environment"],(function(e,t,n,i,o,r,a,s,l,c,d,u){"use strict";function h(e){const t=e.currentTarget,n=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,i=n.length;e<i;e++){const i=n[e],o=a.default.identify(i),r=a.default.offset(i),s=a.default.offset(t);r.top+i.clientHeight<=s.top||r.top>=s.top+t.offsetHeight||r.left<=s.left||r.left>=s.left+t.offsetWidth?L.toggleDropdown(o):L.setAlignment(E.get(o),S.get(o))}}
1function p(){E.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(o.stringToBool(e.dataset.isOverlayDropdownButton||""))L.setAlignment(e,S.get(t));else{const n=S.get(e.id);o.stringToBool(n.dataset.dropdownIgnorePageScroll||"")?L.setAlignment(e,S.get(t)):L.close(t)}}))}function f(){if("ios"===(0,u.platform)()){const e=document.createElement("div");e.style.setProperty("inset","50px auto auto 50px"),e.style.setProperty("position","fixed"),(0,c.getPageOverlayContainer)().append(e);const{y:t}=e.getBoundingClientRect();e.remove(),50!==t?document.documentElement.classList.add("iOS--virtualKeyboard"):document.documentElement.classList.remove("iOS--virtualKeyboard")}E.forEach(((e,t)=>{e.classList.contains("dropdownOpen")&&L.setAlignment(e,S.get(t))}))}function m(e,t){y.forEach(e,(n=>{n(e,t)}))}function g(e,t,n,i){if(null!==e){e.preventDefault(),e.stopPropagation();const n=e.currentTarget;t=n.dataset.target,void 0===i&&e instanceof MouseEvent&&(o.stringToBool(n.dataset.isKeyboardClick||"")?delete n.dataset.isKeyboardClick:i=!0)}A=!0;try{l.default.execute(l.Origin.DropDown,t)}finally{A=!1}let a=E.get(t),s=!1;if(void 0!==a){let n,l;if(e&&(n=e.currentTarget,l=n.parentNode,l!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,E.set(t,l))),void 0===i&&(n=a.closest(".dropdownToggle"),n||(n=a.querySelector(".dropdownToggle"),!n&&a.id&&(n=document.querySelector('[data-target="'+a.id+'"]'))),n&&o.stringToBool(n.dataset.dropdownLazyInit||"")&&(i=!0)),o.stringToBool(a.dataset.dropdownPreventToggle||"")&&a.classList.contains("dropdownOpen")&&(s=!0),""===a.dataset.isOverlayDropdownButton){const e=r.parentByClass(a,"dialogContent");a.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",h)}}return C="",E.forEach(((e,r)=>{const a=S.get(r);if(e.classList.contains("dropdownOpen"))if(s)C=t;else{e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),m(r,"close")}else if(r===t&&a.childElementCount>0){C=t,e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen");const s=e.querySelector(".dropdownToggle");s&&s.setAttribute("aria-expanded","true");const l=a.childElementCount>0?a.children[0]:null;if(l&&o.stringToBool(l.dataset.scrollToActive||"")){delete l.dataset.scrollToActive;let e=null;for(let t=0,n=l.childElementCount;t<n;t++)if(l.children[t].classList.contains("active")){e=l.children[t];break}e&&(l.scrollTop=Math.max(e.offsetTop+e.clientHeight-a.clientHeight,0))}const c=a.querySelector(".scrollableDropdownMenu");null!==c&&c.classList[c.scrollHeight>c.clientHeight?"add":"remove"]("forceScrollbar"),m(r,"open");let d=null;if(!i){a.setAttribute("role","menu"),a.tabIndex=-1,a.removeEventListener("keydown",v),a.addEventListener("keydown",v);const e=Array.from(a.querySelectorAll("li")).filter((e=>e.clientHeight>0));d=e.find((e=>e.classList.contains("active")))||e[0]||null,e.forEach((e=>{e.setAttribute("role","menuitem"),e.tabIndex=-1}))}L.setAlignment(e,a,n),null!==d&&d.focus()}})),null===e}function b(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):g(e)))}function v(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const n=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||n.reverse();let i=null;const o=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let r=n.indexOf(t);"End"!==e.key&&"Home"!==e.key||(r=-1);for(let e=r+1;e<n.length;e++)if(o(n[e])){i=n[e];break}null===i&&(i=n.find(o)||null),null!==i&&i.focus()}else if("Enter"===e.key||"Space"===e.key){e.preventDefault();let n=t;1!==n.childElementCount||"SPAN"!==n.children[0].nodeName&&"A"!==n.children[0].nodeName||(n=n.children[0]);const i=E.get(C),r=i.querySelector(".dropdownToggle"),a=i.dataset.a11yMouseEvent||"click";o.triggerEvent(n,a),r&&r.focus()}else if("Escape"===e.key||"Tab"===e.key){e.preventDefault();const t=E.get(C);let n=t.querySelector(".dropdownToggle");null!==n||t.classList.contains("dropdown")||(n=t),g(null,C),n&&n.focus()}}i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);const y=new i.default;let w=!1;const E=new Map,S=new Map;let _,C="",A=!1;
1const L={setup(){w||(w=!0,_=document.createElement("div"),_.className="dropdownMenuContainer",(0,c.getPageOverlayContainer)().append(_),l.default.add("WoltLabSuite/Core/Ui/Dropdown/Simple",(()=>L.closeAll())),(0,d.wheneverFirstSeen)(".dropdownToggle",(e=>L.init(e,!1))),document.addEventListener("scroll",p),window.addEventListener("resize",(()=>f()),{passive:!0}),window.visualViewport?.addEventListener("resize",(()=>f()),{passive:!0}),window.bc_wcfSimpleDropdown=this)},init(e,t){if(L.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const n=r.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a parent with .dropdown.");const i=r.nextByClass(e,"dropdownMenu");if(null===i)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a menu as next sibling.");_.appendChild(i);const s=a.default.identify(n);if(!E.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",g),e.addEventListener("keydown",b),E.set(s,n),S.set(s,i),/^wcf\d+$/.test(s)||(i.dataset.source=s),i.childElementCount&&i.children[0].classList.contains("scrollableDropdownMenu"))){const e=i.children[0];e.dataset.scrollToActive="true";let t=null,n=null;e.addEventListener("wheel",(i=>{null===t&&(t=e.clientHeight),null===n&&(n=e.scrollHeight),(i.deltaY<0&&0===e.scrollTop||i.deltaY>0&&e.scrollTop+t===n)&&i.preventDefault()}),{passive:!1})}return e.dataset.target=s,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",o.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){L.setup();const n=a.default.identify(e);E.has(n)||(E.set(n,e),_.appendChild(t),S.set(n,t))},registerCallback(e,t){y.add(e,t)},getDropdown:e=>E.get(e),getDropdownMenu:e=>S.get(e),toggleDropdown(e,t,n){g(null,e,t,n)},setAlignment(e,t,n){const i=e.querySelector(".dropdownToggle"),o=null!==i?i.parentNode:null;let r;o&&o.classList.contains("inputAddonTextarea")&&(r=i),s.set(t,n||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=E.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const n=S.get(e);L.setAlignment(t,n)},isOpen(e){const t=S.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t,n){const i=S.get(e);void 0===i||i.classList.contains("dropdownOpen")||L.toggleDropdown(e,n,t)},close(e){const t=E.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),S.get(e).classList.remove("dropdownOpen"))},closeAll(){A||E.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen")){e.classList.remove("dropdownOpen"),S.get(t).classList.remove("dropdownOpen");const n=e.querySelector(".dropdownToggle");n&&n.setAttribute("aria-expanded","false"),m(t,"close")}}))},destroy(e){if(!E.has(e))return!1;try{L.close(e),S.get(e)?.remove()}catch{}return S.delete(e),E.delete(e),!0},_toggle:(e,t,n,i)=>g(e,t,n,i)};return L})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,n,i){"use strict";function o(e){if(!r.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return r.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t){if(r.has(e))return;const n=document.createElement("div");n.id="reusableDropdownGhost"+a++,i.default.initFragment(n,t),r.set(e,n.id)},t.getDropdownMenu=function(e){return i.default.getDropdownMenu(o(e))},t.registerCallback=function(e,t){i.default.registerCallback(o(e),t)},t.toggleDropdown=function(e,t){i.default.toggleDropdown(o(e),t)},i=n.__importDefault(i);const r=new Map;let a=0})),define("WoltLabSuite/Core/Ui/Page/Menu/Container",["require","exports","tslib","focus-trap","../../Screen","../../CloseOverlay","../../../Dom/Util"],(function(e,t,n,i,o,r,a){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuContainer=void 0,r=n.__importDefault(r),a=n.__importDefault(a);class s{container=document.createElement("div");content=document.createElement("div");focusTrap=void 0;provider;constructor(e){this.provider=e,this.container.hidden=!0;const t=a.default.identify(this.provider.getMenuButton());r.default.add(`WoltLabSuite/Core/Ui/PageMenu/Container-${t}`,(()=>{this.container.hidden||this.close()}))}open(){r.default.execute(),this.buildElements(),0===this.content.childElementCount&&this.content.append(this.provider.getContent()),this.provider.getMenuButton().setAttribute("aria-expanded","true"),(0,o.pageOverlayOpen)(),(0,o.scrollDisable)(),this.container.hidden=!1,this.provider.wakeup(),this.getFocusTrap().activate()}close(){this.provider.getMenuButton().setAttribute("aria-expanded","false"),(0,o.pageOverlayClose)(),(0,o.scrollEnable)(),this.container.hidden=!0,this.getFocusTrap().deactivate(),this.provider.sleep()}toggle(){this.container.hidden?this.open():this.close()}getContent(){return this.content}buildElements(){this.container.classList.contains("pageMenuContainer")||(this.container.classList.add("pageMenuContainer"),this.container.hidden=!0,this.container.addEventListener("click",(e=>{e.target===this.container&&this.close()})),this.content.classList.add("pageMenuContent"),this.content.addEventListener("click",(e=>{e.stopPropagation()})),this.container.append(this.content),document.body.append(this.container))}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,i.createFocusTrap)(this.content,{allowOutsideClick:!0})),this.focusTrap}}t.PageMenuContainer=s,t.default=s})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","./Container","../../../Language","../../../Dom/Util","../../Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuMain=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);class s{container;mainMenu;mainMenuButton;menuItemBadges=new Map;menuItemProvider;observer;constructor(e){this.mainMenu=document.querySelector(".mainMenu"),this.menuItemProvider=e,this.mainMenuButton=document.querySelector(".pageHeaderMenuMobile"),this.mainMenuButton.addEventListener("click",(e=>{e.stopPropagation(),this.container.toggle()})),this.container=new i.default(this),this.observer=new MutationObserver((e=>{let t=!1;e.forEach((e=>{(e.addedNodes.length>0||e.removedNodes.length>0||"characterData"===e.type)&&(t=!0)})),t&&this.refreshUnreadIndicator()})),this.watchForChanges()}enable(){this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars")}getContent(){const e=document.createElement("div");e.classList.add("pageMenuMainContainer"),e.addEventListener("scroll",(()=>this.updateOverflowIndicator(e)),{passive:!0}),e.append(this.buildMainMenu());const t=this.buildLanguageMenu();t&&e.append(t);const n=this.buildFooterMenu();n&&e.append(n);const i=new ResizeObserver((()=>this.updateOverflowIndicator(e)));Array.from(e.children).forEach((e=>{i.observe(e)}));const o=document.createDocumentFragment();return o.append(e),o}getMenuButton(){return this.mainMenuButton}sleep(){this.watchForChanges()}wakeup(){this.observer.disconnect(),this.refreshUnreadIndicator()}watchForChanges(){this.observer.observe(this.mainMenu,{childList:!0,subtree:!0})}buildMainMenu(){const e=this.mainMenu.querySelector(".boxMenu"),t=this.buildMenu(e);return t.setAttribute("aria-label",window.PAGE_TITLE),t.setAttribute("role","navigation"),this.showActiveMenuItem(t),t}showActiveMenuItem(e){const t=e.querySelector('.pageMenuMainItemLink[aria-current="page"]');if(t){let e=t;for(;e&&e.parentElement;)if(e=e.parentElement.closest(".pageMenuMainItemList"),e){e.hidden=!1;const t=e.previousElementSibling;t?.setAttribute("aria-expanded","true")}const n=t.nextElementSibling;n&&(n.setAttribute("aria-expanded","true"),n.nextElementSibling.hidden=!1)}}buildLanguageMenu(){const e=a.getDropdownMenu("pageLanguageContainer");if(void 0===e)return null;const t=[],n=new Map;
1Array.from(e.children).forEach((e=>{const i=e.dataset.languageCode,o=e.querySelector("span").textContent.trim(),r=e.querySelector("img.iconFlag")||void 0;n.set(i,e.querySelector("a")),t.push({active:!1,children:[],counter:0,depth:1,identifier:i,title:o,icon:r})}));const i=document.createElement("fa-icon");i.setIcon("language"),i.size=24;const r=[{active:!1,children:t,counter:0,depth:0,identifier:"language",title:o.get("wcf.user.language"),icon:i}],s=document.createElement("nav");return s.classList.add("pageMenuMainNavigation","pageMenuMainNavigationLanguage"),s.append(this.buildMenuItemList(r,!0)),s.querySelectorAll(".pageMenuMainItemList .pageMenuMainItemLabel[data-identifier]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const i=e.dataset.identifier;n.get(i)?.click()}))})),s}buildFooterMenu(){const e=document.querySelector('.box[data-box-identifier="com.woltlab.wcf.FooterMenu"]');if(null===e)return null;const t=e.querySelector(".boxMenu"),n=this.buildMenu(t);n.classList.add("pageMenuMainNavigationFooter");const i=e.querySelector("nav").getAttribute("aria-label");return n.setAttribute("aria-label",i),n}buildMenu(e){const t=this.menuItemProvider.getMenuItems(e),n=document.createElement("nav");return n.classList.add("pageMenuMainNavigation"),n.append(this.buildMenuItemList(t,!1)),n}buildMenuItemList(e,t){const n=document.createElement("ul");return n.classList.add("pageMenuMainItemList"),e.filter((e=>!(!t&&!e.link&&0===e.children.length))).forEach((e=>{n.append(this.buildMenuItem(e,t))})),n}buildMenuItem(e,t){const n=document.createElement("li");if(n.dataset.depth=e.depth.toString(),n.classList.add("pageMenuMainItem"),e.link){const t=document.createElement("a");if(t.classList.add("pageMenuMainItemLink"),t.href=e.link,t.textContent=e.title,e.active&&t.setAttribute("aria-current","page"),e.identifier&&(t.dataset.identifier=e.identifier),e.openInNewWindow&&(t.target="_blank"),e.counter>0){const n=document.createElement("span");n.classList.add("pageMenuMainItemCounter","badge","badgeUpdate"),n.setAttribute("aria-hidden","true"),n.textContent=e.counter.toString(),null!==e.identifier&&this.menuItemBadges.set(e.identifier,n),t.append(n)}n.append(t)}else{const i=document.createElement("a");if(i.classList.add("pageMenuMainItemLabel"),i.href="#",e.icon){i.append(e.icon),e.icon instanceof HTMLImageElement||(e.icon.size=24);const t=document.createElement("span");t.textContent=e.title,i.append(t)}else i.textContent=e.title;e.identifier&&(i.dataset.identifier=e.identifier),t&&"language"!==e.identifier||i.addEventListener("click",(e=>{e.preventDefault(),i.nextElementSibling.click()})),n.append(i)}if(e.children.length){n.classList.add("pageMenuMainItemExpandable");const i=r.default.getUniqueId(),a=document.createElement("button");a.type="button",a.classList.add("pageMenuMainItemToggle"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",i),a.innerHTML='<fa-icon size="24" name="angle-down"></fa-icon>';let s=e.title;e.link&&(s=o.get("wcf.menu.page.button.toggle",{title:e.title})),a.setAttribute("aria-label",s);const l=this.buildMenuItemList(e.children,t);l.id=i,l.hidden=!0,a.addEventListener("click",(()=>{this.toggleList(a,l)})),l.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.toggleList(a,l))})),n.append(a,l)}return n}toggleList(e,t){t.hidden?(e.setAttribute("aria-expanded","true"),t.hidden=!1):(e.setAttribute("aria-expanded","false"),t.hidden=!0,document.activeElement!==e&&e.focus())}refreshUnreadIndicator(){null!==this.mainMenu.querySelector(".boxMenuLinkOutstandingItems")?this.mainMenu.classList.add("pageMenuMobileButtonHasContent"):this.mainMenu.classList.remove("pageMenuMobileButtonHasContent"),this.menuItemProvider.getMenuItems(this.mainMenu).forEach((e=>this.refreshUnreadBadge(e)))}refreshUnreadBadge(e){if(null!==e.identifier){const t=this.menuItemBadges.get(e.identifier);t&&(0===e.counter?(t.remove(),this.menuItemBadges.delete(e.identifier)):parseInt(t.textContent,10)!==e.counter&&(t.textContent=e.counter.toString()))}e.children.forEach((e=>this.refreshUnreadBadge(e)))}updateOverflowIndicator(e){e.clientHeight<e.scrollHeight?(e.scrollTop>
10?e.classList.add("pageMenuMainContainerOverflowTop"):e.classList.remove("pageMenuMainContainerOverflowTop"),e.clientHeight+e.scrollTop<e.scrollHeight?e.classList.add("pageMenuMainContainerOverflowBottom"):e.classList.remove("pageMenuMainContainerOverflowBottom")):e.classList.remove("pageMenuMainContainerOverflowTop","pageMenuMainContainerOverflowBottom")}}t.PageMenuMain=s,t.default=s})),define("WoltLabSuite/Core/Ui/User/Menu/Manager",["require","exports","tslib","../../Alignment","../../CloseOverlay","../../../Event/Handler","../../../Dom/Util","../../Screen","../../../Helper/PageOverlay"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e){o.default.execute();const t=h(e);t.open();const n=e.getPanelButton();n.querySelector("a").setAttribute("aria-expanded","true"),n.classList.add("open"),d(t.getElement(),n)}function d(e,t){if(i.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==a.default.getFixedParent(t)){const{top:n,height:i}=t.getBoundingClientRect();e.style.setProperty("top",`${n+i}px`)}}function u(e){if(!g.has(e))return;const t=e.getPanelButton();t.classList.contains("open")&&(h(e).close(),t.classList.remove("open"),t.querySelector("a").setAttribute("aria-expanded","false"))}function h(e){if(!g.has(e)){const t=e.getView(),n=t.getElement();p().append(n),n.addEventListener("shouldClose",(()=>u(e))),g.set(e,t)}return g.get(e)}function p(){return void 0===f&&(f=document.createElement("div"),f.classList.add("dropdownMenuContainer"),(0,l.getPageOverlayContainer)().append(f)),f}let f;Object.defineProperty(t,"__esModule",{value:!0}),t.getUserMenuProviders=function(){return m},t.updateCounter=function(e,t){Array.from(m).filter((t=>t.getIdentifier()===e)).forEach((e=>{e.getPanelButton().dispatchEvent(new CustomEvent("updateCounter",{detail:{counter:t}}))}))},t.getContainer=p,t.registerProvider=function(e){0===m.size&&(o.default.add("WoltLabSuite/Ui/User/Menu",(()=>{m.forEach((e=>u(e)))})),r.add("com.woltlab.wcf.UserMenuMobile","more",(e=>{m.forEach((t=>{e.identifier===t.getIdentifier()&&c(t)}))})),window.addEventListener("resize",(()=>{m.forEach((e=>{const t=e.getPanelButton();t.classList.contains("open")&&d(h(e).getElement(),t)}))}),{passive:!0}),s.on("screen-md-down",{match(){m.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))},setup(){m.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))}})),function(e){m.add(e);const t=e.getPanelButton();t.addEventListener("click",(n=>{n.preventDefault(),n.stopPropagation(),t.classList.contains("open")?u(e):c(e)}))}(e)},i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s);const m=new Set,g=new Map})),define("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",["require","exports","tslib","../../CloseOverlay","./Manager","focus-trap","../../Alignment","../../../Dom/Util"],(function(e,t,n,i,o,r,a,s){"use strict";function l(e,t){if(a.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==s.default.getFixedParent(t)){const{top:n,height:i}=t.getBoundingClientRect();e.style.setProperty("top",`${n+i}px`)}}function c(){h.deactivate(),u.hidden=!0,d.classList.remove("open"),p.setAttribute("aria-expanded","false")}let d,u,h,p;Object.defineProperty(t,"__esModule",{value:!0}),t.getElement=function(){return u},t.setup=function(){f||(d=document.getElementById("userMenu"),u=d.querySelector(".userMenu"),p=d.querySelector("a"),i.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",(()=>c())),(0,o.getContainer)().append(u),u.addEventListener("click",(e=>e.stopPropagation())),window.addEventListener("resize",(()=>{u.hidden||l(u,d)}),{passive:!0}),d.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),u.hidden?u.hidden&&(i.default.execute(),u.hidden=!1,d.classList.add("open"),p.setAttribute("aria-expanded","true"),h.activate(),l(u,d)):c()})),h=(0,r.createFocusTrap)(u,{allowOutsideClick:!0,escapeDeactivates:()=>(c(),!1),fallbackFocus:u}),f=!0)},i=n.__importDefault(i),a=n.__importStar(a),s=n.__importDefault(s);let f=!1})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","./Container","../../../Language","../../User/Menu/Manager","../../../Dom/Util","../../User/Menu/ControlPanel","../../../Event/Handler","../../Screen"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuUser=void 0,t.hasValidUserMenu=function(){return document.getElementById("topMenu").classList.contains("userPanelLoggedIn")},i=n.__importDefault(i),o=n.__importStar(o),a=n.__importDefault(a),l=n.__importStar(l);class d{activeTab=void 0;container;legacyUserPanels=new Map;observer;userMenuProviders=new Map;tabOrigins=new Map;tabPanels=new Map;tabs=[];userMenu;userMenuButton;constructor(){this.userMenu=document.querySelector(".userPanel"),this.userMenuButton=document.querySelector(".pageHeaderUserMobile"),this.userMenuButton.addEventListener("click",(t=>{t.stopPropagation(),e.then((()=>this.container.toggle()))})),this.container=new i.default(this);const e=new Promise((e=>{"complete"===document.readyState?e():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&e()}))}));(0,c.on)("screen-lg",{match:()=>this.detachViewsFromPanel(),unmatch:()=>this.detachViewsFromPanel()}),this.observer=new MutationObserver((()=>{this.refreshTabUnreadIndicators()}))}enable(){this.userMenuButton.setAttribute("aria-expanded","false"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.userMenuButton.setAttribute("aria-expanded","false")}getContent(){const e=document.createDocumentFragment();return e.append(this.buildTabMenu()),e}getMenuButton(){return this.userMenuButton}sleep(){this.activeTab&&this.closeTab(this.activeTab),this.detachViewsFromPanel(),this.refreshUnreadIndicator()}wakeup(){this.activeTab?this.openTab(this.activeTab):this.isInMaintenanceMode()?this.openTab(this.tabs[0]):this.openNotifications(),this.refreshTabUnreadIndicators(),this.refreshUnreadIndicator()}isInMaintenanceMode(){return"wcf"===document.body.dataset.application&&"offline"===document.body.dataset.template}openNotifications(){const e=this.tabs.find((e=>"userNotifications"===e.dataset.origin));if(!e)throw new Error("Unable to find the notifications tab.");this.openTab(e)}openTab(e){this.closeActiveTab(),e.setAttribute("aria-selected","true"),e.tabIndex=0;const t=this.tabPanels.get(e);t.hidden=!1,document.activeElement!==e&&e.focus(),this.attachViewToPanel(e),this.activeTab=e,this.observer.observe(t,{attributeFilter:["data-is-unread"],childList:!0,subtree:!0})}closeActiveTab(){this.activeTab&&(this.closeTab(this.activeTab),this.activeTab=void 0)}closeTab(e){e.setAttribute("aria-selected","false"),e.tabIndex=-1,this.tabPanels.get(e).hidden=!0;const t=this.legacyUserPanels.get(e);t&&t.close(),this.observer.disconnect(),this.refreshTabUnreadIndicators()}attachViewToPanel(e){const t=e.dataset.origin,n=this.tabPanels.get(e);if("userMenu"===t){const e=(0,s.getElement)();e.hidden=!1,0===n.childElementCount&&(this.tabOrigins.set(n,e.parentElement),n.append(e))}else if(0===n.childElementCount){const t=this.userMenuProviders.get(e);if(t){const e=t.getView(),i=e.getElement();this.tabOrigins.set(n,i.parentElement),n.append(i),e.open()}else{const t=this.legacyUserPanels.get(e);t.open();const{top:i}=n.getBoundingClientRect();t.getDropdown().getContainer()[0].style.setProperty("--offset-top",`${i}px`)}}}detachViewsFromPanel(){this.tabPanels.forEach(((e,t)=>{if(e.childElementCount){const n=this.tabOrigins.get(e);if(n)if("userMenu"===t.dataset.origin){const t=e.children[0];t.hidden=!0,n.append(t)}else{const e=this.userMenuProviders.get(t);if(e){const t=e.getView().getElement();t.hidden=!0,n.append(t)}}}}))}keydown(e){const t=e.currentTarget;if("Enter"===e.key||" "===e.key)return e.preventDefault(),void this.openTab(t);if(!["ArrowLeft","ArrowRight","End","Home"].includes(e.key))return;e.preventDefault();const n=this.tabs.indexOf(t),i=this.tabs.length-1;let o;o="ArrowLeft"===e.key?0===n?i:n-1:"ArrowRight"===e.key?n===i?0:n+1:"End"===e.key?i:0,this.tabs[o].focus()}buildTabMenu(){const e=document.createElement("div");e.classList.add("pageMenuUserTabContainer");const t=document.createElement("div");return t.classList.add("pageMenuUserTabList"),t.setAttribute("role","tablist"),t.setAttribute("aria-label",o.get("wcf.menu.user")),e.append(t),this.buildControlPanelTab(t,e),(0,r.getUserMenuProviders)().forEac
1h((n=>{const[i,o]=this.buildTab(n);t.append(i),e.append(o),this.tabs.push(i),this.tabPanels.set(i,o),this.userMenuProviders.set(i,n)})),this.buildLegacyTabs(t,e),e}buildTab(e){const t=e.getPanelButton(),n=t.querySelector("a");let i=n.querySelector("fa-icon")?.outerHTML;void 0===i&&(i='<fa-icon size="32" name="question"></fa-icon>');const o={icon:i,label:n.dataset.title||n.title,origin:t.id};return this.buildTabComponents(o)}buildControlPanelTab(e,t){const n=document.getElementById("userMenu"),i=n.querySelector("a"),o={icon:this.userMenuButton.querySelector(".userAvatarImage").outerHTML,label:i.dataset.title||i.title,origin:n.id},[r,a]=this.buildTabComponents(o);e.append(r),t.append(a),this.tabs.push(r),this.tabPanels.set(r,a)}buildLegacyTabs(e,t){const n=document.querySelector(".userPanelItems"),i={panels:[]};l.fire("com.woltlab.wcf.pageMenu","legacyMenu",i),Array.from(n.children).filter((e=>void 0!==i.panels.find((t=>t.element===e)))).map((e=>{const t=e.querySelector("a");return{icon:t.querySelector(".icon").outerHTML,label:t.dataset.title||t.title,origin:e.id}})).forEach((n=>{const[o,r]=this.buildTabComponents(n);e.append(o),t.append(r),this.tabs.push(o),this.tabPanels.set(o,r);const a=i.panels.find((e=>e.element.id===n.origin));this.legacyUserPanels.set(o,a.api)}))}buildTabComponents(e){const t=a.default.getUniqueId(),n=a.default.getUniqueId(),i=document.createElement("button");i.type="button",i.classList.add("pageMenuUserTab"),i.dataset.hasUnreadContent="false",i.dataset.origin=e.origin,i.id=t,i.setAttribute("aria-controls",n),i.setAttribute("aria-selected","false"),i.setAttribute("role","tab"),i.tabIndex=-1,i.setAttribute("aria-label",e.label),i.innerHTML=e.icon,i.addEventListener("click",(e=>{e.preventDefault(),this.openTab(i)})),i.addEventListener("keydown",(e=>this.keydown(e)));const o=document.createElement("div");return o.classList.add("pageMenuUserTabPanel"),o.id=n,o.hidden=!0,o.setAttribute("aria-labelledby",t),o.setAttribute("role","tabpanel"),o.tabIndex=0,[i,o]}refreshUnreadIndicator(){null!==this.userMenu.querySelector(".badge.badgeUpdate")?this.userMenu.classList.add("pageMenuMobileButtonHasContent"):this.userMenu.classList.remove("pageMenuMobileButtonHasContent")}refreshTabUnreadIndicators(){this.userMenuProviders.forEach(((e,t)=>{e.hasUnreadContent()?t.dataset.hasUnreadContent="true":t.dataset.hasUnreadContent="false"}))}}t.PageMenuUser=d,t.default=d}
1)),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","focus-trap","../Core","../Dom/Change/Listener","../Dom/Util","../Environment","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen","../Language"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f){"use strict";function m(){j=!0,g(),b(),F&&(U=new u.PageMenuMain(W),U.enable(),(0,h.hasValidUserMenu)()&&($=new h.PageMenuUser,$.enable())),c.default.add("WoltLabSuite/Core/Ui/Mobile",v),r.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{g(),b()})),document.addEventListener("scroll",(()=>S()),{passive:!0})}function g(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const n=document.createElement("button");n.type="button",n.innerHTML='<fa-icon size="24" name="ellipsis"></fa-icon>',n.classList.add("dropdownLabel"),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),v(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(n,e.firstChild)}))}function b(){document.querySelectorAll(".message").forEach((e=>{if(q.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const n=e.querySelector(".messageQuickOptions");if(n&&t.childElementCount){n.classList.add("active");let i=n.querySelector(".messageQuickOptionsMobile");null===i&&(i=document.createElement("li"),i.innerHTML=`\n <button type="button" aria-label="${f.get("wcf.global.button.more")}">\n <fa-icon name="ellipsis"></fa-icon>\n </button>\n `,i.classList.add("messageQuickOptionsMobile"),n.append(i)),i.querySelector("button").addEventListener("click",(i=>{i.stopPropagation(),_(e,n,t)}))}}q.add(e)}))}function v(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),j&&O&&S()}function y(){H=!0}function w(){H=!1,Q.forEach((function(e){e.classList.remove("open")}))}function E(){Q.forEach((function(e){e.addEventListener("mousedown",(function(t){H&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),H=!0}function S(){O?.classList.remove("dropdownOpen")}function _(e,t,n){if(null===O)O=document.createElement("ul"),O.className="dropdownMenu",d.init("com.woltlab.wcf.jsMobileNavigation",O);else if(O.classList.contains("dropdownOpen")&&(S(),B.deactivate(),B=void 0,R===e))return;O.innerHTML="",c.default.execute(),I(n);const o=n.previousElementSibling;if(o&&o.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",O.appendChild(e),I(o)}l.set(O,t,{horizontal:"right",allowFlip:"vertical"}),O.classList.add("dropdownOpen"),R=e,B=(0,i.createFocusTrap)(O,{allowOutsideClick:!0,escapeDeactivates:()=>(_(e,t,n),!1),setReturnFocus:t}),B.activate()}function C(){N=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(t=>{N&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const n=e.parentElement,i=t.target;n.contains(i)||i===n||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}),{passive:!1})}))}function A(){N=!0}function L(){N=!1}function I(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const n=e.querySelector("span:not(.icon)");t.innerHTML=`<a href="#">${n.textContent}</a>`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():o.triggerEvent(e,"click"),S()})),O.appendChild(t)}))}function x(){c.default.execute(),j=!0,F&&(U.enable(),$?.enable())}function k(){z&&P(z,".messageGroupLink")}function T(){c.default.execute(),j=!1,F&&(U.disable(),$?.disable())}function M(){z&&D(z),O&&S()}function P(e,t){Array.from(e).forEach((e=>{const n=e.parentElement;let i=n.querySelector(".mobileLinkShadow");if(null===i){const o=e.querySelector(t);o.href&&(i=document.createElement("a"),i.className="mobileLinkShadow",i.href=o.href,i.setAttribute("aria-labelledby",a.default.identify(o)),n.appendChild(i),n.classList.add("mobileLinkShadowContainer"))}}))}function D(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){F=e,W=t,document.querySelectorAll(".boxesSidebarLeft").forEach((e=>{Q.push(e)})),s.touch()&&document.documentElement.classList.add("touch"),"desktop"!==s.platform()&&document.documentElement.classList.add("mobile");const n=document.querySelector(".messageGroupList");n&&(z=n.getElementsByClassName("messageGroup")),p.on("screen-md-down",{match:x,unmatch:T,setup:m}),p.on("screen-sm-down",{match:k,unmatch:M,setup:k}),p.on("screen-md-down",{match:y,unmatch:w,setup:E}),!s.touch()||"ios"!==s.platform()&&"android"!==s.platform()||p.on("screen-lg",{match:A,unmatch:L,setup:C})},t.enable=x,t.enableShadow=k,t.disable=T,t.disableShadow=M,t.rebuildShadow=P,t.removeShadow=D,o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importDefault(c),d=n.__importStar(d),p=n.__importStar(p),f=n.__importStar(f);let B,O=null,R=null,j=!1,N=!1,F=!1;const q=new WeakSet;let U,$,W,H=!1,z=null;const Q=[]})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language","../../Ui/Screen"],(function(e,t,n,i,o,r){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==g?(e>=b?(p.classList.contains("initiallyHidden")&&p.classList.remove("initiallyHidden"),p.setAttribute("aria-hidden","false")):p.setAttribute("aria-hidden","true"),l(),-1!==g&&f.classList[e<g?"remove":"add"]("scrolledDown"),g=-1):v()}function s(e){e.preventDefault(),document.getElementById("top").scrollIntoView({behavior:"smooth"})}function l(){const e=Array.from(h.children).find((e=>"false"===e.getAttribute("aria-hidden")));h.classList[e?"add":"remove"]("active"),e?f.classList.add("pageActionHasContextButtons"):f.classList.remove("pageActionHasContextButtons")}function c(){if(m)return;m=!0,f=document.createElement("div"),f.className="pageAction",h=document.createElement("div"),h.className="pageActionButtons",f.appendChild(h),p=function(){const e=document.createElement("button");return e.type="button",e.classList.add("button","buttonPrimary","pageActionButtonToTop","initiallyHidden","jsTooltip"),e.title=o.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='<fa-icon size="32" name="angle-up" solid></fa-icon>',e.addEventListener("click",s),e}(),f.appendChild(p),document.body.appendChild(f);const e=i.debounce(a,100);window.addEventListener("scroll",(()=>{-1===g&&(g=window.pageYOffset,window.setTimeout((()=>{a(),g=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==g&&(g=-1)}),{passive:!0}),r.on("screen-sm-down",{match(){b=50},unmatch(){b=300},setup(){b=50}}),a()}function d(e){const t=u.get(e);t&&(t.parentElement.setAttribute("aria-hidden","true"),l())}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=c,t.add=function(e,t,n){c();const i=document.createElement("div");i.className="pageActionButton",i.dataset.name=e,i.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),i.appendChild(t);let o=null;n&&(o=u.get(n)||null,o&&(o=o.parentElement)),!o&&h.childElementCount&&(o=h.children[0]),o||(o=h.firstChild),h.insertBefore(i,o),f.classList.remove("scrolledDown"),u.set(e,t),i.offsetParent,i.setAttribute("aria-hidden","false"),l()},t.has=function(e){return u.has(e)},t.get=function(e){return u.get(e)},t.remove=function(e){const t=u.get(e);if(void 0!==t){const n=t.parentElement,o=()=>{try{i.stringToBool(n.getAttribute("aria-hidden"))&&(h.removeChild(n),u.delete(e)),n.removeEventListener("transitionend",o)}catch{}};n.addEventListener("transitionend",o),d(e)}},t.hide=d,t.show=function(e){const t=u.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),f.classList.remove("scrolledDown"),l()}},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r);const u=new Map;let h,p,f,m=!1,g=-1,b=300;const v=i.debounce((()=>{g=-1}),50)})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler","WoltLabSuite/Core/Ui/CloseOverlay"],(function(e,t,n,i,o,r,a,s){"use strict";i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s);class l{container;containers=new Map;isLegacy=!1;store=null;tabs=new Map;constructor(e){this.container=e}
1validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=i.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;i.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=o.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const n=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+n+"') exists more than once.");const i=this.containers.get(t);if(void 0===i)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+n+"').");if(i.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+n+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+t+"'] (tab menu id: '"+n+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+n+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEac
1h((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(){this.tabs.forEach((e=>{const t=e.children[0];if(t.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let e=!1;t.addEventListener("touchstart",(()=>{e=!0})),t.addEventListener("touchmove",(()=>{e=!1})),t.addEventListener("touchend",(t=>{e&&(e=!1,t.preventDefault(),this._onClick(t))}))}}));let e=null;const t=l.getIdentifierFromHash();let n;if(""!==t&&(n=this.tabs.get(t),n)){const t=this.container.parentElement;t?.classList.contains("tabMenuContainer")&&(e=this.container)}if(!n){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){n||o.default.isHidden(e)||e.previousElementSibling&&!o.default.isHidden(e.previousElementSibling)||(n=e)})):"string"==typeof e&&"false"!==e&&(n=this.tabs.get(e))}n&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,n,!0));const i=this.container.dataset.store;if(i){const e=document.createElement("input");e.type="hidden",e.name=i,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}return e}select(t,i,o){if(t=t?t.toString():"",!(i=i||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;
1this.tabs.forEach((n=>{e===t&&(i=n),e++}))}if(!i)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||i.dataset.name||"";const r=this.getActiveTab();let c=null;if(r){const e=r.dataset.name;if(e===t)return;o||a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:r,tabName:e}),r.classList.remove("active"),c=this.containers.get(r.dataset.name||""),c.classList.remove("active"),c.classList.add("hidden"),this.isLegacy&&(r.classList.remove("ui-state-active"),c.classList.remove("ui-state-active"))}i.classList.add("active");const d=this.containers.get(t.toString());if(d.classList.add("active"),d.classList.remove("hidden"),this.isLegacy&&(i.classList.add("ui-state-active"),d.classList.add("ui-state-active")),this.store&&(this.store.value=t.toString()),!o){a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:i,activeName:t,previous:r,previousName:r?r.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(i),oldTab:e(r),newPanel:e(d),oldPanel:e(c)});let n=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?n+=window.location.hash:n+="#"+t,window.history.replaceState(void 0,"",n)}s.default.execute(),new Promise(((t,n)=>{e(["../TabMenu"],t,n)})).then(n.__importStar).then((e=>{e.scrollToTab(i)}))}selectFirstVisible(){let e=null;
1return this.tabs.forEach((t=>{e||o.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const n=e.children[0];/#([^#]+)$/.exec(n.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,n,i){"use strict";function o(){null!==l&&window.clearTimeout(l),l=window.setTimeout((()=>{for(const e of a)e();window.removeEventListener("scroll",o),a=[],r=void 0,l=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=function(e,t,n="smooth"){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(a.length>0&&e!==r)throw new Error("Cannot scroll to element, a concurrent request is running.");if(t&&a.push(t),void 0!==r)return;r=e,window.addEventListener("scroll",o);let l=i.default.offset(e).top;if(null===s){s=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;s="fixed"===t||"static"===t?e.offsetHeight:0}}s>0&&(l<=s?l=0:l-=s);const c=window.pageYOffset;window.scrollTo({left:0,top:l,behavior:n}),window.setTimeout((()=>{c===window.pageYOffset&&o()}),100)},t.isCurrentlyScrolling=function(){return void 0!==r},i=n.__importDefault(i);let r,a=[],s=null,l=null})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=o.default.identify(e);if(y.has(t))return;let n=new r.default(e);if(!n.validate())return;const i=n.init();if(y.set(t,n),i instanceof HTMLElement){const e=m(i.parentNode.id);e&&(n=e,n.select(i.id,void 0,!0))}const a=document.querySelector("#"+t+" > nav > ul");a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===a?(a.classList.add("active"),b=a):(a.classList.remove("active"),b=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){n=null,f(e)}let n=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==n&&window.clearTimeout(n),n=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{if(!t.defaultPrevented)for(const n of e.querySelectorAll("input, select, textarea"))if(!n.checkValidity()){t.preventDefault();
1const e=m(n.closest(".tabMenuContainer").id),i=n.closest(".tabMenuContent");return e.select(i.dataset.name||""),void l.element(n,(()=>{n.reportValidity()}))}}))}}))}function d(){y.forEach((e=>{let t=!1;e.getContainers().forEach((n=>{t||null===n.querySelector(".formError")||(t=!0,e.select(n.id))}))}))}function u(e){v=!0,y.forEach((t=>{const n=t.getActiveTab();e?f(n.closest(".menu, .tabMenu")):g(n)}))}function h(){v=!1,y.forEach((e=>{e.getActiveTab().closest(".menu, .tabMenu").querySelectorAll(".tabMenuOverlayLeft, .tabMenuOverlayRight").forEach((e=>{e.classList.remove("active")}))}))}function p(e,t,n,i,o,r){(r||t>0)&&(t-=15),n!==(t=t<0?0:Math.min(t,i-o))&&(e.classList.add("enableAnimation"),n<t?e.firstElementChild.style.setProperty("margin-left",n-t+"px",""):e.style.setProperty("padding-left",n-t+"px",""),setTimeout((()=>{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function f(e){if(!v)return;const t=e.clientWidth,n=e.querySelector("ul"),i=n.scrollLeft,o=n.scrollWidth,r=i>0;let a=e.querySelector(".tabMenuOverlayLeft");r?(null===a&&(a=document.createElement("button"),a.type="button",a.innerHTML='<fa-icon size="24" name="angle-left"></fa-icon>',a.className="tabMenuOverlayLeft",a.addEventListener("click",(()=>{const e=n.clientWidth;p(n,n.scrollLeft-~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");const s=t+i<o;let l=e.querySelector(".tabMenuOverlayRight");s?(null===l&&(l=document.createElement("button"),l.type="button",l.innerHTML='<fa-icon size="24" name="angle-right"></fa-icon>',l.className="tabMenuOverlayRight",l.addEventListener("click",(()=>{const e=n.clientWidth;p(n,n.scrollLeft+~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function m(e){return y.get(e)}function g(e){if(!v)return;const t=e.closest("ul"),n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;if(n===o)return;const r=e.offsetLeft;let a=!1;r<i&&(a=!0);let s=!1;if(!a){const t=n-(r-i);let o=e.clientWidth;null!==e.nextElementSibling&&(s=!0,o+=20),t<o&&(a=!0)}a&&p(t,r,i,o,n,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.selectErroneousTabs=d,t.setup=function(){c(),d(),i.default.add("WoltLabSuite/Core/Ui/TabMenu",c),a.default.add("WoltLabSuite/Core/Ui/TabMenu",(()=>{b&&(b.classList.remove("active"),b=null)})),s.on("screen-sm-down",{match(){u(!1)},unmatch:h,setup(){u(!0)}}),window.addEventListener("hashchange",(()=>{const e=r.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&y.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=r.default.getIdentifierFromHash();e&&window.setTimeout((()=>{if(l.isCurrentlyScrolling())return;const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const n=t.parentNode;let i=n.offsetTop-50;if(i<0&&(i=0),e>i){let e=o.default.offset(n).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=m,t.scrollToTab=g,i=n.__importDefault(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);let b=null,v=!1;const y=new Map})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Environment","../Helper/PageOverlay","../Helper/Selector","./Alignment"],(function(e,t,n,i,o,r,a){"use strict";function s(e){const t=e.currentTarget;let n=t.title.trim();""!==n&&(t.dataset.tooltip=n,t.setAttribute("aria-label",n),t.removeAttribute("title")),n=t.dataset.tooltip||"",d.style.removeProperty("top"),d.style.removeProperty("left"),n.length?(d.classList.add("active"),c.textContent=n,a.set(d,t,{horizontal:"center",verticalOffset:4,vertical:"top"})):d.classList.remove("active")}function l(){d.classList.remove("active")}let c,d;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){"desktop"===i.platform()&&(d=document.createElement("div"),d.id="balloonTooltip",d.classList.add("balloonTooltip"),d.addEventListener("transitionend",(()=>{d.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{d.style.removeProperty(e)}))})),c=document.createElement("span"),c.id="balloonTooltipText",d.appendChild(c),(0,o.getPageOverlayContainer)().append(d),(0,r.wheneverSeen)(".jsTooltip",(e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),e.addEventListener("click",l))})),window.addEventListener("scroll",l))},i=n.__importStar(i),a=n.__importStar(a)})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,n,i,o){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t){(null===a&&(a=new r),a).init(e,t)},i=n.__importStar(i),o=n.__importDefault(o);class r{activeElement;description;elements=new Map;input;submitButton;init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const n=e.dataset.link;t=n?e=>{window.location.href=n.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((n=>{n.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,o.default.open(this);const n=e.dataset.pages||"0";this.input.value=n,this.input.max=n,this.input.select(),this.description.textContent=i.get("wcf.page.jumpTo.description").replace(/#pages#/,n)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),o.default.close(this)}_dialogSetup(){const e=`<dl>\n <dt><label for="jsPaginationPageNo">${i.get("wcf.page.jumpTo")}</label></dt>\n <dd>\n <input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny">\n <small></small>\n </dd>\n </dl>\n <div class="formSubmit">\n <button type="button" class="button buttonPrimary">${i.get("wcf.global.button.submit")}</button>\n </div>`;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:i.get("wcf.global.page.pagination")},source:e}}}let a=null})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,n,i,o){"use strict";function r(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.activeElement,n=document.createElement("div");n.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",n),n.appendChild(e);const i=document.createElement("button");i.type="button",i.title=o.get("wcf.global.form.password.button.show"),i.classList.add("button","inputSuffix","jsTooltip"),n.appendChild(i);const r=document.createElement("fa-icon");r.setIcon("eye"),i.appendChild(r),i.addEventListener("click",(()=>{a(e,i,r)})),e.form?.addEventListener("submit",(()=>{"password"!==e.type&&a(e,i,r)})),t===e&&e.focus()}(e)}))}function a(e,t,n){"password"===e.type?(n.setIcon("eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.hide"),e.type="text"):(n.setIcon("eye"),t.dataset.tooltip=o.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){r(),i.default.add("WoltLabSuite/Core/Ui/Password",(()=>r()))},i=n.__importDefault(i),o=n.__importStar(o);const s=new WeakSet})),define("WoltLabSuite/Core/Ui/Empty",["require","exports","tslib","../Dom/Change/Listener"],(function(e,t,n,i){"use strict";function o(){document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((e=>{e.classList.remove("jsReloadPageWhenEmpty"),r.observe(e,{childList:!0})}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){o(),i.default.add("WoltLabSuite/Core/Ui/Empty",(()=>o()))},i=n.__importDefault(i);const r=new MutationObserver((e=>{e.forEach((e=>{const t=e.target;(0===t.childElementCount||Array.from(t.children).every((e=>"ignore"===e.dataset.reloadPageWhenEmpty)))&&window.location.reload()}))}))})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,n,i,o,r){"use strict";function a(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.show=function(e){if(!a().active){if((e=i.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");a().open(e)}},t.getContentElement=function(){return a().content},i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r);class s{_active=!1;parameters;confirmButton;_content;dialog;text;callbackCancel;callbackConfirm;constructor(){this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.type="button",this.confirmButton.dataset.type="submit",this.confirmButton.classList.add("button","buttonPrimary"),this.confirmButton.textContent=o.get("wcf.global.confirmation.confirm"),e.appendChild(this.confirmButton);const t=document.createElement("button");t.type="button",t.classList.add("button"),t.textContent=o.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{r.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,r.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,r.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){window.setTimeout((()=>{this.confirmButton.blur(),this.confirmButton.focus()}),1)}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:o.get("wcf.global.confirmation.title")}}}_dialogSubmit(){this._confirm()}}let l})),define("WoltLabSuite/Core/Ui/Object/Action",["require","exports","tslib","../../Ajax","../../Event/Handler","../Confirmation","../../Language","../../StringUtil","../../Dom/Change/Listener"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(`${d} ${u} ${h}`).forEach((e=>{p.has(e)||(e.addEventListener("click",(e=>function(e){function t(){i.apiOnce({data:{actionName:l,className:c,objectIDs:[h],parameters:p},success:e=>function(e,t){"reload"===e.dataset.objectActionSuccess?window.location.reload():o.fire("WoltLabSuite/Core/Ui/Object/Action",e.dataset.objectAction,{containerElement:e.closest(d),data:t,objectElement:e.closest(u)})}(n,e)})}e.preventDefault();const n=e.currentTarget,l=n.dataset.objectAction;let c=n.closest(d).dataset.objectActionClassName;n.dataset.objectActionClassName&&(c=n.dataset.objectActionClassName);let h=n.closest(u).dataset.objectId;n.dataset.objectId&&(h=n.dataset.objectId);const p={};Object.entries(n.dataset).forEach((([e,t])=>{let n=/^objectActionParameterData(.+)/.exec(e);if(n)Object.prototype.hasOwnProperty.call(p,"data")||(p.data={}),p.data[s.lcfirst(n[1])]=t;else if(n=/^objectActionParameter(.+)/.exec(e),n){const e=s.lcfirst(n[1]);if("data"===e)throw new Error("Additional object action parameters may not use 'data' as key.");p[e]=t}})),n.dataset.confirmMessage?r.show({confirm:t,message:a.get(n.dataset.confirmMessage),messageIsHtml:!0}):t()}(e))),p.add(e))}))}
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){c(),l.default.add("WoltLabSuite/Core/Ui/Action",(()=>c()))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l);const d=".jsObjectActionContainer[data-object-action-class-name]",u=".jsObjectActionObject[data-object-id]",h=".jsObjectAction[data-object-action]",p=new Set})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h){"use strict";function p(){return m||(m=new f),m}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){p().setup(e)},t.reload=function(){p().reload()},t.hideEditor=function(e){p().hideEditor(e)},t.showEditor=function(){p().showEditor()},t.unmark=function(e,t){p().unmark(e,t)},i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d),u=n.__importStar(u),h=n.__importStar(h);class f{containers=new Map;editors=new Map;editorDropdowns=new Map;itemData=new WeakMap;knownCheckboxes=new WeakSet;pageClassNames=[];pageObjectId=0;reloadPageOnSuccess=new Map;setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),r.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=a.default.identify(e);let n=this.containers.get(t);if(void 0===n){const i=e.querySelector(".jsClipboardMarkAll");null!==i&&(i.dataset.containerId=t,i.addEventListener("click",(e=>this.markAll(e)))),n={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:i,markedObjectIds:new Set},this.containers.set(t,n)}Array.from(n.checkboxes).forEach((e=>{this.knownCheckboxes.has(e)||(e.dataset.containerId=t,null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e))}))}))}loadMarkedItems(){i.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,n="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,n);const i=[],o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type;Array.from(r.checkboxes).forEach((e=>{const o=~~e.dataset.objectId;n?e.checked||(e.checked=!0,r.markedObjectIds.add(o),i.push(o)):e.checked&&(e.checked=!1,r.markedObjectIds.delete(o),i.push(o)),this.setParentAsMarked(e,n);const a=t.closest(".jsClipboardObject");null!==a&&(n?a.classList.add("jsMarked"):a.classList.remove("jsMarked"))})),this.saveState(a,i,n)}mark(e){const t=e instanceof Event?e.currentTarget:e,n=~~t.dataset.objectId,i=t.checked,o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type,s=t.closest(".jsClipboardObject");i?(r.markedObjectIds.add(n),s.classList.add("jsMarked")):(r.markedObjectIds.delete(n),s.classList.remove("jsMarked")),null!==r.markAll&&(r.markAll.checked=!Array.from(r.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(r.markAll,i)),this.setParentAsMarked(t,t.checked),this.saveState(a,[n],i)}saveState(e,t,n){i.api(this,{actionName:n?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=n.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:i,listItem:n,responseData:null})}const n=e.currentTarget,i=this.itemData.get(n);if(i.url)return void(window.location.href=i.url);const r="string"==typeof i.internalData.confirmMessage?i.internalData.confirmMessage:"";let a=!0;if(o.isPlainObject(i.parameters)&&i.parameters.actionName&&i.parameters.className){if("unmarkAll"===i.parameters.actionName||Array.isArray(i.parameters.objectIDs))if(r.length){const e="string"==typeof i.internalData.template?i.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const n=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[n]=e.value);break;case"SELECT":t[n]=e.value;break;case"TEXTAREA":t[n]=e.value.trim()}})),this.executeProxyAction(n,i,t)},message:r,template:e})}else this.executeProxyAction(n,i)}else r.length&&(a=!1,c.show({confirm:t,message:r}));a&&t()}executeProxyAction(e,t,n={}){const r="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],a={data:n};o.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEac
1h((([e,t])=>{a[e]=t})),i.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:r,parameters:a},(n=>{if("unmarkAll"!==t.actionName){const i=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",i,{data:t,listItem:e,responseData:n});const o=this.reloadPageOnSuccess.get(i);if(o&&o.includes(n.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;i.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=o.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const n=e.element.dataset.type,i=Array.isArray(t[n])?t[n]:[];this.rebuildMarkings(e,i)}));const n=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{n.includes(t)||(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let i=!1,o=this.editors.get(e),r=this.editorDropdowns.get(e);void 0===o?(i=!0,o=document.createElement("a"),o.className="dropdownToggle",o.textContent=t.label,this.editors.set(e,o),r=document.createElement("ol"),r.className="dropdownMenu",this.editorDropdowns.set(e,r)):(o.textContent=t.label,r.innerHTML=""),Object.values(t.items).forEach((t=>{const n=document.createElement("li"),i=document.createElement("span");i.textContent=t.label,n.appendChild(i),r.appendChild(n),n.dataset.type=e,n.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(n,t)}));const a=document.createElement("li");a.classList.add("dropdownDivider"),r.appendChild(a);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),r.appendChild(s),-1!==n.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):(u.add(t,o),i=!0)}if(i){const e=o.parentElement;e.classList.add("dropdown"),e.appendChild(r),d.default.init(o)}}))}rebuildMarkings(e,t){let n=!0;if(Array.from(e.checkboxes).forEach((e=>{const i=e.closest(".jsClipboardObject"),o=t.includes(~~e.dataset.objectId);o||(n=!1),e.checked=o,o?i.classList.add("jsMarked"):i.classList.remove("jsMarked"),this.setParentAsMarked(e,o)})),null!==e.markAll){e.markAll.checked=n,this.setParentAsMarked(e.markAll,n);const t=e.markAll.closest(".columnMark")?.parentNode;t&&(n?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const n=e.parentElement;"checkbox"===n.getAttribute("role")&&n.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),h.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),h.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let m})),define("WoltLabSuite/Core/Ui/Object/Action/Handler",["require","exports","tslib","../../../Event/Handler","../../../Controller/Clipboard"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i=n.__importStar(i),o=n.__importStar(o),t.default=class{objectAction;constructor(e,t,n){this.objectAction=n,i.add("WoltLabSuite/Core/Ui/Object/Action",e,(e=>this.handleObjectAction(e))),document.querySelectorAll(".jsClipboardContainer[data-type]").forEach((e=>{i.add("com.woltlab.wcf.clipboard",e.dataset.type,(e=>{null!==e.responseData&&-1!==t.indexOf(e.responseData.actionName)&&this.handleClipboardAction(e)}))}))}handleClipboardAction(e){const t=e.listItem.dataset.type;document.querySelectorAll(`.jsClipboardContainer[data-type="${t}"] .jsClipboardObject`).forEach((t=>{const n=t.dataset.objectId;e.responseData.objectIDs.forEach((i=>
1{~~i==~~n&&this.objectAction({containerElement:t.closest(".jsObjectActionContainer"),data:e.responseData,objectElement:t})}))}))}handleObjectAction(e){this.objectAction(e),o.reload()}}})),define("WoltLabSuite/Core/Ui/Object/Action/Delete",["require","exports","tslib","./Handler"],(function(e,t,n,i){"use strict";function o(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="delete"]');if(!t||t.dataset.objectActionHandler)return;const n=e.objectElement.querySelector(".jsObjectActionObjectChildren");n&&Array.from(n.children).forEach((t=>{e.objectElement.insertAdjacentElement("beforebegin",t)})),e.objectElement.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){new i.default("delete",["delete"],o)},i=n.__importDefault(i)})),define("WoltLabSuite/Core/Ui/Object/Action/Toggle",["require","exports","tslib","../../../Language","./Handler"],(function(e,t,n,i,o){"use strict";function r(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="toggle"]');if(!t||t.dataset.objectActionHandler)return;const n="FA-ICON"===t.nodeName?t:t.querySelector("fa-icon");if(n)if("square"===n.name){n.setIcon("square-check");const e=t.dataset.disableTitle||i.get("wcf.global.button.disable");t.title=e}else{n.setIcon("square");const e=t.dataset.enableTitle||i.get("wcf.global.button.enable");t.title=e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){new o.default("toggle",["enable","disable"],r)},i=n.__importStar(i),o=n.__importDefault(o)})),define("WoltLabSuite/Core/Ui/Search",["require","exports","tslib","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Simple","./Screen","../Environment","../Dom/Util"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";function d(){r.default.execute(r.Origin.Search),f.classList.add("searchBarOpen"),w?.parentElement.classList.add("open"),p||o.set(g,y,{horizontal:"right"}),g.style.setProperty("top",`${m.clientHeight}px`,""),v.focus(),window.setTimeout((()=>{const e=v.value.length;v.selectionStart=e,v.selectionEnd=e}),1)}function u(){if(!f.classList.contains("searchBarOpen")&&!g.classList.contains("open"))return;f.classList.remove("searchBarOpen"),g.classList.remove("open"),w?.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{g.style.removeProperty(e)})),"ios"===l.platform()&&(s.scrollEnable(),void 0!==h&&(document.body.scrollTop=h,h=void 0)),p&&v.blur();const e=document.getElementById("pageHeaderSearchMobile");e&&(e.setAttribute("aria-expanded","false"),e.querySelector("fa-icon").setIcon("magnifying-glass"));const t=g.querySelector(".pageHeaderSearchType");a.default.close(t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){null!==g&&(function(){g.addEventListener("click",(e=>e.stopPropagation()));const e=document.querySelector(".pageHeaderSearchType"),t=(0,c.identify)(e);a.default.getDropdownMenu(t).addEventListener("click",(e=>{e.stopPropagation(),a.default.close(t)})),w?.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),f.classList.contains("searchBarOpen")?u():d()})),r.default.add("WoltLabSuite/Core/Ui/Search",((e,t)=>{if(e!==r.Origin.Search){if(e===r.Origin.DropDown){if(document.getElementById("pageHeaderSearchTypeSelect").dataset.target===t)return;if(v.parentElement.id===t)return}u(),b?.setAttribute("aria-expanded","false")}})),window.addEventListener("resize",(()=>{!p&&f.classList.contains("searchBarOpen")&&o.set(g,y,{horizontal:"right"})}),{passive:!0})}(),s.on("screen-md-down",{match(){p=!0},unmatch(){p=!1,h=void 0},setup(){p=!0,function(){const e=document.getElementById("pageHeaderSearchMobile");b=e,e.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"true"===e.getAttribute("aria-expanded")?u():("ios"===l.platform()&&(h=document.body.scrollTop,s.scrollDisable()),d(),g.style.setProperty("top",`${f.offsetHeight}px`,""),g.classList.add("open"),v.focus(),"ios"===l.platform()&&(document.body.scrollTop=0),e.setAttribute("aria-expanded","true"),e.querySelector("fa-icon").setIcon("xmark"))})),g.addEventListener("click",(e=>{e.stopPropagation(),e.target===g&&(e.preventDefault(),u())}))}()}}),i.add("com.woltlab.wcf.Search","close",(()=>u())))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);let h,p=!1;document.body.classList.contains("wcfAcp");const f=document.getElementById("pageHeader"),m=document.getElementById("pageHeaderPanel"),g=document.getElementById("pageHeaderSearch");let b;const v=document.getElementById("pageHeaderSearchInput"),y=document.getElementById("topMenu"),w=document.getElementById("userPanelSearchButton")})),define("WoltLabSuite/Core/LazyLoader",["require","exports"],(function(e,t){"use strict";function n(e){void 0!==r.get(e)&&window.cancelAnimationFrame(r.get(e)),r.set(e,window.requestAnimationFrame((()=>{for(const t of o.keys())if(e.matches(t)||null!==e.querySelector(t)){for(const e of o.get(t))a.then((()=>e()));o.delete(t)}r.delete(e)})))}let i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.whenFirstSeen=function(e,t){o.has(e)||o.set(e,[]),o.get(e).push(t),n(document.body),void 0===i&&(i=new MutationObserver((e=>{if(0!==o.size)for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)}))),i.observe(document,{subtree:!0,childList:!0})};const o=new Map,r=new Map,a=new Promise((e=>{"loading"===document.readyState?document.addEventListener("readystatechange",(()=>e()),{once:!0}):e()}))})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(e=e||self).PerfectScrollbar=t()}(this,(function(){"use strict";function e(e){return getComputedStyle(e)}function t(e,t){var n,i;for(n in t)"number"==typeof(i=t[n])&&(i+="px"),e.style[n]=i;return e}function n(e){var t=document.createElement("div");return t.className=e,t}function i(e,t){if(!v)throw new Error("No element matching method supported");return v.call(e,t)}function o(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function r(e,t){return Array.prototype.filter.call(e.children,(function(e){return i(e,t)}))}function a(e,t){var n=e.element.classList,i=y.state.scrolling(t);n.contains(i)?clearTimeout(w[t]):n.add(i)}function s(e,t){w[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(y.state.scrolling(t))}),e.settings.scrollingThreshold)}function l(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function c(e,t,n,i,o){var r;if(void 0===i&&(i=!0),void 0===o&&(o=!1),"top"===t)r=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");r=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,i,o){var r,c=n[0],d=n[1],u=n[2],h=n[3],p=n[4],f=n[5];void 0===i&&(i=!0),void 0===o&&(o=!1),r=e.element,e.reach[h]=null,r[u]<1&&(e.reach[h]="start"),r[u]>e[c]-e[d]-1&&(e.reach[h]="end"),t&&(r.dispatchEvent(l("ps-scroll-"+h)),t<0?r.dispatchEvent(l("ps-scroll-"+p)):t>0&&r.dispatchEvent(l("ps-scroll-"+f)),i&&function(e,t){a(e,t),s(e,t)}(e,h)),e.reach[h]&&(t||o)&&r.dispatchEvent(l("ps-"+h+"-reach-"+e.reach[h]))}(e,n,r,i,o)}function d(e){return parseInt(e,10)||0}function u(e){var n=e.element,i=Math.floor(n.scrollTop),a=n.getBoundingClientRect();e.containerWidth=Math.round(a.width),e.containerHeight=Math.round(a.height),e.contentWidth=n.scrollWidth,e.contentHeight=n.scrollHeight,n.contains(e.scrollbarXRail)||(r(n,y.element.rail("x")).forEach((function(e){return o(e)})),n.appendChild(e.scrollbarXRail)),n.contains(e.scrollbarYRail)||(r(n,y.element.rail("y")).forEach((function(e){return o(e)})),n.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=h(e,d(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=d((e.negativeScrollAdjustment+n.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=h(e,d(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=d(i*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,n){var i,o={width:n.railXWidth},r=Math.floor(e.scrollTop);n.isRtl?o.left=n.negativeScrollAdjustment+e.scrollLeft+n.containerWidth-n.contentWidth:o.left=e.scrollLeft,n.isScrollbarXUsingBottom?o.bottom=n.scrollbarXBottom-r:o.top=n.scrollbarXTop+r,t(n.scrollbarXRail,o),i={top:r,height:n.railYHeight},n.isScrollbarYUsingRight?n.isRtl?i.right=n.contentWidth-(n.negativeScrollAdjustment+e.scrollLeft)-n.scrollbarYRight-n.scrollbarYOuterWidth-9:i.right=n.scrollbarYRight-e.scrollLeft:n.isRtl?i.left=n.negativeScrollAdjustment+e.scrollLeft+2*n.containerWidth-n.contentWidth-n.scrollbarYLeft-n.scrollbarYOuterWidth:i.left=n.scrollbarYLeft+e.scrollLeft,t(n.scrollbarYRail,i),t(n.scrollbarX,{left:n.scrollbarXLeft,width:n.scrollbarXWidth-n.railBorderXWidth}),t(n.scrollbarY,{top:n.scrollbarYTop,height:n.scrollbarYHeight-n.railBorderYWidth})}(n,e),e.scrollbarXActive?n.classList.add(y.state.active("x")):(n.classList.remove(y.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,n.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?n.classList.add(y.state.active("y")):(n.classList.remove(y.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,n.scrollTop=0)}function h(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function p(e,t){function n(t){t.touches&&t.touches[0]&&(t[c]=t.touches[0].pageY),b[f]=v+E*(t[c]-w),a(e,m),u(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function i(){s(e,m),e[g].classList.remove(y.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",n)}function o(t,o){v=b[f],o&&t.touches&&(t[c]=t.touches[0].pageY),w=t[c],E=(e[l]-e[r])/(e[d]-e[p]),o?e.event.bind(e.ownerDocument,"touchmove",n):(e.event.bind(e.ownerDocument,"mousemove",n),e.event.once(e.ownerDocument,"mouseup",i),t.preventDefault()),e[g].classList.add(y.state.clicking),t.stopPropagation()}
1var r=t[0],l=t[1],c=t[2],d=t[3],h=t[4],p=t[5],f=t[6],m=t[7],g=t[8],b=e.element,v=null,w=null,E=null;e.event.bind(e[h],"mousedown",(function(e){o(e)})),e.event.bind(e[h],"touchstart",(function(e){o(e,!0)}))}var f,m,g,b,v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),y={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},w={x:null,y:null},E=function(e){this.element=e,this.handlers={}},S={isEmpty:{configurable:!0}};return E.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,{passive:!1})},E.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(i){return!(!t||i===t)||(n.element.removeEventListener(e,i,!1),!1)}))},E.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},S.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(E.prototype,S),(f=function(){this.eventElements=[]}).prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new E(e),this.eventElements.push(t)),t},f.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},f.prototype.unbind=function(e,t,n){var i=this.eventElement(e);i.unbind(t,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},f.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},f.prototype.once=function(e,t,n){var i=this.eventElement(e),o=function(e){i.unbind(t,o),n(e)};i.bind(t,o)},m={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},g={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=n*e.containerHeight,u(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=n*e.containerWidth,u(e),t.stopPropagation()}))},"drag-thumb":function(e){p(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),p(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(n){var o,r,a,s;if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(i(t,":hover")||i(e.scrollbarX,":focus")||i(e.scrollbarY,":focus"))){if(o=document.activeElement?document.activeElement:e.ownerDocument.activeElement){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(i(s=o,"input,[contenteditable]")||i(s,"select,[contenteditable]")||i(s,"textarea,[contenteditable]")||i(s,"button,[contenteditable]"))return}switch(r=0,a=0,n.which){case 37:r=n.metaKey?-e.contentWidth:n.altKey?-e.containerWidth:-30;break;case 38:a=n.metaKey?e.contentHeight:n.altKey?e.containerHeight:30;break;case 39:r=n.metaKey?e.contentWidth:n.altKey?e.containerWidth:30;break;case 40:a=n.metaKey?-e.contentHeight:n.altKey?-e.containerHeight:-30;break;case 32:a=n.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:a=e.containerHeight;break;case 34:a=-e.containerHeight;break;case 36:a=e.contentHeight;break;case 35:a=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==r||e.settings.suppressScrollY&&0!==a||(t.scrollTop-=a,t.scrollLeft+=r,u(e),function(n,i){var o,r=Math.floor(t.scrollTop);if(0===n){if(!e.scrollbarYActive)return!1;if(0===r&&i>0||r>=e.contentHeight-e.containerHeight&&i<0)return!e.settings.wheelPropagation}if(o=t.scrollLeft,0===i){if(!e.scrollbarXActive)return!1;if(0===o&&n<0||o>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}(r,a)&&n.preventDefault())}}))},wheel:function(t){function n(n){var o,r=function(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!=t&&n!=n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}(n),a=r[0],s=r[1];(function(t,n,o){var r,a,s,l;if(!m.isWebKit&&i.querySelector("select:focus"))return!0;
1if(!i.contains(t))return!1;for(r=t;r&&r!==i;){if(r.classList.contains(y.element.consuming))return!0;if(a=e(r),o&&a.overflowY.match(/(scroll|auto)/)&&(s=r.scrollHeight-r.clientHeight)>0&&(r.scrollTop>0&&o<0||r.scrollTop<s&&o>0))return!0;if(n&&a.overflowX.match(/(scroll|auto)/)&&(l=r.scrollWidth-r.clientWidth)>0&&(r.scrollLeft>0&&n<0||r.scrollLeft<l&&n>0))return!0;r=r.parentNode}return!1})(n.target,a,s)||(o=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?i.scrollTop-=s*t.settings.wheelSpeed:i.scrollTop+=a*t.settings.wheelSpeed,o=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(a?i.scrollLeft+=a*t.settings.wheelSpeed:i.scrollLeft-=s*t.settings.wheelSpeed,o=!0):(i.scrollTop-=s*t.settings.wheelSpeed,i.scrollLeft+=a*t.settings.wheelSpeed),u(t),o=o||function(e,n){var o=Math.floor(i.scrollTop),r=0===i.scrollTop,a=o+i.offsetHeight===i.scrollHeight,s=0===i.scrollLeft,l=i.scrollLeft+i.offsetWidth===i.scrollWidth;return!(Math.abs(n)>=Math.abs(e)?r&&n>0||a&&n<0:s&&e>0||l&&e<0)||!t.settings.wheelPropagation}(a,s),o&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault()))}var i=t.element;void 0!==window.onwheel?t.event.bind(i,"wheel",n):void 0!==window.onmousewheel&&t.event.bind(i,"mousewheel",n)},touch:function(t){function n(e,n){l.scrollTop-=n,l.scrollLeft-=e,u(t)}function i(e){return e.targetTouches?e.targetTouches[0]:e}function o(e){return!(e.pointerType&&"pen"===e.pointerType&&0===e.buttons||(!e.targetTouches||1!==e.targetTouches.length)&&(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function r(e){if(o(e)){var t=i(e);c.pageX=t.pageX,c.pageY=t.pageY,d=(new Date).getTime(),null!==p&&clearInterval(p)}}function a(r){var a,s,u,p,f,g;if(o(r)){if(u=(s={pageX:(a=i(r)).pageX,pageY:a.pageY}).pageX-c.pageX,p=s.pageY-c.pageY,function(t,n,i){var o,r,a,s;if(!l.contains(t))return!1;for(o=t;o&&o!==l;){if(o.classList.contains(y.element.consuming))return!0;if(r=e(o),i&&r.overflowY.match(/(scroll|auto)/)&&(a=o.scrollHeight-o.clientHeight)>0&&(o.scrollTop>0&&i<0||o.scrollTop<a&&i>0))return!0;if(n&&r.overflowX.match(/(scroll|auto)/)&&(s=o.scrollWidth-o.clientWidth)>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<s&&n>0))return!0;o=o.parentNode}return!1}(r.target,u,p))return;n(u,p),c=s,(g=(f=(new Date).getTime())-d)>0&&(h.x=u/g,h.y=p/g,d=f),function(e,n){var i=Math.floor(l.scrollTop),o=l.scrollLeft,r=Math.abs(e),a=Math.abs(n);if(a>r){if(n<0&&i===t.contentHeight-t.containerHeight||n>0&&0===i)return 0===window.scrollY&&n>0&&m.isChrome}else if(r>a&&(e<0&&o===t.contentWidth-t.containerWidth||e>0&&0===o))return!0;return!0}(u,p)&&r.preventDefault()}}function s(){t.settings.swipeEasing&&(clearInterval(p),p=setInterval((function(){t.isInitialized?clearInterval(p):h.x||h.y?Math.abs(h.x)<.01&&Math.abs(h.y)<.01?clearInterval(p):t.element?(n(30*h.x,30*h.y),h.x*=.8,h.y*=.8):clearInterval(p):clearInterval(p)}),10))}var l,c,d,h,p;(m.supportsTouch||m.supportsIePointer)&&(l=t.element,c={},d=0,h={},p=null,m.supportsTouch?(t.event.bind(l,"touchstart",r),t.event.bind(l,"touchmove",a),t.event.bind(l,"touchend",s)):m.supportsIePointer&&(window.PointerEvent?(t.event.bind(l,"pointerdown",r),t.event.bind(l,"pointermove",a),t.event.bind(l,"pointerup",s)):window.MSPointerEvent&&(t.event.bind(l,"MSPointerDown",r),t.event.bind(l,"MSPointerMove",a),t.event.bind(l,"MSPointerUp",s))))}},(b=function(i,o){var r,a,s,l,c,h,p,m=this;if(void 0===o&&(o={}),"string"==typeof i&&(i=document.querySelector(i)),!i||!i.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(r in this.element=i,i.classList.add(y.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},o)this.settings[r]=o[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null,a=function(){return i.classList.add(y.state.focus)},s=function(){return i.classList.remove(y.state.focus)},this.isRtl="rtl"===e(i).direction,!0===this.isRtl&&i.classList.add(y.rtl),this.isNegativeScroll=(h=i.scrollLeft,null,i.scrollLeft=-1,p=i.scrollLeft<0,i.scrollLeft=h,p),this.negativeScrollAdjustment=this.isNegativeScroll?i.scrollWidth-i.clientWidth:0,this.event=new f,this.ownerDocument=i.ownerDocument||document,this.scrollbarXRail=n(y.element.rail("x")),i.appendChild(this.scrollbarXRail),this.scrollbarX=n(y.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null,l=e(this.scrollbarXRail),this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=d(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=d(l.borderLeftWidth)+d(l.borderRightWidth),t(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=d(l.marginLeft)+d(l.marginRight),t(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=n(y.element.rail("y")),i.appendChild(this.scrollbarYRail),this.scrollbarY=n(y.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null,c=e(this.scrollbarYRail),this.scrollbarYRight=parseInt(c.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=d(c.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var n=e(t);return d(n.width)+d(n.paddingLeft)+d(n.paddingRight)+d(n.borderLeftWidth)+d(n.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=d(c.borderTopWidth)+d(c.borderBottomWidth),t(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=d(c.marginTop)+d(c.marginBottom),t(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:i.scrollLeft<=0?"start":i.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:i.scrollTop<=0?"start":i.scrollTop>=this.contentHeight-this.containerHeight?"end":null}
1,this.isAlive=!0,this.settings.handlers.forEach((function(e){return g[e](m)})),this.lastScrollTop=Math.floor(i.scrollTop),this.lastScrollLeft=i.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return m.onScroll(e)})),u(this)}).prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,t(this.scrollbarXRail,{display:"block"}),t(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=d(e(this.scrollbarXRail).marginLeft)+d(e(this.scrollbarXRail).marginRight),this.railYMarginHeight=d(e(this.scrollbarYRail).marginTop)+d(e(this.scrollbarYRail).marginBottom),t(this.scrollbarXRail,{display:"none"}),t(this.scrollbarYRail,{display:"none"}),u(this),c(this,"top",0,!1,!0),c(this,"left",0,!1,!0),t(this.scrollbarXRail,{display:""}),t(this.scrollbarYRail,{display:""}))},b.prototype.onScroll=function(e){this.isAlive&&(u(this),c(this,"top",this.element.scrollTop-this.lastScrollTop),c(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},b.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},b.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")},b})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Form/XsrfToken","./Language","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password","./Ui/Empty","./Ui/Object/Action","./Ui/Object/Action/Delete","./Ui/Object/Action/Toggle","./Ui/Search","./LazyLoader","./Helper/PageOverlay","perfect-scrollbar"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f,m,g,b,v,y,w,E,S,_,C,A){"use strict";function L(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.querySelector("h1, h2, h3")||e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(t){t=i.extend({colorScheme:"light",enableMobileMenu:!0,pageMenuMainProvider:void 0},t),c.setup(),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),(0,A.adoptPageOverlayContainer)(document.body),s.setup(),o.default.init(),h.default.setup(),p.setup(t.enableMobileMenu,t.pageMenuMainProvider),m.setup(),u.default.setup(),g.setup(),v.setup(),y.setup(),w.setup(),E.setup(),S.setup(),(0,_.init)(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===s.browser()&&(window.onbeforeunload=()=>{});let l=0;l=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(l),window.jQuery((()=>{f.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==s.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),window.requestAnimationFrame((()=>{const e=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.setProperty("--scrollbar-width",`${e}px`)})),L(),a.default.add("WoltLabSuite/Core/Bootstrap",(()=>L)),t.dynamicColorScheme&&new Promise(((t,n)=>{e(["./Controller/Style/ColorScheme"],t,n)})).then(n.__importStar).then((({setup:e})=>{e()})),(0,C.whenFirstSeen)("[data-report-content]",(()=>{new Promise(((t,n)=>{e(["./Ui/Moderation/Report"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)(".messageTabMenu",(()=>{new Promise(((t,n)=>{e(["./Component/Message/MessageTabMenu"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("[data-edit-avatar]",(()=>{new Promise(((t,n)=>{e(["./Component/User/Avatar"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-pagination",(()=>{new Promise(((t,n)=>{e(["./Ui/Pagination/JumpToPage"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-google-maps",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/woltlab-core-google-maps"],t,n)})).then(n.__importStar)})),(0,C.whenFirstSeen)("[data-google-maps-geocoding]",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/Geocoding"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-file",(()=>{new Promise(((t,n)=>{e(["./Component/File/woltlab-core-file"],t,n)})).then(n.__importStar)})),(0,C.whenFirstSeen)("woltlab-core-file-upload",(()=>{new Promise(((t,n)=>{e(["./Component/File/woltlab-core-file"],t,n)})).then(n.__importStar),new Promise(((t,n)=>{e(["./Component/File/Upload"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)(".activityPointsDisplay",(()=>{new Promise(((t,n)=>{e(["./Component/User/ActivityPointList"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("[data-fancybox]",(()=>{new Promise(((t,n)=>{e(["./Component/Image/Viewer"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)(".jsImageViewer",(()=>{console.warn("The class `jsImageViewer` is deprecated. Use the attribute `data-fancybox` instead."),new Promise(((t,n)=>{e(["./Component/Image/Viewer"],t,n)})).then(n.__importStar).then((({setupLegacy:e})=>e()))})),(0,C.whenFirstSeen)(".jsEnablesOptions",(()=>{new Promise(((t,n)=>{e(["./Component/Option/Enable"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("[data-edit-cover-photo]",(()=>{new Promise(((t,n)=>{e(["./Component/User/CoverPhoto"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes){if(!(e instanceof HTMLElement))continue;if(null===e.querySelector(".g-recaptcha-bubble-arrow")){const t=e.querySelector("iframe");
1if(null===t)continue;if(!t.src.startsWith("https://www.recaptcha.net/recaptcha/api"))continue;if(t.parentElement?.parentElement?.parentElement===document.body){const n="a-"+t.name.split("-")[1],i=document.querySelector(`iframe[name="${n}"]`);if(!i)continue;if(!i.closest("woltlab-core-dialog"))continue;(0,A.getPageOverlayContainer)().append(e)}continue}const t=e.querySelector("iframe");if(!t)continue;const n="a-"+t.name.split("-")[1],i=document.querySelector(`iframe[name="${n}"]`);i&&(i.closest("woltlab-core-dialog")&&((0,A.getPageOverlayContainer)().append(e),e.classList.add("g-recaptcha-container")))}})).observe(document.body,{childList:!0})},i=n.__importStar(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importStar(d),u=n.__importDefault(u),h=n.__importDefault(h),p=n.__importStar(p),f=n.__importStar(f),m=n.__importStar(m),g=n.__importStar(g),b=n.__importStar(b),v=n.__importStar(v),y=n.__importStar(y),w=n.__importStar(w),E=n.__importStar(E),S=n.__importStar(S),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=l})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,n,i){"use strict";function o(){for(let e=0,t=a.length;e<t;e++){const t=a[e];s.has(t)||(t.addEventListener("click",r,{once:!0}),s.add(t))}}function r(e){e.preventDefault();const t=e.currentTarget;t.classList.remove("ignoredUserMessage"),s.delete(t),window.getSelection().removeAllRanges()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){o(),i.default.add("WoltLabSuite/Core/Ui/User/Ignore",o)},i=n.__importDefault(i);const a=document.getElementsByClassName("ignoredUserMessage"),s=new Set})),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["require","exports","tslib","../../../Environment","../../../Language","../../Screen"],(function(e,t,n,i,o,r){"use strict";function a(){m=!0,"safari"===i.browser()?window.setTimeout(c,1e3):window.requestAnimationFrame((()=>c()))}function s(){m=!1}function l(e){g=Math.min(g+e,0),p.style.setProperty("margin-left",`${g}px`,"")}function c(){if(!m)return;b=[],v=[];const e=f.clientWidth,t=f.scrollWidth;!h&&t>e&&(u=document.createElement("a"),u.className="mainMenuShowNext",u.href="#",u.innerHTML='<fa-icon size="32" name="angle-right" solid></fa-icon>',u.setAttribute("aria-hidden","true"),u.addEventListener("click",(e=>{e.preventDefault(),function(){if(v.length){const e=v.slice(0,3).pop();l(f.clientWidth-(e.offsetLeft+e.clientWidth)),f.lastElementChild===e&&u.classList.remove("active"),h.classList.add("active")}}()})),f.insertAdjacentElement("beforebegin",u),h=document.createElement("a"),h.className="mainMenuShowPrevious",h.href="#",h.innerHTML='<fa-icon size="32" name="angle-left" solid></fa-icon>',h.setAttribute("aria-hidden","true"),h.addEventListener("click",(e=>{e.preventDefault(),function(){if(b.length){const e=b.slice(-3)[0];l(-1*e.offsetLeft),f.firstElementChild===e&&h.classList.remove("active"),u.classList.add("active")}}()})),f.insertAdjacentElement("afterend",h)),(t>e||g<0)&&Array.from(f.children).forEach((t=>{const n=t.offsetLeft;n<0?b.push(t):n+t.clientWidth>e&&v.push(t)})),h?.classList[b.length?"add":"remove"]("active"),u?.classList[v.length?"add":"remove"]("active")}function d(){p.addEventListener("transitionend",c),new ResizeObserver((()=>{p.style.setProperty("margin-left","0px",""),g=0,c()})).observe(f),a(),f.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const n=document.createElement("button");n.type="button",n.className="visuallyHidden",n.setAttribute("aria-label",o.get("wcf.global.button.showMenu")),e.insertBefore(n,t.nextSibling);let i=!1;n.addEventListener("click",(()=>{i=!i,t.setAttribute("aria-expanded",i?"true":"false"),n.setAttribute("aria-label",o.get(i?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}
1Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");f=e,p=t,r.on("screen-lg",{match:a,unmatch:s,setup:d})},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r);let u,h,p,f,m=!1,g=0,b=[],v=[]})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class n{userId;username;link;guestTokenDialogEndpoint;constructor(e,t,n,i){this.userId=e,this.username=t,this.link=n,this.guestTokenDialogEndpoint=i}}let i;return{getLink:()=>i.link,init(e,t,o,r=""){if(i)throw new Error("User has already been initialized.");i=new n(e,t,o,r)},get userId(){return i.userId},get username(){return i.username},get guestTokenDialogEndpoint(){return i.guestTokenDialogEndpoint}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){d||(d=new c)},t.allExternalMediaEnabled=function(){return u},o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l);class c{constructor(){"all"===window.sessionStorage.getItem(`${r.getStoragePrefix()}user-consent`)&&(u=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){u?this.enableAllExternalMedia():((0,i.wheneverFirstSeen)(".jsButtonMessageUserConsentEnable",(e=>{e.addEventListener("click",(e=>this.click(e)))})),(0,i.wheneverFirstSeen)(".jsButtonMessageUserConsentOnce",(e=>{e.addEventListener("click",(()=>{const t=e.closest(".messageUserConsent");null!==t&&this.enableExternalMedia(t)}))})))}click(e){e.preventDefault(),u=!0,this.enableAllExternalMedia(),l.default.userId?o.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${r.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){if(e.dataset.target)document.getElementById(e.dataset.target).hidden=!1;else{const t=atob(e.dataset.payload);s.default.insertHtml(t,e,"before")}e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let d,u=!1})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function n(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyTextToClipboard=n,t.copyElementTextToClipboard=async function(e){return n(e.textContent.replace(/\u200B/g,"").replace(/\u00A0/g," "))}})),define("WoltLabSuite/Core/Ui/Message/Share/Providers",["require","exports"],(function(e,t){"use strict";function n(e){i.add(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addShareProvider=n,t.addShareProviders=function(e){e.forEach((e=>n(e)))},t.getShareProviders=function(){return i};const i=new Set})),define("WoltLabSuite/Core/Component/Snackbar",["require","exports","WoltLabSuite/Core/Language","WoltLabSuite/Core/Helper/PageOverlay"],(function(e,t,n,i){"use strict";function o(){return l||(l=new c),l}function r(e){return new s(e,a.Success)}var a;Object.defineProperty(t,"__esModule",{value:!0}),t.showSuccessSnackbar=r,t.showProgressSnackbar=function(e,t){return new d(e,t)},t.showDefaultSuccessSnackbar=function(){return r((0,n.getPhrase)("wcf.global.success"))},function(e){e[e.Success=0]="Success",e[e.Progress=1]="Progress"}(a||(a={}));class s extends EventTarget{#_="";#i;#C;constructor(e,t){super(),this.#_=e,this.#i=t,this.#A()}get message(){return this.#_}set message(e){this.#_=e,this.#C.querySelector(".snackbar__message").textContent=e}markAsDone(){this.#i=a.Success,this.#L(),this.#C.querySelector(".snackbar__icon fa-icon").setIcon("check"),this.#I()}#A(){const e=document.createElement("div");e.classList.add("snackbar__icon");const t=document.createElement("fa-icon");t.size=24,t.setIcon(this.isProgress()?"spinner":"check"),e.append(t);const n=document.createElement("div");n.classList.add("snackbar__message"),this.isProgress()&&n.setAttribute("aria-live","polite"),n.append(this.message),this.#C=document.createElement("div"),this.#C.classList.add("snackbar"),this.#C.setAttribute("role","status"),this.#L(),this.#C.addEventListener("click",(()=>{this.isProgress()||this.close()})),this.#C.append(e,n),o().addSnackbar(this),this.isProgress()||this.#I()}#L(){this.isProgress()?(this.#C.classList.add("snackbar--progress"),this.#C.classList.remove("snackbar--success")):(this.#C.classList.remove("snackbar--progress"),this.#C.classList.add("snackbar--success"))}#I(){window.setTimeout((()=>{this.close()}),3e3)}isProgress(){return this.#i==a.Progress}isVisible(){return null!==this.#C.parentElement&&!this.#C.classList.contains("snackbar--closing")}close(){if(!this.isVisible())return;this.dispatchEvent(new CustomEvent("snackbar:close"));const e=Math.trunc(o().getGapValue()+this.#C.getBoundingClientRect().height);this.#C.style.setProperty("--height",`${e}px`),this.#C.classList.add("snackbar--closing"),this.#C.addEventListener("animationend",(()=>{this.#C.remove()}))}
1get element(){return this.#C}}let l;class c{#x;#k=[];constructor(){this.#x=document.createElement("div"),this.#x.classList.add("snackbarContainer"),(0,i.getPageOverlayContainer)().append(this.#x)}addSnackbar(e){const t=this.#k.filter((e=>!e.isProgress()));t.length>2&&t.shift().close(),this.#k.push(e),this.#x.prepend(e.element),e.addEventListener("snackbar:close",(()=>{const t=this.#k.indexOf(e);-1!==t&&this.#k.splice(t,1)}))}getGapValue(){const e=window.getComputedStyle(this.#x).gap.match(/^(\d+)px$/);return null===e?0:parseInt(e[1])}}class d{#T;#M;#P;#D=0;constructor(e,t){this.#M=e,this.#P=t,this.#T=new s(this.#B(),a.Progress)}setIteration(e){this.#D=e,this.#T.message=this.#B()}markAsDone(){this.#T.markAsDone()}get element(){return this.#T}#B(){return(0,n.getPhrase)("wcf.global.snackbar.progress",{label:this.#M,iteration:this.#D,length:this.#P})}}})),define("WoltLabSuite/Core/Ui/Message/Share/Dialog",["require","exports","tslib","../../../Dom/Traverse","../../../Clipboard","../../../StringUtil","../../../Dom/Change/Listener","./Providers","../../../Component/Dialog","WoltLabSuite/Core/Language","../../../Event/Handler","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i,o,r,a,s,l,c,d,u){"use strict";function h(e,t){return`\n <dl>\n <dt>${(0,c.getPhrase)(e)}</dt>\n <dd>\n <div class="inputAddon">\n <input type="text" class="long" readonly value="${r.escapeHTML(t)}">\n <button type="button" class="inputSuffix button jsTooltip shareDialogCopyButton" title="${(0,c.getPhrase)("wcf.message.share.copy")}">\n <fa-icon name="copy"></fa-icon>\n </button>\n </div>\n </dd>\n </dl>\n `}function p(e){e.preventDefault();const t=e.currentTarget,n=m(t),a=function(){const e=Array.from((0,s.getShareProviders)()).map((e=>{const[t,n,i]=e;return`\n <li>\n <button type="button" class="button small messageShareProvider" title="${n}" aria-label="${n}" data-identifier="${t}">\n ${i}\n </button>\n </li>\n `})).join("\n");return e?`<ul class="inlineList">${e}</ul>`:""}();let p="";a&&(p=`\n <dl class="messageShareButtons jsMessageShareButtons" data-url="${r.escapeHTML(n)}">\n <dt>${(0,c.getPhrase)("wcf.message.share.socialMedia")}</dt>\n <dd>${a}</dd>\n </dl>\n `);let f="";y&&(f=`\n <dl>\n <dt></dt>\n <dd>\n <button type="button" class="button shareDialogNativeButton" data-url="${r.escapeHTML(n)}" data-title="${r.escapeHTML(t.dataset.linkTitle||"")}">\n ${(0,c.getPhrase)("wcf.message.share.nativeShare")}\n </button>\n </dd>\n </dl>\n `);const v=`\n <div class="shareContentDialog">\n ${function(e){let t=h("wcf.message.share.permalink",m(e));return function(e){const t={bbcodes:[]},n=new CustomEvent("share:bbcodes",{cancelable:!0,detail:t}),i=m(e);return e.dispatchEvent(n),n.defaultPrevented?t.bbcodes:e.dataset.bbcode?[["wcf.message.share.permalink.bbcode",e.dataset.bbcode]]:i&&e.dataset.linkTitle?[["wcf.message.share.permalink.bbcode",`[url='${i}']${e.dataset.linkTitle}[/url]`]]:[]}(e).forEach((([e,n])=>{t+=h(e,n)})),function(e){const t={permalinkHtml:[]},n=new CustomEvent("share:permalink-html",{cancelable:!0,detail:t}),i=m(e);return e.dispatchEvent(n),n.defaultPrevented?t.permalinkHtml:i&&e.dataset.linkTitle?[["wcf.message.share.permalink.html",`<a href="${r.escapeHTML(i)}">${r.escapeHTML(e.dataset.linkTitle)}</a>`]]:[]}(e).forEach((([e,n])=>{t+=h(e,n)})),t}(t)}\n ${p}\n ${f}\n </div>\n `,w=(0,l.dialogFactory)().fromHtml(v).withoutControls();w.content.querySelectorAll(".shareDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n=i.prevBySel(t,'input[type="text"]');await o.copyTextToClipboard(n.value),(0,u.showSuccessSnackbar)((0,c.getPhrase)("wcf.message.share.copy.success"))}(e))))),y&&w.content.querySelector(".shareDialogNativeButton").addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n={url:t.dataset.url};t.dataset.title&&(n.title=t.dataset.title),await window.navigator.share(n)}(e))),a&&function(e,t){const n={facebook:{selector:'.messageShareProvider[data-identifier="Facebook"]',share(){g("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{selector:'.messageShareProvider[data-identifier="Reddit"]',share(){g("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{selector:'.messageShareProvider[data-identifier="Twitter"]',share(){g("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{selector:'.messageShareProvider[data-identifier="LinkedIn"]',share(){g("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{selector:'.messageShareProvider[data-identifier="Pinterest"]',share(){g("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{selector:'.messageShareProvider[data-identifier="XING"]',share(){g("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{selector:'.messageShareProvider[data-identifier="WhatsApp"]',
1share(){window.location.href="https://api.whatsapp.com/send?text="+b()+"%20"+t}}};d.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:n,pageDescription:b(),pageUrl:t}),Object.values(n).forEach((t=>{e.querySelector(t.selector)?.addEventListener("click",(()=>t.share()))}))}(w.content,n),w.show((0,c.getPhrase)("wcf.message.share"))}function f(){document.querySelectorAll(".shareButton, .wsShareButton").forEach((e=>{v.has(e)||(e.addEventListener("click",(e=>p(e))),v.add(e))}))}function m(e){return e instanceof HTMLAnchorElement?e.href:e.dataset.link}function g(e,t,n,i){window.open(t.replace("{pageURL}",i).replace("{text}",b()+(n?`%20${i}`:"")),e,"height=600,width=600")}function b(){const e=document.querySelector('meta[property="og:title"]');return null!==e?encodeURIComponent(e.content):""}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){f(),a.default.add("WoltLabSuite/Core/Ui/Message/Share/Dialog",(()=>f()))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),d=n.__importStar(d);const v=new WeakSet,y=void 0!==window.navigator.share})),define("WoltLabSuite/Core/Ui/Feed/Dialog",["require","exports","tslib","../Dialog","../../StringUtil","../../Language","../../Clipboard","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){document.querySelectorAll("a.rssFeed").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget,n=t.href,l=n.replace(/(\?|&)at=[^&]*&?/,"$1").replace(/(\?|&)$/,"");i.default.openStatic("feedLinkDialog",`\n<woltlab-core-notice type="info">${r.get("wcf.global.rss.accessToken.info")}</woltlab-core-notice>\n<dl>\n <dt>${r.get("wcf.global.rss.withoutAccessToken")}</dt>\n <dd>\n <div class="inputAddon">\n <input type="text" class="long" readonly value="${o.escapeHTML(l)}">\n <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n <fa-icon name="copy"></fa-icon>\n </button>\n </div>\n </dd>\n</dl>\n<dl>\n <dt>${r.get("wcf.global.rss.withAccessToken")}</dt>\n <dd>\n <div class="inputAddon">\n <input type="text" class="long" readonly value="${o.escapeHTML(n)}">\n <button type="button" class="inputSuffix button jsTooltip feedLinkDialogCopyButton" title="${r.get("wcf.global.rss.copy")}">\n <fa-icon name="copy"></fa-icon>\n </button>\n </div>\n </dd>\n</dl>\n`,{onShow(e){e.querySelectorAll(".feedLinkDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget.parentNode.querySelector('input[type="text"]');await a.copyTextToClipboard(t.value),(0,s.showSuccessSnackbar)(r.get("wcf.global.rss.copy.success"))}(e)))))},title:t.title||r.get("wcf.global.button.rss")})}(e)))}))},i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a)})),define("WoltLabSuite/Core/Ui/Page/Menu/Main/Frontend",["require","exports"],(function(e,t){"use strict";function n(e,t){const i=e.querySelector(".boxMenuLink"),o=i.querySelector(".boxMenuLinkTitle").textContent;let r=0;const a=i.querySelector(".boxMenuLinkOutstandingItems");a&&(r=parseInt(a.textContent.replace(/[^0-9]/,""),10));const s=e.querySelector("ol");let l=[];if(s instanceof HTMLOListElement){let e=t;e<3&&(e=t+1),l=Array.from(s.children).map((t=>n(t,e)))}const c=i.getAttribute("href");let d,u;return c&&"#"!==c&&(d=i.href,"_blank"===i.target&&(u=!0)),{active:e.classList.contains("active"),children:l,counter:r,depth:t,identifier:i.parentElement.dataset.identifier,link:d,openInNewWindow:u,title:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.UiPageMenuMainFrontend=void 0;class i{getMenuItems(e){return Array.from(e.children).map((e=>n(e,0)))}}t.UiPageMenuMainFrontend=i,t.default=i})),define("WoltLabSuite/Core/Notification/Handler",["require","exports","tslib","../Ajax","../Core","../Event/Handler","./ServiceWorker","WoltLabSuite/Core/Ui/User/Menu/Manager"],(function(e,t,n,i,o,r,a,s){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){c||(c=new l(e))},t.enableNotifications=function(){c.enableNotifications()},t.updateLastRequestTimestamp=function(e){c?.updateLastRequestTimestamp(e)},t.poll=function(){c?.dispatchRequest()},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r);class l{allowNotification;icon;inactiveSince=0;lastRequestTimestamp=window.TIME_NOW;requestTimer=void 0;constructor(e){e=o.extend({icon:""},e),this.icon=e.icon,this.prepareNextRequest(),document.addEventListener("visibilitychange",(e=>this.onVisibilityChange(e))),window.addEventListener("storage",(()=>this.onStorage())),this.onVisibilityChange(),"Notification"in window&&"granted"===Notification.permission&&(this.allowNotification=!0),(0,a.serviceWorkerSupported)()&&window.navigator.serviceWorker.addEventListener("message",(e=>{const t=e.data;t.time>this.lastRequestTimestamp&&(this.lastRequestTimestamp=t.time)}))}enableNotifications(){this.allowNotification=!0}onVisibilityChange(e){e&&!document.hidden&&(Date.now()-this.inactiveSince)/6e4>4&&(this.resetTimer(),this.dispatchRequest()),this.inactiveSince=document.hidden?Date.now():0}getNextDelay(){if(0===this.inactiveSince)return 5;const e=~~((Date.now()-this.inactiveSince)/6e4);return e<15?5:e<30?10:15}resetTimer(){this.requestTimer&&(window.clearTimeout(this.requestTimer),this.requestTimer=void 0)}prepareNextRequest(){this.resetTimer(),this.requestTimer=window.setTimeout((()=>this.dispatchRequest()),6e4*this.getNextDelay())}dispatchRequest(){const e={};r.fire("com.woltlab.wcf.notification","beforePoll",e),e.lastRequestTimestamp=this.lastRequestTimestamp,i.api(this,{parameters:e})}onStorage(){let e,t;this.prepareNextRequest();let n=!1;try{e=window.localStorage.getItem(o.getStoragePrefix()+"notification"),t=window.localStorage.getItem(o.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),t=JSON.parse(t)}catch{n=!0}n||r.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:t})}_ajaxSuccess(e){const t=e.returnValues.keepAliveData,n=e.returnValues.pollData;(0,s.updateCounter)("com.woltlab.wcf.notifications",t.userNotificationCount);let i=!1;try{window.localStorage.setItem(o.getStoragePrefix()+"notification",JSON.stringify(n)),window.localStorage.setItem(o.getStoragePrefix()+"keepAliveData",JSON.stringify(t))}catch(e){i=!0,window.console.log(e)}i||this.prepareNextRequest(),this.lastRequestTimestamp=e.returnValues.lastRequestTimestamp,(0,a.updateNotificationLastReadTime)(this.lastRequestTimestamp),r.fire("com.woltlab.wcf.notification","afterPoll",n),this.showNotification(n)}showNotification(e){if(this.allowNotification&&"object"==typeof e.notification&&"string"==typeof e.notification.message){let t;const n=document.createElement("div");n.innerHTML=e.notification.message,n.querySelectorAll("img").forEach((e=>{e.replaceWith(document.createTextNode(e.alt))}));try{t=new window.Notification(e.notification.title,{body:n.textContent,icon:this.icon})}catch(e){if(e instanceof Error&&"TypeError"===e.name)return;throw e}t.onclick=()=>{window.focus(),t.close(),window.location.href=e.notification.link}}}_ajaxSetup(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}updateLastRequestTimestamp(e){this.lastRequestTimestamp=Math.max(e,this.lastRequestTimestamp)}}let c})),define("WoltLabSuite/Core/Notification/ServiceWorker",["require","exports","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Notification/Handler"],(function(e,t,n,i){"use strict";function o(){return"https:"===location.protocol&&"serviceWorker"in window.navigator&&"PushManager"in window&&"showNotification"in ServiceWorkerRegistration.prototype&&(!("Notification"in window)||"denied"!==Notification.permission)}function r(){a?.register()}Object.defineProperty(t,"__esModule",{value:!0}),t.serviceWorkerSupported=o,t.setup=function(e,t,n,i){o()&&(a=new s(e,t,n),"granted"===Notification.permission&&(r(),a.updateNotificationLastReadTime(i)))},t.registerServiceWorker=r,t.updateNotificationLastReadTime=function(e){a?.updateNotificationLastReadTime(e??Math.round(Date.now()/1e3))};let a=null;class s{#O;#R;#j;#N;constructor(e,t,n){this.#O=e,this.#R=t,this.#j=n,window.navigator.serviceWorker.register(this.#R,{scope:"/"}),this.#N=window.navigator.serviceWorker.ready,window.navigator.serviceWorker.addEventListener("message",(e=>{e.source instanceof window.ServiceWorker&&e.source.scriptURL===this.#R&&(0,i.updateLastRequestTimestamp)(e.data.time)}))}async register(){const e=await(await this.#N).pushManager.getSubscription();if(e&&this.#F(e))return;await this.unsubscribe(e);const t=await(await this.#N).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:this.#q(this.#O)});t&&await this.#U(t)}async unsubscribe(e){e&&(await this.#U(e,!0),await e.unsubscribe())}#F(e){let t=window.btoa(String.fromCharCode(...new Uint8Array(e.options.applicationServerKey)));return t=t.replace(/\+/g,"-").replace(/\//g,"_"),t=t.replace(/=+$/,""),t===this.#O}async#U(e,t=!1){const i=e.getKey("p256dh"),o=e.getKey("auth"),r=(PushManager.supportedContentEncodings||["aes128gcm"])[0];try{await(0,n.prepareRequest)(this.#j).post({remove:t,endpoint:e.endpoint,publicKey:i?window.btoa(String.fromCharCode(...new Uint8Array(i))):null,authToken:o?window.btoa(String.fromCharCode(...new Uint8Array(o))):null,contentEncoding:r}).disableLoadingIndicator().fetchAsResponse()}catch{}}#q(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),n=window.atob(t),i=new Uint8Array(n.length);for(let e=0;e<n.length;++e)i[e]=n.charCodeAt(e);return i}updateNotificationLastReadTime(e){window.navigator.serviceWorker.controller?.postMessage({type:"UPDATE_NOTIFICATION_LAST_READ_TIME",timestamp:e})}}})),define("WoltLabSuite/Core/Api/Error",["require","exports"],(function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=t.ApiError=void 0,t.ApiError=class{type;code;message;param;statusCode;constructor(e,t,n,i,o){this.type=e,this.code=t,this.message=n,this.param=i,this.statusCode=o}getValidationError(){if("invalid_request_error"===this.type&&400===this.statusCode)return new n(this.code,this.message,this.param)}};class n{code;message;param;constructor(e,t,n){this.code=e,this.message=t,this.param=n}}t.ValidationError=n})),define("WoltLabSuite/Core/Api/Result",["require","exports","../Ajax/Error","../Component/Dialog","../Core","../Language","../StringUtil","./Error"],(function(e,t,n,i,o,r,a,s){"use strict";async function l(e){if(!(e instanceof Error))throw new TypeError("Refusing to handle errors that are not an error.");if(e instanceof n.StatusNotOk)return c(e);throw e}async function c(e){const{response:t}=e;if(void 0===t)throw e;const n=t.headers.get("content-type");if(!n||!n.includes("application/json"))throw e;let l;try{l=await t.clone().json()}catch{throw e}if((0,o.isPlainObject)(l)&&Object.hasOwn(l,"type")&&("api_error"===l.type||"invalid_request_error"===l.type)&&"string"==typeof l.code&&"string"==typeof l.message&&"string"==typeof l.param){const e=new s.ApiError(l.type,l.code,l.message,l.param,t.status);return{ok:!1,error:e,unwrap(){throw function(e){let t;if(!window.ENABLE_DEBUG_MODE&&"permission_denied"===e.code||"assertion_failed"===e.code)t=(0,r.getPhrase)("permission_denied"===e.code?"wcf.ajax.error.permissionDenied":"wcf.ajax.error.illegalLink");else{const n=(0,a.escapeHTML)(e.code),i=(0,a.escapeHTML)(e.type),o=e.message?(0,a.escapeHTML)(e.message):"(not set)";t=`\n <dl>\n <dt>Unexpected server error</dt>\n <dd><kbd>${i}</kbd></dd>\n </dl>\n <dl>\n <dt>Error code</dt>\n <dd><kbd>${n}</kbd></dd>\n </dl>\n <dl>\n <dt>Parameter</dt>\n <dd>${e.param?"<kbd>"+(0,a.escapeHTML)(e.param)+"</kbd>":"(not set)"}</dd>\n </dl>\n <dl>\n <dt>Message</dt>\n <dd>${o}</dd>\n </dl>\n `}(0,i.dialogFactory)().fromHtml(t).asAlert().show((0,r.getPhrase)("wcf.global.error.title"))}(e),new Error("Trying to unwrap an erroneous result.",{cause:e})}}}throw e}Object.defineProperty(t,"__esModule",{value:!0}),t.apiResultFromValue=function(e){return{ok:!0,value:e,unwrap:()=>e}},t.apiResultFromError=l,t.apiResultFromStatusNotOk=c,t.fromInfallibleApiRequest=async function(e){try{return await e()}catch(e){return(await l(e)).unwrap()}}})),define("WoltLabSuite/Core/Api/Articles/GetArticlePopover",["require","exports","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Api/Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArticlePopover=async function(e){const t=new URL(`${window.WSC_RPC_API_URL}core/articles/${e}/popover`);return(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(t).get().fetchAsJson()))}})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent","./Ui/Message/Share/Dialog","./Ui/Message/Share/Providers","./Ui/Feed/Dialog","./User","./Ui/Page/Menu/Main/Frontend","./LazyLoader","./Ajax/Backend","./Notification/ServiceWorker","./Api/Articles/GetArticlePopover"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f,m,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(t){var r;t.backgroundQueue.url=window.WSC_API_URL+t.backgroundQueue.url.substr(window.WCF_PATH.length),o.setup({dynamicColorScheme:t.dynamicColorScheme,enableMobileMenu:!0,pageMenuMainProvider:new h.default}),t.removeQuotes?.length&&new Promise(((t,n)=>{e(["./Component/Quote/Storage"],t,n)})).then(n.__importStar).then((({removeQuotes:e})=>e(t.removeQuotes))),t.usedQuotes?.size&&new Promise(((t,n)=>{e(["./Component/Quote/Storage"],t,n)})).then(n.__importStar).then((({markQuoteAsUsed:e})=>
1{t.usedQuotes.forEach(((t,n)=>{for(const i of t)e(n,i)}))})),a.init(),t.styleChanger&&new Promise(((t,n)=>{e(["./Controller/Style/Changer"],t,n)})).then(n.__importStar).then((e=>{e.setup()})),""!==(r=t.endpointUserPopover)&&(0,p.whenFirstSeen)(".userLink",(()=>{new Promise(((t,n)=>{e(["./Component/Popover"],t,n)})).then(n.__importStar).then((({setupFor:e})=>{e({endpoint:r,identifier:"com.woltlab.wcf.user",selector:".userLink"})}))})),(0,p.whenFirstSeen)(".articleLink",(()=>{new Promise(((t,n)=>{e(["WoltLabSuite/Core/Component/Popover"],t,n)})).then(n.__importStar).then((({setupFor:e})=>{e({endpoint:e=>(0,g.getArticlePopover)(e).then((e=>e.template)),identifier:"com.woltlab.wcf.article",selector:".articleLink"})}))})),void 0!==t.executeCronjobs&&(0,f.prepareRequest)(t.executeCronjobs).get().disableLoadingIndicator().fetchAsResponse().catch((()=>{})),i.setUrl(t.backgroundQueue.url),(Math.random()<.1||t.backgroundQueue.force)&&i.invoke(),s.init(),t.shareButtonProviders&&(0,c.addShareProviders)(t.shareButtonProviders),l.setup(),u.default.userId&&(d.setup(),t.serviceWorker&&(0,m.setup)(t.serviceWorker.publicKey,t.serviceWorker.serviceWorkerJsUrl,t.serviceWorker.registerUrl,t.serviceWorker.notificationLastReadTime)),(0,p.whenFirstSeen)("woltlab-core-reaction-summary",(()=>{new Promise(((t,n)=>{e(["./Ui/Reaction/SummaryDetails"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,p.whenFirstSeen)("woltlab-core-comment",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/woltlab-core-comment"],t,n)})).then(n.__importStar)})),(0,p.whenFirstSeen)("woltlab-core-comment-response",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/Response/woltlab-core-comment-response"],t,n)})).then(n.__importStar)})),(0,p.whenFirstSeen)("[data-follow-user]",(()=>{new Promise(((t,n)=>{e(["./Component/User/Follow"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,p.whenFirstSeen)("[data-ignore-user]",(()=>{new Promise(((t,n)=>{e(["./Component/User/Ignore"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))}))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importStar(l),d=n.__importStar(d),u=n.__importDefault(u),h=n.__importDefault(h)})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(e>359)throw new TypeError("Hue cannot be larger than 359°");t/=100,n/=100;const i=(1-Math.abs(2*n-1))*t,o=i*(1-Math.abs(e/60%2-1)),r=n-i/2,[a,s,l]=0<=e&&e<60&&[i,o,0]||60<=e&&e<120&&[o,i,0]||120<=e&&e<180&&[0,i,o]||180<=e&&e<240&&[0,o,i]||240<=e&&e<300&&[o,0,i]||300<=e&&e<360&&[i,0,o];return{r:Math.round(255*(a+r)),g:Math.round(255*(s+r)),b:Math.round(255*(l+r))}}function i(e,t,n){const i={r:0,g:0,b:0},o=Math.floor(e/60),r=e/60-o,a=(n/=100)*(1-(t/=100)),s=n*(1-t*r),l=n*(1-t*(1-r));if(0==t)i.r=i.g=i.b=n;else switch(o){case 1:i.r=s,i.g=n,i.b=a;break;case 2:i.r=a,i.g=n,i.b=l;break;case 3:i.r=a,i.g=s,i.b=n;break;case 4:i.r=l,i.g=a,i.b=n;break;case 5:i.r=n,i.g=a,i.b=s;break;case 0:case 6:i.r=n,i.g=l,i.b=a}return{r:Math.round(255*i.r),g:Math.round(255*i.g),b:Math.round(255*i.b)}}function o(e,t,n){let i,o;e/=255,t/=255,n/=255;const r=Math.max(e,t,n),a=Math.min(e,t,n),s=r-a;if(i=0,r!==a){switch(r){case e:i=(t-n)/s*60;break;case t:i=60*(2+(n-e)/s);break;case n:i=60*(4+(e-t)/s)}i<0&&(i+=360)}const l=(r+a)/2;return o=0===s?0:s/(1-Math.abs(2*l-1)),{h:Math.round(i),s:Math.round(100*o),l:Math.round(100*l)}}function r(e,t,n){let i,o;e/=255,t/=255,n/=255;const r=Math.max(Math.max(e,t),n),a=Math.min(Math.min(e,t),n),s=r-a;if(i=0,r!==a){switch(r){case e:i=(t-n)/s*60;break;case t:i=60*(2+(n-e)/s);break;case n:i=60*(4+(e-t)/s)}i<0&&(i+=360)}return o=0===r?0:s/r,{h:Math.round(i),s:Math.round(100*o),v:Math.round(100*r)}}function a(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function s(e){if(e<0||e>255)throw new Error(`Invalid RGB component value '${e}' given.`);return e.toString(16).padStart(2,"0").toUpperCase()}function l(e,t,n){if(void 0===t){const i=/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString());if(!i)throw new Error("Invalid RGB data given.");e=+i[1],t=+i[2],n=+i[3]}return s(e)+s(t)+s(n)}function c(e){if(e<0||e>1)throw new Error(`Invalid alpha value '${e}' given.`);return Math.round(255*e).toString(16).padStart(2,"0").toUpperCase()}function d(e,t,n,i){if(void 0===t){const t=e;return l(t.r,t.g,t.b)+c(t.a)}return l(e,t,n)+c(i)}function u(e){return`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}function h(){let e=document.getElementById("jsColorUtilColorChecker");return null===e&&(e=document.createElement("span"),e.id="jsColorUtilColorChecker",document.body.appendChild(e)),e}function p(e){const t=h();return t.style.color="",t.style.color=e,""!==t.style.color}function f(e){if(!p(e))throw new Error(`Given string '${e}' is no valid color.`);const t=h();t.style.color=e;const n=window.getComputedStyle(t).color,i=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/.exec(n);if(i)return{r:+i[1],g:+i[2],b:+i[3],a:1};{const e=/^rgba\((\d+), ?(\d+), ?(\d+), ?([0-9.]+)\)$/.exec(n);if(e)return{r:+e[1],g:+e[2],b:+e[3],a:+e[4]}}throw new Error(`Cannot process color '${e}'.`)}
1Object.defineProperty(t,"__esModule",{value:!0}),t.hslToRgb=n,t.hsvToRgb=i,t.rgbToHsl=o,t.rgbToHsv=r,t.hexToRgb=a,t.rgbToHex=l,t.rgbaToHex=d,t.rgbaToString=u,t.isValidColor=p,t.stringToRgba=f,window.__wcf_bc_colorUtil={hexToRgb:a,hslToRgb:n,hsvToRgb:i,isValidColor:p,rgbaToHex:d,rgbaToString:u,rgbToHex:l,rgbToHsv:r,rgbToHsl:o,stringToRgba:f}})),define("WoltLabSuite/Core/Dictionary",["require","exports"],(function(e,t){"use strict";class n{_dictionary=new Map;set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,n=e.length;t<n;t++)e[t].forEach(((e,t)=>this.set(t,e)))}toObject(){const e={};return this._dictionary.forEach(((t,n)=>e[n]=t)),e}static fromObject(e){const t=new n;return Object.keys(e).forEach((n=>{t.set(n,e[n])})),t}get size(){return this._dictionary.size}}return n})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,n,i){"use strict";function o(e){return a.has(e)?"."+a.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.formatFilesize=function(e,t=2){let n="Byte";return e>=1e3&&(e/=1e3,n="kB"),e>=1e3&&(e/=1e3,n="MB"),e>=1e3&&(e/=1e3,n="GB"),e>=1e3&&(e/=1e3,n="TB"),i.formatNumeric(e,-t)+" "+n},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const n=e.substr(t+1);if(r.has(n))return r.get(n)}return""},t.getExtensionByMimeType=o,t.blobToFile=function(e,t){const n=o(e.type);return new File([e],t+n,{type:e.type})},i=n.__importStar(i);const r=new Map(Object.entries({zip:"zipper",rar:"zipper",tar:"zipper",gz:"zipper",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",webp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"lines",doc:"word",docx:"word",odt:"word"})),a=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt","public.jpeg":"jpeg","public.png":"png","com.compuserve.gif":"gif","org.webmproject.webp":"webp"}))})),define("WoltLabSuite/Core/List",["require","exports"],(function(e,t){"use strict";return class{_set=new Set;add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let n=e.toString().split("e"),i=n[1]?+n[1]-t:-t;return n=(e=Math.round(+`${n[0]}e${i}`)).toString().split("e"),i=n[1]?+n[1]+t:t,+`${n[0]}e${i}`}})),define("WoltLabSuite/Core/ObjectMap",["require","exports"],(function(e,t){"use strict";return class{_map=new WeakMap;set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function n(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");i.set(e,t)}
1Object.defineProperty(t,"__esModule",{value:!0}),t.add=n,t.addObject=function(e){Object.keys(e).forEach((t=>n(t,e[t])))},t.get=function(e){return!!i.has(e)&&i.get(e)};const i=new Map})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,n,i){this.type=e,this.content=t,this.alias=n,this.length=0|(i||"").length}function n(e,t,n,i){var o,r;return e.lastIndex=t,(o=e.exec(n))&&i&&o[1]&&(r=o[1].length,o.index+=r,o[0]=o[0].slice(r)),o}function i(e,o,s,l,c,d){var u,h,f,m,g,b,v,y,w,E,S,_,C,A,L,I,x,k,T,M,P,D,B,O,R;for(u in s)if(s.hasOwnProperty(u)&&s[u])for(h=s[u],h=Array.isArray(h)?h:[h],f=0;f<h.length;++f){if(d&&d.cause==u+","+f)return;for(g=(m=h[f]).inside,b=!!m.lookbehind,v=!!m.greedy,y=m.alias,v&&!m.pattern.global&&(w=m.pattern.toString().match(/[imsuy]*$/)[0],m.pattern=RegExp(m.pattern.source,w+"g")),E=m.pattern||m,S=l.next,_=c;S!==o.tail&&!(d&&_>=d.reach);_+=S.value.length,S=S.next){if(C=S.value,o.length>e.length)return;if(!(C instanceof t)){if(A=1,v){if(!(L=n(E,_,e,b))||L.index>=e.length)break;for(I=L.index,x=L.index+L[0].length,k=_,k+=S.value.length;I>=k;)k+=(S=S.next).value.length;if(_=k-=S.value.length,S.value instanceof t)continue;for(T=S;T!==o.tail&&(k<x||"string"==typeof T.value);T=T.next)A++,k+=T.value.length;A--,C=e.slice(_,k),L.index-=_}else if(!(L=n(E,0,C,b)))continue;I=L.index,M=L[0],P=C.slice(0,I),D=C.slice(I+M.length),B=_+C.length,d&&B>d.reach&&(d.reach=B),O=S.prev,P&&(O=r(o,O,P),_+=P.length),a(o,O,A),S=r(o,O,new t(u,g?p.tokenize(M,g):M,y,M)),D&&r(o,S,D),A>1&&(R={cause:u+","+f,reach:B},i(e,o,s,S.prev,_,R),d&&R.reach>d.reach&&(d.reach=R.reach))}}}}function o(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function r(e,t,n){var i=t.next,o={value:n,prev:t,next:i};return t.next=o,i.prev=o,e.length++,o}function a(e,t,n){var i,o=t.next;for(i=0;i<n&&o!==e.tail;i++)o=o.next;t.next=o,o.prev=t,e.length-=i}function s(){p.manual||p.highlightAll()}var l,c,d=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,u=0,h={},p={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof t?new t(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++u}),e.__id},clone:function e(t,n){var i,o,r;switch(n=n||{},p.util.type(t)){case"Object":if(o=p.util.objId(t),n[o])return n[o];for(r in i={},n[o]=i,t)t.hasOwnProperty(r)&&(i[r]=e(t[r],n));return i;case"Array":return o=p.util.objId(t),n[o]?n[o]:(i=[],n[o]=i,t.forEach((function(t,o){i[o]=e(t,n)})),i);default:return t}},getLanguage:function(e){for(;e;){var t=d.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(d,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){var e,t,n;if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(i){if(e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1])for(n in t=document.getElementsByTagName("script"))if(t[n].src==e)return t[n];return null}},isActive:function(e,t,n){for(var i,o="no-"+t;e;){if((i=e.classList).contains(t))return!0;if(i.contains(o))return!1;e=e.parentElement}return!!n}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(e,t){var n,i=p.util.clone(p.languages[e]);for(n in t)i[n]=t[n];return i},insertBefore:function(e,t,n,i){var o,r,a,s,l;for(a in o=(i=i||p.languages)[e],r={},o)if(o.hasOwnProperty(a)){if(a==t)for(s in n)n.hasOwnProperty(s)&&(r[s]=n[s]);n.hasOwnProperty(a)||(r[a]=o[a])}return l=i[e],i[e]=r,p.languages.DFS(p.languages,(function(t,n){n===l&&t!=e&&(this[t]=r)})),r},DFS:function e(t,n,i,o){var r,a,s,l;for(a in o=o||{},r=p.util.objId,t)t.hasOwnProperty(a)&&(n.call(t,a,t[a],i||a),s=t[a],"Object"!==(l=p.util.type(s))||o[r(s)]?"Array"!==l||o[r(s)]||(o[r(s)]=!0,e(s,n,a,o)):(o[r(s)]=!0,e(s,n,null,o)))}},plugins:{},highlightAll:function(e,t){p.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var i,o,r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};for(p.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),p.hooks.run("before-all-elements-highlight",r),i=0;o=r.elements[i++];)p.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,n,i){function o(e){s.highlightedCode=e,p.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,p.hooks.run("after-highlight",s),p.hooks.run("complete",s),i&&i.call(s.element)}var r,a,s,l,c=p.util.getLanguage(t),d=p.languages[c];if(p.util.setLanguage(t,c),(r=t.parentElement)&&"pre"===r.nodeName.toLowerCase()&&p.util.setLanguage(r,c),a=t.textContent,s={element:t,language:c,grammar:d,code:a},p.hooks.run("before-sanity-check",s),(r=s.element.parentElement)&&"pre"===r.nodeName.toLowerCase()&&!r.hasAttribute("tabindex")&&r.setAttribute("tabindex","0"),!s.code)return p.hooks.run("complete",s),void(i&&i.call(s.element));p.hooks.run("before-highlight",s),s.grammar?n&&e.Worker?((l=new Worker(p.filename)).onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):o(p.highlight(s.code,s.grammar,s.language)):o(p.util.encode(s.code))},highlight:function(e,n,i){var o={code:e,grammar:n,language:i};if(p.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=p.tokenize(o.code,o.grammar),p.hooks.run("after-tokenize",o),t.stringify(p.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n,a,s=t.rest;if(s){for(n in s)t[n]=s[n];delete t.rest}return r(a=new o,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=p.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n,i,o=p.hooks.all[e];if(o&&o.length)for(n=0;i=o[n++];)i(t)}},Token:t};return e.Prism=p,t.stringify=function e(t,n){var i,o,r,a,s;if("string"==typeof t)return t;if(Array.isArray(t))return i="",t.forEach((function(t){i+=e(t,n)}
1)),i;for(s in o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},(r=t.alias)&&(Array.isArray(r)?Array.prototype.push.apply(o.classes,r):o.classes.push(r)),p.hooks.run("wrap",o),a="",o.attributes)a+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},e.document?((l=p.util.currentScript())&&(p.filename=l.src,l.hasAttribute("data-manual")&&(p.manual=!0)),p.manual||("loading"===(c=document.readyState)||"interactive"===c&&l&&l.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),p):e.addEventListener?(p.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),i=n.language,o=n.code,r=n.immediateClose;e.postMessage(p.highlight(o,p.languages[i],i)),r&&e.close()}),!1),p):p}(_self),"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),define("prism/prism",(function(){})),window.Prism=window.Prism||{},window.Prism.manual=!0,define("WoltLabSuite/Core/Prism",["prism/prism"],(function(){return window.Prism.hooks.add("wrap",(e=>{e.classes=e.classes.map((e=>`prism-${e}`))})),Prism})),define("WoltLabSuite/Core/Template",["require","exports"],(function(e,t){"use strict";return window.WoltLabTemplate})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let n,i=document.createElement("span");for(;n=t.nextNode();){const t=n,o=t.data.split(/\r?\n/);for(let n=0,r=o.length;n<r;n++){const r=o[n];n>=1&&(i.appendChild(document.createTextNode("\n")),yield i,i=document.createElement("span"));let a=document.createTextNode(r),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(a),a=e,s=s.parentNode}i.appendChild(a)}}yield i}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Clipboard","../Prism","../Prism/Helper","../Component/Snackbar","../Language"],(function(e,t,n,i,o,r,a,s){"use strict";async function l(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r);class c{static chunkSize=50;container;codeContainer;language;constructor(e){this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e)))?.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new c(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("button");t.type="button",t.innerHTML='<fa-icon size="24" name="copy"></fa-icon>',t.classList.add("jsTooltip"),t.title=(0,s.getPhrase)("wcf.message.bbcode.code.copy");const n=async()=>{await i.copyElementTextToClipboard(this.codeContainer),(0,a.showSuccessSnackbar)((0,s.getPhrase)("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",(()=>n())),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");const t=(await new Promise(((t,n)=>{e(["../prism-meta"],t,n)})).then(n.__importStar)).default;if(!t[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((n,i)=>{e(["prism/components/prism-"+t[this.language].file],n,i)})).then(n.__importStar),await l();const i=o.default.languages[this.language];if(!i)throw new Error(`Invalid language '${this.language}' given.`);const a=document.createElement("div");a.innerHTML=o.default.highlight(this.codeContainer.textContent,i,this.language),await l();const s=this.codeContainer.querySelectorAll(".codeBoxLine > span"),d=r.splitIntoLines(a);for(let e=0,t=s.length;e<t;e+=c.chunkSize){await l();const n=Math.min(e+c.chunkSize,t);for(let t=e;t<n;t++){const e=s[t],n=d.next().value;e.parentNode.replaceChild(n,e)}}this.container.classList.remove("highlighting"),this.container.classList.add("highlighted")}}return c})),define("WoltLabSuite/Core/Bbcode/Collapsible",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(e.classList.toggle("collapsed")){if(t.forEach((e=>{const t=e.dataset.titleExpand,n=e.querySelector("fa-icon");n?(n.setIcon("up-right-and-down-left-from-center"),e.title=t):e.textContent=t})),n instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse,n=e.querySelector("fa-icon");n?(n.setIcon("down-left-and-up-right-to-center"),e.title=t):e.textContent=t}))}
1Object.defineProperty(t,"__esModule",{value:!0}),t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),i=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,i){t.forEach((i=>{i.classList.add("jsToggleButtonEnabled"),i.addEventListener("click",(i=>n(e,t,i))),i.addEventListener("keydown",(i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),n(e,t))}))})),0!==i.scrollTop&&(i.scrollTop=0,n(e,t)),i.addEventListener("scroll",(()=>{i.scrollTop=0,e.classList.contains("collapsed")&&n(e,t)}))}(e,t,i),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Api/GetObject",["require","exports","WoltLabSuite/Core/Ajax/Backend","./Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getObject=async function(e){let t;try{t=await(0,n.prepareRequest)(e).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(t)}})),define("WoltLabSuite/Core/Api/PostObject",["require","exports","WoltLabSuite/Core/Ajax/Backend","./Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postObject=async function(e,t){try{await(0,n.prepareRequest)(e).post(t).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),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)}}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("sortablejs",t):(e=e||self).Sortable=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function t(e,t,n){return(t=function(e){return e=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(t=n.call(e,t||"default")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"==typeof e?e:e+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(){return(n=Object.assign?Object.assign.bind():function(e){var t,n,i;for(t=1;t<arguments.length;t++)for(n in i=arguments[t])!{}
1.hasOwnProperty.call(i,n)||(e[n]=i[n]);return e}).apply(null,arguments)}function i(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)),i}function o(e){var n,o;for(n=1;n<arguments.length;n++)o=null!=arguments[n]?arguments[n]:{},n%2?i(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}));return e}function r(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var i={}.toString.call(t).slice(8,-1);return"Map"===(i="Object"===i&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}function l(e,t,n){e.addEventListener(t,n,!Ue&&Ve)}function c(e,t,n){e.removeEventListener(t,n,!Ue&&Ve)}function d(e,t){if(t&&(">"===t[0]&&(t=t.substring(1)),e))try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return}}function u(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function h(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"!==t[0]||e.parentNode===n)&&d(e,t)||i&&e===n)return e}while(e!==n&&(e=u(e)))}return null}function p(e,t,n){var i;e&&t&&(e.classList?e.classList[n?"add":"remove"](t):(i=(" "+e.className+" ").replace(Ge," ").replace(" "+t+" "," "),e.className=(i+(n?" "+t:"")).replace(Ge," ")))}function f(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];i[t=t in i||-1!==t.indexOf("webkit")?t:"-webkit-"+t]=n+("string"==typeof n?"":"px")}}function m(e,t){var n,i,o="";if("string"==typeof e)o=e;else do{n=f(e,"transform")}while(n&&"none"!==n&&(o=n+" "+o),!t&&(e=e.parentNode));return(i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix)&&new i(o)}function g(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function b(){return document.scrollingElement||document.documentElement}function v(e,t,n,i,o){var r,a,s,l,c,d,u,h;if(e.getBoundingClientRect||e===window){if(u=e!==window&&e.parentNode&&e!==b()?(a=(r=e.getBoundingClientRect()).top,s=r.left,l=r.bottom,c=r.right,d=r.height,r.width):(s=a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!Ue))do{if(o&&o.getBoundingClientRect&&("none"!==f(o,"transform")||n&&"static"!==f(o,"position"))){a-=(h=o.getBoundingClientRect()).top+parseInt(f(o,"border-top-width")),s-=h.left+parseInt(f(o,"border-left-width")),l=a+r.height,c=s+r.width;break}}while(o=o.parentNode);return i&&e!==window&&(i=(t=m(o||e))&&t.a,e=t&&t.d,t&&(l=(a/=e)+(d/=e),c=(s/=i)+(u/=i))),{top:a,left:s,bottom:l,right:c,width:u,height:d}}}function y(e,t,n){var i,o,r;for(i=C(e,!0),o=v(e)[t];i;){if(r=v(i)[n],!("top"===n||"left"===n?r<=o:o<=r))return i;if(i===b())break;i=C(i,!1)}return!1}function w(e,t,n,i){for(var o=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==j.ghost&&(i||a[r]!==j.dragged)&&h(a[r],n.draggable,e,!1)){if(o===t)return a[r];o++}r++}return null}function E(e,t){for(var n=e.lastElementChild;n&&(n===j.ghost||"none"===f(n,"display")||t&&!d(n,t));)n=n.previousElementSibling;return n||null}function S(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===j.clone||t&&!d(e,t)||n++;return n}function _(e){var t,n,i=0,o=0,r=b();if(e)do{n=(t=m(e)).a,t=t.d}while(i+=e.scrollLeft*n,o+=e.scrollTop*t,e!==r&&(e=e.parentNode));return[i,o]}function C(e,t){var n,i,o;if(!e||!e.getBoundingClientRect)return b();n=e,i=!1;do{if((n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight)&&(o=f(n),n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY))){if(!n.getBoundingClientRect||n===document.body)return b();if(i||t)return n;i=!0}}while(n=n.parentNode);return b()}function A(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function L(e,t){return function(){var n;X||(1===(n=arguments).length?e.call(this,n[0]):e.apply(this,n),X=setTimeout((function(){X=void 0}),t))}}function I(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function x(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function k(e,t){f(e,"position","absolute"),f(e,"top",t.top),f(e,"left",t.left),f(e,"width",t.width),f(e,"height",t.height)}function T(e){f(e,"position",""),f(e,"top",""),f(e,"left",""),f(e,"width",""),f(e,"height","")}function M(e,t,n){var i={};
1return Array.from(e.children).forEach((function(o){var r;h(o,t.draggable,e,!1)&&!o.animated&&o!==n&&(r=v(o),i.left=Math.min(null!==(o=i.left)&&void 0!==o?o:1/0,r.left),i.top=Math.min(null!==(o=i.top)&&void 0!==o?o:1/0,r.top),i.right=Math.max(null!==(o=i.right)&&void 0!==o?o:-1/0,r.right),i.bottom=Math.max(null!==(o=i.bottom)&&void 0!==o?o:-1/0,r.bottom))})),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function P(e){var t,n,i,r,a=e.sortable,s=e.rootEl,l=e.name,c=e.targetEl,d=e.cloneEl,u=e.toEl,h=e.fromEl,p=e.oldIndex,f=e.newIndex,m=e.oldDraggableIndex,g=e.newDraggableIndex,b=e.originalEvent,v=e.putSortable,y=e.extraEventProperties;if(a=a||s&&s[Xe]){for(i in n=a.options,e="on"+l.charAt(0).toUpperCase()+l.substr(1),!window.CustomEvent||Ue||$e?(t=document.createEvent("Event")).initEvent(l,!0,!0):t=new CustomEvent(l,{bubbles:!0,cancelable:!0}),t.to=u||s,t.from=h||s,t.item=c||s,t.clone=d,t.oldIndex=p,t.newIndex=f,t.oldDraggableIndex=m,t.newDraggableIndex=g,t.originalEvent=b,t.pullMode=v?v.lastPutMode:void 0,r=o(o({},y),Ke.getEventProperties(l,a)))t[i]=r[i];s&&s.dispatchEvent(t),n[e]&&n[e].call(a,t)}}function D(e,t){var n=(i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).evt,i=function(e,t){var n,i,o,r;if(null==e)return{};if(i=function(e,t){if(null==e)return{};var n,i={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t),Object.getOwnPropertySymbols)for(o=Object.getOwnPropertySymbols(e),r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(i,Ze);Ke.pluginEvent.bind(j)(e,t,o({dragEl:Y,parentEl:J,ghostEl:K,rootEl:Z,nextEl:ee,lastDownEl:te,cloneEl:ne,cloneHidden:ie,dragStarted:ge,putSortable:ce,activeSortable:j.active,originalEvent:n,oldIndex:oe,oldDraggableIndex:ae,newIndex:re,newDraggableIndex:se,hideGhostForTarget:mt,unhideGhostForTarget:gt,cloneNowHidden:function(){ie=!0},cloneNowShown:function(){ie=!1},dispatchSortableEvent:function(e){B({sortable:t,name:e,originalEvent:n})}},i))}function B(e){P(o({putSortable:ce,cloneEl:ne,targetEl:Y,rootEl:Z,oldIndex:oe,oldDraggableIndex:ae,newIndex:re,newDraggableIndex:se},e))}function O(e){var t,n,i,o,r,a;if(Y&&(e=e.touches?e.touches[0]:e,o=e.clientX,r=e.clientY,nt.some((function(e){var t,n,i=e[Xe].options.emptyInsertThreshold;if(i&&!E(e))return t=v(e),n=o>=t.left-i&&o<=t.right+i,i=r>=t.top-i&&r<=t.bottom+i,n&&i?a=e:void 0})),t=a)){for(n in i={},e)e.hasOwnProperty(n)&&(i[n]=e[n]);i.target=i.rootEl=t,i.preventDefault=void 0,i.stopPropagation=void 0,t[Xe]._onDragOver(i)}}function R(e){Y&&Y.parentNode[Xe]._isOutsideThisEl(e.target)}function j(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=n({},t),e[Xe]=this;var i,r,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return pt(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==j.supportPointer&&"PointerEvent"in window&&(!He||ze),emptyInsertThreshold:5};for(i in Ke.initializePlugins(this,e,a),a)i in t||(t[i]=a[i]);for(r in ft(t),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?l(e,"pointerdown",this._onTapStart):(l(e,"mousedown",this._onTapStart),l(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(l(e,"dragover",this),l(e,"dragenter",this)),nt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),n(this,function(){var e,t=[];return{captureAnimationState:function(){t=[],this.options.animation&&[].slice.call(this.el.children).forEac
1h((function(e){var n,i;"none"!==f(e,"display")&&e!==j.ghost&&(t.push({target:e,rect:v(e)}),n=o({},t[t.length-1].rect),!e.thisAnimationDuration||(i=m(e,!0))&&(n.top-=i.f,n.left-=i.e),e.fromRect=n)}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){var n,i;for(n in e)if(e.hasOwnProperty(n))for(i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var i,o,r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());i=!1,o=0,t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,s=v(n),l=n.prevFromRect,c=n.prevToRect,d=e.rect,u=m(n,!0);u&&(s.top-=u.f,s.left-=u.e),n.toRect=s,n.thisAnimationDuration&&A(l,s)&&!A(a,s)&&(d.top-s.top)/(d.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(e=d,u=l,l=c,c=r.options,t=Math.sqrt(Math.pow(u.top-e.top,2)+Math.pow(u.left-e.left,2))/Math.sqrt(Math.pow(u.top-l.top,2)+Math.pow(u.left-l.left,2))*c.animation),A(s,a)||(n.prevFromRect=a,n.prevToRect=s,t=t||r.options.animation,r.animate(n,d,s,t)),t&&(i=!0,o=Math.max(o,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),i?e=setTimeout((function(){"function"==typeof n&&n()}),o):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,i){var o,r;i&&(f(e,"transition",""),f(e,"transform",""),o=(r=m(this.el))&&r.a,r=r&&r.d,o=(t.left-n.left)/(o||1),r=(t.top-n.top)/(r||1),e.animatingX=!!o,e.animatingY=!!r,f(e,"transform","translate3d("+o+"px,"+r+"px,0)"),this.forRepaintDummy=e.offsetWidth,f(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),f(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){f(e,"transition",""),f(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),i))}}}())}function N(e,t,n,i,o,r,a,s){var l,c=e[Xe],d=c.options.onMove;return!window.CustomEvent||Ue||$e?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=r||v(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),d?d.call(c,l,a):undefined}function F(e){e.draggable=!1}function q(){at=!1}function U(e){return setTimeout(e,0)}function $(e){return clearTimeout(e)}function W(){Ie.forEach((function(e){clearInterval(e.pid)})),Ie=[]}function H(){clearInterval(Le)}function z(){}function Q(){}function V(e,t){je.forEach((function(n,i){(i=t.children[n.sortableIndex+(e?Number(i):0)])?t.insertBefore(n,i):t.appendChild(n)}))}function G(){Re.forEach((function(e){e!==De&&e.parentNode&&e.parentNode.removeChild(e)}))}var X,Y,J,K,Z,ee,te,ne,ie,oe,re,ae,se,le,ce,de,ue,he,pe,fe,me,ge,be,ve,ye,we,Ee,Se,_e,Ce,Ae,Le,Ie,xe,ke,Te,Me,Pe,De,Be,Oe,Re,je,Ne,Fe,qe,Ue=s(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$e=s(/Edge/i),We=s(/firefox/i),He=s(/safari/i)&&!s(/chrome/i)&&!s(/android/i),ze=s(/iP(ad|od|hone)/i),Qe=s(/chrome/i)&&s(/android/i),Ve={capture:!1,passive:!1},Ge=/\s+/g,Xe="Sortable"+(new Date).getTime(),Ye=[],Je={initializeByDefault:!0},Ke={mount:function(e){for(var t in Je)!Je.hasOwnProperty(t)||t in e||(e[t]=Je[t]);Ye.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),Ye.push(e)},pluginEvent:function(e,t,n){var i,r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0},i=e+"Global",Ye.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,i,o){var r,a;for(r in Ye.forEach((function(o){var r=o.pluginName;(e.options[r]||o.initializeByDefault)&&((o=new o(e,t,e.options)).sortable=e,o.options=e.options,e[r]=o,n(i,o.defaults))})),e.options)e.options.hasOwnProperty(r)&&void 0!==(a=this.modifyOption(e,r,e.options[r]))&&(e.options[r]=a)},getEventProperties:function(e,t){var i={};return Ye.forEach((function(o){"function"==typeof o.eventProperties&&n(i,o.eventProperties.call(t[o.pluginName],e))})),i},modifyOption:function(e,t,n){var i;return Ye.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(i=o.optionListeners[t].call(e[o.pluginName],n))})),i}},Ze=["evt"],et=!1,tt=!1,nt=[],it=!1,ot=!1,rt=[],at=!1,st=[],lt="undefined"!=typeof document,ct=ze,dt=$e||Ue?"cssFloat":"float",ut=lt&&!Qe&&!ze&&"draggable"in document.createElement("div"),ht=function(){if(lt){if(Ue)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}
1(),pt=function(e,t){var n=f(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=w(e,0,t),r=w(e,1,t),a=o&&f(o),s=r&&f(r),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+v(o).width;return e=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+v(r).width,"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":o&&a.float&&"none"!==a.float?(t="left"===a.float?"left":"right",!r||"both"!==s.clear&&s.clear!==t?"horizontal":"vertical"):o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||i<=l&&"none"===n[dt]||r&&"none"===n[dt]&&i<l+e)?"vertical":"horizontal"},ft=function(e){function t(e,n){return function(i,o,r,a){var s=i.options.group.name&&o.options.group.name&&i.options.group.name===o.options.group.name;return!(null!=e||!n&&!s)||null!=e&&!1!==e&&(n&&"clone"===e?e:"function"==typeof e?t(e(i,o,r,a),n)(i,o,r,a):(o=(n?i:o).options.group.name,!0===e||"string"==typeof e&&e===o||e.join&&-1<e.indexOf(o)))}}var n={},i=e.group;i&&"object"==a(i)||(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},mt=function(){!ht&&K&&f(K,"display","none")},gt=function(){!ht&&K&&f(K,"display","")};return lt&&!Qe&&document.addEventListener("click",(function(e){if(tt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),tt=!1}),!0),j.prototype={constructor:j,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(be=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Y):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=i.filter;if(function(e){var t,n,i;for(st.length=0,n=(t=e.getElementsByTagName("input")).length;n--;)(i=t[n]).checked&&st.push(i)}(n),!Y&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!He||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=h(s,i.draggable,n,!1))&&s.animated||te===s)){if(oe=S(s),ae=S(s,i.draggable),"function"==typeof c){if(c.call(this,e,s,this))return B({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),D("filter",t,{evt:e}),void(o&&e.preventDefault())}else if(c=c&&c.split(",").some((function(i){if(i=h(l,i.trim(),n,!1))return B({sortable:t,rootEl:i,name:"filter",targetEl:s,fromEl:n,toEl:n}),D("filter",t,{evt:e}),!0})))return void(o&&e.preventDefault());i.handle&&!h(l,i.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var i,o=this,r=o.el,a=o.options,s=r.ownerDocument;n&&!Y&&n.parentNode===r&&(i=v(n),Z=r,J=(Y=n).parentNode,ee=Y.nextSibling,te=n,le=a.group,de={target:j.dragged=Y,clientX:(t||e).clientX,clientY:(t||e).clientY},fe=de.clientX-i.left,me=de.clientY-i.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Y.style["will-change"]="all",i=function(){D("delayEnded",o,{evt:e}),j.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!We&&o.nativeDraggable&&(Y.draggable=!0),o._triggerDragStart(e,t),B({sortable:o,name:"choose",originalEvent:e}),p(Y,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){g(Y,e.trim(),F)})),l(s,"dragover",O),l(s,"mousemove",O),l(s,"touchmove",O),a.supportPointer?(l(s,"pointerup",o._onDrop),this.nativeDraggable||l(s,"pointercancel",o._onDrop)):(l(s,"mouseup",o._onDrop),l(s,"touchend",o._onDrop),l(s,"touchcancel",o._onDrop)),We&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Y.draggable=!0),D("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&($e||Ue)?i():j.eventCanceled?this._onDrop():(a.supportPointer?(l(s,"pointerup",o._disableDelayedDrag),l(s,"pointercancel",o._disableDelayedDrag)):(l(s,"mouseup",o._disableDelayedDrag),l(s,"touchend",o._disableDelayedDrag),l(s,"touchcancel",o._disableDelayedDrag)),l(s,"mousemove",o._delayedDragTouchMoveHandler),l(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&l(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,a.delay)))},_delayedDragTouchMoveHandler:function(e){e=e.touches?e.touches[0]:e,Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Y&&F(Y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;c(e,"mouseup",this._disableDelayedDrag),c(e,"touchend",this._disableDelayedDrag),c(e,"touchcancel",this._disableDelayedDrag),c(e,"pointerup",this._disableDelayedDrag),c(e,"pointercancel",this._disableDelayedDrag),c(e,"mousemove",this._delayedDragTouchMoveHandler),c(e,"touchmove",this._delayedDragTouchMoveHandler),c(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?l(document,"pointermove",this._onTouchMove):l(document,t?"touchmove":"mousemove",this._onTouchMove):(l(Y,"dragend",this),l(Z,"dragstart",this._onDragStart));try{document.selection?U((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){var n;et=!1,Z&&Y?(D("dragStarted",this,{evt:t}),this.nativeDraggable&&l(document,"dragover",R),n=this.options,e||p(Y,n.dragClass,!1),p(Y,n.ghostClass,!0),j.active=this,e&&this._appendGhost(),B({sortable:this,name:"start",originalEvent:t}
vendor: 17,369 bytes, line 1
1)):this._nulling()},_emulateDragOver:function(){if(ue){this._lastX=ue.clientX,this._lastY=ue.clientY,mt();for(var e=document.elementFromPoint(ue.clientX,ue.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ue.clientX,ue.clientY))!==t;)t=e;if(Y.parentNode[Xe]._isOutsideThisEl(e),t)do{if(t[Xe]&&t[Xe]._onDragOver({clientX:ue.clientX,clientY:ue.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}while(t=u(e=t));gt()}},_onTouchMove:function(e){if(de){var t=(s=this.options).fallbackTolerance,n=s.fallbackOffset,i=e.touches?e.touches[0]:e,o=K&&m(K,!0),r=K&&o&&o.a,a=K&&o&&o.d,s=ct&&we&&_(we);if(r=(i.clientX-de.clientX+n.x)/(r||1)+(s?s[0]-rt[0]:0)/(r||1),a=(i.clientY-de.clientY+n.y)/(a||1)+(s?s[1]-rt[1]:0)/(a||1),!j.active&&!et){if(t&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}K&&(o?(o.e+=r-(he||0),o.f+=a-(pe||0)):o={a:1,b:0,c:0,d:1,e:r,f:a},o="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")"),f(K,"webkitTransform",o),f(K,"mozTransform",o),f(K,"msTransform",o),f(K,"transform",o),he=r,pe=a,ue=i),e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!K){var e=this.options.fallbackOnBody?document.body:Z,t=v(Y,!0,ct,!0,e),n=this.options;if(ct){for(we=e;"static"===f(we,"position")&&"none"===f(we,"transform")&&we!==document;)we=we.parentNode;we!==document.body&&we!==document.documentElement?(we===document&&(we=b()),t.top+=we.scrollTop,t.left+=we.scrollLeft):we=b(),rt=_(we)}p(K=Y.cloneNode(!0),n.ghostClass,!1),p(K,n.fallbackClass,!0),p(K,n.dragClass,!0),f(K,"transition",""),f(K,"transform",""),f(K,"box-sizing","border-box"),f(K,"margin",0),f(K,"top",t.top),f(K,"left",t.left),f(K,"width",t.width),f(K,"height",t.height),f(K,"opacity","0.8"),f(K,"position",ct?"absolute":"fixed"),f(K,"zIndex","100000"),f(K,"pointerEvents","none"),j.ghost=K,e.appendChild(K),f(K,"transform-origin",fe/parseInt(K.style.width)*100+"% "+me/parseInt(K.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;D("dragStart",this,{evt:e}),j.eventCanceled?this._onDrop():(D("setupClone",this),j.eventCanceled||((ne=x(Y)).removeAttribute("id"),ne.draggable=!1,ne.style["will-change"]="",this._hideClone(),p(ne,this.options.chosenClass,!1),j.clone=ne),n.cloneId=U((function(){D("clone",n),j.eventCanceled||(n.options.removeCloneOnHide||Z.insertBefore(ne,Y),n._hideClone(),B({sortable:n,name:"clone"}))})),t||p(Y,o.dragClass,!0),t?(tt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(c(document,"mouseup",n._onDrop),c(document,"touchend",n._onDrop),c(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,Y)),l(document,"drop",n),f(Y,"transform","translateZ(0)")),et=!0,n._dragStartId=U(n._dragStarted.bind(n,t,e)),l(document,"selectstart",n),ge=!0,window.getSelection().removeAllRanges(),He&&f(document.body,"user-select","none"))},_onDragOver:function(e){function t(t,n){D(t,V,o({evt:e,isOwner:H,axis:l?"vertical":"horizontal",revert:s,dragRect:a,targetRect:C,canSort:z,fromSortable:Q,target:F,completed:i,onMove:function(t,n){return N(Z,R,Y,a,t,v(t),e,n)},changed:r},n))}function n(){t("dragOverAnimationCapture"),V.captureAnimationState(),V!==Q&&Q.captureAnimationState()}function i(n){return t("dragOverCompleted",{insertion:n}),n&&(H?W._hideClone():W._showClone(V),V!==Q&&(p(Y,(ce||W).options.ghostClass,!1),p(Y,U.ghostClass,!0)),ce!==V&&V!==j.active?ce=V:V===j.active&&ce&&(ce=null),Q===V&&(V._ignoreWhileAnimating=F),V.animateAll((function(){t("dragOverAnimationComplete"),V._ignoreWhileAnimating=null})),V!==Q&&(Q.animateAll(),Q._ignoreWhileAnimating=null)),(F===Y&&!Y.animated||F===R&&!F.animated)&&(be=null),U.dragoverBubble||e.rootEl||F===document||(Y.parentNode[Xe]._isOutsideThisEl(e.target),n||O(e)),!U.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),G=!0}function r(){re=S(Y),se=S(Y,U.draggable),B({sortable:V,name:"change",toEl:R,newIndex:re,newDraggableIndex:se,originalEvent:e})}var a,s,l,c,d,u,m,g,b,_,C,A,L,x,k,T,P,R=this.el,F=e.target,U=this.options,$=U.group,W=j.active,H=le===$,z=U.sort,Q=ce||W,V=this,G=!1;if(!at){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),F=h(F,U.draggable,R,!0),t("dragOver"),j.eventCanceled)return G;if(Y.contains(e.target)||F.animated&&F.animatingX&&F.animatingY||V._ignoreWhileAnimating===F)return i(!1);if(tt=!1,W&&!U.disabled&&(H?z||(s=J!==Z):ce===this||(this.lastPutMode=le.checkPull(this,W,Y,e))&&$.checkPut(this,W,Y,e))){if(l="vertical"===this._getDirection(e,F),a=v(Y),t("dragOverValid"),j.eventCanceled)return G;if(s)return J=Z,n(),this._hideClone(),t("revert"),j.eventCanceled||(ee?Z.insertBefore(Y,ee):Z.appendChild(Y)),i(!0);if((u=E(R,U.draggable))&&(L=e,$=l,P=v(E((A=this).el,A.options.draggable)),A=M(A.el,A.options,K),!($?L.clientX>A.right+10||L.clientY>P.bottom&&L.clientX>P.left:L.clientY>A.bottom+10||L.clientX>P.right&&L.clientY>P.top)||u.animated)){if(u&&(c=e,d=l,k=v(w((x=this).el,0,x.options,!0)),x=M(x.el,x.options,K),d?c.clientX<x.left-10||c.clientY<k.top&&c.clientX<k.right:c.clientY<x.top-10||c.clientY<k.bottom&&c.clientX<k.left)){if((m=w(R,0,U,!0))===Y)return i(!1);if(C=v(F=m),!1!==N(Z,R,Y,a,F,C,e,!1))return n(),R.insertBefore(Y,m),J=R,r(),i(!0)}else if(F.parentNode===R){if(C=v(F),A=Y.parentNode!==R,L=Y.animated&&Y.toRect||a,P=F.animated&&F.toRect||C,x=(d=l)?L.left:L.top,c=d?L.right:L.bottom,k=d?L.width:L.height,m=d?P.left:P.top,L=d?P.right:P.bottom,P=d?P.width:P.height,L=!(x===m||c===L||x+k/2===m+P/2),x=l?"top":"left",m=(k=y(F,"top","top")||y(Y,"top","top"))?k.scrollTop:void 0,be!==F&&(b=C[x],it=!1,ot=!L&&U.invertSwap||A),0!==(g=function(e,t,n,i,o,r,a,s){var l=i?e.clientY:e.clientX,c=i?n.height:n.width;if(e=i?n.top:n.left,i=i?n.bottom:n.right,n=!1,!a)if(s&&ye<c*o){if(it=!it&&(1===ve?e+c*r/2<l:l<i-c*r/2)||it)n=!0;else if(1===ve?l<e+ye:i-ye<l)return-ve}else if(e+c*(1-o)/2<l&&l<i-c*(1-o)/2)return function(e){return S(Y)<S(e)?1:-1}(t);return(n=n||a)&&(l<e+c*r/2||i-c*r/2<l)?e+c/2<l?1:-1:0}(e,F,C,l,L?1:U.swapThreshold,null==U.invertedSwapThreshold?U.swapThreshold:U.invertedSwapThreshold,ot,be===F)))for(T=S(Y);(_=J.children[T-=g])&&("none"===f(_,"display")||_===K););if(0===g||_===F)return i(!1);if(ve=g,P=(be=F).nextElementSibling,A=!1,!1!==(L=N(Z,R,Y,a,F,C,e,A=1===g)))return 1!==L&&-1!==L||(A=1===L),at=!0,setTimeout(q,30),n(),A&&!P?R.appendChild(Y):F.parentNode.insertBefore(Y,A?P:F),k&&I(k,0,m-k.scrollTop),J=Y.parentNode,void 0===b||ot||(ye=Math.abs(b-v(F)[x])),r(),i(!0)}}else{if(u===Y)return i(!1);if((F=u&&R===e.target?u:F)&&(C=v(F)),!1!==N(Z,R,Y,a,F,C,e,!!F))return n(),u&&u.nextSibling?R.insertBefore(Y,u.nextSibling):R.appendChild(Y),J=R,r(),i(!0)}if(R.contains(Y))return i(!1)}return!1}},_ignoreWhileAnimating:null,_offMoveEvents:function(){c(document,"mousemove",this._onTouchMove),c(document,"touchmove",this._onTouchMove),c(document,"pointermove",this._onTouchMove),c(document,"dragover",O),c(document,"mousemove",O),c(document,"touchmove",O)},_offUpEvents:function(){var e=this.el.ownerDocument;c(e,"mouseup",this._onDrop),c(e,"touchend",this._onDrop),c(e,"pointerup",this._onDrop),c(e,"pointercancel",this._onDrop),c(e,"touchcancel",this._onDrop),c(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;re=S(Y),se=S(Y,n.draggable),D("drop",this,{evt:e}),J=Y&&Y.parentNode,re=S(Y),se=S(Y,n.draggable),j.eventCanceled||(it=ot=et=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$(this.cloneId),$(this._dragStartId),this.nativeDraggable&&(c(document,"drop",this),c(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),He&&f(document.body,"user-select",""),f(Y,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),n.dropBubble||e.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(Z===J||ce&&"clone"!==ce.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),Y&&(this.nativeDraggable&&c(Y,"dragend",this),F(Y),Y.style["will-change"]="",ge&&!et&&p(Y,(ce||this).options.ghostClass,!1),p(Y,this.options.chosenClass,!1),B({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:e}),Z!==J?(0<=re&&(B({rootEl:J,name:"add",toEl:J,fromEl:Z,originalEvent:e}),B({sortable:this,name:"remove",toEl:J,originalEvent:e}),B({rootEl:J,name:"sort",toEl:J,fromEl:Z,originalEvent:e}),B({sortable:this,name:"sort",toEl:J,originalEvent:e})),ce&&ce.save()):re!==oe&&0<=re&&(B({sortable:this,name:"update",toEl:J,originalEvent:e}),B({sortable:this,name:"sort",toEl:J,originalEvent:e})),j.active&&(null!=re&&-1!==re||(re=oe,se=ae),B({sortable:this,name:"end",toEl:J,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){D("nulling",this),Z=Y=J=K=ee=ne=te=ie=de=ue=ge=re=se=oe=ae=be=ve=ce=le=j.dragged=j.ghost=j.clone=j.active=null;var e=this.el;st.forEach((function(t){e.contains(t)&&(t.checked=!0)})),st.length=he=pe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Y&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,i=0,o=n.length,r=this.options;i<o;i++)h(e=n[i],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||function(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}(e));return t},sort:function(e,t){var n={},i=this.el;this.toArray().forEach((function(e,t){h(t=i.children[t],this.options.draggable,i,!1)&&(n[e]=t)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(i.removeChild(n[e]),i.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return h(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n,i=this.options;if(void 0===t)return i[e];n=Ke.modifyOption(this,e,t),i[e]=void 0!==n?n:t,"group"===e&&ft(i)},destroy:function(){D("destroy",this);var e=this.el;e[Xe]=null,c(e,"mousedown",this._onTapStart),c(e,"touchstart",this._onTapStart),c(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(c(e,"dragover",this),c(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),nt.splice(nt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){ie||(D("hideClone",this),j.eventCanceled||(f(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),ie=!0))},_showClone:function(e){"clone"===e.lastPutMode?ie&&(D("showClone",this),j.eventCanceled||(Y.parentNode!=Z||this.options.group.revertClone?ee?Z.insertBefore(ne,ee):Z.appendChild(ne):Z.insertBefore(ne,Y),this.options.group.revertClone&&this.animate(Y,ne),f(ne,"display",""),ie=!1)):this._hideClone()}},lt&&l(document,"touchmove",(function(e){(j.active||et)&&e.cancelable&&e.preventDefault()})),j.utils={on:l,off:c,css:f,find:g,is:function(e,t){return!!h(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:L,closest:h,toggleClass:p,clone:x,index:S,nextTick:U,cancelNextTick:$,detectDirection:pt,getChild:w,expando:Xe},j.get=function(e){return e[Xe]},j.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(t=t[0].constructor===Array?t[0]:t).forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(j.utils=o(o({},j.utils),e.utils)),Ke.mount(e)}))},j.create=function(e,t){return new j(e,t)},Ie=[],xe=!(j.version="1.15.7"),Te=L((function(e,t,n,i){var o,r,a,s,l,c,d,u,h,p,m,g,y,w,E,S,_,A,L,x,k,T,M,P;if(t.scroll){r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=b(),d=!1,Se!==n&&(Se=n,W(),Ee=t.scroll,o=t.scrollFn,!0===Ee&&(Ee=C(n,!0))),u=0,h=Ee;do{if(g=(m=v(p=h)).top,y=m.bottom,w=m.left,E=m.right,S=m.width,_=m.height,A=void 0,void 0,x=p.scrollWidth,k=p.scrollHeight,T=f(p),M=p.scrollLeft,m=p.scrollTop,L=p===c?(A=S<x&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),_<k&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(A=S<x&&("auto"===T.overflowX||"scroll"===T.overflowX),_<k&&("auto"===T.overflowY||"scroll"===T.overflowY)),M=A&&(Math.abs(E-r)<=s&&M+S<x)-(Math.abs(w-r)<=s&&!!M),m=L&&(Math.abs(y-a)<=s&&m+_<k)-(Math.abs(g-a)<=s&&!!m),!Ie[u])for(P=0;P<=u;P++)Ie[P]||(Ie[P]={});Ie[u].vx==M&&Ie[u].vy==m&&Ie[u].el===p||(Ie[u].el=p,Ie[u].vx=M,Ie[u].vy=m,clearInterval(Ie[u].pid),0==M&&0==m||(d=!0,Ie[u].pid=setInterval(function(){i&&0===this.layer&&j.active._onTouchMove(Ae);var t=Ie[this.layer].vy?Ie[this.layer].vy*l:0,n=Ie[this.layer].vx?Ie[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(j.dragged.parentNode[Xe],n,t,e,Ae,Ie[this.layer].el)||I(Ie[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==c&&(h=C(h,!1)));xe=d}}),30),Qe=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget;e=e.unhideGhostForTarget,t&&(o=n||o,a(),t=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,t=document.elementFromPoint(t.clientX,t.clientY),e(),o&&!o.el.contains(t)&&(r("spill"),this.onSpill({dragEl:i,putSortable:n})))},z.prototype={startIndex:null,dragStart:function(e){e=e.oldDraggableIndex,this.startIndex=e},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState(),(e=w(this.sortable.el,this.startIndex,this.options))?this.sortable.el.insertBefore(t,e):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Qe},n(z,{pluginName:"revertOnSpill"}),Q.prototype={onSpill:function(e){var t=e.dragEl;(e=e.putSortable||this.sortable).captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),e.animateAll()},drop:Qe},n(Q,{pluginName:"removeOnSpill"}),Re=[],je=[],Ne=!1,Fe=!1,qe=!1,j.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){e=e.originalEvent,this.sortable.nativeDraggable?l(document,"dragover",this._handleAutoScroll):this.options.supportPointer?l(document,"pointermove",this._handleFallbackAutoScroll):e.touches?l(document,"touchmove",this._handleFallbackAutoScroll):l(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){e=e.originalEvent,this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?c(document,"dragover",this._handleAutoScroll):(c(document,"pointermove",this._handleFallbackAutoScroll),c(document,"touchmove",this._handleFallbackAutoScroll),c(document,"mousemove",this._handleFallbackAutoScroll)),H(),W(),clearTimeout(X),X=void 0},nulling:function(){Ae=Se=Ee=xe=Le=_e=Ce=null,Ie.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n,i=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(o,r);Ae=e,t||this.options.forceAutoScrollFallback||$e||Ue||He?(Te(e,this.options,a,t),n=C(a,!0),!xe||Le&&o===_e&&r===Ce||(Le&&H(),Le=setInterval((function(){var a=C(document.elementFromPoint(o,r),!0);a!==n&&(n=a,W()),Te(e,i.options,a,t)}),10),_e=o,Ce=r)):this.options.bubbleScroll&&C(a,!0)!==b()?Te(e,this.options,C(a,!1),!1):W()}},n(e,{pluginName:"scroll",initializeByDefault:!0})}),j.mount(Q,z),j.mount(new function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){e=e.dragEl,ke=e},dragOverValid:function(e){var t=e.completed,n=e.target,i=e.onMove,o=e.activeSortable,r=e.changed,a=e.cancel;o.options.swap&&(e=this.sortable.el,o=this.options,n&&n!==e&&(e=ke,ke=!1!==i(n)?(p(n,o.swapClass,!0),n):null,e&&e!==ke&&p(e,o.swapClass,!1)),r(),t(!0),a())},drop:function(e){var t,n,i=e.activeSortable,o=e.putSortable,r=e.dragEl,a=o||this.sortable,s=this.options;ke&&p(ke,s.swapClass,!1),ke&&(s.swap||o&&o.options.swap)&&r!==ke&&(a.captureAnimationState(),a!==i&&i.captureAnimationState(),n=ke,e=(t=r).parentNode,s=n.parentNode,e&&s&&!e.isEqualNode(n)&&!s.isEqualNode(t)&&(o=S(t),r=S(n),e.isEqualNode(s)&&o<r&&r++,e.insertBefore(n,e.children[o]),s.insertBefore(t,s.children[r])),a.animateAll(),a!==i&&i.animateAll())},nulling:function(){ke=null}},n(e,{pluginName:"swap",eventProperties:function(){return{swapItem:ke}}})}),j.mount(new function(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?l(document,"pointerup",this._deselectMultiDrag):(l(document,"mouseup",this._deselectMultiDrag),l(document,"touchend",this._deselectMultiDrag))),l(document,"keydown",this._checkKeyDown),l(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var i="";Re.length&&Pe===e?Re.forEach((function(e,t){i+=(t?", ":"")+e.textContent}
1)):i=n.textContent,t.setData("Text",i)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){e=e.dragEl,De=e},delayEnded:function(){this.isMultiDrag=~Re.indexOf(De)},setupClone:function(e){var t,n=e.sortable;if(e=e.cancel,this.isMultiDrag){for(t=0;t<Re.length;t++)je.push(x(Re[t])),je[t].sortableIndex=Re[t].sortableIndex,je[t].draggable=!1,je[t].style["will-change"]="",p(je[t],this.options.selectedClass,!1),Re[t]===De&&p(je[t],this.options.chosenClass,!1);n._hideClone(),e()}},clone:function(e){var t=e.sortable,n=e.rootEl,i=e.dispatchSortableEvent;e=e.cancel,this.isMultiDrag&&(this.options.removeCloneOnHide||Re.length&&Pe===t&&(V(!0,n),i("clone"),e()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl;e=e.cancel,this.isMultiDrag&&(V(!1,n),je.forEach((function(e){f(e,"display","")})),t(),Oe=!1,e())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden);e=e.cancel,this.isMultiDrag&&(je.forEach((function(e){f(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),Oe=!0,e())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&Pe&&Pe.multiDrag._deselectMultiDrag(),Re.forEach((function(e){e.sortableIndex=S(e)})),Re=Re.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),qe=!0},dragStarted:function(e){var t,n=this;e=e.sortable,this.isMultiDrag&&(this.options.sort&&(e.captureAnimationState(),this.options.animation&&(Re.forEach((function(e){e!==De&&f(e,"position","absolute")})),t=v(De,!1,!0,!0),Re.forEach((function(e){e!==De&&k(e,t)})),Ne=Fe=!0)),e.animateAll((function(){Ne=Fe=!1,n.options.animation&&Re.forEach((function(e){T(e)})),n.options.sort&&G()})))},dragOver:function(e){var t=e.target,n=e.completed;e=e.cancel,Fe&&~Re.indexOf(t)&&(n(!1),e())},revert:function(e){var t,n,i=e.fromSortable,o=e.rootEl,r=e.sortable,a=e.dragRect;1<Re.length&&(Re.forEach((function(e){r.addAnimationState({target:e,rect:Fe?v(e):a}),T(e),e.fromRect=a,i.removeAnimationState(e)})),Fe=!1,t=!this.options.removeCloneOnHide,n=o,Re.forEach((function(e,i){(i=n.children[e.sortableIndex+(t?Number(i):0)])?n.insertBefore(e,i):n.appendChild(e)})))},dragOverCompleted:function(e){var t,n=e.sortable,i=e.isOwner,o=e.insertion,r=e.activeSortable,a=e.parentEl,s=e.putSortable;e=this.options,o&&(i&&r._hideClone(),Ne=!1,e.animation&&1<Re.length&&(Fe||!i&&!r.options.sort&&!s)&&(t=v(De,!1,!0,!0),Re.forEach((function(e){e!==De&&(k(e,t),a.appendChild(e))})),Fe=!0),i||(Fe||G(),1<Re.length?(i=Oe,r._showClone(n),r.options.animation&&!Oe&&i&&je.forEach((function(e){r.addAnimationState({target:e,rect:Be}),e.fromRect=Be,e.thisAnimationDuration=null}))):r._showClone(n)))},dragOverAnimationCapture:function(e){var t=e.dragRect,i=e.isOwner;e=e.activeSortable,Re.forEach((function(e){e.thisAnimationDuration=null})),e.options.animation&&!i&&e.multiDrag.isMultiDrag&&(Be=n({},t),t=m(De,!0),Be.top-=t.f,Be.left-=t.e)},dragOverAnimationComplete:function(){Fe&&(Fe=!1,G())},drop:function(e){var t,n,i,o,r,a,s,l=e.originalEvent,c=e.rootEl,d=e.parentEl,u=e.sortable,f=e.dispatchSortableEvent,m=e.oldIndex,g=(e=e.putSortable)||this.sortable;l&&(t=this.options,n=d.children,qe||(t.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),p(De,t.selectedClass,!~Re.indexOf(De)),~Re.indexOf(De)?(Re.splice(Re.indexOf(De),1),Me=null,P({sortable:u,rootEl:c,name:"deselect",targetEl:De,originalEvent:l})):(Re.push(De),P({sortable:u,rootEl:c,name:"select",targetEl:De,originalEvent:l}),l.shiftKey&&Me&&u.el.contains(Me)?(i=S(Me),o=S(De),~i&&~o&&i!==o&&function(){for(var e,r=i<o?(e=i,o):(e=o,i+1),a=t.filter;e<r;e++)~Re.indexOf(n[e])||h(n[e],t.draggable,d,!1)&&(a&&("function"==typeof a?a.call(u,l,n[e],u):a.split(",").some((function(t){return h(n[e],t.trim(),d,!1)})))||(p(n[e],t.selectedClass,!0),Re.push(n[e]),P({sortable:u,rootEl:c,name:"select",targetEl:n[e],originalEvent:l})))}()):Me=De,Pe=g)),qe&&this.isMultiDrag&&(Fe=!1,(d[Xe].options.sort||d!==c)&&1<Re.length&&(r=v(De),a=S(De,":not(."+this.options.selectedClass+")"),!Ne&&t.animation&&(De.thisAnimationDuration=null),g.captureAnimationState(),Ne||(t.animation&&(De.fromRect=r,Re.forEach((function(e){var t;e.thisAnimationDuration=null,e!==De&&(t=Fe?v(e):r,e.fromRect=t,g.addAnimationState({target:e,rect:t}))}))),G(),Re.forEach((function(e){n[a]?d.insertBefore(e,n[a]):d.appendChild(e),a++})),m===S(De)&&(s=!1,Re.forEach((function(e){e.sortableIndex!==S(e)&&(s=!0)})),s&&(f("update"),f("sort")))),Re.forEach((function(e){T(e)})),g.animateAll()),Pe=g),(c===d||e&&"clone"!==e.lastPutMode)&&je.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})))},nullingGlobal:function(){this.isMultiDrag=qe=!1,je.length=0}
1,destroyGlobal:function(){this._deselectMultiDrag(),c(document,"pointerup",this._deselectMultiDrag),c(document,"mouseup",this._deselectMultiDrag),c(document,"touchend",this._deselectMultiDrag),c(document,"keydown",this._checkKeyDown),c(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==qe&&qe||Pe!==this.sortable||e&&h(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;Re.length;){var t=Re[0];p(t,this.options.selectedClass,!1),Re.shift(),P({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},n(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[Xe];t&&t.options.multiDrag&&!~Re.indexOf(e)&&(Pe&&Pe!==t&&(Pe.multiDrag._deselectMultiDrag(),Pe=t),p(e,t.options.selectedClass,!0),Re.push(e))},deselect:function(e){var t=e.parentNode[Xe],n=Re.indexOf(e);t&&t.options.multiDrag&&~n&&(p(e,t.options.selectedClass,!1),Re.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return Re.forEach((function(i){var o;t.push({multiDragElement:i,index:i.sortableIndex}),o=Fe&&i!==De?-1:Fe?S(i,":not(."+e.options.selectedClass+")"):S(i),n.push({multiDragElement:i,index:o})})),{items:r(Re),clones:[].concat(je),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":1<e.length&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}),j})),define("WoltLabSuite/Core/Component/ChangeShowOrder",["require","exports","tslib","../Api/GetObject","../Api/PostObject","../Helper/PromiseMutex","../Language","./Dialog","sortablejs","./Snackbar"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){e.addEventListener("click",(0,r.promiseMutex)((()=>async function(e){const t=await async function(e){return(await(0,i.getObject)(`${window.WSC_RPC_API_URL}${e}`)).unwrap()}(e),n=(0,s.dialogFactory)().fromHtml(function(e){const t=document.createElement("ol");return t.classList.add("sortableList"),e.forEach((e=>{const n=document.createElement("li");n.dataset.objectId=e.id.toString(),n.textContent=e.label;const i=document.createElement("fa-icon");i.setIcon("up-down");const o=document.createElement("span");o.append(i),o.classList.add("sortableList__handle"),n.prepend(o),t.append(n)})),t.outerHTML}(t)).asPrompt();n.show((0,a.getPhrase)("wcf.global.changeShowOrder"));const r=new l.default(n.content.querySelector(".sortableList"),{direction:"vertical",animation:150,fallbackOnBody:!0,dataIdAttr:"data-object-id",draggable:"li",handle:".sortableList__handle"});n.addEventListener("primary",(()=>{(async function(e,t){await(0,o.postObject)(`${window.WSC_RPC_API_URL}${e}`,{values:t})})(e,r.toArray().map(Number)).then((()=>{(0,c.showDefaultSuccessSnackbar)().addEventListener("snackbar:close",(()=>{window.location.reload()}))}))}))}(t))))},l=n.__importDefault(l)})),define("WoltLabSuite/Core/Component/Confirmation/Custom",["require","exports","tslib","../Dialog","../../Language"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationCustom=void 0,o=n.__importStar(o),t.ConfirmationCustom=class{#$;constructor(e){this.#$=e}async message(e){if(""===e.trim())throw new Error("An empty message for the delete confirmation was provided. Please use `defaultMessage()` if you do not want to provide a custom message.");const t=(0,i.dialogFactory)().fromHtml(`<p>${e}</p>`).asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return t.show(this.#$),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async withFormElements(e){const t=(0,i.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e(t),t.show(this.#$),new Promise((e=>{t.addEventListener("primary",(()=>{e({result:!0,dialog:t})})),t.addEventListener("cancel",(()=>{e({result:!1,dialog:t})}))}))}async withoutMessage(){const e=(0,i.dialogFactory)().withoutContent().asConfirmation({primary:o.get("wcf.dialog.button.primary.confirm")});return e.show(this.#$),new Promise((t=>{e.addEventListener("primary",(()=>t(!0))),e.addEventListener("cancel",(()=>t(!1)))}))}}})),define("WoltLabSuite/Core/Component/Confirmation",["require","exports","tslib","./Dialog","../Language","../Dom/Util","./Confirmation/Custom"],(function(e,t,n,i,o,r,a){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.confirmationFactory=function(){return new s},r=n.__importStar(r);class s{custom(e){return new a.ConfirmationCustom(e)}async delete(e){const t=`<p>${(0,o.getPhrase)("wcf.dialog.confirmation.cannotBeUndone")}</p>`,n=(0,i.dialogFactory)().fromHtml(t).asConfirmation({primary:(0,o.getPhrase)("wcf.dialog.button.primary.delete")});let r;return r=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.delete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.delete",{title:e}),n.show(r),new Promise((e=>{n.addEventListener("primary",(()=>e(!0))),n.addEventListener("cancel",(()=>e(!1)))}))}async disable(e){const t=(0,i.dialogFactory)().withoutContent().asConfirmation();let n;return n=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.disable.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.disable",{title:e}),t.show(n),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async restore(e){const t=(0,i.dialogFactory)().withoutContent().asConfirmation();let n;return n=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.restore.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.restore",{title:e}),t.show(n),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async softDelete(e,t=!1){let n;if(n=void 0===e?(0,o.getPhrase)("wcf.dialog.confirmation.softDelete.indeterminate"):(0,o.getPhrase)("wcf.dialog.confirmation.softDelete",{title:e}),t)return this.withReason(n,!0);const r=(0,i.dialogFactory)().withoutContent().asConfirmation();return r.show(n),new Promise((e=>{r.addEventListener("primary",(()=>{e({result:!0})})),r.addEventListener("cancel",(()=>{e({result:!1})}))}))}async withReason(e,t){const n=(0,i.dialogFactory)().withoutContent().asConfirmation(),a=r.getUniqueId(),s=(0,o.getPhrase)(t?"wcf.dialog.confirmation.reason.optional":"wcf.dialog.confirmation.reason"),l=document.createElement("dl");l.innerHTML=`\n <dt><label for="${a}">${s}</label></dt>\n <dd><textarea id="${a}" cols="40" rows="3"></textarea></dd>\n `;const c=l.querySelector("textarea");return n.content.append(l),t||n.addEventListener("validate",(e=>{""===c.value.trim()?(e.preventDefault(),l.classList.add("formError"),r.innerError(c,(0,o.getPhrase)("wcf.global.form.error.empty"))):(l.classList.remove("formError"),r.innerError(c,!1))})),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/Api/GridViews/GetRow",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRow=async function(e,t,o,r){const a=new URL(`${window.WSC_RPC_API_URL}core/grid-views/row`);return a.searchParams.set("gridView",e),a.searchParams.set("objectID",t.toString()),o&&o.forEach(((e,t)=>{a.searchParams.set(`filters[${t}]`,e)})),r&&r.forEach(((e,t)=>{Array.isArray(e)?e.forEach(((e,n)=>{a.searchParams.set(`gridViewParameters[${t}][${n}]`,e)})):a.searchParams.set(`gridViewParameters[${t}]`,e)})),(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(a).get().allowCaching().disableLoadingIndicator().fetchAsJson()))}})),define("WoltLabSuite/Core/Api/GridViews/GetRows",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRows=async function(e,t,o="",r="ASC",a,s){const l=new URL(`${window.WSC_RPC_API_URL}core/grid-views/rows`);return l.searchParams.set("gridView",e),l.searchParams.set("pageNo",t.toString()),l.searchParams.set("sortField",o),l.searchParams.set("sortOrder",r),a&&a.forEach(((e,t)=>{l.searchParams.set(`filters[${t}]`,e)})),s&&s.forEach(((e,t)=>{Array.isArray(e)?e.forEach(((e,n)=>{l.searchParams.set(`gridViewParameters[${t}][${n}]`,e)})):l.searchParams.set(`gridViewParameters[${t}]`,e)})),(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(l).get().allowCaching().disableLoadingIndicator().fetchAsJson()))}})),define("WoltLabSuite/Core/Api/Interactions/GetBulkContextMenuOptions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getBulkContextMenuOptions=async function(e,t){return(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/interactions/bulk-context-menu-options`).post({provider:e,objectIDs:t}).disableLoadingIndicator().fetchAsJson()))}})),define("WoltLabSuite/Core/Component/GridView/Filter",["require","exports","WoltLabSuite/Core/Language","../../Helper/PromiseMutex","../Dialog","WoltLabSuite/Core/StringUtil"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Filter=void 0;class a extends EventTarget{#W;#H;#z=new Map;constructor(e){super(),this.#W=document.getElementById(`${e}_filterButton`),this.#H=document.getElementById(`${e}_filters`),this.#Q()}getActiveFilters(){return new Map(this.#z)}getQueryParameters(){const e=[];for(const[t,n]of this.#z.entries())e.push([`filters[${t}]`,n]);return e}updateFromSearchParams(e){this.#z.clear(),e.forEach(((e,t)=>{const n=t.match(/^filters\[([a-z0-9_]+)\]$/i);n&&this.#z.set(n[1],e)}))}setFilterLabels(e){if(null!==this.#H&&(this.#H.innerHTML="",0!==this.#z.size))for(const t of this.#z.keys()){const i=document.createElement("button");i.type="button",i.title=(0,r.unescapeHTML)((0,n.getPhrase)("wcf.page.removeFilterTooltip",{filterLabel:e[t]})),i.classList.add("button","small","jsTooltip"),i.dataset.filter=t,i.dataset.f
1ilterValue=this.#z.get(t);const o=document.createElement("fa-icon");o.setIcon("circle-xmark"),i.append(o,e[t]),i.addEventListener("click",(()=>{this.#V(t)})),this.#H.append(i)}}#Q(){null!==this.#W&&(this.#W.addEventListener("click",(0,i.promiseMutex)((()=>this.#G()))),null!==this.#H&&this.#H.querySelectorAll("[data-filter]").forEach((e=>{this.#z.set(e.dataset.filter,e.dataset.filterValue),e.addEventListener("click",(()=>{this.#V(e.dataset.filter)}))})))}async#G(){const e=new URL(this.#W.dataset.endpoint);this.#z.forEach(((t,n)=>{e.searchParams.set(`filters[${n}]`,t)}));const{ok:t,result:n}=await(0,o.dialogFactory)().usingFormBuilder().fromEndpoint(e.toString());t&&(this.#z=new Map(Object.entries(n)),this.dispatchEvent(new CustomEvent("grid-view:change")))}#V(e){this.#z.delete(e),this.dispatchEvent(new CustomEvent("grid-view:change"))}}t.Filter=a,t.default=a})),define("WoltLabSuite/Core/Component/GridView/Selection",["require","exports","tslib","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Dropdown/Simple"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Selection=void 0,o=n.__importDefault(o),s=n.__importStar(s);class l extends EventTarget{#X=null;#Y;#J=null;#K=null;#Z=null;#ee=void 0;constructor(e,t){super(),this.#Y=t,this.#X=this.#Y.querySelector(".gridView__selectAllRows"),this.#X?.addEventListener("change",(()=>{this.#te(this.#X.checked)})),this.#J=document.getElementById(`${e}_selectionBar`),this.#K=document.getElementById(`${e}_bulkInteractionButton`),this.#K?.addEventListener("click",(()=>{this.#ne()})),document.getElementById(`${e}_resetSelectionButton`)?.addEventListener("click",(()=>{this.resetSelection()})),(0,r.wheneverFirstSeen)(`#${this.#Y.id} .gridView__selectRow`,(e=>{e.addEventListener("change",(()=>{this.#te()}))})),this.#ie()}selectionBarVisible(){return null!==this.#J&&this.getSelectedIds().length>0}refresh(){this.#ie()}getSelectedIds(){const e=window.localStorage.getItem(this.#oe());if("string"!=typeof e)return[];let t=[];try{const n=JSON.parse(e);Array.isArray(n)&&(t=n)}catch{return window.ENABLE_DEBUG_MODE&&console.error("Failed to deserialize the selection.",e),[]}return t}#te(e,t=!1){const n=Array.from(this.#Y.querySelectorAll(".gridView__selectRow"));if(void 0===e){if(null!==this.#X){const e=n.filter((e=>e.checked)).length;0===e?(this.#X.checked=!1,this.#X.indeterminate=!1):e===n.length?(this.#X.checked=!0,this.#X.indeterminate=!1):(this.#X.checked=!1,this.#X.indeterminate=e>0&&e!==n.length)}}else for(const t of n)t.checked=e;t||this.#re(n),this.#ae(),this.#se()}#re(e){const t=new Map;e.forEach((e=>{const n=e.closest(".gridView__row"),i=parseInt(n.dataset.objectId);t.set(i,e.checked)}));const n=this.getSelectedIds().filter((e=>{const n=t.get(e);return void 0===n||n}));t.forEach(((e,t)=>{e&&!n.includes(t)&&n.push(t)})),window.localStorage.setItem(this.#oe(),JSON.stringify(n))}#ie(){const e=this.getSelectedIds();this.#Y.querySelectorAll(".gridView__row").forEach((t=>{const n=parseInt(t.dataset.objectId);if(!e.includes(n))return;const i=t.querySelector(".gridView__selectRow");i&&(i.checked=!0)})),this.#te(void 0,!0)}#oe(){return(0,i.getStoragePrefix)()+`gridView-${this.#Y.id}-selection`}#se(){const e=this.getSelectedIds();this.#J&&(this.dispatchEvent(new CustomEvent("grid-view:update-selection")),0!==e.length?(this.#J.hidden=!1,this.#K.textContent=(0,a.getPhrase)("wcf.clipboard.button.numberOfSelectedItems",{numberOfSelectedItems:e.length})):this.#J.hidden=!0)}#ne(){null===this.#Z&&(this.dispatchEvent(new CustomEvent("grid-view:get-bulk-interactions",{detail:{objectIds:this.getSelectedIds()}})),void 0!==this.#ee&&window.clearTimeout(this.#ee),this.#ee=window.setTimeout((()=>{this.#ee=void 0}),200))}setBulkInteractionContextMenuOptions(e){const t=o.default.createFragmentFromHtml(e);this.#ae(t)}#ae(e){if(void 0===e&&null===this.#Z)return;if(void 0!==this.#ee&&void 0!==e)return void window.setTimeout((()=>{this.#ae(e)}),20);const t=this.#K.parentElement.id,n=(0,s.getDropdownMenu)(t);if(void 0===n)throw new Error("Could not find the dropdown menu for "+this.#K.id);const i=Array.from(n.querySelectorAll(".dropdownDivider")),o=i[i.length-1];if(void 0===e){for(;null!==o.previousElementSibling;)o.previousElementSibling.remove();n.prepend(this.#Z),this.#Z=null}else{for(null===this.#Z&&(this.#Z=o.previousElementSibling,this.#Z.remove());null!==o.previousElementSibling;)o.previousElementSibling.remove();n.prepend(e),this.#le()}(0,s.setAlignmentById)(t)}resetSelection(){null!==this.#X&&(this.#X.checked=!1,this.#X.indeterminate=!1),this.#Y.querySelectorAll(".gridView__selectRow").forEach((e=>e.checked=!1)),window.localStorage.removeItem(this.#oe()),this.#se()}removeSelection(e){const t=this.getSelectedIds();-1!==t.indexOf(e)&&(t.splice(t.indexOf(e),1),window.localStorage.setItem(this.#oe(),JSON.stringify(t))),this.#te()}#le(){if(!this.#K)return;const e=s.default.getDropdownMenu(this.#K.dataset.target);e?.querySelectorAll("[data-bulk-interaction]").forEach((e=>{e.addEventListener("click",(()=>{this.#Y.dispatchEvent(new CustomEvent("bulk-interaction",{detail:e.dataset}))}))}))}}t.Selection=l,t.default=l})),define("WoltLabSuite/Core/Component/GridView/Sorting",["require","exports"],(function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Sorting=void 0;class n extends EventTarget{#ce;#de;#ue;#he;#Y;constructor(e,t,n,i,o){super(),this.#ue=t,this.#ce=i,this.#he=n,this.#de=o,this.#Y=e,this.#Y.querySelectorAll('.gridView__headerColumn[data-sortable="1"]').forEach((e=>{const t=e.querySelector(".gridView__headerColumn__button");t?.addEventListener("click",(()=>{this.#pe(e.dataset.id)}))})),this.#fe()}getSortField(){return this.#ue}getSortOrder(){return this.#he}getQueryParameters(){return""===this.#ue?[]:this.#ue===this.#ce?this.#he!==this.#de?[["sortOrder",this.#he]]:[]:[["sortField",this.#ue],["sortOrder",this.#he]]}updateFromSearchParams(e){this.#ue=this.#ce,this.#he=this.#de,e.forEach(((e,t)=>{"sortField"===t?this.#ue=e:"sortOrder"===t&&(this.#he=e)})),this.#fe()}#pe(e){this.#ue==e&&"ASC"==this.#he?this.#he="DESC":(this.#ue=e,this.#he="ASC"),this.#fe(),this.dispatchEvent(new CustomEvent("grid-view:change"))}#fe(){this.#Y.querySelectorAll('th[data-sortable="1"]').forEach((e=>{e.classList.remove("active","ASC","DESC"),e.dataset.id==this.#ue&&e.classList.add("active",this.#he)}))}}t.Sorting=n,t.default=n})),define("WoltLabSuite/Core/Component/GridView/State",["require","exports","tslib","./Filter","./Selection","./Sorting"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0,i=n.__importDefault(i),o=n.__importDefault(o),r=n.__importDefault(r);class a extends EventTarget{#me;#ge;#be;#ve;#ye;#we;#Ee;constructor(e,t,n,a,s,l,c,d){super(),this.#me=a,this.#Ee=n,this.#we=document.getElementById(`${e}_footer`),this.#be=document.getElementById(`${e}_pagination`),this.#be.addEventListener("switchPage",(e=>{this.#Se(e.detail,2)})),this.#ge=new i.default(e),this.#ge.addEventListener("grid-view:change",(()=>{this.#Se(1,0)})),this.#ye=new r.default(t,s,l,c,d),this.#ye.addEventListener("grid-view:change",(()=>{this.#Se(1,0)})),this.#ve=new o.default(e,t),this.#ve.addEventListener("grid-view:get-bulk-interactions",(e=>{this.dispatchEvent(new CustomEvent("grid-view:get-bulk-interactions",{detail:{objectIds:e.detail.objectIds}}))})),this.#ve.addEventListener("grid-view:update-selection",(()=>{this.#_e()})),this.#me&&window.addEventListener("popstate",(()=>{this.#Ce()})),this.#Ae(),this.#_e()}getPageNo(){return this.#Ee}getSortField(){return this.#ye.getSortField()}getSortOrder(){return this.#ye.getSortOrder()}getActiveFilters(){return this.#ge.getActiveFilters()}getSelectedIds(){return this.#ve.getSelectedIds()}updateFromResponse(e,t,n){this.#ge.setFilterLabels(n),this.#be.count=t,this.#Ae(),this.#ve.refresh(),0!==e&&2!==e||this.#Le(),this.#_e()}#Se(e,t){this.#be.page=e,this.#Ee=e,this.dispatchEvent(new CustomEvent("grid-view:change",{detail:{source:t}}))}#Le(){if(!this.#me)return;const e=new URL(this.#me),t=[];this.#Ee>1&&t.push(["pageNo",this.#Ee.toString()]);for(const e of this.#ye.getQueryParameters())t.push(e);for(const e of this.#ge.getQueryParameters())t.push(e);t.length>0&&(e.search+=""!==e.search?"&":"?",e.search+=new URLSearchParams(t).toString()),window.history.pushState({},document.title,e.toString())}#Ae(){if(!this.#me)return;const e=new URL(this.#me),t=[];for(const e of this.#ye.getQueryParameters())t.push(e);for(const e of this.#ge.getQueryParameters())t.push(e);t.length>0&&(e.search+=""!==e.search?"&":"?",e.search+=new URLSearchParams(t).toString()),this.#be.url=e.toString()}#Ce(){let e=1;const{searchParams:t}=new URL(window.location.href),n=t.get("pageNo");null!==n&&(e=parseInt(n),(Number.isNaN(e)||e<1)&&(e=1)),this.#ge.updateFromSearchParams(t),this.#ye.updateFromSearchParams(t),this.#Se(e,1)}#_e(){const e=this.#be.count>1;this.#we.hidden=!e&&!this.#ve.selectionBarVisible();const t=this.#be.closest(".gridView__pagination");null!==t&&(t.hidden=!e)}setBulkInteractionContextMenuOptions(e){this.#ve.setBulkInteractionContextMenuOptions(e)}resetSelection(){this.#ve.resetSelection()}removeSelection(e){this.#ve.removeSelection(e)}refreshSelection(){this.#ve.refresh()}}t.State=a,t.default=a})),define("WoltLabSuite/Core/Component/GridView",["require","exports","tslib","../Api/GridViews/GetRow","../Api/GridViews/GetRows","../Api/Interactions/GetBulkContextMenuOptions","../Dom/Change/Listener","../Dom/Util","../Helper/Prom
1iseMutex","../Helper/Selector","../Ui/Dropdown/Simple","./GridView/State"],(function(e,t,n,i,o,r,a,s,l,c,d,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GridView=void 0,a=n.__importDefault(a),s=n.__importDefault(s),d=n.__importDefault(d),t.GridView=class{#Ie;#Y;#xe;#ke;#Te;#Me;constructor(e,t,n,i="",o="",r="ASC",a="",s="ASC",l,c){this.#Ie=t,this.#Y=document.getElementById(`${e}_table`),this.#ke=document.getElementById(`${e}_noItemsNotice`),this.#Te=l,this.#Me=c,this.#Pe(),this.#xe=this.#De(e,n,i,o,r,a,s),this.#Be()}async#Oe(e){const t=await(0,o.getRows)(this.#Ie,this.#xe.getPageNo(),this.#xe.getSortField(),this.#xe.getSortOrder(),this.#xe.getActiveFilters(),this.#Me);s.default.setInnerHtml(this.#Y.querySelector("tbody"),t.template),this.#Y.hidden=0==t.totalRows,this.#ke.hidden=0!=t.totalRows,this.#xe.updateFromResponse(e,t.pages,t.filterLabels),a.default.trigger()}async#Re(e){const{template:t}=await(0,i.getRow)(this.#Ie,e.dataset.objectId,this.#xe.getActiveFilters(),this.#Me);e.replaceWith(s.default.createFragmentFromHtml(t)),this.#xe.refreshSelection(),a.default.trigger(),this.#je()}#Pe(){(0,c.wheneverFirstSeen)(`#${this.#Y.id} tbody tr`,(e=>{const t=[e];e.querySelectorAll(".dropdownToggle").forEach((e=>{const n=d.default.getDropdownMenu(e.dataset.target);n&&t.push(n)}));for(const n of t)n.querySelectorAll("[data-interaction]").forEach((t=>{t.addEventListener("click",(()=>{e.dispatchEvent(new CustomEvent("interaction:execute",{detail:t.dataset,bubbles:!0}))}))}))}))}#Be(){this.#Y.addEventListener("interaction:invalidate-all",(()=>{this.#Oe(0)})),this.#Y.addEventListener("interaction:invalidate",(e=>{this.#Re(e.target)})),this.#Y.addEventListener("interaction:remove",(e=>{e.target.remove(),this.#xe.removeSelection(parseInt(e.target.dataset.objectId)),this.#je()})),this.#Y.addEventListener("interaction:reset-selection",(()=>{this.#xe.resetSelection()})),this.#Y.addEventListener("interaction:bulk-completed",(()=>{this.#je()}))}#De(e,t,n,i,o,r,a){const s=new u.State(e,this.#Y,t,n,i,o,r,a);return s.addEventListener("grid-view:change",(e=>{this.#Oe(e.detail.source)})),s.addEventListener("grid-view:get-bulk-interactions",(0,l.promiseMutex)((e=>this.#Ne(e.detail.objectIds)))),s}async#Ne(e){const{template:t}=await(0,r.getBulkContextMenuOptions)(this.#Te,e);this.#xe.setBulkInteractionContextMenuOptions(t)}#je(){this.#Y.querySelectorAll("tbody tr").length>0||this.#Oe(0)}}})),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/Component/ListView/Filter",["require","exports","WoltLabSuite/Core/Language","../../Helper/PromiseMutex","../Dialog","WoltLabSuite/Core/StringUtil"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Filter=void 0;class a extends EventTarget{#W;#H;#z=new Map;constructor(e){super(),this.#W=document.getElementById(`${e}_filterButton`),this.#H=document.getElementById(`${e}_filters`),this.#Q()}getActiveFilters(){return new Map(this.#z)}getQueryParameters(){const e=[];for(const[t,n]of this.#z.entries())e.push([`filters[${t}]`,n]);return e}updateFromSearchParams(e){this.#z.clear(),e.forEach(((e,t)=>{const n=t.match(/^filters\[([a-z0-9_]+)\]$/i);n&&this.#z.set(n[1],e)}))}setFilterLabels(e){if(null!==this.#H&&(this.#H.innerHTML="",0!==this.#z.size))for(const t of this.#z.keys()){const i=document.createElement("button");i.type="button",i.title=(0,r.unescapeHTML)((0,n.getPhrase)("wcf.page.removeFilterTooltip",{filterLabel:e[t]})),i.classList.add("button","small","jsTooltip"),i.dataset.filter=t,i.dataset.f
1ilterValue=this.#z.get(t);const o=document.createElement("fa-icon");o.setIcon("circle-xmark"),i.append(o,e[t]),i.addEventListener("click",(()=>{this.#V(t)})),this.#H.append(i)}}#Q(){null!==this.#W&&(this.#W.addEventListener("click",(0,i.promiseMutex)((()=>this.#G()))),null!==this.#H&&this.#H.querySelectorAll("[data-filter]").forEach((e=>{this.#z.set(e.dataset.filter,e.dataset.filterValue),e.addEventListener("click",(()=>{this.#V(e.dataset.filter)}))})))}async#G(){const e=new URL(this.#W.dataset.endpoint);this.#z.forEach(((t,n)=>{e.searchParams.set(`filters[${n}]`,t)}));const{ok:t,result:n}=await(0,o.dialogFactory)().usingFormBuilder().fromEndpoint(e.toString());t&&(this.#z=new Map(Object.entries(n)),this.dispatchEvent(new CustomEvent("list-view:change")))}#V(e){this.#z.delete(e),this.dispatchEvent(new CustomEvent("list-view:change"))}}t.Filter=a,t.default=a})),define("WoltLabSuite/Core/Component/ListView/Selection",["require","exports","tslib","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Dropdown/Simple"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Selection=void 0,o=n.__importDefault(o),s=n.__importStar(s);class l extends EventTarget{#X=null;#Fe;#J=null;#K=null;#Z=null;#ee=void 0;constructor(e,t){super(),this.#Fe=t,this.#X=document.getElementById(`${e}_selectAllItems`),this.#X?.addEventListener("change",(()=>{this.#te(this.#X.checked)})),this.#J=document.getElementById(`${e}_selectionBar`),this.#K=document.getElementById(`${e}_bulkInteractionButton`),this.#K?.addEventListener("click",(()=>{this.#ne()})),document.getElementById(`${e}_resetSelectionButton`)?.addEventListener("click",(()=>{this.resetSelection()})),(0,r.wheneverFirstSeen)(`#${this.#Fe.id} .listView__selectItem`,(e=>{e.addEventListener("change",(()=>{this.#te()}))})),this.#ie()}selectionBarVisible(){return null!==this.#J&&this.getSelectedIds().length>0}refresh(){this.#ie()}getSelectedIds(){const e=window.localStorage.getItem(this.#oe());if("string"!=typeof e)return[];let t=[];try{const n=JSON.parse(e);Array.isArray(n)&&(t=n)}catch{return window.ENABLE_DEBUG_MODE&&console.error("Failed to deserialize the selection.",e),[]}return t}#te(e,t=!1){const n=Array.from(this.#Fe.querySelectorAll(".listView__selectItem"));if(void 0===e){if(null!==this.#X){const e=n.filter((e=>e.checked)).length;0===e?(this.#X.checked=!1,this.#X.indeterminate=!1):e===n.length?(this.#X.checked=!0,this.#X.indeterminate=!1):(this.#X.checked=!1,this.#X.indeterminate=e>0&&e!==n.length)}}else for(const t of n)t.checked=e;t||this.#re(n),this.#ae(),this.#se()}#re(e){const t=new Map;e.forEach((e=>{const n=e.closest(".listView__item"),i=parseInt(n.dataset.objectId);t.set(i,e.checked)}));const n=this.getSelectedIds().filter((e=>{const n=t.get(e);return void 0===n||n}));t.forEach(((e,t)=>{e&&!n.includes(t)&&n.push(t)})),window.localStorage.setItem(this.#oe(),JSON.stringify(n))}#ie(){const e=this.getSelectedIds();this.#Fe.querySelectorAll(".listView__item").forEach((t=>{const n=parseInt(t.dataset.objectId);if(!e.includes(n))return;const i=t.querySelector(".listView__selectItem");i&&(i.checked=!0)})),this.#te(void 0,!0)}#oe(){return(0,i.getStoragePrefix)()+`listView-${this.#Fe.id}-selection`}#se(){const e=this.getSelectedIds();this.#J&&(this.dispatchEvent(new CustomEvent("list-view:update-selection")),0!==e.length?(this.#J.hidden=!1,this.#K.textContent=(0,a.getPhrase)("wcf.clipboard.button.numberOfSelectedItems",{numberOfSelectedItems:e.length})):this.#J.hidden=!0)}#ne(){null===this.#Z&&(this.dispatchEvent(new CustomEvent("list-view:get-bulk-interactions",{detail:{objectIds:this.getSelectedIds()}})),void 0!==this.#ee&&window.clearTimeout(this.#ee),this.#ee=window.setTimeout((()=>{this.#ee=void 0}),200))}setBulkInteractionContextMenuOptions(e){const t=o.default.createFragmentFromHtml(e);this.#ae(t)}#ae(e){if(void 0===e&&null===this.#Z)return;if(void 0!==this.#ee&&void 0!==e)return void window.setTimeout((()=>{this.#ae(e)}),20);const t=this.#K.parentElement.id,n=(0,s.getDropdownMenu)(t);if(void 0===n)throw new Error("Could not find the dropdown menu for "+this.#K.id);const i=Array.from(n.querySelectorAll(".dropdownDivider")),o=i[i.length-1];if(void 0===e){for(;null!==o.previousElementSibling;)o.previousElementSibling.remove();n.prepend(this.#Z),this.#Z=null}else{for(null===this.#Z&&(this.#Z=o.previousElementSibling,this.#Z.remove());null!==o.previousElementSibling;)o.previousElementSibling.remove();n.prepend(e),this.#le()}(0,s.setAlignmentById)(t)}resetSelection(){null!==this.#X&&(this.#X.checked=!1,this.#X.indeterminate=!1),this.#Fe.querySelectorAll(".listView__selectItem").forEach((e=>e.checked=!1)),window.localStorage.removeItem(this.#oe()),this.#se()}removeSelection(e){const t=this.getSelectedIds();-1!==t.indexOf(e)&&(t.splice(t.indexOf(e),1),window.localStorage.setItem(this.#oe(),JSON.stringify(t))),this.#te()}#le(){if(!this.#K)return;const e=s.default.getDropdownMenu(this.#K.dataset.target);e?.querySelectorAll("[data-bulk-interaction]").forEach((e=>{e.addEventListener("click",(()=>{this.#Fe.dispatchEvent(new CustomEvent("bulk-interaction",{detail:e.dataset}))}))}))}}t.Selection=l,t.default=l})),define("WoltLabSuite/Core/Component/ListView/Sorting",["require","exports"],(function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Sorting=void 0;class n extends EventTarget{#ce;#de;#ue;#he;#qe;constructor(e,t,n,i,o){super(),this.#ue=t,this.#ce=i,this.#he=n,this.#de=o,this.#qe=e,this.#qe?.querySelectorAll("[data-sort-id]").forEach((e=>{e.addEventListener("click",(()=>{this.#pe(e.dataset.sortId)}))})),this.#fe()}getSortField(){return this.#ue}getSortOrder(){return this.#he}getQueryParameters(){return""===this.#ue?[]:this.#ue===this.#ce?this.#he!==this.#de?[["sortOrder",this.#he]]:[]:[["sortField",this.#ue],["sortOrder",this.#he]]}updateFromSearchParams(e){this.#ue=this.#ce,this.#he=this.#de,e.forEach(((e,t)=>{"sortField"===t?this.#ue=e:"sortOrder"===t&&(this.#he=e)}))}#pe(e){this.#ue==e&&"ASC"==this.#he?this.#he="DESC":(this.#ue=e,this.#he="ASC"),this.#fe(),this.dispatchEvent(new CustomEvent("list-view:change"))}#fe(){this.#qe?.querySelectorAll("[data-sort-id]").forEach((e=>{e.classList.remove("active","ASC","DESC"),e.dataset.sortId==this.#ue&&e.classList.add("active",this.#he)}))}}t.Sorting=n,t.default=n})),define("WoltLabSuite/Core/Component/ListView/State",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","./Filter","./Selection","./Sorting","WoltLabSuite/Core/Api/PostObject","WoltLabSuite/Core/Helper/PromiseMutex"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0,o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importDefault(a);class c extends EventTarget{#me;#ge;#be;#ve;#ye;#Ue;#Ee;constructor(e,t,n,c,d,u,h,p){super(),this.#me=c,this.#Ee=n,this.#Ue=document.getElementById(`${e}_footer`),this.#be=document.getElementById(`${e}_pagination`),this.#be.addEventListener("switchPage",(e=>{this.#Se(e.detail,2)})),this.#ge=new o.default(e),this.#ge.addEventListener("list-view:change",(()=>{this.#Se(1,0)})),this.#ye=new a.default(document.getElementById(`${e}_sorting`)??void 0,d,u,h,p),this.#ye.addEventListener("list-view:change",(()=>{this.#Se(1,0)})),this.#ve=new r.default(e,t),this.#ve.addEventListener("list-view:get-bulk-interactions",(e=>{this.dispatchEvent(new CustomEvent("list-view:get-bulk-interactions",{detail:{objectIds:e.detail.objectIds}}))})),this.#ve.addEventListener("list-view:update-selection",(()=>{this.#$e()})),this.#me&&window.addEventListener("popstate",(()=>{this.#Ce()})),(0,i.wheneverFirstSeen)(`#${e}_items .listView__item__markAsRead`,(e=>{e.addEventListener("click",(0,l.promiseMutex)((async()=>{await(0,s.postObject)(e.dataset.endpoint),e.closest(".listView__item")?.dispatchEvent(new CustomEvent("interaction:invalidate",{bubbles:!0}))})))})),this.#Ae(),this.#$e()}getPageNo(){return this.#Ee}getSortField(){return this.#ye.getSortField()}getSortOrder(){return this.#ye.getSortOrder()}getActiveFilters(){return this.#ge.getActiveFilters()}getSelectedIds(){return this.#ve.getSelectedIds()}updateFromResponse(e,t,n){this.#ge.setFilterLabels(n),this.#be.count=t,this.#Ae(),this.#ve.refresh(),0!==e&&2!==e||this.#Le(),this.#$e()}#Se(e,t){this.#be.page=e,this.#Ee=e,this.dispatchEvent(new CustomEvent("list-view:change",{detail:{source:t}}))}#Le(){if(!this.#me)return;const e=new URL(this.#me),t=[];this.#Ee>1&&t.push(["pageNo",this.#Ee.toString()]);for(const e of this.#ye.getQueryParameters())t.push(e);for(const e of this.#ge.getQueryParameters())t.push(e);t.length>0&&(e.search+=""!==e.search?"&":"?",e.search+=new URLSearchParams(t).toString()),window.history.pushState({},document.title,e.toString())}#Ae(){if(!this.#me)return;const e=new URL(this.#me),t=[];for(const e of this.#ye.getQueryParameters())t.push(e);for(const e of this.#ge.getQueryParameters())t.push(e);t.length>0&&(e.search+=""!==e.search?"&":"?",e.search+=new URLSearchParams(t).toString()),this.#be.url=e.toString()}#Ce(){let e=1;const{searchParams:t}=new URL(window.location.href),n=t.get("pageNo");null!==n&&(e=parseInt(n),(Number.isNaN(e)||e<1)&&(e=1)),this.#ge.updateFromSearchParams(t),this.#ye.updateFromSearchParams(t),this.#Se(e,1)}#$e(){const e=this.#be.count>1;this.#Ue.hidden=!e&&!this.#ve.selectionBarVisible();const t=this.#be.closest(".listView__pagination");null!==t&&(t.hidden=!e)}setBulkInteractionContextMenuOptions(e){this.#ve.setBulkInteractionContextMenuOptions(e)}resetSelection(){this.#ve.resetSelection()}removeSelection(e){this.#ve.removeSelection(e)}refreshSelection(){this.#ve.refresh()}}t.State=c,t.default=c})),define("WoltLabSuite/Core/Api/ListViews/GetItems",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getItems=async function(e,t,o="",r="ASC",a,s,l=!0,c=!0,d=!0,u=!0){const h=new URL(`${window.WSC_RPC_API_URL}core/list-views/items`);return h.searchParams.set("listView",e),h.searchParams.set("pageNo",t.toString()),h.searchParams.set("sortField",o),h.searchParams.set("sortOrder",r),h.searchParams.set("allowFiltering",l.toString()),h.searchParams.set("allowSorting",c.toString()),h.searchParams.set("allowInteractions",d.toString()),h.searchParams.set("allowBulkInteractions",u.toString()),a&&a.forEach(((e,t)=>{h.searchParams.set(`filters[${t}]`,e)})),s&&s.forEach(((e,t)=>{Array.isArray(e)?e.forEach(((e,n)=>{h.searchParams.set(`listViewParameters[${t}][${n}]`,e)})):h.searchParams.set(`listViewParameters[${t}]`,e)})),(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(h).get().allowCaching().disableLoadingIndicator().fetchAsJson()))}})),define("WoltLabSuite/Core/Api/ListViews/GetItem",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItem=async function(e,t,o,r,a=!0,s=!0){const l=new URL(`${window.WSC_RPC_API_URL}core/list-views/item`);return l.searchParams.set("listView",e),l.searchParams.set("objectID",t.toString()),l.searchParams.set("allowInteractions",a.toString()),l.searchParams.set("allowBulkInteractions",s.toString()),o&&o.forEach(((e,t)=>{l.searchParams.set(`filters[${t}]`,e)})),r&&r.forEach(((e,t)=>{Array.isArray(e)?e.forEach(((e,n)=>{l.searchParams.set(`listViewParameters[${t}][${n}]`,e)})):l.searchParams.set(`listViewParameters[${t}]`,e)})),(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(l).get().allowCaching().disableLoadingIndicator().fetchAsJson()))}})),define("WoltLabSuite/Core/Component/ListView",["require","exports","tslib","./ListView/State","../Dom/Change/Listener","../Dom/Util","../Api/ListViews/GetItems","WoltLabSuite/Core/Ui/Scroll","../Helper/Selector","../Ui/Dropdown/Simple","../Api/ListViews/GetItem","../Api/Interactions/GetBulkContextMenuOptions","../Helper/PromiseMutex"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListView=void 0,i=n.__importDefault(i),c=n.__importDefault(c),t.ListView=class{#We;#Fe;#xe;#ke;#Te;#He;#ze;#Qe;#Ve;#Ge;constructor(e,t,n,i="",o="",r="ASC",a="",s="ASC",l,c=!0,d=!0,u=!0,h=!0,p){this.#We=t,this.#Fe=document.getElementById(`${e}_items`),this.#ke=document.getElementById(`${e}_noItemsNotice`),this.#Te=l,this.#He=c,this.#ze=d,this.#Qe=u,this.#Ve=h,this.#Ge=p,this.#Pe(),this.#xe=this.#De(e,n,i,o,r,a,s),this.#Be()}async#Xe(e){const t=await(0,a.getItems)(this.#We,this.#xe.getPageNo(),this.#xe.getSortField(),this.#xe.getSortOrder(),this.#xe.getActiveFilters(),this.#Ge,this.#He,this.#ze,this.#Qe,this.#Ve);(0,r.setInnerHtml)(this.#Fe,t.template),this.#Fe.hidden=0===t.totalItems,this.#ke.hidden=0!==t.totalItems,this.#xe.updateFromResponse(e,t.pages,t.filterLabels),2===e&&(0,s.element)(this.#Fe.closest(".listView")),(0,o.trigger)()}async#Ye(e){const{template:t}=await(0,d.getItem)(this.#We,e.dataset.objectId,this.#xe.getActiveFilters(),this.#Ge,this.#Qe,this.#Ve);e.replaceWith((0,r.createFragmentFromHtml)(t)),this.#xe.refreshSelection(),(0,o.trigger)(),this.#Je()}#Pe(){(0,l.wheneverFirstSeen)(`#${this.#Fe.id} .listView__item`,(e=>{e.querySelectorAll(".dropdownToggle").forEach((t=>{let n=c.default.getDropdownMenu(t.dataset.target);n||(n=t.closest(".dropdown").querySelector(".dropdownMenu")),n?.querySelectorAll("[data-interaction]").forEach((t=>{t.addEventListener("click",(()=>{e.dispatchEvent(new CustomEvent("interaction:execute",{detail:t.dataset,bubbles:!0}))}))}))}))}));const e=this.#Fe.closest(".listView");e.querySelector(".listView__editMode__toggle")?.addEventListener("click",(()=>{e.classList.add("listView--editMode")}))}#Be(){this.#Fe.addEventListener("interaction:invalidate-all",(()=>{this.#Xe(0)})),this.#Fe.addEventListener("interaction:invalidate",(e=>{this.#Ye(e.target)})),this.#Fe.addEventListener("interaction:remove",(e=>{e.target.remove(),this.#xe.removeSelection(parseInt(e.target.dataset.objectId)),this.#Je()})),this.#Fe.addEventListener("interaction:reset-selection",(()=>{this.#xe.resetSelection()}))}#De(e,t,n,o,r,a,s){const l=new i.default(e,this.#Fe,t,n,o,r,a,s);return l.addEventListener("list-view:change",(e=>{this.#Xe(e.detail.source)})),l.addEventListener("list-view:get-bulk-interactions",(0,h.promiseMutex)((e=>this.#Ne(e.detail.objectIds)))),l}async#Ne(e){const{template:t}=await(0,u.getBulkContextMenuOptions)(this.#Te,e);this.#xe.setBulkInteractionContextMenuOptions(t)}#Je(){this.#Fe.querySelectorAll(".listView__item").length>0||this.#Xe(0)}}})),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";
1Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class i{#Ke=new Map;#Ze;constructor(e){this.#Ze="string"==typeof e?async t=>{const i=new URL(e);i.searchParams.set("id",t.toString());const o=await(0,n.prepareRequest)(i).get().fetchAsResponse();return o?.ok?await o.text():""}:e}async get(e){let t=this.#Ke.get(e);return void 0!==t||(t=await this.#Ze(e),this.#Ke.set(e,t)),t}reset(e){this.#Ke.delete(e)}}t.SharedCache=i,t.default=i})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Devtools","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupFor=function(e){const{identifier:t,endpoint:n,selector:i}=e,o=new c.default(n);u.set(t,o),(0,a.wheneverFirstSeen)(i,(e=>{null===e.closest(".popover, .popoverContainer")&&e.addEventListener("mouseenter",(()=>{new d(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){u.get(e).reset(t)},i=n.__importDefault(i),o=n.__importDefault(o),s=n.__importDefault(s),l=n.__importStar(l),c=n.__importDefault(c);class d{#et;#tt=void 0;#nt=!0;#x;#it;#ot=void 0;#rt=void 0;constructor(e,t,n){this.#et=e,this.#x=t,this.#it=n,t.addEventListener("mouseenter",(()=>{this.#at()})),t.addEventListener("mouseleave",(()=>{this.#st()}));const i=window.matchMedia("(hover:hover)");this.#lt(i.matches),i.addEventListener("change",(e=>{this.#lt(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#lt(!1)})),this.#at()}#at(){this.#nt&&(this.#rt?.stop(),void 0===this.#ot?this.#ot=new s.default((e=>{e.stop();const t=this.#ct();void 0!==t?this.#et.get(t).then((e=>{if(""===e)return;const t=this.#dt();o.default.setInnerHtml(t,e),l.set(t,this.#x,{vertical:"top"}),t.setAttribute("aria-hidden","false")})):console.error("Missing attribute `data-object-id` for element",this.#x)}),800):this.#ot.restart())}#st(){this.#nt&&!i.default._internal_.persistentPopover()&&(this.#ot?.stop(),void 0===this.#rt?this.#rt=new s.default((e=>{null===this.#tt?.querySelector(".dropdown.dropdownOpen")&&(e.stop(),this.#tt?.setAttribute("aria-hidden","true"))}),500):this.#rt.restart())}#lt(e){this.#nt=e,this.#tt?.setAttribute("aria-hidden","true")}#ct(){const e=parseInt(this.#x.dataset.objectId||"");if(!Number.isNaN(e)&&0!==e)return e}#dt(){return void 0===this.#tt&&(this.#tt=document.createElement("div"),this.#tt.classList.add("popoverContainer"),this.#tt.dataset.identifier=this.#it,this.#tt.setAttribute("aria-hidden","true"),this.#tt.addEventListener("transitionend",(()=>{"true"===this.#tt.getAttribute("aria-hidden")&&this.#tt.remove()})),this.#tt.addEventListener("mouseenter",(()=>{this.#rt?.stop()})),this.#tt.addEventListener("mouseleave",(()=>{this.#st()}))),null===this.#tt.parentNode&&(0,r.getPageOverlayContainer)().append(this.#tt),this.#tt}}const u=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.forEac
1h(((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("<p>"+n+"</p>")),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)}}
1)),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;h.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 p=document.getElementById(e);if(null===p)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let f=document.getElementById(t);null===f&&(f=document.createElement("input"),f.type="hidden",f.id=t,f.name=t,f.value=n.toString(),p.appendChild(f)),function(e,t,n,i,c,d){function p(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 f;const m=t.parentElement;"DD"===m.nodeName?(f=document.createElement("div"),f.className="dropdown",m.insertAdjacentElement("afterbegin",f)):(f=m,f.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===m.nodeName&&g.classList.add("button"),f.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",f.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",p),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",p),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",p)}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 y=t.closest("form");if(null!==y){y.addEventListener("submit",l);let t=h.get(y);void 0===t&&(t=[],h.set(y,t)),t.push(e)}}(t,f,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,h=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=h.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?h.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");
1e.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=h.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=h.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(h.has(e))return;const p=document.getElementById(e);if(null===p)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const f=new Map;Object.entries(t).forEach((([e,t])=>{f.set(+e,a.unescapeHTML(t))})),h.set(e,f),function(e,t,n,i,a){let h=t.parentElement;if(!h.classList.contains("inputAddon")){h=document.createElement("div"),h.className="inputAddon","TEXTAREA"===t.nodeName&&h.classList.add("inputAddonTextarea"),h.dataset.inputId=e;const n=document.activeElement===t;t.insertAdjacentElement("beforebegin",h),h.appendChild(t),n&&t.focus()}h.classList.add("dropdown");const p=document.createElement("span");p.className="button dropdownToggle inputPrefix";const f=document.createElement("span");f.textContent=o.get("wcf.global.button.disabledI18n"),p.appendChild(f),h.insertBefore(p,t);const m=document.createElement("ul");m.className="dropdownMenu",p.insertAdjacentElement("afterend",m);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const i=~~n.dataset.languageId,o=m.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),m.appendChild(n)})),!a){const e=document.createElement("li");e.className="dropdownDivider",m.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),m.appendChild(t)}let b;(a||n.size)&&(b=Array.from(m.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(p),r.default.registerCallback(h.id,l),d.set(e,{buttonLabel:f,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,p,f,n,i)},t.registerCallback=function(e,t,n){if(!h.has(e))throw new Error(`Unknown element id '${e}'.`);
1d.get(e).callbacks.set(t,n)},t.unregister=function(e){if(!h.has(e))throw new Error(`Unknown element id '${e}'.`);h.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=h.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),h.set(e,i),void s(e,0,!0);h.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=h.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,h=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 i(e)},t.listenToCkeditor=function(e){return new o(e)};const n=new WeakMap;class i{#x;constructor(e){this.#x=e}collectMetaData(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#x.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#x.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#x.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e})),n.set(this.#x,e)}removeAttachment(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#x.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class o{#x;constructor(e){this.#x=e}bbcode(e){return this.#x.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.#x.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#x.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#x.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#x.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#x.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#x.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){const t=n.get(this.#x);return void 0!==t?(e(t),this):(this.#x.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this)}removeAttachment(e){return this.#x.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#x.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#x.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#x.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#x.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#x.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#x.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#x.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,t)=>{o.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})})).catch((()=>{t()}))}))}
1Object.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(`<img src="${n}" class="image woltlabAttachment" data-attachment-id="${t.toString()}">`)}))}(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(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},e(t)};return function(t){var n,i,o;if(t&&t.__esModule)return t;if(n={},null!=t)for(i=e(t),o=0;o<i.length;o++)"default"!==i[o]&&__createBinding(n,t,i[o]);return __setModuleDefault(n,t),n}}(),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/mention-suggestions");return t.searchParams.set("query",e),(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()))}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions","WoltLabSuite/Core/StringUtil"],(function(e,t,n,i,o,r){"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)).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:'<fa-icon name="users"></fa-icon>',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,n.createFragmentFromHtml)(`\n <span class="ckeditor5__mention">${e.icon} ${(0,r.escapeHTML)(e.text)}</span>\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",'</p><p><br data-cke-filler="true"></p><p>')).split("\n\n").map((e=>`<p>${e=e.replaceAll("\n","<br>")}</p>`)).join("")),i=(0,n.escapeHTML)(i),r=(0,n.escapeHTML)(r),e.insertHtml(`<woltlab-quote data-author="${i}" data-link="${r}">${o}</woltlab-quote>\n <p><br data-cke-filler="true"></p>`)}(t,e)}))}
1))}})),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 <div class="ckeditor5__restoreDraft__question">\n ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft"))}\n </div>\n <div class="ckeditor5__restoreDraft__buttons">\n <button type="button" class="button buttonPrimary small" data-type="submit">\n ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.dialog.button.primary.restore"))}\n </button>\n <button type="button" class="button small" data-type="cancel">\n ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.dialog.button.cancel"))}\n </button>\n <button type="button" class="button small" data-type="preview">\n ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft.preview"))}\n </button>\n </div>\n `,e}(),h=document.createElement("div");h.classList.add("ckeditor5_restoreDraft__wrapper"),h.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,h);const p=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",p);const f=()=>{e.ui.focusTracker.off("change:isFocused",p),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{f()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),f()}));const m=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(m);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n <button type="button" class="ck ck-button">\n ${(0,o.escapeHTML)((0,i.getPhrase)("wcf.editor.restoreDraft.restoreOrDiscard"))}\n </button>\n `,e}(),n=e.ui.view.toolbar.element,r=Array.from(n.children);r.forEach((e=>e.hidden=!0)),n.append(t),h.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(m),h.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<e)try{localStorage.removeItem(t)}catch{}}}))}(),t.autosave={save:t=>(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:1e3},(0,r.listenToCkeditor)(e).reset((()=>s(n))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(n)))}})),define("WoltLabSuite/Core/Component/EmojiPicker/Localization",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDataSource=function(e){return n.includes(e)?`${window.WCF_PATH}emoji/${e}.json`:`${window.WCF_PATH}emoji/en.json`};const n=["da","en","nl","en-gb","et","fi","fr","de","hu","it","lt","nb","pl","pt","ru","es","sv","uk"]})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language","WoltLabSuite/Core/Component/EmojiPicker/Localization"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=function(e){const t=new o(e);return t.build(),t.toConfig()};class o{#ut;#ht="|";#pt=[];#ft=[];#mt={};constructor(e){this.#ut=e}#gt(){this.#ut.undo?this.#ft.push("undo","redo"):this.#pt.push("Undo")}#bt(){this.#ft.push("bold","italic","emoji")}#vt(){const e=[];this.#ut.heading?e.push("heading"):this.#pt.push("Heading"),this.#ut.underline?e.push("underline"):this.#pt.push("Underline"),this.#ut.strikethrough?e.push("strikethrough"):this.#pt.push("Strikethrough"),e.push(this.#ht),this.#ut.mark?e.push("highlight"):this.#pt.push("Highlight"),this.#ut.fontColor?e.push("fontColor"):this.#pt.push("FontColor"),this.#ut.fontFamily?e.push("fontFamily"):this.#pt.push("FontFamily"),this.#ut.fontSize?e.push("fontSize"):this.#pt.push("FontSize"),e.push(this.#ht),this.#ut.subscript?e.push("subscript"):this.#pt.push("Subscript"),this.#ut.superscript?e.push("superscript"):this.#pt.push("Superscript"),0!==e.length&&e.push(this.#ht,"removeFormat"),e.length>0&&(this.#ft.push({label:"woltlabToolbarGroup_format",items:e}),this.#mt.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#yt(){this.#ut.list?(this.#ft.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#mt.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#pt.push("List")}#wt(){this.#ut.alignment?this.#ft.push("alignment"):this.#pt.push("Alignment")}#Et(){this.#ut.link?this.#ft.push("link"):this.#pt.push("Link","LinkImage")}#St(){this.#ut.image?(this.#ft.push("insertImage"),this.#ut.attachment||this.#pt.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#ut.link&&this.#pt.push("LinkImage")}#_t(){this.#ut.codeBlock?this.#ft.push("codeBlock"):this.#pt.push("CodeBlock","WoltlabCodeBlock"),this.#ut.code?this.#ft.push("code"):this.#pt.push("Code","WoltlabCode")}#Ct(){this.#ut.table?this.#ft.push("insertTable"):this.#pt.push("Table","TableToolbar"),this.#ut.quoteBlock?this.#ft.push("blockQuote"):this.#pt.push("BlockQuote","WoltlabBlockQuote"),this.#ut.spoiler?this.#ft.push("spoiler"):this.#pt.push("WoltlabSpoiler"),this.#ut.html?this.#ft.push("htmlEmbed"):this.#pt.push("HtmlEmbed","WoltlabHtmlEmbed")}#At(){this.#ft.push(this.#ht)}#Lt(){this.#ut.media||this.#pt.push("WoltlabMedia")}#It(){this.#ut.mention||this.#pt.push("WoltlabMention")}#xt(){let e=!1;return this.#ft.filter((t=>"string"==typeof t&&t===this.#ht?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#pt.length>0||this.#ft.length>0)throw new Error("Cannot build the configuration twice.");this.#gt(),this.#At(),this.#At(),this.#bt(),this.#Et(),this.#vt(),this.#At(),this.#yt(),this.#wt(),this.#At(),this.#St(),this.#_t(),this.#Ct(),this.#At(),this.#Lt(),this.#It()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en";"en"!==t||Object.hasOwn(window.CKEDITOR_TRANSLATIONS,t)||(window.CKEDITOR_TRANSLATIONS[t]={dictionary:{}});const{dictionary:o}=window.CKEDITOR_TRANSLATIONS[t];return o.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),o.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),o["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),o.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),o["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),o["Remove Quote"]=(0,n.getPhrase)("wcf.ckeditor.quote.remove"),o.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"),
1color:"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.#pt,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]},emoji:{definitionsUrl:(0,i.getDataSource)(t),dropdownLimit:20},toolbar:this.#xt(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#mt,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<n;t++){const i=e[t];let o=0;for(;t+o+1<n;){const n=e[t+o+1];if(i.nextElementSibling!==n)break;o++}if(0===o)i.remove();else{const n=o+1,i=Math.ceil(n/2);e.slice(t,t+i).forEach((e=>{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 <textarea>.");e.value=r(e.value)},i=n.__importDefault(i)})),define("WoltLabSuite/Core/Component/Ckeditor/Keyboard",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSubmitShortcut=function(e){const t=e.element.closest("form, .message, .jsOuterEditorContainer");if(null===t)return;const i=t.querySelector(".formSubmit");if(null===i)return;const o=i.querySelector('input[type="submit"], button[data-type="save"], button[accesskey="s"]');if(null===o)return;o.removeAttribute("accesskey");const r=function(e){return t=>{if("KeyS"!==t.code)return;let n;n=window.navigator.platform.startsWith("Mac")?t.ctrlKey&&t.altKey:t.altKey&&!t.ctrlKey,n&&(t.preventDefault(),t.stopPropagation(),e.click())}}(o);t.addEventListener("keydown",r),(0,n.listenToCkeditor)(e.element).destroy((()=>{t.removeEventListener("keydown",r)}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Layer",["require","exports","../../Helper/PageOverlay"],(function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){o||(o=!0,new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)if(e instanceof HTMLElement)for(const t of i)e.classList.contains(t)&&(0,n.getPageOverlayContainer)().append(e)})).observe(document.body,{childList:!0}))};const i=["ck-body-wrapper","ck-inspector-wrapper","ck-inspector-portal"];let o=!1})),define("WoltLabSuite/Core/Component/Ckeditor/BalloonPanel",["require","exports","WoltLabSuite/Core/Helper/PageOverlay"],(function(e,t,n){"use strict";function i(e){o.add(e);const t=new MutationObserver((()=>{!function(e){const t=e.getBoundingClientRect();if(t.left<0)e.style.setProperty("left","0");else if(t.right>window.innerWidth){const n=Math.min(window.innerWidth-t.width,0);e.style.setProperty("left",`${n}px`)}}(e)}));t.observe(e,{attributes:!0,attributeFilter:["style"]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){r||(r=!0,new MutationObserver((e=>{for(const t of e)if(0!==t.addedNodes.length)for(const e of t.addedNodes)e instanceof HTMLElement&&e.classList.contains("ck-balloon-panel")&&!o.has(e)&&i(e)})).observe((0,n.getPageOverlayContainer)(),{childList:!0,subtree:!0}))};const o=new WeakSet;let r=!1})),define("WoltLabSuite/Core/Component/Ckeditor",["require","exports","tslib","./Ckeditor/Attachment","./Ckeditor/Media","./Ckeditor/Mention","./Ckeditor/Quote","./Ckeditor/Autosave","./Ckeditor/Configuration","./Ckeditor/Event","./Ckeditor/SubmitOnEnter","./Ckeditor/Normalizer","../Ui/Scroll","../Devtools","./Ckeditor/Keyboard","./Ckeditor/Layer","./Ckeditor/BalloonPanel","../Environment"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f,m,g,b){"use strict";function*v(e,t,n){if(e.is("element",t)&&Object.entries(n).every((([t,n])=>!!e.hasAttribute(t)&&String(e.getAttribute(t))===n.toString())))yield e;else for(const i of e.getChildren())i.is("element")&&(yield*v(i,t,n))}function y(e,t){for(const n of e)if("string"==typeof n){if(n===t)return!0}else if(y(n.items,t))return!0;return!1}function w(e){return E.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setupCkeditor=async function(t,h,b,v,w,_){if(E.has(t))throw new TypeError(`Cannot initialize the editor for '${t.id}' twice.`);(0,m.setup)(),(0,g.setup)();const{create:C,CKEditor5:A}=await new Promise(((t,n)=>{e(["@woltlab/editor"],t,n)})).then(n.__importStar);await new Promise((e=>{window.requestAnimationFrame(e)})),function(e,t){(0,c.dispatchToCkeditor)(e).setupFeatures({features:t}),t.autosave&&!1===p.default._internal_.editorAutosave()&&(t.autosave=""),Object.freeze(t)}(t,h),h.attachment&&(0,i.setup)(t),h.media?(0,o.setup)(t):b=b.filter((e=>"media"!==e.name)),(0,r.setup)(t),h.quoteBlock&&(0,a.setup)(t);const L=function(e,t,n,i,o,r){const a=(0,l.createConfigurationFor)(t);a.codeBlock={languages:o},a.woltlabBbcode=n,a.woltlabSmileys=i,""!==t.autosave&&(0,s.initializeAutosave)(e,a,t.autosave),(0,c.dispatchToCkeditor)(e).setupConfiguration({configuration:a,features:t,modules:r});const d=a.toolbar;for(let{name:e}of n)e=`woltlabBbcode_${e}`,y(d,e)||d.push(e);return a}(t,h,b,v,w,A);_&&(L.licenseKey=_),(0,u.normalizeLegacyMessage)(t);const I=await C(t,L),x=new S(I,h);return h.autosave&&(0,s.setupRestoreDraft)(I,h.autosave),E.set(t,x),(0,c.dispatchToCkeditor)(t).ready({ckeditor:x}),h.submitOnEnter&&(0,d.setup)(I,x),""===x.getHtml()&&(0,c.dispatchToCkeditor)(t).discardRecoveredData(),(0,f.setupSubmitShortcut)(x),function(e,t){e.model.document.on("change:data",(()=>{(0,c.dispatchToCkeditor)(t).changeData()}))}(I,t),window.ENABLE_DEBUG_MODE&&window.ENABLE_DEVELOPER_TOOLS&&p.default._internal_.editorInspector()&&new Promise(((t,n)=>{e(["@ckeditor/ckeditor5-inspector"],t,n)})).then(n.__importStar).then((e=>{e.default.attach(I)})),x},t.getCkeditor=w,t.getCkeditorById=function(e,t=!0){const n=document.getElementById(e);if(null!==n)return w(n);if(t)throw new Error(`Unable to find an element with the id '${e}'.`)},p=n.__importDefault(p);const E=new WeakMap;class S{#kt;#ut;constructor(e,t){this.#kt=e,this.#ut=t}async destroy(){(0,c.dispatchToCkeditor)(this.sourceElement).destroy(),await this.#kt.destroy()}discardDraft(){this.#ut.autosave&&(0,s.deleteDraft)(this.#ut.autosave)}focus(e=!0){const t=this.#kt.ui.element,{bottom:n,top:i}=t.getBoundingClientRect(),o=window.innerHeight;let r=!1;(i>0&&i<o||n>0&&n<o)&&(r=!0),r||!e?this.#kt.editing.view.focus():(0,h.element)(t,(()=>{this.#kt.editing.view.focus()}))}getHtml(){return this.#kt.data.get()}insertHtml(e){e=(0,u.normalizeLegacyHtml)(e),this.#kt.model.change((t=>{const n=this.#kt.data.processor.toView(e),i=this.#kt.data.toModel(n),o=this.#kt.model.insertContent(i);t.setSelection(o.end),this.focus()}))}insertText(e){const t=document.createElement("div");t.textContent=e,this.insertHtml(t.innerHTML)}isVisible(){return 0!==this.#kt.ui.element.clientWidth}setHtml(e,t=!0){e=(0,u.normalizeLegacyHtml)(e),this.#kt.model.change((n=>{let i=this.#kt.model.createRangeIn(this.#kt.model.document.getRoot());const o=this.#kt.data.processor.toView(e),r=this.#kt.data.toModel(o);i=this.#kt.model.insertContent(r,i),n.setSelection(i.end),t&&this.focus()}))}removeAll(e,t){this.#kt.model.change((n=>{const i=v(this.#kt.model.document.getRoot(),e,t);for(const e of i)n.remove(e)}))}reset(){if(this.setHtml("",!1),(0,c.dispatchToCkeditor)(this.sourceElement).reset({ckeditor:this}),"safari"===(0,b.browser)()&&!(0,b.touch)()){const e=this.#kt.ui.element;e.focus(),window.setTimeout((()=>{e.blur()}),0)}}
1get element(){return this.#kt.ui.element}get features(){return this.#ut}get sourceElement(){return this.#kt.sourceElement}get focusTracker(){return this.#kt.ui.focusTracker}}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,n,i,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,n,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected <textarea class="wysiwygTextarea" /> for id '${e}'.`);i.init(e,t,n,o),i.registerCallback(e,"select",r),i.registerCallback(e,"submit",a),i.registerCallback(e,"beforeSelect",a)},i=n.__importStar(i)})),define("WoltLabSuite/Core/Ui/Suggestion",["require","exports","tslib","../Ajax","../Core","./Dropdown/Simple"],(function(e,t,n,i,o,r){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),class{ajaxPayload;callbackSelect;dropdownMenu=null;excludedSearchValues;element;threshold;value="";constructor(e,t){const n=document.getElementById(e);if(null===n)throw new Error("Expected a valid element id.");if(this.element=n,this.ajaxPayload=o.extend({actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},t.ajax),"function"!=typeof t.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this.callbackSelect=t.callbackSelect,this.excludedSearchValues=new Set(Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[]),this.threshold=void 0===t.threshold?3:t.threshold,this.element.addEventListener("click",(e=>e.preventDefault())),this.element.addEventListener("keydown",(e=>this.keyDown(e))),this.element.addEventListener("keyup",(e=>this.keyUp(e)))}addExcludedValue(e){this.excludedSearchValues.add(e)}removeExcludedValue(e){this.excludedSearchValues.delete(e)}isActive(){return null!==this.dropdownMenu&&r.default.isOpen(this.element.id)}keyDown(e){if(!this.isActive())return!0;if(-1===["ArrowDown","ArrowUp","Enter","Escape"].indexOf(e.key))return!0;let t,n=0;const i=this.dropdownMenu.childElementCount;for(;n<i&&(t=this.dropdownMenu.children[n],!t.classList.contains("active"));)n++;if("Enter"===e.key)r.default.close(this.element.id),this.select(void 0,t);else if("Escape"===e.key){if(!r.default.isOpen(this.element.id))return!0;r.default.close(this.element.id)}else{let o=0;"ArrowUp"===e.key?o=(0===n?i:n)-1:"ArrowDown"===e.key&&(o=n+1,o===i&&(o=0)),o!==n&&(t.classList.remove("active"),this.dropdownMenu.children[o].classList.add("active"))}return e.preventDefault(),!1}select(e,t){e instanceof MouseEvent&&(t=e.currentTarget.parentNode);const n=t.children[0];this.callbackSelect(this.element.id,{objectId:+(n.dataset.objectId||0),value:t.textContent||"",type:n.dataset.type||""}),e instanceof MouseEvent&&this.element.focus()}keyUp(e){const t=e.currentTarget.value.trim();if(this.value!==t){if(t.length<this.threshold)return null!==this.dropdownMenu&&r.default.close(this.element.id),void(this.value=t);this.value=t,i.api(this,{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:t}}})}}_ajaxSetup(){return{data:this.ajaxPayload}}_ajaxSuccess(e){null===this.dropdownMenu?(this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="dropdownMenu",r.default.initFragment(this.element,this.dropdownMenu)):this.dropdownMenu.innerHTML="",Array.isArray(e.returnValues)&&e.returnValues.length>0?(e.returnValues.forEach(((e,t)=>{const n=document.createElement("a");e.icon?(n.className="box16",n.innerHTML=`${e.icon} <span></span>`,n.children[1].textContent=e.label):n.textContent=e.label,n.dataset.objectId=e.objectID.toString(),e.type&&(n.dataset.type=e.type),n.addEventListener("click",(e=>this.select(e)));const i=document.createElement("li");0===t&&(i.className="active"),i.appendChild(n),this.dropdownMenu.appendChild(i)})),r.default.open(this.element.id,!0)):r.default.close(this.element.i
1d)}}})),define("WoltLabSuite/Core/Ui/ItemList",["require","exports","tslib","../Core","../Dom/Traverse","../Language","./Suggestion","./Dropdown/Simple","../Dom/Util"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e){const t=E.get(e);return-1===t.options.maxItems||t.list.childElementCount-1<t.options.maxItems}function d(e){const t=E.get(e);c(e)?(l.default.show(t.element),l.default.hide(t.limitReached),t.list.dataset.acceptsNewItems="true"):(l.default.hide(t.element),l.default.show(t.limitReached),t.list.dataset.acceptsNewItems="false")}function u(e){const t=e.currentTarget,n=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==n&&(n.classList.contains("active")?b(n):n.classList.add("active")):"Escape"===e.key&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")}function h(e){if("Enter"===e.key){e.preventDefault();const t=e.currentTarget;if(E.get(t.id).options.restricted)return;const n=t.value.trim();n.length&&g(t.id,{objectId:0,value:n})}}function p(e){const t=e.currentTarget;if(E.get(t.id).options.restricted)return;let n=t.value;
1n.includes(",")&&(n=n.replace(/,/g,""),n.length?g(t.id,{objectId:0,value:n}):t.value=n)}function f(e){e.preventDefault();const t=e.clipboardData.getData("text/plain"),n=e.currentTarget,i=n.id,o=+n.maxLength;t.split(/,/).forEach((e=>{e=e.trim(),-1!==o&&e.length>o&&(e=e.substr(0,o)),e.length>0&&c(i)&&g(i,{objectId:0,value:e})}))}function m(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}function g(e,t){const n=E.get(e),i=document.createElement("li");i.className="item";const o=document.createElement("span");if(o.className="content",o.dataset.objectId=t.objectId.toString(),t.type&&(o.dataset.type=t.type),o.textContent=t.value,i.appendChild(o),!n.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",b),i.appendChild(e)}n.list.insertBefore(i,n.listItem),n.suggestion.addExcludedValue(t.value),n.element.value="",n.element.disabled||d(e),v(n)}function b(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const n=e.parentElement.dataset.elementId||"",i=E.get(n);e.children[0].textContent&&i.suggestion.removeExcludedValue(e.children[0].textContent),e.remove(),t||i.element.focus(),d(n),v(i)}function v(e){let t=function(e){if(!e.options.isCSV)return null;if("function"==typeof e.options.callbackSyncShadow)return e.options.callbackSyncShadow(e);const t=w(e.element.id);return e.shadow.value=w(e.element.id).map((e=>e.value)).join(","),t}(e);"function"==typeof e.options.callbackChange&&(null===t&&(t=w(e.element.id)),e.options.callbackChange(e.element.id,t)),e.element.dispatchEvent(new Event("input",{bubbles:!0}))}function y(e){const t=e.currentTarget,n=E.get(t.id);if(n.options.restricted)return;const i=t.value.trim();i.length&&(n.suggestion&&n.suggestion.isActive()||g(t.id,{objectId:0,value:i}))}function w(e){const t=E.get(e);if(!t)throw new Error("Element id '"+e+"' is unknown.");const n=[];return t.list.querySelectorAll(".item > span").forEach((e=>{n.push({objectId:+(e.dataset.objectId||""),value:e.textContent.trim(),type:e.dataset.type})})),n}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,n){const d=document.getElementById(e);if(null===d)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(E.has(e)){const t=E.get(e);Object.keys(t).forEach((e=>{const n=t[e];n instanceof Element&&n.parentNode&&n.remove()})),s.default.destroy(e),E.delete(e)}const b=i.extend({ajax:{actionName:"getSearchResultList",className:"",parameters:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,callbackSyncShadow:null,callbackSetupValues:null,submitFieldName:""},n),v=o.parentByTag(d,"FORM");if(null!==v)if(b.isCSV)v.addEventListener("submit",(()=>{if(c(e)){const t=E.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}}));else{if(!b.submitFieldName.length&&"function"!=typeof b.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");v.addEventListener("submit",(()=>{if(c(e)){const t=E.get(e).element.value.trim();t.length&&g(e,{objectId:0,value:t})}const t=w(e);b.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=b.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,v.appendChild(t)})):b.callbackSubmit(v,t)}))}const S=function(e,t){const n=e.parentElement,i=document.createElement("ol");i.className="inputItemList"+(e.disabled?" disabled":""),i.dataset.acceptsNewItems="true",i.dataset.elementId=e.id,i.addEventListener("click",(t=>{t.target===i&&e.focus()}));const o=document.createElement("li");o.className="input",i.appendChild(o),e.addEventListener("input",p),e.addEventListener("keydown",u),e.addEventListener("keypress",h),e.addEventListener("keyup",m),e.addEventListener("paste",f);const a=e===document.activeElement;a&&e.blur(),e.addEventListener("blur",y),n.insertBefore(i,e),o.appendChild(e),a&&window.setTimeout((()=>{e.focus()}),1),-1!==t.maxLength&&(e.maxLength=t.maxLength);const s=document.createElement("span");s.className="inputItemListLimitReached",s.textContent=r.get("wcf.global.form.input.maxItems"),l.default.hide(s),o.appendChild(s);let c=null;const d=[];if(t.isCSV&&(c=document.createElement("input"),c.className="itemListInputShadow",c.type="hidden",c.name=e.name,e.removeAttribute("name"),i.parentNode.insertBefore(c,i),e.value.split(",").forEach((e=>{(e=e.trim())&&d.push(e)})),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentNode.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,limitReached:s,list:i,shadow:c,values:d}}(d,b),_=new a.default(e,{ajax:b.ajax,callbackSelect:g,excludedSearchValues:b.excludedSearchValues});E.set(e,{dropdownMenu:null,element:S.element,limitReached:S.limitReached,list:S.list,listItem:S.element.parentElement,options:b,shadow:S.shadow,suggestion:_}),t=b.callbackSetupValues?b.callbackSetupValues():S.values.length?S.values:t,Array.isArray(t)&&t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),g(e,t)}))},t.getValues=w,t.setValues=function(e,t){const n=E.get(e);if(!n)throw new Error("Element id '"+e+"' is unknown.");o.childrenByClass(n.list,"item").forEach((e=>{b(e,!0)})),t.forEach((t=>{g(e,t)}))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l);const E=new Map})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","../Helper/PageOverlay","../Language"],(function(e,t,n,i){"use strict";function o(){clearTimeout(s),a.classList.remove("active"),null!==c&&c(),l=!1}
1Object.defineProperty(t,"__esModule",{value:!0}),t.show=function(e,t,u){l||(l=!0,d||(d=!0,a=document.createElement("div"),a.id="systemNotification",r=document.createElement("p"),r.addEventListener("click",o),a.appendChild(r),(0,n.getPageOverlayContainer)().appendChild(a)),c="function"==typeof t?t:null,r.className=u||"success",r.textContent=(0,i.getPhrase)(e||"wcf.global.success"),a.classList.add("active"),s=window.setTimeout(o,2e3))};let r,a,s,l=!1,c=null,d=!1})),define("WoltLabSuite/Core/Ui/Pagination",["require","exports"],(function(e,t){"use strict";return class{#Tt;#Mt;#be;constructor(e,t){"function"==typeof t.callbackSwitch&&(this.#Tt=t.callbackSwitch),"function"==typeof t.callbackShouldSwitch&&(this.#Mt=t.callbackShouldSwitch),this.#be=document.createElement("woltlab-core-pagination"),this.#be.count=t.maxPage,this.#be.page=t.activePage,e.append(this.#be),this.#Pt()}#Pt(){this.#be.addEventListener("switchPage",(e=>{void 0===this.#Mt||!1!==this.#Mt(e.detail)?this.#Tt&&this.#Tt(e.detail):e.preventDefault()}))}getActivePage(){return this.#be.page}getElement(){return this.#be.parentElement}getMaxPage(){return this.#be.count}switchPage(e,t){if(t instanceof MouseEvent){t.preventDefault();const e=t.currentTarget;if(e&&e.dataset.tooltip){const t=document.getElementById("balloonTooltip");if(t){const n=new Event("mouseleave",{bubbles:!0,cancelable:!0});e.dispatchEvent(n),t.style.removeProperty("top"),t.style.removeProperty("bottom")}}}if((e=~~e)>0&&this.#be.page!==e&&e<=this.#be.count){if(void 0!==this.#Mt&&!this.#Mt(e))return;this.#be.jumpToPage(e),void 0!==this.#Tt&&this.#Tt(e)}}}})),define("WoltLabSuite/Core/Wrapper/FacebookSdk",["require","exports","https://connect.facebook.net/en_US/sdk.js"],(function(e,t){"use strict";return FB.init({version:"v7.0"}),FB})),define("WoltLabSuite/Core/Api/Comments/EditComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editComment=async function(e){const t=new URL(`${window.WSC_RPC_API_URL}core/comments/${e}/edit`);let o;try{o=await(0,n.prepareRequest)(t).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Comments/RenderComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderComment=async function(e,t=undefined,o=!1,r=undefined){const a=new URL(`${window.WSC_RPC_API_URL}core/comments/${e}/render`);let s;a.searchParams.set("messageOnly",o.toString()),void 0!==t&&a.searchParams.set("responseID",t.toString()),void 0!==r&&a.searchParams.set("objectTypeID",r.toString());try{s=await(0,n.prepareRequest)(a).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Api/Comments/RenderComments",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderComments=async function(e,t,o=0){const r=new URL(`${window.WSC_RPC_API_URL}core/comments/render`);let a;r.searchParams.set("objectTypeID",e.toString()),r.searchParams.set("objectID",t.toString()),r.searchParams.set("lastCommentTime",o.toString());try{a=await(0,n.prepareRequest)(r).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(a)}})),define("WoltLabSuite/Core/Api/Exceptions/RenderException",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderException=async function(e){const t=new URL(`${window.WSC_RPC_API_URL}core/exceptions/${e}/render`);return(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(t).get().fetchAsJson()))}})),define("WoltLabSuite/Core/Api/Files/DeleteFile",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteFile=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/files/${e}`).delete().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Files/GenerateThumbnails",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.generateThumbnails=async function(e){const t=new URL(`${window.WSC_RPC_API_URL}core/files/${e}/generate-thumbnails`);let o;try{o=await(0,n.prepareRequest)(t).post().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Files/Upload",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=async function(e,t,o,r,a,s=null,l=!1){const c=new URL(`${window.WSC_RPC_API_URL}core/files/upload`);let d=null;if(null!==s){d="";for(let e=0,t=s.length;e<t;e++)d+=s[e].toString(16).padStart(2,"0")}const u={filename:e,fileSize:t,fileHash:o,objectType:r,context:a,exifData:d,ignoreExifRotation:l};let h;try{h=await(0,n.prepareRequest)(c).post(u).disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(h)}})),define("WoltLabSuite/Core/Api/Interactions/GetContextMenuOptions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContextMenuOptions=async function(e,t){const o=new URL(`${window.WSC_RPC_API_URL}core/interactions/context-menu-options`);return o.searchParams.set("provider",e),o.searchParams.set("objectID",t.toString()),(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(o).get().allowCaching().disableLoadingIndicator().fetchAsJson()))}})),define("WoltLabSuite/Core/Component/File/woltlab-core-file",["require","exports","WoltLabSuite/Core/FileUtil"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreFileElement=t.Thumbnail=void 0;class i{#it;#Dt;constructor(e,t){this.#it=e,this.#Dt=t}get identifier(){return this.#it}get link(){return this.#Dt}}t.Thumbnail=i;class o extends HTMLElement{#Ke=void 0;#Bt="";#Ot=void 0;#Rt=void 0;#Dt=void 0;#jt=void 0;#xe=0;#Nt=void 0;#Ft=[];#qt;#Ut;#$t;constructor(){super(),this.#$t=new Promise(((e,t)=>{this.#Ut=e,this.#qt=t}))}connectedCallback(){let e=!1;0===this.#xe&&(e=this.#Wt()),this.#Ht(),e&&this.#Ut()}#Wt(){if(void 0===this.#Ot){this.#Bt=this.dataset.filename||"unknown.bin",delete this.dataset.filename,this.#Rt=parseInt(this.dataset.fileSize||"0"),delete this.dataset.fileSize,this.#jt=this.dataset.mimeType||"application/octet-stream",delete this.dataset.mimeType;const e=parseInt(this.getAttribute("file-id")||"0");if(!e)return this.#xe=1,!1;this.#Ot=e}if(this.dataset.thumbnails){const e=JSON.parse(this.dataset.thumbnails);for(const t of e)this.#Ft.push(new i(t.identifier,t.link));delete this.dataset.thumbnails}return this.dataset.metaData&&(this.#Ke=JSON.parse(this.dataset.metaData),delete this.dataset.metaData),this.#Dt=this.dataset.link,delete this.dataset.link,this.#xe=3,!0}#Ht(){switch(this.#xe){case 1:case 2:this.#zt("spinner");break;case 3:if(this.previewUrl)this.#Qt(this.previewUrl);else{const e=this.iconName||"file";this.#zt(e)}break;case 4:this.#zt("triangle-exclamation");break;default:throw new Error("Unreachable",{cause:{state:this.#xe}})}}#Qt(e){let t=this.querySelector("img");null===t&&(this.innerHTML="",t=document.createElement("img"),t.alt="",this.append(t)),t.src=e,this.unbounded?(t.removeAttribute("height"),t.removeAttribute("width")):(t.height=64,t.width=64)}#zt(e){let t=this.querySelector("fa-icon");return null===t?(this.innerHTML="",t=document.createElement("fa-icon"),t.size=64,t.setIcon(e),this.append(t)):t.setIcon(e),t}get fileId(){return this.#Ot}get iconName(){if(void 0===this.mimeType)return;const e=(0,n.getExtensionByMimeType)(this.mimeType);if(""===e)return;const t=(0,n.getIconNameByFilename)(e);return""!==t?`file-${t}`:void 0}get previewUrl(){return this.dataset.previewUrl}set previewUrl(e){this.dataset.previewUrl=e,this.#Ht()}get unbounded(){return"unbounded"===this.getAttribute("dimensions")}set unbounded(e){e?this.setAttribute("dimensions","unbounded"):this.removeAttribute("dimensions"),this.#Ht()}get filename(){return this.#Bt}get fileSize(){return this.#Rt}get mimeType(){return this.#jt}get data(){return this.#Ke}get link(){return this.#Dt}isImage(){if(void 0===this.mimeType)return!1;switch(this.mimeType){case"image/gif":case"image/jpeg":case"image/png":case"image/webp":return!0;default:return!1}}uploadFailed(e){1===this.#xe&&(this.#xe=4,this.#Nt=e,this.#Ht(),this.#qt())}uploadCompleted(e,t,n,i,o){1===this.#xe&&(this.#Ke=i,this.#Ot=e,this.#Dt=n,this.#jt=t,this.setAttribute("file-id",e.toString()),o?(this.#xe=2,this.#Ht()):(this.#xe=3,this.#Ht(),this.#Ut()))}setThumbnails(e){if(2===this.#xe){for(const t of e)this.#Ft.push(new i(t.identifier,t.link));this.#xe=3,this.#Ht(),this.#Ut()}}updateFileData(e,t,n){this.#Bt=e,this.#Rt=t,this.#jt=n,this.dispatchEvent(new CustomEvent("file:update-data"))}isFailedUpload(){return 4===this.#xe}set thumbnail(e){this.#Ft.includes(e)&&this.#Qt(e.link)}get thumbnails(){return[...this.#Ft]}get ready(){return this.#$t}get apiError(){return this.#Nt}}t.WoltlabCoreFileElement=o,t.default=o,window.customElements.define("woltlab-core-file",o)})),define("WoltLabSuite/Core/Component/File/Helper",["require","exports","WoltLabSuite/Core/Language","WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Component/File/woltlab-core-file"],(function(e,t,n,i){"use strict";function o(e){if(void 0===e.apiError)throw new Error("There is no recorded API error for this file.",{cause:{file:e}});let t;const i=e.apiError.getValidationError();if(void 0!==i)switch(i.param){case"preflight":t=(0,n.getPhrase)(`wcf.upload.error.${i.code}`);break;case"validation":t=(0,n.getPhrase)(`wcf.upload.validation.error.${i.code}`);break;default:t="Unrecognized error type: "+JSON.stringify(i)}else t=`Unexpected server error: [${e.apiError.type}] ${e.apiError.message}`;return t}
1Object.defineProperty(t,"__esModule",{value:!0}),t.trackUploadProgress=function(e,t){const n=document.createElement("progress");n.classList.add("fileList__item__progress__bar"),n.max=100;const i=document.createElement("span");i.classList.add("fileList__item__progress__readout"),t.addEventListener("uploadProgress",(t=>{if(n.value=t.detail,i.textContent=`${t.detail}%`,null===n.parentNode){e.classList.add("fileProcessor__item--uploading");const t=document.createElement("div");t.classList.add("fileList__item__progress"),t.append(n,i),e.append(t)}}))},t.removeUploadProgress=function(e){e.classList.contains("fileProcessor__item--uploading")&&(e.classList.remove("fileProcessor__item--uploading"),e.querySelector(".fileList__item__progress")?.remove())},t.getErrorMessageFromFile=o,t.fileInitializationFailed=function(e,t,n){if(n instanceof Error)throw n;!function(e,t){e.classList.add("fileList__item--error");const n=document.createElement("div");n.classList.add("fileList__item__errorMessage"),n.textContent=t,e.append(n)}(e,o(t))},t.insertFileInformation=function(e,t){const o=document.createElement("div");o.classList.add("fileList__item__file"),o.append(t);const r=document.createElement("div");r.classList.add("fileList__item__filename"),r.textContent=t.filename||t.dataset.filename;const a=document.createElement("fa-icon");a.setIcon("circle-check");const s=document.createElement("div");s.classList.add("fileList__item__indicator","green","jsTooltip"),s.setAttribute("aria-hidden","true"),s.title=(0,n.getPhrase)("wcf.attachment.inserted"),s.append(a);const l=document.createElement("div");l.classList.add("fileList__item__fileSize"),l.textContent=(0,i.formatFilesize)(t.fileSize||parseInt(t.dataset.fileSize)),e.append(o,r,s,l)},t.updateFileInformation=function(e,t){e.querySelector(".fileList__item__filename").textContent=t.filename||t.dataset.filename,e.querySelector(".fileList__item__fileSize").textContent=(0,i.formatFilesize)(t.fileSize||parseInt(t.dataset.fileSize))}})),define("WoltLabSuite/Core/Component/Attachment/Entry",["require","exports","tslib","WoltLabSuite/Core/Ui/Dropdown/Simple","WoltLabSuite/Core/Dom/Change/Listener","../Ckeditor/Event","WoltLabSuite/Core/Api/Files/DeleteFile","WoltLabSuite/Core/Language","WoltLabSuite/Core/Component/File/Helper","../Confirmation"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";function d(e,t,n){const i=document.createElement("button");return i.type="button",i.textContent=(0,s.getPhrase)("wcf.attachment.insert"),i.addEventListener("click",(()=>{(0,r.dispatchToCkeditor)(n).insertAttachment({attachmentId:e,url:t})})),i}Object.defineProperty(t,"__esModule",{value:!0}),t.createAttachmentFromFile=function(e,t){const n=document.createElement("li");return n.classList.add("fileList__item","attachment__item"),(0,l.insertFileInformation)(n,e),e.addEventListener("file:update-data",(()=>{(0,l.updateFileInformation)(n,e)})),e.ready.then((()=>{!function(e,t,n){const l=t.data;if(void 0===l)throw new Error("No meta data was returned from the server.",{cause:{file:t}});const u=t.fileId;if(void 0===u)throw new Error("The file id is not set.",{cause:{file:t}});const h=[];let p;if(t.isImage()){const i=t.thumbnails.find((e=>"tiny"===e.identifier));void 0!==i?t.thumbnail=i:t.link&&(t.previewUrl=t.link);const r=t.thumbnails.find((e=>""===e.identifier))?.link;if(void 0!==r){p=d(l.attachmentID,r,n);const e=d(l.attachmentID,t.link,n);e.textContent=(0,s.getPhrase)("wcf.attachment.insertFull"),h.push(e)}else p=d(l.attachmentID,t.link?t.link:"",n);if(void 0!==t.link&&void 0!==t.filename){const n=document.createElement("a");n.href=t.link,n.dataset.fancybox="attachments"+(l.messageObjectID?`-${l.messageObjectID}`:""),n.dataset.type="image",n.title=t.filename,n.dataset.caption=t.filename,n.textContent=t.filename;const i=e.querySelector(".fileList__item__filename");i.innerHTML="",i.append(n),o.default.trigger()}}else if(p=d(l.attachmentID,t.isImage()&&t.link?t.link:"",n),void 0!==t.link&&void 0!==t.filename){const n=document.createElement("a");n.target="_blank",n.href=t.link,n.textContent=t.filename;const i=e.querySelector(".fileList__item__filename");i.innerHTML="",i.append(n)}const f=document.createElement("ul");f.classList.add("dropdownMenu");for(const e of h){const t=document.createElement("li");t.append(e),f.append(t)}if(0!==f.childElementCount){const e=document.createElement("li");e.classList.add("dropdownDivider"),f.append(e)}
1const m=document.createElement("li");m.append(function(e,t,n,i,o){const l=document.createElement("button");return l.type="button",l.textContent=(0,s.getPhrase)("wcf.global.button.delete"),l.addEventListener("click",(async()=>{await(0,c.confirmationFactory)().delete(o)&&((await(0,a.deleteFile)(e)).unwrap(),(0,r.dispatchToCkeditor)(n).removeAttachment({attachmentId:t}),i.remove())})),l}(u,l.attachmentID,n,e,t.filename)),f.append(m);const g=document.createElement("button");g.classList.add("button","small"),g.type="button",g.setAttribute("aria-label",(0,s.getPhrase)("wcf.global.button.more")),g.innerHTML='<fa-icon name="ellipsis"></fa-icon>';const b=document.createElement("div");b.classList.add("fileList__item__buttons"),p.classList.add("button","small"),b.append(p,g),e.append(b),(0,i.initFragment)(g,f),g.addEventListener("click",(e=>{e.stopPropagation(),(0,i.toggleDropdown)(g.id)}))}(n,e,t)})).catch((t=>{(0,l.fileInitializationFailed)(n,e,t)})).finally((()=>{(0,l.removeUploadProgress)(n)})),(0,l.trackUploadProgress)(n,e),n},o=n.__importDefault(o)})),define("WoltLabSuite/Core/Component/Message/MessageTabMenu",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Dom/Util","../Ckeditor/Event"],(function(e,t,n,i,o,r){"use strict";function a(){c||(c=!0,(0,i.wheneverFirstSeen)(".messageTabMenu",(e=>function(e){const t=e.querySelectorAll(":scope > nav [data-name]"),n=e.querySelectorAll(":scope > .messageTabMenuContent");if(!t.length)return void console.debug(`No tabs found in message tab menu ('${e.dataset.wysiwygContainerId}').`);if(t.length!=n.length)return void console.debug(`Amount of tabs does not equal amount of tab containers ('${e.dataset.wysiwygContainerId}').`);let i="";e.dataset.preselect&&(i="true"===e.dataset.preselect?t[0].dataset.name:e.dataset.preselect);const o=new s(Array.from(t),Array.from(n),i,e.dataset.wysiwygContainerId??"","false"!==e.dataset.collapsible);e.dataset.wysiwygContainerId&&l.set(e.dataset.wysiwygContainerId,o)}(e))))}Object.defineProperty(t,"__esModule",{value:!0}),t.getTabMenu=function(e){return a(),l.get(e)},t.setup=a,o=n.__importStar(o);class s{#Vt;#Gt;#Xt="";#Yt="";#Jt;constructor(e,t,n,i,o=!0){this.#Vt=e,this.#Gt=t,this.#Yt=i,this.#Jt=o,this.#Kt(),n?this.setActiveTab(n):this.#Zt()}setActiveTab(e){if(this.#Xt===e)return void(this.#Jt&&(this.#Xt="",this.#Zt()));this.#Zt();const t=this.#Vt.find((t=>t.dataset.name===e));if(!t)return void console.debug(`Unknown tab '${e}'.`);const n=this.#Vt.indexOf(t);t.classList.add("active"),t.querySelector("button").setAttribute("aria-expanded","true"),this.#Gt[n].hidden=!1,this.#Gt[n].classList.add("active"),this.#Xt=e}showTab(e){const t=this.#Vt.find((t=>t.dataset.name===e));void 0!==t&&(t.hidden=!1)}hideTab(e){const t=this.#Vt.find((t=>t.dataset.name===e));void 0!==t&&(t.hidden=!0,t.classList.contains("active")&&this.#Zt())}isHiddenTab(e){const t=this.#Vt.find((t=>t.dataset.name===e));return void 0===t||!1!==t.hidden}setTabCounter(e,t){const n=this.#Vt.find((t=>t.dataset.name===e));if(void 0===n)throw new Error(`Unknown tab '${e}'.`);let i=n.querySelector(".badgeUpdate");0!==t?(null===i&&(i=document.createElement("span"),i.classList.add("badge","badgeUpdate"),n.querySelector("a, button").append(i)),i.textContent=t.toString()):i?.remove()}#Kt(){for(let e=0;e<this.#Vt.length;e++){const t=this.#Vt[e],n=this.#Gt[e],i=t.querySelector("a");if(i){const e=document.createElement("button");e.type="button",o.replaceElement(i,e)}const r=t.querySelector("button");r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.setAttribute("aria-controls",n.id),r.addEventListener("click",(()=>{this.setActiveTab(t.dataset.name)}))}this.#Yt&&(0,r.listenToCkeditor)(document.getElementById(this.#Yt)).reset((()=>{this.#Zt()}))}#Zt(){for(let e=0;e<this.#Vt.length;e++){const t=this.#Vt[e];t.classList.remove("active"),t.querySelector("button").setAttribute("aria-expanded","false"),this.#Gt[e].hidden=!0,this.#Gt[e].classList.remove("active")}}get activeTabName(){return this.#Xt}}const l=new Map;let c=!1})),define("WoltLabSuite/Core/Component/Attachment/List",["require","exports","tslib","./Entry","../Ckeditor/Event","../Message/MessageTabMenu","sortablejs","WoltLabSuite/Core/Helper/Prom
1iseMutex","WoltLabSuite/Core/Api/PostObject","WoltLabSuite/Core/Core","../Ckeditor"],(function(e,t,n,i,o,r,a,s,l,c,d){"use strict";function u(e,t,n){e.append((0,i.createAttachmentFromFile)(t,n))}function h(e,t){const n=(0,d.getCkeditor)(e);if(void 0===n)throw new Error(`Could not find the CKEditor for element '${e.id}'.`);const i=new Set;n.element.querySelectorAll(".woltlabAttachment[data-attachment-id]").forEach((e=>{const t=parseInt(e.dataset.attachmentId);i.add(t)}));const o=n.element.innerText.matchAll(/\[attach=(?:'|")?(\d+)(?:'|")?(?:,[^]]+?)?\]\[\/attach\]/g);for(const e of o){const t=parseInt(e[1]);i.add(t)}for(const e of t){if(e.isFailedUpload())continue;const t=e.closest(".fileList__item");if(null===t)continue;const{attachmentID:n}=e.data;i.has(n)?t.classList.add("fileList__item--inserted"):t.classList.remove("fileList__item--inserted")}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){const t=document.getElementById(`attachments_${e}`);if(null===t)throw new Error(`The attachments container for '${e}' does not exist.`);const n=(0,r.getTabMenu)(e),i=document.getElementById(e);if(null===i)throw new Error(`The editor element for '${e}' does not exist.`);const d=t.querySelector("woltlab-core-file-upload");if(null===d)throw new Error("Expected the container to contain an upload button",{cause:{container:t}});let p=t.querySelector(".fileList");null===p&&(p=document.createElement("ol"),p.classList.add("fileList"),d.insertAdjacentElement("afterend",p)),new a.default(p,{direction:"vertical",dragClass:".fileList__item",ghostClass:"fileList__item--ghost",handle:".fileList__item__file",animation:150,fallbackOnBody:!0,onChange(e){const t=e.item.querySelector("woltlab-core-file"),n=t.thumbnails.find((e=>"tiny"===e.identifier));void 0!==n?t.thumbnail=n:t.link&&(t.previewUrl=t.link)},onEnd:(0,s.promiseMutex)((async e=>{if(e.oldIndex===e.newIndex)return;const t=Array.from(p.querySelectorAll("woltlab-core-file")).map((e=>e.data?.attachmentID)).filter((e=>void 0!==e)),n=JSON.parse(d.dataset.context);delete n.showOrder,await(0,l.postObject)(`${window.WSC_RPC_API_URL}core/attachments/show-order`,{...n,attachmentIDs:t})}))});let f=-1;d.addEventListener("uploadStart",(e=>{u(p,e.detail,i);const t=JSON.parse(d.dataset.context);t.showOrder=++f,d.dataset.context=JSON.stringify(t)})),(0,o.listenToCkeditor)(i).uploadAttachment((t=>{const n=new CustomEvent("ckeditorDrop",{detail:t});if(d.dispatchEvent(n),null===document.querySelector(`.messageTabMenu[data-wysiwyg-container-id="${e}"]`))return;const i=(0,r.getTabMenu)(e);void 0!==i&&"attachments"!==i.activeTabName&&i.setActiveTab("attachments")})).collectMetaData((e=>{let t;try{void 0!==d.dataset.context&&(t=JSON.parse(d.dataset.context))}catch(e){window.ENABLE_DEBUG_MODE&&console.warn("Unable to parse the context.",e)}void 0!==t&&(e.metaData.tmpHash=t.tmpHash)})).reset((()=>{p.querySelectorAll(".fileList__item").forEach((e=>e.remove()))}));const m=t.querySelector(".attachment__list__existingFiles");null!==m&&(m.querySelectorAll("woltlab-core-file").forEach((e=>{u(p,e,i);const t=e.data?.showOrder;"number"==typeof t&&(f=Math.max(f,t))})),m.remove());const g=p.getElementsByTagName("woltlab-core-file");new MutationObserver((()=>{let e=0;for(const t of g)t.isFailedUpload()||e++;n?.setTabCounter("attachments",e)})).observe(p,{childList:!0,subtree:!0}),(0,o.listenToCkeditor)(i).changeData((0,c.debounce)((()=>{h(i,g)}),500)).ready((()=>{h(i,g)}))},a=n.__importDefault(a)})),define("WoltLabSuite/Core/Component/Captcha/Recaptcha",["require","exports","WoltLabSuite/Core/Controller/Captcha"],(function(e,t,n){"use strict";let i;Object.defineProperty(t,"__esModule",{value:!0}),t.Recaptcha=void 0,t.Recaptcha=class{#en;#tt;#O;#tn;#nn;#in;#on;#rn;constructor(e,t,n,i){if(this.#O=t,this.#nn=e,this.#tn=i,this.#tt=document.getElementById(n),!this.#tt)throw new Error(`Container with ID ${n} does not exist`);this.#in=new Promise(((e,t)=>{this.#rn=e,this.#on=t})),this.ensureRecaptchaLoaded().then((()=>this.#A())).catch((e=>{console.error("Failed to load ReCaptcha script:",e)}))}async ensureRecaptchaLoaded(){var e,t;await(e=this.#nn,t=this.#O,void 0===i&&(i=new Promise(((n,i)=>{const o=document.createElement("script");o.src="v3"===e?`https://www.recaptcha.net/recaptcha/api.js?render=${t}`:"https://www.recaptcha.net/recaptcha/api.js?render=explicit",o.async=!0,o.defer=!0,o.onload=()=>n(),o.onerror=()=>i(new Error("Failed to load ReCaptcha script")),document.head.appendChild(o)}))),i),await new Promise((e=>{window.grecaptcha.ready(e)}))}async execute(){switch(this.#nn){case"v3":return window.grecaptcha.execute(this.#O,{action:"submit"});case"invisible":return await window.grecaptcha.execute(this.#en),this.#in;case"v2":return window.grecaptcha.getResponse(this.#en)}}#A(){if("v3"!==this.#nn&&(this.#en=window.grecaptcha.render(this.#tt,this.#an())),this.#tn)(0,n.add)(this.#tn,(()=>this.#sn()));else{const e=this.#tt.closest("form"),t=e.querySelector("input[type=submit], button[type=submit]"),n=i=>{i.preventDefault(),t.disabled=!0,this.execute().then((t=>{if(e.removeEventListener("submit",n),"v3"===this.#nn){const n=document.createElement("input");n.type="hidden",n.name="g-recaptcha-response",n.value=t,e.appendChild(n)}e.submit()}))};e.addEventListener("submit",n)}}async#sn(){return{"recaptcha-type":this.#nn,"g-recaptcha-response":await this.execute()}}#an(){switch(this.#nn){case"v3":return{sitekey:this.#O};case"v2":return{sitekey:this.#O,theme:"dark"===document.documentElement.dataset.colorScheme?"dark":"light"};case"invisible":return{sitekey:this.#O,size:"invisible",badge:"inl
1ine",callback:this.#rn,"error-callback":this.#on,theme:"dark"===document.documentElement.dataset.colorScheme?"dark":"light"}}}}})),define("WoltLabSuite/Core/Component/Category/Flexible",["require","exports","../../Core"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlexibleCategoryList=void 0,t.FlexibleCategoryList=class{#ln;#cn=new Map;#dn=new Map;constructor(e){this.#ln=document.getElementById(e),this.#ln.querySelector("li li")?(this.#un(),this.#ln.querySelectorAll("input:checked").forEach((e=>{(0,n.triggerEvent)(e,"change")}))):this.#ln.classList.add("flexibleCategoryListDisabled")}#un(){this.#ln.querySelectorAll(".jsCategory").forEach((e=>{e.addEventListener("change",(()=>{this.#hn(e)})),this.#cn.set(e,[]),e.closest("li").querySelectorAll(".jsChildCategory").forEach((t=>{this.#cn.get(e).push(t),this.#cn.set(t,[]),this.#dn.set(t,e),t.addEventListener("change",(()=>{this.#hn(t)})),t.closest("li").querySelectorAll(".jsSubChildCategory").forEach((e=>{this.#cn.get(t).push(e),this.#dn.set(e,t),e.addEventListener("change",(()=>{this.#hn(e)}))}))}))}))}#hn(e){const t=this.#dn.get(e);e.checked?t&&(t.checked=!0,this.#hn(t)):this.#cn.get(e)?.forEach((e=>{e.checked=!1,this.#hn(e)}))}}})),define("WoltLabSuite/Core/Api/Comments/CreateComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createComment=async function(e,t,o,r=""){const a=new URL(`${window.WSC_RPC_API_URL}core/comments`),s={objectTypeID:e,objectID:t,message:o,guestToken:r};let l;try{l=await(0,n.prepareRequest)(a).post(s).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(l)}})),define("WoltLabSuite/Core/Api/Messages/RenderQuote",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderQuote=async function(e,t,o){const r=new URL(window.WSC_RPC_API_URL+"core/messages/render-quote");return r.searchParams.set("objectType",e),r.searchParams.set("isFullQuote",String(o)),r.searchParams.set("objectID",t.toString()),(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(r).get().fetchAsJson()))}})),define("WoltLabSuite/Core/Component/Quote/Message",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Language","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Component/Quote/Storage","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Component/Ckeditor/Event","../Snackbar","WoltLabSuite/Core/Environment"],(function(e,t,n,i,o,r,a,s,l,c,d){"use strict";function u(e,t=!1){L.querySelector(".jsQuoteManagerQuoteAndInsert").hidden=!t,S=e}function h(){const e=window.getSelection();return e.rangeCount?p(e.getRangeAt(0).cloneContents()):""}function p(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>"BLOCKQUOTE"===e.nodeName||"SCRIPT"===e.nodeName?NodeFilter.FILTER_REJECT:!(e instanceof HTMLImageElement)||e.classList.contains("smiley")&&e.alt?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let n="";const i=[];for(;t.nextNode();){const e=t.currentNode;if(e instanceof Text){const t=e.parentElement;if(t instanceof HTMLAnchorElement&&i.includes(t))continue;n+=e.nodeValue.replace(/\n/g," ")}else{if(e instanceof HTMLAnchorElement){const t=e.textContent;if(t.indexOf("â¦")>0){const o=t.split(/\u2026/);if(2===o.length){const t=e.href;0===t.indexOf(o[0])&&t.substring(-1*o[1].length)===o[1]&&(n+=t,i.push(e))}}}switch(e.nodeName){case"BR":case"LI":case"TD":case"UL":n+="\n";break;case"P":n+="\n\n";break;case"IMG":n+=` ${e.alt} `;break;case"DIV":(e.classList.contains("codeBoxHeadline")||e.classList.contains("codeBoxLine"))&&(n+="\n")}}}return n}function f(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")}function m(e){if(e instanceof Event&&(_&&(window.clearTimeout(_),_=void 0),A=!1),""===C)return void L.classList.remove("active");const t=window.getSelection();if(1!==t.rangeCount||t.isCollapsed)return void L.classList.remove("active");const n=y.get(C);if(void 0===n)return;const o=n.messageBodySelector?n.element.querySelector(n.messageBodySelector):n;let r=t.anchorNode;for(;r&&r!==o;)r=r.parentNode;if(r!==o)return void L.classList.remove("active");const a=h().trim();if(""===a)return void L.classList.remove("active");const s=t.getRangeAt(0),l=i.default.getClosestElement(s.startContainer),c=i.default.getClosestElement(s.endContainer);if(l.closest("blockquote")||c.closest("blockquote"))return void L.classList.remove("active");if(!f(p(o)).includes(f(a)))return;L.classList.add("active");const d=L.classList.contains("touchForceInaccessible");d&&L.classList.remove("touchForceInaccessible"),E=o,b(o),L.classList.remove("active"),d&&e instanceof Event&&L.classList.add("touchForceInaccessible"),_?(window.clearTimeout(_),_=void 0):C="",window.setTimeout((()=>{const e=h().trim();""!==e&&(L.classList.add("active"),v={message:e,container:n})}),10)}function g(){L.classList.remove("active");const e=window.getSelection();e.rangeCount&&e.removeAllRanges()}function b(e){const t=function(e){if(!e)throw new Error("Nothing is selected");if(e.rangeCount<=0)throw new Error("Selection has no range");const t=e.getRangeAt(0).getBoundingClientRect(),n=window.scrollY;return{bottom:t.bottom+n,height:t.height,left:t.left,right:t.right,top:t.top+n,width:t.width}}(window.getSelection()),n=L.offsetHeight,i=L.offsetWidth;let o=(t.right-t.left)/2-i/2+t.left;const r=e.getBoundingClientRect();if(o<r.left?o=r.left:o+i>r.right&&(o=r.right-i),"ios"===(0,d.platform)()&&t.top-window.scrollY<window.innerHeight/2){const e=t.top-n-7;L.style.setProperty("inset",`${e}px auto auto ${o}px`)}else L.style.setProperty("inset",`${t.bottom+7}px auto auto ${o}px`)}let v;
1Object.defineProperty(t,"__esModule",{value:!0}),t.registerContainer=function(e,t,n,o){(0,r.wheneverFirstSeen)(e,(e=>{const r=i.default.identify(e),c=parseInt(e.dataset.objectId||"0");if(y.set(r,{element:e,messageBodySelector:t,objectType:n,objectId:c,className:o}),e.classList.contains("jsInvalidQuoteTarget"))return;e.addEventListener("mousedown",(e=>{!function(e){L.classList.remove("active");const t=e.currentTarget;C=t.classList.contains("jsInvalidQuoteTarget")?"":t.id,_&&(window.clearTimeout(_),_=void 0),A=!0}(e)})),e.classList.add("jsQuoteMessageContainer"),e.addEventListener("touchstart",(e=>{e.target instanceof Node&&(e.target===L||L.contains(e.target))||L.classList.remove("active")}));const d=e.querySelector(".jsQuoteMessage");if(null===d)return;let u=d.querySelector(".button");!u&&d.classList.contains("button")&&(u=d),null!==u&&(w.set((0,a.getKey)(n,c),u),void 0!==(0,a.getFullQuoteUuid)(n,c)&&u.classList.add("active")),d.addEventListener("click",(0,s.promiseMutex)((async e=>{e.preventDefault();const t=(0,a.getFullQuoteUuid)(n,c);if(void 0!==t)return(0,a.removeQuotes)([t]),void u?.classList.remove("active");const i=await(0,a.saveFullQuote)(n,c,o);if(u?.classList.add("active"),void 0!==S){const e=i.rawMessage||i.message;if(null===e)throw new Error("Expected either the `rawMessage` or `message` to be a string.");(0,l.dispatchToCkeditor)(S.sourceElement).insertQuote({author:i.author,content:e,isText:null===i.rawMessage,link:i.link}),(0,a.markQuoteAsUsed)(S.sourceElement.id,i.uuid)}})))}))},t.setActiveEditor=u,t.removeActiveEditor=function(e){S&&S.sourceElement===e&&u()},t.removeQuoteStatus=function(e){w.get(e)?.classList.remove("active")},i=n.__importDefault(i);const y=new Map,w=new Map;let E,S,_,C="",A=!1;const L=document.createElement("div");!function(){L.classList.add("balloonTooltip","interactive","quoteManagerCopy");const e=document.createElement("button");e.type="button",e.classList.add("jsQuoteManagerStore"),e.textContent=(0,o.getPhrase)("wcf.message.quote.quoteSelected"),e.addEventListener("click",(0,s.promiseMutex)((async()=>{void 0!==v&&(await(0,a.saveQuote)(v.container.objectType,v.container.objectId,v.message,v.container.className),g(),(0,c.showSuccessSnackbar)((0,o.getPhrase)("wcf.message.quote.quoteSelected.success")))}))),L.appendChild(e);const t=document.createElement("button");t.type="button",t.hidden=!0,t.classList.add("jsQuoteManagerQuoteAndInsert"),t.textContent=(0,o.getPhrase)("wcf.message.quote.quoteAndReply"),t.addEventListener("click",(0,s.promiseMutex)((async()=>{if(void 0===v)return;const e=await(0,a.saveQuote)(v.container.objectType,v.container.objectId,v.message,v.container.className);if(void 0!==S){const t=e.rawMessage||e.message;if(null===t)throw new Error("Expected either the `rawMessage` or `message` to be a string.");(0,l.dispatchToCkeditor)(S.sourceElement).insertQuote({author:e.author,content:t,isText:null===e.rawMessage,link:e.link}),(0,a.markQuoteAsUsed)(S.sourceElement.id,e.uuid)}g()}))),L.appendChild(t),document.body.appendChild(L),document.addEventListener("mouseup",(e=>m(e))),document.addEventListener("selectionchange",(()=>function(){if(!A){if(""===C){const e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return;const t=e.getRangeAt(0),n=i.default.closest(t.startContainer,".jsQuoteMessageContainer"),o=i.default.closest(t.endContainer,".jsQuoteMessageContainer");if(n&&n===o&&!n.classList.contains("jsInvalidQuoteTarget")){let e=t.commonAncestorContainer;e.nodeType!==Node.ELEMENT_NODE&&(e=e.parentElement);const i=e.offsetParent;if(n.contains(i)&&i.scrollTop+i.clientHeight<e.offsetTop)return;C=n.id}}_&&window.clearTimeout(_),_=window.setTimeout((()=>m()),100)}}())),document.addEventListener("touchstart",(e=>{const t=e.target;t===L||L.contains(t)||(L.classList.add("touchForceInaccessible"),document.addEventListener("touchend",(()=>{L.classList.remove("touchForceInaccessible")}),{once:!0,passive:!1}))}),{passive:!1}),window.addEventListener("resize",(()=>{L.classList.contains("active")&&(void 0===E?L.classList.remove("active"):b(E))}),{passive:!0}),window.addEventListener("scroll",(()=>{L.classList.contains("active")&&(void 0===E?L.classList.remove("active"):b(E))}),{passive:!0})}()})),define("WoltLabSuite/Core/Component/Quote/List",["require","exports","tslib","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Message/MessageTabMenu","WoltLabSuite/Core/Language","WoltLabSuite/Core/Component/Quote/Message","WoltLabSuite/Core/Component/Quote/Storage","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/StringUtil"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";function d(){return Array.from(document.querySelectorAll(".messageTabMenuContent--quotes")).map((e=>u.get(e))).filter((e=>void 0!==e))}
1Object.defineProperty(t,"__esModule",{value:!0}),t.getQuoteList=function(e){return d().find((t=>t.editorId===e))},t.refreshQuoteLists=function(){for(const e of d())e.renderQuotes()},t.setup=function(e,t){const n=document.getElementById(e);if(null===n)throw new Error(`The editor '${e}' does not exist.`);const o=document.getElementById(t??`quotes_${e}`);if(null===o)throw new Error(`The quotes container for '${e}' does not exist.`);u.has(o)||(0,i.listenToCkeditor)(n).ready((({ckeditor:t})=>{t.features.quoteBlock&&u.set(o,new h(e,n,o)),t.isVisible()&&(0,a.setActiveEditor)(t,t.features.quoteBlock),t.focusTracker.on("change:isFocused",((e,n,i)=>{i&&(0,a.setActiveEditor)(t,t.features.quoteBlock)}))})).destroy((()=>{(0,a.removeActiveEditor)(n)}))},l=n.__importDefault(l);const u=new WeakMap;class h{#tt;#kt;#pn;constructor(e,t,n){this.#pn=e,this.#kt=t,this.#tt=n,this.#kt.closest("form")?.addEventListener("submit",(()=>{this.#fn()})),this.renderQuotes()}get editorId(){return this.#pn}renderQuotes(){this.#tt.innerHTML="";let e=0;for(const[t,n]of(0,s.getQuotes)()){const o=(0,s.getMessage)(t);e+=n.size,n.forEach(((e,n)=>{const d=l.default.createFragmentFromHtml(`\n<div class="quoteBox quoteBox--tabMenu">\n <div class="quoteBoxIcon">\n <img src="${(0,c.escapeHTML)(o.avatar)}" alt="" class="userAvatarImage" height="24" width="24">\n </div>\n <div class="quoteBoxTitle">\n <a href="${(0,c.escapeHTML)(o.link)}" target="_blank">${(0,c.escapeHTML)(o.author)}</a>\n </div>\n <div class="quoteBoxButtons">\n <button type="button" class="button small jsTooltip" title="${(0,r.getPhrase)("wcf.global.button.delete")}" data-action="delete">\n <fa-icon name="times"></fa-icon>\n </button>\n <button type="button" class="button buttonPrimary small jsTooltip" title="${(0,r.getPhrase)("wcf.message.quote.insertQuote")}" data-action="insert">\n <fa-icon name="paste"></fa-icon>\n </button>\n </div>\n <div class="quoteBoxContent htmlContent">\n ${null!==e.rawMessage?e.message??"":(0,c.escapeHTML)(e.message??"")}\n </div>\n</div>\n `);d.querySelector('button[data-action="insert"]').addEventListener("click",(()=>{(0,s.markQuoteAsUsed)(this.#pn,n);const t=e.rawMessage||e.message;if(null===t)throw new Error("Expected either the `rawMessage` or `message` to be a string.");(0,i.dispatchToCkeditor)(this.#kt).insertQuote({author:o.author,content:t,isText:!e.rawMessage,link:o.link})})),d.querySelector('button[data-action="delete"]').addEventListener("click",(()=>{(0,s.removeQuote)(t,n),(0,a.removeQuoteStatus)(t)})),this.#tt.append(d)}))}const t=(0,o.getTabMenu)(this.#pn);if(void 0===t)throw new Error(`Could not find the tab menu for '${this.#pn}'.`);t.setTabCounter("quotes",e),e>0?(this.#mn(),t.showTab("quotes")):t.hideTab("quotes")}#mn(){const e=document.createElement("fa-icon");e.setIcon("times");const t=document.createElement("button");t.type="button",t.classList.add("button","small"),t.append(e," ",(0,r.getPhrase)("wcf.message.quote.deleteAllQuotes")),t.addEventListener("click",(()=>{this.#tt.querySelectorAll('button[data-action="delete"]').forEach((e=>{e.click()}))}));const n=document.createElement("fa-icon");n.setIcon("paste");const i=document.createElement("button");i.type="button",i.classList.add("button","buttonPrimary","small"),i.append(n," ",(0,r.getPhrase)("wcf.message.quote.insertAllQuotes")),i.addEventListener("click",(()=>{this.#tt.querySelectorAll('button[data-action="insert"]').forEach((e=>{e.click()}))}));const o=document.createElement("div");o.classList.add("quoteBox__bulk__actions"),o.append(t,i),this.#tt.prepend(o)}#fn(){const e=this.#kt.closest("form").querySelector(".formSubmit");(0,s.getUsedQuotes)(this.#pn).forEach((t=>{e.append(l.default.createFragmentFromHtml(`<input type="hidden" name="__removeQuoteIDs[${(0,c.escapeHTML)(this.#pn)}][]" value="${(0,c.escapeHTML)(t)}">`))}))}}})),define("WoltLabSuite/Core/Api/Messages/ResetRemovalQuotes",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetRemovalQuotes=async function(){const e=new URL(window.WSC_RPC_API_URL+"core/messages/reset-removal-quotes");return(0,i.fromInfallibleApiRequest)((()=>(0,n.prepareRequest)(e).post().fetchAsJson()))}})),define("WoltLabSuite/Core/Component/Quote/Storage",["require","exports","tslib","WoltLabSuite/Core/Core","WoltLabSuite/Core/Api/Messages/RenderQuote","WoltLabSuite/Core/Component/Quote/List","WoltLabSuite/Core/Api/Messages/ResetRemovalQuotes","WoltLabSuite/Core/Component/Quote/Message","WoltLabSuite/Core/Ajax"],(function(e,t,n,i,o,r,a,s,l){"use strict";
1function c(e,t,n){const o=d(),r=h(e,t.objectID);o.quotes.has(r)||o.quotes.set(r,new Map),o.messages.set(r,t);for(const[e,t]of o.quotes.get(r))if(null!==t.rawMessage&&t.rawMessage===n.rawMessage||t.message===n.message)return e;const a=i.getUuid();return o.quotes.get(r).set(a,n),p(o),a}function d(){return u(window.localStorage.getItem(f))}function u(e){return e?JSON.parse(e,((e,t)=>{if("quotes"===e){const e=new Map(t);for(const[t,n]of e)e.set(t,new Map(n));return e}return"messages"===e?new Map(t):t})):{quotes:new Map,messages:new Map}}function h(e,t){return`${e}:${t}`}function p(e){window.localStorage.setItem(f,JSON.stringify(e,((e,t)=>t instanceof Map?Array.from(t.entries()):t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.saveQuote=async function(e,t,n,i){let a;a=void 0!==i?(await(0,l.dboAction)("saveQuote",i).objectIds([t]).payload({message:n,renderQuote:!0}).dispatch()).renderedQuote:await(0,o.renderQuote)(e,t,!1);const s=c(e,a,{message:n,rawMessage:null});return(0,r.refreshQuoteLists)(),{...a,message:n,uuid:s}},t.saveFullQuote=async function(e,t,n){let i;i=void 0!==n?(await(0,l.dboAction)("saveFullQuote",n).objectIds([t]).dispatch()).renderedQuote:await(0,o.renderQuote)(e,t,!0);const a=c(e,i,i);return(0,r.refreshQuoteLists)(),{...i,uuid:a}},t.getQuotes=function(){return d().quotes},t.getMessage=function(e,t){const n=t?h(e,t):e;return d().messages.get(n)},t.removeQuotes=function(e){const t=d();for(const n of e)for(const e of t.quotes.values())e.delete(n);for(const[e,n]of t.quotes)0===n.size&&(t.quotes.delete(e),t.messages.delete(e));p(t),(0,r.refreshQuoteLists)(),(0,a.resetRemovalQuotes)()},t.removeQuote=function(e,t){const n=d();n.quotes.has(e)&&(n.quotes.get(e).delete(t),0===n.quotes.get(e).size&&(n.quotes.delete(e),n.messages.delete(e)),p(n),(0,r.refreshQuoteLists)())},t.markQuoteAsUsed=function(e,t){m.has(e)||m.set(e,new Set),m.get(e).add(t)},t.getUsedQuotes=function(e){return m.get(e)??new Set},t.clearQuotesForEditor=function(e){const t=d(),n=[];m.get(e)?.forEach((e=>{for(const[i,o]of t.quotes){const t=o.get(e);void 0!==t&&null!==t.rawMessage&&n.push(i),o.delete(e)}})),m.delete(e);for(const[e,n]of t.quotes)0===n.size&&(t.quotes.delete(e),t.messages.delete(e));
1p(t),(0,r.refreshQuoteLists)(),n.forEach((e=>{(0,s.removeQuoteStatus)(e)}))},t.getFullQuoteUuid=function(e,t){const n=h(e,t),i=d().quotes.get(n);if(void 0!==i)for(const[e,t]of i)if(null!==t.rawMessage&&null!==t.message)return e},t.getKey=h;const f=(i=n.__importStar(i)).getStoragePrefix()+"quotes",m=new Map;window.addEventListener("storage",(e=>{if(e.key!==f)return;(0,r.refreshQuoteLists)();const t=u(e.oldValue),n=u(e.newValue);for(const[e,i]of t.quotes)for(const[,t]of i)null===t.rawMessage||n.quotes.has(e)||(0,s.removeQuoteStatus)(e)}))})),define("WoltLabSuite/Core/Component/Comment/Add",["require","exports","tslib","../../Ui/Scroll","../../Language","../../Event/Handler","../../Dom/Util","../Ckeditor","../Ckeditor/Event","WoltLabSuite/Core/Api/Comments/CreateComment","../GuestTokenDialog","WoltLabSuite/Core/User","WoltLabSuite/Core/Component/Quote/Storage","WoltLabSuite/Core/Component/Quote/Message","../Snackbar"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f){"use strict";function m(e){(0,l.listenToCkeditor)(e).setupFeatures((({features:e})=>{e.heading=!1,e.spoiler=!1,e.table=!1}))}Object.defineProperty(t,"__esModule",{value:!0}),t.CommentAdd=void 0,t.setCommentEditorFeatures=m,i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),u=n.__importDefault(u),t.CommentAdd=class{#tt;#c;#gn;#bn;#vn;#yn;#wn;#Ze;#kt;constructor(e,t,n,i){this.#tt=e,this.#c=this.#tt.querySelector(".commentAdd__content"),this.#gn=this.#tt.querySelector(".commentAdd__editor"),this.#bn=this.#tt.querySelector(".wysiwygTextarea"),this.#vn=t,this.#yn=n,this.#wn=this.#tt.querySelector(".commentAdd__placeholder"),this.#Ze=i,this.#En()}#En(){this.#wn.addEventListener("click",(e=>{this.#c.classList.contains("commentAdd__content--collapsed")&&(e.preventDefault(),this.#c.classList.remove("commentAdd__content--collapsed"),this.#tt.classList.remove("commentAdd--collapsed"),this.#wn.hidden=!0,this.#gn.hidden=!1,this.#Sn())})),this.#tt.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#_n()})),m(this.#bn)}#Sn(){window.setTimeout((()=>{i.element(this.#tt,(()=>{this.#Cn().focus(!1)}))}),0)}#An(){this.#tt.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#Cn().getHtml();if(""===e)return this.#Ln(this.#Cn().element,(0,o.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#Cn(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#_n(){if(!this.#An())return;this.#In();let e="";if(!u.default.userId&&(e=await(0,d.getGuestToken)(),void 0===e))return void this.#xn();const t=await(0,c.createComment)(this.#vn,this.#yn,this.#Cn().getHtml(),e);if(!t.ok){const e=t.error.getValidationError();if(void 0===e)throw new Error("Unexpected validation error",{cause:t.error});return this.#Ln(this.#Cn().element,e.code),void this.#xn()}this.#Ze(t.value.commentID),(0,f.showSuccessSnackbar)((0,o.getPhrase)("wcf.global.success.add")),this.#kn(),this.#xn()}#Cn(){return void 0===this.#kt&&(this.#kt=(0,s.getCkeditor)(this.#bn)),this.#kt}#In(){if(this.#c.classList.contains("commentAdd__content--loading"))return;const e=document.createElement("div");e.className="commentAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#c.classList.add("commentAdd__content--loading"),this.#c.appendChild(e)}#Ln(e,t){a.default.innerError(e,"empty"===t?(0,o.getPhrase)("wcf.global.form.error.empty"):t)}#kn(){this.#Cn().reset(),(0,h.clearQuotesForEditor)(this.#Cn().sourceElement.id),(0,p.setActiveEditor)(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#c.classList.add("commentAdd__content--collapsed"),this.#tt.classList.add("commentAdd--collapsed"),this.#gn.hidden=!0,this.#wn.hidden=!1}#xn(){this.#c.classList.remove("commentAdd__content--loading");const e=this.#c.querySelector(".commentAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Api/Comments/Responses/CreateResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.createResponse=async function(e,t,o=""){const r=new URL(`${window.WSC_RPC_API_URL}core/comments/responses`),a={commentID:e,message:t,guestToken:o};let s;try{s=await(0,n.prepareRequest)(r).post(a).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Component/Comment/Response/Add",["require","exports","tslib","../../../Dom/Util","../../../Language","../../../Event/Handler","../../../Ui/Scroll","../../Ckeditor","WoltLabSuite/Core/User","../../GuestTokenDialog","WoltLabSuite/Core/Api/Comments/Responses/CreateResponse","WoltLabSuite/Core/Component/Quote/Storage","WoltLabSuite/Core/Component/Quote/Message","../../Snackbar","../Add"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentResponseAdd=void 0,i=n.__importDefault(i),r=n.__importStar(r),a=n.__importStar(a),l=n.__importDefault(l),t.CommentResponseAdd=class{container;#c;#bn;#Ze;#Tn=new Map;#kt;#Mn;constructor(e,t){this.container=e,this.#c=this.container.querySelector(".commentResponseAdd__content"),this.#bn=this.container.querySelector(".wysiwygTextarea"),this.#Ze=t,this.#En()}#En(){this.container.querySelector('button[data-type="save"]').addEventListener("click",(e=>{e.preventDefault(),this.#_n()})),(0,f.setCommentEditorFeatures)(this.#bn)}show(e){this.#Mn&&this.#Tn.set(this.#Mn,this.#Pn()),this.container.hidden=!1,this.#Dn(this.#Tn.get(e)||""),this.#Mn=e}#An(){this.container.querySelectorAll(".innerError").forEach((e=>e.remove()));const e=this.#Cn().getHtml();if(""===e)return this.#Ln(this.#Cn().element,(0,o.getPhrase)("wcf.global.form.error.empty")),!1;const t={api:this,editor:this.#Cn(),message:e,valid:!0};return r.fire("com.woltlab.wcf.ckeditor5","validate_text",t),t.valid}async#_n(){if(!this.#An())return;this.#In();let e="";if(!l.default.userId&&(e=await(0,c.getGuestToken)(),void 0===e))return void this.#xn();const t=await(0,d.createResponse)(this.#Mn,this.#Cn().getHtml(),e);if(!t.ok){const e=t.error.getValidationError();if(void 0===e)throw new Error("Unexpected validation error",{cause:t.error});return this.#Ln(this.#Cn().element,e.code),void this.#xn()}this.#Ze(this.#Mn,t.value.responseID),(0,p.showSuccessSnackbar)((0,o.getPhrase)("wcf.global.success.add")),this.#kn(),this.#xn()}#kn(){this.#Cn().reset(),(0,u.clearQuotesForEditor)(this.#Cn().sourceElement.id),(0,h.setActiveEditor)(),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.#Tn.delete(this.#Mn),this.container.hidden=!0}#Ln(e,t){i.default.innerError(e,"empty"===t?(0,o.getPhrase)("wcf.global.form.error.empty"):t)}#Cn(){return void 0===this.#kt&&(this.#kt=(0,s.getCkeditor)(this.#bn)),this.#kt}#Pn(){return this.#Cn().getHtml()}#Dn(e){this.#Cn().setHtml(e,!1);const t=this.#bn.parentElement.querySelector(".innerError");null!==t&&t.remove(),this.#Sn()}#Sn(){window.setTimeout((()=>{a.element(this.container,(()=>{this.#Cn().focus(!1)}))}),0)}#In(){if(this.#c.classList.contains("commentResponseAdd__content--loading"))return;const e=document.createElement("div");e.className="commentResponseAdd__loading",e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.#c.classList.add("commentResponseAdd__content--loading"),this.#c.appendChild(e)}#xn(){this.#c.classList.remove("commentResponseAdd__content--loading");const e=this.#c.querySelector(".commentResponseAdd__loading");null!==e&&e.remove()}}})),define("WoltLabSuite/Core/Ui/Reaction/Handler",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../Alignment","../CloseOverlay","../Screen","focus-trap"],(function(e,t,n,i,o,r,a,s,l,c,d){"use strict";i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l),c=n.__importStar(c);const u=Object.values(window.REACTION_TYPES);return class{activeButton=void 0;_cache=new Map;focusTrap=void 0;_containers=new Map;_options;_objects=new Map;_objectType;_popoverCurrentObjectId=0;_popover;_popoverContent;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._popover=null,this._popoverContent=null,this._options=o.extend({buttonSelector:".reactButton",containerSelector:"",isButtonGroupNavigation:!1,isSingleItem:!1,parameters:{data:{}}},t),this.initReactButtons(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/Handler-${e}`,(()=>this.initReactButtons())),l.default.add("WoltLabSuite/Core/Ui/Reaction/Handler",(()=>this._closePopover())),window.addEventListener("resize",(()=>{this._closePopover()}),{passive:!0})}initReactButtons(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const n=a.default.identify(t);if(this._containers.has(n))return;const i=~~t.dataset.objectId,o={reactButton:null,objectId:i,element:t};this._containers.set(n,o),this._initReactButton(t,o);const r=this._objects.get(i)||[];r.push(o),this._objects.set(i,r),e=!0})),e&&r.default.trigger()}_initReactButton(e,t){if(this._options.isSingleItem?t.reactButton=document.querySelector(this._options.buttonSelector):t.reactButton=e.querySelector(this._options.buttonSelector),null!==t.reactButton){if(1===u.length){const e=u[0];t.reactButton.title=e.title;const n=t.reactButton.querySelector(".invisible");null!==n&&(n.textContent=e.title)}t.reactButton.setAttribute("role","button"),u.length>1&&(t.reactButton.setAttribute("aria-haspopup","true"),t.reactButton.setAttribute("aria-expanded","fal
1se")),t.reactButton.addEventListener("click",(e=>{this._toggleReactPopover(t.objectId,t.reactButton,e)})),t.reactButton.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._toggleReactPopover(t.objectId,t.reactButton,null))}))}}_updateReactButton(e,t){this._objects.get(e).forEach((e=>{null!==e.reactButton&&(t?(e.reactButton.classList.add("active"),e.reactButton.dataset.reactionTypeId=t.toString()):(e.reactButton.dataset.reactionTypeId="0",e.reactButton.classList.remove("active")))}))}_markReactionAsActive(){let e=null;for(const t of this._objects.get(this._popoverCurrentObjectId))null!==t.reactButton&&(e=~~t.reactButton.dataset.reactionTypeId);if(null===e)throw new Error("Unable to find react button for current popover.");const t=this._getPopover();t.querySelectorAll(".reactionTypeButton.active").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-selected")}));const n=t.querySelector(".reactionPopoverContent");if(e){const i=t.querySelector(`.reactionTypeButton[data-reaction-type-id="${e}"]`);i.classList.add("active"),i.setAttribute("aria-selected","true"),0==~~i.dataset.isAssignable&&a.default.show(i),this._scrollReactionIntoView(n,i)}else c.is("screen-xs")&&(t.classList.contains("inverseOrder")?n.scrollTop=0:n.scrollTop=n.scrollHeight-n.clientHeight)}_scrollReactionIntoView(e,t){t.offsetTop<.75*e.clientHeight?e.scrollTop=0:e.scrollTop=t.offsetTop+t.clientHeight/2-e.clientHeight/2}_toggleReactPopover(e,t,n){if(null!==n&&(n.preventDefault(),n.stopPropagation()),1===u.length){const t=u[0];this._popoverCurrentObjectId=e,this._react(t.reactionTypeID)}else 0===this._popoverCurrentObjectId||this._popoverCurrentObjectId!==e?this._openReactPopover(e,t):this._closePopover()}_openReactPopover(e,t){0!==this._popoverCurrentObjectId&&this._closePopover(),this._popoverCurrentObjectId=e,s.set(this._getPopover(),t,{horizontal:this._options.isButtonGroupNavigation?"left":"center",vertical:c.is("screen-xs")?"bottom":"top"}),this._options.isButtonGroupNavigation&&t.closest("nav").style.setProperty("opacity","1","");const n=this._getPopover();"auto"===n.style.getPropertyValue("bottom")?n.classList.add("inverseOrder"):n.classList.remove("inverseOrder"),this._markReactionAsActive(),this._rebuildOverflowIndicator(),n.classList.remove("forceHide"),n.classList.add("active"),this.activeButton=t,u.length>1&&this.activeButton.setAttribute("aria-expanded","true"),this.getFocusTrap().activate()}_getPopover(){if(null==this._popover){this._popover=document.createElement("div"),this._popover.className="reactionPopover forceHide",this._popoverContent=document.createElement("div"),this._popoverContent.className="reactionPopoverContent";const e=document.createElement("ul");e.className="reactionTypeButtonList",this._getSortedReactionTypes().forEach((t=>{const n=document.createElement("li");n.tabIndex=0,n.setAttribute("role","button"),n.className="reactionTypeButton jsTooltip",n.dataset.reactionTypeId=t.reactionTypeID.toString(),n.dataset.title=t.title,n.dataset.isAssignable=t.isAssignable.toString(),n.title=t.title;const i=document.createElement("span");i.className="reactionTypeButtonTitle",i.textContent=t.title,n.innerHTML=t.renderedIcon,n.appendChild(i),n.addEventListener("click",(()=>this._react(t.reactionTypeID))),n.addEventListener("keydown",(e=>this.keydown(e))),t.isAssignable||a.default.hide(n),e.appendChild(n)})),this._popoverContent.appendChild(e),this._popoverContent.addEventListener("scroll",(()=>this._rebuildOverflowIndicator()),{passive:!0}),this._popover.appendChild(this._popoverContent),document.body.appendChild(this._popover),r.default.trigger()}return this._popover}keydown(e){if("Enter"===e.key||" "===e.key){e.preventDefault();const t=this.activeButton,n=~~e.currentTarget.dataset.reactionTypeId;this._react(n),t.focus()}}_rebuildOverflowIndicator(){const e=this._popoverContent;e.scrollTop>0?e.classList.add("overflowTop"):e.classList.remove("overflowTop"),e.scrollTop+e.clientHeight<e.scrollHeight?e.classList.add("overflowBottom"):e.classList.remove("overflowBottom")}_getSortedReactionTypes(){return u.sort(((e,t)=>e.showOrder-t.showOrder))}_closePopover(){if(0!==this._popoverCurrentObjectId){const e=this._getPopover();e.classList.remove("active"),e.querySelectorAll('.reactionTypeButton[data-is-assignable="0"]').forEach((e=>a.default.hide(e))),this._options.isButtonGroupNavigation&&this._objects.get(this._popoverCurrentObjectId).forEac
1h((e=>{e.reactButton.closest("nav").style.cssText=""})),u.length>1&&this.activeButton.setAttribute("aria-expanded","false"),this.activeButton=void 0,this._popoverCurrentObjectId=0,this.getFocusTrap().deactivate()}}_react(e){0!=~~this._popoverCurrentObjectId&&(this._options.parameters.reactionTypeID=e,this._options.parameters.data.objectID=this._popoverCurrentObjectId,this._options.parameters.data.objectType=this._objectType,i.api(this,{parameters:this._options.parameters}),this._closePopover())}_ajaxSuccess(e){const t=~~e.returnValues.objectID,n=new Map;Object.entries(e.returnValues.reactions).forEach((([e,t])=>{n.set(parseInt(e),t)}));const i=document.querySelector(`woltlab-core-reaction-summary[object-type="${this._objectType}"][object-id="${t}"]`);i?.setData(n,e.returnValues.reactionTypeID),this._updateReactButton(t,e.returnValues.reactionTypeID)}_ajaxSetup(){return{data:{actionName:"react",className:"\\wcf\\data\\reaction\\ReactionAction"}}}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,d.createFocusTrap)(this._popover,{allowOutsideClick:!0,escapeDeactivates:()=>(this._closePopover(),!1),preventScroll:!0})),this.focusTrap}}})),define("WoltLabSuite/Core/Api/Comments/Responses/RenderResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderResponse=async function(e,t=!1,o=undefined){const r=new URL(`${window.WSC_RPC_API_URL}core/comments/responses/${e}/render`);let a;r.searchParams.set("messageOnly",t.toString()),void 0!==o&&r.searchParams.set("objectTypeID",o.toString());try{a=await(0,n.prepareRequest)(r).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(a)}})),define("WoltLabSuite/Core/Api/Comments/Responses/RenderResponses",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderResponses=async function(e,t,o,r){const a=new URL(`${window.WSC_RPC_API_URL}core/comments/responses/render`);let s;a.searchParams.set("commentID",e.toString()),a.searchParams.set("lastResponseTime",t.toString()),a.searchParams.set("lastResponseID",o.toString()),a.searchParams.set("loadAllResponses",r.toString());try{s=await(0,n.prepareRequest)(a).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Component/Comment/List",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../Helper/Selector","../../Language","./Add","./Response/Add","../../Ui/Scroll","../../Ui/Reaction/Handler","WoltLabSuite/Core/Api/Comments/RenderComment","WoltLabSuite/Core/Api/Comments/RenderComments","WoltLabSuite/Core/Api/Comments/Responses/RenderResponse","WoltLabSuite/Core/Api/Comments/Responses/RenderResponses"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){const t=document.getElementById(e);t?new m(t):console.debug(`Unable to find the container identified by '${e}'`)},i=n.__importDefault(i),o=n.__importDefault(o),c=n.__importStar(c),d=n.__importDefault(d);class m{#tt;#Bn;constructor(e){this.#tt=e,this.#On(),this.#Rn(),this.#jn(),this.#Nn(),this.#Fn(),this.#qn()}#qn(){"true"===this.#tt.dataset.enableReactions&&(new d.default("
1com.woltlab.wcf.comment",{containerSelector:`#${this.#tt.id} .commentList__item`,buttonSelector:".comment__button--react"}),new d.default("com.woltlab.wcf.comment.response",{containerSelector:`#${this.#tt.id} .commentResponseList__item`,buttonSelector:".commentResponse__button--react"}))}#Fn(){window.addEventListener("hashchange",(()=>{this.#Un()})),this.#Un()}#Un(){const e=window.location.hash.match(/^#(?:[^/]+\/)?comment(\d+)(?:\/response(\d+))?/);if(e){const t=this.#tt.querySelector(`.commentList__item[data-comment-id="${e[1]}"]`);if(t)if(e[2]){const n=this.#tt.querySelector(`.commentResponseList__item[data-response-id="${e[2]}"]`);n?this.#$n(n,!0):this.#Wn(t,parseInt(e[2]))}else this.#$n(t,!0);else this.#Hn(parseInt(e[1]),e[2]?parseInt(e[2]):0)}}async#Hn(e,t){let n=this.#tt.querySelector(".commentPermalink");n&&n.remove(),n=document.createElement("div"),n.classList.add("commentList__item","commentPermalink","commentPermalink--loading"),n.innerHTML='<woltlab-core-loading-indicator size="48" hide-text></woltlab-core-loading-indicator>',this.#tt.querySelector(".commentList")?.prepend(n);const i=await(0,u.renderComment)(e,t||void 0,!1,parseInt(this.#tt.dataset.objectTypeId));if(!i.ok)return void n.remove();const{template:r,response:a}=i.unwrap();o.default.insertHtml(r,n,"before"),n.remove();const s=this.#tt.querySelector(`.commentList__item[data-comment-id="${e}"]`);if(s.classList.add("commentPermalink"),a){const e=document.createElement("div");e.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),e.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',s.querySelector(".commentResponseList").prepend(e),this.#zn(a)}else this.#$n(s,!0)}#zn(e){const t=this.#tt.querySelector(".commentResponsePermalink");o.default.insertHtml(e,t,"before");const n=t.previousElementSibling;t.classList.add("commentResponsePermalink"),t.remove(),this.#$n(n,!0)}async#Wn(e,t){let n=e.querySelector(".commentResponsePermalink");n&&n.remove(),n=document.createElement("div"),n.classList.add("commentResponseList__item","commentResponsePermalink","commentResponsePermalink--loading"),n.innerHTML='<woltlab-core-loading-indicator size="32" hide-text></woltlab-core-loading-indicator>',e.querySelector(".commentResponseList").prepend(n);const i=await(0,p.renderResponse)(t,!1,parseInt(this.#tt.dataset.objectTypeId));i.ok?this.#zn(i.value.template):n.remove()}#$n(e,t=!1){c.element(e,(()=>{t&&(e.classList.contains("comment__highlight__target")&&e.classList.remove("comment__highlight__target"),e.classList.add("comment__highlight__target"))}))}#Nn(){"true"===this.#tt.dataset.canAdd&&(new s.CommentAdd(this.#tt.querySelector(".commentAdd"),parseInt(this.#tt.dataset.objectTypeId),parseInt(this.#tt.dataset.objectId),(e=>{this.#Qn(e)})),this.#Bn=new l.CommentResponseAdd(this.#tt.querySelector(".commentResponseAdd"),((e,t)=>{this.#Vn(e,t)})))}#On(){(0,r.wheneverFirstSeen)("woltlab-core-comment",(e=>{this.#tt.contains(e)&&(e.addEventListener("reply",(()=>{this.#Gn(e,e.commentId)})),e.addEventListener("delete",(()=>{e.parentElement?.remove()})),this.#Xn(e.parentElement))}))}#Rn(){(0,r.wheneverFirstSeen)("woltlab-core-comment-response",(e=>{this.#tt.contains(e)&&e.addEventListener("delete",(()=>{e.parentElement?.remove()}))}))}#Xn(e){const t=e.querySelectorAll(".commentResponse").length,n=parseInt(e.dataset.responses);if(t<n){const i=(0,a.getPhrase)("wcf.comment.response.more",{count:n-t});if(e.querySelector(".commentLoadNextResponses"))e.querySelector(".commentLoadNextResponses__button").textContent=i;else{const t=document.createElement("div");t.classList.add("commentResponseList__item","commentLoadNextResponses"),e.querySelector(".commentResponseList").append(t);const n=document.createElement("button");n.type="button",n.classList.add("button","small","commentLoadNextResponses__button"),n.textContent=i,t.append(n),n.addEventListener("click",(()=>{this.#Yn(e)}))}}else e.querySelector(".commentLoadNextResponses")?.remove()}async#Yn(e,t=!1){e.querySelector(".commentLoadNextResponses__button").disabled=!0;const n=(await(0,f.renderResponses)(parseInt(e.dataset.commentId),parseInt(e.dataset.lastResponseTime),parseInt(e.dataset.lastResponseId),t)).unwrap(),r=o.default.createFragmentFromHtml(n.template);r.querySelectorAll(".commentResponseList__item").forEach((t=>{e.querySelector(`.commentResponseList__item[data-response-id="${t.dataset.responseId}"]`)?.remove()})),e.querySelector(".commentResponseList").insertBefore(r,e.querySelector(".commentLoadNextResponses")),i.default.trigger(),e.dataset.lastResponseTime=n.lastResponseTime.toString(),e.dataset.lastResponseId=n.lastResponseID.toString(),this.#Xn(e)}#jn(){if(this.#Jn<this.#Kn&&!this.#tt.querySelector(".commentLoadNext")){const e=document.createElement("div");e.classList.add("commentList__item","commentLoadNext"),this.#tt.querySelector(".commentList").append(e);const t=document.createElement("button");t.type="button",t.classList.add("button","small","commentLoadNext__button"),t.textContent=(0,a.getPhrase)("wcf.comment.more"),e.append(t),t.addEventListener("click",(()=>{this.#Zn()}))}}async#Zn(){const e=this.#tt.querySelector(".commentLoadNext__button");e.disabled=!0;const t=(await(0,h.renderComments)(parseInt(this.#tt.dataset.objectTypeId),parseInt(this.#tt.dataset.objectId),parseInt(this.#tt.dataset.lastCommentTime))).unwrap(),n=o.default.createFragmentFromHtml(t.template);n.querySelectorAll(".commentList__item").forEach((e=>{this.#tt.querySelector(`.commentList__item[data-comment-id="${e.dataset.commentId}"]`)?.remove()})),this.#tt.querySelector(".commentList").insertBefore(n,this.#tt.querySelector(".commentLoadNext")),i.default.trigger(),this.#tt.dataset.lastCommentTime=t.lastCommentTime.toString(),this.#Jn<this.#Kn?e.disabled=!1:this.#tt.querySelector(".commentLoadNext").hidden=!0}#Gn(e,t){e.parentElement.append(this.#Bn.container),this.#Bn.show(t)}async#Qn(e){const t=await(0,u.renderComment)(e);if(!t.ok)return;const n=this.#tt.querySelector(".commentAdd").parentElement;o.default.insertHtml(t.value.template,n,"after"),i.default.trigger();const r=n.nextElementSibling;window.setTimeout((()=>
1{c.element(r)}),100)}async#Vn(e,t){const n=await(0,p.renderResponse)(t);if(!n.ok)return;const r=this.#tt.querySelector(`.commentList__item[data-comment-id="${e}"]`);let a=r.querySelector(".commentResponseList");if(!a){const e=document.createElement("div");e.classList.add("comment__responses"),r.append(e),a=document.createElement("div"),a.classList.add("commentResponseList"),a.dataset.responses="1",e.append(a)}o.default.insertHtml(n.value.template,a,"append"),i.default.trigger();const s=this.#tt.querySelector(`.commentResponseList__item[data-response-id="${t}"]`);window.setTimeout((()=>{c.element(s)}),100)}get#Jn(){return this.#tt.querySelectorAll(".comment").length}get#Kn(){return parseInt(this.#tt.dataset.comments)}}})),define("WoltLabSuite/Core/Api/Comments/DeleteComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteComment=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/comments/${e}`).delete().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/EnableComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableComment=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/comments/${e}/enable`).post().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/UpdateComment",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateComment=async function(e,t){try{await(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/comments/${e}`).post({message:t}).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Component/Comment/woltlab-core-comment",["require","exports","tslib","../../Dom/Util","../../Ui/Dropdown/Simple","../Confirmation","../../Ui/Scroll","../../Event/Handler","../../Language","../Ckeditor","WoltLabSuite/Core/Api/Comments/DeleteComment","WoltLabSuite/Core/Api/Comments/EnableComment","WoltLabSuite/Core/Api/Comments/EditComment","WoltLabSuite/Core/Api/Comments/UpdateComment","WoltLabSuite/Core/Api/Comments/RenderComment","../Snackbar"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentElement=void 0,i=n.__importDefault(i),o=n.__importDefault(o),a=n.__importStar(a),s=n.__importStar(s);class g extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".comment__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#ei()}));const t=this.menu.querySelector(".comment__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#ti()}));const n=this.menu.querySelector(".comment__option--edit");n?.addEventListener("click",(e=>{e.preventDefault(),this.#ni()}))}const e=this.querySelector(".comment__button--reply");e?.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("reply"))}))}async#ei(){(await(0,u.enableComment)(this.commentId)).unwrap(),this.querySelector(".comment__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".comment__option--enable").hidden=!0)}async#ti(){await(0,r.confirmationFactory)().delete()&&((await(0,d.deleteComment)(this.commentId)).unwrap(),(0,m.showDefaultSuccessSnackbar)(),this.dispatchEvent(new CustomEvent("delete")))}async#ni(){this.menu.querySelector(".comment__option--edit").hidden=!0;const{template:e}=(await(0,h.editComment)(this.commentId)).unwrap();this.#ii(e)}#ii(e){this.querySelector(".htmlContent").hidden=!0,i.default.insertHtml(e,this.#gn,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#oi()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#ri()})),s.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#pn}`,(e=>{e.cancel=!0,this.#oi()})),window.setTimeout((()=>
1{a.element(this,(()=>{(0,c.getCkeditorById)(this.#pn).focus(!1)}))}),250)}async#oi(){const e=(0,c.getCkeditorById)(this.#pn),t={data:{message:e.getHtml()}};if(!this.#ai(t))return;s.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#pn}`,t),this.#a();const n=await(0,p.updateComment)(this.commentId,e.getHtml());if(!n.ok){const e=n.error.getValidationError();if(void 0===e)throw new Error("Unexpected validation error",{cause:n.error});return i.default.innerError(document.getElementById(this.#pn),e.code),void this.#si()}const{template:o}=(await(0,f.renderComment)(this.commentId,void 0,!0)).unwrap();i.default.setInnerHtml(this.querySelector(".htmlContent"),o),this.#si(),this.#ri(),(0,m.showDefaultSuccessSnackbar)()}#a(){let e=this.querySelector(".comment__loading");e||(e=document.createElement("div"),e.classList.add("comment__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".comment__message").append(e)),this.#gn.hidden=!0,e.hidden=!1}#si(){this.#gn.hidden=!1;const e=this.querySelector(".comment__loading");e&&(e.hidden=!0)}#ai(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,c.getCkeditorById)(this.#pn);if(""===t.getHtml())return i.default.innerError(t.element,(0,l.getPhrase)("wcf.global.form.error.empty")),!1;const n={api:this,parameters:e,valid:!0};return s.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#pn}`,n),n.valid}#ri(){(0,c.getCkeditorById)(this.#pn).destroy(),this.#gn.remove(),this.menu.querySelector(".comment__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#gn(){let e=this.querySelector(".comment__editor");return e||(e=document.createElement("div"),e.classList.add("comment__editor"),this.querySelector(".comment__message").append(e)),e}get commentId(){return parseInt(this.getAttribute("comment-id"))}get menu(){let e=o.default.getDropdownMenu(`commentOptions${this.commentId}`);return void 0===e&&(e=this.querySelector(".comment__menu .dropdownMenu")||void 0),e}get#pn(){return`commentEditor${this.commentId}`}}t.WoltlabCoreCommentElement=g,window.customElements.define("woltlab-core-comment",g),t.default=g})),define("WoltLabSuite/Core/Api/Files/Chunk/Chunk",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadChunk=async function(e,t,o,r){const a=new URL(`${window.WSC_RPC_API_URL}core/files/upload/${e}/chunk/${t}`);let s;try{s=await(0,n.prepareRequest)(a).post(r).withHeader("chunk-checksum-sha256",o).disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(s)}})),define("WoltLabSuite/Core/Image/WebP",["require","exports"],(function(e,t){"use strict";function n(e){switch(e){case 1095520328:return"ALPH";case 1095649613:return"ANIM";case 1095650630:return"ANMF";case 1163413830:return"EXIF";case 1229144912:return"ICCP";case 1380533830:return"RIFF";case 1448097824:return"VP8 ";case 1448097868:return"VP8L";case 1448097880:return"VP8X";case 1464156752:return"WEBP";case 1481461792:return"XMP ";default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.parseWebPFromBuffer=function(e){const t=new DataView(e,0,e.byteLength);if(t.byteLength<20)return;if("RIFF"!==n(t.getUint32(0)))return;if("WEBP"!==n(t.getUint32(8)))return;const o=n(t.getUint32(12));if("number"==typeof o)throw new Error(`Unrecognized chunk 0x${o.toString(16)} at the first position`);const r=t.getUint32(16,!0);switch(o){case"VP8 ":case"VP8L":{const[t,n]=function(e){const t=new Blob([new Uint8Array(e)],{type:"image/webp"}),n=new Image;return n.src=window.URL.createObjectURL(t),[n.naturalWidth,n.naturalHeight]}(e);return new i(e,t,n,[[o,20,r]])}case"VP8X":return function(e,t){if(t.byteLength<=30)throw new Error("A VP8X encoded WebP must be larger than 30 bytes.");const o=1+(t.getUint8(26)<<16|t.getUint8(25)<<8|t.getUint8(24)),r=1+(t.getUint8(29)<<16|t.getUint8(28)<<8|t.getUint8(27)),a=[];let s=30;for(;s<t.byteLength;){const e=n(t.getUint32(s)),i=t.getUint32(s+4,!0);if(s+=8,a.push([e,s,i]),s+=i,i%2==1&&(s+=1),s>t.byteLength){const n="number"==typeof e?`0x${e.toString(16)}`:e;throw new Error(`Corrupted image detected, offset ${s} > ${t.byteLength} for chunk ${n}.`)}}return new i(e,o,r,a)}(e,t);default:throw new Error(`Unexpected chunk "${o}" at the first position`)}};class i{#li;#ci;#di;#ui;constructor(e,t,n,i){this.#li=e,this.#ci=i,this.#di=n,this.#ui=t}getExifData(){for(const[e,t,n]of this.#ci)if("EXIF"===e)return new Uint8Array(this.#li.slice(t,t+n));return null}get height(){return this.#di}get width(){return this.#ui}}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports","./WebP"],(function(e,t,n){"use strict";function i(e){return e===l||e===c||e===d}function o(...e){let t=0;const n=e.reduce(((e,t)=>e+t.length),0),i=new Uint8Array(n);return e.forEach((e=>{i.set(e,t),t+=e.length})),i}async function r(e){return new Promise(((t,n)=>{const i=new FileReader;i.addEventListener("error",(()=>{i.abort(),i.error?n(i.error):n()})),i.addEventListener("load",(()=>{t(new Uint8Array(i.result))})),i.readAsArrayBuffer(e)}))}async function a(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await r(e);if(255!==t[0]&&t[1]!==s.SOI)throw new Error("Not a JPEG");let n=t;for(let e=2;e<n.length&&255===n[e];){const t=2+(n[e+2]<<8|n[e+3]);if(n[e+1]===s.APP1){let r="";for(let t=e+4;0!==n[t]&&t<n.length;t++)r+=String.fromCharCode(n[t]);if(i(r)){const i=n.slice(0,e),r=n.slice(e+t);n=o(i,r)}else e+=t}else e+=t}return new Blob([n],{type:e.type})}
1Object.defineProperty(t,"__esModule",{value:!0}),t.getExifBytesFromJpeg=async function(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await r(e);let n=new Uint8Array(0);if(255!==t[0]&&t[1]!==s.SOI)throw new Error("Not a JPEG");for(let e=2;e<t.length&&255===t[e];){const r=2+(t[e+2]<<8|t[e+3]);if(t[e+1]===s.APP1){let a="";for(let n=e+4;0!==t[n]&&n<t.length;n++)a+=String.fromCharCode(t[n]);i(a)&&(n=o(n,t.slice(e,r+e)))}e+=r}return n},t.getExifBytesFromWebP=async function(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=(0,n.parseWebPFromBuffer)(await e.arrayBuffer());return void 0===t?null:t.getExifData()},t.removeExifData=a,t.setExifData=async function(e,t){e=await a(e);const n=await r(e);let i=2;255===n[2]&&n[3]===s.APP0&&(i+=2+(n[4]<<8|n[5]));const l=o(n.slice(0,i),t,n.slice(i));return new Blob([l],{type:e.type})};const s={SOI:216,APP0:224,APP1:225,APP2:226,APP3:227,APP4:228,APP5:229,APP6:230,APP7:231,APP8:232,APP9:233,APP10:234,APP11:235,APP12:236,APP13:237,APP14:238,COM:254},l="Exif",c="http://ns.adobe.com/xap/1.0/",d="http://ns.adobe.com/xmp/extension/"})),define("WoltLabSuite/Core/Image/Resizer",["require","exports","tslib","../FileUtil","./ExifUtil","pica"],(function(e,t,n,i,o,r){"use strict";i=n.__importStar(i),o=n.__importStar(o);const a=new((r=n.__importDefault(r)).default)({features:["js","wasm","ww"]}),s="image/jpeg";return class{maxWidth=800;maxHeight=600;quality=.8;fileType=s;setMaxWidth(e){return null==e&&(e=800),this.maxWidth=e,this}setMaxHeight(e){return null==e&&(e=600),this.maxHeight=e,this}setQuality(e){return null==e&&(e=.8),this.quality=e,this}setFileType(e){return null==e&&(e=s),this.fileType=e,this}
1async saveFile(e,t,n=this.fileType,r=this.quality){const s=/(.+)(\..+?)$/.exec(t);let l=await a.toBlob(e.image,n,r);return"image/webp"===n&&"image/png"===l.type&&(n="image/jpeg",l=await a.toBlob(e.image,n,r)),"image/jpeg"===n&&void 0!==e.exif&&(l=await o.setExifData(l,e.exif)),i.blobToFile(l,s[1])}async loadFile(e){let t=Promise.resolve(void 0),n=e;"image/jpeg"===e.type&&(t=o.getExifBytesFromJpeg(e),n=await o.removeExifData(n));const i=new Promise(((e,t)=>{const i=new FileReader,o=new Image;i.addEventListener("load",(()=>{o.src=i.result})),i.addEventListener("error",(()=>{i.abort(),i.error?t(i.error):t()})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),i.readAsDataURL(n)})),[r,a]=await Promise.all([t,i]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,n=this.maxHeight,i=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(n,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;i>=.8?u=3:i>=.4&&(u=2);const h={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,h)}}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("hash-wasm",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hashwasm=e.hashwasm||{})}(this,(function(e){"use strict";function t(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function n(e,t){return(15&e)+(e>>6|e>>3&8)<<4|(15&t)+(t>>6|t>>3&8)}function i(e,t,n){let i=0;for(let o=0;o<n;o++){let n=t[o]>>>4;e[i++]=n>9?n+h:n+p,n=15&t[o],e[i++]=n>9?n+h:n+p}return String.fromCharCode.apply(null,e)}function o(e){const t=function(e){let t=Math.floor(.75*e.length);const n=e.length;return"="===e[n-1]&&(t-=1,"="===e[n-2]&&(t-=1)),t}(e),n=e.length,i=new Uint8Array(t);let o=0;for(let t=0;t<n;t+=4){const n=g[e.charCodeAt(t)],r=g[e.charCodeAt(t+1)],a=g[e.charCodeAt(t+2)],s=g[e.charCodeAt(t+3)];i[o]=n<<2|r>>4,o+=1,i[o]=(15&r)<<4|a>>2,o+=1,i[o]=(3&a)<<6|63&s,o+=1}return i}function r(e,r){return t(this,void 0,void 0,(function*(){let a=null,s=null,l=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const c=()=>new DataView(a.exports.memory.buffer).getUint32(a.exports.STATE_SIZE,!0),d=v.dispatch((()=>t(this,void 0,void 0,(function*(){if(!y.has(e.name)){const t=o(e.data),n=WebAssembly.compile(t);y.set(e.name,n)}const t=yield y.get(e.name);a=yield WebAssembly.instantiate(t,{})})))),u=(e=null)=>{l=!0,a.exports.Hash_Init(e)},h=e=>{if(!l)throw new Error("update() called before init()");(e=>{let t=0;for(;t<e.length;){const n=e.subarray(t,t+b);t+=n.length,s.set(n),a.exports.Hash_Update(n.length)}})(f(e))},p=new Uint8Array(2*r),m=(e,t=null)=>{if(!l)throw new Error("digest() called before init()");return l=!1,a.exports.Hash_Final(t),"binary"===e?s.slice(0,r):i(p,s,r)},g=e=>"string"==typeof e?e.length<4096:e.byteLength<b;let w=g;switch(e.name){case"argon2":case"scrypt":w=()=>!0;break;case"blake2b":case"blake2s":w=(e,t)=>t<=512&&g(e);break;case"blake3":w=(e,t)=>0===t&&g(e);break;case"xxhash64":case"xxhash3":case"xxhash128":case"crc64":w=()=>!1}return yield(()=>t(this,void 0,void 0,(function*(){a||(yield d);const e=a.exports.Hash_GetBuffer(),t=a.exports.memory.buffer;s=new Uint8Array(t,e,b)})))(),{getMemory:()=>s,writeMemory:(e,t=0)=>{s.set(e,t)},getExports:()=>a.exports,setMemorySize:e=>{a.exports.Hash_SetMemorySize(e);const t=a.exports.Hash_GetBuffer(),n=a.exports.memory.buffer;s=new Uint8Array(n,t,e)},init:u,update:h,digest:m,save:()=>{if(!l)throw new Error("save() can only be called after init() and before digest()");const t=a.exports.Hash_GetState(),i=c(),o=a.exports.memory.buffer,r=new Uint8Array(o,t,i),s=new Uint8Array(4+i);return function(e,t){const i=t.length>>1;for(let o=0;o<i;o++){const i=o<<1;e[o]=n(t.charCodeAt(i),t.charCodeAt(i+1))}}(s,e.hash),s.set(r,4),s},load:t=>{if(!(t instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const i=a.exports.Hash_GetState(),o=c(),r=4+o,s=a.exports.memory.buffer;if(t.length!==r)throw new Error(`Bad state length (expected ${r} bytes, got ${t.length})`);if(!function(e,t){if(e.length!==2*t.length)return!1;for(let i=0;i<t.length;i++){const o=i<<1;if(t[i]!==n(e.charCodeAt(o),e.charCodeAt(o+1)))return!1}return!0}(e.hash,t.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const d=t.subarray(4);new Uint8Array(s,i,o).set(d),l=!0},calculate:(e,t=null,n=null)=>{if(!w(e,t))return u(t),h(e),m("hex",n);const o=f(e);return s.set(o),a.exports.Hash_Calculate(o.length,t,n),i(p,s,r)},hashLength:r}}))}var a,s
vendor: 12,961 bytes, line 1
1={name:"sha256",data:"AGFzbQEAAAABEQRgAAF/YAF/AGAAAGACf38AAwgHAAEBAQIAAwUEAQECAgYOAn8BQfCJBQt/AEGACAsHcAgGbWVtb3J5AgAOSGFzaF9HZXRCdWZmZXIAAAlIYXNoX0luaXQAAQtIYXNoX1VwZGF0ZQACCkhhc2hfRmluYWwABA1IYXNoX0dldFN0YXRlAAUOSGFzaF9DYWxjdWxhdGUABgpTVEFURV9TSVpFAwEKnEoHBQBBgAkLnQEAQQBCADcDwIkBQQBBHEEgIABB4AFGIgAbNgLoiQFBAEKnn+anxvST/b5/Qquzj/yRo7Pw2wAgABs3A+CJAUEAQrGWgP6fooWs6ABC/6S5iMWR2oKbfyAAGzcD2IkBQQBCl7rDg5Onlod3QvLmu+Ojp/2npX8gABs3A9CJAUEAQti9loj8oLW+NkLnzKfQ1tDrs7t/IAAbNwPIiQEL7wICAX4Gf0EAQQApA8CJASIBIACtfDcDwIkBAkACQAJAIAGnQT9xIgINAEGACSEDDAELAkBBwAAgAmsiBCAAIAQgAEkbIgNFDQAgA0EDcSEFIAJBgIkBaiEGQQAhAgJAIANBBEkNACADQfwAcSEHQQAhAgNAIAYgAmoiAyACQYAJai0AADoAACADQQFqIAJBgQlqLQAAOgAAIANBAmogAkGCCWotAAA6AAAgA0EDaiACQYMJai0AADoAACAHIAJBBGoiAkcNAAsLIAVFDQADQCAGIAJqIAJBgAlqLQAAOgAAIAJBAWohAiAFQX9qIgUNAAsLIAAgBEkNAUGAiQEQAyAAIARrIQAgBEGACWohAwsCQCAAQcAASQ0AA0AgAxADIANBwABqIQMgAEFAaiIAQT9LDQALCyAARQ0AQQAhAkEAIQUDQCACQYCJAWogAyACai0AADoAACACQQFqIQIgACAFQQFqIgVB/wFxSw0ACwsLoz4BRX9BACAAKAI8IgFBGHQgAUGA/gNxQQh0ciABQQh2QYD+A3EgAUEYdnJyIgFBGXcgAUEOd3MgAUEDdnMgACgCOCICQRh0IAJBgP4DcUEIdHIgAkEIdkGA/gNxIAJBGHZyciICaiAAKAIgIgNBGHQgA0GA/gNxQQh0ciADQQh2QYD+A3EgA0EYdnJyIgRBGXcgBEEOd3MgBEEDdnMgACgCHCIDQRh0IANBgP4DcUEIdHIgA0EIdkGA/gNxIANBGHZyciIFaiAAKAIEIgNBGHQgA0GA/gNxQQh0ciADQQh2QYD+A3EgA0EYdnJyIgZBGXcgBkEOd3MgBkEDdnMgACgCACIDQRh0IANBgP4DcUEIdHIgA0EIdkGA/gNxIANBGHZyciIHaiAAKAIkIgNBGHQgA0GA/gNxQQh0ciADQQh2QYD+A3EgA0EYdnJyIghqIAJBD3cgAkENd3MgAkEKdnNqIgNqIAAoAhgiCUEYdCAJQYD+A3FBCHRyIAlBCHZBgP4DcSAJQRh2cnIiCkEZdyAKQQ53cyAKQQN2cyAAKAIUIglBGHQgCUGA/gNxQQh0ciAJQQh2QYD+A3EgCUEYdnJyIgtqIAJqIAAoAhAiCUEYdCAJQYD+A3FBCHRyIAlBCHZBgP4DcSAJQRh2cnIiDEEZdyAMQQ53cyAMQQN2cyAAKAIMIglBGHQgCUGA/gNxQQh0ciAJQQh2QYD+A3EgCUEYdnJyIg1qIAAoAjAiCUEYdCAJQYD+A3FBCHRyIAlBCHZBgP4DcSAJQRh2cnIiDmogACgCCCIJQRh0IAlBgP4DcUEIdHIgCUEIdkGA/gNxIAlBGHZyciIPQRl3IA9BDndzIA9BA3ZzIAZqIAAoAigiCUEYdCAJQYD+A3FBCHRyIAlBCHZBgP4DcSAJQRh2cnIiEGogAUEPdyABQQ13cyABQQp2c2oiCUEPdyAJQQ13cyAJQQp2c2oiEUEPdyARQQ13cyARQQp2c2oiEkEPdyASQQ13cyASQQp2c2oiE2ogACgCNCIUQRh0IBRBgP4DcUEIdHIgFEEIdkGA/gNxIBRBGHZyciIVQRl3IBVBDndzIBVBA3ZzIA5qIBJqIAAoAiwiAEEYdCAAQYD+A3FBCHRyIABBCHZBgP4DcSAAQRh2cnIiFkEZdyAWQQ53cyAWQQN2cyAQaiARaiAIQRl3IAhBDndzIAhBA3ZzIARqIAlqIAVBGXcgBUEOd3MgBUEDdnMgCmogAWogC0EZdyALQQ53cyALQQN2cyAMaiAVaiANQRl3IA1BDndzIA1BA3ZzIA9qIBZqIANBD3cgA0ENd3MgA0EKdnNqIhRBD3cgFEENd3MgFEEKdnNqIhdBD3cgF0ENd3MgF0EKdnNqIhhBD3cgGEENd3MgGEEKdnNqIhlBD3cgGUENd3MgGUEKdnNqIhpBD3cgGkENd3MgGkEKdnNqIhtBD3cgG0ENd3MgG0EKdnNqIhxBGXcgHEEOd3MgHEEDdnMgAkEZdyACQQ53cyACQQN2cyAVaiAYaiAOQRl3IA5BDndzIA5BA3ZzIBZqIBdqIBBBGXcgEEEOd3MgEEEDdnMgCGogFGogE0EPdyATQQ13cyATQQp2c2oiHUEPdyAdQQ13cyAdQQp2c2oiHkEPdyAeQQ13cyAeQQp2c2oiH2ogE0EZdyATQQ53cyATQQN2cyAYaiADQRl3IANBDndzIANBA3ZzIAFqIBlqIB9BD3cgH0ENd3MgH0EKdnNqIiBqIBJBGXcgEkEOd3MgEkEDdnMgF2ogH2ogEUEZdyARQQ53cyARQQN2cyAUaiAeaiAJQRl3IAlBDndzIAlBA3ZzIANqIB1qIBxBD3cgHEENd3MgHEEKdnNqIiFBD3cgIUENd3MgIUEKdnNqIiJBD3cgIkENd3MgIkEKdnNqIiNBD3cgI0ENd3MgI0EKdnNqIiRqIBtBGXcgG0EOd3MgG0EDdnMgHmogI2ogGkEZdyAaQQ53cyAaQQN2cyAdaiAiaiAZQRl3IBlBDndzIBlBA3ZzIBNqICFqIBhBGXcgGEEOd3MgGEEDdnMgEmogHGogF0EZdyAXQQ53cyAXQQN2cyARaiAbaiAUQRl3IBRBDndzIBRBA3ZzIAlqIBpqICBBD3cgIEENd3MgIEEKdnNqIiVBD3cgJUENd3MgJUEKdnNqIiZBD3cgJkENd3MgJkEKdnNqIidBD3cgJ0ENd3MgJ0EKdnNqIihBD3cgKEENd3MgKEEKdnNqIilBD3cgKUENd3MgKUEKdnNqIipBD3cgKkENd3MgKkEKdnNqIitBGXcgK0EOd3MgK0EDdnMgH0EZdyAfQQ53cyAfQQN2cyAbaiAnaiAeQRl3IB5BDndzIB5BA3ZzIBpqICZqIB1BGXcgHUEOd3MgHUEDdnMgGWogJWogJEEPdyAkQQ13cyAkQQp2c2oiLEEPdyAsQQ13cyAsQQp2c2oiLUEPdyAtQQ13cyAtQQp2c2oiLmogJEEZdyAkQQ53cyAkQQN2cyAnaiAgQRl3ICBBDndzICBBA3ZzIBxqIChqIC5BD3cgLkENd3MgLkEKdnNqIi9qICNBGXcgI0EOd3MgI0EDdnMgJmogLmogIkEZdyAiQQ53cyAiQQN2cyAlaiAtaiAhQRl3ICFBDndzICFBA3ZzICBqICxqICtBD3cgK0ENd3MgK0EKdnNqIjBBD3cgMEENd3MgMEEKdnNqIjFBD3cgMUENd3MgMUEKdnNqIjJBD3cgMkENd3MgMkEKdnNqIjNqICpBGXcgKkEOd3MgKkEDdnMgLWogMmogKUEZdyApQQ53cyApQQN2cyAsaiAxaiAoQRl3IChBDndzIChBA3ZzICRqIDBqICdBGXcgJ0EOd3MgJ0EDdnMgI2ogK2ogJkEZdyAmQQ53cyAmQQN2cyAiaiAqaiAlQRl3ICVBDndzICVBA3ZzICFqIClqIC9BD3cgL0ENd3MgL0EKdnNqIjRBD3cgNEENd3MgNEEKdnNqIjVBD3cgNUENd3MgNUEKdnNqIjZBD3cgNkENd3MgNkEKdnNqIjdBD3cgN0ENd3MgN0EKdnNqIjhBD3cgOEENd3MgOEEKdnNqIjlBD3cgOUENd3MgOUEKdnNqIjogOCA0IC4gLCAhIBsgGSADIA4gBEEAKALYiQEiO0EadyA7QRV3cyA7QQd3c0EAKALkiQEiPGpBACgC4IkBIj1BACgC3IkBIj5zIDtxID1zaiAHakGY36iUBGoiB0EAKALUiQEiP2oiACAMaiA7IA1qID4gD2ogPSAGaiAAID4gO3NxID5zaiAAQRp3IABBFXdzIABBB3dzakGRid2JB2oiQEEAKALQiQEiQWoiDCAAIDtzcSA7c2ogDEEadyAMQRV3cyAMQQd3c2pBz/eDrntqIkJBACgCzIkBIkNqIg0gDCAAc3EgAHNqIA1BGncgDUEVd3MgDUEHd3NqQaW3181+aiJEQQAoAsiJASIAaiIPIA0gDHNxIAxzaiAPQRp3IA9BFXdzIA9BB3dzakHbhNvKA2oiRSBBIEMgAHNxIEMgAHFzIABBHncgAEETd3MgAEEKd3NqIAdqIgZqIgdqIAUgD2ogCiANaiALIAxqIAcgDyANc3EgDXNqIAdBGncgB0EVd3MgB0EHd3NqQfGjxM8FaiIKIAYgAHMgQ3EgBiAAcXMgBkEedyAGQRN3cyAGQQp3c2ogQGoiDGoiBCAHIA9zcSAPc2ogBEEadyAEQRV3cyAEQQd3c2pBpIX+kXlqIgsgDCAGcyAAcSAMIAZxcyAMQR53IAxBE3dzIAxBCndzaiBCaiINaiIPIAQgB3NxIAdzaiAPQRp3IA9BFXdzIA9BB3dzakHVvfHYemoiQCANIAxzIAZxIA0gDHFzIA1BHncgDUETd3MgDUEKd3NqIERqIgZqIgcgDyAEc3EgBHNqIAdBGncgB0EVd3MgB0EHd3NqQZjVnsB9aiJCIAYgDXMgDHEgBiANcXMgBkEedyAGQRN3cyAGQQp3c2ogRWoiDGoiBWogFiAHaiAQIA9qIAggBGogBSAHIA9zcSAPc2ogBUEadyAFQRV3cyAFQQd3c2pBgbaNlAFqIgggDCAGcyANcSAMIAZxcyAMQR53IAxBE3dzIAxBCndzaiAKaiINaiIPIAUgB3NxIAdzaiAPQRp3IA9BFXdzIA9BB3dzakG+i8ahAmoiDiANIAxzIAZxIA0gDHFzIA1BHncgDUETd3MgDUEKd3NqIAtqIgZqIgcgDyAFc3EgBXNqIAdBGncgB0EVd3MgB0EHd3NqQcP7sagFaiIQIAYgDXMgDHEgBiANcXMgBkEedyAGQRN3cyAGQQp3c2ogQGoiDGoiBCAHIA9zcSAPc2ogBEEadyAEQRV3cyAEQQd3c2pB9Lr5lQdqIhYgDCAGcyANcSAMIAZxcyAMQR53IAxBE3dzIAxBCndzaiBCaiINaiIFaiABIARqIAIgB2ogFSAPaiAFIAQgB3NxIAdzaiAFQRp3IAVBFXdzIAVBB3dzakH+4/qGeGoiByANIAxzIAZxIA0gDHFzIA1BHncgDUETd3MgDUEKd3NqIAhqIgFqIgYgBSAEc3EgBHNqIAZBGncgBkEVd3MgBkEHd3NqQaeN8N55aiIEIAEgDXMgDHEgASANcXMgAUEedyABQRN3cyABQQp3c2ogDmoiAmoiDCAGIAVzcSAFc2ogDEEadyAMQRV3cyAMQQd3c2pB9OLvjHxqIgUgAiABcyANcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAQaiIDaiINIAwgBnNxIAZzaiANQRp3IA1BFXdzIA1BB3dzakHB0+2kfmoiCCADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBZqIgFqIg8gF2ogESANaiAUIAxqIAkgBmogDyANIAxzcSAMc2ogD0EadyAPQRV3cyAPQQd3c2pBho/5/X5qIgYgASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAHaiICaiIJIA8gDXNxIA1zaiAJQRp3IAlBFXdzIAlBB3dzakHGu4b+AGoiDCACIAFzIANxIAIgAXFzIAJBHncgAkETd3MgAkEKd3NqIARqIgNqIhEgCSAPc3EgD3NqIBFBGncgEUEVd3MgEUEHd3NqQczDsqACaiINIAMgAnMgAXEgAyACcXMgA0EedyADQRN3cyADQQp3c2ogBWoiAWoiFCARIAlzcSAJc2ogFEEadyAUQRV3cyAUQQd3c2pB79ik7wJqIg8gASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAIaiICaiIXaiATIBRqIBggEWogEiAJaiAXIBQgEXNxIBFzaiAXQRp3IBdBFXdzIBdBB3dzakGqidLTBGoiGCACIAFzIANxIAIgAXFzIAJBHncgAkETd3MgAkEKd3NqIAZqIgNqIgkgFyAUc3EgFHNqIAlBGncgCUEVd3MgCUEHd3NqQdzTwuUFaiIUIAMgAnMgAXEgAyACcXMgA0EedyADQRN3cyADQQp3c2ogDGoiAWoiESAJIBdzcSAXc2ogEUEadyARQRV3cyARQQd3c2pB2pHmtwdqIhcgASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiANaiICaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakHSovnBeWoiGSACIAFzIANxIAIgAXFzIAJBHncgAkETd3MgAkEKd3NqIA9qIgNqIhNqIB4gEmogGiARaiAdIAlqIBMgEiARc3EgEXNqIBNBGncgE0EVd3MgE0EHd3NqQe2Mx8F6aiIaIAMgAnMgAXEgAyACcXMgA0EedyADQRN3cyADQQp3c2ogGGoiAWoiCSATIBJzcSASc2ogCUEadyAJQRV3cyAJQQd3c2pByM+MgHtqIhggASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAUaiICaiIRIAkgE3NxIBNzaiARQRp3IBFBFXdzIBFBB3dzakHH/+X6e2oiFCACIAFzIANxIAIgAXFzIAJBHncgAkETd3MgAkEKd3NqIBdqIgNqIhIgESAJc3EgCXNqIBJBGncgEkEVd3MgEkEHd3NqQfOXgLd8aiIXIAMgAnMgAXEgAyACcXMgA0EedyADQRN3cyADQQp3c2ogGWoiAWoiE2ogICASaiAcIBFqIB8gCWogEyASIBFzcSARc2ogE0EadyATQRV3cyATQQd3c2pBx6KerX1qIhkgASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAaaiICaiIJIBMgEnNxIBJzaiAJQRp3IAlBFXdzIAlBB3dzakHRxqk2aiIaIAIgAXMgA3EgAiABcXMgAkEedyACQRN3cyACQQp3c2ogGGoiA2oiESAJIBNzcSATc2ogEUEadyARQRV3cyARQQd3c2pB59KkoQFqIhggAyACcyABcSADIAJxcyADQR53IANBE3dzIANBCndzaiAUaiIBaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakGFldy9AmoiFCABIANzIAJxIAEgA3FzIAFBHncgAUETd3MgAUEKd3NqIBdqIgJqIhMgI2ogJiASaiAiIBFqICUgCWogEyASIBFzcSARc2ogE0EadyATQRV3cyATQQd3c2pBuMLs8AJqIhcgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAZaiIDaiIJIBMgEnNxIBJzaiAJQRp3IAlBFXdzIAlBB3dzakH827HpBGoiGSADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBpqIgFqIhEgCSATc3EgE3NqIBFBGncgEUEVd3MgEUEHd3NqQZOa4JkFaiIaIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogGGoiAmoiEiARIAlzcSAJc2ogEkEadyASQRV3cyASQQd3c2pB1OapqAZqIhggAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAUaiIDaiITaiAoIBJqICQgEWogJyAJaiATIBIgEXNxIBFzaiATQRp3IBNBFXdzIBNBB3dzakG7laizB2oiFCADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBdqIgFqIgkgEyASc3EgEnNqIAlBGncgCUEVd3MgCUEHd3NqQa6Si454aiIXIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogGWoiAmoiESAJIBNzcSATc2ogEUEadyARQRV3cyARQQd3c2pBhdnIk3lqIhkgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAaaiIDaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakGh0f+VemoiGiADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBhqIgFqIhNqICogEmogLSARaiApIAlqIBMgEiARc3EgEXNqIBNBGncgE0EVd3MgE0EHd3NqQcvM6cB6aiIYIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogFGoiAmoiCSATIBJzcSASc2ogCUEadyAJQRV3cyAJQQd3c2pB8JauknxqIhQgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAXaiIDaiIRIAkgE3NxIBNzaiARQRp3IBFBFXdzIBFBB3dzakGjo7G7fGoiFyADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBlqIgFqIhIgESAJc3EgCXNqIBJBGncgEkEVd3MgEkEHd3NqQZnQy4x9aiIZIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogGmoiAmoiE2ogMCASaiAvIBFqICsgCWogEyASIBFzcSARc2ogE0EadyATQRV3cyATQQd3c2pBpIzktH1qIhogAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAYaiIDaiIJIBMgEnNxIBJzaiAJQRp3IAlBFXdzIAlBB3dzakGF67igf2oiGCADIAJzIAFxIAMgAnFzIANBHncgA0ETd3MgA0EKd3NqIBRqIgFqIhEgCSATc3EgE3NqIBFBGncgEUEVd3MgEUEHd3NqQfDAqoMBaiIUIAEgA3MgAnEgASADcXMgAUEedyABQRN3cyABQQp3c2ogF2oiAmoiEiARIAlzcSAJc2ogEkEadyASQRV3cyASQQd3c2pBloKTzQFqIhcgAiABcyADcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiAZaiIDaiITIDZqIDIgEmogNSARaiAxIAlqIBMgEiARc3EgEXNqIBNBGncgE0EVd3MgE0EHd3NqQYjY3fEBaiIZIAMgAnMgAXEgAyACcXMgA0EedyADQRN3cyADQQp3c2ogGmoiAWoiCSATIBJzcSASc2ogCUEadyAJQRV3cyAJQQd3c2pBzO6hugJqIhogASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAYaiICaiIRIAkgE3NxIBNzaiARQRp3IBFBFXdzIBFBB3dzakG1+cKlA2oiGCACIAFzIANxIAIgAXFzIAJBHncgAkETd3MgAkEKd3NqIBRqIgNqIhIgESAJc3EgCXNqIBJBGncgEkEVd3MgEkEHd3NqQbOZ8MgDaiIUIAMgAnMgAXEgAyACcXMgA0EedyADQRN3cyADQQp3c2ogF2oiAWoiE2ogLEEZdyAsQQ53cyAsQQN2cyAoaiA0aiAzQQ93IDNBDXdzIDNBCnZzaiIXIBJqIDcgEWogMyAJaiATIBIgEXNxIBFzaiATQRp3IBNBFXdzIBNBB3dzakHK1OL2BGoiGyABIANzIAJxIAEgA3FzIAFBHncgAUETd3MgAUEKd3NqIBlqIgJqIgkgEyASc3EgEnNqIAlBGncgCUEVd3MgCUEHd3NqQc+U89wFaiIZIAIgAXMgA3EgAiABcXMgAkEedyACQRN3cyACQQp3c2ogGmoiA2oiESAJIBNzcSATc2ogEUEadyARQRV3cyARQQd3c2pB89+5wQZqIhogAyACcyABcSADIAJxcyADQR53IANBE3dzIANBCndzaiAYaiIBaiISIBEgCXNxIAlzaiASQRp3IBJBFXdzIBJBB3dzakHuhb6kB2oiHCABIANzIAJxIAEgA3FzIAFBHncgAUETd3MgAUEKd3NqIBRqIgJqIhNqIC5BGXcgLkEOd3MgLkEDdnMgKmogNmogLUEZdyAtQQ53cyAtQQN2cyApaiA1aiAXQQ93IBdBDXdzIBdBCnZzaiIUQQ93IBRBDXdzIBRBCnZzaiIYIBJqIDkgEWogFCAJaiATIBIgEXNxIBFzaiATQRp3IBNBFXdzIBNBB3dzakHvxpXFB2oiCSACIAFzIANxIAIgAXFzIAJBHncgAkETd3MgAkEKd3NqIBtqIgNqIhEgEyASc3EgEnNqIBFBGncgEUEVd3MgEUEHd3NqQZTwoaZ4aiIbIAMgAnMgAXEgAyACcXMgA0EedyADQRN3cyADQQp3c2ogGWoiAWoiEiARIBNzcSATc2ogEkEadyASQRV3cyASQQd3c2pBiISc5nhqIhkgASADcyACcSABIANxcyABQR53IAFBE3dzIAFBCndzaiAaaiICaiITIBIgEXNxIBFzaiATQRp3IBNBFXdzIBNBB3dzakH6//uFeWoiGiACIAFzIANxIAIgAXFzIAJBHncgAkETd3MgAkEKd3NqIBxqIgNqIhQgPGo2AuSJAUEAID8gAyACcyABcSADIAJxcyADQR53IANBE3dzIANBCndzaiAJaiIBIANzIAJxIAEgA3FzIAFBHncgAUETd3MgAUEKd3NqIBtqIgIgAXMgA3EgAiABcXMgAkEedyACQRN3cyACQQp3c2ogGWoiAyACcyABcSADIAJxcyADQR53IANBE3dzIANBCndzaiAaaiIJajYC1IkBQQAgPSAvQRl3IC9BDndzIC9BA3ZzICtqIDdqIBhBD3cgGEENd3MgGEEKdnNqIhggEWogFCATIBJzcSASc2ogFEEadyAUQRV3cyAUQQd3c2pB69nBonpqIhkgAWoiEWo2AuCJAUEAIEEgCSADcyACcSAJIANxcyAJQR53IAlBE3dzIAlBCndzaiAZaiIBajYC0IkBQQAgPiAwQRl3IDBBDndzIDBBA3ZzIC9qIBdqIDpBD3cgOkENd3MgOkEKdnNqIBJqIBEgFCATc3EgE3NqIBFBGncgEUEVd3MgEUEHd3NqQffH5vd7aiIXIAJqIhJqNgLciQFBACBDIAEgCXMgA3EgASAJcXMgAUEedyABQRN3cyABQQp3c2ogF2oiAmo2AsyJAUEAIDsgNEEZdyA0QQ53cyA0QQN2cyAwaiA4aiAYQQ93IBhBDXdzIBhBCnZzaiATaiASIBEgFHNxIBRzaiASQRp3IBJBFXdzIBJBB3dzakHy8cWzfGoiESADamo2AtiJAUEAIAAgAiABcyAJcSACIAFxcyACQR53IAJBE3dzIAJBCndzaiARamo2AsiJAQuyBgIEfwF+QQAoAsCJASIAQQJ2QQ9xIgFBAnRBgIkBaiICIAIoAgBBfyAAQQN0IgB0QX9zcUGAASAAdHM2AgACQAJAAkAgAUEOSQ0AAkAgAUEORw0AQQBBADYCvIkBC0GAiQEQA0EAIQIMAQsgAUENRg0BIAFBAWohAgsgAiEDAkBBBiACa0EHcSIARQ0AIAIgAGohAyACQQJ0QYCJAWohAQNAIAFBADYCACABQQRqIQEgAEF/aiIADQALCyACQXlqQQdJDQAgA0ECdCEBA0AgAUGYiQFqQgA3AgAgAUGQiQFqQgA3AgAgAUGIiQFqQgA3AgAgAUGAiQFqQgA3AgAgAUEgaiIBQThHDQALC0EAIQFBAEEAKQPAiQEiBKciAEEbdCAAQQt0QYCA/AdxciAAQQV2QYD+A3EgAEEDdEEYdnJyNgK8iQFBACAEQh2IpyIAQRh0IABBgP4DcUEIdHIgAEEIdkGA/gNxIABBGHZycjYCuIkBQYCJARADQQBBACgC5IkBIgBBGHQgAEGA/gNxQQh0ciAAQQh2QYD+A3EgAEEYdnJyNgLkiQFBAEEAKALgiQEiAEEYdCAAQYD+A3FBCHRyIABBCHZBgP4DcSAAQRh2cnI2AuCJAUEAQQAoAtyJASIAQRh0IABBgP4DcUEIdHIgAEEIdkGA/gNxIABBGHZycjYC3IkBQQBBACgC2IkBIgBBGHQgAEGA/gNxQQh0ciAAQQh2QYD+A3EgAEEYdnJyNgLYiQFBAEEAKALUiQEiAEEYdCAAQYD+A3FBCHRyIABBCHZBgP4DcSAAQRh2cnI2AtSJAUEAQQAoAtCJASIAQRh0IABBgP4DcUEIdHIgAEEIdkGA/gNxIABBGHZycjYC0IkBQQBBACgCzIkBIgBBGHQgAEGA/gNxQQh0ciAAQQh2QYD+A3EgAEEYdnJyNgLMiQFBAEEAKALIiQEiAEEYdCAAQYD+A3FBCHRyIABBCHZBgP4DcSAAQRh2cnI2AsiJAQJAQQAoAuiJASICRQ0AQQAhAANAIAFBgAlqIAFByIkBai0AADoAACABQQFqIQEgAiAAQQFqIgBB/wFxSw0ACwsLBgBBgIkBC6MBAEEAQgA3A8CJAUEAQRxBICABQeABRiIBGzYC6IkBQQBCp5/mp8b0k/2+f0Krs4/8kaOz8NsAIAEbNwPgiQFBAEKxloD+n6KFrOgAQv+kuYjFkdqCm38gARs3A9iJAUEAQpe6w4OTp5aHd0Ly5rvjo6f9p6V/IAEbNwPQiQFBAELYvZaI/KC1vjZC58yn0NbQ67O7fyABGzcDyIkBIAAQAhAECwsLAQBBgAgLBHAAAAA=",hash:"8c18dd94"};
vendor: 1,123 bytes, line 1
1"function"==typeof SuppressedError&&SuppressedError;class l{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then((()=>new Promise(e))),new Promise((t=>{e=t}))}dispatch(e){return t(this,void 0,void 0,(function*(){const t=yield this.lock();try{return yield Promise.resolve(e())}finally{t()}}))}}const c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,d=null!==(a=c.Buffer)&&void 0!==a?a:null,u=c.TextEncoder?new c.TextEncoder:null,h="a".charCodeAt(0)-10,p="0".charCodeAt(0),f=null!==d?e=>{if("string"==typeof e){const t=d.from(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.length)}if(d.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return u.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")},m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 6,888 bytes, line 1
1+/",g=new Uint8Array(256);for(let e=0;e<m.length;e++)g[m.charCodeAt(e)]=e;const b=16384,v=new l,y=new Map,w=new l;let E=null;e.createSHA256=function(){return r(s,32).then((e=>{e.init(256);const t={init:()=>(e.init(256),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:32};return t}))},e.sha256=function(e){if(null===E)return function(e,n,i){return t(this,void 0,void 0,(function*(){const t=yield e.lock(),i=yield r(n,32);return t(),i}))}(w,s).then((t=>(E=t,E.calculate(e,256))));try{const t=E.calculate(e,256);return Promise.resolve(t)}catch(e){return Promise.reject(e)}}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("cropperjs",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Cropper={})}(this,(function(e){"use strict";function t(e){return"string"==typeof e}function n(e){return"number"==typeof e&&!ve(e)}function i(e){return n(e)&&e>0&&e<1/0}function o(e){return void 0===e}function r(e){return"object"==typeof e&&null!==e}function a(e){if(!r(e))return!1;try{const{constructor:t}=e,{prototype:n}=t;return t&&n&&ye.call(n,"isPrototypeOf")}catch(e){return!1}}function s(e){return"function"==typeof e}function l(e){return"object"==typeof e&&null!==e&&1===e.nodeType}function c(e){return String(e).replace(we,"$1-$2").toLowerCase()}function d(e){return e.replace(Ee,(e=>e.slice(1).toUpperCase()))}function u(e,t,n,i){t.trim().split(Se).forEach((t=>{e.removeEventListener(t,n,i)}))}function h(e,t,n,i){t.trim().split(Se).forEach((t=>{e.addEventListener(t,n,i)}))}function p(e,t,n,i){h(e,t,n,Object.assign(Object.assign({},i),{once:!0}))}function f(e,t,n,i){return e.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign(Object.assign({},_e),{detail:n}),i)))}function m(e){return"function"==typeof e.composedPath&&e.composedPath().find(l)||e.target}function g(e,t){return t?Ce.then(e?t.bind(e):t):Ce}function b(e){const t=e.getRootNode();switch(t.nodeType){case 1:return t.ownerDocument;case 9:case 11:return t}return null}function v(e){const{documentElement:t}=e.ownerDocument,n=e.getBoundingClientRect();return{left:n.left+(_.pageXOffset-t.clientLeft),top:n.top+(_.pageYOffset-t.clientTop)}}function y(e){const t=parseFloat(e)||0;if(0!==t){const[n="rad"]=String(e).match(Ae)||[];switch(n.toLowerCase()){case"deg":return t/360*(2*Math.PI);case"grad":return t/400*(2*Math.PI);case"turn":return t*(2*Math.PI)}}return t}function w(e,t=Le){const{aspectRatio:n}=e;let{width:o,height:r}=e;const a=i(o),s=i(r);if(a&&s){const e=r*n;t===Le&&e>o||"cover"===t&&e<o?r=o/n:o=r*n}else a?r=o/n:s&&(o=r*n);return{width:o,height:r}}function E(e,...t){if(0===t.length)return e;const[n,i,o,r,a,s]=e,[l,c,d,u,h,p]=t[0];return E(e=[n*l+o*c,i*l+r*c,n*d+o*u,i*d+r*u,n*h+o*p+a,i*h+r*p+s],...t.slice(1))}const S="undefined"!=typeof window&&void 0!==window.document,_=S?window:{},C=!!S&&"ontouchstart"in _.document.documentElement,A=!!S&&"PointerEvent"in _,L="cropper",I=`${L}-canvas`,x=`${L}-crosshair`,k=`${L}-grid`,T=`${L}-handle`,M=`${L}-image`,P=`${L}-selection`,D=`${L}-shade`,B=`${L}-viewer`,O="select",R="move",j="scale",N="rotate",F="transform",q="none",U="n-resize",$="e-resize",W="s-resize",H="w-resize",z="ne-resize",Q="nw-resize",V="se-resize",G="sw-resize",X="action",Y=C?"touchend touchcancel":"mouseup",J=C?"touchmove":"mousemove",K=C?"touchstart":"mousedown",Z=A?"pointerdown":K,ee=A?"pointermove":J,te=A?"pointerup pointercancel":Y,ne="error",ie="keydown",oe="load",re="resize",ae="wheel",se="action",le="actionend",ce="actionmove",de="actionstart",ue="change",he="transform",pe="contain",fe="cover",me="fill",ge="none",be="scale-down",ve=Number.isNaN||_.isNaN,{hasOwnProperty:ye}=Object.prototype,we=/([a-z\d])([A-Z])/g,Ee=/-[A-z\d]/g,Se=/\s\s*/,_e={bubbles:!0,cancelable:!0,composed:!0},Ce=Promise.resolve(),Ae=/deg|g?rad|turn$/i,Le="contain",Ie=/left|top|width|height/i,xe="open",ke=new WeakMap,Te=new WeakMap,Me=new Map,Pe=Boolean(_.document&&Array.isArray(_.document.adoptedStyleSheets)&&_.CSSStyleSheet&&"replaceSync"in _.CSSStyleSheet.prototype);class De extends HTMLElement{get $sharedStyle(){return(this.themeColor?`:host{--theme-color: ${this.themeColor};}`:"")+":host([hidden]){display:none!important}"}constructor(){var e,t;super(),this.shadowRootMode=xe,this.slottable=!0;const n=null===(t=null===(e=Object.getPrototypeOf(this))||void 0===e?void 0:e.constructor)||void 0===t?void 0:t.$name;n&&Me.set(n,this.tagName.toLowerCase())}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(e,t,n){if(Object.is(n,t))return;const i=d(e);let o=n;switch(typeof this[i]){case"boolean":o=null!==n&&"false"!==n;break;case"number":o=Number(n)}switch(this[i]=o,e){case"theme-color":{const e=Te.get(this),t=this.$sharedStyle;e&&t&&(Pe?e.replaceSync(t):e.textContent=t);break}}}$propertyChangedCallback(e,t,n){if(!Object.is(n,t))switch(e=c(e),typeof n){case"boolean":!0===n?this.hasAttribute(e)||this.setAttribute(e,""):this.removeAttribute(e);break;case"number":n=ve(n)?"":String(n);default:n?this.getAttribute(e)!==n&&this.setAttribute(e,n):this.removeAttribute(e)}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach((e=>{const t=d(e);let n=this[t];o(n)||this.$propertyChangedCallback(t,void 0,n),Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n,set(e){const i=n;n=e,this.$propertyChangedCallback(t,i,e)}})}));const e=this.shadowRoot||this.attachShadow({mode:this.shadowRootMode||xe});if(ke.set(this,e),Te.set(this,this.$addStyles(this.$sharedStyle)),this.$style&&this.$addStyles(this.$style),this.$template){const t=document.createElement("template");t.innerHTML=this.$template,e.appendChild(t.content)}if(this.slottable){const t=document.createElement("slot");e.appendChild(t)}}disconnectedCallback(){Te.has(this)&&Te.delete(this),ke.has(this)&&ke.delete(this)}$getTagNameOf(e){var t;return null!==(t=Me.get(e))&&void 0!==t?t:e}$setStyles(e){return Object.keys(e).forEach((t=>{let i=e[t];n(i)&&(i=0!==i&&Ie.test(t)?`${i}px`:String(i)),this.style[t]=i})),this}$getShadowRoot(){return this.shadowRoot||ke.get(this)}$addStyles(e){let t;const n=this.$getShadowRoot();return Pe?(t=new CSSStyleSheet,t.replaceSync(e),n.adoptedStyleSheets=n.adoptedStyleSheets.concat(t)):(t=document.createElement("style"),t.textContent=e,n.appendChild(t)),t}$emit(e,t,n){return f(this,e,t,n)}$nextTick(e){return g(this,e)}static $define(e,t){r(e)&&(t=e,e=""),e||(e=this.$name||this.name),e=c(e),S&&_.customElements&&!_.customElements.get(e)&&customElements.define(e,this,t)}}De.$version="2.2.0";class Be extends De{constructor(){super(...arguments),this.$onPointerDown=null,this.$onPointerMove=null,this.$onPointerUp=null,this.$onWheel=null,this.$wheeling=!1,this.$pointers=new Map,this.$style=':host{display:block;min-height:100px;
1min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}',this.$action=q,this.background=!1,this.disabled=!1,this.scaleStep=.1,this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback(),this.disabled||this.$bind()}disconnectedCallback(){this.$unbind(),super.disconnectedCallback()}$propertyChangedCallback(e,t,n){Object.is(n,t)||(super.$propertyChangedCallback(e,t,n),"disabled"!==e)||(n?this.$unbind():this.$bind())}$bind(){this.$onPointerDown||(this.$onPointerDown=this.$handlePointerDown.bind(this),h(this,Z,this.$onPointerDown)),this.$onPointerMove||(this.$onPointerMove=this.$handlePointerMove.bind(this),h(this.ownerDocument,ee,this.$onPointerMove)),this.$onPointerUp||(this.$onPointerUp=this.$handlePointerUp.bind(this),h(this.ownerDocument,te,this.$onPointerUp)),this.$onWheel||(this.$onWheel=this.$handleWheel.bind(this),h(this,ae,this.$onWheel,{passive:!1,capture:!0}))}$unbind(){this.$onPointerDown&&(u(this,Z,this.$onPointerDown),this.$onPointerDown=null),this.$onPointerMove&&(u(this.ownerDocument,ee,this.$onPointerMove),this.$onPointerMove=null),this.$onPointerUp&&(u(this.ownerDocument,te,this.$onPointerUp),this.$onPointerUp=null),this.$onWheel&&(u(this,ae,this.$onWheel,{capture:!0}),this.$onWheel=null),this.$pointers.clear(),this.style.willChange="",this.$action=q}$addPointers(e){const{$pointers:t}=this;if(e.changedTouches)Array.from(e.changedTouches).forEach((({identifier:e,pageX:n,pageY:i})=>{t.set(e,{startX:n,startY:i,endX:n,endY:i})}));else{const{pointerId:n=0,pageX:i,pageY:o}=e;t.set(n,{startX:i,startY:o,endX:i,endY:o})}}$removePointers(e){const{$pointers:t}=this;if(e.changedTouches)Array.from(e.changedTouches).forEach((({identifier:e})=>{t.delete(e)}));else{const{pointerId:n=0}=e;t.delete(n)}0===t.size&&(this.style.willChange="",this.$action=q)}$handlePointerDown(e){const{buttons:t,button:i,type:o}=e;if(this.disabled||("pointerdown"===o&&"mouse"===e.pointerType||"mousedown"===o)&&(n(t)&&1!==t||n(i)&&0!==i||e.ctrlKey))return;this.$addPointers(e);const{$pointers:r}=this;let a=q;r.size>1?a=F:l(e.target)&&(a=e.target.action||e.target.getAttribute(X)||q),!1!==this.$emit(de,{action:a,relatedEvent:e})?(e.preventDefault(),this.$action=a,this.style.willChange="transform"):this.$removePointers(e)}$handlePointerMove(e){const{$action:t,$pointers:n}=this;if(this.disabled||t===q||0===n.size)return;if(!1===this.$emit(ce,{action:t,relatedEvent:e}))return;if(e.preventDefault(),e.changedTouches)Array.from(e.changedTouches).forEach((({identifier:e,pageX:t,pageY:i})=>{const o=n.get(e);o&&Object.assign(o,{endX:t,endY:i})}));else{const{pointerId:t=0,pageX:i,pageY:o}=e,r=n.get(t);r&&Object.assign(r,{endX:i,endY:o})}const i={action:t,relatedEvent:e};if(t===F){const t=new Map(n);let o=0,r=0,a=0,s=0,l=e.pageX,c=e.pageY;n.forEach(((e,n)=>{t.delete(n),t.forEach((t=>{let n=t.startX-e.startX,i=t.startY-e.startY,d=t.endX-e.endX,u=t.endY-e.endY,h=0,p=0,f=0,m=0;if(0===n?i<0?f=2*Math.PI:i>0&&(f=Math.PI):n>0?f=Math.PI/2+Math.atan(i/n):n<0&&(f=1.5*Math.PI+Math.atan(i/n)),0===d?u<0?m=2*Math.PI:u>0&&(m=Math.PI):d>0?m=Math.PI/2+Math.atan(u/d):d<0&&(m=1.5*Math.PI+Math.atan(u/d)),m>0||f>0){const n=m-f,i=Math.abs(n);i>o&&(o=i,a=n,l=(e.startX+t.startX)/2,c=(e.startY+t.startY)/2)}if(n=Math.abs(n),i=Math.abs(i),d=Math.abs(d),u=Math.abs(u),n>0&&i>0?h=Math.sqrt(n*n+i*i):n>0?h=n:i>0&&(h=i),d>0&&u>0?p=Math.sqrt(d*d+u*u):d>0?p=d:u>0&&(p=u),h>0&&p>0){const n=(p-h)/h,i=Math.abs(n);i>r&&(r=i,s=n,l=(e.startX+t.startX)/2,c=(e.startY+t.startY)/2)}}))}));const d=o>0,u=r>0;d&&u?(i.rotate=a,i.scale=s,i.centerX=l,i.centerY=c):d?(i.action=N,i.rotate=a,i.centerX=l,i.centerY=c):u?(i.action=j,i.scale=s,i.centerX=l,i.centerY=c):i.action=q}else{const[e]=Array.from(n.values());Object.assign(i,e)}n.forEach((e=>{e.startX=e.endX,e.startY=e.endY})),i.action!==q&&this.$emit(se,i)}$handlePointerUp(e){const{$action:t}=this;this.disabled?this.$removePointers(e):t!==q&&!1!==this.$emit(le,{action:t,relatedEvent:e})?(e.preventDefault(),this.$removePointers(e)):this.$removePointers(e)}$handleWheel(e){if(this.disabled)return;if(e.preventDefault(),this.$wheeling)return;this.$wheeling=!0,setTimeout((()=>{this.$wheeling=!1}),50);const t=(e.deltaY>0?-1:1)*this.scaleStep;this.$emit(se,{action:j,scale:t,relatedEvent:e})}$setAction(e){return t(e)&&(this.$action=e),this}$toCanvas(e){return new Promise(((t,n)=>{if(!this.isConnected)return void n(new Error("The current element is not connected to the DOM."));const o=document.createElement("canvas");let r=this.offsetWidth,l=this.offsetHeight,c=1;a(e)&&(i(e.width)||i(e.height))&&(({width:r,height:l}=w({aspectRatio:r/l,width:e.width,height:e.height})),c=r/this.offsetWidth),o.width=r,o.height=l;const d=this.querySelector(this.$getTagNameOf(M));d?d.$ready().then((n=>{const i=o.getContext("2d");if(i){const[t,u,h,p,f,m]=d.$getTransform();
vendor: 12,602 bytes, line 1
1let g=f,b=m,v=n.naturalWidth,y=n.naturalHeight;1!==c&&(g*=c,b*=c,v*=c,y*=c);const w=v/2,E=y/2;i.fillStyle="transparent",i.fillRect(0,0,r,l),a(e)&&s(e.beforeDraw)&&e.beforeDraw.call(this,i,o),i.save(),i.translate(w,E),i.transform(t,u,h,p,g,b),i.translate(-w,-E),i.drawImage(n,0,0,v,y),i.restore()}t(o)})).catch(n):t(o)}))}}Be.$name=I,Be.$version="2.2.0";const Oe=new WeakMap,Re=["alt","crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","src","srcset"];class je extends De{constructor(){super(...arguments),this.$isReady=!1,this.$matrix=[1,0,0,1,0,0],this.$onLoad=null,this.$onCanvasAction=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$actionStartTarget=null,this.$style=":host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}",this.$image=new Image,this.initialCenterSize="",this.initialFit=pe,this.maxFit="",this.minFit="",this.rotatable=!1,this.scalable=!1,this.skewable=!1,this.slottable=!1,this.translatable=!1,this.alt="",this.crossorigin="",this.decoding="",this.elementtiming="",this.fetchpriority="",this.loading="",this.referrerpolicy="",this.sizes="",this.src="",this.srcset=""}set $canvas(e){Oe.set(this,e)}get $canvas(){return Oe.get(this)}static get observedAttributes(){return super.observedAttributes.concat(Re,["initial-center-size","initial-fit","max-fit","min-fit","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(e,t,n){Object.is(n,t)||(super.attributeChangedCallback(e,t,n),Re.includes(e)&&(null===n?this.$image.removeAttribute(e):this.$image.setAttribute(e,n)))}$propertyChangedCallback(e,t,n){if(!Object.is(n,t))switch(super.$propertyChangedCallback(e,t,n),e){case"initialCenterSize":case"initialFit":this.$nextTick((()=>{this.$isReady&&this.$canvas&&this.$center(n)}));break;case"maxFit":case"minFit":this.$nextTick((()=>{this.$isReady&&this.$canvas&&(this.$resetTransform(),this.$center(this.initialCenterSize||this.initialFit))}));break;case"src":this.$isReady=!1}}connectedCallback(){super.connectedCallback();const{$image:e}=this,t=this.closest(this.$getTagNameOf(I));t&&(this.$canvas=t,this.$setStyles({display:"block",position:"absolute"}),this.$onCanvasActionStart=e=>{var t,n;e.defaultPrevented||(this.$actionStartTarget=null===(n=null===(t=e.detail)||void 0===t?void 0:t.relatedEvent)||void 0===n?void 0:n.target)},this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null},this.$onCanvasAction=this.$handleAction.bind(this),h(t,de,this.$onCanvasActionStart),h(t,le,this.$onCanvasActionEnd),h(t,se,this.$onCanvasAction)),this.$onLoad=this.$handleLoad.bind(this),h(e,oe,this.$onLoad),this.$getShadowRoot().appendChild(e)}disconnectedCallback(){const{$image:e,$canvas:t}=this;t&&(this.$onCanvasActionStart&&(u(t,de,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(u(t,le,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(u(t,se,this.$onCanvasAction),this.$onCanvasAction=null)),e&&this.$onLoad&&(u(e,oe,this.$onLoad),this.$onLoad=null),this.$getShadowRoot().removeChild(e),super.disconnectedCallback()}$handleLoad(){const{$image:e}=this;this.$setStyles({width:e.naturalWidth,height:e.naturalHeight}),this.$canvas&&this.$center(this.initialCenterSize||this.initialFit),this.$isReady=!0}$handleAction(e){if(e.defaultPrevented||this.hidden||!(this.rotatable||this.scalable||this.translatable))return;const{$canvas:t}=this,{detail:n}=e;if(n){const{relatedEvent:e}=n;let{action:i}=n;switch(i!==F||this.rotatable&&this.scalable||(i=this.rotatable?N:this.scalable?j:q),i){case R:if(this.translatable){let i=null;e&&(i=e.target.closest(this.$getTagNameOf(P))),i||(i=t.querySelector(this.$getTagNameOf(P))),i&&i.multiple&&!i.active&&(i=t.querySelector(`${this.$getTagNameOf(P)}[active]`)),i&&!i.hidden&&i.movable&&!i.dynamic&&this.$actionStartTarget&&i.contains(this.$actionStartTarget)||this.$move(n.endX-n.startX,n.endY-n.startY)}break;case N:if(this.rotatable)if(e){const{x:t,y:i}=this.getBoundingClientRect();this.$rotate(n.rotate,e.clientX-t,e.clientY-i)}else this.$rotate(n.rotate);break;case j:if(this.scalable)if(e){const t=e.target.closest(this.$getTagNameOf(P));if(!t||!t.zoomable||t.zoomable&&t.dynamic){const{x:t,y:i}=this.getBoundingClientRect();this.$zoom(n.scale,e.clientX-t,e.clientY-i)}}else this.$zoom(n.scale);break;case F:if(this.rotatable&&this.scalable){const{rotate:t}=n;let{scale:i}=n;i<0?i=1/(1-i):i+=1;const o=Math.cos(t),r=Math.sin(t),[a,s,l,c]=[o*i,r*i,-r*i,o*i];if(e){const t=this.getBoundingClientRect(),n=e.clientX-t.x,i=e.clientY-t.y,[o,r,d,u]=this.$matrix,h=n-t.width/2,p=i-t.height/2,f=(h*u-d*p)/(o*u-d*r),m=(p*o-r*h)/(o*u-d*r);this.$transform(a,s,l,c,f*(1-a)+m*l,m*(1-c)+f*s)}else this.$transform(a,s,l,c,0,0)}}}}$ready(e){const{$image:t}=this,n=new Promise(((e,n)=>{const i=new Error("Failed to load the image source");if(t.complete)t.naturalWidth>0&&t.naturalHeight>0?e(t):n(i);else{const o=()=>{u(t,ne,r),setTimeout((()=>{e(t)}))},r=()=>{u(t,oe,o),n(i)};p(t,oe,o),p(t,ne,r)}}));return s(e)&&n.then((t=>(e(t),t))),n}$center(e){const{parentElement:t}=this;if(!t)return this;const n=t.getBoundingClientRect(),i=n.width,o=n.height,{x:r,y:a,width:s,height:l}=this.getBoundingClientRect(),c=r+s/2,d=a+l/2,u=n.x+i/2,h=n.y+o/2,{translatable:p}=this;p||this.$isReady||(this.translatable=!0,this.$nextTick((()=>{this.translatable=p}))),this.$move(u-c,h-d);const{maxFit:f,minFit:m}=this;if(e||f||m){const{naturalWidth:t,naturalHeight:n}=this.$image;switch(e){case fe:[me,pe,be].includes(f)||f===ge&&(t<i||n<o)?e=f:m===ge&&t>i&&n>o&&(e=m);break;case me:[pe,be].includes(f)||f===ge&&(t<i||n<o)?e=f:(m===fe||m===ge&&t>i&&n>o)&&(e=m);break;case pe:f===be||f===ge&&t<i&&n<o?e=f:([fe,me].includes(m)||m===ge&&(t>i||n>o))&&(e=m);break;case be:f===ge&&t<i&&n<o?e=f:([fe,me,pe].includes(m)||m===ge&&t>i&&n>o)&&(e=m);break;default:[fe,me,pe,be].includes(f)&&(t>i||n>o)?e=f:[fe,me,pe,be].includes(m)&&t<i&&n<o&&(e=m)}const r=i/s,a=o/l,{scalable:c}=this;switch(c||this.$isReady||(this.scalable=!0,this.$nextTick((()=>{this.scalable=c}))),e){case fe:this.$scale(Math.max(r,a));break;case pe:this.$scale(Math.min(r,a));break;case me:this.$scale(r,a);break;case be:this.$scale(Math.min(r,a,1));break;case ge:this.$scale(1)}}return this}$move(e,t=e){if(this.translatable&&n(e)&&n(t)){const[n,i,o,r]=this.$matrix,a=(e*r-o*t)/(n*r-o*i),s=(t*n-i*e)/(n*r-o*i);this.$translate(a,s)}return this}$moveTo(e,t=e){if(this.translatable&&n(e)&&n(t)){const[n,i,o,r]=this.$matrix,a=(e*r-o*t)/(n*r-o*i),s=(t*n-i*e)/(n*r-o*i);this.$setTransform(n,i,o,r,a,s)}return this}$rotate(e,t,i){if(this.rotatable){const o=y(e),r=Math.cos(o),a=Math.sin(o),[s,l,c,d]=[r,a,-a,r];if(n(t)&&n(i)){const[e,n,o,r]=this.$matrix,{width:a,height:u}=this.getBoundingClientRect(),h=t-a/2,p=i-u/2,f=(h*r-o*p)/(e*r-o*n),m=(p*e-n*h)/(e*r-o*n);this.$transform(s,l,c,d,f*(1-s)-m*c,m*(1-d)-f*l)}else this.$transform(s,l,c,d,0,0)}return this}$zoom(e,t,i){if(!this.scalable||0===e)return this;if(e<0?e=1/(1-e):e+=1,n(t)&&n(i)){const[n,o,r,a]=this.$matrix,{width:s,height:l}=this.getBoundingClientRect(),c=t-s/2,d=i-l/2,u=(c*a-r*d)/(n*a-r*o),h=(d*n-o*c)/(n*a-r*o);this.$transform(e,0,0,e,u*(1-e),h*(1-e))}else this.$scale(e);return this}$scale(e,t=e){return this.scalable&&this.$transform(e,0,0,t,0,0),this}$skew(e,t=0){if(this.skewable){const n=y(e),i=y(t);this.$transform(1,Math.tan(i),Math.tan(n),1,0,0)}return this}$translate(e,t=e){return this.translatable&&n(e)&&n(t)&&this.$transform(1,0,0,1,e,t),this}$transform(e,t,i,o,r,a){return n(e)&&n(t)&&n(i)&&n(o)&&n(r)&&n(a)?this.$setTransform(E(this.$matrix,[e,t,i,o,r,a])):this}$setTransform(e,t,i,o,r,a){if((this.rotatable||this.scalable||this.skewable||this.translatable)&&(Array.isArray(e)&&([e,t,i,o,r,a]=e),n(e)&&n(t)&&n(i)&&n(o)&&n(r)&&n(a))){const n=[...this.$matrix],s=[e,t,i,o,r,a];if(this.$isReady&&this.$canvas){const{$canvas:e}=this,t=e.getBoundingClientRect();this.style.transform=`matrix(${s.join(", ")})`;const i=this.$image.getBoundingClientRect();this.style.transform=`matrix(${n.join(", ")})`;let{maxFit:o,minFit:r}=this;if(o||r){if(i.top>t.bottom||i.right<t.left||i.bottom<t.top||i.left>t.right)return this;const{naturalWidth:e,naturalHeight:n}=this.$image;switch(o===be&&(o=e>=t.width||n>=t.height?pe:ge),o){case fe:if(i.width>t.width&&i.height>t.height)return this;break;case me:case pe:if(i.width>t.width||i.height>t.height)return this;break;case ge:if(i.width>e||i.height>n)return this}switch(r===be&&(r=e>=t.width||n>=t.height?pe:ge),r){case fe:case me:if(i.width<t.width||i.height<t.height)return this;break;case pe:if(i.width<t.width&&i.height<t.height)return this;break;case ge:if(i.width<e||i.height<n)return this}}if(!1===this.$emit(ue,{x:i.x-t.x,y:i.y-t.y,width:i.width,height:i.height}))return this}if(!1===this.$emit(he,{matrix:s,oldMatrix:n}))return this;this.$matrix=s,this.style.transform=`matrix(${s.join(", ")})`}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}}je.$name=M,je.$version="2.2.0";const Ne=new WeakMap;class Fe extends De{constructor(){super(...arguments),this.$onWindowResize=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$onSelectionChange=null,this.$style=":host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}",this.x=0,this.y=0,this.width=0,this.height=0,this.slottable=!1,this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(e){Ne.set(this,e)}get $canvas(){return Ne.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();const e=this.closest(this.$getTagNameOf(I));if(e){this.$canvas=e,this.style.position="absolute";const t=e.querySelector(this.$getTagNameOf(P));t&&(this.$onWindowResize=this.$render.bind(this),this.$onCanvasActionStart=e=>{t.hidden&&e.detail.action===O&&(this.hidden=!1)},this.$onCanvasActionEnd=e=>{t.hidden&&e.detail.action===O&&(this.hidden=!0)},this.$onSelectionChange=e=>{var n,i;if((null===(i=null===(n=e.target)||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.$name)!==P)return;const{x:o,y:r,width:a,height:s}=e.defaultPrevented?t:e.detail;this.$change(o,r,a,s),(t.hidden||0===o&&0===r&&0===a&&0===s)&&(this.hidden=!0)},h(window,re,this.$onWindowResize),h(e,de,this.$onCanvasActionStart),h(e,le,this.$onCanvasActionEnd),h(e,ue,this.$onSelectionChange))}this.$render()}disconnectedCallback(){const{$canvas:e}=this;e&&(this.$onWindowResize&&(u(window,re,this.$onWindowResize),this.$onWindowResize=null),this.$onCanvasActionStart&&(u(e,de,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(u(e,le,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onSelectionChange&&(u(e,ue,this.$onSelectionChange),this.$onSelectionChange=null)),super.disconnectedCallback()}$change(e,t,i=this.width,o=this.height){return n(e)&&n(t)&&n(i)&&n(o)&&(e!==this.x||t!==this.y||i!==this.width||o!==this.height)?(this.hidden&&(this.hidden=!1),this.x=e,this.y=t,this.width=i,this.height=o,this.$render()):this}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:_.innerWidth*_.devicePixelRatio})}}Fe.$name=D,Fe.$version="2.2.0";class qe extends De{constructor(){super(...arguments),this.$onCanvasCropEnd=null,this.$onCanvasCropStart=null,this.$style=':host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;
1cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}',this.action=q,this.plain=!1,this.slottable=!1,this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}}qe.$name=T,qe.$version="2.2.0";const Ue=new WeakMap;class $e extends De{constructor(){super(...arguments),this.$onCanvasAction=null,this.$onCanvasActionStart=null,this.$onCanvasActionEnd=null,this.$onDocumentKeyDown=null,this.$action="",this.$actionStartTarget=null,this.$changing=!1,this.$style=':host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}',this.$initialSelection={x:0,y:0,width:0,height:0},this.x=0,this.y=0,this.width=0,this.height=0,this.aspectRatio=NaN,this.initialAspectRatio=NaN,this.initialCoverage=NaN,this.active=!1,this.linked=!1,this.dynamic=!1,this.movable=!1,this.resizable=!1,this.zoomable=!1,this.multiple=!1,this.keyboard=!1,this.outlined=!1,this.precise=!1}set $canvas(e){Ue.set(this,e)}get $canvas(){return Ue.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(e,t,n){if(!Object.is(n,t))switch(super.$propertyChangedCallback(e,t,n),e){case"x":case"y":case"width":case"height":this.$changing||this.$nextTick((()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,!0)}));break;case"aspectRatio":case"initialAspectRatio":this.$nextTick((()=>{this.$initSelection()}));break;case"initialCoverage":this.$nextTick((()=>{i(n)&&n<=1&&this.$initSelection(!0,!0)}));break;case"keyboard":this.$nextTick((()=>{this.$canvas&&(n?this.$onDocumentKeyDown||(this.$onDocumentKeyDown=this.$handleKeyDown.bind(this),h(this.ownerDocument,ie,this.$onDocumentKeyDown)):this.$onDocumentKeyDown&&(u(this.ownerDocument,ie,this.$onDocumentKeyDown),this.$onDocumentKeyDown=null))}));break;case"multiple":this.$nextTick((()=>{if(this.$canvas){const e=this.$getSelections();n?(e.forEach((e=>{e.active=!1})),this.active=!0,this.$emit(ue,{x:this.x,y:this.y,width:this.width,height:this.height})):(this.active=!1,e.slice(1).forEach((e=>{this.$removeSelection(e)})))}}));break;case"precise":this.$nextTick((()=>{this.$change(this.x,this.y)}));break;case"linked":n&&(this.dynamic=!0)}}connectedCallback(){super.connectedCallback();const e=this.closest(this.$getTagNameOf(I));e?(this.$canvas=e,this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`}),this.hidden||this.$render(),this.$initSelection(!0),this.$onCanvasActionStart=this.$handleActionStart.bind(this),this.$onCanvasActionEnd=this.$handleActionEnd.bind(this),this.$onCanvasAction=this.$handleAction.bind(this),h(e,de,this.$onCanvasActionStart),h(e,le,this.$onCanvasActionEnd),h(e,se,this.$onCanvasAction)):this.$render()}disconnectedCallback(){const{$canvas:e}=this;e&&(this.$onCanvasActionStart&&(u(e,de,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(u(e,le,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(u(e,se,this.$onCanvasAction),this.$onCanvasAction=null)),super.disconnectedCallback()}$getSelections(){let e=[];return this.parentElement&&(e=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(P)))),e}$initSelection(e=!1,t=!1){const{initialCoverage:n,parentElement:o}=this;if(i(n)&&o){const r=this.aspectRatio||this.initialAspectRatio;let a=(t?0:this.width)||o.offsetWidth*n,s=(t?0:this.height)||o.offsetHeight*n;i(r)&&({width:a,height:s}=w({aspectRatio:r,width:a,height:s})),this.$change(this.x,this.y,a,s),e&&this.$center(),this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){const e=this.cloneNode(!0);return this.hasAttribute("id")&&e.removeAttribute("id"),e.initialCoverage=NaN,this.active=!1,this.parentElement&&this.parentElement.insertBefore(e,this.nextSibling),e}
vendor: 11,123 bytes, line 1
1$removeSelection(e=this){if(this.parentElement){const t=this.$getSelections();if(t.length>1){const n=t.indexOf(e),i=t[n+1]||t[n-1];i&&(e.active=!1,this.parentElement.removeChild(e),i.active=!0,i.$emit(ue,{x:i.x,y:i.y,width:i.width,height:i.height}))}else this.$clear()}}$handleActionStart(e){var t,n;if(e.defaultPrevented)return;const i=null===(n=null===(t=e.detail)||void 0===t?void 0:t.relatedEvent)||void 0===n?void 0:n.target;this.$action="",this.$actionStartTarget=i,!this.hidden&&this.multiple&&!this.active&&i===this&&this.parentElement&&(this.$getSelections().forEach((e=>{e.active=!1})),this.active=!0,this.$emit(ue,{x:this.x,y:this.y,width:this.width,height:this.height}))}$handleAction(e){const{currentTarget:t,detail:n}=e;if(e.defaultPrevented||!t||!n)return;const{relatedEvent:o}=n;let{action:r}=n;const a=o?m(o):null;if(!r&&this.multiple&&(r=this.$action||(null==a?void 0:a.action),this.$action=r),!r||this.hidden&&r!==O||this.multiple&&!this.active&&r!==j)return;const{width:s,height:l}=this;let c=n.endX-n.startX,d=n.endY-n.startY,{aspectRatio:u}=this;switch(!i(u)&&o.shiftKey&&(u=i(s)&&i(l)?s/l:1),r){case O:if(0!==c||0!==d){0===c?c=d:0===d&&(d=c);const{$canvas:e}=this,i=v(t);(this.multiple&&!this.hidden?this.$createSelection():this).$change(n.startX-i.left,n.startY-i.top,Math.abs(c),Math.abs(d),u),c<0?d<0?r=Q:d>0&&(r=G):c>0&&(d<0?r=z:d>0&&(r=V)),e&&(e.$action=r)}break;case R:this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))&&this.$move(c,d);break;case j:case F:if(o&&this.zoomable&&(this.dynamic||this.contains(o.target))){const e=v(t);this.$zoom(n.scale,o.pageX-e.left,o.pageY-e.top)}break;default:this.$resize(r,c,d,u)}}$handleActionEnd(){this.$action="",this.$actionStartTarget=null}$handleKeyDown(e){if(e.defaultPrevented||this.hidden||!this.keyboard||this.multiple&&!this.active)return;const{activeElement:t}=document;if(!t||!["INPUT","TEXTAREA"].includes(t.tagName)&&!["true","plaintext-only"].includes(t.contentEditable))switch(e.key){case"Backspace":e.metaKey&&(e.preventDefault(),this.$removeSelection());break;case"Delete":e.preventDefault(),this.$removeSelection();break;case"ArrowLeft":e.preventDefault(),this.$move(-1,0);break;case"ArrowRight":e.preventDefault(),this.$move(1,0);break;case"ArrowUp":e.preventDefault(),this.$move(0,-1);break;case"ArrowDown":e.preventDefault(),this.$move(0,1);break;case"+":e.preventDefault(),this.$zoom(.1);break;case"-":e.preventDefault(),this.$zoom(-.1)}}$center(){const{parentElement:e}=this;if(!e)return this;const t=(e.offsetWidth-this.width)/2,n=(e.offsetHeight-this.height)/2;return this.$change(t,n)}$move(e,t=e){return this.$moveTo(this.x+e,this.y+t)}$moveTo(e,t=e){return this.movable?this.$change(e,t):this}$resize(e,t=0,n=0,o=this.aspectRatio){if(!this.resizable)return this;const r=i(o),{$canvas:a}=this;let{x:s,y:l,width:c,height:d}=this;switch(e){case U:l+=n,d-=n,d<0&&(e=W,d=-d,l-=d),r&&(s+=(t=n*o)/2,c-=t,c<0&&(c=-c,s-=c));break;case $:c+=t,c<0&&(e=H,c=-c,s-=c),r&&(l-=(n=t/o)/2,d+=n,d<0&&(d=-d,l-=d));break;case W:d+=n,d<0&&(e=U,d=-d,l-=d),r&&(s-=(t=n*o)/2,c+=t,c<0&&(c=-c,s-=c));break;case H:s+=t,c-=t,c<0&&(e=$,c=-c,s-=c),r&&(l+=(n=t/o)/2,d-=n,d<0&&(d=-d,l-=d));break;case z:r&&(n=-t/o),l+=n,d-=n,c+=t,c<0&&d<0?(e=G,c=-c,d=-d,s-=c,l-=d):c<0?(e=Q,c=-c,s-=c):d<0&&(e=V,d=-d,l-=d);break;case Q:r&&(n=t/o),s+=t,l+=n,c-=t,d-=n,c<0&&d<0?(e=V,c=-c,d=-d,s-=c,l-=d):c<0?(e=z,c=-c,s-=c):d<0&&(e=G,d=-d,l-=d);break;case V:r&&(n=t/o),c+=t,d+=n,c<0&&d<0?(e=Q,c=-c,d=-d,s-=c,l-=d):c<0?(e=G,c=-c,s-=c):d<0&&(e=z,d=-d,l-=d);break;case G:r&&(n=-t/o),s+=t,c-=t,d+=n,c<0&&d<0?(e=z,c=-c,d=-d,s-=c,l-=d):c<0?(e=V,c=-c,s-=c):d<0&&(e=Q,d=-d,l-=d)}return a&&a.$setAction(e),this.$change(s,l,c,d)}$zoom(e,t,i){if(!this.zoomable||0===e)return this;e<0?e=1/(1-e):e+=1;const{width:o,height:r}=this,a=o*e,s=r*e;let l=this.x,c=this.y;return n(t)&&n(i)?(l-=(a-o)*((t-this.x)/o),c-=(s-r)*((i-this.y)/r)):(l-=(a-o)/2,c-=(s-r)/2),this.$change(l,c,a,s)}$change(e,t,o=this.width,r=this.height,a=this.aspectRatio,s=!1){return this.$changing||!n(e)||!n(t)||!n(o)||!n(r)||o<0||r<0?this:(i(a)&&({width:o,height:r}=w({aspectRatio:a,width:o,height:r},"cover")),this.precise||(e=Math.round(e),t=Math.round(t),o=Math.round(o),r=Math.round(r)),e===this.x&&t===this.y&&o===this.width&&r===this.height&&Object.is(a,this.aspectRatio)&&!s?this:(this.hidden&&(this.hidden=!1),!1===this.$emit(ue,{x:e,y:t,width:o,height:r})?this:(this.$changing=!0,this.x=e,this.y=t,this.width=o,this.height=r,this.$changing=!1,this.$render())))}$reset(){const{x:e,y:t,width:n,height:i}=this.$initialSelection;return this.$change(e,t,n,i)}$clear(){return this.$change(0,0,0,0,NaN,!0),this.hidden=!0,this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(e){return new Promise(((t,n)=>{if(!this.isConnected)return void n(new Error("The current element is not connected to the DOM."));const o=document.createElement("canvas");let{width:r,height:l}=this,c=1;if(a(e)&&(i(e.width)||i(e.height))&&(({width:r,height:l}=w({aspectRatio:r/l,width:e.width,height:e.height})),c=r/this.width),o.width=r,o.height=l,!this.$canvas)return void t(o);const d=this.$canvas.querySelector(this.$getTagNameOf(M));d?d.$ready().then((n=>{const i=o.getContext("2d");if(i){const[t,u,h,p,f,m]=d.$getTransform(),g=-this.x,b=-this.y,v=(g*p-h*b)/(t*p-h*u),y=(b*t-u*g)/(t*p-h*u);let w=t*v+h*y+f,E=u*v+p*y+m,S=n.naturalWidth,_=n.naturalHeight;1!==c&&(w*=c,E*=c,S*=c,_*=c);const C=S/2,A=_/2;i.fillStyle="transparent",i.fillRect(0,0,r,l),a(e)&&s(e.beforeDraw)&&e.beforeDraw.call(this,i,o),i.save(),i.translate(C,A),i.transform(t,u,h,p,w,E),i.translate(-C,-A),i.drawImage(n,0,0,S,_),i.restore()}t(o)})).catch(n):t(o)}))}}$e.$name=P,$e.$version="2.2.0";class We extends De{constructor(){super(...arguments),this.$style=":host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}",this.bordered=!1,this.columns=3,this.covered=!1,this.rows=3,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(e,t,n){Object.is(n,t)||(super.$propertyChangedCallback(e,t,n),"rows"!==e&&"columns"!==e||this.$nextTick((()=>{this.$render()})))}connectedCallback(){super.connectedCallback(),this.$render()}$render(){const e=this.$getShadowRoot(),t=document.createDocumentFragment();for(let e=0;e<this.rows;e+=1){const e=document.createElement("span");e.setAttribute("data-cropper-grid-row",""),e.setAttribute("role","row");for(let t=0;t<this.columns;t+=1){const t=document.createElement("span");t.setAttribute("role","gridcell"),e.appendChild(t)}t.appendChild(e)}e&&(e.querySelectorAll("[data-cropper-grid-row]").forEach((e=>e.remove())),e.appendChild(t))}}We.$name=k,We.$version="2.2.0";class He extends De{constructor(){super(...arguments),this.$style=':host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}',this.centered=!1,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}}He.$name=x,He.$version="2.2.0";const ze=new WeakMap,Qe=new WeakMap,Ve=new WeakMap,Ge=new WeakMap,Xe="vertical";class Ye extends De{constructor(){super(...arguments),this.$onSelectionChange=null,this.$onSourceImageLoad=null,this.$onSourceImageTransform=null,this.$scale=1,this.$style=":host{display:block;height:100%;overflow:hidden;position:relative;width:100%}",this.resize=Xe,this.selection="",this.slottable=!1}set $image(e){Qe.set(this,e)}get $image(){return Qe.get(this)}set $sourceImage(e){Ge.set(this,e)}get $sourceImage(){return Ge.get(this)}set $canvas(e){ze.set(this,e)}get $canvas(){return ze.get(this)}set $selection(e){Ve.set(this,e)}get $selection(){return Ve.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){var e,t;super.connectedCallback();let n=null;if(n=this.selection?null!==(t=null===(e=b(this))||void 0===e?void 0:e.querySelector(this.selection))&&void 0!==t?t:null:this.closest(this.$getTagNameOf(P)),l(n)){this.$selection=n,this.$onSelectionChange=this.$handleSelectionChange.bind(this),h(n,ue,this.$onSelectionChange);const e=n.closest(this.$getTagNameOf(I));if(e){this.$canvas=e;const t=e.querySelector(this.$getTagNameOf(M));t&&(this.$sourceImage=t,this.$image=t.cloneNode(!0),this.$getShadowRoot().appendChild(this.$image),this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this),this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this),h(t.$image,oe,this.$onSourceImageLoad),h(t,he,this.$onSourceImageTransform))}this.$render()}}disconnectedCallback(){const{$image:e,$selection:t,$sourceImage:n}=this;t&&this.$onSelectionChange&&(u(t,ue,this.$onSelectionChange),this.$onSelectionChange=null),n&&this.$onSourceImageLoad&&(u(n.$image,oe,this.$onSourceImageLoad),this.$onSourceImageLoad=null),n&&this.$onSourceImageTransform&&(u(n,he,this.$onSourceImageTransform),this.$onSourceImageTransform=null);const i=this.$getShadowRoot();e&&(null==i?void 0:i.contains(e))&&i.removeChild(e),super.disconnectedCallback()}$handleSelectionChange(e){this.$render(e.defaultPrevented?this.$selection:e.detail)}$handleSourceImageLoad(){const{$image:e,$sourceImage:t}=this,n=e.getAttribute("src"),i=t.getAttribute("src");i&&i!==n&&(e.setAttribute("src",i),e.$ready((()=>{this.$render()})))}$handleSourceImageTransform(e){this.$render(void 0,e.detail.matrix)}$render(e,t){const{$canvas:n,$selection:i}=this;e||i.hidden||(e=i),(!e||0===e.x&&0===e.y&&0===e.width&&0===e.height)&&(e={x:0,y:0,width:n.offsetWidth,height:n.offsetHeight});const{x:o,y:r,width:a,height:s}=e,l={},{clientWidth:c,clientHeight:d}=this;let u=c,h=d,p=NaN;switch(this.resize){case"both":p=1,u=a,h=s,l.width=a,l.height=s;break;case"horizontal":p=s>0?d/s:0,u=a*p,l.width=u;break;case Xe:p=a>0?c/a:0,h=s*p,l.height=h;break;default:c>0?p=a>0?c/a:0:d>0&&(p=s>0?d/s:0)}this.$scale=p,this.$setStyles(l),this.$sourceImage&&setTimeout((()=>{this.$transformImageByOffset(null!=t?t:this.$sourceImage.$getTransform(),-o,-r)}))}$transformImageByOffset(e,t,n){const{$image:i,$scale:o,$sourceImage:r}=this;if(r&&i&&o>=0){const[a,s,l,c,d,u]=e,h=(t*c-l*n)/(a*c-l*s),p=(n*a-s*t)/(a*c-l*s),f=a*h+l*p+d,m=s*h+c*p+u;r.$ready((e=>
vendor: 4,475 bytes, line 1
1{this.$setStyles.call(i,{width:e.naturalWidth*o,height:e.naturalHeight*o})})),i.$setTransform(a,s,l,c,f*o,m*o)}}}Ye.$name=B,Ye.$version="2.2.0";var Je='<cropper-canvas background><cropper-image rotatable scalable skewable translatable></cropper-image><cropper-shade hidden></cropper-shade><cropper-handle action="select" plain></cropper-handle><cropper-selection initial-coverage="0.5" movable resizable><cropper-grid role="grid" bordered covered></cropper-grid><cropper-crosshair centered></cropper-crosshair><cropper-handle action="move" theme-color="rgba(255, 255, 255, 0.35)"></cropper-handle><cropper-handle action="n-resize"></cropper-handle><cropper-handle action="e-resize"></cropper-handle><cropper-handle action="s-resize"></cropper-handle><cropper-handle action="w-resize"></cropper-handle><cropper-handle action="ne-resize"></cropper-handle><cropper-handle action="nw-resize"></cropper-handle><cropper-handle action="se-resize"></cropper-handle><cropper-handle action="sw-resize"></cropper-handle></cropper-selection></cropper-canvas>';const Ke=/^(img|canvas)$/,Ze=/<(\/?(?:script|style)[^>]*)>/gi,et={template:Je};Be.$define(),He.$define(),We.$define(),qe.$define(),je.$define(),$e.$define(),Fe.$define(),Ye.$define();class tt{constructor(e,n){var i;if(this.options=et,t(e)&&(e=document.querySelector(e)),!l(e)||!Ke.test(e.localName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,n=Object.assign(Object.assign({},et),n),this.options=n;let{container:o}=n;if(o&&(t(o)&&(o=null===(i=b(e))||void 0===i?void 0:i.querySelector(o)),!l(o)))throw new Error("The `container` option must be an element or a valid selector.");l(o)||(o=e.parentElement?e.parentElement:e.ownerDocument.body),this.container=o;const r=e.localName;let a="";"img"===r?({src:a}=e):"canvas"===r&&window.HTMLCanvasElement&&(a=e.toDataURL());const{template:s}=n;if(s&&t(s)){const t=document.createElement("template"),n=document.createDocumentFragment();t.innerHTML=s.replace(Ze,"<$1>"),n.appendChild(t.content),Array.from(n.querySelectorAll(M)).forEach((t=>{t.setAttribute("src",a),t.setAttribute("alt",e.alt||"The image to crop"),"img"===r&&["crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","srcset"].forEach((n=>{e.hasAttribute(n)&&t.setAttribute(n,e.getAttribute(n)||"")}))})),e.parentElement?(e.style.display="none",o.insertBefore(n,e.nextSibling)):o.appendChild(n)}}getCropperCanvas(){return this.container.querySelector(I)}getCropperImage(){return this.container.querySelector(M)}getCropperSelection(){return this.container.querySelector(P)}getCropperSelections(){return this.container.querySelectorAll(P)}destroy(){var e;const t=this.getCropperCanvas();t&&(null===(e=t.parentElement)||void 0===e||e.removeChild(t)),this.element&&(this.element.style.display="")}}tt.version="2.2.0",e.ACTION_MOVE=R,e.ACTION_NONE=q,e.ACTION_RESIZE_EAST=$,e.ACTION_RESIZE_NORTH=U,e.ACTION_RESIZE_NORTHEAST=z,e.ACTION_RESIZE_NORTHWEST=Q,e.ACTION_RESIZE_SOUTH=W,e.ACTION_RESIZE_SOUTHEAST=V,e.ACTION_RESIZE_SOUTHWEST=G,e.ACTION_RESIZE_WEST=H,e.ACTION_ROTATE=N,e.ACTION_SCALE=j,e.ACTION_SELECT=O,e.ACTION_TRANSFORM=F,e.ATTRIBUTE_ACTION=X,e.CROPPER_CANVAS=I,e.CROPPER_CROSSHAIR=x,e.CROPPER_GIRD=k,e.CROPPER_HANDLE=T,e.CROPPER_IMAGE=M,e.CROPPER_SELECTION=P,e.CROPPER_SHADE=D,e.CROPPER_VIEWER=B,e.CropperCanvas=Be,e.CropperCrosshair=He,e.CropperElement=De,e.CropperGrid=We,e.CropperHandle=qe,e.CropperImage=je,e.CropperSelection=$e,e.CropperShade=Fe,e.CropperViewer=Ye,e.DEFAULT_TEMPLATE=Je,e.EVENT_ACTION=se,e.EVENT_ACTION_END=le,e.EVENT_ACTION_MOVE=ce,e.EVENT_ACTION_START=de,e.EVENT_CHANGE=ue,e.EVENT_ERROR=ne,e.EVENT_KEYDOWN=ie,e.EVENT_LOAD=oe,e.EVENT_POINTER_DOWN=Z,e.EVENT_POINTER_MOVE=ee,e.EVENT_POINTER_UP=te,e.EVENT_RESIZE=re,e.EVENT_TOUCH_END=Y,e.EVENT_TOUCH_MOVE=J,e.EVENT_TOUCH_START=K,e.EVENT_TRANSFORM=he,e.EVENT_WHEEL=ae,e.HAS_POINTER_EVENT=A,e.IS_BROWSER=S,e.IS_TOUCH_DEVICE=C,e.NAMESPACE=L,e.OBJECT_FIT_CONTAIN=pe,e.OBJECT_FIT_COVER=fe,e.OBJECT_FIT_FILL=me,e.OBJECT_FIT_NONE=ge,e.OBJECT_FIT_SCALE_DOWN=be,e.WINDOW=_,e.default=tt,e.emit=f,e.getAdjustedSizes=w,e.getComposedPathTarget=m,e.getOffset=v,e.getRootDocument=b,e.isElement=l,e.isFunction=s,e.isNaN=ve,e.isNumber=n,e.isObject=r,e.isPlainObject=a,e.isPositiveNumber=i,e.isString=t,e.isUndefined=o,e.multiplyMatrices=E,e.nextTick=g,e.off=u,e.on=h,e.once=p,e.toAngleInRadian=y,e.toCamelCase=d,e.toKebabCase=c,Object.defineProperty(e,"__esMo
1dule",{value:!0})})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("exifreader",[],t):"object"==typeof exports?exports.ExifReader=t():e.ExifReader=t()}(Object("undefined"!=typeof self?self:this),(function(){return e={d:function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:1,get:n[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})}},t={},function(){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){var t=function(e){var t,i;if("object"!=n(e)||!e)return e;if(void 0!==(t=e[Symbol.toPrimitive])){if("object"!=n(i=t.call(e,"string")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==n(t)?t:t+""}function o(e,t,n){for(var i=[],o=0;o<n&&t+o<e.byteLength;o++)i.push(e.getUint8(t+o));return r(i)}function r(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function a(e,t,n,i){e&&t&&e.push({type:t,start:n,end:i})}function s(){if("undefined"==typeof Promise)throw Error("Promise is required when async mode is enabled.")}function l(){var e,t;for(e=1;e<arguments.length;e++)for(t in arguments[e])c(arguments[0],t,arguments[e][t]);return arguments[0]}function c(e,t,n){"__proto__"!==t?e[t]=n:Object.defineProperty(e,t,{value:n,enumerable:1,writable:1,configurable:1})}function d(e){var t,n=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(n),(function(e){return e.charCodeAt(0)})).buffer;if("undefined"==typeof Buffer)return;return void 0!==Buffer.from?Buffer.from(n,"base64"):new Buffer(n,"base64")}return t=decodeURIComponent(n),"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(t):new Buffer(t):Uint8Array.from(t,(function(e){return e.charCodeAt(0)})).buffer}function u(e,t,n){var i=new DecompressionStream(t),o=new Blob([e]).stream().pipeThrough(i).getReader(),r=[],a=0;return function e(){return o.read().then((function(t){var i=t.done,s=t.value;return i?function(e,t){for(var n=new Uint8Array(t),i=0,o=0;o<e.length;o++)n.set(e[o],i),i+=e[o].byteLength;return n.buffer}(r,a):(a+=s.byteLength)>n?o.cancel().then((function(){return p(n)})):(r.push(s),e())}))}()}function h(e,t,n){return"dataview"===t?new DataView(e):new TextDecoder(n).decode(e)}function p(e){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("ExifReader: skipped a compressed metadata block that would exceed the maximum decompressed size of ".concat(e," bytes.")),Promise.reject("Decompressed metadata exceeded the maximum allowed size of ".concat(e," bytes."))}function f(e){return"string"==typeof e}function m(e){return"undefined"!=typeof File&&e instanceof File}function g(e){return/^data:[^;,]*(;base64)?,/.test(e)}function b(e,t){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?w(e,y(t)).then((function(e){return e.buffer})):S(e,y(t)).then((function(e){return e.buffer})):g(e)?Promise.resolve(d(e)):A(e,y(t)).then((function(e){return e.buffer}))}function v(e,t){return I(e,y(t)).then((function(e){return e.buffer}))}function y(e){return e&&Number.isInteger(e.length)&&e.length>=0?{start:0,end:e.length}:{start:0}}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,i=void 0===n?0:n,o=t.end,r={method:"GET"};return(i>0||void 0!==o&&o!==1/0)&&(r.headers={range:E(i,o)}),fetch(e,r).then((function(e){var t,n,i=e&&"number"==typeof e.status?e.status:void 0;return void 0===i||function(e){return e>=$e&&e<=We?1:e===He}(i)?(n=function(e){if(e&&e.headers&&"function"==typeof e.headers.get)return C(e.headers.get("Content-Range"),e.headers.get("Content-Length"))}(e),Promise.resolve(e.arrayBuffer()).then((function(e){return{buffer:e,totalSize:n,status:i}}))):(t=e.statusText||"",Promise.reject(Error("Could not fetch file: ".concat(i," ").concat(t).trim())))}
1))}function E(e,t){return void 0===t||t===1/0?"bytes=".concat(e,"-"):"bytes=".concat(e,"-").concat(t-1)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,i=void 0===n?0:n,o=t.end;return new Promise((function(t,n){var r,a={};(i>0||void 0!==o&&o!==1/0)&&(a.headers={range:E(i,o)}),r=function(e){return/^https:\/\//.test(e)?require("https").get:require("http").get}(e),r(e,a,(function(e){if(e.statusCode>=$e&&e.statusCode<=We){var i=_(e),o=[];e.on("data",(function(e){return o.push(Buffer.from(e))})),e.on("error",(function(e){return n(e)})),e.on("end",(function(){return t({buffer:Buffer.concat(o),totalSize:i,status:e.statusCode})}))}else e.statusCode===He?(e.resume(),t({buffer:Buffer.alloc(0),totalSize:_(e),status:e.statusCode})):(n(Error("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage))),e.resume())})).on("error",(function(e){return n(e)}))}))}function _(e){if(e&&e.headers)return C(e.headers["content-range"],e.headers["content-length"])}function C(e,t){var n,i;return e&&(n=/\/(\d+|\*)$/.exec(e))&&"*"!==n[1]?parseInt(n[1],10):t&&(i=parseInt(t,10),Number.isFinite(i))?i:void 0}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,i=void 0===n?0:n,o=t.end,r=t.totalSize;return new Promise((function(t,n){var a=function(){try{return require("fs")}catch(e){return}}();a.open(e,(function(s,l){if(s)return n(s);!function(e,t,n,i){if(void 0!==n)return i(null,n);e.stat(t,(function(e,t){return i(e,e?void 0:t.size)}))}(a,e,r,(function(r,s){if(r)return a.close(l,(function(){return n(r)}));var c=void 0===o||o===1/0||o>s?s:o,d=Math.min(Math.max(0,i),c),u=c-d,h=Buffer.alloc(u);if(0===u)return a.close(l,(function(n){return L(e,n,h,s,t)}));a.read(l,{buffer:h,length:u,position:d},(function(i){if(i)return a.close(l,(function(){return n(i)}));a.close(l,(function(n){return L(e,n,h,s,t)}))}))}))}))}))}function L(e,t,n,i,o){t&&console.warn("Could not close file ".concat(e,":"),t),o({buffer:n,totalSize:i})}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,i=void 0===n?0:n,o=t.end;return new Promise((function(t,n){var r,a=new FileReader,s="number"==typeof e.size?e.size:void 0;a.onload=function(e){return t({buffer:e.target.result,totalSize:s})},a.onerror=function(){return n(a.error)},e&&"function"==typeof e.slice&&(i>0||void 0!==o&&o!==1/0)?(r=void 0===o||o===1/0?s:o,a.readAsArrayBuffer(e.slice(i,r))):a.readAsArrayBuffer(e)}))}function x(e){return e instanceof ArrayBuffer?new Uint8Array(e):"undefined"!=typeof Buffer&&Buffer.isBuffer(e)||ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}function k(e,t){if(t.status===$e&&e.fetched>0)return e.buffer=t.buffer,e.fetched=M(e.buffer),void(void 0!==t.totalSize&&(e.totalSize=t.totalSize));void 0!==t.totalSize&&void 0===e.totalSize&&(e.totalSize=t.totalSize),e.buffer=function(e,t){if(!e)return t;if(!t)return e;if("undefined"!=typeof Buffer&&Buffer.isBuffer(e)&&Buffer.isBuffer(t))return Buffer.concat([e,t]);var n=x(e),i=x(t),o=new Uint8Array(n.byteLength+i.byteLength);return o.set(n,0),o.set(i,n.byteLength),o.buffer}(e.buffer,t.buffer),e.fetched=M(e.buffer)}function T(e,t,n,i){var o=e.metadataRange.end;return e.metadataRange.buffer=function(e,t){return!e||"number"!=typeof t||t<0?e:"undefined"!=typeof Buffer&&Buffer.isBuffer(e)?Buffer.from(e.subarray(0,Math.min(t,e.length))):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?e.slice(0,Math.min(t,e.byteLength)):e}(t,o),e.metadataRange.fetched=n,e.metadataRange.requests=i,e}function M(e){return e?"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.length?e.length:0:0}function P(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}function D(e,t){var n=ct.length;return e.getUint16(t)===rt&&o(e,t+Ye,n)===ct&&0===e.getUint8(t+Ye+n)}function B(e,t){var n=e.getUint16(t);return n>=ot&&n<=at||n===st||n===Ke||n===Ze||n===et||n===tt||n===nt||n===it}function O(e,t){return e.getUint16(t)===lt}function R(e,t,n,i){var o,r=function(e,t,n){var i,o,r,a;try{if(t+8>n)return;if(!(o=(i=e.getUint16(t+0))===Xe.LITTLE_ENDIAN)&&i!==Xe.BIG_ENDIAN)return;if(42!==e.getUint16(t+2,o))return;if((r=t+e.getUint32(t+4,o))+2>n)return;return{ifdEntries:a=e.getUint16(r,o),isValid:r+(2+12*a+4)<=n&&a>0}}catch(e){return}}(e,i,t+Je+n);return r?(o=Number.isInteger(r.ifdEntries)?r.ifdEntries:0,(r.isValid?1e9:0)+1e6*o+n):0}function j(e,t,n){var i=o(e,t+ht,ut);return i===ft||i===mt||i===gt&&n}function N(e,t){return o(e,t+ht,ut)===yt}function F(e,t){var n=[bt,vt],i=o(e,t+ht,ut);return n.includes(i)}function q(e,t,n,i){var o=l({},e,{fileType:{value:t,description:n}});return void 0!==i&&(o.metadataBlocks=i,o.metadataTruncated=!!i.truncated),o}function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function $(e,t,n){return(t=function(e){var t=function(e){var t,n;if("object"!=U(e)||!e)return e;if(void 0!==(t=e[Symbol.toPrimitive])){if("object"!=U(n=t.call(e,"string")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==U(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function W(e,t){return e.getUint8(t)}function H(e,t,n){return e.getUint32(t,n===Xe.LITTLE_ENDIAN)}function z(e,t,n){return e.getInt32(t,n===Xe.LITTLE_ENDIAN)}function Q(e){return 1==e?1:Array.isArray(e)&&e.length>0}function V(){function e(){return 1}return{isActive:0,shouldReturnGroup:e,shouldParseGroup:e,shouldReturnTag:e,shouldParseTag:e}}function G(e){var t=e.groupKey,n=e.hasIncludeTags,i=e.hasIncludeEntry,o=e.includeTags,r=e.shouldParseExif,a=e.shouldParseFile;return n?i?"thumbnail"===t&&Array.isArray(o[t])?1:o[t]:"exif"===t&&r||"file"===t&&a?[]:void 0:1}function X(e){var t=e.groupKey,n=e.hasIncludeTags,i=e.hasIncludeEntry,o=e.shouldParseExif,r=e.shouldParseFile,a=e.exifIncludeDepen
1dencies,s=e.fileIncludeDependencies;return n?"exif"===t&&(o||i&&Object.keys(a).length>0)?a:"file"===t&&r?s:Object.create(null):Object.create(null)}function Y(e,t){if(!e||!Object.prototype.hasOwnProperty.call(e,t))return 0;var n=e[t];return 1==n?1:Array.isArray(n)&&n.length>0}function J(e){return Array.isArray(e)&&0===e.length}function K(e){function t(e,t){"number"==typeof t&&e.includeIds?e.includeIds[t+""]=1:"string"==typeof t&&(e.includeNames[t.toLowerCase()]=1)}function n(e,t){"number"==typeof t&&e.excludeIds?e.excludeIds[t+""]=1:"string"==typeof t&&(e.excludeNames[t.toLowerCase()]=1)}var i,o,r,a,s=e.groupKey,l=e.includeValue,c=e.excludeValue,d=e.extraIncludeNames,u=!!Tt[s],h={includeAll:0,includeNames:void 0,includeIds:void 0,excludeAll:0,excludeNames:void 0,excludeIds:void 0};if(1==l)h.includeAll=1;else if(Array.isArray(l)){for(h.includeNames=Object.create(null),u&&(h.includeIds=Object.create(null)),i=0;i<l.length;i++)t(h,l[i]);for(o in d)h.includeNames[o.toLowerCase()]=1}else if(d&&Object.keys(d).length>0)for(r in h.includeNames=Object.create(null),d)h.includeNames[r.toLowerCase()]=1;if(1==c)return h.excludeAll=1,h;if(Array.isArray(c))for(h.excludeNames=Object.create(null),u&&(h.excludeIds=Object.create(null)),a=0;a<c.length;a++)n(h,c[a]);return h}function Z(e,t,n){return e.excludeAll?0:e.includeAll?!ee(e,t,n):e.includeNames||e.includeIds?function(e,t,n){return void 0!==n&&e.includeIds&&e.includeIds[n+""]||t&&e.includeNames&&e.includeNames[(t+"").toLowerCase()]?1:0}(e,t,n)?!ee(e,t,n):0:!ee(e,t,n)}function ee(e,t,n){return void 0!==n&&e.excludeIds&&e.excludeIds[n+""]||t&&e.excludeNames&&e.excludeNames[(t+"").toLowerCase()]?1:0}function te(e,t,n,i,o,r){var a,s,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Ot,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"exif",u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:ne(e),h=kt.getTypeSize("SHORT"),p={},f=function(e,t,n){return t+kt.getTypeSize("SHORT")<=e.byteLength?kt.getShortAt(e,t,n):0}(e,i,o);for(i+=h,a=0;a<f&&!(i+12>e.byteLength);a++)void 0!==(s=ie(e,t,n,i,o,r,c,d,u))&&(p[s.name]={id:s.id,value:s.value,description:s.description},l&&(p[s.name].computed=ae(s.tagType,s.value)),("MakerNote"===s.name||t===At&&"LevelInfo"===s.name)&&(p[s.name].__offset=s.__offset)),i+=12;return p}function ne(e){return{remaining:4*e.byteLength}}function ie(e,t,n,i,o){var r,a,s,l,c,d,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Ot,p=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"exif",f=arguments.length>8?arguments[8]:void 0,m=kt.getTypeSize("SHORT"),g=m+kt.getTypeSize("SHORT"),b=g+kt.getTypeSize("LONG"),v=kt.getShortAt(e,i,o),y=kt.getShortAt(e,i+m,o),w=kt.getLongAt(e,i+g,o);if(void 0!==kt.typeSizes[y]&&(u||void 0!==Lt[t][v])&&(s=function(e,t){if(void 0!==Lt[e][t]){if("string"==typeof Lt[e][t])return Lt[e][t];if(Lt[e][t].name)return Lt[e][t].name}return"undefined-".concat(t)}(t,v),h.shouldParseTag(p,s,v))){if(function(e,t){return kt.typeSizes[e]*t<=kt.getTypeSize("LONG")}(y,w)?r=oe(e,a=i+b,y,w,o):function(e,t,n,i,o){return t+n+kt.typeSizes[i]*o<=e.byteLength}(e,n,a=kt.getLongAt(e,i+b,o),y,w)?(l=33723===v,c=function(e,t,n){var i=Math.min(n,Math.floor(e/kt.typeSizes[t]));return 1===i&&n>1?0:i}(f.remaining,y,w),f.remaining-=c*kt.typeSizes[y],r=oe(e,n+a,y,c,o,l)):r="<faulty value>",y===kt.tagTypes.ASCII&&(r=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(r=function(e){for(var t=[],n=0,i=0;i<e.length;i++)"\0"!==e[i]?(void 0===t[n]&&(t[n]=""),t[n]+=e[i]):n++;return t}(r))),d=r,void 0!==Lt[t][v])if(void 0!==Lt[t][v].name&&void 0!==Lt[t][v].description)try{d=Lt[t][v].description(r)}catch(e){d=re(r)}else d=y===kt.tagTypes.RATIONAL||y===kt.tagTypes.SRATIONAL?""+r[0]/r[1]:re(r);return{id:v,name:s,value:r,description:d,tagType:y,__offset:a}}}function oe(e,t,n,i,o){var r,a=[];for(arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(i*=kt.typeSizes[n],n=kt.tagTypes.BYTE),r=0;r<i;r++)a.push(Rt[n](e,t,o)),t+=kt.typeSizes[n];return n===kt.tagTypes.ASCII?a=kt.getAsciiValue(a):1===a.length&&(a=a[0]),a}function re(e){return e instanceof Array?e.join(", "):e}function ae(e,t){return e===kt.tagTypes.ASCII?Array.isArray(t)&&1===t.length?t[0]:t:e===kt.tagTypes.RATIONAL||e===kt.tagTypes.SRATIONAL?function(e){return Array.isArray(e)&&2===e.length?"number"==typeof e[0]&&"number"==typeof e[1]:0}(t)?se(t):Array.isArray(t)?t.map((function(e){return se(e)})):t:t}function se(e){if(!Array.isArray(e)||2!==e.length)return e;var t=e[0],n=e[1];return Number.isFinite(t)&&Number.isFinite(n)?0===n?null:t/n:e}function le(e,t,n,i,o,r,a,s,c){var d=t[e.pointerKey];return void 0===d?t:l(t,te(n,e.ifdType,i,i+d.value,o,r,a,s,"exif",c))}function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function de(e,t,n,i,o,r){var a,s,l,c,d,f,m,g,b;for(s=[],l=[],c=[],d=$t,f=Ue,m=0;m<n&&t+m<e.byteLength;m++)if(d!==Wt){if(d===Qt){a=new DataView(e.buffer.slice(t+m,t+n));break}0===(g=e.getUint8(t+m))?d=he(i,d):d===$t?s.push(g):d===Ht?l.push(g):d===zt&&c.push(g)}else f=ue({type:i,dataView:e,offset:t+m}),i===mt&&(m+=Vt),d=he(i,d);return f===Ue||o?(b=function(e,t,n){var i,o,r,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"string",s=arguments.length>4?arguments[4]:void 0,l=function(e){return e&&"number"==typeof e.maxDecompressedSize?e.maxDecompressedSize:134217728}(s);if(s&&t!==Ue&&"function"==typeof(i=s[0===t?"deflate":"brotli"]))return o=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Promise.resolve(i(o)).then((function(e){return function(e){return e&&"number"==typeof e.byteLength?e.byteLength:0}(e)>l?p(l):"dataview"===a?e instanceof DataView?e:e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength):new TextDecoder(n).decode(e)}));if(0===t&&"function"==typeof DecompressionStream)return u(e,"deflate",l).then((function(e){return h(e,a,n)}));if("brotli"===t){if("function"==typeof DecompressionStream)try{return u(e,"brotli",l).then((function(e){return h(e,a,n)}))}catch(e){}return Promise.reject("Brotli decompression is not supported in this environment. Pass in a brotli decompression function via the decompress option.")}if(void 0!==t)return Promise.reject("Unknown compression method ".concat(t,"."));if("string"===a)try{return new TextDecoder(n).decode(e)}catch(t){return r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Array.from(r,(function(e){return String.fromCharCode(e)})).join("")}return e}(a,f,function(e){return e===ft||e===gt?"latin1":"utf-8"}(i),"string",r),b instanceof Promise?b.then((function(e){return pe(e,i,l,s)})).catch((function(){return pe("<text using unknown compression>".split(""),i,l,s)})):pe(b,i,l,s)):{}}function ue(e){var t=e.type,n=e.dataView,i=e.offset;if(t===mt){if(i+1<n.byteLength&&n.getUint8(i)===Gt)return n.getUint8(i+1)}else if(t===gt)return n.getUint8(i);return Ue}function he(e,t){return t===$t&&[mt,gt].includes(e)?Wt:t===Wt?e===mt?Ht:Qt:t===Ht?zt:Qt}function pe(e,t,n,i){var r=function(e){return e instanceof DataView?o(e,0,e.byteLength):e}(e);return{name:fe(t,n,i),value:r,description:t===mt?me(e):r}}function fe(e,t,n){var i,o=r(n);return e===ft||0===t.length?o:(i=r(t),"".concat(o," (").concat(i,")"))}function me(e){return qt("UTF-8",e)}function ge(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function be(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function ve(e){return function(e){for(var t=new DataView(new ArrayBuffer(e.length/2)),n=0;n<e.length;n+=2)t.setUint8(n/2,parseInt(e.substring(n,n+2),16));return t}
1(e.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}function ye(e,t,n){if(_e(e,t,n,0,4)){var i=kt.getLongAt(e,t+pt+0);return{value:i,description:""+i}}}function we(e,t,n){if(_e(e,t,n,4,4)){var i=kt.getLongAt(e,t+pt+4);return{value:i,description:""+i}}}function Ee(e,t,n){if(_e(e,t,n,8,1)){var i=kt.getByteAt(e,t+pt+8);return{value:i,description:1===i?"meters":"Unknown"}}}function Se(e,t,n){if(_e(e,t,n,0,7)){var i=kt.getShortAt(e,t+pt),o=kt.getByteAt(e,t+pt+2),r=kt.getByteAt(e,t+pt+3),a=kt.getByteAt(e,t+pt+4),s=kt.getByteAt(e,t+pt+5),l=kt.getByteAt(e,t+pt+6);return{value:[i,o,r,a,s,l],description:"".concat(Ce(i,4),"-").concat(Ce(o,2),"-").concat(Ce(r,2)," ").concat(Ce(a,2),":").concat(Ce(s,2),":").concat(Ce(l,2))}}}function _e(e,t,n,i,o){return i+o<=n&&t+pt+i+o<=e.byteLength}function Ce(e,t){return n=Math.max(0,t-(i=""+e).length),Array(n+1).join("0")+i;var n,i}function Ae(e,t){var n=kt.getByteAt(e,t)+256*kt.getByteAt(e,t+1)+65536*kt.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}function Le(e,t,n,i){return i&&e[t]&&e[t][n]?e[t][n].value:!i&&e[n]?e[n].value:void 0}function Ie(e){for(var t=e.mergeSteps,n=e.deferredResults,i=e.parsedGroups,o=e.expanded,r=e.tagFilter,a=e.dataView,s=e.tiffHeaderOffset,l=e.exifDataView,c=e.fileType,d=e.pngTextChunks,u=e.pngTextIsAsync,h=e.thumbnailIfdTags,p=e.deps,f={},m=0;m<t.length;m++)f=xe({step:t[m],deferredResults:n,parsedGroups:i,expanded:o,tagFilter:r,dataView:a,tiffHeaderOffset:s,exifDataView:l,fileType:c,thumbnailIfdTags:h,tags:f,deps:p});return o&&u&&r.shouldReturnGroup("png")&&f.png&&(f.pngText=p.objectAssign({},f.png)),o&&r.shouldReturnGroup("png")&&p.hasPngTextData(d)&&f.png&&!f.pngText&&(f.pngText=p.objectAssign({},f.png)),f}function xe(e){var t,n,i,o,r,a,s,l,c,d,u,h,p,f=e.step,m=e.deferredResults,g=e.parsedGroups,b=e.expanded,v=e.tagFilter,y=e.dataView,w=(e.tiffHeaderOffset,e.exifDataView,e.fileType),E=e.thumbnailIfdTags,S=e.tags,_=e.deps;if("mergeGroupAssign"===f.type)return t=_.filterTagsForReturn(f.groupKey,f.parsedTags,v),ke(S,f.groupKey,t,b,_);if("mergeGroupMerge"===f.type)return n=_.filterTagsForReturn(f.groupKey,f.parsedTags,v),function(e,t,n,i,o){return i?(e[t]?e[t]=o.objectAssign({},e[t],n):e[t]=n,e):o.objectAssign({},e,n)}(S,f.groupKey,n,b,_);if("mergePngFile"===f.type)return i=_.filterTagsForReturn("png",f.parsedTags,v),v.shouldReturnGroup("png")?b?(S.png=S.png?_.objectAssign({},S.png,i):i,S.pngFile=i,S):_.objectAssign({},S,i):S;if("mergePngChunk"===f.type)return o=_.filterTagsForReturn("png",f.parsedTags,v),v.shouldReturnGroup("png")?b?(S.png=S.png?_.objectAssign({},S.png,o):o,S):_.objectAssign({},S,o):S;if("processPngTextReadTags"===f.type)return Te({readTags:f.readTags,parsedGroups:g,expanded:b,tagFilter:v,tags:S,deps:_});if("processPngTextReadTagsDeferredList"===f.type){for(r=m[f.deferredKey]||[],a=0;a<r.length;a++)S=Te({readTags:r[a],parsedGroups:g,expanded:b,tagFilter:v,tags:S,deps:_});return S}return"gps"===f.type?(b&&v.shouldReturnGroup("gps")&&g.exif&&(s=_.getGpsGroupFromExifTags(g.exif))&&(l=_.filterTagsForReturn("gps",s,v),S.gps=l),S):"composite"===f.type?v.shouldReturnGroup("composite")?(c=S,d=b,v.isActive&&(c={exif:g.exif,file:g.file},d=1),(u=_.Composite.get(c,d))?ke(S,"composite",_.filterTagsForReturn("composite",u,v),b,_):S):S:"thumbnail"===f.type?v.shouldReturnGroup("thumbnail")&&v.shouldReturnTag("thumbnail","Thumbnail")?E?((h=E?_.filterTagsForParse("thumbnail",E,v):void 0)&&(g.thumbnail=h),delete S.Thumbnail,S):S:(delete S.Thumbnail,S):"metadataRange"===f.type?b?(p=function(e,t,n,i){var o,r,a,s,l,c,d,u,h=(e||[]).slice(),p=!!t;if(i&&i.mpf&&Array.isArray(i.mpf.Images))for(o=0;o<i.mpf.Images.length;o++)(r=i.mpf.Images[o])&&r.ImageOffset&&r.ImageSize&&(a=r.ImageOffset.value,s=r.ImageSize.value,"number"!=typeof a||a<=0||"number"!=typeof s||s<=0||h.push({type:"mpfImage",start:a,end:a+s}));if(0!==h.length){for(h.sort((function(e,t){return e.start-t.start})),l=h[0].start,c=h[0].end,d=1;d<h.length;d++)h[d].end>c&&(c=h[d].end);return u=n&&"number"==typeof n.byteLength?n.byteLength:0,{start:l,end:c,complete:!p&&c<=u,blocks:h}}}(f.metadataBlocks,f.metadataTruncated,y,g),p&&(S.metadataRange=p),S):S:"fileType"===f.type?(w&&v.shouldReturnGroup("file")&&v.shouldReturnTag("file","FileType")&&(b?(S.file||(S.file={}),S.file.FileType=w):S.FileType=w),S):S}function ke(e,t,n,i,o){return i?(e[t]=n,e):o.objectAssign({},e,n)}function Te(e){var t,n,i,o,r,a,s=e.readTags,l=e.parsedGroups,c=e.expanded,d=e.tagFilter,u=e.tags,h=e.deps,p=s.__exif,f
1=s.__iptc;return delete s.__exif,delete s.__iptc,p&&(t=h.filterTagsForParse("exif",p,d),l.exif=l.exif?h.objectAssign({},l.exif,t):t,d.shouldReturnGroup("exif")&&(n=h.filterTagsForReturn("exif",t,d),c?u.exif=u.exif?h.objectAssign({},u.exif,n):n:u=h.objectAssign({},u,n))),f&&(i=h.filterTagsForParse("iptc",f,d),l.iptc=l.iptc?h.objectAssign({},l.iptc,i):i,d.shouldReturnGroup("iptc")&&(o=h.filterTagsForReturn("iptc",i,d),c?u.iptc=u.iptc?h.objectAssign({},u.iptc,o):o:u=h.objectAssign({},u,o))),d.shouldReturnGroup("png")&&(r=h.filterTagsForParse("png",s,d),a=h.filterTagsForReturn("png",r,d),l.pngText=r,c?(u.png=u.png?h.objectAssign({},u.png,a):a,a&&Object.keys(a).length>0&&(u.pngText=u.pngText?h.objectAssign({},u.pngText,a):a)):u=h.objectAssign({},u,a)),u}function Me(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}function Pe(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"auto"===n.length?(function(e){if(1!=e.expanded||1!=e.includeOffsets)throw Error('length: "auto" requires both expanded: true and includeOffsets: true.')}(n),function(e){function t(t,n){return Promise.resolve().then((function(){return e(t,n)})).then((function(e){if(!e||!e.metadataRange)throw Error(Ge);var n=e.metadataRange.end;return e.metadataRange.buffer=function(e,t){return"undefined"!=typeof Buffer&&Buffer.isBuffer(e)?Buffer.from(e.subarray(0,t)):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?e.slice(0,t):ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+t):e}(t,n),e.metadataRange.fetched=M(e.metadataRange.buffer),e.metadataRange.requests=0,e}))}function n(e){return i({readRange:e.readRange,options:e.options,buffer:null,fetched:0,requests:0,totalSize:void 0,need:ze,iter:0})}function i(t){return t.iter>=Qe?o(t):(void 0!==t.totalSize&&(t.need=Math.min(t.need,t.totalSize)),t.need<=t.fetched?o(t):t.readRange(t.fetched,t.need,{totalSize:t.totalSize}).then((function(n){return t.requests++,n.status===He?function(t){return t.readRange(0,1/0,{totalSize:void 0}).then((function(n){return t.requests++,t.buffer=n.buffer,t.fetched=M(t.buffer),void 0!==n.totalSize&&(t.totalSize=n.totalSize),Promise.resolve(e(t.buffer,t.options))})).then((function(e){if(!e||!e.metadataRange)throw Error(Ve);return T(e,t.buffer,t.fetched,t.requests)}))}(t):(k(t,n),Promise.resolve(e(t.buffer,t.options)).then((function(e){return function(e,t){var n,o,r=t&&t.metadataRange;if(r&&r.complete)return T(t,e.buffer,e.fetched,e.requests);if(n=void 0!==e.totalSize&&e.fetched>=e.totalSize,!r&&n)throw Error(Ve);if(o=function(e){var t=e.range,n=e.totalSize,i=e.fetched;return t?Math.min(Math.max(t.end,2*i),void 0!==n?n:1/0):void 0!==n?n:2*i}({range:r,totalSize:e.totalSize,fetched:e.fetched}),o<=e.fetched){if(r)return T(t,e.buffer,e.fetched,e.requests);throw Error(Ve)}return e.need=o,e.iter++,i(e)}(t,e)})))})))}function o(t){return console.warn('ExifReader: length:"auto" did not converge in '.concat(Qe," iterations; falling back to full read.")),(void 0!==t.totalSize&&t.fetched<t.totalSize?t.readRange(t.fetched,t.totalSize,{totalSize:t.totalSize}).then((function(e){t.requests++,k(t,e)})):void 0===t.totalSize?t.readRange(t.fetched,1/0,{totalSize:t.totalSize}).then((function(e){t.requests++,k(t,e)})):Promise.resolve()).then((function(){return Promise.resolve(e(t.buffer,t.options))})).then((function(e){if(!e||!e.metadataRange)throw Error(Ve);return T(e,t.buffer,t.fetched,t.requests)}))}return function(e,i){s();var o=l({},i,{async:1});return f(e)?function(e,i){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?n({readR
1ange:function(t,n){return w(e,{start:t,end:n})},options:i}):n({readRange:function(t,n){return S(e,{start:t,end:n})},options:i}):g(e)?t(d(e),i):n({readRange:function(t,n,i){return A(e,{start:t,end:n,totalSize:i?i.totalSize:void 0})},options:i})}(e,o):m(e)?function(e,t){return n({readRange:function(t,n){return I(e,{start:t,end:n})},options:t})}(e,o):t(e,o)}}(De)(e,n)):f(e)||m(e)?(s(),(f(e)?b:v)(e,t=l({},n,{async:1})).then((function(e){return De(e,t)}))):De(e,n)}function De(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),Be(function(e,t,n){try{return new DataView(e,t,n)}catch(i){return new qe(e,t,n)}}(e),t)}function Be(e){var t,n,i,o,r,a,c,d,u,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=h.expanded,f=void 0===p?0:p,m=h.async,g=void 0===m?0:m,b=h.computed,v=void 0===b?0:b,y=h.includeUnknown,w=void 0===y?0:y,E=h.includeOffsets,S=void 0===E?0:E,_=(h.domParser,h.includeTags),C=void 0===_?void 0:_,A=h.excludeTags,L=void 0===A?void 0:A,I=h.decompress,x=void 0===I?void 0:I,k=function(){function e(e){return Mt[e]?!!b[e]:1}function t(t){return Mt[t]?e(t)?1:"exif"===t?n:"file"===t?i:0:1}var n,i,o,r,a,s,l,c,d,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=u.includeTags,p=u.excludeTags,f=!!h,m=!!p,g=f||m,b=Object.create(null),v=Object.create(null),y=Object.create(null);if(!g)return V();for(a in n=f&&(Y(h,"iptc")||Y(h,"xmp")||Y(h,"icc")||Y(h,"photoshop")||Y(h,"makerNotes")||Y(h,"thumbnail")||Y(h,"gps")||Y(h,"composite")),i=f&&Y(h,"composite"),o=Object.create(null),f&&(o=function(e){var t=function(e){var t,n,i,o=Object.create(null);if(!e)return o;for(t in Array.isArray(e.exif)&&e.exif.length>0&&(o[Pt.exifIfdPointer]=1,function(e,t){var n,i,o;for(n=0;n<t.length;n++)"string"==typeof(i=t[n])&&(0===(o=i.toLowerCase()).indexOf("gps")&&(e[Pt.gpsInfoIfdPointer]=1),0!==o.indexOf("interoperability")&&0!==o.indexOf("relatedimage")||(e[Pt.interoperabilityIfdPointer]=1))}(o,e.exif)),Dt)if(Q(e[t])){for(n=Dt[t],i=0;i<n.length;i++)o[n[i]]=1;o[Pt.exifIfdPointer]=1}return Q(e.gps)&&(o[Pt.gpsInfoIfdPointer]=1,o[Pt.exifIfdPointer]=1),o}(e);return Y(e,"composite")&&function(e,t){for(var n=0;n<t.length;n++)e[t[n]]=1}(t,Bt.exif),t}(h)),r=Object.create(null),f&&i&&(r=function(e){for(var t=Object.create(null),n=0;n<e.length;n++)t[e[n].toLowerCase()]=1;return t}(Bt.file)),Mt)s=f&&Object.prototype.hasOwnProperty.call(h,a),l=void 0,m&&Object.prototype.hasOwnProperty.call(p,a)&&!s&&(l=p[a]),c=K({groupKey:a,includeValue:s?h[a]:void 0,excludeValue:l,extraIncludeNames:Object.create(null)}),b[a]=f?s:1,s&&J(h[a])&&(b[a]=0),c.excludeAll&&(b[a]=0),v[a]=c,d=K({groupKey:a,includeValue:G({groupKey:a,hasIncludeTags:f,hasIncludeEntry:s,includeTags:h,shouldParseExif:n,shouldParseFile:i}),excludeValue:l,extraIncludeNames:X({groupKey:a,hasIncludeTags:f,hasIncludeEntry:s,shouldParseExif:n,shouldParseFile:i,exifIncludeDependencies:o,fileIncludeDependencies:r})}),y[a]=d;return{isActive:g,shouldReturnGroup:e,shouldParseGroup:t,shouldReturnTag:function(t,n,i){return Mt[t]?e(t)?Z(v[t],n,i):0:1},shouldParseTag:function(e,n,i){return Mt[e]?t(e)?Z(y[e],n,i):0:1}}}({includeTags:C,excludeTags:L}),T=Object.create(null),M=[],P=Object.create(null),D=[],B=0,O=void 0,R=void 0,j=wt.parseAppMarkers(e,g,f&&S),N=j.fileType,F=j.fileDataOffset,q=j.jfifDataOffset,U=j.tiffHeaderOffset,$=j.iptcDataOffset,W=j.xmpChunks,H=j.iccChunks,z=j.mpfDataOffset,ee=j.pngHeaderOffset,te=j.pngTextChunks,ne=j.pngChunkOffsets,ie=j.vp8xChunkOffset,oe=j.gifHeaderOffset,re=(j.brobExifChunk,j.brobXmpChunk,j.jxlCodestreamOffset),ae=j.metadataBlocks,se=j.metadataTruncated,le=j.exifDataView,ce=(j.xmpDataView,function(e){var t=e.pngChunkOffsets,n=e.vp8xChunkOffset;return!!e.fileType||void 0!==e.tiffHeaderOffset||Fe(e.pngTextChunks)||void 0!==t||void 0!==n||0}({fileType:N,fileDataOffset:F,jfifDataOffset:q,tiffHeaderOffset:U,iptcDataOffset:$,xmpChunks:W,iccChunks:H,mpfDataOffset:z,pngHeaderOffset:ee,pngTextChunks:te,pngChunkOffsets:ne,vp8xChunkOffset:ie,gifHeaderOffset:oe,jxlCodestreamOffset:re}));if(void 0!==U&&k.shouldParseGroup("exif")&&(t=function(e,t,n,i,o){try{return Nt.read(e,t,n,i,o)}catch(e){return{tags:{},byteOrder:Xe.BIG_ENDIAN}}}
1(le||e,U,w,v,k),n=t.tags,t.byteOrder,n.Thumbnail&&(O=n.Thumbnail,delete n.Thumbnail),i=Oe("exif",n,k),T.exif=i,i.MakerNote&&delete i.MakerNote.__offset,k.shouldReturnGroup("exif")&&M.push({type:"mergeGroupAssign",groupKey:"exif",parsedTags:i}),!f&&R&&(M.push(R),R=void 0)),Fe(te)&&(k.shouldParseGroup("png")||k.shouldParseGroup("exif")||k.shouldParseGroup("iptc"))&&(r=(o=Ut.read(e,te,g,w,v,k,x)).readTags,a=o.readTagsPromise,B=!!a,M.push({type:"processPngTextReadTags",readTags:r}),a&&(D.push(a.then((function(e){P.pngTextTagList=e}))),M.push({type:"processPngTextReadTagsDeferredList",deferredKey:"pngTextTagList"}))),void 0!==ne&&k.shouldParseGroup("png")&&(c=Oe("png",Yt.read(e,ne),k),T.pngChunk=c,k.shouldReturnGroup("png")&&M.push({type:"mergePngChunk",parsedTags:c})),void 0!==ie&&k.shouldParseGroup("riff")&&(d=Oe("riff",Jt.read(e,ie),k),T.riff=d,k.shouldReturnGroup("riff")&&M.push({type:"mergeGroupMerge",groupKey:"riff",parsedTags:d})),M.push({type:"gps"}),M.push({type:"composite"}),M.push({type:"thumbnail"}),M.push({type:"fileType"}),f&&S&&M.push({type:"metadataRange",metadataBlocks:ae,metadataTruncated:!!se}),!ce)throw new rn.MetadataMissingError;return u={objectAssign:l,hasPngTextData:Fe,filterTagsForParse:Oe,filterTagsForReturn:Re,getGpsGroupFromExifTags:Ne,Composite:on,Thumbnail:nn},g?(s(),Promise.all(D).then((function(){return Ie({mergeSteps:M,deferredResults:P,parsedGroups:T,expanded:f,tagFilter:k,dataView:e,tiffHeaderOffset:U,exifDataView:le,fileType:N,pngTextChunks:te,pngTextIsAsync:B,thumbnailIfdTags:O,deps:u})}))):Ie({mergeSteps:M,deferredResults:P,parsedGroups:T,expanded:f,tagFilter:k,dataView:e,tiffHeaderOffset:U,exifDataView:le,fileType:N,pngTextChunks:te,pngTextIsAsync:B,thumbnailIfdTags:O,deps:u})}function Oe(e,t,n){return n.isActive?je(e,t,n.shouldParseTag):t}function Re(e,t,n){return n.isActive?je(e,t,n.shouldReturnTag):t}function je(e,t,n){function i(e){if(e){if(Array.isArray(e)){if(0===e.length)return;return e[0].id}return e.id}}var o,r,a;if(!t)return t;for(r in o={},t)n(e,r,i(a=t[r]))&&(o[r]=a);return o}function Ne(e){var t=void 0;if(e.GPSLatitude&&e.GPSLatitudeRef){t=t||{};try{t.Latitude=P(e.GPSLatitude.value),"S"===e.GPSLatitudeRef.value.join("")&&(t.Latitude=-t.Latitude)}catch(e){}}if(e.GPSLongitude&&e.GPSLongitudeRef){t=t||{};try{t.Longitude=P(e.GPSLongitude.value),"W"===e.GPSLongitudeRef.value.join("")&&(t.Longitude=-t.Longitude)}catch(e){}}if(e.GPSAltitude&&e.GPSAltitudeRef){t=t||{};try{t.Altitude=e.GPSAltitude.value[0]/e.GPSAltitude.value[1],1===e.GPSAltitudeRef.value&&(t.Altitude=-t.Altitude)}catch(e){}}if(t)return t}function Fe(e){return Array.isArray(e)&&e.length>0}var qe,Ue,$e,We,He,ze,Qe,Ve,Ge,Xe,Ye,Je,Ke,Ze,et,tt,nt,it,ot,rt,at,st,lt,ct,dt,ut,ht,pt,ft,mt,gt,bt,vt,yt,wt,Et,St,_t,Ct,At,Lt,It,xt,kt,Tt,Mt,Pt,Dt,Bt,Ot,Rt,jt,Nt,Ft,qt,Ut,$t,Wt,Ht,zt,Qt,Vt,Gt,Xt,Yt,Jt,Kt,Zt,en,tn,nn,on,rn,an,sn;e.r(t),e.d(t,{default:function(){return an},errors:function(){return sn},load:function(){return Pe},loadView:function(){return Be}}),qe=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==n(e)||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(t))throw Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length},(t=[{key:"getUint8",value:function(e){return this.buffer.readUInt8(e)}},{key:"getUint16",value:function(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}},{key:"getUint32",value:function(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}},{key:"getInt32",value:function(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}])&&function(e,t){var n,o;for(n=0;n<t.length;n++)(o=t[n]).enumerable=o.enumerable||0,o.configurable=1,"value"in o&&(o.writable=1),Object.defineProperty(e,i(o.key),o)}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:0}),e;var e,t}(),Ue=void 0,$e=200,We=299,He=416,ze=131072,Qe=4,Ve='length: "auto" could not locate metadata in this file (no metadata blocks foun
1d after reading the file â e.g. plain TIFF, bare JPEG XL codestream, or a file with no recognizable metadata).',Ge='length: "auto" is not supported for this file type (no leading metadata container â e.g. plain TIFF or bare JPEG XL codestream).',Xe={BIG_ENDIAN:19789,LITTLE_ENDIAN:18761,getByteOrder:function(e,t){if(18761===e.getUint16(t))return 18761;if(19789===e.getUint16(t))return 19789;throw Error("Illegal byte order value. Faulty image.")}},Ye=4,Je=2,Ke=65472,Ze=65474,et=65476,tt=65499,nt=65501,it=65498,ot=65504,rt=65505,at=65519,st=65534,lt=65535,ct="Exif",dt="ÂPNG\r\n�\n",ht=4,pt=4+(ut=4),ft="tEXt",mt="iTXt",gt="zTXt",bt="pHYs",vt="tIME",yt="eXIf",wt={parseAppMarkers:function(e,t,n){var i=n?[]:void 0;if(function(e){return!!e&&e.byteLength>=2&&65496===e.getUint16(0)}(e))return q(function(e,t){var n,i,o,r,s,l,c,d,u;for(r=2,s=0,l=0;r+Ye+5<=e.byteLength;){if(c=void 0,e.getUint16(r)===it&&(l=1),D(e,r))n=e.getUint16(r+Je),d=r+10,1===++s?o={appMarkerPosition:r,fieldLength:n,tiffHeaderOffset:d,score:void 0}:(void 0===o.score&&(o.score=R(e,o.appMarkerPosition,o.fieldLength,o.tiffHeaderOffset)),(u=R(e,r,n,d))>o.score&&(o={appMarkerPosition:r,fieldLength:n,tiffHeaderOffset:d,score:u})),i=o.tiffHeaderOffset,c="exif";else{if(!B(e,r)){if(O(e,r)){r++;continue}break}n=e.getUint16(r+Je)}a(t,c,r,r+Je+n),r+=Je+n}return s>1&&function(e){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("ExifReader: Found ".concat(e," Exif segments (APP1). ")+"Will pick the best candidate segment.")}(s),t&&(!l&&r+Je<=e.byteLength&&e.getUint16(r)===it&&(l=1),t.truncated=!l),{hasAppMarkers:r>2,fileDataOffset:void 0,jfifDataOffset:void 0,tiffHeaderOffset:i,iptcDataOffset:void 0,xmpChunks:void 0,iccChunks:void 0,mpfDataOffset:void 0}}(e,i),"jpeg","JPEG",i);if(function(e){return!!e&&o(e,0,dt.length)===dt}(e))return q(function(e,t,n){var i,r,s,l,c,d,u;for(i={hasAppMarkers:0},r=dt.length,s=0;r+4+ut<=e.byteLength;)l=void 0,c=e.getUint32(r+0),n&&"IEND"===o(e,r+ht,ut)&&(s=1),j(e,r,t)?(i.hasAppMarkers=1,d=o(e,r+ht,ut),i.pngTextChunks||(i.pngTextChunks=[]),i.pngTextChunks.push({length:c,type:d,offset:r+pt}),l="png"):N(e,r)?(i.hasAppMarkers=1,i.tiffHeaderOffset=r+pt,l="exif"):F(e,r)&&(i.hasAppMarkers=1,i.pngChunkOffsets||(i.pngChunkOffsets=[]),i.pngChunkOffsets.push(r+0),l="png"),a(n,l,r,r+(u=c+4+ut+4)),r+=u;return n&&(n.truncated=!s),i}(e,t,i),"png","PNG",i);if(function(e){return!!e&&"RIFF"===o(e,0,4)&&"WEBP"===o(e,8,4)}(e))return q(function(e,t){var n,i,r,s,l,c,d,u;for(r=12,s=0;r+8<e.byteLength;)l=o(e,r,4),c=e.getUint32(r+4,1),d=void 0,"EXIF"===l?(s=1,n="Exif\0\0"===o(e,r+8,6)?r+8+6:r+8,d="exif"):"VP8X"===l&&(s=1,i=r+8,d="riff"),a(t,d,r,r+(u=8+(c%2==0?c:c+1))),r+=u;return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:void 0,iccChunks:void 0,vp8xChunkOffset:i}}(e,i),"webp","WebP",i);throw Error("Invalid image format")}},Et={274:{name:"Orientation",description:function(e){return 1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"}},34665:"Exif IFD Pointer"},St=l({},Et,{}),_t="exif",Ct="interoperability",At="pentax",Lt=$($($($($($($($({},"0th",St),"1st",Et),_t,St),"gps",{}),Ct,{}),"mpf",{}),"canon",{}),At,{}),kt={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:W,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===Xe.LITTLE_ENDIAN)},getLongAt:H,getRationalAt:function(e,t,n){return[H(e,t,n),H(e,t+4,n)]},getUndefinedAt:function(e,t){return W(e,t)},getSlongAt:z,getSrationalAt:function(e,t,n){return[z(e,t,n),z(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return H(e,t,n)},typeSizes:It={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},tagTypes:xt={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},getTypeSize:function(e){if(void 0===xt[e])throw Error("No such type found.");return It[xt[e]]}},Tt={exif:1,iptc:1,photoshop:1,mpf:1,makerNotes:1},Mt={exif:1,iptc:1,xmp:1,icc:1,photoshop:1,makerNotes:1,mpf:1,file:1,jfif:1,png:1,riff:1,gif:1,gps:1,composite:1,thumbnail:1},Pt={exifIfdPointer:"Exif IFD Pointer",gpsInfoIfdPointer:"GPS Info IFD Pointer",interoperabilityIfdPointer:"Interoperability IFD Pointer"},Dt={thumbnail:["JPEGInterchangeFormat","JPEGInterchangeFormatLength"],iptc:["IPTC-NAA"],xmp:["ApplicationNotes"],icc:["ICC_Profile"],photoshop:["ImageSourceData","PhotoshopSettings"],makerNotes:["MakerNote","Make"],gps:["GPSLatitude","GPSLatitudeRef","GPSLongitude","GPSLongitudeRef","GPSAltitude","GPSAltitudeRef"]},Bt={file:["Image Width","Image Height"],exif:["FocalLength","FocalPlaneXResolution","FocalPlaneYResolution","FocalPlaneResolutionUnit","FocalLengthIn35mmFilm"]},Ot=V(),Rt={1:kt.getByteAt,2:kt.getAsciiAt,3:kt.getShortAt,4:kt.getLongAt,5:kt.getRationalAt,7:kt.getUndefinedAt,9:kt.getSlongAt,10:kt.getSrationalAt,13:kt.getIfdPointerAt},jt=[{pointerKey:"Exif IFD Pointer",ifdType:_t},{pointerKey:"GPS Info IFD Pointer",ifdType:"gps"},{pointerKey:"Interoperability IFD Pointer",ifdType:Ct}],Nt={read:function(e,t,n){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Xe.getByteOrder(e,t),a=ne(e),s=function(e,t,n,i,o,r,a){var s=function(e,t,n){var i=t+4;if(!(i+kt.getTypeSize("LONG")>e.byteLength))return t+kt.getLongAt(e,i,n)}
1(e,t,n);return void 0===s?{}:te(e,"0th",t,s,n,i,o,r,"exif",a)}(e,t,r,n,i,o,a),l=0;l<jt.length;l++)s=le(jt[l],s,e,t,r,n,i,o,a);return{tags:s,byteOrder:r}}},Ft={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},qt=function(e,t){var n,i;if("string"==typeof t)return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t);if(void 0!==(n=function(){if("undefined"!=typeof TextDecoder)return TextDecoder}())&&void 0!==e)try{return new n(e).decode(t instanceof DataView?t.buffer:Uint8Array.from(t))}catch(e){}i=t.map((function(e){return String.fromCharCode(e)})).join("");try{return decodeURIComponent(escape(i))}catch(e){return function(e){var t,n,i,o,r,a,s;for(n=(t=e instanceof DataView)?e.byteLength:e.length,i=t?function(t){return e.getUint8(t)}:function(t){return e[t]},o=Array(n),r=0;r<n;r++)a=i(r),s=Ft[a],o[r]=void 0!==s?s:a;return String.fromCharCode.apply(null,o)}(t)}},Ut={read:function(e,t,n,i){var o,r,a,s,l,c,d,u,h,p,f;for(o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ot,a=arguments.length>6?arguments[6]:void 0,s={},l=[],c=0;c<t.length;c++)(u=de(e,(d=t[c]).offset,d.length,d.type,n,a))instanceof Promise?l.push(u.then((function(e){var t,n,a,s=e.name,l=e.value,c=e.description;try{if(ge(s,l))return r.shouldParseGroup("exif")?{__exif:Nt.read(ve(l),Xt,i,o,r).tags}:{};if(s&&!ge(s,l)&&!be(s,l))return r.shouldParseGroup("png")?(t={},a={value:l,description:c},(n=function(e){var t=function(e){var t,n;if("object"!=ce(e)||!e)return e;if(void 0!==(t=e[Symbol.toPrimitive])){if("object"!=ce(n=t.call(e,"string")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==ce(t)?t:t+""}(n=s))in t?Object.defineProperty(t,n,{value:a,enumerable:1,configurable:1,writable:1}):t[n]=a,t):{}}catch(e){}return{}}))):(h=u.name,p=u.value,f=u.description,h&&r.shouldParseGroup("png")&&(s[h]={value:p,description:f}));return{readTags:s,readTagsPromise:l.length>0?Promise.all(l):void 0}}},$t="STATE_KEYWORD",Wt="STATE_COMPRESSION",Ht="STATE_LANG",zt="STATE_TRANSLATED_KEYWORD",Qt="STATE_TEXT",Vt=1,Gt=1,Xt=6,Yt={read:function(e,t){var n,i,r,a;for(n={},i=0;i<t.length;i++)r=kt.getLongAt(e,t[i]+0),(a=o(e,t[i]+ht,ut))===bt?(n["Pixels Per Unit X"]=ye(e,t[i],r),n["Pixels Per Unit Y"]=we(e,t[i],r),n["Pixel Units"]=Ee(e,t[i],r)):a===vt&&(n["Modify Date"]=Se(e,t[i],r));return n}},Jt={read:function(e,t){var n,i={};return t+en>e.byteLength||(n=kt.getByteAt(e,t),i.Alpha=function(e){var t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}(n),i.Animation=function(e){var t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}(n),i.ImageWidth=Ae(e,t+Kt),i.ImageHeight=Ae(e,t+Zt)),i}},Kt=4,Zt=7,en=10,tn=[6,7,99],nn={get:function(e,t,n){var i,o,r,a,s,l;return(l=t)&&(void 0===l.Compression||tn.includes(l.Compression.value))&&l.JPEGInterchangeFormat&&l.JPEGInterchangeFormat.value&&l.JPEGInterchangeFormatLength&&l.JPEGInterchangeFormatLength.value&&(t.type="image/jpeg",i=n+t.JPEGInterchangeFormat.value,t.image=e.buffer.slice(i,i+t.JPEGInterchangeFormatLength.value),a=function(){return e=this.image,"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0;var e},s=0,Object.defineProperty(o=t,r="base64",{get:function(){return s||(s=1,Object.defineProperty(o,r,{configurable:1,enumerable:1,value:a.apply(o),writable:1})),o[r]},configurable:1,enumerable:1})),t}},on={get:function(e,t){var n,i,o,r={},a=0,s=Le(e,"exif","FocalLength",t),l=Le(e,"exif","FocalPlaneXResolution",t),c=Le(e,"exif","FocalPlaneYResolution",t),d=Le(e,"exif","FocalPlaneResolutionUnit",t),u=Le(e,"file","Image Width",t),h=Le(e,"file","Image Height",t),p=Le(e,"exif","FocalLengthIn35mmFilm",t)||function(e,t,n,i,o,r){var a,s,l,c;if(e&&t&&n&&i&&o&&r)try{switch(n){case 2:a=25.4;break;case 3:a=10;break;case 4:a=1;break;default:return}return s=e[0]/e[1]*a,l=o/(t[0]/t[1]*a),c=Math.sqrt(Math.pow(i/s,2)+Math.pow(l,2)),r[0]/r[1]*(43.27/c)}catch(e){}}(l,c,d,u,h,s);if(p&&(r.FocalLength35efl={value:p,description:(n=p,0===n?"Unknown":n+" mm")},a=1),i=function(e,t){if(e&&t)try{var n=t/(e[0]/e[1]);return{value:n,description:n.toFixed(1)}}catch(e){}}(s,p),i&&(r.ScaleFactorTo35mmEquivalent=i,a=1),o=function(e){if(e)try{var t=2*Math.atan(36/(2*e))*(180/Math.PI);return{value:t,description:t.toFixed(1)+" deg"}}catch(e){}}(p),o&&(r.FieldOfView=o,a=1),a)return r}},Me.prototype=Error(),an={load:Pe,loadView:Be,errors:rn={MetadataMissingError:Me}},sn=rn}(),t;var e,t})),define("WoltLabSuite/Core/Component/Image/Cropper",["require","exports","tslib","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Component/Dialog","cropperjs","WoltLabSuite/Core/Language","exifreader","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o,r,a,s,l){"use strict";
1function c(e,t,n){return e<0?0:e+t>n?Math.floor(n-t):Math.floor(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.cropImage=async function(e,t,n){switch(t.type){case"image/jpeg":case"image/png":case"image/webp":break;default:return t}let i;switch(n.type){case"exact":i=new u(e,t,n);break;case"minMax":i=new h(e,t,n);break;default:throw new Error("Invalid configuration type")}return await i.loadImage(),i.showDialog()},i=n.__importDefault(i),r=n.__importDefault(r),s=n.__importDefault(s),l=n.__importDefault(l);class d{configuration;file;element;resizer;image;cropperCanvas;cropperImage;cropperSelection;dialog;exif;orientation;cropperCanvasRect;#hi;constructor(e,t,n){this.configuration=n,this.element=e,this.file=t,this.resizer=new i.default}get width(){switch(this.orientation){case 90:case 270:return this.image.height;default:return this.image.width}}get height(){switch(this.orientation){case 90:case 270:return this.image.width;default:return this.image.height}}async loadImage(){const{image:e,exif:t}=await this.resizer.loadFile(this.file);this.image=e,this.exif=t;const n=await s.default.load(this.file);if(n.Orientation)switch(n.Orientation.value){case 3:this.orientation=180;break;case 6:this.orientation=90;break;case 8:this.orientation=270}}async showDialog(){this.dialog=(0,o.dialogFactory)().fromElement(this.image).asPrompt({extra:this.getDialogExtra()}),this.dialog.show((0,a.getPhrase)("wcf.upload.crop.image")),this.createCropper();const e=()=>{this.centerSelection()};return window.addEventListener("resize",e,{passive:!0}),new Promise(((t,n)=>{let i=!0;this.dialog.addEventListener("afterClose",(()=>{window.removeEventListener("resize",e),i&&n()})),this.dialog.addEventListener("primary",(()=>{i=!1,this.getCanvas().then((e=>{this.resizer.saveFile({exif:this.orientation?void 0:this.exif,image:e},this.file.name,"image/png"===this.file.type?"image/webp":this.file.type).then((e=>{t(e)})).catch((()=>{n()}))})).catch((()=>{n()}))}))}))}getDialogExtra(){}getCanvas(){const e=Math.min(this.cropperCanvasRect.width/this.width,this.cropperCanvasRect.height/this.height),t=this.cropperSelection.width/e,n=this.cropperSelection.height/e,i=Math.max(Math.min(Math.round(t),this.maxSize.width),this.minSize.width),o=Math.max(Math.min(Math.round(n),this.maxSize.height),this.minSize.height);return this.cropperSelection.$toCanvas({width:i,height:o}).then((e=>{if(e.width===i&&e.height===o)return e;const t=document.createElement("canvas");return t.width=i,t.height=o,t.getContext("2d").drawImage(e,0,0,i,o),t}))}createCropper(){this.#hi=new r.default(this.image,{template:this.getCropperTemplate()}),this.cropperCanvas=this.#hi.getCropperCanvas(),this.cropperImage=this.#hi.getCropperImage(),this.cropperSelection=this.#hi.getCropperSelection(),this.setCropperStyle(),this.orientation&&this.cropperImage.$rotate(`${this.orientation}deg`),this.centerSelection(),this.cropperSelection.addEventListener("change",(e=>{const t=e.detail;this.cropperCanvasRect=this.cropperCanvas.getBoundingClientRect();const n={x:0,y:0,width:this.cropperCanvasRect.width,height:this.cropperCanvasRect.height};if(!function(e,t){return Math.round(e.x)>=t.x&&Math.round(e.y)>=t.y&&Math.round(e.x+e.width)<=Math.round(t.x+t.width)&&Math.round(e.y+e.height)<=Math.round(t.y+t.height)}(t,n)){if(e.preventDefault(),Math.round(t.width)>Math.round(n.width)||Math.round(t.height)>Math.round(n.height))return;this.cropperSelection.$nextTick((()=>{this.cropperSelection.$change(c(t.x,t.width,n.width),c(t.y,t.height,n.height))}))}}))}setCropperStyle(){this.cropperSelection.aspectRatio=this.configuration.aspectRatio}centerSelection(){this.cropperCanvas.style.width=`${this.width}px`,this.cropperCanvas.style.height=`${this.height}px`,requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.applyCenteredSelection()}))}))}applyCenteredSelection(){const e=l.default.innerDimensions(this.cropperCanvas.parentElement),t=Math.min(e.width/this.width,e.height/this.height),n=this.width/this.height,i=Math.round(this.height*t),o=Math.round(i*n);this.cropperCanvas.style.height=`${i}px`,this.cropperCanvas.style.width=`${o}px`,this.cropperImage.$center("cover"),this.cropperCanvasRect=this.cropperImage.getBoundingClientRect();const r=Math.min(this.cropperCanvasRect.width/this.maxSize.width,this.cropperCanvasRect.height/this.maxSize.height);let a=Math.min(this.cropperCanvasRect.height,this.maxSize.height*r),s=a*this.configuration.aspectRatio;s>this.cropperCanvasRect.width&&(s=this.cropperCanvasRect.width,a=s/this.configuration.aspectRatio),this.cropperSelection.$change(0,0,s,a,this.configuration.aspectRatio,!0),this.cropperSelection.$center(),this.cropperSelection.scrollIntoView({block:"center",inline:"center"})}getCropperTemplate(){return'<cropper-canvas background scale-step="0.0">\n <cropper-image skewable scalable translatable rotatable></cropper-image>\n <cropper-shade hidden></cropper-shade>\n <cropper-handle action="scale" hidden disabled></cropper-handle>\n <cropper-selection movable resizable outlined>\n <cropper-grid role="grid" bordered covered></cropper-grid>\n <cropper-crosshair centered></cropper-crosshair>\n <cropper-handle action="move" theme-color="rgba(255, 255, 255, 0.35)"></cropper-handle>\n <cropper-handle action="n-resize"></cropper-handle>\n <cropper-handle action="e-resize"></cropper-handle>\n <cropper-handle action="s-resize"></cropper-handle>\n <cropper-handle action="w-resize"></cropper-handle>\n <cropper-handle action="ne-resize"></cropper-handle>\n <cropper-handle action="nw-resize"></cropper-handle>\n <cropper-handle action="se-resize"></cropper-handle>\n <cropper-handle action="sw-resize"></cropper-handle>\n </cropper-selection>\n</cropper-canvas>'}}class u extends d{get minSize(){return this.configuration.sizes[0]}get maxSize(){return this.configuration.sizes[this.configuration.sizes.length-1]}async showDialog(){return this.configuration.sizes.filter((e=>e.width==this.width&&e.height==this.height)).length>0&&this.image instanceof HTMLCanvasElement?this.resizer.saveFile({exif:this.orientation?void 0:this.exif,image:this.image},this.file.name,"image/png"===this.file.type?"image/webp":this.file.type):super.showDialog()}getCanvas(){const e=Math.min(this.cropperCanvasRect.width/this.width,this.cropperCanvasRect.height/this.height),t=this.cropperSelection.width/e,n=this.cropperSelection.height/e,i=this.configuration.sizes.filter((e=>t>=e.width&&n>=e.height)).reverse(),o=i.length>0?i[0]:this.minSize;return this.cropperSelection.$toCanvas({width:o.width,height:o.height}).then((e=>{if(e.width===o.width&&e.height===o.height)return e;const t=document.createElement("canvas");return t.width=o.width,t.height=o.height,t.getContext("2d").drawImage(e,0,0,o.width,o.height),t}))}async loadImage(){await super.loadImage();const e=this.configuration.sizes.filter((e=>e.width<=this.width&&e.height<=this.height)).sort(((e,t)=>this.configuration.aspectRatio>=1?e.width-t.width:e.height-t.height));if(0===e.length){const e=this.configuration.sizes.length>0?this.configuration.sizes[this.configuration.sizes.length-1]:void 0;throw new Error((0,a.getPhrase)("wcf.upload.error.image.tooSmall",{width:e?.width,height:e?.height}))}this.configuration.sizes=e}}class h extends d{constructor(e,t,n){if(super(e,t,n),2!==n.sizes.length)throw new Error("MinMaxImageCropper requires exactly two sizes")}
1get minSize(){return this.configuration.sizes[0]}get maxSize(){return this.configuration.sizes[1]}getDialogExtra(){return(0,a.getPhrase)("wcf.global.button.reset")}async loadImage(){if(await super.loadImage(),this.width<this.minSize.width||this.height<this.minSize.height)throw new Error((0,a.getPhrase)("wcf.upload.error.image.tooSmall",{width:this.minSize.width,height:this.minSize.height}))}createCropper(){super.createCropper(),this.dialog.addEventListener("extra",(()=>{this.centerSelection()}))}}})),define("WoltLabSuite/Core/Component/File/Upload",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Api/Files/Upload","WoltLabSuite/Core/Api/Files/Chunk/Chunk","WoltLabSuite/Core/Api/Files/GenerateThumbnails","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Language","hash-wasm","WoltLabSuite/Core/Component/Image/Cropper","WoltLabSuite/Core/Image/ExifUtil"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h){"use strict";async function p(e,t,n,i,a){const s=e.dataset.objectType,l=document.createElement("woltlab-core-file");l.dataset.filename=t.name,l.dataset.fileSize=t.size.toString();const c=new CustomEvent("uploadStart",{detail:l});e.dispatchEvent(c);const d=await(0,o.upload)(t.name,t.size,n,s,e.dataset.context||"",i,a);if(!d.ok){if(void 0===d.error.getValidationError())throw l.uploadFailed(d.error),new Error("Unexpected validation error",{cause:d.error});return void l.uploadFailed(d.error)}const{identifier:u,numberOfChunks:h}=d.value,p=Math.ceil(t.size/h);f(l,0,h);for(let e=0;e<h;e++){const n=e*p,i=n+p,o=t.slice(n,i),a=await g(o),s=await(0,r.uploadChunk)(u,e,a,o);if(!s.ok)throw l.uploadFailed(s.error),new Error("Unexpected validation error",{cause:s.error});if(f(l,e+1,h),await m(l,s.value),s.value.completed)return s.value}}function f(e,t,n){if(1===n)return;const i=new CustomEvent("uploadProgress",{detail:Math.floor(t/n*100)});e.dispatchEvent(i)}async function m(e,t){if(t.completed&&(e.uploadCompleted(t.fileID,t.mimeType,t.link,t.data,t.generateThumbnails),t.generateThumbnails)){const{filename:n,fileSize:i,mimeType:o,thumbnails:r}=(await(0,a.generateThumbnails)(t.fileID)).unwrap();e.setThumbnails(r),e.updateFileData(n,i,o)}}async function g(e){const t=await(0,d.createSHA256)();t.init();let n=0;for(;n<e.size;){const i=e.slice(n,n+C),o=await i.arrayBuffer();t.update(new Uint8Array(o)),n+=C}return t.digest("hex")}function b(e){e.parentElement?.querySelectorAll(".innerError").forEach((e=>e.remove()))}async function v(e,t){switch(t.type){case"image/jpeg":case"image/png":case"image/webp":break;default:return t}const n=new Promise((e=>{window.setTimeout((()=>e(t)),1e4)})),i=JSON.parse(e.dataset.resizeConfiguration),o=new s.default,{image:r}=await o.loadFile(t),a=-1===i.maxHeight?r.height:i.maxHeight;let l=-1===i.maxWidth?r.width:i.maxWidth;if(window.devicePixelRatio>=2){const e=window.screen.width*window.devicePixelRatio,t=window.screen.height*window.devicePixelRatio;e===r.width&&t===r.height&&(l=Math.min(l,window.screen.width))}const c=await o.resize(r,l,a,i.quality,!1,n);if(void 0===c)return t;let d=i.fileType;return d="image/jpeg"===d||"image/webp"===d?"image/webp":t.type,await o.saveFile({image:c},t.name,d,i.quality)}function y(e,t){const n=e.maximumCount;return-1===n||(Array.from(e.parentElement.querySelectorAll("woltlab-core-file")).filter((e=>!e.isFailedUpload())).length+t<=n||(S(e,null,(0,c.getPhrase)("wcf.upload.error.maximumCountReached",{maximumCount:n})),!1))}function w(e,t){if(0===t.size)return S(e,t,(0,c.getPhrase)("wcf.upload.error.emptyFile",{filename:t.name})),!1;let n=!1;switch(t.type){case"image/gif":case"image/jpeg":case"image/png":case"image/webp":n=!0}if(n)return!0;const i=e.maximumSize;return-1===i||t.size<=i||(S(e,t,(0,c.getPhrase)("wcf.upload.error.fileSizeTooLarge",{filename:t.name})),!1)}function E(e,t){const n=(e.dataset.fileExtensions||"*").toLowerCase().split(",");for(const e of n){if("*"===e)return!0;if(t.name.toLowerCase().endsWith(e))return!0}return S(e,t,(0,c.getPhrase)("wcf.upload.error.fileExtensionNotPermitted",{filename:t.name})),!1}function S(e,t,n){const i=new CustomEvent("upload:error",{cancelable:!0,detail:{file:t,message:n}});e.dispatchEvent(i),i.defaultPrevented||(0,l.innerError)(e,n)}async function _(e){if("image/jpeg"===e.type)try{return(await(0,h.getExifBytesFromJpeg)(e)).slice(10)}catch{return null}else if("image/webp"===e.type)try{return await(0,h.getExifBytesFromWebP)(e)}catch{return null}return null}
1Object.defineProperty(t,"__esModule",{value:!0}),t.clearPreviousErrors=b,t.setup=function(){(0,i.wheneverFirstSeen)("woltlab-core-file-upload",(e=>{e.addEventListener("upload:files",(t=>{const{files:n}=t.detail;if(b(e),!y(e,n.length))return;for(const t of n){if(!E(e,t))return;if(!w(e,t))return}e.markAsBusy();const i=new Map,o=new Set;let r;if(e.dataset.cropperConfiguration){const t=JSON.parse(e.dataset.cropperConfiguration);r=async n=>{i.set(n,await _(n));try{const r=await(0,u.cropImage)(e,n,t),a=await _(r);return!i.has(n)||null!==a&&0!==a.length||o.add(n),r}catch(t){throw e.dispatchEvent(new CustomEvent("cancel")),t}}}else r=async t=>(i.set(t,await _(t)),v(e,t));Promise.allSettled(n.map((e=>r(e)))).then((async t=>{const r=[],a=[];for(let i=0,o=t.length;i<o;i++){const o=t[i];if("fulfilled"===o.status)r.push(o.value),a.push(i);else if(void 0!==o.reason){let t;t=o.reason instanceof Error?o.reason.message:"string"==typeof o.reason?o.reason:(0,c.getPhrase)("wcf.upload.error.damagedImageFile",{filename:n[i].name}),S(e,n[i],t)}}const s=await Promise.allSettled(r.map((e=>g(e))));for(let t=0,l=s.length;t<l;t++){const l=s[t];if("fulfilled"!==l.status)throw new Error(l.reason);{const s=a[t],c=i.get(r[t])||i.get(n[s])||null;p(e,r[t],l.value,c,o.has(n[s]))}}})).finally((()=>{e.markAsReady()}))})),e.addEventListener("ckeditorDrop",(t=>{const{file:n}=t.detail;let i,o,r;t.detail.promise=new Promise(((e,t)=>{i=e,o=t})),b(e),y(e,1)&&E(e,n)?_(n).then((e=>{r=e})).then((()=>v(e,n))).then((async t=>{try{const n=await g(t),a=await p(e,t,n,r,!1);if(void 0===a||"number"!=typeof a.data.attachmentID)o();else{const e={attachmentId:a.data.attachmentID,url:a.link};i(e)}}catch(e){throw o(),e}})).catch((e=>{throw o(),e})):o()}))}))},s=n.__importDefault(s);const C=10485760})),define("WoltLabSuite/Core/Ui/Search/Input",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),class{activeItem=void 0;ajaxPayload;autoFocus;callbackDropdownInit=void 0;callbackSelect=void 0;delay;dropdownContainerId="";element;excludedSearchValues=new Set;list=void 0;lastValue="";minLength;noResultPlaceholder;preventSubmit;request=void 0;suppressErrors;timerDelay=void 0;constructor(e,t){if(this.element=e,!(this.element instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this.element.nodeName||"search"!==this.element.type&&"text"!==this.element.type)throw new Error('Expected an input[type="text"].');t=o.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},autoFocus:!0,callbackDropdownInit:void 0,callbackSelect:void 0,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1,suppressErrors:!1},t),this.ajaxPayload=t.ajax,this.autoFocus=t.autoFocus,this.callbackDropdownInit=t.callbackDropdownInit,this.callbackSelect=t.callbackSelect,this.delay=t.delay,t.excludedSearchValues.forEach((e=>{this.addExcludedSearchValues(e)})),this.minLength=t.minLength,this.noResultPlaceholder=t.noResultPlaceholder,this.preventSubmit=t.preventSubmit,this.suppressErrors=t.suppressErrors||!1,this.element.autocomplete="off",this.element.addEventListener("keydown",(e=>this.keydown(e))),this.element.addEventListener("keyup",(e=>this.keyup(e)))}addExcludedSearchValues(e){this.excludedSearchValues.add(e)}removeExcludedSearchValues(e){this.excludedSearchValues.delete(e)}keydown(e){(this.activeItem&&a.default.isOpen(this.dropdownContainerId)||this.preventSubmit)&&"Enter"===e.key&&e.preventDefault(),["ArrowUp","ArrowDown","Escape"].includes(e.key)&&e.preventDefault()}keyup(e){if(this.activeItem||!this.autoFocus)if(a.default.isOpen(this.dropdownContainerId)){if("ArrowUp"===e.key)return e.preventDefault(),this.keyboardPreviousItem();if("ArrowDown"===e.key)return e.preventDefault(),this.keyboardNextItem();if("Enter"===e.key)return e.preventDefault(),this.keyboardSelectItem()}else this.activeItem=void 0;if("Escape"===e.key)return void a.default.close(this.dropdownContainerId);const t=this.element.value.trim();this.lastValue!==t&&(this.lastValue=t,t.length<this.minLength?this.dropdownContainerId&&(a.default.close(this.dropdownContainerId),this.activeItem=void 0):this.delay?(this.timerDelay&&window.clearTimeout(this.timerDelay),this.timerDelay=window.setTimeout((()=>{this.search(t)}),this.delay)):this.search(t))}search(e){this.request&&this.request.abortPrevious(),this.request=i.api(this,this.getParameters(e))}getParameters(e){return{parameters:{data:{excludedSearchValues:Array.from(this.excludedSearchValues),searchString:e}}}}keyboardNextItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.nextElementSibling&&(e=this.activeItem.nextElementSibling)),this.activeItem=e||this.list.children[0],this.activeItem.classList.add("active")}keyboardPreviousItem(){let e;this.activeItem&&(this.activeItem.classList.remove("active"),this.activeItem.previousElementSibling&&(e=this.activeItem.previousElementSibling)),this.activeItem=e||this.list.children[this.list.childElementCount-1],this.activeItem.classList.add("active")}keyboardSelectItem(){this.selectItem(this.activeItem)}clickSelectItem(e){this.selectItem(e.currentTarget)}selectItem(e){this.callbackSelect&&!this.callbackSelect(e)?this.element.value="":this.element.value=e.dataset.label||"",this.activeItem=void 0,a.default.close(this.dropdownContainerId)}_ajaxSuccess(e){let t=!1;if(this.list?this.list.innerHTML="":(this.list=document.createElement("ul"),this.list.className="dropdownMenu",t=!0,"function"==typeof this.callbackDropdownInit&&this.callbackDropdownInit(this.list)),"object"==typeof e.returnValues){const t=this.clickSelectItem.bind(this);
1Object.keys(e.returnValues).forEach((n=>{const i=this.createListItem(e.returnValues[n]);i.addEventListener("click",t),this.list.appendChild(i)}))}if(t){this.element.insertAdjacentElement("afterend",this.list);const e=this.element.parentElement;a.default.initFragment(e,this.list),this.dropdownContainerId=r.default.identify(e)}if(this.dropdownContainerId)if(this.activeItem=void 0,this.list.childElementCount||this.handleEmptyResult()){a.default.open(this.dropdownContainerId,!0,this.element);const e=this.list.childElementCount?this.list.children[0]:void 0;this.autoFocus&&e&&~~(e.dataset.objectId||"")&&(this.activeItem=e,this.activeItem.classList.add("active"))}else a.default.close(this.dropdownContainerId)}handleEmptyResult(){if(!this.noResultPlaceholder)return!1;const e=document.createElement("li");e.className="dropdownText";const t=document.createElement("span");return t.textContent=this.noResultPlaceholder,e.appendChild(t),this.list.appendChild(e),!0}createListItem(e){const t=document.createElement("li");t.dataset.objectId=e.objectID.toString(),t.dataset.label=e.label;const n=document.createElement("span");return n.textContent=e.label,t.appendChild(n),t}_ajaxSetup(){return{data:this.ajaxPayload,silent:this.suppressErrors,ignoreError:this.suppressErrors}}}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding/Suggestion",["require","exports","tslib","../../../Ui/Search/Input"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t,n){new o(e,{callbackSelect:n},t)},i=n.__importDefault(i);class o extends i.default{#pi;constructor(e,t,n){super(e,t),this.#pi=n}search(e){this.#pi.geocode({address:e},((e,t)=>{if("OK"===t){const t={actionName:"",objectIDs:[],returnValues:{}};e.forEach((e=>{t.returnValues[e.formatted_address]={label:e.formatted_address,objectID:e.formatted_address}})),this._ajaxSuccess(t)}}))}}})),define("WoltLabSuite/Core/Component/GoogleMaps/woltlab-core-google-maps",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreGoogleMapsElement=void 0;let n=!1;const i=new Promise((e=>{window.woltlab_core_google_maps_callback=e}));class o extends HTMLElement{#fi;#mi;#gi;#bi=!1;#pi;constructor(){super(),this.#mi=new Promise((e=>{this.#gi=e}))}connectedCallback(){this.hidden||this.#A()}attributeChangedCallback(e,t,n){"hidden"===e&&null===n&&this.#A()}static get observedAttributes(){return["hidden"]}#A(){this.#bi||(this.#An(),this.#bi=!0,(e=>{if(!n){const t=document.createElement("script");t.src="https://maps.googleapis.com/maps/api/js?"+(e?`key=${e}&`:"")+"callback=woltlab_core_google_maps_callback&libraries=marker",document.head.appendChild(t),n=!0}return i})(this.apiKey).then((()=>{this.hasAttribute("access-user-location")?navigator.geolocation.getCurrentPosition((e=>{this.setAttribute("lat",e.coords.latitude.toString()),this.setAttribute("lng",e.coords.longitude.toString()),this.#vi()}),(()=>{this.#vi()})):this.#vi()})))}#vi(){this.#fi=new google.maps.Map(this,{zoom:this.zoom,center:{lat:this.lat,lng:this.lng},mapId:"DEMO_MAP_ID"}),this.#yi(),this.#gi&&(this.#gi(),this.#gi=void 0)}async#yi(){await this.#mi;const e=this.bounds;e&&this.#fi.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.southWest.latitude,e.southWest.longitude),new google.maps.LatLng(e.northEast.latitude,e.northEast.longitude)))}#An(){if(!this.apiKey)throw new TypeError("Must provide an api key.")}get apiKey(){return this.getAttribute("api-key")||""}async getMap(){return await this.#mi,this.#fi}get lat(){return this.getAttribute("lat")?parseFloat(this.getAttribute("lat")):0}get lng(){return this.getAttribute("lng")?parseFloat(this.getAttribute("lng")):0}get zoom(){return this.getAttribute("zoom")?parseInt(this.getAttribute("zoom")):13}get bounds(){return this.getAttribute("bounds")?JSON.parse(this.getAttribute("bounds")):null}async getGeocoder(){return await this.#mi,void 0===this.#pi&&(this.#pi=new google.maps.Geocoder),this.#pi}}t.WoltlabCoreGoogleMapsElement=o,window.customElements.define("woltlab-core-google-maps",o),t.default=o})),define("WoltLabSuite/Core/Component/GoogleMaps/Marker",["require","exports","./woltlab-core-google-maps"],(function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.addMarker=async function(e,t,n,i,o){const r=await e.getMap(),a=new google.maps.marker.AdvancedMarkerElement({map:r,position:new google.maps.LatLng(t,n),title:i});o&&null!==a.position&&void 0!==a.position&&r.setCenter(a.position)},t.addDraggableMarker=async function(e,t,n){const i=await e.getMap();void 0===t&&(t=e.lat),void 0===n&&(n=e.lng);const o=new google.maps.marker.AdvancedMarkerElement({map:i,position:new google.maps.LatLng(t,n),gmpDraggable:!0,gmpClickable:!1});return null!==o.position&&void 0!==o.position&&i.setCenter(o.position),o}})),define("WoltLabSuite/Core/Component/GoogleMaps/Geocoding",["require","exports","../../Helper/Selector","./Geocoding/Suggestion","./Marker","./woltlab-core-google-maps"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,n.wheneverFirstSeen)("[data-google-maps-geocoding]",(e=>{const t=document.getElementById(e.dataset.googleMapsGeocoding);if(!t)throw new Error(`Unable to find Google Maps element '${e.dataset.googleMapsGeocoding}'.`);new r(e,t)}))};class r{#x;#fi;#wi;#Ei;constructor(e,t){this.#x=e,this.#fi=t,this.#En(),this.#fi.getGeocoder().then((t=>{this.#x.hasAttribute("data-google-maps-marker")&&this.#Si(),e.value&&this.#_i(e.value),(0,i.setup)(this.#x,t,(e=>(this.#_i(e.dataset.label),!0)))}))}#En(){this.#x.addEventListener("geocoding:move-marker",(e=>{this.#Ci(new google.maps.LatLng(e.detail.latitude,e.detail.longitude))})),this.#x.addEventListener("geocoding:resolve",(e=>{this.#fi.getGeocoder().then((t=>{const n=new google.maps.LatLng(e.detail.latitude,e.detail.longitude);t.geocode({location:n},((t,n)=>{"OK"===n&&e.detail.callback(t[0].formatted_address)}))}))})),this.#x.addEventListener("geocoding:reset-marker",(()=>{this.#Ei&&this.#Ci(new google.maps.LatLng(this.#Ei))}))}async#Si(){this.#wi=await(0,o.addDraggableMarker)(this.#fi),this.#Ei=this.#wi?.position,this.#wi.addListener("dragend",(()=>{this.#fi.getGeocoder().then((e=>{e.geocode({location:this.#wi.position},((e,t)=>{"OK"===t&&(this.#x.value=e[0].formatted_address,this.#Ai(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}))}))}async#Ci(e){this.#wi&&(this.#wi.position=e),(await this.#fi.getMap()).setCenter(e),this.#Ai(e.lat(),e.lng())}async#_i(e){(await this.#fi.getGeocoder()).geocode({address:e},(async(e,t)=>{"OK"===t&&(this.#wi&&(this.#wi.position=e[0].geometry.location),(await this.#fi.getMap()).setCenter(e[0].geometry.location),this.#Ai(e[0].geometry.location.lat(),e[0].geometry.location.lng()))}))}#Ai(e,t){this.#x.dataset.googleMapsLat=e.toString(),this.#x.dataset.googleMapsLng=t.toString();const n=this.#x.dataset.googleMapsGeocodingStore;null!=n&&this.#x.form&&this.#Li(n,e,t)}#Li(e,t,n){const i=e+"coordinates";let o=this.#x.form.querySelector(`input[name="${i}"]`);o||(o=document.createElement("input"),o.type="hidden",o.name=i,this.#x.form.append(o)),o.value=`${t},${n}`}}})),define("WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader",["require","exports","tslib","../../Ajax","../Dialog","../../Dom/Util","@googlemaps/markerclusterer","./woltlab-core-google-maps"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=async function(e,t,n){const i=await e.getMap();new s(i,t,n)},r=n.__importDefault(r);class s{#fi;#Ii;#xi;#ki;#Ti;#Mi;#E=[];constructor(e,t,n){this.#fi=e,this.#Ii=t,this.#xi=n,this.#ki=new a.MarkerClusterer({map:e}),this.#Pi()}async#Pi(){this.#fi.getBounds()&&await this.#Di(),this.#fi.addListener("idle",(()=>{this.#Di()}))}async#Di(){const e=this.#fi.getBounds().getNorthEast(),t=this.#fi.getBounds().getSouthWest
1();this.#Bi(e,t)&&((await(0,i.dboAction)("getMapMarkers",this.#Ii).payload({...this.#xi,excludedObjectIDs:JSON.stringify(this.#E),eastLongitude:e.lng(),northLatitude:e.lat(),southLatitude:t.lat(),westLongitude:t.lng()}).dispatch()).markers.forEach((e=>{this.#Oi(e)})),this.#ki.render())}#Oi(e){const t=new google.maps.marker.AdvancedMarkerElement({map:this.#fi,position:new google.maps.LatLng(e.latitude,e.longitude),title:e.title});if(this.#ki.addMarker(t,!0),e.infoWindow){const n=document.createElement("div");n.classList.add("googleMapsInfoWindow"),r.default.setInnerHtml(n,e.infoWindow);const i=new google.maps.InfoWindow({headerContent:e.title,content:n});if(t.addListener("click",(()=>{i.open(this.#fi,t)})),e.dialog){let t;i.addListener("domready",(()=>{const i=n.querySelector(".jsButtonShowDialog");i?.addEventListener("click",(()=>{t||(t=(0,o.dialogFactory)().fromHtml(e.dialog).withoutControls()),t.show(i.dataset.title||i.textContent)}))}))}}e.objectID&&this.#E.push(e.objectID),e.objectIDs&&this.#E.push(...e.objectIDs)}#Bi(e,t){return!(this.#Ti&&this.#Ti.lat()>=e.lat()&&this.#Ti.lng()>=e.lng()&&this.#Mi.lat()<=t.lat()&&this.#Mi.lng()<=t.lng()||(this.#Ti=e,this.#Mi=t,0))}}})),function(e,t){"object"==typeof exports&&typeof module<"u"?t(exports):"function"==typeof define&&define.amd?define("@fancyapps/ui/fancybox.umd",["exports"],t):t((e=typeof globalThis<"u"?globalThis:e||self).window=e.window||{})}(this,(function(e){function t(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function n(e){return A(e)||Array.isArray(e)}function i(e,t){let o=Object.keys(e),r=Object.keys(t);return o.length===r.length&&o.every((o=>{let r=e[o],a=t[o];return"function"==typeof r?`${r}`==`${a}`:n(r)&&n(a)?i(r,a):r===a}))}function o(){function e(e,...t){for(let n of D.get(e)||[])n(...t)}function t(e){return c=0,e?C=setTimeout((()=>{n()}),e):n(),B}function n(){a=m.Running,e("start",A,L)}function r(){if(a=m.Completed,I={},e("end",A),a===m.Completed)if(l<x){if(l++,T===b.Reverse){let e={..._};_={...L},L=e}t(k)}else l=0;return B}let a=m.Initializing,s=g.Ease,l=0,c=0,d=o.Easings.Linear,u=500,h=0,p=0,f=0,v=0,y=1/0,w=.01,E=.01,S=!1,_={},C=null,A={},L={},I={},x=0,k=0,T=b.Loop,M=o.Easings.Linear,D=new Map,B={getState:function(){return a},easing:function(e){return d=e,s=g.Ease,I={},B},duration:function(e){return u=e,B},spring:function(e={}){s=g.Spring;let{velocity:t,mass:n,tension:i,friction:o,restDelta:r,restSpeed:a,maxSpeed:l,clamp:c}={velocity:0,mass:1,tension:170,friction:26,restDelta:.1,restSpeed:.1,maxSpeed:1/0,clamp:!0,...e};return h=t,p=n,f=i,v=o,E=r,w=a,y=l,S=c,I={},B},isRunning:function(){return a===m.Running},isSpring:function(){return s===g.Spring},from:function(e){return A={...e},B},to:function(e){return L=e,B},repeat:function(e,t=0,n=b.Loop,i){return x=e,k=t,T=n,M=i||d,B},on:function(e,t){return function(e,t){D.set(e,[...D.get(e)||[],t])}(e,t),B},off:function(e,t){return function(e,t){D.has(e)&&D.set(e,D.get(e).filter((e=>e!==t)))}(e,t),B},start:function(e){return i(A,L)||(a=m.Initializing,_={...A},N.add(this),F||=window.requestAnimationFrame(j),t(e)),B},pause:function(){return C&&=(clearTimeout(C),null),a===m.Running&&(a=m.Paused,e("pause",A)),B},end:r,tick:function(t){t>50&&(t=50),c+=t;let n=0,o=!1;if(a!==m.Running)return B;if(s===g.Ease){n=P(0,c/u,1),o=1===n;let e=T===b.Reverse?M:d;for(let t in A)A[t]=_[t]+(L[t]-_[t])*e(n)}if(s===g.Spring){let e=.001*t,n=0;for(let t in A){let i=L[t],o=A[t];if("number"!=typeof i||isNaN(i)||"number"!=typeof o||isNaN(o))continue;if(Math.abs(i-o)<=E){A[t]=i,I[t]=0;continue}I[t]||("object"==typeof h&&"number"==typeof h[t]?I[t]=h[t]:I[t]="number"==typeof h?h:0);let r=I[t];r=P(-1*Math.abs(y),r,Math.abs(y));let a=r*p*v;r+=((o>i?-1:1)*(Math.abs(i-o)*f)-a)/p*e,o+=r*e;let s=A[t]>i?o<i:o>i,l=Math.abs(r)<w&&Math.abs(i-o)<=E;S&&s&&(l=!0),l?(o=i,r=0):n++,A[t]=o,I[t]=r}o=!n}let l={...L};return e("step",A,_,L,n),o&&a===m.Running&&i(L,l)&&(a=m.Completed,r()),B},getStartValues:function(){return _},getCurrentValues:function(){return A},getCurrentVelocities:function(){return I},getEndValues:function(){return L},destroy:function(){a=m.Destroyed,C&&=(clearTimeout(C),null),_=A=L={},N.delete(this)}};return B}function r(e){return typeof TouchEvent<"u"&&e instanceof TouchEvent}function a(e,t){let n=[],i=r(e)?e[t]:e instanceof MouseEvent&&("changedTouches"===t||"mouseup"!==e.type)?[e]:[];for(let e of i)n.push({x:e.clientX,y:e.clientY,ts:Date.now()});return n}function s(e){return a(e,"touches")}function l(e){return a(e,"targetTouches")}function c(e){return a(e,"changedTouches")}function d(e){let t=e[0],n=e[1]||t;return{x:(t.x+n.x)/2,y:(t.y+n.y)/2,ts:n.ts}}function u(e){let t=e[0],n=e[1]||e[0];return t&&n?-1*Math.sqrt((n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y)):0}function h(){history.scrollRestoration&&De&&(history.scrollRestoration=De,De=void 0)}function p(){for(let e of Object.values(yt.Plugins)){let t=e.setup;"function"==typeof t&&t(yt)}}function f(e,t={}){if(!(e&&e instanceof Element))return;let n,i,o,r,a={};for(let[t,s]of yt.openers)if(t.contains(e))for(let[l,c]of s){let s;if(l){for(let n of t.querySelectorAll(l))if(n.contains(e)){s=n;break}if(!s)continue}for(let[l,d]of c){let c=null;try{c=e.closest(l)}catch{}c&&(i=t,o=s,n=c,r=l,M(a,d||{}))}}if(!i||!r||!n)return;let s=M({},ft,t,a,{triggerEl:n}),l=[].slice.call((o||i).querySelectorAll(r)),c=n.closest(".f-carousel"),d=c?.carousel;if(d&&(!o||!c.contains(o))){let e=[];for(let t of d?.getSlides()){let n=t.el;n&&(n.matches(r)?e.push(n):e.push(...[].slice.call(n.querySelectorAll(r))))}e.length&&(l=[...e],d.getPlugins().Autoplay?.pause(),d.getPlugins().Autoscroll?.pause(),s.sync=d)}if(!1===s.groupAll){let e=s.groupAttr,t=e&&n?n.getAttribute(`${e}`):"";l=e&&t&&"true"!==t?l.filter((n=>n.getAttribute(`${e}`)===t)):[n]}if(!l.length)return;s.triggerEvent?.preventDefault();let u=yt.getInstance(),h=u?.getState();if(u&&(h===C.Init||h===C.Ready)){let e=u.getOptions().triggerEl;if(e&&l.indexOf(e)>-1)return}return{...s.Carousel||{}}.rtl&&(l=l.reverse()),n&&void 0===t.startIndex&&(s.startIndex=l.indexOf(n)),yt.fromNodes(l,s
1)}var m,g,b,v,y,w,E,S,_,C;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});let A=e=>"object"==typeof e&&!!e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),L=e=>"string"==typeof e,I=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,x=function(e){var t,n=(new DOMParser).parseFromString(e,"text/html").body;if(n.childElementCount>1){for(t=document.createElement("div");n.firstChild;)t.appendChild(n.firstChild);return t}let i=n.firstChild;return!i||i instanceof HTMLElement?i:((t=document.createElement("div")).appendChild(i),t)},k=function(e,t=undefined){return!e||e===document.body||t&&e===t?null:function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=!1,n=!1;if(e.scrollWidth>e.clientWidth){let n=window.getComputedStyle(e).overflowX,i=-1!==n.indexOf("hidden"),o=-1!==n.indexOf("clip"),r=-1!==n.indexOf("visible");t=!i&&!o&&!r}if(e.scrollHeight>e.clientHeight){let t=window.getComputedStyle(e).overflowY,i=-1!==t.indexOf("hidden"),o=-1!==t.indexOf("clip"),r=-1!==t.indexOf("visible");n=!i&&!o&&!r}return t||n}(e)?e:k(e.parentElement,t)},T=(e=!0,t="--f-scrollbar-compensate",n="--f-body-margin",i="hide-scrollbar")=>{let o=document,r=o.body,a=o.documentElement;if(e){if(r.classList.contains(i))return;let e=window.innerWidth-a.getBoundingClientRect().width;e<0&&(e=0),a.style.setProperty(t,`${e}px`);let o=parseFloat(window.getComputedStyle(r).marginRight);o&&r.style.setProperty(n,`${o}px`),r.classList.add(i)}else r.classList.remove(i),r.style.setProperty(n,""),o.documentElement.style.setProperty(t,"")},M=(e,...t)=>{let n=t.length;for(let i=0;i<n;i++){let n=t[i]||{};Object.entries(n).forEach((([t,n])=>{let i=Array.isArray(n)?[]:{};e[t]||Object.assign(e,{[t]:i}),A(n)?Object.assign(e[t],M(e[t],n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})}))}return e},P=function(e=0,t=0,n=0){return Math.max(Math.min(t,n),e)},D=function(e=0,t=0,n=0,i=0,o=0,r=!1){let a=(e-t)/(n-t)*(o-i)+i;return r?i<o?P(i,a,o):P(o,a,i):a},B=(e,t="")=>{e&&e.classList&&t.split(" ").forEach((t=>{t&&e.classList.add(t)}))},O=(e,t="")=>{e&&e.classList&&t.split(" ").forEach((t=>{t&&e.classList.remove(t)}))},R=(e,t="",n)=>{e&&e.classList&&t.split(" ").forEach((t=>{t&&e.classList.toggle(t,n||!1)}))},j=function(e){for(let t of N)t.getState()===m.Running&&t.tick(q?e-q:0);q=e,F=window.requestAnimationFrame(j)};!function(e){e[e.Initializing=0]="Initializing",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Completed=3]="Completed",e[e.Destroyed=4]="Destroyed"}(m||={}),function(e){e[e.Spring=0]="Spring",e[e.Ease=1]="Ease"}(g||={}),function(e){e[e.Loop=0]="Loop",e[e.Reverse=1]="Reverse"}(b||={});let N=new Set,F=null,q=0;o.destroy=()=>{for(let e of N)e.destroy();F&&=(cancelAnimationFrame(F),null)},o.Easings={Linear:function(e){return e},EaseIn:function(e){return 0===e?0:2**(10*e-10)},EaseOut:function(e){return 1===e?1:1-2**(-10*e)},EaseInOut:function(e){return 0===e?0:1===e?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2}};let U=e=>{e.cancelable&&e.preventDefault()},$={passive:!1},W={panThreshold:5,swipeThreshold:3,ignore:["textarea","input","select","[contenteditable]","[data-selectable]","[data-draggable]"]},H=!1,z=!0,Q=(e,t)=>{function n(e){let t=u(C),n=u(A),i=t&&n?t/n:0,o={srcEvent:g,isPanRecognized:L,isSwipeRecognized:I,firstTouch:_,previousTouch:A,currentTouch:C,deltaX:P,deltaY:D,offsetX:B,offsetY:O,velocityX:R,velocityY:j,velocity:Math.abs(R)>Math.abs(j)?R:j,angle:N,axis:v,scale:i,center:b};for(let t of q.get(e)||[])t(o)}function i(e){let t=e.target,n=e.composedPath()[0],i=E.ignore.join(","),o=e=>e&&e instanceof HTMLElement&&(e.matches(i)||e.closest(i));if(o(t)||o(n))return!1}function o(e){let t=Date.now();if(F=F.filter((e=>!e.ts||e.ts>t-100)),e&&F.push(e),R=0,j=0,F.length>3){let e=F[0],t=F[F.length-1];if(e&&t){let n=t.x-e.x,i=t.y-e.y,o=e.ts&&t.ts?t.ts-e.ts:0;o>0&&(R=Math.abs(n)>3?n/(o/30):0,j=Math.abs(i)>3?i/(o/30):0)}}}function r(e){if(!S||!1===i(e))return;if(typeof MouseEvent<"u"&&e instanceof MouseEvent){if(H)return}else H=!0;if(typeof MouseEvent<"u"&&e instanceof MouseEvent){if(!e.buttons||0!==e.button)return;U(e)}e instanceof MouseEvent&&(window.addEventListener("mousemove",a),window.addEventListener("mouseup",h)),window.addEventListener("blur",p),g=e,C=l(e),_=[...C],A=[],M=C.length,b=d(C),1===M&&(L=!1,I=!1,x=!1),M&&o(d(C));let t=Date.now(),r=t-(T||t);k=r>0&&r<=250&&1===M,T=t,clearTimeout(y),n("start")}function a(e){if(!_.length||e.defaultPrevented||!1===i(e))return;g=e,A=[...C],C=s(e);let t=d(A),r=d(s(e));if(o(r),M=C.length,b=r,A.length===C.length?(P=r.x-t.x,D=r.y-t.y):(P=0,D=0),_.length){let e=d(_);B=r.x-e.x,O=r.y-e.y}if(C.length>1){let e=u(C),t=u(A);Math.abs(e-t)>=.1&&(x=!0,n("pinch"))}L||(L=Math.abs(B)>=E.panThreshold||Math.abs(O)>=E.panThreshold,L&&(z=!1,clearTimeout(w),w=void 0,N=Math.abs(180*Math.atan2(O,B)/Math.PI),v=N>45&&N<135?"y":"x",_=[...C],A=[...C],B=0,O=0,P=0,D=0,window.getSelection()?.removeAllRanges(),n("panstart"))),L&&(P||D)&&n("pan"),n("move")}function h(e){if(g=e,!_.length)return;let t=l(e),i=c(e);if(M=t.length,b=d(i),i.length&&o(d(i)),A=[...C],C=[...t],_=[...t],M>0)n("end"),L=!1,I=!1,F=[];else{let e=E.swipeThreshold;(Math.abs(R)>e||Math.abs(j)>e)&&(I=!0),L&&n("panend"),I&&n("swipe"),!L&&!I&&!x&&(n("tap"),k?n("doubleTap"):y=setTimeout((function(){n("singleTap")}),250)),n("end"),f()}}function p(){clearTimeout(y),f(),L&&n("panend"),n("end")}function f(){H=!1,L=!1,I=!1,k=!1,M=0,F=[],C=[],A=[],_=[],P=0,D=0,B=0,O=0,R=0,j=0,N=0,v=void 0,window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",h),window.removeEventListener("blur",p),!z&&!w&&(w=setTimeout((()=>{z=!0,w=void 0}),100))}function m(e){let t=e.target;H=!1,t&&!e.defaultPrevented&&(z||(U(e),e.stopPropagation()))}let g,b,v,y,w,E={...W,...t},S=!0,_=[],C=[],A=[],L=!1,I=!1,x=!1,k=!1,T=0,M=0,P=0,D=0,B=0,O=0,R=0,j=0,N=0,F=[],q=new Map,Q={init:function(){return e&&(e.addEventListener("click",m,$),e.addEventListener("mousedown",r,$),e.addEventListener("touchstart",r,$),e.addEventListener("touchmove",a,$),e.addEventListener("touchend",h),e.addEventListener("touchcancel",h)),Q},on:function(e,t){return function(e,t){q.set(e,[...q.get(e)||[],t])}(e,t),Q},off:function(e,t){return q.has(e)&&q.set(e,q.get(e).filter((e=>e!==t))),Q},enable:function(){return S=!0,Q},disable:function(){return S=!1,_.length&&(I=!1,R=0,j=0,P=0,D=0,n("end")),f(),Q},isPointerDown:()=>M>0,destroy:function(){clearTimeout(y),clearTimeout(w),w=void 0,e&&(e.removeEventListener("click",m,$),e.removeEventListener("mousedown",r,$),e.removeEventListener("touchstart",r,$),e.removeEventListener("touchmove",a,$),e.removeEventListener("touchend",h),e.removeEventListener("touchcancel",h)),e=null,f()}};return Q};Q.isClickAllowed=()=>z;let V={IMAGE_ERROR:"This image couldn't be loaded. <br /> Please try again later.",MOVE_UP:"Move up",MOVE_DOWN:"Move down",MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",TOGGLE_FULL:"Toggle zoom level",TOGGLE_1TO1:"Toggle zoom level",ITERATE_ZOOM:"Toggle zoom level",ROTATE_CCW:"Rotate counterclockwise",ROTATE_CW:"Rotate clockwise",FLIP_X:"Flip horizontally",FLIP_Y:"Flip vertically",RESET:"Reset",TOGGLE_FS:"Toggle fullscreen"},G=1e4,X=e=>{e.cancelable&&e.preventDefault()},Y=(e,t=G)=>(e=parseFloat(e+"")||0,Math.round((e+2**-52)*t)/t),J=e=>e instanceof HTMLImageElement;
1!function(e){e.Reset="reset",e.Zoom="zoom",e.ZoomIn="zoomIn",e.ZoomOut="zoomOut",e.ZoomTo="zoomTo",e.ToggleCover="toggleCover",e.ToggleFull="toggleFull",e.ToggleMax="toggleMax",e.IterateZoom="iterateZoom",e.Pan="pan",e.Swipe="swipe",e.Move="move",e.MoveLeft="moveLeft",e.MoveRight="moveRight",e.MoveUp="moveUp",e.MoveDown="moveDown",e.RotateCCW="rotateCCW",e.RotateCW="rotateCW",e.FlipX="flipX",e.FlipY="flipY",e.ToggleFS="toggleFS"}(v||={}),function(e){e.Cover="cover",e.Full="full",e.Max="max"}(y||={});let K={x:0,y:0,scale:1,angle:0,flipX:1,flipY:1};!function(e){e[e.Init=0]="Init",e[e.Loading=1]="Loading",e[e.Error=2]="Error",e[e.Ready=3]="Ready",e[e.Destroyed=4]="Destroyed"}(w||={});let Z,ee={bounds:!0,classes:{container:"f-panzoom",wrapper:"f-panzoom__wrapper",content:"f-panzoom__content",viewport:"f-panzoom__viewport"},clickAction:v.ToggleFull,dblClickAction:!1,gestures:{},height:"auto",l10n:V,maxScale:4,minScale:1,mouseMoveFactor:1,panMode:"drag",protected:!1,singleClickAction:!1,spinnerTpl:'<div class="f-spinner"></div>',wheelAction:v.Zoom,width:"auto"},te=0,ne=0,ie=0,oe=(e,t={},n={})=>{function r(e){let t=we[e];return t&&"function"==typeof t?t(Le):t}function a(){return e&&e.parentElement&&ue&&3===ye}function s(e,...t){let n=[...Ae.get(e)||[]];we.on&&n.push(we.on[e]);for(let e of n)e&&"function"==typeof e&&e(Le,...t);"*"!==e&&s("*",e,...t)}function l(e){if(!a())return;let t=e.target;if(k(t))return;let n=Date.now(),i=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}
1)),o=P(-1,i,1);s("wheel",e,o);let l=r("wheelAction");if(!l||e.defaultPrevented)return;let c=_e.scale,d=c*(o>0?1.5:.5);if(l===v.Zoom){let t=Math.abs(e.deltaY)<100&&Math.abs(e.deltaX)<100?200:45;if(n-ne<t)return void X(e);ne=n;let i=_(),r=T();if(Y(d)<Y(i)&&Y(c)<=Y(i)?(ie+=Math.abs(o),d=i):Y(d)>Y(r)&&Y(c)>=Y(r)?(ie+=Math.abs(o),d=r):(ie=0,d=P(i,d,r)),ie>7)return}switch(X(e),l){case v.Pan:N(l,{srcEvent:e,deltaX:2*-e.deltaX,deltaY:2*-e.deltaY});break;case v.Zoom:N(v.ZoomTo,{srcEvent:e,scale:d,center:{x:e.clientX,y:e.clientY}});break;default:N(l,{srcEvent:e})}}function u(t){let n=t.composedPath()[0];if(!Q.isClickAllowed()||!I(n)||t.defaultPrevented||!e?.contains(n)||n.hasAttribute("disabled")||n.hasAttribute("aria-disabled")||n.hasAttribute("data-carousel-go-prev")||n.hasAttribute("data-carousel-go-next"))return;let i=n.closest("[data-panzoom-action]"),o=i?.dataset?.panzoomAction,a=i?.dataset?.panzoomValue||"";if(o){switch(X(t),o){case v.ZoomTo:case v.ZoomIn:case v.ZoomOut:N(o,{scale:parseFloat(a||"")||void 0});break;case v.MoveLeft:case v.MoveRight:N(o,{deltaX:parseFloat(a||"")||void 0});break;case v.MoveUp:case v.MoveDown:N(o,{deltaY:parseFloat(a||"")||void 0});break;case v.ToggleFS:ce();break;default:N(o)}return}if(!ue?.contains(n))return;let s={srcEvent:t};if(N(r("clickAction"),s),r("dblClickAction")){let e=Date.now(),t=e-(te||e);te=e,t>0&&t<=250?(Z&&=void clearTimeout(Z),N(r("dblClickAction"),s)):Z=setTimeout((()=>{N(r("singleClickAction"),s)}),250)}}function h(e){if(ve=e,!a()||!w()||Se.scale<=1||_e.scale<=1||(ue?.dataset.animationName||"").indexOf("zoom")>-1)return;let t=E(_e.scale);if(!t)return;let{x:n,y:i}=t;N(v.Pan,{deltaX:n-_e.x,deltaY:i-_e.y})}function p(){e&&(O(e,"is-loading"),e.querySelector(".f-spinner")?.remove())}function f(){if(!e||!he)return;if(p(),J(he)&&(!he.complete||!he.naturalWidth))return ye=2,ue?.classList.add("has-error"),void s("error");s("loaded");let{width:t,height:n}=b();J(he)&&(he.setAttribute("width",t+""),he.setAttribute("height",n+"")),ue&&(O(ue,"has-error"),J(he)&&(ue.setAttribute("width",t+""),ue.setAttribute("height",n+""),ue.style.aspectRatio=`${t/n||""}`)),ge=o().on("start",((e,t)=>{void 0!==t.angle&&(t.angle=90*Math.round(t.angle/90)),void 0!==t.flipX&&(t.flipX=t.flipX>0?1:-1),void 0!==t.flipY&&(t.flipY=t.flipY>0?1:-1),_e={...K,...t},j(),s("animationStart")})).on("pause",(e=>{_e={...K,...e}})).on("step",(e=>{if(!a())return void ge?.end();if(Se={...K,...e},w()||!r("bounds")||ae()||_e.scale>Se.scale||_e.scale<C())return void F();let t=M(_e.scale),n=!1,i=!1,o=!1,s=!1;Se.x<t.x[0]&&(n=!0),Se.x>t.x[1]&&(i=!0),Se.y<t.y[0]&&(s=!0),Se.y>t.y[1]&&(o=!0);let l=!1,c=!1,d=!1,u=!1;_e.x<t.x[0]&&(l=!0),_e.x>t.x[1]&&(c=!0),_e.y<t.y[0]&&(u=!0),_e.y>t.y[1]&&(d=!0);let h=!1;
1(i&&c||n&&l)&&(_e.x=P(t.x[0],_e.x,t.x[1]),h=!0),(o&&d||s&&u)&&(_e.y=P(t.y[0],_e.y,t.y[1]),h=!0),h&&ge&&ge.spring({tension:94,friction:17,maxSpeed:555*_e.scale,restDelta:.1,restSpeed:.1,velocity:ge.getCurrentVelocities()}).from(Se).to(_e).start(),F()})).on("end",(()=>{me?.isPointerDown()||D(),ge?.isRunning()||(j(),s("animationEnd"))})),function(){let e=r("gestures");if(!e||!fe||!he)return;let t=!1;me=Q(fe,e).on("start",(e=>{if(!r("gestures")||!ge||!a()||w())return;let n=e.srcEvent;(Se.scale>1||re(Se.angle)||e.currentTouch.length>1)&&(n?.stopPropagation(),ge.pause(),t=!0),1===e.currentTouch.length&&s("touchStart")})).on("move",(e=>{t&&(1!==_e.scale||re(_e.angle)||e.currentTouch.length>1)&&(X(e.srcEvent),e.srcEvent?.stopPropagation())})).on("pan",(e=>{if(!t)return;let n=e.srcEvent;(1!==_e.scale||re(_e.angle)||e.currentTouch.length>1)&&(X(n),N(v.Pan,e))})).on("swipe",(e=>{t&&(_e.scale>1||re(_e.angle))&&N(v.Swipe,e)})).on("tap",(e=>{s("click",e)})).on("singleTap",(e=>{s("singleClick",e)})).on("doubleTap",(e=>{s("dblClick",e)})).on("pinch",(e=>{t&&(e.scale>C()?N(v.ZoomIn,e):e.scale<C()?N(v.ZoomOut,e):N(v.Pan,e))})).on("end",(e=>{t&&(e.currentTouch.length?(e.srcEvent.stopPropagation(),X(e.srcEvent),ge?.end()):(t=!1,j(),D(),s("touchEnd")))})).init()}(),fe&&(fe.addEventListener("wheel",l,{passive:!1}),Ce.push((()=>{fe?.removeEventListener("wheel",l,{passive:!1})}))),e?.addEventListener("click",u),document?.addEventListener("mousemove",h),Ce.push((()=>{e?.removeEventListener("click",u),document?.removeEventListener("mousemove",h)}));let i=m();Se={...i},_e={...i},ye=3,F(),j(),s("ready"),requestAnimationFrame((()=>{3===ye&&(p(),fe&&(fe.style.visibility=""))}))}function m(){let e={...r("startPos")||{}},t=e.scale,n=1;n="string"==typeof t?S(t):"number"==typeof t?t:C();let i={...K,...e,scale:n},o=w()?E(n):void 0;if(o){let{x:e,y:t}=o;i.x=e,i.y=t}return i}function g(){let e={top:0,left:0,width:0,height:0};if(ue){let t=ue.getBoundingClientRect();re(_e.angle)?(e.top=t.top+.5*t.height-.5*t.width,e.left=t.left+.5*t.width-.5*t.height,e.width=t.height,e.height=t.width):(e.top=t.top,e.left=t.left,e.width=t.width,e.height=t.height)}return e}function b(){let e=r("width"),t=r("height");if(he&&"auto"===e){let t=he.getAttribute("width");e=t?parseFloat(t+""):void 0===he.dataset.width?J(fe)?fe.naturalWidth:J(he)?he.naturalWidth:ue?.getBoundingClientRect().width||0:parseFloat(he.dataset.width+"")}else e=L(e)?parseFloat(e):e;if(he&&"auto"===t){let e=he.getAttribute("height");t=e?parseFloat(e+""):void 0===he.dataset.height?J(fe)?fe.naturalHeight:J(he)?he.naturalHeight:ue?.getBoundingClientRect().height||0:parseFloat(he.dataset.height+"")}else t=L(t)?parseFloat(t):t;return{width:e,height:t}}function y(){let e=g();return{width:e.width,height:e.height}}function w(){return"mousemove"===r("panMode")&&matchMedia("(hover: hover)").matches}function E(e){let t=ve||r("event"),n=ue?.getBoundingClientRect();if(!t||!n||e<=1)return{x:0,y:0};let i=(t.clientX||0)-n.left,o=(t.clientY||0)-n.top,{width:a,height:s}=y(),l=M(e);if(e>1){let t=r("mouseMoveFactor");t>1&&(e*=t)}let c=a*e,d=s*e,u=.5*(c-a)-i/a*100/100*(c-a),h=.5*(d-s)-o/s*100/100*(d-s);return u=P(l.x[0],u,l.x[1]),h=P(l.y[0],h,l.y[1]),{x:u,y:h}}function S(t){if(!t)return _e.scale;if(!e)return 1;let n=e.getBoundingClientRect(),i=g(),{width:o,height:a}=b(),s=e=>{if("number"==typeof e)return e;switch(e){case"min":case"base":return 1;case"cover":return Math.max(n.height/i.height,n.width/i.width)||1;case"full":case"max":{let e=re(_e.angle)?a:o;return e&&i.width?e/i.width:1}}},l=r("minScale"),c=r("maxScale"),d=Math.min(s("full"),s(l)),u="number"==typeof c?s("full")*c:Math.min(s("full"),s(c));switch(t){case"min":return d;case"base":return P(d,1,u);case"cover":return s("cover");case"full":return Math.min(u,s("full"));case"max":return u}}function _(){return S("min")}function C(){return S("base")}function A(){return S("full")}function T(){return S("max")}function M(t){let n={x:[0,0],y:[0,0]},i=e?.getBoundingClientRect();if(!i)return n;let o=g(),a=i.width,s=i.height,l=o.width,c=o.height,d=t=void 0===t?_e.scale:t,u=t;if(w()&&t>1){let e=r("mouseMoveFactor");e>1&&(l*t>a+.01&&(d*=e),c*t>s+.01&&(u*=e))}if(l*=d,c*=u,l>a){n.x[0]=.5*(a-l),n.x[1]=.5*(l-a);let e=.5*(o.left-i.left),t=.5*(o.left+o.width-i.right);n.x[0]-=e+t,n.x[1]-=e+t}if(c>s){n.y[0]=.5*(s-c),n.y[1]=.5*(c-s);let e=.5*(o.top-i.top),t=.5*(o.top+o.height-i.bottom);n.y[0]-=e+t,n.y[1]-=e+t}return n}
vendor: 5,566 bytes, line 1
1function D(){if(!a()||!r("bounds")||!ge)return;let e=_(),t=T(),n=P(e,_e.scale,t);if(_e.scale<e-.01||_e.scale>t+.01)return void N(v.ZoomTo,{scale:n});if(ge.isRunning()||ae())return;let i=M(n);_e.x<i.x[0]||_e.x>i.x[1]||_e.y<i.y[0]||_e.y>i.y[1]?(_e.x=P(i.x[0],_e.x,i.x[1]),_e.y=P(i.y[0],_e.y,i.y[1]),ge.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:ge.getCurrentVelocities()}),ge.from(Se).to(_e).start()):F()}function j(t){if(!a())return;let n=oe(),i=ae(),o=se(),r=le(),s=$(),l=W();R(ue,"is-fullsize",r),R(ue,"is-expanded",o),R(ue,"is-dragging",i),R(ue,"can-drag",n),R(ue,"will-zoom-in",s),R(ue,"will-zoom-out",l);let c=z(),d=V(),u=H(),h=!a();for(let n of(t||e)?.querySelectorAll("[data-panzoom-action]")||[]){let e=n.dataset.panzoomAction,t=!1;if(h)t=!0;else switch(e){case v.ZoomIn:c||(t=!0);break;case v.ZoomOut:u||(t=!0);break;case v.ToggleFull:{d||u||(t=!0);let e=n.querySelector("g");e&&(e.style.display=r&&!t?"none":"");break}case v.IterateZoom:{c||u||(t=!0);let e=n.querySelector("g");e&&(e.style.display=c||t?"":"none");break}case v.ToggleCover:case v.ToggleMax:c||u||(t=!0)}t?(n.setAttribute("aria-disabled",""),n.setAttribute("tabindex","-1")):(n.removeAttribute("aria-disabled"),n.removeAttribute("tabindex"))}}function N(t,n){if(!t||!e||!he||!ge||!a()||t===v.Swipe&&Math.abs(ge.getCurrentVelocities().scale)>.01)return;let o={..._e},l={..._e},u=M(w()?o.scale:Se.scale),h=ge.getCurrentVelocities(),p=g();n||={};let f=(n.currentTouch?.length||0)>1,m=n.velocityX||0,b=n.velocityY||0,y=n.center;n.srcEvent&&(y=d(c(n.srcEvent)));let S=n.deltaX||0,A=n.deltaY||0;switch(t){case v.MoveRight:S=n.deltaX||100;break;case v.MoveLeft:S=n.deltaX||-100;break;case v.MoveUp:A=n.deltaY||-100;break;case v.MoveDown:A=n.deltaY||100}let L=[];if("number"==typeof t)l.scale=t;else switch(t){case v.Reset:l={...K},l.scale=C();break;case v.ZoomTo:case v.ZoomIn:case v.ZoomOut:case v.ToggleCover:case v.ToggleFull:case v.ToggleMax:case v.IterateZoom:case v.Zoom:l.scale=U(t,n);break;case v.Pan:case v.Move:case v.MoveLeft:case v.MoveRight:case v.MoveUp:case v.MoveDown:if(ae()){let e=1,t=1;l.x<=u.x[0]&&m<=0&&(e=Math.max(.01,1-Math.abs(1/p.width*Math.abs(l.x-u.x[0]))),e*=.2),l.x>=u.x[1]&&m>=0&&(e=Math.max(.01,1-Math.abs(1/p.width*Math.abs(l.x-u.x[1]))),e*=.2),l.y<=u.y[0]&&b<=0&&(t=Math.max(.01,1-Math.abs(1/p.height*Math.abs(l.y-u.y[0]))),t*=.2),l.y>=u.y[1]&&b>=0&&(t=Math.max(.01,1-Math.abs(1/p.height*Math.abs(l.y-u.y[1]))),t*=.2),l.x+=S*e,l.y+=A*t}else l.x=P(u.x[0],l.x+S,u.x[1]),l.y=P(u.y[0],l.y+A,u.y[1]);break;case v.Swipe:let e=(e=0)=>Math.sign(e)*Math.abs(e)**1.5;l.x+=P(-1e3,e(m),1e3),l.y+=P(-1e3,e(b),1e3),b&&!m&&(l.x=P(u.x[0],l.x,u.x[1])),!b&&m&&(l.y=P(u.y[0],l.y,u.y[1])),h.x=m,h.y=b;break;case v.RotateCW:l.angle+=90;break;case v.RotateCCW:l.angle-=90;break;case v.FlipX:l.flipX*=-1;break;case v.FlipY:l.flipY*=-1}if(void 0!==Se.angle&&Math.abs(Se.angle)>=360&&(l.angle-=360*Math.floor(Se.angle/360),Se.angle-=360*Math.floor(Se.angle/360)),L.length){let e=L.findIndex((e=>e>l.scale+1/G));l.scale=L[e]||L[0]}if(f&&(l.scale=P(_()*(f?.8:1),l.scale,T()*(f?1.6:1))),w()){let e=E(l.scale);if(e){let{x:t,y:n}=e;l.x=t,l.y=n}}else if(Math.abs(l.scale-o.scale)>1e-4){let t=0,n=0;if(y)t=y.x,n=y.y;else{let i=e.getBoundingClientRect();t=i.x+.5*i.width,n=i.y+.5*i.height}let i=t-p.left,a=n-p.top;i-=.5*p.width,a-=.5*p.height;let s=(i-o.x)/o.scale,c=(a-o.y)/o.scale;l.x=i-s*l.scale,l.y=a-c*l.scale,!f&&r("bounds")&&(u=M(l.scale),l.x=P(u.x[0],l.x,u.x[1]),l.y=P(u.y[0],l.y,u.y[1]))}if(t===v.Swipe){let e=500*l.scale,t=h;ge.spring({tension:94,friction:17,maxSpeed:e,restDelta:.1,restSpeed:.1,velocity:t})}else t===v.Pan||f?ge.spring({tension:900,friction:17,restDelta:.01,restSpeed:.01,maxSpeed:1}):ge.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:h});if(0===n.velocity||i(Se,l))Se={...l},_e={...l},ge.end(),F(),j();else{if(i(_e,l))return;ge.from(Se).to(l).start()}s("action",t)}function F(){if(!he||!ue||!fe)return;let{width:e,height:t}=b();Object.assign(ue.style,{maxWidth:`min(${e}px, 100%)`,maxHeight:`min(${t}px, 100%)`});let{x:n,y:i,width:o,height:r,scale:a,angle:l,flipX:c,flipY:d}=q(),u=`translate(${Y(n,100)}px, ${Y(i,100)}px)`;u+=1!==c||1!==d?` scaleX(${Y(a*c)}) scaleY(${Y(a*d)})`:` scale(${Y(a)})`,0!==l&&(u+=` rotate(${l}deg)`),fe.style.width=`${Y(o)}px`,fe.style.height=`${Y(r)}px`,fe.style.transform=`${u}`,s("render")}function q(){let{width:t,height:n}=b(),{width:i,height:o}=y();if(!e)return{x:0,y:0,width:0,height:0,scale:0,flipX:0,flipY:0,angle:0,fitWidth:i,fitHeight:o,fullWidth:t,fullHeight:n};let{x:r,y:a,scale:s,angle:l,flipX:c,flipY:d}=Se,u=1/A(),h=t,p=n,f=Se.scale*u,m=_e.scale*u,g=Math.max(i,o),v=Math.min(i,o);t>n?(h=g,p=v):(h=v,p=g),f=t>n?g*s/t||1:g*s/n||1;let w=h?t*m:0,E=p?n*m:0;return r=r+.5*h-.5*w,a=a+.5*p-.5*E,{x:r,y:a,width:w,height:E,scale:h&&p?t*f/w:0,flipX:c,flipY:d,angle:l,fitWidth:i,fitHeight:o,fullWidth:t,fullHeight:n}}function U(e=r("clickAction"),t={}){let n=_e.scale,i=C(),o=[];if("number"==typeof e)i=e;else if(e){switch(e){case v.ZoomTo:i=t.scale||1;break;case v.ZoomIn:i=n*(t.scale||2);break;case v.ZoomOut:i=n*(t.scale||.5);break;case v.ToggleCover:o=[C(),S("cover")];break;case v.ToggleFull:o=[C(),A()];break;case v.ToggleMax:o=[C(),T()];break;case v.IterateZoom:o=[C(),A(),T()];break;case v.Zoom:{let e=A();i=n>=e-.05?C():Math.min(e,n*(t.scale||2));break}}o.length&&(i=o.find((e=>e>n+1/G))??C())}return e!==v.ZoomTo&&(i=P(_(),i,T())),i}function $(){return!!(a()&&U()>_e.scale)}function W(){return!!(a()&&U()<_e.scale)}function H(){return!!(a()&&_e.scale>
1_())}function z(){return!!(a()&&_e.scale<T())}function V(){return!!(a()&&_e.scale<A())}function oe(){return!(!a()||!se()&&!re(_e.angle)||!me||w())}function re(e){return 90===Math.abs(e%180)}function ae(){return!(!a()||!me?.isPointerDown()||w())}function se(){return!!(a()&&_e.scale>C())}function le(){return!!(a()&&_e.scale>=A())}function ce(){let t="in-fullscreen",n="with-panzoom-in-fullscreen";e?.classList.toggle(t);let i=e?.classList.contains(t);i?(document.documentElement.classList.add(n),document.addEventListener("keydown",de,!0)):(document.documentElement.classList.remove(n),document.removeEventListener("keydown",de,!0)),F(),s(i?"enterFS":"exitFS")}function de(e){"Escape"===e.key&&!e.defaultPrevented&&ce()}let ue,he,pe,fe,me,ge,be,ve,ye=0,we={...ee,...t},Ee={},Se={...K},_e={...K},Ce=[],Ae=new Map,Le={canDrag:oe,canZoomIn:z,canZoomOut:H,canZoomToFull:V,destroy:function(){s("destroy");for(let e of Object.values(Ee))e?.destroy(Le);for(let e of Ce)e();return ue&&(ue.style.aspectRatio="",ue.style.maxWidth="",ue.style.maxHeight=""),fe&&(fe.style.width="",fe.style.height="",fe.style.transform=""),ue=void 0,he=void 0,fe=void 0,Se={...K},_e={...K},ge?.destroy(),ge=void 0,me?.destroy(),me=void 0,ye=4,Le},emit:s,execute:N,getBoundaries:M,getContainer:function(){return e},getContent:function(){return he},getFullDim:b,getGestures:function(){return me},getMousemovePos:E,getOptions:function(){return we},getPlugins:function(){return Ee},getScale:S,getStartPosition:m,getState:function(){return ye},getTransform:function(e){return!0===e?_e:Se},getTween:function(){return ge},getViewport:function(){return fe},getWrapper:function(){return ue},init:function(){return ye=0,s("init"),function(){for(let[e,t]of Object.entries({...n,...we.plugins||{}}))if(e&&!Ee[e]&&t instanceof Function){let n=t();n.init(Le),Ee[e]=n}s("initPlugins")}(),function(){let t={...ee.classes,...r("classes")},n=t.content?.split(" ").shift(),i=t.wrapper?.split(" ").shift(),o=t.viewport?.split(" ").shift();if(n&&i&&o&&e&&(B(e,t.container),he=e.querySelector(`.${n}:not(.is-clone)`),he)){if(he.setAttribute("draggable","false"),ue=e.querySelector(`.${i}`),ue||(ue=document.createElement("div"),B(ue,t.wrapper),he.insertAdjacentElement("beforebegin",ue),ue.insertAdjacentElement("afterbegin",he)),fe=e.querySelector(`.${o}`),fe||(fe=document.createElement("div"),B(fe,t.viewport),ue.insertAdjacentElement("beforeend",fe)),fe.contains(he)||fe.insertAdjacentElement("afterbegin",he),pe=e.querySelector(`.${n}.is-clone`),pe||(pe=he.cloneNode(!0),pe.removeAttribute("id"),B(pe,"is-clone"),ue.insertAdjacentElement("afterbegin",pe)),he instanceof HTMLPictureElement&&(he=he.querySelector("img")),pe instanceof HTMLPictureElement&&(pe=pe.querySelector("img")),fe instanceof HTMLPictureElement&&(fe=fe.querySelector("img")),fe&&(fe.style.visibility="hidden",r("protected"))){fe.addEventListener("contextmenu",(e=>{X(e)}));let e=document.createElement("div");B(e,"f-panzoom__protected"),fe.appendChild(e)}s("initLayout")}}(),function(){if(e&&ue&&!be){let e=null;be=new ResizeObserver((()=>{a()&&(e||=requestAnimationFrame((()=>{a()&&(j(),D(),s("refresh")),e=null})))})),be.observe(ue),Ce.push((()=>{be?.disconnect(),be=void 0,e&&=(cancelAnimationFrame(e),null)}))}}(),function(){if(!e||!he)return;if(!J(he)||!J(pe))return void f();let t=()=>{he&&J(he)&&he.decode().then((()=>{f()})).catch((()=>{f()}))};ye=1,e.classList.add("is-loading"),s("loading"),pe.src&&pe.complete?t():(function(){if(!e||e?.querySelector(".f-spinner"))return;let t=r("spinnerTpl"),n=x(t);n&&(n.classList.add("f-spinner"),e.classList.add("is-loading"),ue?.insertAdjacentElement("afterbegin",n))}(),pe.addEventListener("load",t,!1),pe.addEventListener("error",t,!1),Ce.push((()=>{pe?.removeEventListener("load",t,!1),pe?.removeEventListener("error",t,!1)})))}(),Le},isDragging:ae,isExpanded:se,isFullsize:le,isMousemoveMode:w,localize:function(e,t=[]){let n=r("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,((e,t)=>n[t]||e));for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e=e.replace(/\{\{(.*?)\}\}/g,((e,t)=>t)),e},off:function(e,t){for(let n of e instanceof Array?e:[e])Ae.has(n)&&Ae.set(n,Ae.get(n).filter((e=>e!==t)));return Le},on:function(e,t){for(let n of e instanceof Array?e:[e])Ae.set(n,[...Ae.get(n)||[],t]);return Le},toggleFS:ce,updateControls:j,version:"6.1.15",willZoomIn:$,willZoomOut:W};return Le};oe.l10n={en_EN:V},oe.getDefaults=()=>ee;let re=(e,t)=>
1{let n=[];return e.childNodes.forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(!t||e.matches(t))&&n.push(e)})),n},ae={...V,ERROR:"Something went wrong. <br /> Please try again later.",NEXT:"Next page",PREV:"Previous page",GOTO:"Go to page #%d",DOWNLOAD:"Download",TOGGLE_FULLSCREEN:"Toggle full-screen mode",TOGGLE_EXPAND:"Toggle full-size mode",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_AUTOPLAY:"Toggle slideshow"};!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroyed=2]="Destroyed"}(E||={}),function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Error=2]="Error"}(S||={});let se,le,ce=e=>{e.cancelable&&e.preventDefault()},de={adaptiveHeight:!1,center:!0,classes:{container:"f-carousel",isEnabled:"is-enabled",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",hasAdaptiveHeight:"has-adaptive-height",viewport:"f-carousel__viewport",slide:"f-carousel__slide",isSelected:"is-selected"},dragFree:!1,enabled:!0,errorTpl:'<div class="f-html">{{ERROR}}</div>',fill:!0,infinite:!0,initialPage:0,l10n:ae,rtl:!1,slides:[],slidesPerPage:"auto",spinnerTpl:'<div class="f-spinner"></div>',transition:"fade",tween:{clamp:!0,mass:1,tension:160,friction:25,restDelta:1,restSpeed:1,velocity:0},vertical:!1},ue=0,he=e=>document.getElementById(`${e.split("#").pop()}`),pe=(e,t={},n={})=>{function i(e,...t){let n=ge[e];return n&&n instanceof Function?n(We,...t):n}function a(e,t=[]){let n=i("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,((e,t)=>n[t]||e));for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e=e.replace(/\{\{(.*?)\}\}/g,((e,t)=>t)),e}function s(e,...t){let n=[...$e.get(e)||[]];ge.on&&n.push(ge.on[e]);for(let e of n)e&&e instanceof Function&&e(We,...t);"click"===e&&W(t[0]),"*"!==e&&s("*",e,...t)}function l(){let e=M({},de,me),t="",r=me.breakpoints||{};for(let[n,i]of Object.entries(r))window.matchMedia(n).matches&&(t+=n,M(e,i));if(void 0===ae||t!==ae){if(ae=t,0!==fe){let t=Ne[ke]?.slides[0]?.index;void 0===t&&(t=ge.initialSlide),e.initialSlide=t,e.slides=[];for(let t of Be)t.isVirtual&&e.slides.push(t)}K(),ge=e,!1!==i("enabled")&&(fe=0,s("init"),function(){for(let[e,t]of Object.entries({...n,...ge.plugins||{}}))if(e&&!be[e]&&t instanceof Function){let n=t();n.init(We,pe),be[e]=n}s("initPlugins")}(),c(),function(){if(!ye)return;let e=i("classes")||{};Be=[],[...re(ye,`.${e.slide}`)].forEach((e=>{if(e.parentElement){let t=S({el:e,isVirtual:!1,...e.dataset||{}});s("createSlide",t),Be.push(t)}})),j();for(let e of Be)s("addSlide",e);E(i("slides"));for(let e of Be){let t=e.el;t?.parentElement===ye&&(B(t,ge.classes.slide),B(t,e.class),V(e),s("attachSlideEl",e))}s("initSlides")}(),N(),fe=1,B(ve,(i("classes")||{}).isEnabled||""),J(),f(),ne=o().on("start",(()=>{(!te||!te.isPointerDown())&&(p(),J())})).on("step",(e=>{let t=Ie;Ie=e.pos,Ie!==t&&(xe=!1,J())})).on("end",(e=>{te?.isPointerDown()||(Ie=e.pos,ne&&!_e&&(Ie<Me||Ie>Pe)?ne.spring({clamp:!0,mass:1,tension:200,friction:25,velocity:0,restDelta:1,restSpeed:1}).from({pos:Ie}).to({pos:P(Me,Ie,Pe)}).start():xe||(xe=!0,s("settle")))})),u(),function(){if(!ve||!ye)return;ve.addEventListener("click",$),document.addEventListener("mousemove",d),le||(le=function(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest("[data-carousel-target]")?.dataset?.carouselTarget;n&&he(n)?.carousel?.emit("click",e)},document.addEventListener("click",le));let e=ye.getBoundingClientRect();if(Fe=e.height,qe=e.width,!ie){let e=null;ie=new ResizeObserver((()=>{e||=requestAnimationFrame((()=>{(function(){if(1!==fe||!ye)return;let e=Ne.length,t=ye.getBoundingClientRect(),n=t.height,o=t.width;e>1&&(Ae&&Math.abs(n-Fe)<.5||!Ae&&Math.abs(o-qe)<.5)||(N(),u(),Fe=n,qe=o,(!Ae||Fe)&&(Ae||qe)&&ve&&ye&&(e!==Ne.length||!te?.isPointerDown())&&(i("dragFree")&&(_e||Ie>Me&&Ie<Pe)?(p(),J()):X(ke,{transition:!1})))})(),e=null}))})),ie.observe(ye)}}(),s("ready"))}}function c(){if(!ve)return;let e=i("classes")||{};B(ve,e.container);let t=i("style");if(t&&A(t))for(let[e,n]of Object.entries(t))ve.style.setProperty(e,n);ye=Array.from(ve.querySelectorAll(`.${e.viewport}`)).filter((t=>t.closest(`.${e.container}`)===ve)).pop()||null,ye||(ye=document.createElement("div"),B(ye,e.viewport),ye.append(...re(ve,`.${e.slide}`)),ve.insertAdjacentElement("afterbegin",ye)),ve.carousel=We,s("initLayout")}function d(e){se=e}function u(){!1===i("gestures")?te&&=void te.destroy():te||function(){let e=i("gestures");!te&&!1!==e&&ye&&(te=Q(ye,e).on("start",(e=>{if(!ne||!1===i("gestures",e))return;let{srcEvent:t}=e;Ae&&r(t)&&!k(t.target)&&ce(t),ne.pause(),ne.getCurrentVelocities().pos=0;let n=Ne[ke]?.slides[0],o=n?.el;n&&Re.has(n.index)&&o&&(Ie=n.offset||0,Ie+=(function(e){let t=window.getComputedStyle(e),n=new DOMMatrixReadOnly(t.transform);return{width:n.m41||0,height:n.m42||0}}(o)[Le]||0)*(Ce&&!Ae?1:-1)),q(),_e||(Ie<Me||Ie>Pe)&&ne.spring({clamp:!0,mass:1,tension:500,friction:25,velocity:ne.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:Ie}).to({pos:P(Me,Ie,Pe)}).start()})).on("move",(e=>{if(!1===i("gestures",e))return;let{srcEvent:t,axis:n,deltaX:o,deltaY:a}=e;if(r(t)&&t.touches?.length>1)return;let s=t.target,l=k(s),c=l?l.scrollHeight>l.clientHeight?"y":"x":void 0;if(l&&l!==ye&&(!n||n===c))return;if(!n)return ce(t),t.stopPropagation(),void t.stopImmediatePropagation();if("y"===n&&!Ae||"x"===n&&Ae||(ce(t),t.stopPropagation(),!ne))return;let d=Ce&&!Ae?1:-1,u=Ae?a:o,h=ne?.isRunning()?ne.getEndValues().pos:Ie,p=1;_e||(h<=Me&&u*d<0?(p=Math.max(.01,1-(Math.abs(1/v()*Math.abs(h-Me))||0)),p*=.2):h>=Pe&&u*d>0&&(p=Math.max(.01,1-(Math.abs(1/v()*Math.abs(h-Pe))||0)),p*=.2)),h+=u*p*d,ne.spring({clamp:!0,mass:1,tension:700,friction:25,velocity:ne.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:Ie}).to({pos:h}).start()})).on("panstart",(e=>{!1!==i("gestures",e)&&e?.axis===(Ae?"y":"x")&&B(ye,"is-dragging")})).on("panend",(e=>{!1!==i("gestures",e)&&O(ye,"is-dragging")})).on("end",(e=>{if(!1===i("gestures",e))return;let{srcEvent:t,axis:n,velocityX:o,velocityY:a,currentTouch:l}=e;if(l.length>0||!ne)return;let c=t.target,d=k(c),u=d?d.scrollHeight>d.clientHeight?"y":"x":void 0,h=d&&(!n||n===u);Ae&&r(t)&&!n&&$(t);let p=Ne.length,f=i("dragFree");if(!p)return;let m=h?0:i("vertical")?a:o;n!==(Ae?"y":"x")&&(m=0);let b=ne?.isRunning()?ne.getEndValues().pos:Ie,y=Ce&&!Ae?1:-1;if(h||(b+=m*(f?5:1)*y),!_e&&(m*y<=0&&b<Me||m*y>=0&&b>Pe)){let e=0;return Math.abs(m)>0&&(e=2*Math.abs(m),e=Math.min(.3*v(),e)),b=P(Me+-1*e,b,Pe+e),void ne.spring({clamp:!0,mass:1,tension:380,friction:25,velocity:-1*m,restDelta:1,restSpeed:1}).from({pos:Ie}).to({pos:b}).start()}if(f||be.Autoscroll?.isEnabled())return void(Math.abs(m)>10?ne.spring({clamp:!0,mass:1,tension:150,friction:25,velocity:-1*m,restDelta:1,restSpeed:1}).from({pos:Ie}).to({pos:b}).start():ne.isRunning()||xe||(xe=!0,s("settle")));if(!f&&!be.Autoscroll?.isEnabled()&&(!e.offsetX&&!e.offsetY||"y"===n&&!Ae||"x"===n&&Ae))return void X(ke,{transition:"tween"});let w=g(b);Math.abs(m)>10&&w===ke&&(w+=m>0?Ce&&!Ae?1:-1:Ce&&!Ae?-1:1),X(w,{transition:"tween",tween:{velocity:-1*m}}
vendor: 5,127 bytes, line 1
1)})).init())}(),R(ye,"is-draggable",!!te&&Ne.length>0)}function h(e="*"){let t=[];for(let n of Be)("*"===e||n.class&&n.class.includes(e)||n.el&&n.el?.classList.contains(e))&&t.push(n);oe=void 0,De=e,Oe=[...t]}function p(){if(!ne)return;let e=g(ne?.isRunning()?ne.getEndValues().pos:Ie);e!==ke&&(oe=ke,ke=e,V(),f(),m(),s("change",ke,oe))}function f(){if(!ve)return;for(let e of ve.querySelectorAll("[data-carousel-index]"))e.innerHTML=ke+"";for(let e of ve.querySelectorAll("[data-carousel-page]"))e.innerHTML=ke+1+"";for(let e of ve.querySelectorAll("[data-carousel-pages]"))e.innerHTML=Ne.length+"";let e=i("classes")||{},t=Array.from(ve.querySelectorAll("[data-carousel-go-to]")).filter((t=>t.closest(`.${e.container}`)===ve));for(let e of t)parseInt(e.dataset?.carouselGoTo||"-1",10)===ke?e.setAttribute("aria-current","true"):e.removeAttribute("aria-current");for(let e of ve.querySelectorAll("[data-carousel-go-prev]"))e.toggleAttribute("aria-disabled",!Z()),Z()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");for(let e of ve.querySelectorAll("[data-carousel-go-next]"))e.toggleAttribute("aria-disabled",!ee()),ee()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");let n=!1,o=Ne[ke]?.slides[0];o&&(o.downloadSrc||"image"===o.type&&o.src)&&(n=!0);for(let e of ve.querySelectorAll("[data-carousel-download]"))e.toggleAttribute("aria-disabled",!n)}function m(e){e||=Ne[ke]?.slides[0];let t=e?.el;if(t)for(let n of t.querySelectorAll("[data-slide-index]"))n.innerHTML=e.index+1+""}function g(e){if(!Ne.length)return 0;let t=y(),n=e;_e?n-=Math.floor((e-Ne[0]?.pos)/t)*t||0:n=P(Ne[0]?.pos,e,Ne[Ne.length-1]?.pos);let i=new Map,o=0;for(let e of Ne){let r=Math.abs(e.pos-n),a=Math.abs(e.pos-n-t),s=Math.abs(e.pos-n+t),l=Math.min(r,a,s);i.set(o,l),o++}let r=i.size>0?[...i.entries()].reduce(((e,t)=>t[1]<e[1]?t:e)):[ke,0];return parseInt(r[0])}function b(){return Ue}function v(){return we}function y(e=!0){return Oe.length?Oe.reduce(((e,t)=>e+t.dim),0)+(Oe.length-(_e&&e?0:1))*Ue:0}function w(e){let t=y(),n=v();if(!t||!ye||!n)return[];let i=[];e=void 0===e?Ie:e,_e&&(e-=Math.floor(e/t)*t||0);let o=0;for(let r of Oe){let a=(t=0)=>{i.indexOf(r)>-1||(r.pos=o-e+t||0,r.offset+t>e-r.dim-Ee+.51&&r.offset+t<e+n+Se-.51&&i.push(r))};r.offset=o,_e&&(a(t),a(-1*t)),a(),o+=r.dim+Ue}return i}function E(e,t){let n=[];for(let t of Array.isArray(e)?e:[e]){let e=S({...t,isVirtual:!0});e.el||=document.createElement("div"),s("createSlide",e),n.push(e)}Be.splice(void 0===t?Be.length:t,0,...n),j();for(let e of n)s("addSlide",e),_(e);return h(De),n}function S(e){return(L(e)||e instanceof HTMLElement)&&(e={html:e}),{index:-1,el:void 0,class:"",isVirtual:!0,dim:0,pos:0,offset:0,html:"",src:"",...e}}function _(e){let t=e.el;if(!e||!t)return;let n=e.html?e.html instanceof HTMLElement?e.html:x(e.html):void 0;n&&(B(n,"f-html"),e.htmlEl=n,B(t,"has-html"),t.append(n),s("contentReady",e))}function C(e){if(!ye||!e)return;let t=e.el;if(t){if(t.setAttribute("index",e.index+""),t.parentElement!==ye){let n;B(t,ge.classes.slide),B(t,e.class),V(e);for(let t of Be)if(t.index>e.index){n=t.el;break}ye.insertBefore(t,n&&ye.contains(n)?n:null),s("attachSlideEl",e)}return m(e),t}}function T(e){let t=e?.el;t&&(t.remove(),F(t),s("detachSlideEl",e))}function j(){for(let e=0;e<Be.length;e++){let t=Be[e],n=t.el;n&&(t.index!==e&&F(n),n.setAttribute("index",`${e}`)),t.index=e}}function N(){if(!ve||!ye)return;Ce=i("rtl"),Ae=i("vertical"),Le=Ae?"height":"width";let e=i("classes");if(R(ve,e.isLTR,!Ce),R(ve,e.isRTL,Ce),R(ve,e.isHorizontal,!Ae),R(ve,e.isVertical,Ae),R(ve,e.hasAdaptiveHeight,i("adaptiveHeight")),we=0,Ee=0,Se=0,Ue=0,ye){ye.childElementCount||(ye.style.display="grid");let e=ye.getBoundingClientRect();we=ye.getBoundingClientRect()[Le]||0;let t=window.getComputedStyle(ye);Ue=parseFloat(t.getPropertyValue("--f-carousel-gap"))||0,"visible"===t.getPropertyValue("overflow-"+(Ae?"y":"x"))&&(Ee=Math.abs(e[Ae?"top":"left"]),Se=Math.abs(window[Ae?"innerHeight":"innerWidth"]-e[Ae?"bottom":"right"])),ye.style.display=""}if(!we)return;let t=function(){let e=0;if(ye){let t=document.createElement("div");t.style.display="block",B(t,ge.classes.slide),ye.appendChild(t),e=t.getBoundingClientRect()[Le],t.remove(),t=void 0}return e}();for(let e of Oe){let n=e.el,i=0;if(!e.isVirtual&&n&&I(n)){let e=!1;(!n.parentElement||n.parentElement!==ye)&&(ye.appendChild(n),e=!0),i=n.getBoundingClientRect()[Le],e&&n.parentElement?.removeChild(n)}else i=t;e.dim=i}if(_e=!1,i("infinite")){_e=!0;let e=y(),t=we+Ee+Se;for(let n=0;n<Oe.length;n++){let i=Oe[n]?.dim+Ue;if(e-i<t&&e-i-t<i){_e=!1;break}}}(function(){if(!ve)return;let e=v(),t=y(!1),n=i("slidesPerPage");n="auto"===n?1/0:parseFloat(n+""),Ne=[];let o=0,r=0;for(let t of Oe)(!Ne.length||o+t.dim-e>.05||r>=n)&&(Ne.push({index:Ne.length,slides:[],dim:0,offset:0,pos:0}),o=0,r=0),Ne[Ne.length-1]?.slides.push(t),o+=t.dim+Ue,r++;let a=i("center"),s=i("fill"),l=0;for(let n of Ne){n.dim=(n.slides.length-1)*Ue;for(let e of n.slides)n.dim+=e.dim;n.offset=l,n.pos=l,!1!==a&&(n.pos-=.5*(e-n.dim)),s&&!_e&&t>e&&(n.pos=P(0,n.pos,t-e)),l+=n.dim+Ue}let c,d=[];for(let e of Ne){let t={...e};
1c&&Math.abs(t.pos-c.pos)<.1?(c.dim+=t.dim,c.slides=[...c.slides,...t.slides]):(c=t,t.index=d.length,d.push(t))}Ne=d,ke=P(0,ke,Ne.length-1)})(),Me=Ne[0]?.pos||0,Pe=Ne[Ne.length-1]?.pos||0,0===fe?function(){oe=void 0,ke=i("initialPage");let e=i("initialSlide")||void 0;void 0!==e&&(ke=We.getPageIndex(e)||0),ke=P(0,ke,Ne.length-1),Ie=Ne[ke]?.pos||0,Te=Ie}():Te=Ne[ke||0]?.pos||0,s("refresh"),f()}function F(e){if(!e||!I(e))return;let t=parseInt(e.getAttribute("index")||"-1"),n="";for(let t of Array.from(e.classList)){let e=t.match(/^f-(\w+)(Out|In)$/);e&&e[1]&&(n=e[1]+"")}if(!e||!n)return;let i=[`f-${n}Out`,`f-${n}In`,"to-prev","to-next","from-prev","from-next"];e.removeEventListener("animationend",U),O(e,i.join(" ")),Re.delete(t)}function q(){if(!ye)return;let e=Re.size>0;for(let e of Oe)F(e.el);Re.clear(),e&&J()}function U(e){"f-"===e.animationName?.substring(0,2)&&(F(e.target),Re.size||(O(ve,"in-transition"),!xe&&Math.abs(We.getPosition(!0)-Te)<.5&&(xe=!0,s("settle"))),J())}function $(e){W(e),s("click",e)}function W(e){if(e.defaultPrevented)return;let t=e.composedPath()[0],n=t.closest("[data-carousel-target]")?.dataset?.carouselTarget;if(n&&he(n)!==ve)return;if(t.closest("[data-carousel-go-prev]"))return ce(e),void We.prev();if(t.closest("[data-carousel-go-next]"))return ce(e),void We.next();let i=t.closest("[data-carousel-go-to]");if(i)return ce(e),void We.goTo(parseFloat(i.dataset.carouselGoTo||"")||0);if(t.closest("[data-carousel-download]")){ce(e);let t=Ne[ke]?.slides[0];if(t&&(t.downloadSrc||"image"===t.type&&t.src)){let e=t.downloadFilename,n=document.createElement("a"),i=t.downloadSrc||t.src||"";n.href=i,n.target="_blank",n.download=e||i,n.click()}}}function H(e){let t=e.el;t&&t.querySelector(".f-spinner")?.remove()}function z(e){let t=e.el;t&&(t.querySelector(".f-html.is-error")?.remove(),O(t,"has-error"))}function V(e){e||=Ne[ke]?.slides[0];let t=e?.el;if(!t)return;let n=i("formatCaption",e);void 0===n&&(n=e.caption),n||="";let o=i("captionEl");if(o&&o instanceof HTMLElement){if(e.index!==ke)return;if(L(n)&&(o.innerHTML=a(n+"")),n instanceof HTMLElement){if(n.parentElement===o)return;o.innerHTML="",n.parentElement&&(n=n.cloneNode(!0)),o.append(n)}return}if(!n)return;let r=e.captionEl||t.querySelector(".f-caption");!r&&n instanceof HTMLElement&&n.classList.contains("f-caption")&&(r=n),r||(r=document.createElement("div"),B(r,"f-caption"),L(n)?r.innerHTML=a(n+""):n instanceof HTMLElement&&(n.parentElement&&(n=n.cloneNode(!0)),r.append(n)));let s=`f-caption-${ue}_${e.index}`;r.setAttribute("id",s),r.dataset.selectable="true",B(t,"has-caption"),t.setAttribute("aria-labelledby",s),e.captionEl=r,t.insertAdjacentElement("beforeend",r)}function G(e,t){if(!(ve&&we&&ne&&t&&L(t)&&"tween"!==t))return!1;for(let e of je)if(we-e.dim>.5)return!1;if(Ee>.5||Se>.5)return;let n=Ne.length,i=e>ke?1:-1;e=_e?(e%n+n)%n:P(0,e,n-1),Ce&&(i*=-1);let o=Ne[ke]?.slides[0],r=o?.index,a=Ne[e]?.slides[0],s=a?.index,l=Ne[e]?.pos;if(void 0===s||void 0===r||r===s||Ie===l||Math.abs(we-(a?.dim||0))>1)return!1;xe=!1,ne.pause(),q(),B(ve,"in-transition"),Ie=Te=l;let c=C(o),d=C(a);return p(),c&&(Re.add(r),c.style.transform="",c.addEventListener("animationend",U),O(c,ge.classes.isSelected),c.inert=!1,B(c,`f-${t}Out to-${i>0?"next":"prev"}`)),d&&(Re.add(s),d.style.transform="",d.addEventListener("animationend",U),B(d,ge.classes.isSelected),d.inert=!1,B(d,`f-${t}In from-${i>0?"prev":"next"}`)),J(),!0}function X(e,t={}){let{transition:n,tween:i}={transition:ge.transition,tween:ge.tween,...t||{}};if(!ve||!ne)return;let o=Ne.length;if(!o||G(e,n))return;e=_e?(e%o+o)%o:P(0,e,o-1),Te=Ne[e||0]?.pos||0;let r=ne.isRunning()?ne.getEndValues().pos:Ie;if(Math.abs(Te-r)<1)return Ie=Te,ke!==e&&(V(),oe=ke,ke=e,f(),m(),s("change",ke,oe)),J(
1),void(xe||(xe=!0,s("settle")));if(ne.pause(),q(),_e){let e=y(),t=Math.floor((r-Ne[0]?.pos)/e)||0,n=Te+t*e;Te=[n+e,n,n-e].reduce((function(e,t){return Math.abs(t-r)<Math.abs(e-r)?t:e}))}!1!==n&&A(i)?ne.spring(M({},ge.tween,i)).from({pos:Ie}).to({pos:Te}).start():(Ie=Te,p(),J(),xe||(xe=!0,s("settle")))}function Y(e){let t=Ie;if(_e&&!0!==e){let e=y();t-=(Math.floor((Ie-Ne[0]?.pos||0)/e)||0)*e}return t}function J(){if(!ve||!ye)return;je=w();let e,t=new Set,n=[],o=Ne[ke],r=ge.setTransform;for(let r of Oe){let a=Re.has(r.index),s=je.indexOf(r)>-1,l=o?.slides?.indexOf(r)>-1;if(r.isVirtual&&!a&&!s)continue;let c=C(r);if(c&&(n.push(r),l&&t.add(c),i("adaptiveHeight")&&l)){let t=(c.lastElementChild||c).getBoundingClientRect().height;e=null==e?t:Math.max(e,t)}}ye&&e&&(ye.style.height=`${e}px`),[...re(ye,`.${ge.classes.slide}`)].forEach((e=>{R(e,ge.classes.isSelected,t.has(e));let n=Be[parseInt(e.getAttribute("index")||"-1")];if(!n)return e.remove(),void F(e);let i=Re.has(n.index),o=je.indexOf(n)>-1;if(n.isVirtual&&!i&&!o)return void T(n);if(e.inert=!o,!1===r)return;let a=n.pos?Math.round(1e4*n.pos)/1e4:0,s=0,l=0,c=0,d=0;i||(s=Ae?0:Ce?-1*a:a,l=Ae?a:0,c=D(s,0,n.dim,0,100),d=D(l,0,n.dim,0,100)),r instanceof Function&&!i?r(We,n,{x:s,y:l,xPercent:c,yPercent:d}):e.style.transform=s||l?`translate3d(${c}%, ${d}%,0)`:""})),s("render",n)}function K(){ve?.removeEventListener("click",$),document.removeEventListener("mousemove",d),Re.clear(),ie?.disconnect(),ie=void 0;for(let e of Be){let t=e.el;t&&I(t)&&(e.state=void 0,H(e),z(e),e.isVirtual?(T(e),e.el=void 0):(F(t),t.style.transform="",ye&&!ye.contains(t)&&ye.appendChild(t)))}for(let e of Object.values(be))e?.destroy();be={},te?.destroy(),te=void 0,ne?.destroy(),ne=void 0;for(let[e,t]of Object.entries(ge.classes||{}))"container"!==e&&O(ve,t);O(ye,"is-draggable")}function Z(){return _e||ke>0}function ee(){return _e||ke<Ne.length-1}ue++;let te,ne,ie,oe,ae,fe=0,me={...de},ge={...de},be={},ve=null,ye=null,we=0,Ee=0,Se=0,_e=!1,Ce=!1,Ae=!1,Le="height",Ie=0,xe=!0,ke=0,Te=0,Me=0,Pe=0,De="*",Be=[],Oe=[],Re=new Set,je=[],Ne=[],Fe=0,qe=0,Ue=0,$e=new Map,We={add:function(e,t){let n=Ie,i=ke,o=y(),r=ne?.isRunning()?ne.getEndValues().pos:Ie,a=o&&Math.floor((r-(Ne[0]?.pos||0))/o)||0;return E(e,t),h(De),N(),ne&&o&&(i===ke&&(n-=a*o),n===Te?Ie=Te:ne.spring({clamp:!0,mass:1,tension:300,friction:25,restDelta:1,restSpeed:1}).from({pos:n}).to({pos:Te}).start()),J(),We},canGoPrev:Z,canGoNext:ee,destroy:function(){return s("destroy"),window.removeEventListener("resize",l),K(),$e.clear(),ve=null,Ne=[],Be=[],ge={...de},be={},Oe=[],ae=void 0,De="*",fe=2,We},emit:s,filter:function(e="*"){return h(e),N(),Ie=P(Me,Ie,Pe),J(),s("filter",e),We},getContainer:function(){return ve},getGapDim:b,getGestures:function(){return te},getLastMouseMove:function(){return se},getOption:function(e){return i(e)},getOptions:function(){return ge},getPage:function(){return Ne[ke]},getPageIndex:function(e){if(void 0!==e){for(let t of Ne||[])for(let n of t.slides)if(n.index===e)return t.index;return-1}return ke},getPageIndexFromPosition:g,getPageProgress:function(e,t){void 0===e&&(e=ke);let n=Ne[e];if(!n)return e>ke?-1:1;let i=y(),o=b(),r=n.pos,a=Y();if(_e&&!0!==t){let e=Math.floor((a-Ne[0]?.pos)/i)||0;a-=e*i,r=[r+i,r,r-i].reduce((function(e,t){return Math.abs(t-a)<Math.abs(e-a)?t:e}))}return(a-r)/(n.dim+o)||0},getPageVisibility:function(e){void 0===e&&(e=ke);let t=Ne[e];if(!t)return e>ke?-1:1;let n=Y(),i=v(),o=t.pos;if(_e){let e=y(),t=o+(Math.floor((n-Ne[0]?.pos)/e)||0)*e;o=[t+e,t,t-e].reduce((function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e}))}return o>n&&o+t.dim<n+i?1:o<n?(o+t.dim-n)/t.dim||0:o+t.dim>n+i&&(n+i-o)/t.dim||0},getPages:function(){return Ne},getPlugins:function(){return be},getPosition:Y,getSlides:function(){return Be},getState:function(){return fe},getTotalSlideDim:y,getTween:function(){return ne},getViewport:function(){return ye},getViewportDim:v,getVisibleSlides:function(e){return void 0===e?je:w(e)},goTo:X,hasNavigated:function(){return void 0!==oe},hideError:z,hideLoading:H,init:function(){if(!e||!I(e))throw Error("No Element found");return 0!==fe&&(K(),fe=0),ve=e,me=t,window.removeEventListener("resize",l),me.breakpoints&&window.addEventListener("resize",l),l(),We},isInfinite:function(){return _e},isInTransition:function(){return Re.size>0},isRTL:function(){return Ce},isSettled:function(){return xe},isVertical:function(){return Ae},localize:a,next:function(e={}){return X(ke+1,e),We},off:function(e,t){for(let n of e instanceof Array?e:[e])$e.has(n)&&$e.set(n,$e.get(n).filter((e=>e!==t)));return We},on:function(e,t){for(let n of e instanceof Array?e:[e])$e.set(n,[...$e.get(n)||[],t]);return We},prev:function(e={}){return X(ke-1,e),We},reInit:function(e={},i){return K(),fe=0,ae=void 0,De="*",t=e,me=e,A(i)&&(n=i),l(),We},remove:function(e){void 0===e&&(e=Be.length-1);let t=Be[e];return t&&(s("removeSlide",t),t.el&&=(F(t.el),void t.el.remove()),Be.splice(e,1),h(De),N(),Ie=P(Me,Ie,Pe),J()),We},setPosition:function(e){Ie=e,p(),J()},showError:function(e,t){if(1===fe){H(e),z(e);let n=e.el;if(n){let i=document.createElement("div");B(i,"f-html"),B(i,"is-error"),i.innerHTML=a(t||"<p>{{ERROR}}</p>"),e.htmlEl=i,B(n,"has-html has-error"),n.insertAdjacentElement("afterbegin",i),s("contentReady",e)}}return We},showLoading:function(e){let t=e.el,n=t?.querySelector(".f-spinner");if(!t||n)return We;let o=i("spinnerTpl"),r=x(o);return r&&(B(r,"f-spinner"),t.insertAdjacentElement("beforeend",r)),We},version:"6.1.15"};return We};pe.l10n={en_EN:ae},pe.getDefaults=()=>de;let fe=function(e="",t="",n=""){return e.split(t).join(n)},me={tpl:e=>`<img class="f-panzoom__content" \n ${e.srcset?'data-lazy-srcset="{{srcset}}"':""} \n ${e.sizes?'data-lazy-sizes="{{sizes}}"':""} \n data-lazy-src="{{src}}" alt="{{alt}}" />`},ge=()=>{function e(e,t){let n=c?.getOptions().Zoomable,i=(A(n)?{...me,...n}:me)[e];return i&&"function"==typeof i&&t?i(t):i}function t(){c&&!1!==c.getOptions().Zoomable&&(c.on("addSlide",o),c.on("removeSlide",r),c.on("attachSlideEl",a),c.on("click",i),c.on("change",n),c.on("ready",n))}function n(){s();let e=c?.getVisibleSlides()||[];if(e.length>1||"slide"===c?.getOption("transition"))for(let t of e){let e=t.panzoomRef;e&&(c?.getPage().slides||[]).indexOf(t)<0&&e.execute(v.ZoomTo,{...e.getStartPosition()})}}function i(e,t){let n=t.target;
1n&&!t.defaultPrevented&&n.dataset.panzoomAction&&l(n.dataset.panzoomAction)}function o(t,n){let i=n.el;if(!c||!i||n.panzoomRef)return;let o=n.src||n.lazySrc||"",r=n.alt||n.caption||`Image #${n.index}`,a=n.srcset||n.lazySrcset||"",l=n.sizes||n.lazySizes||"";if(o&&L(o)&&!n.html&&(!n.type||"image"===n.type)){n.type="image",n.thumbSrc=n.thumbSrc||o;let t=e("tpl",n);t=fe(t,"{{src}}",o+""),t=fe(t,"{{srcset}}",a+""),t=fe(t,"{{sizes}}",l+""),i.insertAdjacentHTML("afterbegin",t)}let d=i.querySelector(".f-panzoom__content");if(!d)return;d.setAttribute("alt",r+"");let u=n.width&&"auto"!==n.width?parseFloat(n.width+""):"auto",h=n.height&&"auto"!==n.height?parseFloat(n.height+""):"auto",p=oe(i,{width:u,height:h,classes:{container:"f-zoomable"},event:()=>c?.getLastMouseMove(),spinnerTpl:()=>c?.getOption("spinnerTpl")||"",...e("Panzoom")});p.on("*",((e,t,...i)=>{c&&("loading"===t&&(n.state=0),"loaded"===t&&(n.state=1),"error"===t&&(n.state=2,c?.showError(n,"{{IMAGE_ERROR}}")),c.emit(`panzoom:${t}`,n,...i),"loading"===t&&c.emit("contentLoading",n),"ready"===t&&c.emit("contentReady",n),n.index===c?.getPageIndex()&&s())})),n.panzoomRef=p}function r(e,t){t.panzoomRef&&=void t.panzoomRef.destroy()}function a(e,t){let n=t.panzoomRef;if(n)switch(n.getState()){case 0:n.init();break;case 3:n.execute(v.ZoomTo,{...n.getStartPosition(),velocity:0})}}function s(){let e=c?.getContainer()||void 0,t=c?.getPage()?.slides[0]?.panzoomRef;if(e)if(t)t.updateControls(e);else for(let t of e.querySelectorAll("[data-panzoom-action]")||[])t.setAttribute("aria-disabled",""),t.setAttribute("tabindex","-1")}function l(e,...t){c?.getPage().slides[0].panzoomRef?.execute(e,...t)}let c;return{init:function(e){c=e,c.on("initPlugins",t)},destroy:function(){if(c){c.off("initPlugins",t),c.off("addSlide",o),c.off("removeSlide",r),c.off("attachSlideEl",a),c.off("click",i),c.off("change",n),c.off("ready",n);for(let e of c.getSlides())r(0,e)}c=void 0},execute:l}},be={syncOnChange:!1,syncOnClick:!0,syncOnHover:!1},ve=()=>{function e(){let e=d?.getOptions().Sync;return A(e)?{...be,...e}:be}function t(){let t=e().target;d&&t&&function(t){d&&t&&(u=t,d.getOptions().classes={...d.getOptions().classes,isSelected:""},d.getOptions().initialSlide=u.getPage()?.slides[0]?.index||0,e().syncOnChange&&d.on("change",i),e().syncOnClick&&d.on("click",r),e().syncOnHover&&d.getViewport()?.addEventListener("mouseover",a),d&&u&&(d.on("ready",n),d.on("refresh",s),u.on("change",o),u.on("filter",l)))}(t)}function n(){c()}function i(){if(d&&u){let e=d.getPage()?.slides||[],t=u.getPageIndex(e[0].index||0);t>-1&&u.goTo(t,d.hasNavigated()?void 0:{tween:!1,transition:!1}),c()}}function o(){if(d&&u){let e=d.getPageIndex(u.getPage()?.slides[0].index||0);e>-1&&d.goTo(e,u.hasNavigated()?void 0:{tween:!1,transition:!1}),c()}}function r(e,t){if(!d||!u||d.getTween()?.isRunning())return;let n=d?.getOptions().classes.slide;if(!n)return;let i=t.target.closest(`.${n}`);
1if(i){let e=parseInt(i.getAttribute("index")||"")||0,t=u.getPageIndex(e);u.goTo(t)}}function a(e){d&&r(0,e)}function s(){if(d&&u){let e=d.getPageIndex(u.getPage()?.slides[0].index||0);e>-1&&d.goTo(e,{tween:!1,transition:!1}),c()}}function l(e,t){d&&u&&(d.filter(t),o())}function c(){if(!u)return;let e=u.getPage()?.slides[0]?.index||0;for(let t of d?.getSlides()||[])t.el?.classList.toggle("is-selected",t.index===e)}let d,u;return{init:function(e){d=e,d.on("initSlides",t)},destroy:function(){d?.off("ready",n),d?.off("refresh",s),d?.off("change",i),d?.off("click",r),d?.getViewport()?.removeEventListener("mouseover",a),u?.off("change",o),u?.off("filter",l),u=void 0,d?.off("initSlides",t),d=void 0},getTarget:function(){return u}}},ye={showLoading:!0,preload:1},we="is-lazyloading",Ee="is-lazyloaded",Se="has-lazyerror",_e=()=>{function e(){let e=i?.getOptions().Lazyload;return A(e)?{...ye,...e}:ye}function t(t){let n=t.el;if(!n)return;let o=e(),r="[data-lazy-src],[data-lazy-srcset],[data-lazy-bg]",a=Array.from(n.querySelectorAll(r));n.matches(r)&&a.push(n);for(let e of a){let n=e.dataset.lazySrc,r=e.dataset.lazySrcset,a=e.dataset.lazySizes,s=e.dataset.lazyBg,l=(e instanceof HTMLImageElement||e instanceof HTMLSourceElement)&&(n||r),c=!!s;if(!l&&!c)continue;let d=n||r||s;if(d){if(l){let s=e.parentElement?.classList.contains("f-panzoom__wrapper");o.showLoading&&i?.showLoading(t),e.addEventListener("load",(()=>{i?.hideLoading(t),O(e,Se),e instanceof HTMLImageElement?e.decode().finally((()=>{O(e,we),B(e,Ee)})).catch((()=>{})):(O(e,we),B(e,Ee)),s||i?.emit("lazyLoad:loaded",t,e,d)})),e.addEventListener("error",(()=>{i?.hideLoading(t),O(e,we),B(e,Se),s||i?.emit("lazyLoad:error",t,e,d)})),e.classList.add("f-lazyload"),e.classList.add(we),s||i?.emit("lazyLoad:load",t,e,d),n&&(e.src=n),r&&(e.srcset=r),a&&(e.sizes=a)}else c&&(e.style.backgroundImage=`url('${s}')`);delete e.dataset.lazySrc,delete e.dataset.lazySrcset,delete e.dataset.lazySizes,delete e.dataset.lazyBg}}}function n(){if(!i)return;let n=[...i.getVisibleSlides()],o=e().preload;if(o>0){let e=i.getPosition(),t=i.getViewportDim();n.push(...i.getVisibleSlides(e+t*o),...i.getVisibleSlides(e-t*o))}for(let e of n)t(e)}let i;return{init:function(e){i=e,i.on("render",n)},destroy:function(){i?.off("render",n),i=void 0}}},Ce={prevTpl:'<svg width="24" height="24" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"></path></svg>',nextTpl:'<svg width="24" height="24" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"></path></svg>'},Ae=()=>{function e(){let e=o?.getOptions().Arrows;return A(e)?{...Ce,...e}:Ce}function t(t){let n=e(),i=`<button data-carousel-go-${t} tabindex="0" class="f-button is-arrow is-${t}" title="{{${t.toUpperCase()}}}">`+n[`${t}Tpl`]+"</button>",r=x(o.localize(i))||void 0;return r&&B(r,n[`${t}Class`]),r}function n(){r?.remove(),r=void 0,a?.remove(),a=void 0,o?.getContainer()?.classList.remove("has-arrows")}function i(){o&&!1!==o.getOptions().Arrows&&o.getPages().length>1?(function(){if(!o)return;let e=o.getViewport();e&&(r||(r=t("prev"),r&&e.insertAdjacentElement("beforebegin",r)),a||(a=t("next"),a&&e.insertAdjacentElement("afterend",a)),R(o.getContainer(),"has-arrows",!0))}(),o&&(r?.toggleAttribute("aria-disabled",!o.canGoPrev()),a?.toggleAttribute("aria-disabled",!o.canGoNext()))):n()}let o,r,a;return{init:function(e){o=e.on(["change","refresh"],i)},destroy:function(){n(),o?.off(["change","refresh"],i),o=void 0}}},Le='<circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/>',Ie='<g><line x1="11" y1="8" x2="11" y2="14"></line></g>'+Le,xe={moveLeft:["moveLeft","MOVE_LEFT",'<path d="M5 12h14M5 12l6 6M5 12l6-6"/>'],moveRight:["moveRight","MOVE_RIGHT",'<path d="M5 12h14M13 18l6-6M13 6l6 6"/>'],moveUp:["moveUp","MOVE_UP",'<path d="M12 5v14M18 11l-6-6M6 11l6-6"/>'],moveDown:["moveDown","MOVE_DOWN",'<path d="M12 5v14M18 13l-6 6M6 13l6 6"/>'],zoomOut:["zoomOut","ZOOM_OUT",Le],zoomIn:["zoomIn","ZOOM_IN",Ie],toggleFull:["toggleFull","TOGGLE_FULL",Ie],iterateZoom:["iterateZoom","ITERATE_ZOOM",Ie],toggle1to1:["toggleFull","TOGGLE_FULL",'<path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/>'],rotateCCW:["rotateCCW","ROTATE_CCW",'<path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/>'],rotateCW:["rotateCW","ROTATE_CW",'<path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/>'],flipX:["flipX","FLIP_X",'<path d="M12 3v18M16 7v10h5L16 7M8 7v10
1H3L8 7"/>'],flipY:["flipY","FLIP_Y",'<path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/>'],reset:["reset","RESET",'<path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>'],toggleFS:["toggleFS","TOGGLE_FS",'<g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g>']},ke={};for(let e of Object.keys(xe)){let t=xe[e];ke[e]={tpl:`<button data-panzoom-action="${t[0]}" class="f-button" title="{{${t[1]}}}"><svg>${t[2]}</svg></button>`}}!function(e){e.Left="left",e.middle="middle",e.right="right"}(_||={});let Te,Me,Pe,De,Be={counter:{tpl:'<div class="f-counter"><span data-carousel-page></span>/<span data-carousel-pages></span></div>'},download:{tpl:'<button data-carousel-download class="f-button" title="{{DOWNLOAD}}"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></button>'},autoplay:{tpl:'<button data-autoplay-action="toggle" class="f-button" title="{{TOGGLE_AUTOPLAY}}"><svg><g><path d="M5 3.5 19 12 5 20.5Z"/></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},thumbs:{tpl:'<button data-thumbs-action="toggle" class="f-button" title="{{TOGGLE_THUMBS}}"><svg><rect width="18" height="14" x="3" y="3" rx="2"/><path d="M4 21h1M9 21h1M14 21h1M19 21h1"/></svg></button>'},...ke},Oe={absolute:!1,display:{left:[],middle:["zoomIn","zoomOut","toggle1to1","rotateCCW","rotateCW","flipX","flipY","reset"],right:[]},enabled:"auto",items:{}},Re=()=>{function e(e){let t=n?.getOptions().Toolbar,i=(A(t)?{...Oe,...t}:Oe)[e];return i&&"function"==typeof i&&n?i(n):i}function t(){if(!n||i||!1===n?.getOptions().Toolbar)return;let t=n.getContainer();if(!t)return;let o=e("enabled");if(!o)return;let r=e("absolute"),a=n.getSlides().length>1,s=!1,l=!1;for(let e of n.getSlides())e.panzoomRef&&(s=!0),(e.downloadSrc||"image"===e.type&&e.src)&&(l=!0);let c=n.getPlugins().Thumbs?.isEnabled()||!1,d=a&&n.getPlugins().Autoplay||!1,u=n.getPlugins().Fullscreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled);if("auto"===o&&(o=s),!o)return;i=t.querySelector(".f-carousel__toolbar")||void 0,i||(i=document.createElement("div"),B(i,"f-carousel__toolbar"));let h=e("display"),p=M({},Be,e("items"));for(let e of["left","middle","right"]){let t=h[e]||[],o=document.createElement("div");B(o,`f-carousel__toolbar__column is-${e}`);for(let e of t){let t;if(L(e)){if("counter"===e&&!a||"autoplay"===e&&!d||Object.prototype.hasOwnProperty.call(ke,e)&&!s||"fullscreen"===e&&!u||"thumbs"===e&&!c||"download"===e&&!l)continue;t=p[e]}if(A(e)&&(t=e),t&&t.tpl){let e=n.localize(t.tpl);e=e.split("<svg>").join('<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24">');let i=x(e);i&&("function"==typeof t.click&&n&&i.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof t.click&&n&&t.click(n,e)})),o.append(i))}}i.append(o)}if(i.childElementCount){if(r&&B(i,"is-absolute"),!i.parentElement){let n=e("parentEl");n?n.insertAdjacentElement("afterbegin",i):t.insertAdjacentElement("afterbegin",i)}t.contains(i)&&(B(t,"has-toolbar"),r&&B(t,"has-absolute-toolbar"))}}let n,i;return{init:function(e){n=e,n?.on("initSlides",t)},destroy:function(){n?.off("initSlides",t),O(n?.getContainer(),"has-toolbar has-absolute-toolbar"),i?.remove(),i=void 0},add:function(e,t){Be[e]=t},isEnabled:function(){return!!i}}},je={autoStart:!0,pauseOnHover:!0,showProgressbar:!0,timeout:2e3},Ne=()=>{function e(e){let t=f?.getOptions().Autoplay,n=(A(t)?{...je,...t}:je)[e];return n&&"function"==typeof n&&f?n(f):n}function t(){clearTimeout(m),m=void 0}function n(){if(!f||!g||v||b||m||!f.isSettled()||function(){let e=f?.getPage()?.slides||[];for(let t of e)if(0===t.state)return!0;return!1}())return;!function(){if(!f||(r(),!e("showProgressbar")))return;let t=e("progressbarParentEl");if(!t&&f.getPlugins().Toolbar?.isEnabled()&&(t=f.getContainer()),!t&&!0!==f.getPlugins().Toolbar?.isEnabled()){let e=f.getPages()[0]?.slides||[],n=f.getPage()?.slides||[];1===e.length&&1===n.length&&(t=n[0].el)}if(t||=f.getViewport(),!t)return;y=document.createElement("div"),B(y,"f-progressbar"),t.prepend(y);let n=e("timeout")||1e3;y.style.animationDuration=`${n}ms`}();let t=e("timeout");m=setTimeout((()=>
1{if(f&&g&&!b){if(!f.isInfinite()&&f.getPageIndex()===f.getPages().length-1)return void f.goTo(0);f.next()}}),t)}function i(){if(!f||f.getPages().length<2||!1===f.getOptions().Autoplay||g)return;g=!0,f.emit("autoplay:start",e("timeout")),B(f.getContainer(),"has-autoplay"),f.getTween()?.on("start",u);let t=f?.getContainer();t&&e("pauseOnHover")&&matchMedia("(hover: hover)").matches&&(t.addEventListener("mouseenter",h,!1),t.addEventListener("mouseleave",p,!1)),f.on("change",c),f.on("settle",d),f.on("contentReady",s),f.on("panzoom:touchStart",o),f.on("panzoom:wheel",o),f.isSettled()&&n()}function o(){if(t(),r(),f){if(g){f.emit("autoplay:end"),f.getTween()?.off("start",u);let e=f.getContainer();e&&(e.classList.remove("has-autoplay"),e.removeEventListener("mouseenter",h,!1),e.removeEventListener("mouseleave",p,!1))}f.off("change",c),f.off("settle",d),f.off("contentReady",s),f.off("panzoom:touchStart",o),f.off("panzoom:wheel",o)}g=!1,b=!1}function r(){y&&=(y.remove(),null)}function a(){f&&f.getPages().length>1&&e("autoStart")&&i()}function s(){n()}function l(e,t){let n=t.target;n&&!t.defaultPrevented&&"toggle"===n.dataset.autoplayAction&&w.toggle()}function c(){!f||!f?.isInfinite()&&f.getPageIndex()===f.getPages().length-1?o():(t(),r())}function d(){n()}function u(){t(),r()}function h(){v=!0,g&&(t(),r())}function p(){v=!1,g&&!b&&f?.isSettled()&&n()}let f,m,g=!1,b=!1,v=!1,y=null,w={init:function(e){f=e,f.on("ready",a),f.on("click",l)},destroy:function(){o(),f?.off("ready",a),f?.off("click",l),f=void 0},isEnabled:()=>g,pause:function(){b=!0,t(),r()},resume:function(){b=!1,g&&!v&&n()},start(){i()},stop(){o()},toggle(){g?o():i()}};return w},Fe={Carousel:{Lazyload:{showLoading:!1}},minCount:2,showOnStart:!0,thumbTpl:'<button aria-label="Slide to #{{page}}"><img draggable="false" alt="{{alt}}" data-lazy-src="{{src}}" /></button>',type:"modern"},qe=()=>{function e(e){let t=E?.getOptions().Thumbs,n=(A(t)?{...Fe,...t}:Fe)[e];return n&&"function"==typeof n&&E?n(E):n}function t(){if(!E||!1===E?.getOptions().Thumbs)return!1;let t=0;for(let e of E.getSlides())e.thumbSrc&&t++;return t>=e("minCount")}function n(){return"modern"===e("type")}function i(){return"scrollable"===e("type")}function o(){let e=[],t=E?.getSlides()||[];for(let n of t)e.push({index:n.index,class:n.thumbClass,html:r(n)});return e}function r(t){let n=t.thumb?t.thumb instanceof HTMLImageElement?t.thumb.src:t.thumb:t.thumbSrc||void 0,i=void 0===t.thumbAlt?`Thumbnail #${(t.index||0)+1}`:t.thumbAlt+"",o=e("thumbTpl");return o=fe(o,"{{alt}}",i),o=fe(o,"{{src}}",n+""),o=fe(o,"{{index}}",`${t.index||0}`),o=fe(o,"{{page}}",`${(t.index||0)+1}`),o}function a(e){return`<div index="${e.index||0}" class="f-thumbs__slide ${e.class||""}">${e.html||""}</div>`}function s(n=!1){let i=E?.getContainer();if(!E||!i||_||!t())return;let o=e("Carousel")?.classes||{};if(o.container=o.container||"f-thumbs",!_){let e=i.nextElementSibling;e?.classList.contains(o.container)&&(_=e)}if(!_){_=document.createElement("div");let t=e("parentEl");t?t.insertAdjacentElement("beforeend",_):i.insertAdjacentElement("afterend",_)}B(_,o.container),B(_,"f-thumbs"),B(_,`is-${e("type")}`),n&&B(_,"is-hidden")}function l(){if(!_||!i())return;C=document.createElement("div"),B(C,"f-thumbs__viewport");let e="";for(let t of o())"string"==typeof(t.html||"")&&(e+=a(t));C.innerHTML=e,_.append(C),_.addEventListener("click",(e=>{e.preventDefault();let t=e.target.closest("[index]"),n=parseInt(t?.getAttribute("index")||"-1");E&&n>-1&&E.goTo(n)})),L=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&e.target instanceof HTMLImageElement&&(e.target.src=e.target.getAttribute("data-lazy-src")+"",e.target.removeAttribute("data-lazy-src"),L?.unobserve(e.target))}))}),{root:C,rootMargin:"100px"}),_.querySelectorAll("[data-lazy-src]").forEach((e=>{L?.observe(e)})),E?.emit("thumbs:ready")}function c(){if(!Te||!E||!_||i()||S)return;let t=o();if(!t.length)return;let r=M({},{Sync:{target:E},Lazyload:{preload:1},slides:t,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",slide:"f-thumbs__slide"},center:!0,fill:!n(),infinite:!1,dragFree:!0,rtl:E.getOptions().rtl||!1,slidesPerPage:e=>{let t=0;return n()&&(function(){if(!n()||!_)return;let e=e=>_&&parseFloat(getComputedStyle(_).getPropertyValue("--f-thumb-"+e))||0;I=e("width"),k=e("clip-width")}(),t=4*(I-k)),e&&e.getTotalSlideDim()<=e.getViewportDim()-t?1/0:1}},Fe.Carousel||{},e("Carousel")||{});S=Te(_,r,{Sync:ve,Lazyload:_e}),S.on("ready",(()=>{B(_,"is-syncing"),E?.emit("thumbs:ready"),n()&&E?.on("render",p)})),S.on("destroy",(()=>{E?.emit("thumbs:destroy")})),S.init(),S.getGestures()?.on("start",(()=>{T=!1})),S.on("click",((e,t)=>
1{let n=t.target;if(n){let e=n.matches("button")?n:n.firstElementChild;e&&e.matches("button")&&(t.preventDefault(),e.focus({preventScroll:!0}))}})),B(E.getContainer(),"has-thumbs"),w()}function d(){t()&&e("showOnStart")&&(s(),l())}function u(){t()&&(c(),E?.on("addSlide",m),E?.on("removeSlide",g),E?.on("click",b),E?.on("refresh",v),E?.getGestures()?.on("start",h),y(!0))}function h(){T=!0,document.activeElement?.closest(".f-thumbs")&&document.activeElement?.blur()}function p(){_?.classList.toggle("is-syncing",!1===E?.hasNavigated()||E?.getTween()?.isRunning()),w(),E?.getGestures()?.isPointerDown()&&function(){if(!(n()&&E&&S&&T))return;let e=S.getTween(),t=S.getPages(),i=E.getPageIndex()||0,o=E.getPageProgress()||0;if(!(E&&t&&t[i]&&e))return;let r=e.isRunning()?e.getCurrentValues().pos:S.getPosition();if(void 0===r)return;let a=t[i].pos+o*(I-k);a=P(t[0].pos,a,t[t.length-1].pos),e.from({pos:r}).to({pos:a}).start()}()}function f(){T=!0,y()}function m(e,t){let n={html:r(t)};if(S)S.add(n,t.index);else if(C){let e=x(a(n));if(e){C.append(e);let t=e.querySelector("img");t&&L?.observe(t)}}}function g(e,t){S?S.remove(t.index):C&&C.querySelector(`[index="${t.index}"]`)?.remove()}function b(e,t){let n=t.target;!t.defaultPrevented&&"toggle"===n?.dataset?.thumbsAction&&(_||(s(!0),l(),c()),_&&_.classList.toggle("is-hidden"))}function v(){y()}function y(e=!1){if(!E||!C||!i())return;let t=E.getPageIndex();C.querySelectorAll(".is-selected").forEach((e=>{e.classList.remove("is-selected")}));let n=C.querySelector(`[index="${t}"]`);if(n){n.classList.add("is-selected");let t=C.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetTop-C.offsetTop-.5*t.height+.5*i.height,r=n.scrollLeft-C.scrollLeft-.5*t.width+.5*i.width;C.scrollTo({top:o,left:r,behavior:e?"instant":"smooth"})}}function w(){if(!n()||!E||!S)return;let e=S?.getSlides()||[],t=-.5*I;for(let n of e){let e=n.el;if(!e)continue;let i=E.getPageProgress(n.index)||0;i=Math.max(-1,Math.min(1,i)),i>-1&&i<1&&(t+=.5*I*(1-Math.abs(i))),i=Math.round(1e4*i)/1e4,t=Math.round(1e4*t)/1e4,e.style.setProperty("--progress",`${Math.abs(i)}`),e.style.setProperty("--shift",`${E?.isRTL()?-1*t:t}px`),i>-1&&i<1&&(t+=.5*I*(1-Math.abs(i)))}}let E,S,_,C,L,I=0,k=0,T=!0;return{init:function(e,t){Te=t,E=e,E.on("ready",u),E.on("initSlides",d),E.on("change",f)},destroy:function(){i()&&E?.emit("thumbs:destroy"),E?.off("ready",u),E?.off("initSlides",d),E?.off("change",f),E?.off("render",p),E?.off("addSlide",m),E?.off("click",b),E?.off("refresh",v),E?.getGestures()?.off("start",h),E?.getContainer()?.classList.remove("has-thumbs"),E=void 0,S?.destroy(),S=void 0,_?.remove(),_=void 0},getCarousel:function(){return S},getContainer:function(){return _},getType:function(){return e("type")},isEnabled:t}},Ue={autosize:!1,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!1},$e=()=>{function e(){let e=p?.getOptions().Html;return A(e)?M({},Ue,e):Ue}function t(){return!1!==p?.getOptions().Html}function n(e){return"iframe"===e.type||"pdf"===e.type||"gmap"===e.type}function i(e){let t=`${e}`;return t.match(/^\d+$/)?`${t}px`:t}function o(e){if(void 0===e||""===e)return;let t=`${e}`.trim();if(!t.match(/^\d+(\.\d+)?(px)?$/))return;let n=parseFloat(t);return Number.isFinite(n)?n:void 0}function r(t,n){let i=t[n]??e()[n];return"true"===i||"false"!==i&&i}function a(e,n){if(!t())return;let i=n.type,o=n.src;if(!i&&L(o)){if("#"===o.charAt(0)?i="inline":o.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.((a)?png|avif|gif|jp(g|eg)|pjp(eg)?|jfif|svg|webp|bmp|ico|tif(f)?)((\?|#).*)?$)/i)?i="image":o.match(/\.(pdf)((\?|#).*)?$/i)?i="pdf":o.match(/\.(html|php)((\?|#).*)?$/i)&&(i="iframe"),!i){let e=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+\.?\d+?)z))|(?:\?ll=))(.*)?/i);e&&(o=`https://maps.google.${e[1]}/?ll=${(e[2]?e[2]+"&z="+Math.floor(parseFloat(e[3]))+(e[4]?e[4].replace(/^\//,"&"):""):e[4]+"").replace(/\?/,"&")}&output=${e[4]&&e[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="gmap")}if(!i){let e=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i);e&&(o=`https://maps.google.${e[1]}/maps?q=${e[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="gmap")}i&&(n.src=o,n.type=i)}}function s(e,i){t()&&n(i)&&u(i)}function l(e,t){if(n(t)){let e=t.el;p?.hideError(t),t.contentEl?.remove(),t.contentEl=void 0,t.htmlEl?.remove(),t.htmlEl=void 0,e&&(O(e,"has-html has-iframe has-pdf has-gmap"),O(e,"is-loading"))}}function c(){for(let e of p?.getSlides()||[])n(e)&&(d(e),1===e.state&&h(e))}function d(e){let t=e.htmlEl;if(t&&n(e)&&(t.style.aspectRatio="",t.style.width="",t.style.height="",t.style.maxWidth="",t.style.maxHeight="",e.width&&(t.style.maxWidth=i(e.width)),e.height&&(t.style.maxHeight=i(e.height)),e.aspectRatio)){let n=e.aspectRatio.split("/"),i=parseFloat(n[0].trim()),o=n[1]?parseFloat(n[1].trim()):0,r=i&&o?i/o:i;t.offsetHeight;let a=t.getBoundingClientRect(),s=r<(a.width||1)/(a.height||1);
1t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=s?"auto":"",t.style.height=s?"":"auto"}}function u(t){let n=t.el,i=t.src;if(!p||!n||!i)return;let o=document.createElement("iframe");B(o,"f-iframe");for(let[t,n]of Object.entries(e().iframeAttr||{}))o.setAttribute(t,n);o.onerror=()=>{t.state=2,p?.showError(t,"{{IFRAME_ERROR}}")};let a=document.createElement("div");B(a,"f-html"),a.append(o),t.htmlEl=a,t.contentEl=o,B(n,`has-html has-iframe has-${t.type}`),n.prepend(a),d(t);let s=r(t,"preload"),l=r(t,"autosize");"iframe"===t.type&&(s||l)?(t.state=0,p.showLoading(t),B(n,"is-loading"),o.onload=()=>{if(!p||2===p.getState()||!o.src.length||t.contentEl!==o||!o.isConnected)return;t.state=1;let e="true"!==o.dataset.ready;o.dataset.ready="true",h(t),p.hideLoading(t),e&&p.emit("contentReady",t),O(n,"is-loading")},o.src=`${i}`):(o.src=`${i}`,p.emit("contentReady",t))}function h(e){let t=e.contentEl,n=t?.parentElement,i=n?.style,a=r(e,"autosize"),s=o(e.width)||0,l=o(e.height)||0;if(s&&l&&(a=!1),t&&n&&i&&a){try{let e=window.getComputedStyle(n),o=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),a=t.contentWindow;if(a){let e=a.document,t=e.getElementsByTagName("html")[0],n=e.body;i.width="";let c=window.getComputedStyle(n),d=parseFloat(c.marginLeft)+parseFloat(c.marginRight),u=n.style.overflow||"";n.style.overflow="hidden",s||=n.scrollWidth+d+o,i.flex="0 0 auto",i.width=`${s}px`,i.height=`${n.scrollHeight}px`,n.style.overflow=u,l=Math.max(t.scrollHeight,Math.ceil(t.getBoundingClientRect().height))+r}}catch{}(s||l)&&Object.assign(i,{flex:"0 1 auto",width:s?`${s}px`:"",height:l?`${l}px`:""})}}let p;return{init:function(e){p=e,p.on("addSlide",a),p.on("attachSlideEl",s),p.on("detachSlideEl",l),p.on("refresh",c)},destroy:function(){p?.off("addSlide",a),p?.off("attachSlideEl",s),p?.off("detachSlideEl",l),p?.off("refresh",c),p=void 0}}},We=(e,t={})=>{let n=new URL(e),i=new URLSearchParams(n.search),o=new URLSearchParams;for(let[e,n]of[...i,...Object.entries(t)]){let t=n+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&o.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else o.set(e,t)}let r=o+"",a=e.match(/#t=((.*)?\d+s)/);return a&&(r+=`#t=${a[1]}`),r},He={autoplay:!1,html5videoTpl:'<video class="f-html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',iframeAttr:{allow:"autoplay; fullscreen",scrolling:"no",referrerPolicy:"strict-origin-when-cross-origin",credentialless:""},vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},ze=()=>{function e(){let e=u?.getOptions().Video;return A(e)?{...He,...e}:He}function t(){return u?.getPage()?.slides[0]}function n(t){let n=t.el,i=t.src;if(!u||!n||!i)return;let o=t.html5videoTpl||e().html5videoTpl,r=t.html5videoFormat||e().html5videoFormat;if(!o)return;let a=t.poster||(t.thumb&&L(t.thumb)?t.thumb:""),s=x(o.replace(/\{\{src\}\}/gi,i+"").replace(/\{\{format\}\}/gi,r||"").replace(/\{\{poster\}\}/gi,a+""));if(!s)return;let l=document.createElement("div");B(l,"f-html"),l.append(s),t.contentEl=s,t.htmlEl=l,B(n,`has-${t.type}`),n.prepend(l),c(t),u.emit("contentReady",t)}function i(t){let n=t.el,i=t.src;if(!u||!n||!i)return;let o=document.createElement("iframe");B(o,"f-iframe"),o.setAttribute("id",`f-iframe_${t.videoId}`);for(let[t,n]of Object.entries(e().iframeAttr||{}))o.setAttribute(t,n);"youtube"===t.type&&(o.onload=()=>{1===u?.getState()&&o.contentWindow?.postMessage(JSON.stringify({event:"listening",id:o.getAttribute("id")}),"*")}),o.onerror=()=>{u?.showError(t,"{{IFRAME_ERROR}}")};let r=document.createElement("div");B(r,"f-html"),r.append(o),t.contentEl=o,t.htmlEl=r,B(n,`has-html has-iframe has-${t.type}`),o.src=`${t.src}`,n.prepend(r),c(t),u.emit("contentReady",t)}function o(t,n){let i=n.src;if(!L(i))return;let o=n.type;if(!o||"html5video"===o){let e=i.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i);e&&(o="html5video",n.html5videoFormat=n.html5videoFormat||"video/"+("ogv"===e[1]?"ogg":e[1]))}if(!o||"youtube"===o){let t=i.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i);if(t){let r={...e().youtube,...n.youtube||{}},a=`www.youtube${r.nocookie?"-nocookie":""}.com`,s=We(i,r),l=encodeURIComponent(t[2]);n.videoId=l,n.src=`https://${a}/embed/${l}?${s}`,n.thumb=n.thumb||`https://i.ytimg.com/vi/${l}/mqdefault.jpg`,o="youtube"}}if(!o||"vimeo"===o){let t=i.match(/^.+vimeo.com\/(?:\/)?(video\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/);if(t){let r={...e().vimeo,...n.vimeo||{}},a=We(i,r),s=encodeURIComponent(t[2]),l=t[5]||"";n.videoId=s,n.src=`https://player.vimeo.com/video/${s}?${l?`h=${l}${a?"&":""}`:""}${a}
1`,o="vimeo"}}n.type=o}function r(e,t){"html5video"===t.type&&n(t),("youtube"===t.type||"vimeo"===t.type)&&i(t)}function a(e,t){("html5video"===t.type||"youtube"===t.type||"vimeo"===t.type)&&(t.contentEl?.remove(),t.contentEl=void 0,t.htmlEl?.remove(),t.htmlEl=void 0),t.poller&&clearTimeout(t.poller)}function s(){h=!1}function l(){if(h)return;h=!0;let n=t();(n&&void 0!==n.autoplay?n.autoplay:e().autoplay)&&(function(){let e=t(),n=e?.el;if(n&&"html5video"===e?.type)try{let e=n.querySelector("video");if(e){let t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch{}let i=e?.htmlEl;i instanceof HTMLIFrameElement&&i.contentWindow?.postMessage('{"event":"command","func":"stopVideo","args":""}',"*")}(),function(){let e=t(),n=e?.type;if(!e?.el||"youtube"!==n&&"vimeo"!==n)return;let i=()=>{if(e.contentEl&&e.contentEl instanceof HTMLIFrameElement&&e.contentEl.contentWindow){let t;if("true"===e.contentEl.dataset.ready)return t="youtube"===e.type?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);"youtube"===e.type&&(t={event:"listening",id:e.contentEl.getAttribute("id")},e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(i,250)};i()}())}function c(e){let t=e?.htmlEl;if(e&&t&&("html5video"===e.type||"youtube"===e.type||"vimeo"===e.type)){if(t.style.aspectRatio="",t.style.width="",t.style.height="",t.style.maxWidth="",t.style.maxHeight="",e.width){let n=`${e.width}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxWidth=`${n}`}if(e.height){let n=`${e.height}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxHeight=`${n}`}if(e.aspectRatio){let n=e.aspectRatio.split("/"),i=parseFloat(n[0].trim()),o=n[1]?parseFloat(n[1].trim()):0,r=i&&o?i/o:i;t.offsetHeight;let a=t.getBoundingClientRect(),s=r<(a.width||1)/(a.height||1);t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=s?"auto":"",t.style.height=s?"":"auto"}}}function d(){c(t())}let u,h=!1,p=e=>{try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of Array.from(u?.getContainer()?.getElementsByClassName("f-iframe")||[]))t instanceof HTMLIFrameElement&&t.contentWindow===e.source&&(t.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===t.event){let e=document.getElementById(t.id);e&&(e.dataset.ready="true")}}catch{}};return{init:function(e){u=e,u.on("addSlide",o),u.on("attachSlideEl",r),u.on("detachSlideEl",a),u.on("ready",l),u.on("change",s),u.on("settle",l),u.on("refresh",d),window.addEventListener("message",p)},destroy:function(){u?.off("addSlide",o),u?.off("attachSlideEl",r),u?.off("detachSlideEl",a),u?.off("ready",l),u?.off("change",s),u?.off("settle",l),u?.off("refresh",d),window.removeEventListener("message",p),u=void 0}}},Qe={autoStart:!1,btnTpl:'<button data-fullscreen-action="toggle" class="f-button" title="{{TOGGLE_FULLSCREEN}}"><svg><g><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},Ve="in-fullscreen-mode",Ge=()=>{function e(e){let t=c?.getOptions().Fullscreen,n=(A(t)?{...Qe,...t}:Qe)[e];return n&&"function"==typeof n&&c?n(c):n}function t(){c?.getPlugins().Toolbar?.add("fullscreen",{tpl:e("btnTpl")})}function n(){if(e("autoStart")){let e=o();e&&a(e)}}function i(e,t){let n=t.target;n&&!t.defaultPrevented&&"toggle"===n.dataset.fullscreenAction&&l()}function o(){return e("el")||c?.getContainer()||void 0}function r(){let e=document;return e.fullscreenEnabled?!!e.fullscreenElement:!!e.webkitFullscreenEnabled&&!!e.webkitFullscreenElement}function a(e){let t,n=document;return e||=n.documentElement,n.fullscreenEnabled?t=e.requestFullscreen():n.webkitFullscreenEnabled&&(t=e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)),t&&t.then((()=>{e.classList.add(Ve)})),t}function s(){let e,t=document;return t.fullscreenEnabled?e=t.fullscreenElement&&t.exitFullscreen():t.webkitFullscreenEnabled&&(e=t.webkitFullscreenElement&&t.webkitExitFullscreen()),e&&e.then((()=>{o()?.classList.remove(Ve)})),e}function l(){if(r())s();else{let e=o();e&&a(e)}}let c;return{init:function(e){c=e,c.on("initPlugins",t),c.on("ready",n),c.on("click",i)},destroy:function(){c?.off("initPlugins",t),c?.off("ready",n),c?.off("click",i)},exit:s,inFullscreen:r,request:a,toggle:l}},Xe=!1,Ye=!1,Je=!1,Ke=!1,Ze=()=>{let e=new URL(document.URL).hash,t=e.slice(1).split("-"),n=t[t.length-1],i=n&&/^\+?\d+$/.test(n)&&parseInt(t.pop()||"1",10)||1;return{urlHash:e,urlSlug:t.join("-"),urlIndex:i}},et=()=>{let e=Me?.getInstance(),t=e?.getState();return!(!e||0!==t&&1!==t)},tt=()=>{if(!Me||et())return;let{urlSlug:e,urlIndex:t}=Ze();if(!e)return;let n=document.querySelector(`[data-slug="${e}"]`);n&&Me.fromTriggerEl(n),et()||(n=document.querySelectorAll(`[data-fancybox="${e}"]`)[t-1],n&&Me.fromTriggerEl(n,{startIndex:t-1})),et()&&n&&!n.closest("[inert]")&&n.scrollIntoView({behavior:"instant",block:"center",inline:"center"})},nt=e=>{let t=e.getOptions().Hash,n=e.getSlide();return n&&(n.slug||n.fancybox||(A(t)?t.slug:""))||""},it=e=>{let t=nt(e),n=e.getSlide();if(!n||!t)return"";let i=parseInt(n.index+"",10)+1,o=n.slug?`#${n.slug}`:`#${t}-${i}`;return(e.getCarousel()?.getPages()?.length||0)<2&&(o=`#${t}`),o},ot=()=>{if(!Me||Je)return;let e=Me?.getInstance(),t=e?.getCarousel(),{urlSlug:n,urlIndex:i}=Ze(),o=e?.getOptions().Hash;if(!1!==o){if(e&&1===e.getState()&&t){let r=t.getSlides();for(let e of r||[])if(e.slug===n||(e.fancybox===n||A(o)&&o.slug===n)&&e.index===i-1)return Ye=!1,void t.goTo(e.index);Ke=!0,e.close(),Ke=!1}tt()}},rt=()=>{Me&&(Pe=setTimeout((()=>{Xe=!0,tt(),Xe=!1}),300),window.addEventListener("hashchange",ot,!1))},at=()=>{function e(){if(!i||!i.isTopMost()||!1===i.getOptions().Hash)return;if(Xe){let e=i.getOptions().sync;e&&e.goTo(i?.getCarousel()?.getPageIndex()||0,{transition:!1,tween:!1})}let e=i.getCarousel();if(!e||!i.getSlide())return;let n=nt(i);if(!n)return;let{urlHash:r,urlSlug:a}=Ze(),s=it(i);r!==s&&(o=r),history.scrollRestoration&&!De&&(De=history.scrollRestoration,history.scrollRestoration="manual",window.addEventListener("beforeunload",h)),e.on("change",t);let l=n!==a;try{window.history[l?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+s),l&&(Ye=!0)}catch{}}function t(){if(!(i&&i.isTopMost()&&!1!==i.getOptions().Hash&&i.getSlide()&&nt(i)))return;let e=it(i);Je=!0;try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+e)}catch{}Je=!1}function n(){if(i&&i.isTopMost()&&!1!==i.getOptions().Hash&&!Ke&&nt(i)){Je=!0;try{Ye&&!function(){if(window.parent===window)return!1;try{var e=window.frameElement}catch{e=null}return null===e?"data:"===location.protocol:e.hasAttribute("sandbox")}()&&"IFRAME"!==document.activeElement?.nodeName?window.history.back():window.history.replaceState({},document.title,window.location.pathname+window.location.search+o)}catch{}Je=!1}}let i,o="";return{init:function(t){clearTimeout(Pe),i=t,i.on("ready",e),i.on("close",n)},destroy:function(){i?.off("ready",e),i?.off("close",n);let o=i?.getCarousel();
1o&&o.off("change",t),i=void 0,Me?.getInstance()||(h(),window.removeEventListener("beforeunload",h))}}};at.getInfoFromURL=Ze,at.startFromUrl=tt,at.setup=function(e){Me||(Me=e,t()&&(/complete|interactive|loaded/.test(document.readyState)?rt():document.addEventListener("DOMContentLoaded",rt)))};let st={...ae,CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ELEMENT_NOT_FOUND:"HTML Element Not Found",IFRAME_ERROR:"Error Loading Page",NO_CAPTION:"No Caption",TOGGLE_SIDEBAR:"Toggle sidebar"},lt='<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.286 4.714 4.714 19.286M4.714 4.714l14.572 14.572" /></svg></button>';Re().add("close",{tpl:lt});let ct=e=>{e.cancelable&&e.preventDefault()},dt=e=>{let t=e.getBoundingClientRect(),n=e.closest("[style]"),i=n?.parentElement;if(n&&n.style.transform&&i){let e=i.getBoundingClientRect();if(t.left<e.left||t.left>e.left+e.width-t.width||t.top<e.top||t.top>e.top+e.height-t.height)return!1}let o=Math.max(document.documentElement.clientHeight,window.innerHeight),r=Math.max(document.documentElement.clientWidth,window.innerWidth);return!(t.bottom<0||t.top-o>=0||t.right<0||t.left-r>=0)},ut=(e,t,n,i,o="contain")=>{if("contain"===o||e>n||t>i){let o=n/e,r=i/t,a=Math.min(o,r);e*=a,t*=a}return{width:e,height:t}},ht=(e=null,t="",n)=>{if(!e||!e.parentElement||!t)return void(n&&n());pt(e);let i=o=>{o.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",i),delete e.dataset.animationName,n&&n(),e.classList.remove(t))};e.dataset.animationName=t,e.addEventListener("animationend",i),B(e,t)},pt=e=>{e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))};!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.Destroyed=3]="Destroyed"}(C||={});let ft={ajax:null,backdropClick:"close",Carousel:{},closeButton:"auto",closeButtonTpl:lt,closeExisting:!1,delegateEl:void 0,dragToClose:!0,fadeEffect:!0,groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,id:void 0,idle:!1,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:st,mainClass:"",mainStyle:{},mainTpl:'<dialog class="fancybox__dialog">\n <div class="fancybox__container" tabindex="0" aria-label="{{MODAL}}">\n <div class="fancybox__backdrop"></div>\n <div class="fancybox__carousel"></div>\n </div>\n </dialog>',modal:!0,on:{},parentEl:void 0,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,sync:void 0,theme:"dark",triggerEl:void 0,triggerEvent:void 0,zoomEffect:!0},mt=new Map,gt=0,bt="with-fancybox",vt=()=>{function e(e,...t){let n=ue[e];return n&&"function"==typeof n?n(Se,...t):n}function t(t,n=[]){let i=e("l10n")||{};t=String(t).replace(/\{\{(\w+)\}\}/g,((e,t)=>i[t]||e));for(let e=0;e<n.length;e++)t=t.split(n[e][0]).join(n[e][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((e,t)=>t)),t}function n(e,...t){let i=[...Ee.get(e)||[]];for(let[t,n]of Object.entries(ue.on||{}))(t===e||t.split(" ").indexOf(e)>-1)&&i.push(n);for(let e of i)e&&"function"==typeof e&&e(Se,...t);"*"!==e&&n("*",e,...t)}function i(){O(ie,"is-revealing");try{document.activeElement===ne&&(ie?.querySelector("[autofocus]")||ie).focus()}catch{}}function a(){let i=e("parentEl")||document.body;if(!(i&&i instanceof HTMLElement))return;let o=t(e("mainTpl")||"");if(ne=x(o)||void 0,!(ne&&(ie=ne.querySelector(".fancybox__container"),ie&&ie instanceof HTMLElement)))return;let r=e("mainClass");r&&B(ie,r);let a=e("mainStyle");if(a&&A(a))for(let[e,t]of Object.entries(a))ie.style.setProperty(e,t);let s=e("theme"),l="auto"===s?window.matchMedia("(prefers-color-scheme:light)").matches:"light"===s;ie.setAttribute("theme",l?"light":"dark"),ne.setAttribute("id",`${he}`),ne.addEventListener("keydown",(e=>{"Escape"===e.key&&ct(e)})),ne.addEventListener("wheel",(t=>{let i=t.target,o=e("wheel",t);i.closest(".f-thumbs")&&(o="slide");let r="slide"===o,a=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e})),s=Math.max(-1,Math.min(1,a)),l=Date.now();we&&l-we<300?r&&ct(t):(we=l,n("wheel",t,s),!t.defaultPrevented&&("close"===o?Z(t):"slide"===o&&re&&!k(i)&&(ct(t),re[s>0?"prev":"next"]())))}),{capture:!0,passive:!1}),ne.addEventListener("cancel",(e=>{Z(e)})),i.append(ne),1===mt.size&&(e("hideScrollbar")&&T(!0),document.documentElement.classList.add(bt)),n("initLayout"),ne instanceof HTMLDialogElement&&(e("modal")?ne.showModal():ne.show())}function s(e,t){j(t),g(),t.el?.addEventListener("click",c),("inline"===t.type||"clone"===t.type)&&function(e){if(!re||!e||!e.el)return;let t=null;if(L(e.src)){let n=e.src.split("#",2).pop();t=n?document.getElementById(n):null}if(t){if(B(t,"f-html"),"clone"===e.type||t.closest(".fancybox__carousel")){t=t.cloneNode(!0);let n=t.dataset.animationName;n&&(t.classList.remove(n),delete t.dataset.animationName);let i=t.getAttribute("id");i=i?`${i}--clone`:`clone-${he}-${e.index}`,t.setAttribute("id",i)}else if(t.parentNode){let n=document.createElement("div");n.inert=!0,t.parentNode.insertBefore(n,t),e.placeholderEl=n}e.htmlEl=t,B(e.el,"has-html"),e.el.prepend(t),t.classList.remove("hidden"),"none"===t.style.display&&(t.style.display=""),"none"===getComputedStyle(t).getPropertyValue("display")&&(t.style.display=t.dataset.display||"flex"),re?.emit("contentReady",e)}else re?.showError(e,"{{ELEMENT_NOT_FOUND}}")}(t),"ajax"===t.type&&H(t)}function l(e,t){N(t),t.el?.removeEventListener("click",c),("inline"===t.type||"clone"===t.type)&&function(e){let t=e.htmlEl,n=e.placeholderEl;t&&("none"!==getComputedStyle(t).getPropertyValue("display")&&(t.style.display="none"),t.offsetHeight),n&&(t&&n.parentNode&&n.parentNode.insertBefore(t,n),n.remove()),e.htmlEl=void 0,e.placeholderEl=void 0}(t),t.xhr&&=void t.xhr.abort()}function c(e){if(!q())return;if(de!==C.Ready)return ct(e),void e.stopPropagation();
1if(e.defaultPrevented||!Q.isClickAllowed())return;let t=e.composedPath()[0];t.closest(".fancybox__carousel")&&t.classList.contains("fancybox__slide")&&y(e)}function d(){ye=!1,ie&&re&&ie.classList.remove("is-revealing"),g();let t=e("sync");if(re&&t){let e=t.getPageIndex(re.getPageIndex())||0;t.goTo(e,{transition:!1,tween:!1})}}function u(){P(),document.body.addEventListener("click",S),document.body.addEventListener("pointerdown",b,{capture:!0}),document.body.addEventListener("keydown",E,{passive:!1,capture:!0}),g(),V();let t=e("sync");re&&t&&t.getTween()?.start(),F(U())}function h(){re?.canGoNext()?V():Y()}function p(e,t){j(t)}function f(e,t){j(t),F(t)}function m(){let e=re?.getPlugins().Thumbs;R(ie,"has-thumbs",e?.isEnabled()||!1),R(ie,"has-vertical-thumbs",!!e&&("scrollable"===e.getType()||!0===e.getCarousel()?.isVertical()))}function g(){if(!ie)return;let e=re?.getPages().length||0,t=re?.getPageIndex()||0,n=ie.querySelectorAll("[data-fancybox-index],[data-fancybox-page],[data-fancybox-pages]");for(let i of n)i.textContent=i.hasAttribute("data-fancybox-index")?String(t):i.hasAttribute("data-fancybox-page")?String(t+1):String(e)}function b(e){_(),ce={x:e.clientX,y:e.clientY}}function y(t){t.composedPath()[0].closest("[data-fancybox-close]")?Z(t):function(e){if(!ce)return!1;let t="clientX"in e?e:e.changedTouches[0];return!!t&&(Math.abs(t.clientX-ce.x)>10||Math.abs(t.clientY-ce.y)>10)}(t)||(n("backdropClick",t),!t.defaultPrevented&&e("backdropClick")&&Z(t))}function w(){X()}function E(t){if(!q()||de!==C.Ready)return;let i=t.key,o=e("keyboard");if(!o||t.ctrlKey||t.altKey||t.shiftKey)return;let r=t.composedPath()[0];if(!I(r)||"Escape"!==i&&(e=>{let t=["input","textarea","select","option","video","iframe","[contenteditable]","[data-selectable]","[data-draggable]"].join(",");return e.matches(t)||e.closest(t)})(r)||(n("keydown",t),t.defaultPrevented))return;let a=o[i];if(a)switch(a){case"close":Z(t);break;case"next":ct(t),re?.next();break;case"prev":ct(t),re?.prev()}}function S(e){if(!q()||de!==C.Ready||(X(),e.defaultPrevented))return;let t=e.composedPath()[0],n=!!t.closest("[data-fancybox-close]"),i=t.classList.contains("fancybox__backdrop");(n||i)&&y(e)}function _(){ae&&(e("dragToClose")?ae.enable():ae.disable())}function P(){function t(){se?.spring({clamp:!0,mass:1,tension:0===s?140:960,friction:17,restDelta:.1,restSpeed:.1,maxSpeed:1/0}).from({y:a}).to({y:s}).start();let e=re?.getViewport()?.getBoundingClientRect().height||0,t=U()?.panzoomRef;if(e&&t)if(0===s)t.execute(v.Reset);else{let n=D(Math.abs(a),0,.33*e,c,.77*c,!1);t.execute(v.ZoomTo,{scale:n})}}let n=re?.getViewport();if(!re||!n||(ae=Q(n).init(),!ae))return;_();let i=!1,a=0,s=0,l={},c=1,d=t=>{let n=t.srcEvent,i=n.target;return e("dragToClose")&&re&&!(r(n)&&n.touches?.length>1)&&i&&!k(i)};se=o().on("step",(e=>{if(ie&&n&&de===C.Ready){let t=n.getBoundingClientRect().height;a=Math.min(t,Math.max(-1*t,e.y));let i=D(Math.abs(a),0,.65*t,1,.2,!0);ie.style.setProperty("--f-drag-opacity",i+""),ie.style.setProperty("--f-drag-offset",a+"px")}})),ae.on("start",(function(){i||(se?.pause(),s=a)})).on("panstart",(e=>{if(!i&&d(e)&&"y"===e.axis){ct(e.srcEvent),i=!0,J(),re?.getViewport()?.classList.add("is-dragging");let t=U()?.panzoomRef;if(t){c=t.getTransform().scale||1;let e=t.getOptions();l={...e},e.bounds=!1,e.gestures=!1}}else i=!1})).on("pan",(function(e){i&&d(e)&&(ct(e.srcEvent),e.srcEvent.stopPropagation(),"y"===e.axis&&(s+=e.deltaY,t()))})).on("end",(e=>{if(re?.getViewport()?.classList.remove("is-dragging"),i){let t=U()?.panzoomRef;if(t){t.getTween()?.end();let e=t.getOptions();e.bounds=l.bounds||!1,e.gestures=l.gestures||!1}d(e)&&"y"===e.axis&&(Math.abs(e.velocityY)>5||Math.abs(a)>50)&&Z(e.srcEvent,"f-throwOut"+(e.velocityY>0?"Down":"Up"))}i=!1,de===C.Ready&&0!==a&&(s=0,t())}))}function j(n){let{el:i,htmlEl:o,panzoomRef:r,closeButtonEl:a}=n,s=r?r.getWrapper():o;if(!i||!i.parentElement||!s)return;let l=e("closeButton");if("auto"===l&&(l=!0!==re?.getPlugins().Toolbar?.isEnabled()),l){if(!a){let o=x(t(e("closeButtonTpl")));o&&(B(o,"is-close-button"),n.closeButtonEl=s.insertAdjacentElement("afterbegin",o),B(i,"has-close-btn"))}}else N(n)}function N(e){e.closeButtonEl&&=void e.closeButtonEl.remove(),O(e.el,"has-close-btn")}function F(t){if(!(ye&&re&&1===re.getState()&&t&&t.index===re.getOptions().initialPage&&t.el&&t.el.parentElement)||void 0!==t.state&&1!==t.state)return;ye=!1;let n=t.panzoomRef,i=n?.getTween(),o=e("zoomEffect")&&i?W(t):void 0;if(n&&i&&o){let{x:e,y:t,scale:r}=n.getStartPosition();return void i.spring({tension:215,friction:25,restDelta:.001,restSpeed:.001,maxSpeed:1/0}).from(o).to({x:e,y:t,scale:r}).start()}let r=n?.getContent()||t.htmlEl;r&&ht(r,e("showClass",t))}function q(){return yt.getInstance()?.getId()===he}function U(){return re?.getPage()?.slides[0]}function $(){let t=U();return t?t.triggerEl||e("triggerEl"):void 0}function W(e){let t=e.thumbEl;if(!t||!dt(t))return;let n=e.panzoomRef?.getWrapper()?.getBoundingClientRect(),i=n?.width,o=n?.height;if(!i||!o)return;let r=t.getBoundingClientRect(),a=r.width,s=r.height,l=r.left,c=r.top;
1if(r&&a&&s){if(t instanceof HTMLImageElement){let e=window.getComputedStyle(t).getPropertyValue("object-fit");if("contain"===e||"scale-down"===e){let{width:n,height:i}=ut(t.naturalWidth,t.naturalHeight,a,s,e);l+=.5*(a-n),c+=.5*(s-i),a=n,s=i}}if(!(Math.abs(i/o-a/s)>.1))return{x:l+.5*a-(n.left+.5*i),y:c+.5*s-(n.top+.5*o),scale:a/i}}}function H(t){let n=t.el;if(!n||t.htmlEl||t.xhr)return;re?.showLoading(t),t.state=0;let i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE&&de===C.Ready)if(re?.hideLoading(t),t.state=1,200===i.status){let e=i.responseText+"",o=null,r=null;if(t.filter){let n=document.createElement("div");n.innerHTML=e,r=n.querySelector(t.filter+"")}r&&r instanceof HTMLElement?o=r:(o=document.createElement("div"),o.innerHTML=e),o.classList.add("f-html"),t.htmlEl=o,n.classList.add("has-html"),n.classList.add("has-ajax"),n.prepend(o),re?.emit("contentReady",t)}else re?.showError(t)};let o=e("ajax")||null;i.open(o?"POST":"GET",t.src+""),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(o),t.xhr=i}function z(){le&&clearTimeout(le),le=void 0,document.removeEventListener("mousemove",w)}function V(){if(be||le)return;let t=e("idle");t&&(le=setTimeout(G,t))}function G(){ie&&(z(),B(ie,"is-idle"),document.addEventListener("mousemove",w),be=!0)}function X(){be&&(Y(),V())}function Y(){z(),ie?.classList.remove("is-idle"),be=!1}function J(){let e=$();e&&!function(e){var t=e.getBoundingClientRect();return t.bottom>0&&t.right>0&&t.left<(window.innerWidth||document.documentElement.clientWidth)&&t.top<(window.innerHeight||document.documentElement.clientHeight)}(e)&&!e.closest("[inert]")&&e.scrollIntoView({behavior:"instant",block:"center",inline:"center"})}function Z(e,t){if(de===C.Closing||de===C.Destroyed)return;let i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(n("shouldClose",i,e),i.defaultPrevented)return;if(z(),e){if(e.defaultPrevented)return;ct(e),e.stopPropagation(),e.stopImmediatePropagation()}if(de=C.Closing,se?.pause(),ae?.destroy(),re){re.getGestures()?.destroy(),re.getTween()?.pause();for(let e of re.getSlides()){let t=e.panzoomRef;t&&(M(t.getOptions(),{clickAction:!1,dblClickAction:!1,wheelAction:!1,bounds:!1,minScale:0,maxScale:1/0}),t.getGestures()?.destroy(),t.getTween()?.pause())}}let o=re?.getPlugins();o?.Autoplay?.stop();let r=o?.Fullscreen;r&&r.inFullscreen()?Promise.resolve(r.exit()).then((()=>{setTimeout((()=>{ee(e,t)}),150)})):ee(e,t)}function ee(t,i){if(de!==C.Closing)return;n("close",t),ye=!1,document.body.removeEventListener("click",S),document.body.removeEventListener("pointerdown",b,{capture:!0}),document.body.removeEventListener("keydown",E,{passive:!1,capture:!0}),ce=void 0,e("placeFocusBack")&&J();let r=document.activeElement;r&&ne?.contains(r)&&r.blur(),e("fadeEffect")&&(ie?.classList.remove("is-ready"),ie?.classList.add("is-hiding")),ie?.classList.add("is-closing");let a=U(),s=a?.el,l=a?.panzoomRef,c=a?.panzoomRef?.getTween(),d=i||e("hideClass"),u=!1,h=!1;if(re&&a&&s&&l&&c){let t;if(e("zoomEffect")&&1===a.state&&(t=W(a)),t){u=!0;let e=()=>{t=W(a),t?c.to({...K,...t}):te()};l.on("refresh",(()=>{e()})),c.easing(o.Easings.EaseOut).duration(350).from({...l.getTransform()}).to({...K,...t}).start(),s?.getAnimations()&&(s.style.animationPlayState="paused",requestAnimationFrame((()=>{e()})))}}let p=a?.htmlEl||a?.panzoomRef?.getWrapper();p&&pt(p),!u&&d&&p&&(h=!0,ht(p,d,(()=>{te()}))),u||h?setTimeout((()=>{te()}),350):te()}function te(){if(de===C.Destroyed)return;de=C.Destroyed;let t=$();n("destroy"),e("sync")?.getPlugins().Autoplay?.resume(),e("sync")?.getPlugins().Autoscroll?.resume(),ne instanceof HTMLDialogElement&&ne.close(),re?.getContainer()?.classList.remove("is-idle"),re?.destroy();for(let e of Object.values(fe))e?.destroy();if(fe={},ne?.remove(),ne=void 0,ie=void 0,re=void 0,mt.delete(he),!mt.size&&(T(!1),document.documentElement.classList.remove(bt),e("placeFocusBack")&&t&&!t.closest("[inert]")))try{t?.focus({preventScroll:!0})}catch{}}let ne,ie,oe,re,ae,se,le,ce,de=C.Init,ue={...ft},he=-1,fe={},me=[],be=!1,ye=!0,we=0,Ee=new Map,Se={close:Z,destroy:te,getCarousel:function(){return re},getContainer:function(){return ie},getId:function(){return he},getOptions:function(){return ue},getPlugins:function(){return fe},getSlide:function(){return U()},getState:function(){return de},init:function(t=[],o={}){de!==C.Init&&(Se.destroy(),de=C.Init),ue=M({},ft,o),he=e("id")||"fancybox-"+ ++gt;let r=mt.get(he);if(r&&r.destroy(),mt.set(he,Se),n("init"),function(){for(let[e,t]of Object.entries({...yt.Plugins,...ue.plugins||{}}))if(e&&!fe[e]&&t instanceof Function){let n=t();n.init(Se),fe[e]=n}n("initPlugins")}(),function(e=[]){n("initSlides",e),me=[...e]}(t),a(),function(){if(oe=ne?.querySelector(".fancybox__carousel")||void 0,!oe)return;oe.fancybox=Se;let t=M({},{Autoplay:{autoStart:!1,pauseOnHover:!1,progressbarParentEl:e=>{let t=e.getContainer();return t?.querySelector(".f-carousel__toolbar [data-autoplay-action]")||t}},Fullscreen:{el:ie},Toolbar:{absolute:!0,items:{counter:{tpl:'<div class="f-counter"><span data-fancybox-page></span>/<span data-fancybox-pages></span></div>'}},display:{left:["counter"],right:["toggleFull","autoplay","fullscreen","thumbs","close"]}},Video:{autoplay:!0},Thumbs:{minCount:2,Carousel:{classes:{container:"fancybox__thumbs"}}},classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",slide:"fancybox__slide"},spinnerTpl:'<div class="f-spinner" data-fancybox-close></div>',dragFree:!1,slidesPerPage:1,plugins:{Sync:ve,Arrows:Ae,Lazyload:_e,Zoomable:ge,Html:$e,Video:ze,Autoplay:Ne,Fullscreen:Ge,Thumbs:qe,Toolbar:Re}},e("Carousel")||{},{slides:me,enabled:!0,initialPage:e("startIndex")||0,l10n:e("l10n")});
1re=pe(oe,t),n("initCarousel",re),re.on("*",((e,t,...i)=>{n(`Carousel.${t}`,e,...i)})),re.on("attachSlideEl",s),re.on("detachSlideEl",l),re.on("contentLoading",p),re.on("contentReady",f),re.on("ready",u),re.on("change",d),re.on("settle",h),re.on("thumbs:ready",m),re.on("thumbs:destroy",m),re.init()}(),ne&&ie){if(e("closeExisting"))for(let[e,t]of mt.entries())e!==he&&t.close();e("fadeEffect")?(setTimeout((()=>{i()}),500),B(ie,"is-revealing")):i(),ie.classList.add("is-ready"),de=C.Ready,n("ready")}},isCurrentSlide:function(e){let t=U();return!(!e||!t)&&t.index===e.index},isTopMost:function(){return q()},localize:t,off:function(e,t){return Ee.has(e)&&Ee.set(e,Ee.get(e).filter((e=>e!==t))),Se},on:function(e,t){return Ee.set(e,[...Ee.get(e)||[],t]),Se},toggleIdle(e){(be||!0===e)&&G(),(!be||!1===e)&&Y()}};return Se},yt={Plugins:{Hash:at},version:"6.1.15",openers:new Map,bind:function(e,n,i,o){if(!t())return;let r=document.body,a=null,s="[data-fancybox]",l={};e instanceof Element&&(r=e),L(e)&&L(n)?(a=e,s=n):L(n)&&L(i)?(a=n,s=i):L(n)?s=n:L(e)&&(s=e),"object"==typeof n&&(l=n||{}),"object"==typeof i&&(l=i||{}),"object"==typeof o&&(l=o||{}),function(e,t,n,i={}){if(!(e&&e instanceof Element&&n))return;let o=yt.openers.get(e)||new Map,r=o.get(t)||new Map;r.set(n,i),o.set(t,r),yt.openers.set(e,o),1===o.size&&e.addEventListener("click",yt.fromEvent),p()}(r,a,s,l)},close:function(e=!0,...t){if(e)for(let e of mt.values())e.close(...t);else{let e=yt.getInstance();e&&e.close(...t)}},destroy:function(){let e;for(;e=yt.getInstance();)e.destroy();for(let e of yt.openers.keys())e.removeEventListener("click",yt.fromEvent);yt.openers.clear()},fromEvent:function(e){if(e.defaultPrevented||e.button&&0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0],n={triggerEvent:e};if(t.closest(".fancybox__container.is-hiding"))return ct(e),void e.stopPropagation();let i=t.closest("[data-fancybox-delegate]")||void 0;if(i){let e=i.dataset.fancyboxDelegate||"",o=document.querySelectorAll(`[data-fancybox="${e}"]`),r=parseInt(i.dataset.fancyboxIndex||"",10)||0;t=o[r]||o[0],M(n,{delegateEl:i,startIndex:r})}return f(t,n)},fromNodes:function(e,t){t=M({},ft,t||{});let n=[],i=e=>e instanceof HTMLImageElement?e:e instanceof HTMLElement?e.querySelector("img:not([aria-hidden])"):void 0;for(let o of e){let r=o.dataset||{},a=t.delegateEl&&e.indexOf(o)===t.startIndex?t.delegateEl:void 0,s=i(o),l=i(a)||s||void 0,c=r.src||o.getAttribute("href")||o.getAttribute("currentSrc")||o.getAttribute("src")||void 0,d=r.thumb||r.thumbSrc||l?.getAttribute("currentSrc")||l?.getAttribute("src")||l?.dataset.lazySrc||void 0,u={src:c,alt:r.alt||s?.getAttribute("alt")||l?.getAttribute("alt")||void 0,thumbSrc:d,thumbEl:l,triggerEl:o,delegateEl:a};for(let e in r){let t=r[e]+"";u[e]="true"===t?"fancybox"!==e||"":"false"!==t&&t}n.push(u)}return yt.show(n,t)},fromSelector:function(e,n,i,o){if(!t())return;let r=document.body,a=null,s="[data-fancybox]",l={};e instanceof Element&&(r=e),L(e)&&L(n)?(a=e,s=n):L(n)&&L(i)?(a=n,s=i):L(n)?s=n:L(e)&&(s=e),"object"==typeof n&&(l=n||{}),"object"==typeof i&&(l=i||{}),"object"==typeof o&&(l=o||{});for(let[e,t]of yt.openers)for(let[n,i]of t)for(let[t,o]of i)if(e===r&&n===a){let e=r.querySelector((n?`${n} `:"")+s);if(e&&e.matches(t))return yt.fromTriggerEl(e,l)}},fromTriggerEl:f,getCarousel:function(){return yt.getInstance()?.getCarousel()||void 0},getDefaults:function(){return ft},getInstance:function(e){if(e){let t=mt.get(e);return t&&t.getState()!==C.Destroyed?t:void 0}return Array.from(mt.values()).reverse().find((e=>{if(e.getState()!==C.Destroyed)return e}))||void 0},getSlide:function(){return yt.getInstance()?.getSlide()||void 0},show:function(e=[],t={}){return p(),vt().init(e,t)},unbind:function(e,n,i){if(!t())return;let o=document.body,r=null,a="[data-fancybox]";e instanceof Element&&(o=e),L(e)&&L(n)?(r=e,a=n):L(n)&&L(i)?(r=n,a=i):L(n)?a=n:L(e)&&(a=e),function(e,t,n){if(!(e&&e instanceof Element&&n))return;let i=yt.openers.get(e)||new Map,o=i.get(t)||new Map;o&&n&&o.delete(n),(!o.size||!n)&&i.delete(t),i.size||(yt.openers.delete(e),e.removeEventListener("click",yt.fromEvent))}(o,r,a)}};e.Arrows=Ae,e.Autoplay=Ne,e.Carousel=pe,Object.defineProperty(e,"CarouselSlideContentState",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"CarouselState",{enumerable:!0,get:function(){return E}}),e.Fancybox=yt,Object.defineProperty(e,"FancyboxState",{enumerable:!0,get:function(){return C}}),e.Fullscreen=Ge,e.Html=$e,e.Lazyload=_e,e.PANZOOM_DEFAULT_POS=K,e.Panzoom=oe,Object.defineProperty(e,"PanzoomAction",{enumerable:!0,get:function(){return v}}),Object.defineProperty(e,"PanzoomState",{enumerable:!0,get:function(){return w}}),Object.defineProperty(e,"PanzoomZoomLevel",{enumerable:!0,get:function(){return y}}),e.Sync=ve,e.Thumbs=qe,e.Toolbar=Re,Object.defineProperty(e,"ToolbarColumn",{enumerable:!0,get:function(){return _}}),e.Video=ze,e.Zoomable=ge})),define("@fancyapps/ui",["@fancyapps/ui/fancybox.umd"],(function(e){return e})),define("WoltLabSuite/Core/Component/Image/Fancybox/ConsentPlugin",["require","exports","WoltLabSuite/Core/Ui/Message/UserConsent","WoltLabSuite/Core/Core"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentPlugin=void 0,t.ConsentPlugin=class{#Ri=void 0;#ji=new Map;#Ni;#Fi=this.#qi.bind(this);#Ui=this.#$i.bind(this);constructor(){this.#Ni=document.getElementById("consentImageViewer")}init(e){this.#Wi()||(this.#Ri=e,e.on("Carousel.addSlide",this.#Fi).on("Carousel.attachSlideEl",this.#Ui))}destroy(){this.#Ri?.off("Carousel.addSlide",this.#Fi)?.off("Carousel.attachSlideEl",this.#Ui)}#qi(e,t,n){n.src&&this.#Hi(n.src)&&(this.#ji.set(n,n.type),n.type="consent")}#$i(e,t,n){"consent"===n.type&&(n.el.innerHTML="",n.el.append(this.getConsentHTML(t,n)))}getConsentHTML(e,t){const n=this.#Ni.content.cloneNode(!0);n.querySelector(".messageUserConsent").dataset.payload="";const i=n.querySelector(".externalURL"),o=new URL(t.src);i.href=t.src,i.innerText=o.host;const r=n.querySelector(".jsButtonMessageUserConsentOnce");return r.classList.remove("jsButtonMessageUserConsentOnce"),r.addEventListener("click",(()=>{t.type=this.#ji.get(t),t.el.innerHTML="",e.emit("detachSlideEl",t),e.emit("attachSlideEl",t)})),n.querySelector(".jsButtonMessageUserConsentEnable").addEventListener("click",(()=>{this.destroy(),this.#Ni.dataset.showAllMedia="1",e.getSlides().filter((e=>"consent"===e.type)).forEach((e=>{e.type=this.#ji.get(e),e.el.innerHTML=""})),e.emit("detachSlideEl",t),e.emit("attachSlideEl",t)})),n}#Wi(){return!this.#Ni||!!(0,i.stringToBool)(this.#Ni.dataset.showAllMedia)||(0,n.allExternalMediaEnabled)()}#Hi(e){return new URL(e).origin!==window.location.origin}}})),define("WoltLabSuite/Core/Component/Image/Viewer",["require","exports","@fancyapps/ui","WoltLabSuite/Core/Helper/PageOverlay","WoltLabSuite/Core/Language","./Fancybox/ConsentPlugin","WoltLabSuite/Core/StringUtil","WoltLabSuite/Core/Ui/Screen"],(function(e,t,n,i,o,r,a,s){"use strict";function l(){return{IMAGE_ERROR:(0,o.getPhrase)("wcf.fancybox.imageError"),MOVE_UP:(0,o.getPhrase)("wcf.fancybox.moveUp"),MOVE_DOWN:(0,o.getPhrase)("wcf.fancybox.moveDown"),MOVE_LEFT:(0,o.getPhrase)("wcf.fancybox.moveLeft"),MOVE_RIGHT:(0,o.getPhrase)("wcf.fancybox.moveRight"),ZOOM_IN:(0,o.getPhrase)("wcf.fancybox.zoomIn"),ZOOM_OUT:(0,o.getPhrase)("wcf.fancybox.zoomOut"),TOGGLE_FULL:(0,o.getPhrase)("wcf.fancybox.toggleFull"),TOGGLE_1TO1:(0,o.getPhrase)("wcf.fancybox.toggle1to1"),ITERATE_ZOOM:(0,o.getPhrase)("wcf.fancybox.iterateZoom"),ROTATE_CCW:(0,o.getPhrase)("wcf.fancybox.rotateCcw"),ROTATE_CW:(0,o.getPhrase)("wcf.fancybox.rotateCw"),FLIP_X:(0,o.getPhrase)("wcf.fancybox.flipX"),FLIP_Y:(0,o.getPhrase)("wcf.fancybox.flipY"),RESET:(0,o.getPhrase)("wcf.fancybox.reset"),ERROR:(0,o.getPhrase)("wcf.fancybox.error"),GOTO:(0,o.getPhrase)("wcf.fancybox.goto"),DOWNLOAD:(0,o.getPhrase)("wcf.fancybox.download"),TOGGLE_EXPAND:(0,o.getPhrase)("wcf.fancybox.toggleExpand"),TOGGLE_FULLSCREEN:(0,o.getPhrase)("wcf.fancybox.toggleFullscreen"),TOGGLE_THUMBS:(0,o.getPhrase)("wcf.fancybox.toggleThumbs"),TOGGLE_AUTOPLAY:(0,o.getPhrase)("wcf.fancybox.toggleAutoplay"),CLOSE:(0,o.getPhrase)("wcf.fancybox.close"),NEXT:(0,o.getPhrase)("wcf.fancybox.next"),PREV:(0,o.getPhrase)("wcf.fancybox.prev"),MODAL:(0,o.getPhrase)("wcf.fancybox.modal"),ELEMENT_NOT_FOUND:(0,o.getPhrase)("wcf.fancybox.elementNotFound"),IFRAME_ERROR:(0,o.getPhrase)("wcf.fancybox.iframeError")}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){n.Fancybox.bind('[data-fancybox]:is([data-type="image"],[data-type="youtube"],[data-type="vimeo"],[data-type="video"])')},t.setupLegacy=function(){n.Fancybox.bind(".jsImageViewer",{groupAll:!0})},t.showFancybox=function(e){n.Fancybox.show(e)},t.getLocalization=l,function(){const e=n.Fancybox.getDefaults();e.l10n=l(),e.parentEl=(0,i.getPageOverlayContainer)(),e.Carousel={Video:{autoplay:!1},formatCaption(e,t){const n=t.caption;return n instanceof HTMLElement?n:(0,a.escapeHTML)(n??"")}},e.plugins||(e.plugins={}),e.plugins.consent=()=>new r.ConsentPlugin,e.hideClass=!1,e.hideScrollbar=!1,e.on={ready(){(0,s.scrollDisable)()},close(){(0,s.scrollEnable)()}}}()})),define("WoltLabSuite/Core/Component/Interaction/Confirmation",["require","exports","WoltLabSuite/Core/Component/Confirmation"],(function(e,t,n){"use strict";var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationType=void 0,t.handleConfirmation=async function(e,t,o=""){return t==i.SoftDelete?await(0,n.confirmationFactory)().softDelete(e||void 0):t==i.SoftDeleteWithReason?await(0,n.confirmationFactory)().softDelete(e||void 0,!0):t==i.Restore?{result:await(0,n.confirmationFactory)().restore(e||void 0)}:t==i.Delete?{result:await(0,n.confirmationFactory)().delete(e||void 0)}:t==i.Disable?{result:await(0,n.confirmationFactory)().disable(e||void 0)}:t==i.Custom?{result:await(0,n.confirmationFactory)().custom(o).withoutMessage()}:{result:!0}},function(e){e.None="None",e.SoftDelete="SoftDelete",e.SoftDeleteWithReason="SoftDeleteWithReason",e.Restore="Restore",e.Delete="Delete",e.Disable="Disable",e.Custom="Custom"}(i||(t.ConfirmationType=i={}))})),define("WoltLabSuite/Core/Component/Interaction/InteractionEffect",["require","exports"],(function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.InteractionEffect=void 0,function(e){e.ReloadItem="ReloadItem",e.ReloadList="ReloadList",e.ReloadPage="ReloadPage",e.RemoveItem="RemoveItem"}(n||(t.InteractionEffect=n={}))})),define("WoltLabSuite/Core/Component/Interaction/FormBuilderDialog",["require","exports","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/Component/Snackbar","./InteractionEffect"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){t.addEventListener("interaction:execute",(r=>{r.detail.interaction===e&&async function(e,t,r,a=o.InteractionEffect.ReloadItem,s){const{ok:l,result:c}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(r);l&&(a===o.InteractionEffect.ReloadItem||a===o.InteractionEffect.ReloadPage?t.dispatchEvent(new CustomEvent("interaction:invalidate",{bubbles:!0,detail:{...s,...c,_reloadPage:String(a===o.InteractionEffect.ReloadPage)}})):a===o.InteractionEffect.ReloadList?e.dispatchEvent(new CustomEvent("interaction:invalidate-all",{detail:{...s,...c}})):t.dispatchEvent(new CustomEvent("interaction:remove",{bubbles:!0,detail:{...s,...c}})),(0,i.showDefaultSuccessSnackbar)())}(t,r.target,r.detail.endpoint,r.detail.interactionEffect,r.detail)}))}})),define("WoltLabSuite/Core/Component/Interaction/LegacyDboAction",["require","exports","WoltLabSuite/Core/Ajax","./Confirmation","WoltLabSuite/Core/Component/Snackbar","WoltLabSuite/Core/Language","./InteractionEffect"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){t.addEventListener("interaction:execute",(s=>{s.detail.interaction===e&&async function(e,t,s,l,c,d,u="",h=a.InteractionEffect.ReloadItem,p){const f=await(0,i.handleConfirmation)(s,d,u);f.result&&(await(0,n.dboAction)(c,l).objectIds([parseInt(t.dataset.objectId)]).payload(f.reason?{reason:f.reason}:{}).dispatch(),h===a.InteractionEffect.ReloadItem||h===a.InteractionEffect.ReloadPage?t.dispatchEvent(new CustomEvent("interaction:invalidate",{bubbles:!0,detail:{...p,_reloadPage:String(h===a.InteractionEffect.ReloadPage)}})):h===a.InteractionEffect.ReloadList?e.dispatchEvent(new CustomEvent("interaction:invalidate-all",{detail:p})):t.dispatchEvent(new CustomEvent("interaction:remove",{bubbles:!0,detail:p})),d==i.ConfirmationType.Delete?(0,o.showSuccessSnackbar)((0,r.getPhrase)("wcf.global.success.delete")):(0,o.showDefaultSuccessSnackbar)())}(t,s.target,s.detail.objectName,s.detail.className,s.detail.actionName,s.detail.confirmationType,s.detail.confirmationMessage,s.detail.interactionEffect,s.detail)}))}})),define("WoltLabSuite/Core/Api/DeleteObject",["require","exports","WoltLabSuite/Core/Ajax/Backend","./Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteObject=async function(e){try{await(0,n.prepareRequest)(e).delete().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Component/Interaction/Rpc",["require","exports","WoltLabSuite/Core/Api/DeleteObject","WoltLabSuite/Core/Api/PostObject","./Confirmation","WoltLabSuite/Core/Component/Snackbar","WoltLabSuite/Core/Language","./InteractionEffect"],(function(e,t,n,i,o,r,a,s){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){t.addEventListener("interaction:execute",(l=>{l.detail.interaction===e&&async function(e,t,l,c,d,u="",h=s.InteractionEffect.ReloadItem,p){const f=await(0,o.handleConfirmation)(l,d,u);f.result&&(d==o.ConfirmationType.Delete?(await(0,n.deleteObject)(c)).unwrap():(await(0,i.postObject)(c,f.reason?{reason:f.reason}:void 0)).unwrap(),h===s.InteractionEffect.ReloadItem||h===s.InteractionEffect.ReloadPage?t.dispatchEvent(new CustomEvent("interaction:invalidate",{bubbles:!0,detail:{...p,_reloadPage:String(h===s.InteractionEffect.ReloadPage)}})):h===s.InteractionEffect.ReloadList?e.dispatchEvent(new CustomEvent("interaction:invalidate-all",{detail:p})):t.dispatchEvent(new CustomEvent("interaction:remove",{bubbles:!0,detail:p})),d===o.ConfirmationType.Delete?(0,r.showSuccessSnackbar)((0,a.getPhrase)("wcf.global.success.delete")):(0,r.showDefaultSuccessSnackbar)())}(t,l.target,l.detail.objectName,l.detail.endpoint,l.detail.confirmationType,l.detail.confirmationMessage,l.detail.interactionEffect,l.detail)}))}})),define("WoltLabSuite/Core/Component/Interaction/StandaloneButton",["require","exports","tslib","WoltLabSuite/Core/Api/GetObject","WoltLabSuite/Core/Api/Interactions/GetContextMenuOptions","WoltLabSuite/Core/Ui/Dropdown/Simple"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StandaloneButton=void 0,r=n.__importDefault(r),t.StandaloneButton=class{#tt;#zi;#yn;#Qi;#Vi;constructor(e,t,n,i,o){this.#tt=e,this.#zi=t,this.#yn=n,this.#Qi=i,this.#Vi=o,this.#Pe(),this.#Be()}async#Gi(){const{template:e}=await(0,o.getContextMenuOptions)(this.#zi,this.#yn),t=this.#Xi();t&&(t.innerHTML=e,this.#Pe())}async#Yi(){if(!this.#Vi)return;const e=document.querySelector(".contentHeaderTitle");if(!e)return;const t=await(0,i.getObject)(`${window.WSC_RPC_API_URL}${this.#Vi}`);t.ok&&(e.outerHTML=t.value.template)}#Xi(){const e=this.#tt.querySelector(".dropdownToggle");if(!e)return;let t=r.default.getDropdownMenu(e.dataset.target);return t||(t=e.closest(".dropdown").querySelector(".dropdownMenu")),t}#Pe(){this.#Xi()?.querySelectorAll("[data-interaction]").forEach((e=>{e.addEventListener("click",(()=>{this.#tt.dispatchEvent(new CustomEvent("interaction:execute",{detail:e.dataset,bubbles:!0}))}))}))}#Be(){this.#tt.addEventListener("interaction:invalidate",(e=>{"true"===e.detail._reloadPage?setTimeout((()=>{window.location.reload()}),2e3):(this.#Gi(),this.#Yi())})),this.#tt.addEventListener("interaction:invalidate-all",(()=>{this.#Gi(),this.#Yi()})),this.#tt.addEventListener("interaction:remove",(()=>{setTimeout((()=>{window.location.href=this.#Qi}),2e3)}))}}})),define("WoltLabSuite/Core/Component/Interaction/Toggle",["require","exports","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Api/PostObject"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){(0,n.wheneverFirstSeen)(`#${t.id} [data-interaction="${e}"]`,(e=>{e.addEventListener("change",(t=>{!async function(e,t,n){await(0,i.postObject)(e?t:n)}(t.detail.checked,e.dataset.enableEndpoint,e.dataset.disableEndpoint)}))}))}})),define("WoltLabSuite/Core/Component/Message/I18nPreview",["require","exports","tslib","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t,n,c){const d=function(e){const t=new Map;return e.forEach((e=>{(0,r.listenToCkeditor)(document.getElementById(e)).ready((({ckeditor:n})=>{t.set(e,n)}))})),t}(e);document.getElementById(t)?.addEventListener("click",(0,i.promiseMutex)((()=>{const e=function(e){let t;return e.forEach((e=>{e.isVisible()&&(t=e)})),t}(d);return void 0===e?Promise.resolve():""===e.getHtml()?(l.default.innerError(e.element,(0,s.getPhrase)("wcf.global.form.error.empty")),Promise.resolve()):(l.default.innerError(e.element,!1),async function(e,t,n){const i=await(0,o.dboAction)("getMessagePreview","wcf\\data\\bbcode\\MessagePreviewAction").payload({data:{message:e},messageObjectType:t,messageObjectID:n}).dispatch();(0,a.dialogFactory)().fromHtml('<div class="htmlContent">'+i.message+"</div>").withoutControls().show((0,s.getPhrase)("wcf.global.preview"))}(e.getHtml(),n,c))})))},l=n.__importDefault(l)})),define("WoltLabSuite/Core/Component/Message/Preview",["require","exports","tslib","WoltLabSuite/Core/Helper/Prom
1iseMutex","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t,n,c){(0,r.listenToCkeditor)(document.getElementById(e)).ready((({ckeditor:e})=>{document.getElementById(t)?.addEventListener("click",(0,i.promiseMutex)((()=>""===e.getHtml()?(l.default.innerError(e.element,(0,s.getPhrase)("wcf.global.form.error.empty")),Promise.resolve()):(l.default.innerError(e.element,!1),async function(e,t,n){const i=await(0,o.dboAction)("getMessagePreview","wcf\\data\\bbcode\\MessagePreviewAction").payload({data:{message:e},messageObjectType:t,messageObjectID:n}).dispatch();(0,a.dialogFactory)().fromHtml('<div class="htmlContent">'+i.message+"</div>").withoutControls().show((0,s.getPhrase)("wcf.global.preview"))}(e.getHtml(),n,c)))))}))},l=n.__importDefault(l)})),define("WoltLabSuite/Core/Component/Option/Enable",["require","exports","WoltLabSuite/Core/Helper/Selector"],(function(e,t,n){"use strict";function i(e){const t=JSON.parse(e.dataset.disableOptions),n=JSON.parse(e.dataset.enableOptions);if(e instanceof HTMLInputElement)switch(e.type){case"checkbox":o(e.checked,t,n);break;case"radio":if(e.checked){let i=!0;e.dataset.isBoolean&&"1"!==e.value&&(i=!1),o(i,t,n)}}else if(e instanceof HTMLSelectElement){const i=e.value,r=[],a=[];for(const e of t)e.value===i?r.push(e.option):a.push(e.option);for(const e of n)e.value===i?a.push(e.option):r.push(e.option);o(!0,r,a)}}function o(e,t,n){t.forEach((t=>{a(t).forEach((t=>{r(t,!e)}))})),n.forEach((t=>{a(t).forEach((t=>{r(t,e)}))}
1))}function r(e,t){if(e instanceof HTMLSelectElement||e instanceof HTMLInputElement&&("checkbox"===e.type||"file"===e.type||"radio"===e.type)){if(e instanceof HTMLInputElement&&"radio"===e.type&&e.checked||(e.disabled=!t),e.closest(".optionTypeBoolean")){document.getElementById(e.id+"_no").disabled=!t;const n=document.getElementById(e.id+"_never");n&&(n.disabled=!t)}}else t?e.removeAttribute("readonly"):e.setAttribute("readonly","true");t?e.closest("dl")?.classList.remove("disabled"):e.closest("dl")?.classList.add("disabled")}function a(e){const t=document.getElementById(e);if(t)return[t];const n=document.querySelectorAll(`.${e}Input > dd`);return Array.from(n).map((e=>Array.from(e.querySelectorAll("input, select, textarea")))).flat()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,n.wheneverFirstSeen)(".jsEnablesOptions",(e=>{i(e),e.addEventListener("change",(()=>{i(e)}))}))}})),define("WoltLabSuite/Core/Component/User/ActivityPointList",["require","exports","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/Language"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,o.wheneverFirstSeen)(".activityPointsDisplay",(e=>{e.addEventListener("click",(0,i.promiseMutex)((t=>(t.preventDefault(),async function(e){const t=await(0,n.dboAction)("getDetailedActivityPointList","wcf\\data\\user\\UserProfileAction").objectIds([e]).dispatch();(0,r.dialogFactory)().fromHtml(t.template).withoutControls().show((0,a.getPhrase)("wcf.user.activityPoint"))}(parseInt(e.dataset.userId))))))}))}})),define("WoltLabSuite/Core/Component/User/Follow",["require","exports","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","../Snackbar"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,o.wheneverFirstSeen)("[data-follow-user]",(e=>{e.addEventListener("click",(0,i.promiseMutex)((()=>async function(e){"1"!==e.dataset.following?(await(0,n.prepareRequest)(e.dataset.followUser).post({action:"follow"}).fetchAsResponse(),e.dataset.following="1","button"===e.dataset.type?e.textContent=(0,r.getPhrase)("wcf.user.button.unfollow"):(e.dataset.tooltip=(0,r.getPhrase)("wcf.user.button.unfollow"),e.querySelector("fa-icon")?.setIcon("user-minus"))):(await(0,n.prepareRequest)(e.dataset.followUser).post({action:"unfollow"}).fetchAsResponse(),e.dataset.following="0","button"===e.dataset.type?e.textContent=(0,r.getPhrase)("wcf.user.button.follow"):(e.dataset.tooltip=(0,r.getPhrase)("wcf.user.button.follow"),e.querySelector("fa-icon")?.setIcon("user-plus"))),(0,a.showDefaultSuccessSnackbar)()}(e))))}))}})),define("WoltLabSuite/Core/Component/User/Ignore",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Helper/Selector","WoltLabSuite/Core/Language","WoltLabSuite/Core/Component/Dialog","../Snackbar"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,i.wheneverFirstSeen)("[data-ignore-user]",(e=>{e.addEventListener("click",(0,n.promiseMutex)((()=>async function(e){const{ok:t,result:n}=await(0,r.dialogFactory)().usingFormBuilder().fromEndpoint(e.dataset.ignoreUser);t&&(n.type?(e.dataset.ignored="1","button"===e.dataset.type?e.textContent=(0,o.getPhrase)("wcf.user.button.unignore"):(e.dataset.tooltip=(0,o.getPhrase)("wcf.user.button.unignore"),e.querySelector("fa-icon")?.setIcon("eye",!0))):(e.dataset.ignored="0","button"===e.dataset.type?e.textContent=(0,o.getPhrase)("wcf.user.button.ignore"):(e.dataset.tooltip=(0,o.getPhrase)("wcf.user.button.ignore"),e.querySelector("fa-icon")?.setIcon("eye-slash",!0))),(0,a.showDefaultSuccessSnackbar)())}(e))))}))}})),define("WoltLabSuite/Core/Component/User/List",["require","exports","tslib","../../Ajax","../../Ui/Pagination","../Dialog","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o,r,a){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.UserList=void 0,o=n.__importDefault(o),a=n.__importDefault(a),t.UserList=class{#Ji;#Ki;#Ee=1;#Zi=0;#e;constructor(e,t){this.#Ji=e,this.#Ki=t}open(){this.#Ee=1,this.#eo(this.#Ee)}#to(e,t){e&&(this.#Ee=e);const n=this.#no();if(a.default.setInnerHtml(n.content,t),n.show(this.#Ki),this.#Zi>1){const e=n.content.querySelector(".jsPagination");null!==e&&new o.default(e,{activePage:this.#Ee,maxPage:this.#Zi,callbackSwitch:e=>{this.#eo(e)}})}}async#eo(e){if(0!==this.#Zi&&(e<1||e>this.#Zi))throw new RangeError(`pageNo must be between 1 and ${this.#Zi} (${e} given).`);this.#Ji.parameters.pageNo=e;const t=await(0,i.dboAction)("getGroupedUserList",this.#Ji.className).payload(this.#Ji.parameters).dispatch();t.pageCount&&(this.#Zi=t.pageCount),this.#to(e,t.template)}#no(){return void 0===this.#e&&(this.#e=(0,r.dialogFactory)().withoutContent().withoutControls()),this.#e}}})),define("WoltLabSuite/Core/Controller/EditHistory/VersionList",["require","exports","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Component/Confirmation","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){(function(e){e.querySelectorAll(".jsRevertButton").forEach((e=>{e.addEventListener("click",(async()=>{await(0,i.confirmationFactory)().custom(e.dataset.confirmMessage).withoutMessage()&&async function(e){await(0,n.dboAction)("revert","wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction").objectIds([e]).dispatch(),(0,o.showDefaultSuccessSnackbar)().addEventListener("snackbar:close",(()=>{window.location.reload()}))}(parseInt(e.dataset.objectId))}))}))})(e),function(e){function t(e){const t="current"===e.value?1/0:parseInt(e.value);i.forEach((e=>{const n="current"===e.value?1/0:parseInt(e.value);e.disabled=n>=t}))}function n(e){const t="current"===e.value?1/0:parseInt(e.value);o.forEach((e=>{const n="current"===e.value?1/0:parseInt(e.value);e.disabled=n<=t}))}const i=e.querySelectorAll("input[name=oldID]"),o=e.querySelectorAll("input[name=newID]");o.forEach((e=>{e.addEventListener("change",(()=>{t(e)})),e.checked&&t(e)})),i.forEach((e=>{e.addEventListener("change",(()=>{n(e)})),e.checked&&n(e)}))}(e)}})),define("WoltLabSuite/Core/Controller/Moderation/AssignUser",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","../../Component/Dialog","../../Language","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){e.addEventListener("click",(0,n.promiseMutex)((()=>async function(e){const{ok:t,result:n}=await(0,i.dialogFactory)().usingFormBuilder().fromEndpoint(e);var a;t&&(function(e){const t=document.getElementById("moderationAssignedUser");if(null===e)t.textContent=(0,o.getPhrase)("wcf.moderation.assignedUser.nobody");else{const n=document.createElement("a");n.href=e.link,n.dataset.objectId=e.userID.toString(),n.classList.add("userLink"),n.textContent=e.username,t.innerHTML="",t.append(n)}}(n.assignee),a=n.status,document.getElementById("moderationQueueStatus").textContent=a,(0,r.showDefaultSuccessSnackbar)())}(e.dataset.url))))}})),define("WoltLabSuite/Core/Controller/Style/ColorScheme",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){const e=document.querySelector('meta[name="theme-color"]');e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{document.documentElement.dataset.colorScheme=t.matches?"dark":"light",e.content=window.getComputedStyle(document.body).getPropertyValue("--wcfPageThemeColor")}))}})),define("WoltLabSuite/Core/Controller/User/Profile",["require","exports","tslib","WoltLabSuite/Core/Ajax","../../Component/User/List","WoltLabSuite/Core/Event/Handler","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Ui/TabMenu"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e,t,n){const i=document.getElementById(t);if(i){let t;i.addEventListener("click",(()=>{void 0===t&&(t=new o.UserList({className:n,parameters:{userID:e}},i.dataset.dialogTitle)),t.open()}))}}async function d(e,t){if(u.has(t))return;const n=await(0,i.dboAction)("getContent","wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction").payload({data:{menuItem:t,userID:e}}).dispatch();u.set(t,!0),(0,a.insertHtml)(n.template,document.querySelector('.tabMenuContent[data-name="'+t+'"]'),"append"),(0,s.trigger)()}
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){!function(e){c(e,"followingAll","wcf\\data\\user\\follow\\UserFollowingAction")}(e),function(e){c(e,"followerAll","wcf\\data\\user\\follow\\UserFollowAction")}(e),function(e){c(e,"visitorAll","wcf\\data\\user\\profile\\visitor\\UserProfileVisitorAction")}(e),function(e){const t=document.getElementById("profileContent");null!==t&&(u.set(t.dataset.active,!0),d(e,(0,l.getTabMenu)("profileContent").getActiveTab().dataset.name),r.add("com.woltlab.wcf.simpleTabMenu_profileContent","select",(t=>{d(e,t.activeName)})))}(e)},r=n.__importStar(r);const u=new Map})),define("WoltLabSuite/Core/Controller/User/Registration",["require","exports","tslib","WoltLabSuite/Core/Ajax/Backend","WoltLabSuite/Core/Language","../../Dom/Util"],(function(e,t,n,i,o,r){"use strict";function a(e,t){const n=e.closest("dl");n.classList.add("formError"),n.classList.remove("formSuccess"),r.default.innerError(e,(0,o.getPhrase)(t))}function s(e){const t=e.closest("dl");t.classList.remove("formError"),t.classList.add("formSuccess"),r.default.innerError(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t,n,o){e.addEventListener("blur",(()=>{!async function(e,t){const n=e.value.trim();if(!n)return void a(e,"wcf.global.form.error.empty");if(n.length<t.minlength||n.length>t.maxlength)return void a(e,"wcf.user.username.error.invalid");const o=await(0,i.prepareRequest)(e.dataset.validationEndpoint).post({username:n}).fetchAsJson();o.ok?s(e):a(e,`wcf.user.username.error.${o.error}`)}(e,o)})),t.addEventListener("blur",(()=>{!async function(e){const t=e.value.trim();if(!t)return void a(e,"wcf.global.form.error.empty");const n=await(0,i.prepareRequest)(e.dataset.validationEndpoint).post({email:t}).fetchAsJson();n.ok?s(e):a(e,`wcf.user.email.error.${n.error}`)}(t)})),n.addEventListener("blur",(()=>{!function(e){e.value.trim()||a(e,"wcf.global.form.error.empty")}(n)}))},r=n.__importDefault(r)})),define("WoltLabSuite/Core/Form/Builder/Dialog",["require","exports","tslib","../../Core","../../Ui/Dialog","../../Ajax","./Manager"],(function(e,t,n,i,o,r,a){"use strict";return i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importStar(a),class{_actionName;_className;_dialogContent;_dialogId;_formId;_options;_additionalSubmitButtons;constructor(e,t,n,i){this.init(e,t,n,i)}init(e,t,n,r){if(this._dialogId=e,this._className=t,this._actionName=n,this._options=i.extend({actionParameters:{},destroyOnClose:!1,usesDboAction:/\w+\\data\\/.test(this._className)},r),this._options.dialog=i.extend(this._options.dialog||{},{onClose:()=>this._dialogOnClose()}),o.default.getDialog(this._dialogId))throw new Error(`The dialogId ${this._dialogId} is already in use.`);this._formId="",this._dialogContent=""}_ajaxSetup(){const e={data:{actionName:this._actionName,className:this._className,parameters:this._options.actionParameters}};return this._options.usesDboAction||(e.url="index.php?ajax-invoke/&t="+i.getXsrfToken(),e.withCredentials=!0),e}_ajaxSuccess(e){switch(e.actionName){case this._actionName:if(void 0===e.returnValues)throw new Error("Missing return data.");!function(e){if(void 0===e.dialog)throw new Error("Missing dialog template in return data.");if(void 0===e.formId)throw new Error("Missing form id in return data.")}(e.returnValues),this._openDialogContent(e.returnValues.formId,e.returnValues.dialog);break;case this._options.submitActionName:if(e.returnValues&&void 0!==(t=e.returnValues).dialog&&void 0!==t.formId){if(e.returnValues.formId!==this._formId)throw new Error("Mismatch between form ids: expected '"+this._formId+"' but got '"+e.returnValues.formId+"'.");this._openDialogContent(e.returnValues.formId,e.returnValues.dialog)}else this.destroy(),"function"==typeof this._options.successCallback&&this._options.successCallback(e.returnValues||{});break;default:throw new Error("Cannot handle action '"+e.actionName+"'.")}var t}_closeDialog(){o.default.close(this),"function"==typeof this._options.closeCallback&&this._options.closeCallback()}_dialogOnClose(){this._options.destroyOnClose&&this.destroy()}_dialogSetup(){return{id:this._dialogId,options:this._options.dialog,source:this._dialogContent}}_dialogSubmit(){this.getData().then((e=>this._submitForm(e)))}_openDialogContent(e,t){this.destroy(!0),this._formId=e,this._dialogContent=t;
1const n=o.default.open(this,this._dialogContent),r=n.content.querySelector("button[data-type=cancel]");null===r||i.stringToBool(r.dataset.hasEventListener||"")||(r.addEventListener("click",(()=>this._closeDialog())),r.dataset.hasEventListener="1"),this._additionalSubmitButtons=Array.from(n.content.querySelectorAll(':not(.formSubmit) button[type="submit"]')),this._additionalSubmitButtons.forEach((e=>{e.addEventListener("click",(()=>{this._additionalSubmitButtons.forEach((t=>{t.dataset.isClicked=t===e?"1":"0"})),setTimeout((()=>o.default.submit(this._dialogId)),0)}))}))}_submitForm(e){const t=o.default.getDialog(this).content.querySelector("button[data-type=submit]");"function"==typeof this._options.onSubmit?this._options.onSubmit(e,t):"string"==typeof this._options.submitActionName&&(t.disabled=!0,this._additionalSubmitButtons.forEach((e=>e.disabled=!0)),r.api(this,{actionName:this._options.submitActionName,parameters:{data:e,formId:this._formId}}))}destroy(e=!1){""!==this._formId&&(a.hasForm(this._formId)&&a.unregisterForm(this._formId),!0!==e&&o.default.destroy(this))}getData(){if(""===this._formId)throw new Error("Form has not been requested yet.");return a.getData(this._formId)}open(){o.default.getDialog(this._dialogId)?o.default.open(this):r.api(this)}}})),define("WoltLabSuite/Core/Form/Builder/FormGuard",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){e.addEventListener("submit",(()=>{e.querySelectorAll("input[type=submit]").forEach((e=>{e.disabled=!0}))}))}})),define("WoltLabSuite/Core/Helper/Dom/View",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomView=void 0,i=n.__importDefault(i);class o{#io;constructor(e){this.#io=this.#oo(e)}get root(){return this.#io}#oo(e){if(e instanceof HTMLElement)return e;if("string"==typeof e&&(e=i.default.createFragmentFromHtml(e)),1===e.children.length)return e.children[0];const t=document.createElement("div");return t.append(e),t}}t.DomView=o,t.default=o})),function(e){!function(t){function n(e,t){return function(n,i){Object.defineProperty(e,n,{configurable:!0,writable:!0,value:i}),t&&t(n,i)}}var i="object"==typeof globalThis?globalThis:"object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),o=n(e);void 0!==i.Reflect&&(o=n(i.Reflect,o)),function(e,t){function n(e,t,o){var r;return!!i(e,t,o)||!u(r=A(t))&&n(e,r,o)}function i(e,t,n){var i=I(t,n,!1);return!d(i)&&f(i.OrdinaryHasOwnMetadata(e,t,n))}function o(e,t,n){var a;return i(e,t,n)?r(e,t,n):u(a=A(t))?void 0:o(e,a,n)}function r(e,t,n){var i=I(t,n,!1);if(!d(i))return i.OrdinaryGetOwnMetadata(e,t,n)}function a(e,t,n,i){I(n,i,!0).OrdinaryDefineOwnMetadata(e,t,n,i)}function s(e,t){var n,i,o,r,a,c,d,u,h=l(e,t),p=A(e);if(null===p)return h;if((n=s(p,t)).length<=0)return h;if(h.length<=0)return n;for(i=new F,o=[],r=0,a=h;r<a.length;r++)c=a[r],i.has(c)||(i.add(c),o.push(c));for(d=0,u=n;d<u.length;d++)c=u[d],i.has(c)||(i.add(c),o.push(c));return o}function l(e,t){var n=I(e,t,!1);return n?n.OrdinaryOwnMetadataKeys(e,t):[]}function c(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function d(e){return void 0===e}function u(e){return null===e}function h(e){return"object"==typeof e?null!==e:"function"==typeof e}function p(e,t){var n,i,o;switch(c(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}if(n=3===t?"string":5===t?"number":"default",void 0!==(i=w(e,M))){if(h(o=i.call(e,n)))throw new TypeError;return o}return function(e,t){var n,i,o,r;if("string"===t){if(b(n=e.toString)&&!h(i=n.call(e)))return i;if(b(o=e.valueOf)&&!h(i=o.call(e)))return i}else{if(b(o=e.valueOf)&&!h(i=o.call(e)))return i;if(b(r=e.toString)&&!h(i=r.call(e)))return i}throw new TypeError}(e,"default"===n?"number":n)}function f(e){return!!e}function m(e){var t=p(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function g(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function b(e){return"function"==typeof e}function v(e){return"function"==typeof e}function y(e,t){return e===t||e!=e&&t!=t}function w(e,t){var n=e[t];if(null!=n){if(!b(n))throw new TypeError;return n}}function E(e){var t,n=w(e,P);if(!b(n))throw new TypeError;if(!h(t=n.call(e)))throw new TypeError;return t}function S(e){return e.value}function _(e){var t=e.next();return!t.done&&t}function C(e){var t=e.return;t&&t.call(e)}function A(e){var t,n,i,o=Object.getPrototypeOf(e);return"function"!=typeof e||e===j||o!==j||null==(n=(t=e.prototype)&&Object.getPrototypeOf(t))||n===Object.prototype||"function"!=typeof(i=n.constructor)||i===e?o:i}function L(){function e(e,t){var s,l=a.get(e);return d(l)||(s=l.get(t)),d(s)?(d(s=function(e,t){var a,s,l;if(!d(i)){if(i.isProviderFor(e,t))return i;if(!d(o)){if(o.isProviderFor(e,t))return i;if(!d(r))for(a=E(r);;){if(!(s=_(a)))return;if((l=S(s)).isProviderFor(e,t))return C(a),l}}}if(!d(n)&&n.isProviderFor(e,t))return n}(e,t))||(d(l)&&(l=new N,a.set(e,l)),l.set(t,s)),s):s}var n,i,o,r,a,s;return d(U)||void 0===t.Reflect||U in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(n=function(e){var t=e.defineMetadata,n=e.hasOwnMetadata,i=e.getOwnMetadata,o=e.getOwnMetadataKeys,r=e.deleteMetadata,a=new q,s={isProviderFor:function(e,t){var n=a.get(e);return!(d(n)||!n.has(t))||!!o(e,t).length&&(d(n)&&(n=new F,a.set(e,n)),n.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:n,OrdinaryGetOwnMetadata:i,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:r};return s}(t.Reflect)),a=new q,s={registerProvider:function(e){if(!Object.isExtensible(s))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case n===e:break;case d(i):i=e;break;case i===e:break;case d(o):o=e;break;case o===e:break;default:void 0===r&&(r=new F),r.add(e)}},getProvider:e,setProvider:function(t,n,s){var l,c;if(!function(e){if(d(e))throw new TypeError;return i===e||o===e||!d(r)&&r.has(e)}(s))throw new Error("Metadata provider not registered.");
1if((l=e(t,n))!==s){if(!d(l))return!1;d(c=a.get(t))&&(c=new N,a.set(t,c)),c.set(n,s)}return!0}}}function I(e,t,n){var i=$.getProvider(e,t);if(!d(i))return i;if(n){if($.setProvider(e,t,W))return W;throw new Error("Illegal state.")}}function x(e){return e.__=void 0,delete e.__,e}var k=Object.prototype.hasOwnProperty,T="function"==typeof Symbol,M=T&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",P=T&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",D="function"==typeof Object.create,B={__proto__:[]}instanceof Array,O=!D&&!B,R={create:D?function(){return x(Object.create(null))}:B?function(){return x({__proto__:null})}:function(){return x({})},has:O?function(e,t){return k.call(e,t)}:function(e,t){return t in e},get:O?function(e,t){return k.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},j=Object.getPrototypeOf(Function),N="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){function e(e,t){return e}function t(e,t){return t}function n(e,t){return[e,t]}var i={},o=[],r=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[P]=function(){return this},e.prototype.next=function(){var e,t=this._index;return t>=0&&t<this._keys.length?(e=this._selector(this._keys[t],this._values[t]),t+1>=this._keys.length?(this._index=-1,this._keys=o,this._values=o):this._index++,{value:e,done:!1}):{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=o,this._values=o),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=o,this._values=o),{value:e,done:!0}},e}();return function(){function o(){this._keys=[],this._values=[],this._cacheKey=i,this._cacheIndex=-2}return Object.defineProperty(o.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),o.prototype.has=function(e){return this._find(e,!1)>=0},o.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},o.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},o.prototype.delete=function(e){var t,n,o=this._find(e,!1);if(o>=0){for(t=this._keys.length,n=o+1;n<t;n++)this._keys[n-1]=this._keys[n],this._values[n-1]=this._values[n];return this._keys.length--,this._values.length--,y(e,this._cacheKey)&&(this._cacheKey=i,this._cacheIndex=-2),!0}return!1},o.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=i,this._cacheIndex=-2},o.prototype.keys=function(){return new r(this._keys,this._values,e)},o.prototype.values=function(){return new r(this._keys,this._values,t)},o.prototype.entries=function(){return new r(this._keys,this._values,n)},o.prototype["@@iterator"]=function(){return this.entries()},o.prototype[P]=function(){return this.entries()},o.prototype._find=function(e,t){if(!y(this._cacheKey,e)){this._cacheIndex=-1;for(var n=0;n<this._keys.length;n++)if(y(this._keys[n],e)){this._cacheIndex=n;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},o}()}(),F="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new N}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[P]=function(){return this.keys()},e}(),q="function"==typeof WeakMap?WeakMap:function(){function e(){var e;do{e="@@WeakMap@@"+i()}while(R.has(r,e));return r[e]=!0,e}function t(e,t){if(!k.call(e,a)){if(!t)return;Object.defineProperty(e,a,{value:R.create()})}return e[a]}function n(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function i(){var e,t,i,r=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):n(t,e),t}return n(new Array(e),e)}(o);for(r[6]=79&r[6]|64,r[8]=191&r[8]|128,e="",t=0;t<o;++t)4!==t&&6!==t&&8!==t||(e+="-"),(i=r[t])<16&&(e+="0"),e+=i.toString(16).toLowerCase();return e}var o=16,r=R.create(),a=e();return function(){function n(){this._key=e()}return n.prototype.has=function(e){var n=t(e,!1);return void 0!==n&&R.has(n,this._key)},n.prototype.get=function(e){var n=t(e,!1);return void 0!==n?R.get(n,this._key):void 0},n.prototype.set=function(e,n){return t(e,!0)[this._key]=n,this},n.prototype.delete=function(e){var n=t(e,!1);return void 0!==n&&delete n[this._key]},n.prototype.clear=function(){this._key=e()},n}()}(),U=T?Symbol.for("@reflect-metadata:registry"):void 0,$=function(){var e;return!d(U)&&h(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[U]),d(e)&&(e=L()),!d(U)&&h(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,U,{enumerable:!1,
1configurable:!1,writable:!1,value:e}),e}(),W=function(e){function t(t,o,r){var a,s=n.get(t),l=!1;if(d(s)){if(!r)return;s=new N,n.set(t,s),l=!0}if(d(a=s.get(o))){if(!r)return;if(a=new N,s.set(o,a),!e.setProvider(t,o,i))throw s.delete(o),l&&n.delete(t),new Error("Wrong provider for target.")}return a}var n=new q,i={isProviderFor:function(e,t){var i=n.get(e);return!d(i)&&i.has(t)},OrdinaryDefineOwnMetadata:function(e,n,i,o){t(i,o,!0).set(e,n)},OrdinaryHasOwnMetadata:function(e,n,i){var o=t(n,i,!1);return!d(o)&&f(o.has(e))},OrdinaryGetOwnMetadata:function(e,n,i){var o=t(n,i,!1);if(!d(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,n){var i,o,r,a,s=[],l=t(e,n,!1);if(d(l))return s;for(i=E(l.keys()),o=0;;){if(!(r=_(i)))return s.length=o,s;a=S(r);try{s[o]=a}catch(e){try{C(i)}finally{throw e}}o++}},OrdinaryDeleteMetadata:function(e,i,o){var r,a=t(i,o,!1);return!d(a)&&!!a.delete(e)&&(0===a.size&&(d(r=n.get(i))||(r.delete(o),0===r.size&&n.delete(r))),!0)}};return $.registerProvider(i),i}($);e("decorate",(function(e,t,n,i){if(d(n)){if(!g(e))throw new TypeError;if(!v(t))throw new TypeError;return function(e,t){var n,i;for(n=e.length-1;n>=0;--n)if(!d(i=(0,e[n])(t))&&!u(i)){if(!v(i))throw new TypeError;t=i}return t}(e,t)}if(!g(e))throw new TypeError;if(!h(t))throw new TypeError;if(!h(i)&&!d(i)&&!u(i))throw new TypeError;return u(i)&&(i=void 0),function(e,t,n,i){var o,r;for(o=e.length-1;o>=0;--o)if(!d(r=(0,e[o])(t,n,i))&&!u(r)){if(!h(r))throw new TypeError;i=r}return i}(e,t,n=m(n),i)})),e("metadata",(function(e,t){return function(n,i){if(!h(n))throw new TypeError;if(!d(i)&&!function(e){switch(c(e)){case 3:case 4:return!0;default:return!1}}(i))throw new TypeError;a(e,t,n,i)}})),e("defineMetadata",(function(e,t,n,i){if(!h(n))throw new TypeError;return d(i)||(i=m(i)),a(e,t,n,i)})),e("hasMetadata",(function(e,t,i){if(!h(t))throw new TypeError;return d(i)||(i=m(i)),n(e,t,i)})),e("hasOwnMetadata",(function(e,t,n){if(!h(t))throw new TypeError;return d(n)||(n=m(n)),i(e,t,n)})),e("getMetadata",(function(e,t,n){if(!h(t))throw new TypeError;return d(n)||(n=m(n)),o(e,t,n)})),e("getOwnMetadata",(function(e,t,n){if(!h(t))throw new TypeError;return d(n)||(n=m(n)),r(e,t,n)})),e("getMetadataKeys",(function(e,t){if(!h(e))throw new TypeError;return d(t)||(t=m(t)),s(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!h(e))throw new TypeError;return d(t)||(t=m(t)),l(e,t)})),e("deleteMetadata",(function(e,t,n){if(!h(t))throw new TypeError;if(d(n)||(n=m(n)),!h(t))throw new TypeError;d(n)||(n=m(n));var i=I(t,n,!1);return!d(i)&&i.OrdinaryDeleteMetadata(e,t,n)}))}(o,i),void 0===i.Reflect&&(i.Reflect=e)}()}(Reflect||(Reflect={})),define("reflect-metadata",(function(){})),define("WoltLabSuite/Core/Helper/Dom/Element",["require","exports","./View","reflect-metadata"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomElement=function(e,t){return function(i,o){if(!(i instanceof n.DomView))throw new Error("@DomElement() is only supported on `DomView`");const{nullable:r,type:a}=Object.assign({nullable:!1,type:Reflect.getMetadata("design:type",i,o)},t);Object.defineProperty(i,o,{configurable:!0,get(){const t=this.root.querySelector(e);if(null===t){if(r)return null;throw new Error(`Unable to find an element with the selector '${e}'.`)}if(!(t instanceof a))throw new Error(`Expected an element of type '${a.name}' but found '${t.nodeName}'.`);return t}})}},t.DomElementList=function(e,t){return function(i,o){if(!(i instanceof n.DomView))throw new Error("@DomElementList() is only supported on `DomView`");if(Reflect.getMetadata("design:type",i,o).prototype!==Array.prototype)throw new Error("The type must be an array of elements.");const{type:r}=t;Object.defineProperty(i,o,{configurable:!0,get(){const t=Array.from(this.root.querySelectorAll(e));for(const e of t)if(!(e instanceof r))throw new Error(`Expected an element of type '${r.name}' but found '${e.nodeName}'.`);return t}})}}})),define("WoltLabSuite/Core/Ui/Dropdown/Builder",["require","exports","tslib","../../Core","./Simple"],(function(e,t,n,i,o){"use strict";function r(e){if(!(e instanceof HTMLUListElement))throw new TypeError("Expected a reference to an <ul> element.");if(!e.classList.contains("dropdownMenu"))throw new Error("List does not appear to be a dropdown menu.")}function a(e){const t=document.createElement("li");if("divider"===e)return t.className="dropdownDivider",t;"string"==typeof e.identifier&&(t.dataset.identifier=e.identifier);const n=document.createElement("a");if(n.href="string"==typeof e.href?e.href:"#","function"==typeof e.callback)n.addEventListener("click",(t=>{t.preventDefault(),e.callback(n)}));else if("#"===n.href)throw new Error("Expected either a `href` value or a `callback`.");if(e.attributes&&i.isPlainObject(e.attributes)&&Object.keys(e.attributes).forEac
1h((t=>{const i=e.attributes[t];if("string"!=typeof i)throw new Error("Expected only string values.");-1!==t.indexOf("-")?n.setAttribute(`data-${t}`,i):n.dataset[t]=i})),t.appendChild(n),void 0!==e.icon&&i.isPlainObject(e.icon)){if("string"!=typeof e.icon.name)throw new TypeError("Expected a valid icon name.");let t=16;"number"==typeof e.icon.size&&-1!==c.indexOf(~~e.icon.size)&&(t=~~e.icon.size);const i=document.createElement("fa-icon");i.size=t,i.setIcon(e.icon.name,!!e.icon.forceSolid),n.appendChild(i)}const o="string"==typeof e.label?e.label.trim():"",r="string"==typeof e.labelHtml?e.labelHtml.trim():"";if(""===o&&""===r)throw new TypeError("Expected either a label or a `labelHtml`.");const a=document.createElement("span");return a[o?"textContent":"innerHTML"]=o||r,n.appendChild(document.createTextNode(" ")),n.appendChild(a),t}function s(e,t){r(e),e.appendChild(a(t))}function l(e,t){if(r(e),!Array.isArray(t))throw new TypeError("Expected an array of items.");const n=t.length;if(0===n)throw new Error("Expected a non-empty list of items.");if(1===n)s(e,t[0]);else{const n=document.createDocumentFragment();t.forEach((e=>{n.appendChild(a(e))})),e.appendChild(n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.create=function(e,t){const n=document.createElement("ul");return n.className="dropdownMenu","string"==typeof t&&(n.dataset.identifier=t),Array.isArray(e)&&e.length>0&&l(n,e),n},t.buildItem=function(e){return a(e)},t.appendItem=s,t.appendItems=l,t.setItems=function(e,t){r(e),e.innerHTML="",l(e,t)},t.attach=function(e,t){r(e),o.default.initFragment(t,e),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),o.default.toggleDropdown(t.id)}))},t.divider=function(){return"divider"},i=n.__importStar(i),o=n.__importDefault(o);const c=[16,24,32,48,64,96,144]})),define("WoltLabSuite/Core/Ui/ItemList/Static",["require","exports","tslib","../../Core","../../Dom/Traverse","../../Language","../Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";function s(e){const t=h.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.placeholder=r.get("wcf.global.form.input.maxItems")))}function l(e,t,n){const i=h.get(e),o=document.createElement("li");o.className="item";const r=document.createElement("span");if(r.className="content",r.dataset.objectId=t.objectId.toString(),r.textContent=t.value,o.appendChild(r),n||!i.element.disabled){const e=document.createElement("button");e.type="button",e.innerHTML='<fa-icon name="xmark"></fa-icon>',e.addEventListener("click",(e=>c(e))),o.appendChild(e)}i.list.insertBefore(o,i.listItem),i.element.value="",i.element.disabled||s(e);let a=d(i);"function"==typeof i.options.callbackChange&&(null===a&&(a=u(e)),i.options.callbackChange(e,a))}function c(e,t){e instanceof Event&&(e=e.currentTarget.parentElement);const n=e.parentElement.dataset.elementId,i=h.get(n);e.remove(),t||i.element.focus(),s(n);let o=d(i);"function"==typeof i.options.callbackChange&&(null===o&&(o=u(n)),i.options.callbackChange(n,o))}function d(e){if(!e.options.isCSV)return null;const t=u(e.element.id);return e.shadow.value=t.map((e=>e.value)).join(","),t}function u(e){if(!h.has(e))throw new Error(`Element id '${e}' is unknown.`);const t=h.get(e),n=[];return t.list.querySelectorAll(".item > span").forEach((e=>{n.push({objectId:~~e.dataset.objectId,value:e.textContent})})),n}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t,n){const r=document.getElementById(e);if(null===r)throw new Error("Expected a valid element id, '"+e+"' is invalid.");if(h.has(e)){const t=h.get(e);Object.values(t).forEach((e=>{e instanceof HTMLElement&&e.parentElement&&e.remove()})),a.default.destroy(e),h.delete(e)}const s=i.extend({maxItems:-1,maxLength:-1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},n),d=o.parentByTag(r,"FORM");if(null!==d&&!s.isCSV){if(!s.submitFieldName.length&&"function"!=typeof s.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");d.addEventListener("submit",(()=>{const t=u(e);s.submitFieldName.length?t.forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=s.submitFieldName.replace("{$objectId}",e.objectId.toString()),t.value=e.value,d.appendChild(t)})):s.callbackSubmit(d,t)}))}const p=function(e,t){const n=document.createElement("ol");n.className="inputItemList"+(e.disabled?" disabled":""),n.dataset.elementId=e.id,n.addEventListener("click",(t=>{t.target===n&&e.focus()}));const i=document.createElement("li");let o;i.className="input",n.appendChild(i),e.addEventListener("keydown",(e=>function(e){const t=e.currentTarget,n=t.parentElement.previousElementSibling;"Backspace"===e.key?0===t.value.length&&null!==n&&(n.classList.contains("active")?c(n):n.classList.add("active")):"Escape"===e.key&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")}(e))),e.addEventListener("keypress",(e=>function(e){if("Enter"===e.key||","===e.key){e.preventDefault();const t=e.currentTarget,n=t.value.trim();n.length&&l(t.id,{objectId:0,value:n})}}(e))),e.addEventListener("keyup",(e=>function(e){const t=e.currentTarget;if(t.value.length>0){const e=t.parentElement.previousElementSibling;null!==e&&e.classList.remove("active")}}(e))),e.addEventListener("paste",(e=>function(e){const t=e.currentTarget;e.clipboardData.getData("text/plain").split(",").map((e=>e.trim())).filter((e=>e.length>
10)).forEach((e=>{l(t.id,{objectId:0,value:e})})),e.preventDefault()}(e))),e.addEventListener("blur",(e=>function(e){const t=e.currentTarget,n=e.relatedTarget;if(n instanceof HTMLElement&&null!==n.closest(".dropdownMenu"))return;const i=t.value.trim();i.length&&l(t.id,{objectId:0,value:i})}(e))),e.insertAdjacentElement("beforebegin",n),i.appendChild(e),-1!==t.maxLength&&(e.maxLength=t.maxLength);let r=[];if(t.isCSV&&(o=document.createElement("input"),o.className="itemListInputShadow",o.type="hidden",o.name=e.name,e.removeAttribute("name"),n.insertAdjacentElement("beforebegin",o),r=e.value.split(",").map((e=>e.trim())).filter((e=>e.length>0)),"TEXTAREA"===e.nodeName)){const t=document.createElement("input");t.type="text",e.parentElement.insertBefore(t,e),t.id=e.id,e.remove(),e=t}return{element:e,list:n,shadow:o,values:r}}(r,s);if(h.set(e,{dropdownMenu:null,element:p.element,list:p.list,listItem:p.element.parentElement,options:s,shadow:p.shadow}),t=p.values.length?p.values:t,Array.isArray(t)){const n=!p.element.disabled;t.forEach((t=>{"string"==typeof t&&(t={objectId:0,value:t}),l(e,t,n)}))}},t.getValues=u,t.setValues=function(e,t){if(!h.has(e))throw new Error(`Element id '${e}' is unknown.`);const n=h.get(e);o.childrenByClass(n.list,"item").forEach((e=>c(e,!0))),t.forEach((t=>l(e,t)))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a);const h=new Map})),define("WoltLabSuite/Core/Ui/ItemList/User",["require","exports","tslib","../ItemList"],(function(e,t,n,i){"use strict";function o(e){const t=r(e.element.id),n=[],i=[];t.forEach((e=>{e.type&&"group"===e.type?i.push(e.objectId):n.push(e.value)}));const o=e.shadow;return o.value=n.join(","),e._shadowGroups||(e._shadowGroups=document.createElement("input"),e._shadowGroups.type="hidden",e._shadowGroups.name=`${o.name}GroupIDs`,o.insertAdjacentElement("beforebegin",e._shadowGroups)),e._shadowGroups.value=i.join(","),t}function r(e){return i.getValues(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e,t){i.init(e,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:t.includeUserGroups?~~t.includeUserGroups:0,restrictUserGroupIDs:Array.isArray(t.restrictUserGroupIDs)?t.restrictUserGroupIDs:[]}}},callbackChange:"function"==typeof t.callbackChange?t.callbackChange:null,callbackSyncShadow:t.csvPerType?o:null,callbackSetupValues:"function"==typeof t.callbackSetupValues?t.callbackSetupValues:null,excludedSearchValues:Array.isArray(t.excludedSearchValues)?t.excludedSearchValues:[],isCSV:!0,maxItems:t.maxItems?~~t.maxItems:-1,restricted:!0})},t.getValues=r,i=n.__importStar(i)})),define("WoltLabSuite/Core/Ui/Like/Handler",["require","exports","tslib","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil","../Reaction/Handler","../../User"],(function(e,t,n,i,o,r,a,s,l){"use strict";i=n.__importStar(i),o=n.__importDefault(o),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s),l=n.__importDefault(l);const c=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new WeakMap;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=i.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},t),this.initContainers(),o.default.add(`WoltLabSuite/Core/Ui/Like/Handler-${e}`,(()=>this.initContainers())),new s.default(this._objectType,{containerSelector:this._options.containerSelector})}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{if(this._containers.has(t))return;const n={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~t.dataset.likeDislikes,liked:~~t.dataset.likeLiked,likes:~~t.dataset.likeLikes,objectId:~~t.dataset.objectId,users:JSON.parse(t.dataset.likeUsers)};this._containers.set(t,n),this._buildWidget(t,n),e=!0})),e&&o.default.trigger()}_buildWidget(e,t){let n,i=!0;if(n=this._options.isSingleItem?document.querySelector(this._options.summarySelector):e.querySelector(this._options.summarySelector),null===n&&(n=this._options.isSingleItem?document.querySelector(this._options.badgeContainerSelector):e.querySelector(this._options.badgeContainerSelector),i=!1),null!==n){const e=document.createElement("ul");if(e.classList.add("reactionSummaryList"),i?e.classList.add("like
1sSummary"):e.classList.add("reactionSummaryListTiny"),Object.entries(t.users).forEach((([t,n])=>{const i=c.get(t);if("reactionTypeID"===t||!i)return;const o=document.createElement("li");o.className="reactCountButton",o.setAttribute("reaction-type-id",t);const r=document.createElement("span");r.className="reactionCount",r.innerHTML=a.shortUnit(~~n),o.appendChild(r),o.innerHTML=i.renderedIcon+o.innerHTML,e.appendChild(o)})),i)this._options.summaryPrepend?n.insertAdjacentElement("afterbegin",e):n.insertAdjacentElement("beforeend",e);else if("OL"===n.nodeName||"UL"===n.nodeName){const t=document.createElement("li");t.appendChild(e),n.appendChild(t)}else n.appendChild(e);t.badge=e}if(this._options.canLike&&(l.default.userId!=~~e.dataset.userId||this._options.canLikeOwnContent)){let n=null;this._options.buttonAppendToSelector&&(n=this._options.isSingleItem?document.querySelector(this._options.buttonAppendToSelector):e.querySelector(this._options.buttonAppendToSelector));let i=null;if(this._options.buttonBeforeSelector&&(i=this._options.isSingleItem?document.querySelector(this._options.buttonBeforeSelector):e.querySelector(this._options.buttonBeforeSelector)),null===i&&null===n)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,t.users.reactionTypeID,i,n)}}_createButton(e,t,n,i){const o=r.get("wcf.reactions.react"),a=document.createElement("li");a.className="wcfReactButton";const s=document.createElement("a");s.className="jsTooltip reactButton",this._options.renderAsButton&&s.classList.add("button"),s.href="#",s.title=o;const l=document.createElement("fa-icon");l.setIcon("smile"),void 0===t||0==t?l.dataset.reactionTypeId="0":(s.dataset.reactionTypeId=t.toString(),s.classList.add("active")),s.appendChild(l);const c=document.createElement("span");return c.className="invisible",c.innerHTML=o,s.appendChild(document.createTextNode(" ")),s.appendChild(c),a.appendChild(s),n?n.insertAdjacentElement("beforebegin",a):i.insertAdjacentElement("beforeend",a),s}}})),define("WoltLabSuite/Core/Ui/Message/InlineEditor",["require","exports","tslib","WoltLabSuite/Core/Component/Ckeditor/Event","../../Ajax","../../Component/Ckeditor","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../Language","../Dropdown/Reusable","../Notification","../Screen","../Scroll","WoltLabSuite/Core/Component/Quote/Storage","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f,m,g){"use strict";return o=n.__importStar(o),a=n.__importStar(a),s=n.__importDefault(s),l=n.__importDefault(l),c=n.__importStar(c),d=n.__importStar(d),u=n.__importStar(u),h=n.__importStar(h),p=n.__importStar(p),f=n.__importStar(f),class{_activeDropdownElement;_activeElement;_dropdownMenu;_elements;_options;constructor(e){this.init(e)}init(e){this._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new WeakMap,this._options=a.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.default.add(`Ui/Message/InlineEdit_${this._options.className}`,(()=>this.rebuild()))}rebuild(){document.querySelectorAll(this._options.messageSelector).forEach((e=>{if(this._elements.has(e))return;const t=e.querySelector(".jsMessageEditButton");if(null!==t){const n=a.stringToBool(e.dataset.canEdit||""),i=a.stringToBool(e.dataset.canEditInline||"");this._options.canEditInline||i?(t.addEventListener("click",(t=>this._clickDropdown(e,t))),t.classList.add("jsDropdownEnabled"),n&&t.addEventListener("dblclick",(t=>this._click(e,t)))):n&&t.addEventListener("click",(t=>this._click(e,t)))}const n=e.querySelector(".messageBody"),i=e.querySelector(".messageFooter"),o=i.querySelector(".messageFooterButtons"),r=e.querySelector(".messageHeader"),s=n.querySelector(".messageText");this._elements.set(e,{button:t,messageBody:n,messageBodyEditor:null,messageFooter:i,messageFooterButtons:o,messageHeader:r,messageText:s})}))}_click(e,t){null===e&&(e=this._activeDropdownElement),t&&t.preventDefault(),null===this._activeElement?(this._activeElement=e,this._prepare(),o.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(e)}})):this._activeElement!==e&&h.show("wcf.message.error.editorAlreadyInUse",void 0,"warning")}_clickDropdown(e,t){t.preventDefault();const n=t.currentTarget;if(!n.classList.contains("dropdownToggle")){if(n.classList.add("dropdownToggle"),n.parentElement.classList.add("dropdown"),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this._activeDropdownElement=e;let i=n;if(p.is("screen-sm-down")&&0===n.clientWidth){const e=n.closest(this._options.messageSelector);i=this._elements.get(e).messageHeader.querySelector(".messageQuickOptions")}u.toggleDropdown(this._options.dropdownIdentifier,i)})),null===this._dropdownMenu){this._dropdownMenu=document.createElement("ul"),this._dropdownMenu.className="dropdownMenu";const e=this._dropdownGetItems();
1c.fire("com.woltlab.wcf.inlineEditor",`dropdownInit_${this._options.dropdownIdentifier}`,{items:e}),this._dropdownBuild(e),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,((e,t)=>this._dropdownToggle(e,t)))}setTimeout((()=>n.click()),10)}}_dropdownBuild(e){e.forEach((e=>{const t=document.createElement("li");if(t.dataset.item=e.item,"divider"===e.item)t.className="dropdownDivider";else{const n=document.createElement("span");n.textContent=d.get(e.label),t.appendChild(n),"editItem"===e.item?t.addEventListener("click",(e=>this._click(null,e))):t.addEventListener("click",(e=>this._clickDropdownItem(e)))}this._dropdownMenu.appendChild(t)}))}_dropdownToggle(e,t){const n=this._elements.get(this._activeDropdownElement),i=n.button.parentElement;if("close"===t)return i.classList.remove("dropdownOpen"),void n.messageFooterButtons.classList.remove("forceVisible");i.classList.add("dropdownOpen"),n.messageFooterButtons.classList.add("forceVisible");const o=new Map(Object.entries(this._dropdownOpen()));c.fire("com.woltlab.wcf.inlineEditor",`dropdownOpen_${this._options.dropdownIdentifier}`,{element:this._activeDropdownElement,visibility:o});const r=this._dropdownMenu;let a=!1;const s=Array.from(r.children);s.forEach(((e,t)=>{const n=e.dataset.item;if("divider"===n)a?(l.default.show(e),a=!1):l.default.hide(e);else if(!1===o.get(n)){if(l.default.hide(e),t>0&&t+1===s.length){const t=e.previousElementSibling;"divider"===t.dataset.item&&l.default.hide(t)}}else l.default.show(e),a=!0}))}_dropdownGetItems(){return[]}_dropdownOpen(){return{}}_dropdownSelect(e){}_clickDropdownItem(e){e.preventDefault();const t=e.currentTarget.dataset.item,n={cancel:!1,element:this._activeDropdownElement,item:t};c.fire("com.woltlab.wcf.inlineEditor",`dropdownItemClick_${this._options.dropdownIdentifier}`,n),n.cancel?e.preventDefault():this._dropdownSelect(t)}_prepare(){const e=this._elements.get(this._activeElement),t=document.createElement("div");t.className="messageBody editor",e.messageBodyEditor=t;const n=document.createElement("fa-icon");n.size=48,n.setIcon("spinner"),t.appendChild(n),e.messageBody.insertAdjacentElement("afterend",t),l.default.hide(e.messageBody),f.element(this._activeElement,void 0,"instant")}_showEditor(e){const t=this._getEditorId(),n=this._activeElement,i=this._elements.get(n);n.classList.add("jsInvalidQuoteTarget");const o=n.parentElement;o.classList.contains("anchorFixedHeader")&&o.classList.add("disableAnchorFixedHeader"),i.messageBodyEditor.querySelector("fa-icon").remove();const r=i.messageBodyEditor,a=document.createElement("div");a.className="editorContainer",l.default.setInnerHtml(a,e.returnValues.template),r.appendChild(a);const s=a.querySelector(".formSubmit");s.querySelector('button[data-type="save"]').addEventListener("click",(()=>this._save())),s.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>this._restoreMessage())),c.add("com.woltlab.wcf.ckeditor5",`submitEditor_${t}`,(e=>{e.cancel=!0,this._save()})),l.default.hide(i.messageHeader),l.default.hide(i.messageFooter),window.setTimeout((()=>{f.element(n,void 0,"instant")}),250)}_restoreMessage(){const e=this._activeElement,t=this._elements.get(e);this._destroyEditor(),t.messageBodyEditor.remove(),t.messageBodyEditor=null,l.default.show(t.messageBody),l.default.show(t.messageFooter),l.default.show(t.messageHeader),e.classList.remove("jsInvalidQuoteTarget");const n=e.parentElement;n.classList.contains("anchorFixedHeader")&&n.classList.remove("disableAnchorFixedHeader"),this._activeElement=null}_save(){const e=this._getEditorId(),t=(0,r.getCkeditorById)(e),n={containerID:this._options.containerId,data:{message:t.getHtml()},objectID:this._getObjectId(this._activeElement)},a=document.getElementById(`settings_${e}`);a&&a.querySelectorAll("input, select, textarea").forEach((e=>{if("INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)&&!e.checked)return;const t=e.name;if(Object.prototype.hasOwnProperty.call(n,t))throw new Error(`Variable overshadowing, key '${t}' is already present.`);n[t]=e.value.trim()}));
1let s=this._validate(n);s instanceof Promise||(s=!1===s?Promise.reject():Promise.resolve()),s.then((()=>{(0,i.dispatchToCkeditor)(t.sourceElement).collectMetaData({metaData:n}),o.api(this,{actionName:"save",parameters:n}),this._hideEditor()}),(e=>{const t=e.message;console.log(`Validation of post edit failed: ${t}`)}))}_validate(e){this._activeElement.querySelectorAll(".innerError").forEach((e=>e.remove()));const t={api:this,parameters:e,valid:!0,promises:[]};return c.fire("com.woltlab.wcf.ckeditor5",`validate_${this._getEditorId()}`,t),t.valid?t.promises.push(Promise.resolve()):t.promises.push(Promise.reject()),Promise.all(t.promises)}throwError(e,t){l.default.innerError(e,t)}_showMessage(e){const t=this._activeElement,n=this._elements.get(t);if(l.default.setInnerHtml(n.messageBody.querySelector(".messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){n.messageFooter.querySelectorAll(".attachmentThumbnailList, .attachmentFileList").forEach((e=>e.remove()));const t=document.createElement("div");let i;for(l.default.setInnerHtml(t,e.returnValues.attachmentList);t.childNodes.length;)i=t.childNodes[t.childNodes.length-1],n.messageFooter.insertBefore(i,n.messageFooter.firstChild)}if("string"==typeof e.returnValues.poll){const t=n.messageBody.querySelector(".pollContainer");if(null!==t&&t.parentElement.remove(),""!==e.returnValues.poll){const t=document.createElement("div");t.className="jsInlineEditorHideContent",l.default.setInnerHtml(t,e.returnValues.poll),n.messageBody.insertAdjacentElement("afterbegin",t)}}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),(0,g.showDefaultSuccessSnackbar)()}_hideEditor(){const e=this._elements.get(this._activeElement),t=e.messageBodyEditor.querySelector(".editorContainer");l.default.hide(t);const n=document.createElement("fa-icon");n.size=48,n.setIcon("spinner"),e.messageBodyEditor.appendChild(n)}_restoreEditor(){const e=this._elements.get(this._activeElement).messageBodyEditor;e.querySelector('fa-icon[name="spinner"]').remove();const t=e.querySelector(".editorContainer");null!==t&&l.default.show(t)}_destroyEditor(){const e=(0,r.getCkeditorById)(this._getEditorId(),!1);e?.destroy().then((()=>{e.discardDraft()}))}_getHash(e){return`#message${e}`}_updateHistory(e){window.location.hash=e}_getEditorId(){return this._options.editorPrefix+this._getObjectId(this._activeElement).toString()}_getObjectId(e){return e.dataset.objectId||""}_ajaxFailure(e){const t=this._elements.get(this._activeElement).messageBodyEditor.querySelector(".ck.ck-editor");return null===t?(this._restoreMessage(),!0):(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.realErrorMessage||(l.default.innerError(t,e.returnValues.realErrorMessage),!1))}_ajaxSuccess(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":(0,m.clearQuotesForEditor)(this._getEditorId()),this._showMessage(e)}}_ajaxSetup(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"},silent:!0}}legacyEdit(e){this._click(document.getElementById(e),null)}}})),define("WoltLabSuite/Core/Ui/Message/Manager",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Language","../../StringUtil"],(function(e,t,n,i,o,r,a,s){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s),class{_elements=new Map;_options;constructor(e){this._options=o.extend({className:"",selector:""},e),this.rebuild(),r.default.add(`Ui/Message/Manager${this._options.className}`,this.rebuild.bind(this))}rebuild(){this._elements.clear(),document.querySelectorAll(this._options.selector).forEach((e=>{this._elements.set(e.dataset.objectId,e)}))}getPermission(e,t){t="can"+s.ucfirst(t);const n=this._elements.get(e);if(void 0===n)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);return o.stringToBool(n.dataset[s.toCamelCase(t)]||"")}getPropertyValue(e,t,n){const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const r=i.dataset[s.toCamelCase(t)]||"";return n?o.stringToBool(r):r}update(e,t,n){i.api(this,{actionName:t,parameters:n||{},objectIDs:[e]})}updateItems(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{const n=this._elements.get(e);void 0!==n&&Object.entries(t).forEach((([e,t])=>{this._update(n,e,t)}))}))}updateAllItems(e){const t=Array.from(this._elements.keys());this.updateItems(t,e)}setNote(e,t,n){const i=this._elements.get(e);if(void 0===i)throw new Error(`Unknown object id '${e}' for selector '${this._options.selector}'`);const o=i.querySelector(".messageFooterNotes");let r=o.querySelector(`.${t}`);n?(null===r&&(r=document.createElement("p"),r.className="messageFooterNote "+t,o.appendChild(r)),r.innerHTML=n):null!==r&&r.remove()}_update(e,t,n){e.dataset[t]=n.toString();const i=1==n||!0===n||"true"===n;this._updateState(e,t,n,i)}_updateState(e,t,n,i){switch(t){case"isDeleted":i?e.classList.add("messageDeleted"):e.classList.remove("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",i);break;case"isDisabled":i?e.classList.add("messageDisabled"):e.classList.remove("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",i)}}_toggleMessageStatus(e,t,n,i,o){let r=e.querySelector(".messageStatus");if(null===r){const t=e.querySelector(".messageHeaderMetaData");if(null===t)return;r=document.createElement("ul"),r.className="messageStatus",t.insertAdjacentElement("afterend",r)}let s=r.querySelector(`.${t}`);if(o){if(null!==s)return;s=document.createElement("span"),s.className=`badge label ${i} ${t}`,s.textContent=a.get(n);const e=document.createElement("li");e.appendChild(s),r.appendChild(e)}else{if(null===s)return;s.parentElement.remove()}}_getAttributeName(e){return-1!==e.indexOf("-")?e:e.split(/([A-Z][a-z]+)/).map((e=>e.trim().toLowerCase())).filter((e=>e.length>0)).join("-")}_ajaxSuccess(e){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")}_ajaxSetup(){return{data:{className:this._options.className}}}}})),define("WoltLabSuite/Core/Ui/Message/Share",["require","exports","tslib","../../Event/Handler","../../StringUtil"],(function(e,t,n,i,o){"use strict";function r(e,t,n,i){i||(i=s),window.open(t.replace("{pageURL}",i).replace("{text}",a+(n?`%20${i}`:"")),e,"height=600,width=600")}
1Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){const e=document.querySelector('meta[property="og:title"]');null!==e&&(a=encodeURIComponent(e.content));const t=document.querySelector('meta[property="og:url"]');null!==t&&(s=encodeURIComponent(t.content)),document.querySelectorAll(".jsMessageShareButtons").forEach((e=>{e.classList.remove("jsMessageShareButtons");let t=encodeURIComponent(o.unescapeHTML(e.dataset.url||""));t||(t=s);const n={facebook:{link:e.querySelector('.messageShareProvider[data-identifier="Facebook"]'),share(e){e.preventDefault(),r("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{link:e.querySelector('.messageShareProvider[data-identifier="Reddit"]'),share(e){e.preventDefault(),r("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{link:e.querySelector('.messageShareProvider[data-identifier="Twitter"]'),share(e){e.preventDefault(),r("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{link:e.querySelector('.messageShareProvider[data-identifier="LinkedIn"]'),share(e){e.preventDefault(),r("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{link:e.querySelector('.messageShareProvider[data-identifier="Pinterest"]'),share(e){e.preventDefault(),r("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{link:e.querySelector('.messageShareProvider[data-identifier="XING"]'),share(e){e.preventDefault(),r("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{link:e.querySelector('.messageShareProvider[data-identifier="WhatsApp"]'),share(e){e.preventDefault(),window.location.href="https://api.whatsapp.com/send?text="+a+"%20"+s}}};i.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:n,pageDescription:a,pageUrl:s}),Object.values(n).forEach((e=>{null!==e.link&&e.link.addEventListener("click",(t=>e.share(t)))}))}))},i=n.__importStar(i),o=n.__importStar(o);let a="",s=""})),define("WoltLabSuite/Core/Ui/Message/TwitterEmbed",["require","exports","https://platform.twitter.com/widgets.js"],(function(e,t){"use strict";async function n(e,t,n=!1){const o=await i,r="dark"===document.documentElement.dataset.colorScheme?"dark":"light",a=await o.widgets.createTweet(t,e,{dnt:!0,lang:document.documentElement.lang,theme:r});if(a&&n){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.embedTweet=n,t.embedAll=function(){document.querySelectorAll("[data-wsc-twitter-tweet]").forEach((e=>{const t=e.dataset.wscTwitterTweet;t&&(delete e.dataset.wscTwitterTweet,n(e,t,!0))}))};const i=new Promise((e=>{twttr.ready(e)}))})),define("WoltLabSuite/Core/Ui/Moderation/MarkAllAsRead",["require","exports","WoltLabSuite/Core/Component/Snackbar","../../Ajax"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){document.querySelector(".markAllAsReadButton")?.addEventListener("click",(()=>{!async function(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\moderation\\queue\\ModerationQueueAction").dispatch(),document.getElementById("wcf-system-gridView-user-ModerationQueueGridView_table").dispatchEvent(new CustomEvent("interaction:invalidate-all")),(0,n.showDefaultSuccessSnackbar)()}()}))}})),define("WoltLabSuite/Core/Ui/Moderation/Report",["require","exports","tslib","WoltLabSuite/Core/Component/Snackbar","../../Ajax","../../Component/Dialog","../../Dom/Util","../../Helper/Selector","../../Language"],(function(e,t,n,i,o,r,a,s,l){"use strict";function c(e){(function(e){return""===e.dataset.reportContent?(console.error("Missing the value for [data-report-content]",e),!1):!!parseInt(e.dataset.objectId||"")||(console.error("Expected a valid integer for [data-object-id]",e),!1)})(e)&&e.addEventListener("click",(t=>{"A"!==e.tagName&&"true"!==e.dataset.isLegacyButton||t.preventDefault(),async function(e){const t=parseInt(e.dataset.objectId||""),n=e.dataset.reportContent,s=await(0,o.dboAction)("prepareReport","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({objectID:t,objectType:n}).dispatch();let c;s.alreadyReported?c=(0,r.dialogFactory)().fromHtml(s.template).asAlert():(c=(0,r.dialogFactory)().fromHtml(s.template).asPrompt(),c.addEventListener("validate",(e=>{(function(e){const t=e.content.querySelector(".jsReportMessage"),n=t.closest("dl");return""===t.value.trim()?(n.classList.add("formError"),(0,a.innerError)(t,l.get("wcf.global.form.error.empty")),!1):(n.classList.remove("formError"),(0,a.innerError)(t,!1),!0)})(c)||e.preventDefault()})),c.addEventListener("primary",(()=>{!async function(e,t,n){const r=e.content.querySelector(".jsReportMessage").value.trim();await(0,o.dboAction)("report","wcf\\data\\moderation\\queue\\ModerationQueueReportAction").payload({message:r,objectID:n,objectType:t}).dispatch(),(0,i.showDefaultSuccessSnackbar)()}(c,n,t)}))),c.show(l.get("wcf.moderation.report.reportContent"))}(e)}))}
1Object.defineProperty(t,"__esModule",{value:!0}),t.registerLegacyButton=function(e,t){e.dataset.reportContent=t,e.dataset.isLegacyButton="true",c(e)},t.setup=function(){(0,s.wheneverFirstSeen)("[data-report-content]",(e=>c(e)))},l=n.__importStar(l)})),define("WoltLabSuite/Core/Ui/Pagination/JumpToPage",["require","exports","../../Component/Dialog","../../Helper/Selector","../../Language"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,i.wheneverFirstSeen)("woltlab-core-pagination",(e=>{e.addEventListener("jumpToPage",(()=>{!function(e){const t=`\n <dl>\n <dt></dt>\n <dd>\n <input\n class="tiny"\n type="number"\n min="1"\n max="${e.count}"\n value="${e.count}"\n aria-label="${(0,o.getPhrase)("wcf.page.jumpTo.pageNo")}"\n required\n >\n <small>${(0,o.getPhrase)("wcf.page.jumpTo.description",{pages:e.count})}</small>\n </dd>\n </dl>\n `,i=(0,n.dialogFactory)().fromHtml(t).asPrompt(),r=i.content.querySelector('input[type="number"]');i.addEventListener("primary",(()=>{e.jumpToPage(parseInt(r.value))})),i.show((0,o.getPhrase)("wcf.page.jumpTo")),r.select()}(e)}))}))}})),define("WoltLabSuite/Core/Ui/Poll/View/Participants",["require","exports","../../../Component/User/List"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Participants=void 0;class i{pollManager;button;userList=void 0;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showPollParticipantsButton");if(!t)throw new Error(`Could not find button with selector "showPollParticipantsButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(e=>{e&&e.preventDefault(),this.open()}))}open(){this.userList||(this.userList=new n.UserList({className:"wcf\\data\\poll\\PollAction",parameters:{pollID:this.pollManager.pollId}},this.pollManager.question)),this.userList.open()}showButton(){this.button.hidden=!1}hideButton(){this.button.hidden=!0}}t.Participants=i,t.default=i})),define("WoltLabSuite/Core/Ui/Poll/View/Results",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Results=void 0,i=n.__importStar(i);class r{pollManager;button;constructor(e,t){this.pollManager=e,this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.results)?this.pollManager.displayView(o.PollViews.results):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=i.dboAction("getResultTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.results,t.template),this.pollManager.displayView(o.PollViews.results)}checkVisibility(e){e===o.PollViews.results?this.button.hidden=!0:this.button.hidden=!1}}t.Results=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/View/Vote",["require","exports","tslib","../../../Ajax","../Poll"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,i=n.__importStar(i);class r{pollManager;button;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".showVoteFormButton");if(!t)throw new Error(`Could not find button with selector ".showVoteFormButton" for poll "${this.pollManager.pollId}"`);this.button=t,this.button.addEventListener("click",(async e=>{e&&e.preventDefault(),this.button.disabled=!0,this.pollManager.hasView(o.PollViews.vote)?this.pollManager.displayView(o.PollViews.vote):await this.loadView(),this.button.disabled=!1}))}async loadView(){const e=i.dboAction("getVoteTemplate","wcf\\data\\poll\\PollAction");e.objectIds([this.pollManager.pollId]);const t=await e.dispatch();this.pollManager.addView(o.PollViews.vote,t.template),this.pollManager.displayView(o.PollViews.vote)}checkVisibility(e){e!==o.PollViews.vote&&this.pollManager.canVote?this.button.hidden=!1:this.button.hidden=!0}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Vote",["require","exports","tslib","./Poll","../../Ajax"],(function(e,t,n,i,o){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=void 0,o=n.__importStar(o);class r{pollManager;button;inputs;constructor(e){this.pollManager=e;const t=this.pollManager.getElement().querySelector(".votePollButton");if(!t)throw new Error(`Could not find vote button for poll "${this.pollManager.pollId}".`);this.button=t,this.button.addEventListener("click",(()=>this.submit())),this.initSelects()}initSelects(){if(this.pollManager.hasView(i.PollViews.vote)){const e=this.pollManager.getView(i.PollViews.vote);this.inputs=Array.from(e.querySelectorAll("input")),this.inputs.forEach((e=>{e.addEventListener("change",(()=>this.checkInputs()))})),this.checkInputs()}}checkInputs(){let e=0;this.inputs.forEach((t=>{t.checked&&e++,this.pollManager.maxVotes>1&&(t.disabled=!1)})),0===e?this.button.disabled=!0:(e>=this.pollManager.maxVotes&&this.pollManager.maxVotes>1&&this.inputs.forEach((e=>{e.checked||(e.disabled=!0)})),this.button.disabled=!1)}getSelectedOptions(){return this.inputs.filter((e=>e.checked)).map((e=>parseInt(e.value,10)))}async submit(){this.button.disabled=!0;const e=this.getSelectedOptions(),t=o.dboAction("vote","wcf\\data\\poll\\PollAction");t.objectIds([this.pollManager.pollId]),t.payload({optionIDs:e});const n=await t.dispatch();this.pollManager.canVote=!!n.changeableVote,this.pollManager.canViewResults=!0,this.pollManager.addView(i.PollViews.results,n.template),this.pollManager.displayView(i.PollViews.results),this.pollManager.changeTotalVotes(n.totalVotes,n.totalVotesTooltip),this.button.disabled=!1}checkVisibility(e){this.button.hidden=e!==i.PollViews.vote}}t.Vote=r,t.default=r})),define("WoltLabSuite/Core/Ui/Poll/Poll",["require","exports","tslib","../../Dom/Change/Listener","../../Dom/Util","../../StringUtil","./View/Participants","./View/Results","./View/Vote","./Vote"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";function d(){document.querySelectorAll(".pollContainer").forEach((e=>{if(!e.dataset.pollId)throw new Error("Invalid poll element given. Missing pollID.");if(f.has(e))return;const t=parseInt(e.dataset.pollId,10);new p(t),f.add(e)}))}function u(){i.default.add("WoltLabSuite/Core/Ui/Poll/Manager/Poll",(()=>{d()})),d()}var h;Object.defineProperty(t,"__esModule",{value:!0}),t.Poll=t.PollViews=void 0,t.setupAll=u,i=n.__importDefault(i),o=n.__importDefault(o),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l),c=n.__importDefault(c),function(e){e.vote="vote",e.results="results"}(h||(t.PollViews=h={}));class p{pollId;element;voteView=void 0;resultsView=void 0;participants=void 0;voteHandler=void 0;views=new Map;constructor(e){const t=document.getElementById(`poll${e}`);if(null===t)throw new Error(`Could not find poll with id "${e}".`);this.element=t,this.pollId=e,this.getInnerContainer().querySelectorAll("div").forEach((e=>{e.dataset.key&&this.views.set(e.dataset.key,e)}));const n=this.element.querySelector(".showResultsButton");this.canViewResults&&null!==n&&(this.resultsView=new s.default(this,n)),this.canVote&&(this.voteView=new l.default(this),this.voteHandler=new c.default(this)),this.canViewParticipants()&&(this.participants=new a.default(this))}getElement(){return this.element}hasView(e){return this.views.has(e)}getView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);return this.views.get(e)}displayView(e){if(!this.hasView(e))throw new Error(`The view "${e}" is unknown for poll "${this.pollId}".`);this.views.forEach((e=>{e.hidden=!0})),this.views.get(e).hidden=!1,this.voteView?.checkVisibility(e),this.resultsView?.checkVisibility(e),this.voteHandler?.checkVisibility(e),this.canViewParticipants()&&(e===h.results?(this.participants||(this.participants=new a.default(this)),this.participants.showButton()):this.participants?.hideButton())}addView(e,t){const n=document.createElement("div");n.dataset.key=e,n.hidden=!0,o.default.setInnerHtml(n,t),this.getInnerContainer().append(n),this.views.has(e)&&this.views.get(e).remove(),this.views.set(e,n),e===h.vote&&this.voteHandler.initSelects()}canViewParticipants(){return this.canViewResults&&this.isPublic}getInnerContainer(){const e=this.element.querySelector(".pollInnerContainer");if(!e)throw new Error(`Could not find inner container for poll "${this.pollId}"`);return e}changeTotalVotes(e,t){const n=this.getElement().querySelector(".pollTotalVotesBadge");if(!n)throw new Error("Could not find total votes badge.");n.textContent=(0,r.formatNumeric)(e),n.dataset.tooltip=t}get isPublic(){return"true"===this.element.dataset.isPublic}get maxVotes(){return parseInt(this.element.dataset.maxVotes,10)}get question(){return this.element.dataset.question}get canVote(){return"true"===this.element.dataset.canVote}set canVote(e){this.element.dataset.canVote=e?"true":"false"}get canViewResults(){return"true"===this.element.dataset.canViewResult}set canViewResults(e){this.element.dataset.canViewResult=e?"true":"false"}}t.Poll=p;const f=new WeakSet;t.default=u})),define("WoltLabSuite/Core/Ui/Reaction/CountButtons",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../Event/Handler","../../StringUtil","../Dialog"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importDefault(c);const d=new Map(Object.entries(window.REACTION_TYPES));return class{_containers=new Map;_currentObjectId=0;_objects=new Map;_objectType;_options;constructor(e,t){if(!t.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Reaction/CountButtons] Expected a non-empty string for option 'containerSelector'.");this._objectType=e,this._options=o.extend({summaryListSelector:".reactionSummaryList",containerSelector:"",isSingleItem:!1,parameters:{data:{}}},t),this.initContainers(),r.default.add(`WoltLabSuite/Core/Ui/Reaction/CountButtons-${e}`,(()=>this.initContainers()))}initContainers(){let e=!1;document.querySelectorAll(this._options.containerSelector).forEach((t=>{const n=a.default.identify(t);if(this._containers.has(n))return;const i=~~t.dataset.objectId,o={reactButton:null,summary:null,objectId:i,element:t};this._containers.set(n,o),this._initReactionCountButtons(t,o);const r=this._objects.get(i)||[];r.push(o),this._objects.set(i,r),e=!0})),e&&r.default.trigger()}updateCountButtons(e,t){let n=!1;this._objects.get(e).forEach((e=>{let i;if(i=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.element.querySelector(this._options.summaryListSelector),null===i)return;const o=new Map(Object.entries(t)),r=new Map;i.querySelectorAll(".reactCountButton").forEach((e=>{const t=e.dataset.reactionTypeId;o.has(t)?r.set(t,e):e.remove()})),o.forEach(((e,t)=>{if(r.has(t))r.get(t).querySelector(".reactionCount").innerHTML=l.shortUnit(e);else if(d.has(t)){const o=document.createElement("span");o.className="reactCountButton",o.innerHTML=d.get(t).renderedIcon,o.dataset.reactionTypeId=t;const r=document.createElement("span");r.className="reactionCount",r.innerHTML=l.shortUnit(e),o.appendChild(r),i.appendChild(o),n=!0}})),i.childElementCount>0?a.default.show(i):a.default.hide(i)})),n&&r.default.trigger()}_initReactionCountButtons(e,t){let n;n=this._options.isSingleItem?document.querySelector(this._options.summaryListSelector):e.querySelector(this._options.summaryListSelector),null!==n&&n.addEventListener("click",(e=>this._showReactionOverlay(t.objectId,e)))}_showReactionOverlay(e,t){t.preventDefault(),this._currentObjectId=e,this._showOverlay()}_showOverlay(){this._options.parameters.data.containerID=`${this._objectType}-${this._currentObjectId}`,this._options.parameters.data.objectID=this._currentObjectId,this._options.parameters.data.objectType=this._objectType,i.api(this,{parameters:this._options.parameters})}_ajaxSuccess(e){s.fire("com.woltlab.wcf.ReactionCountButtons","openDialog",e),c.default.open(this,e.returnValues.template),c.default.setTitle("userReactionOverlay-"+this._objectType,e.returnValues.title)}
1_ajaxSetup(){return{data:{actionName:"getReactionDetails",className:"\\wcf\\data\\reaction\\ReactionAction"}}}_dialogSetup(){return{id:`userReactionOverlay-${this._objectType}`,options:{title:""},source:null}}}})),define("WoltLabSuite/Core/Ui/Reaction/SummaryDetails",["require","exports","../../Ajax","../../Component/Dialog","../../Helper/Selector"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,o.wheneverFirstSeen)("woltlab-core-reaction-summary",(e=>{e.addEventListener("showDetails",(()=>{!async function(e,t){const o=await(0,n.dboAction)("getReactionDetails","wcf\\data\\reaction\\ReactionAction").payload({data:{objectID:e,objectType:t}}).dispatch();(0,i.dialogFactory)().fromHtml(o.template).withoutControls().show(o.title)}(e.objectId,e.objectType)}))}))}})),define("WoltLabSuite/Core/Ui/Search/Page",["require","exports","tslib","../../Core","../../Dom/Util","../Dropdown/Simple","../Screen","./Input"],(function(e,t,n,i,o,r,a,s){"use strict";function l(e){e.preventDefault();const t=e.currentTarget,n=t.dataset.objectType,o=t.dataset.extendedLink;o&&(document.querySelector(".pageHeaderSearchExtendedLink").href=o),d.clear();try{const e=JSON.parse(t.dataset.parameters||"");i.isPlainObject(e)&&Object.keys(e).forEach((t=>{d.set(t,e[t])}))}catch{}n&&"everywhere"!==n&&d.set("type",n),document.getElementById("pageHeaderSearchInputContainer").querySelector(".pageHeaderSearchType > .button > .pageHeaderSearchTypeLabel").textContent=t.textContent}function c(e,t){const n=new URL(e.action);n.search+=""!==n.search?"&":"?",n.search+=new URLSearchParams([["q",t.value.trim()],...Array.from(d)]).toString(),window.location.href=n.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e){const t=document.getElementById("pageHeaderSearchInput"),n=t.form;new s.default(t,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},autoFocus:!1,callbackDropdownInit(e){if(e.classList.add("dropdownMenuPageSearch"),a.is("screen-lg")){e.dataset.dropdownAlignmentHorizontal="right";const n=t.clientWidth;e.style.setProperty("min-width",`${n}px`,"");const i=t.parentElement,r=o.default.offset(i).left+i.clientWidth-(o.default.offset(t).left+n),a=o.default.styleAsInt(window.getComputedStyle(i),"padding-bottom");e.style.setProperty("transform",`translateX(-${Math.ceil(r)}px) translateY(-${a}px)`,"")}},callbackSelect:()=>(setTimeout((()=>{c(n,t)}),1),!0),suppressErrors:!0});const i=document.querySelector(".pageHeaderSearchType"),d=r.default.getDropdownMenu(o.default.identify(i));d.querySelectorAll("a[data-object-type]").forEach((e=>{e.addEventListener("click",l)})),d.querySelector('a[data-object-type="'+e+'"]').click(),n.addEventListener("submit",(e=>{e.preventDefault(),c(n,t)}))},i=n.__importStar(i),o=n.__importDefault(o),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importDefault(s);const d=new Map})),define("WoltLabSuite/Core/Ui/Toggle/Input",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";return i=n.__importDefault(i),class{element;hide;show;constructor(e,t){const n=document.querySelector(e);if(null===n)throw new Error("Unable to find element by selector '"+e+"'.");const i="INPUT"===n.nodeName?n.type:"";if("checkbox"!==i&&"radio"!==i)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this.element=n,this.hide=this.getElements("hide",Array.isArray(t.hide)?t.hide:[]),this.show=this.getElements("show",Array.isArray(t.show)?t.show:[]),this.element.addEventListener("change",(e=>this.change(e))),this.updateVisibility(this.show,this.element.checked),this.updateVisibility(this.hide,!this.element.checked)}getElements(e,t){const n=[];return t.forEach((t=>{let i;if("string"==typeof t){if(i=document.querySelector(t),null===i)throw new Error(`Unable to find an element with the selector '${t}'.`)}else{if(!(t instanceof HTMLElement))throw new TypeError(`The array '${e}' may only contain string selectors or DOM elements.`);i=t}n.push(i)})),n}change(e){const t=e.currentTarget.checked;this.updateVisibility(this.show,t),this.updateVisibility(this.hide,!t)}updateVisibility(e,t){e.forEach((e=>{i.default[t?"show":"hide"](e)}))}}})),define("WoltLabSuite/Core/Ui/User/List",["require","exports","tslib","../../Ajax","../../Core","../../Dom/Util","../Dialog","../Pagination"],(function(e,t,n,i,o,r,a,s){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importDefault(s),class{cache=new Map;options;pageCount=0;pageNo=1;constructor(e){this.options=o.extend({className:"",dialogTitle:"",parameters:{}},e)}open(){this.pageNo=1,this.showPage()}showPage(e){if("number"==typeof e&&(this.pageNo=+e),0!==this.pageCount&&(this.pageNo<1||this.pageNo>this.pageCount))throw new RangeError(`pageNo must be between 1 and ${this.pageCount} (${this.pageNo}
1 given).`);if(this.cache.has(this.pageNo)){const e=a.default.open(this,this.cache.get(this.pageNo));if(this.pageCount>1){const t=e.content.querySelector(".jsPagination");null!==t&&new s.default(t,{activePage:this.pageNo,maxPage:this.pageCount,callbackSwitch:this.showPage.bind(this)});const n=e.content.parentElement;n.scrollTop>0&&(n.scrollTop=0)}}else this.options.parameters.pageNo=this.pageNo,i.api(this,{parameters:this.options.parameters})}_ajaxSuccess(e){void 0!==e.returnValues.pageCount&&(this.pageCount=~~e.returnValues.pageCount),this.cache.set(this.pageNo,e.returnValues.template),this.showPage()}_ajaxSetup(){return{data:{actionName:"getGroupedUserList",className:this.options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}}_dialogSetup(){return{id:r.default.getUniqueId(),options:{title:this.options.dialogTitle},source:null}}}})),define("WoltLabSuite/Core/Ui/User/ObjectWatch",["require","exports","tslib","../../Ajax","../../Language","../../Event/Handler","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){document.querySelectorAll(".userObjectWatchDropdown").forEach((e=>{if(!e.dataset.objectId)throw new Error("Missing objectId for '.userObjectWatchDropdown' element.");const t=parseInt(e.dataset.objectId,10);s.has(t)||s.set(t,new Set),s.get(t).add(e),e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{if(!e.dataset.subscribe)throw new Error("Missing 'data-subscribe' attribute for '.userObjectWatchSelect' element.");e.addEventListener("click",(t=>{t.preventDefault(),async function(e){const t=e.closest(".userObjectWatchDropdown"),n=parseInt(e.dataset.subscribe,10),l=parseInt(t.dataset.objectId,10),c=t.dataset.objectType;await i.dboAction("saveSubscription","wcf\\data\\user\\object\\watch\\UserObjectWatchAction").payload({enableNotification:1,objectID:l,objectType:c,subscribe:n}).dispatch(),s.has(l)&&s.get(l).forEach((e=>{e.querySelectorAll(".userObjectWatchSelect").forEach((e=>{parseInt(e.dataset.subscribe,10)===n?e.classList.add("active"):e.classList.remove("active")}))})),document.querySelectorAll(`.userObjectWatchDropdownToggle[data-object-type="${c}"][data-object-id="${l}"]`).forEach((e=>{const t=e.querySelector("fa-icon"),i=e.querySelector("span:not(.icon)");n?(e.classList.add("active"),t.setIcon("bookmark",!0),i.textContent=o.get("wcf.user.objectWatch.button.subscribed")):(e.classList.remove("active"),t.setIcon("bookmark"),i.textContent=o.get("wcf.user.objectWatch.button.subscribe")),e.dataset.isSubscribed=n.toString()})),r.fire("com.woltlab.wcf.objectWatch","updatedSubscription"),(0,a.showDefaultSuccessSnackbar)()}(e)}))}))}))},i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r);const s=new Map})),define("WoltLabSuite/Core/Api/Comments/Responses/EditResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editResponse=async function(e){const t=new URL(`${window.WSC_RPC_API_URL}core/comments/responses/${e}/edit`);let o;try{o=await(0,n.prepareRequest)(t).get().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Api/Comments/Responses/EnableResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableResponse=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/comments/responses/${e}/enable`).post().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/Responses/DeleteResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteResponse=async function(e){try{await(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/comments/responses/${e}`).delete().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Api/Comments/Responses/UpdateResponse",["require","exports","WoltLabSuite/Core/Ajax/Backend","../../Result"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.updateResponse=async function(e,t){try{await(0,n.prepareRequest)(`${window.WSC_RPC_API_URL}core/comments/responses/${e}`).post({message:t}).fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)([])}})),define("WoltLabSuite/Core/Component/Comment/Response/woltlab-core-comment-response",["require","exports","tslib","../../../Dom/Util","../../../Ui/Dropdown/Simple","../../Confirmation","../../../Event/Handler","../../../Ui/Scroll","../../../Language","../../Ckeditor","WoltLabSuite/Core/Api/Comments/Responses/EnableResponse","WoltLabSuite/Core/Api/Comments/Responses/DeleteResponse","WoltLabSuite/Core/Api/Comments/Responses/EditResponse","WoltLabSuite/Core/Api/Comments/Responses/RenderResponse","WoltLabSuite/Core/Api/Comments/Responses/UpdateResponse","../../Snackbar"],(function(e,t,n,i,o,r,a,s,l,c,d,u,h,p,f,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreCommentResponseElement=void 0,i=n.__importDefault(i),o=n.__importDefault(o),a=n.__importStar(a),s=n.__importStar(s);class g extends HTMLParsedElement{parsedCallback(){if(this.menu){const e=this.menu.querySelector(".commentResponse__option--enable");e?.addEventListener("click",(e=>{e.preventDefault(),this.#ei()}));const t=this.menu.querySelector(".commentResponse__option--delete");t?.addEventListener("click",(e=>{e.preventDefault(),this.#ti()}));const n=this.menu.querySelector(".commentResponse__option--edit");n?.addEventListener("click",(e=>{e.preventDefault(),this.#ni()}))}}async#ei(){(await(0,d.enableResponse)(this.responseId)).unwrap(),this.querySelector(".commentResponse__status--disabled").hidden=!0,this.menu&&(this.menu.querySelector(".commentResponse__option--enable").hidden=!0)}async#ti(){await(0,r.confirmationFactory)().delete()&&((await(0,u.deleteResponse)(this.responseId)).unwrap(),(0,m.showDefaultSuccessSnackbar)(),this.dispatchEvent(new CustomEvent("delete")))}async#ni(){this.menu.querySelector(".commentResponse__option--edit").hidden=!0;const{template:e}=(await(0,h.editResponse)(this.responseId)).unwrap();this.#ii(e)}#ii(e){this.querySelector(".htmlContent").hidden=!0,i.default.insertHtml(e,this.#gn,"append"),this.querySelector('button[data-type="save"]').addEventListener("click",(()=>{this.#oi()})),this.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{this.#ri()})),a.add("com.woltlab.wcf.ckeditor5",`submitEditor_${this.#pn}`,(e=>{e.cancel=!0,this.#oi()})),window.setTimeout((()=>{s.element(this,(()=>{(0,c.getCkeditorById)(this.#pn).focus(!1)}))}),250)}async#oi(){const e=(0,c.getCkeditorById)(this.#pn),t={data:{message:e.getHtml()}};if(!this.#ai(t))return;a.fire("com.woltlab.wcf.ckeditor5",`submit_${this.#pn}`,t),this.#a();const n=await(0,f.updateResponse)(this.responseId,e.getHtml());if(!n.ok){const e=n.error.getValidationError();if(void 0===e)throw new Error("Unexpected validation error",{cause:n.error});return i.default.innerError(document.getElementById(this.#pn),e.code),void this.#si()}const{template:o}=(await(0,p.renderResponse)(this.responseId,!0)).unwrap();i.default.setInnerHtml(this.querySelector(".htmlContent"),o),this.#si(),this.#ri(),(0,m.showDefaultSuccessSnackbar)()}#a(){let e=this.querySelector(".commentResponse__loading");e||(e=document.createElement("div"),e.classList.add("commentResponse__loading"),e.innerHTML='<woltlab-core-loading-indicator size="96" hide-text></woltlab-core-loading-indicator>',this.querySelector(".commentResponse__message").append(e)),this.#gn.hidden=!0,e.hidden=!1}#si(){this.#gn.hidden=!1;const e=this.querySelector(".commentResponse__loading");e&&(e.hidden=!0)}#ai(e){this.querySelectorAll(".innerError").forEach((e=>e.remove()));const t=(0,c.getCkeditorById)(this.#pn);if(""===t.getHtml())return i.default.innerError(t.element,(0,l.getPhrase)("wcf.global.form.error.empty")),!1;const n={api:this,parameters:e,valid:!0};return a.fire("com.woltlab.wcf.ckeditor5",`validate_${this.#pn}`,n),n.valid}#ri(){(0,c.getCkeditorById)(this.#pn).destroy(),this.#gn.remove(),this.menu.querySelector(".commentResponse__option--edit").hidden=!1,this.querySelector(".htmlContent").hidden=!1}get#gn(){let e=this.querySelector(".commentResponse__editor");return e||(e=document.createElement("div"),e.classList.add("commentResponse__editor"),this.querySelector(".commentResponse__message").append(e)),e}get responseId(){return parseInt(this.getAttribute("response-id"))}get menu(){let e=o.default.getDropdownMenu(`commentResponseOptions${this.responseId}`);return void 0===e&&(e=this.querySelector(".commentResponse__menu .dropdownMenu")||void 0),e}get#pn(){return`commentResponseEditor${this.responseId}`}}t.WoltlabCoreCommentResponseElement=g,window.customElements.define("woltlab-core-comment-response",g),t.default=g})),define("WoltLabSuite/Core/Component/Interaction/Bulk/FormBuilderDialog",["require","exports","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){t.addEventListener("bulk-interaction",(o=>{o.detail.bulkInteraction===e&&async function(e,t,o){const{ok:r}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(o);if(r){for(let n=0;n<t.length;n++){const i=e.querySelector(`[data-object-id="${t[n]}"]`);i&&i.dispatchEvent(new CustomEvent("interaction:invalidate",{bubbles:!0}))}(0,i.showDefaultSuccessSnackbar)(),e.dispatchEvent(new CustomEvent("interaction:reset-selection"))}}(t,JSON.parse(o.detail.objectIds),o.detail.endpoint)}))}})),define("WoltLabSuite/Core/Component/Interaction/Bulk/Rpc",["require","exports","WoltLabSuite/Core/Api/DeleteObject","WoltLabSuite/Core/Api/PostObject","../Confirmation","WoltLabSuite/Core/Component/Snackbar"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){t.addEventListener("bulk-interaction",(a=>{a.detail.bulkInteraction===e&&async function(e,t,a,s,l,c=""){const d=await(0,o.handleConfirmation)("",l,c);if(!d.result)return;const u=t.length,h=(0,r.showProgressSnackbar)(s,u);for(let r=0;r<u;r++){l===o.ConfirmationType.Delete?await(0,n.deleteObject)(a.replace(/%s/,t[r].toString())):await(0,i.postObject)(a.replace(/%s/,t[r].toString()),d.reason?{reason:d.reason}:void 0),h.setIteration(r+1);const s=e.querySelector(`[data-object-id="${t[r]}"]`);s&&(l===o.ConfirmationType.Delete?s.dispatchEvent(new CustomEvent("interaction:remove",{bubbles:!0})):s.dispatchEvent(new CustomEvent("interaction:invalidate",{bubbles:!0})))}h.markAsDone(),e.dispatchEvent(new CustomEvent("interaction:reset-selection")),e.dispatchEvent(new CustomEvent("interaction:bulk-completed"))}(t,JSON.parse(a.detail.objectIds),a.detail.endpoint,a.detail.label,a.detail.confirmationType,a.detail.confirmationMessage)}))}})),define("WoltLabSuite/Core/Component/User/RecentActivity/Loader",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Core","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Language"],(function(e,t,n,i,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e){!function(e){if(e.querySelector(".recentActivityList__showMoreButton"))return;const t=document.createElement("div");t.classList.add("recentActivityList__showMoreButton"),e.append(t);const n=document.createElement("button");n.type="button",n.classList.add("button","small"),n.textContent=(0,s.getPhrase)("wcf.user.recentActivity.more"),t.append(n),n.addEventListener("click",(0,a.promiseMutex)((()=>async function(e){const t=await(0,i.dboAction)("load","wcf\\data\\user\\activity\\event\\UserActivityEventAction").payload({lastEventTime:e.dataset.lastEventTime,lastEventID:e.dataset.lastEventId||0,userID:e.dataset.userId||0,boxID:e.dataset.boxId||0,filteredByFollowedUsers:(0,o.stringToBool)(e.dataset.filteredByFollowedUsers||"")}).dispatch();if(t.template){e.dataset.lastEventTime=t.lastEventTime.toString(),e.dataset.lastEventId=t.lastEventID.toString();const n=r.default.createFragmentFromHtml(t.template);e.insertBefore(n,e.querySelector(".recentActivityList__showMoreButton"))}else e.querySelector(".recentActivityList__showMoreButton")?.remove(),function(e){const t=document.createElement("div");t.classList.add("recentActivityList__showMoreButton"),e.append(t);const n=document.createElement("small");n.textContent=(0,s.getPhrase)("wcf.user.recentActivity.noMoreEntries"),t.append(n)}(e)}(e))))}(e),function(e){e.querySelectorAll(".recentActivityList__switchContextButton").forEach((t=>{t.classList.contains("active")||t.addEventListener("click",(0,a.promiseMutex)((()=>async function(e){await(0,i.dboAction)("switchContext","wcf\\data\\user\\activity\\event\\UserActivityEventAction").dispatch(),window.location.hash=`#${e.id}`,window.location.reload()}(e))))}))}(e)},r=n.__importDefault(r)})),define("WoltLabSuite/Core/Component/User/Signature/Preview",["require","exports","WoltLabSuite/Core/Helper/PromiseMutex","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Component/Ckeditor/Event"],(function(e,t,n,i,o){"use strict";let r;
1Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(){(0,o.listenToCkeditor)(document.getElementById("text")).ready((({ckeditor:e})=>{document.getElementById("previewButton")?.addEventListener("click",(0,n.promiseMutex)((()=>async function(e){const t=await(0,i.dboAction)("getMessagePreview","wcf\\data\\user\\UserProfileAction").payload({data:{message:e}}).dispatch();if(void 0===r){const e=document.getElementById("previewTemplate"),t=e.content.cloneNode(!0);document.getElementById("signatureContainer").insertAdjacentElement("beforebegin",e),e.replaceWith(t),r=document.getElementById("previewContainer")}r.innerHTML=t.message}(e.getHtml()))))}))}})),define("WoltLabSuite/Core/Form/Builder/Container/SuffixFormField",["require","exports","tslib","../../../Ui/Dropdown/Simple","../../../Event/Handler"],(function(e,t,n,i,o){"use strict";return i=n.__importDefault(i),o=n.__importStar(o),class{_formId;_suffixField;_suffixDropdownMenu;_suffixDropdownToggle;constructor(e,t){this._formId=e,this._suffixField=document.getElementById(t),this._suffixDropdownMenu=i.default.getDropdownMenu(t+"_dropdown"),this._suffixDropdownToggle=i.default.getDropdown(t+"_dropdown").getElementsByClassName("dropdownToggle")[0],Array.from(this._suffixDropdownMenu.children).forEach((e=>{e.addEventListener("click",(e=>this._changeSuffixSelection(e)))})),o.add("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",(e=>this._destroyDropdown(e)))}_changeSuffixSelection(e){const t=e.currentTarget;t.classList.contains("disabled")||(Array.from(this._suffixDropdownMenu.children).forEach((e=>{e===t?e.classList.add("active"):e.classList.remove("active")})),this._suffixField.value=t.dataset.value,this._suffixDropdownToggle.innerHTML=t.dataset.label+' <fa-icon name="caret-down" solid></fa-icon>')}_destroyDropdown(e){e.formId===this._formId&&i.default.destroy(this._suffixDropdownMenu.id)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Acl",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_aclList;_getData(){return{[this._fieldId]:this._aclList.getData()}}_readField(){}setAclList(e){return this._aclList=e,this}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Button",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0,i=n.__importDefault(i);class o extends i.default{_getData(){const e={};return"1"===this._field.dataset.isClicked&&(e[this._fieldId]=this._field.value),e}}t.Button=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Captcha",["require","exports","tslib","./Field","../../../Controller/Captcha"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importDefault(o);class r extends i.default{_getData(){return o.default.has(this._fieldId)?o.default.getData(this._fieldId):{}}_readField(){}destroy(){o.default.has(this._fieldId)&&o.default.delete(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checkboxes",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i);class r extends i.default{_getData(){const e=this._fields.map((e=>e.checked?e.value:null)).filter((e=>null!==e));return{[this._fieldId]:e}}_readField(){}get _fields(){return Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[]"]`))}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Checked",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_getData(){return{[this._fieldId]:this._field.checked?"1":"0"}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/CheckedVoid",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckedVoid=void 0,i=n.__importDefault(i);class o extends i.default{_getData(){return this._field.checked?{[this._fieldId]:1}:{}}}t.CheckedVoid=o,t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/Ckeditor",["require","exports","tslib","./Field","WoltLabSuite/Core/Component/Ckeditor/Event","WoltLabSuite/Core/Component/Ckeditor"],(function(e,t,n,i,o,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Ckeditor=void 0,i=n.__importDefault(i);class a extends i.default{_getData(){const e=(0,r.getCkeditorById)(this._fieldId);return{[this._fieldId]:e.getHtml()}}destroy(){(0,o.dispatchToCkeditor)(this._field).destroy()}}t.Ckeditor=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Date",["require","exports","tslib","./Field","../../../Date/Picker"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importDefault(o);class r extends i.default{_getData(){return{[this._fieldId]:o.default.getValue(this._field)}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/DateRange",["require","exports","tslib","./Field","../../../Date/Picker"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importDefault(o);class r extends i.default{#ro;#ao;constructor(e){if(super(e),this.#ro=document.getElementById(this._fieldId),null===this.#ro)throw new Error("Unknown field with id '"+this._fieldId+"'.");if(this.#ao=document.getElementById(this._fieldId+"_to"),null===this.#ao)throw new Error("Unknown field with id '"+this._fieldId+"'.")}_getData(){return{[this._fieldId]:{from:o.default.getValue(this.#ro),to:o.default.getValue(this.#ao)}}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor",["require","exports","tslib","WoltLabSuite/Core/Language","WoltLabSuite/Core/Api/Files/DeleteFile","WoltLabSuite/Core/Dom/Change/Listener","WoltLabSuite/Core/Component/File/Helper","WoltLabSuite/Core/Component/File/Upload","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Component/Confirmation"],(function(e,t,n,i,o,r,a,s,l,c){"use strict";function d(e,t,n=!1){n?e.dataset.previewUrl=void 0!==t?t.link:e.link:void 0!==t&&(e.thumbnail=t),e.unbounded=n}function u(e,t){p.get(e)?.forEach((e=>e(t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.FileProcessor=void 0,t.getValues=function(e){const t=h.get(e);if(void 0===t)throw new Error("Unknown field with id '"+e+"'");return t.values},t.registerCallback=function(e,t){p.has(e)||p.set(e,[]),p.get(e).push(t)},t.unregisterCallback=function(e,t){p.set(e,p.get(e)?.filter((e=>e!==t))??[])},r=n.__importDefault(r);const h=new Map,p=new Map;t.FileProcessor=class{#tt;#so;#lo;#co=void 0;#do;#uo;#ho;#po;#fo;#mo;#go;#bo;constructor(e,t=!1,n=!1,i=!1,o=!1,r,a=[]){if(this.#lo=e,this.#uo=n,this.#ho=t,this.#po=i,this.#fo=o,this.#go=a,this.#mo=r,this.#tt=document.getElementById(e+"Container"),null===this.#tt)throw new Error("Unknown field with id '"+e+"'");this.#so=this.#tt.querySelector("woltlab-core-file-upload"),this.#po&&this.#so.addEventListener("shouldUpload",(()=>{const e=this.#so.parentElement.querySelector("woltlab-core-file[file-id]");e&&this.#vo(e)})),this.#so.addEventListener("uploadStart",(e=>{void 0!==this.#bo&&this.#bo(),this.#yo(e.detail)})),this.#do=this.#so.querySelector('input[type="file"]'),this.#tt.querySelectorAll("woltlab-core-file").forEach((e=>{this.#yo(e,e.parentElement,!1)})),h.set(e,this)}get classPrefix(){return this.#uo?"fileUpload__preview__":"fileList__"}addButtons(e,t){const n=document.createElement("ul");if(n.classList.add("buttonList"),n.classList.add(this.classPrefix+"item__buttons"),!this.#fo){const e=document.createElement("li");e.append(this.getDeleteButton(t)),n.append(e)}if(this.#ho&&!this.#po){const e=document.createElement("li");e.append(this.getReplaceButton(t)),n.append(e)}this.#go.forEach((e=>{const i=document.createElement("button");i.type="button",i.classList.add("button","small"),void 0===e.icon?i.textContent=e.title:(i.classList.add("jsTooltip"),i.title=e.title,i.innerHTML=e.icon),i.addEventListener("click",(()=>{t.dispatchEvent(new CustomEvent("fileProcessorCustomAction",{detail:e.actionName,bubbles:!0}))}));const o=document.createElement("li");o.append(i),n.append(o)})),e.append(n)}getReplaceButton(e){const t=document.createElement("button");return t.type="button",t.classList.add("button","small"),t.textContent=(0,i.getPhrase)("wcf.global.button.replace"),t.addEventListener("click",(()=>{const t=this.#wo(e);(0,s.clearPreviousErrors)(this.#so);const n=()=>{this.#do.removeEventListener("cancel",i),new Promise((e=>{this.#bo=e})).then((()=>{this.#bo=void 0,this.#so.dataset.context=t}))},i=()=>{this.#so.dataset.context=t,this.#yo(this.#co,null,!1),this.#co=void 0,this.#bo=void 0,this.#do.removeEventListener("change",n)};this.#do.addEventListener("cancel",i,{once:!0}),this.#do.addEventListener("change",n,{once:!0}),this.#do.click()})),t}#Eo(e,t){let n;if(n=t instanceof Error?t.message:(0,a.getErrorMessageFromFile)(e),(0,l.innerError)(this.#so,n),e.remove(),t instanceof Error)throw t}getDeleteButton(e){const t=document.createElement("button");return t.type="button",t.classList.add("button","small"),t.textContent=(0,i.getPhrase)("wcf.global.button.delete"),t.addEventListener("click",(async()=>
1{if(!await(0,c.confirmationFactory)().delete())return;const t=await(0,o.deleteFile)(e.fileId);if(t.ok)this.#So(e),u(this.#lo,this.values);else{let n=e;this.#uo||(n=n.parentElement),"permission_denied"===t.error.code?(0,l.innerError)(n,(0,i.getPhrase)("wcf.upload.error.delete.permissionDenied"),!0):(0,l.innerError)(n,t.error.message??(0,i.getPhrase)("wcf.upload.error.delete.unknownError"))}})),t}#vo(e){const t=this.#wo(e),n=()=>{this.#bo=void 0,this.#so.dataset.context=t,this.#yo(this.#co,null,!1),this.#co=void 0};this.#so.addEventListener("cancel",n,{once:!0}),new Promise((e=>{this.#bo=e})).then((()=>{this.#bo=void 0,this.#so.dataset.context=t,this.#so.removeEventListener("cancel",n)}))}#wo(e){const t=this.#so.dataset.context,n=JSON.parse(t);return n.__replace=!0,this.#so.dataset.context=JSON.stringify(n),this.#co=e,this.#So(e),t}#So(e){this.#uo?e.parentElement.innerHTML="":e.parentElement.parentElement.remove()}#yo(e,t=null,n=!0){null===t&&(this.#uo?(null===(t=this.#tt.querySelector(".fileUpload__preview"))&&((t=document.createElement("div")).classList.add("fileUpload__preview"),this.#so.insertAdjacentElement("afterbegin",t)),t.append(e)):((t=document.createElement("li")).classList.add("fileList__item"),this.#tt.querySelector(".fileList").append(t))),this.#uo||((0,a.insertFileInformation)(t,e),e.addEventListener("file:update-data",(()=>{(0,a.updateFileInformation)(t,e)}))),(0,a.trackUploadProgress)(t,e),e.ready.then((()=>{void 0!==this.#co&&((0,o.deleteFile)(this.#co.fileId),this.#co=void 0),this.#_o(e,t,n)})).catch((n=>{if(void 0!==this.#co&&(this.#yo(this.#co,null,!1),this.#co=void 0,this.#uo)){const n=document.createElement("div");n.append(e),this.#so.insertAdjacentElement("afterend",n),t=n}this.#Eo(e,n)})).finally((()=>{(0,a.removeUploadProgress)(t)}))}#_o(e,t,n=!0){if(this.#uo)d(e,e.thumbnails.find((e=>e.identifier===this.#mo)),!0);else if(e.isImage()){const n=this.#mo??"tiny",i=e.thumbnails.find((e=>e.identifier===n));if(d(e,i),void 0!==e.link&&void 0!==e.filename){const n=document.createElement("a");n.href=e.link,n.title=e.filename,n.textContent=e.filename,n.dataset.fancybox="",n.dataset.caption=e.filename;const o=document.createElement("img");o.src=void 0!==i?i.link:e.link,o.alt=e.filename,o.style.display="none",o.loading="lazy",o.classList.add(this.classPrefix+"item__previewImage"),n.append(o);const a=t.querySelector("."+this.classPrefix+"item__filename");a.innerHTML="",a.append(n),r.default.trigger()}}const i=document.createElement("input");i.type="hidden",i.name=this.#ho?this.#lo:this.#lo+"[]",i.value=e.fileId.toString(),t.append(i),this.addButtons(t,e),n&&u(this.#lo,this.values)}get values(){if(this.#ho){const e=this.#tt.querySelector('input[type="hidden"]');if(null===e)return;return parseInt(e.value)}return new Set(Array.from(this.#tt.querySelectorAll('input[type="hidden"]')).map((e=>parseInt(e.value))))}}})),define("WoltLabSuite/Core/Form/Builder/Field/FileProcessor",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i=n.__importDefault(i);class r extends i.default{_getData(){const e=(0,o.getValues)(this._fieldId);return void 0===e?{}:{[this._fieldId]:e}}_readField(){}}t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Value",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_getData(){return{[this._fieldId]:this._field.value}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/GoogleMaps",["require","exports","tslib","./Value"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_getData(){const e=document.getElementById(this._fieldId+"_map");return{[this._fieldId]:this._field.value,[this._fieldId+"_coordinates"]:`${e.lat},${e.lng}`}}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/ItemList",["require","exports","tslib","./Field","../../../Ui/ItemList/Static"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e=[];
1return o.getValues(this._fieldId).forEach((t=>{t.objectId?e[t.objectId]=t.value:e.push(t.value)})),{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText",["require","exports","tslib","../Confirmation","../../Language","../../Dom/Util"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UiItemListLineBreakSeparatedText=void 0,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r);class a{addButton=void 0;clearButton=void 0;itemInput=void 0;itemList;items=new Set;mutationObserver;options;submitField=void 0;uiDisabled=!1;constructor(e,t={}){if(this.itemList=e,this.options=t,!this.options.submitFieldName){const e=this.itemList.nextElementSibling;if(!(e instanceof HTMLInputElement&&"hidden"===e.type))throw new Error("Missing `submitFieldName` option");this.submitField=e}this.itemList.closest("form").addEventListener("submit",(()=>this.submit())),this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{"readonly"===e.attributeName&&(e.target.readOnly?this.disableUi():this.enableUi())}))})),this.initValues(),this.buildUi()}addItem(e){if(e.preventDefault(),this.uiDisabled)return;const t=this.itemInput,n=t.value.trim();""===n?r.default.innerError(t.parentElement,o.get("wcf.global.form.error.empty")):this.items.has(n)?r.default.innerError(t.parentElement,o.get("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:n}),!0):(this.insertItem(n),this.resetInput()),t.focus()}buildUi(){const e=document.createElement("div");e.classList.add("itemListFilter"),this.itemList.insertAdjacentElement("beforebegin",e),e.appendChild(this.itemList);const t=document.createElement("div");t.classList.add("inputAddon"),e.appendChild(t),this.itemInput=document.createElement("input"),this.itemInput.classList.add("long"),this.itemInput.type="text",this.itemInput.placeholder=o.get("wcf.acp.option.type.lineBreakSeparatedText.placeholder"),this.itemInput.addEventListener("keydown",(e=>this.keydown(e))),this.itemInput.addEventListener("paste",(e=>this.paste(e))),t.appendChild(this.itemInput),this.mutationObserver.observe(this.itemInput,{attributes:!0}),this.addButton=document.createElement("a"),this.addButton.href="#",this.addButton.classList.add("button","inputSuffix","jsTooltip"),this.addButton.title=o.get("wcf.global.button.add"),this.addButton.innerHTML='<fa-icon name="plus" solid></fa-icon>',this.addButton.addEventListener("click",(e=>this.addItem(e))),t.appendChild(this.addButton),this.clearButton=document.createElement("a"),this.clearButton.href="#",this.clearButton.classList.add("button","inputSuffix","jsTooltip"),this.clearButton.title=o.get("wcf.global.button.delete"),this.clearButton.innerHTML='<fa-icon name="times" solid></fa-icon>',this.clearButton.addEventListener("click",(e=>this.clearList(e))),t.appendChild(this.clearButton),0===this.items.size&&r.default.hide(this.clearButton)}clearList(e){e.preventDefault(),this.uiDisabled||i.show({confirm:()=>{this.itemList.innerHTML="",this.items.clear(),this.hideList()},message:o.get("wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage"),messageIsHtml:!0})}deleteItem(e){if(this.uiDisabled)return;const t=e.currentTarget,n=t.closest("li").dataset.value;i.show({confirm:()=>{t.closest("li").remove(),0===this.itemList.childElementCount&&this.hideList(),this.items.delete(n)},message:o.get("wcf.button.delete.confirmMessage",{objectTitle:n}),messageIsHtml:!0})}disableUi(){this.addButton.classList.add("disabled"),this.clearButton.classList.add("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.add("disabled"))),this.uiDisabled=!0}enableUi(){this.addButton.classList.remove("disabled"),this.clearButton.classList.remove("disabled"),this.itemList.querySelectorAll(".jsDeleteItem").forEach((e=>e.classList.remove("disabled"))),this.uiDisabled=!1}hideList(){r.default.hide(this.itemList),r.default.hide(this.clearButton)}initValues(){Array.from(this.itemList.children).forEach((e=>{this.items.add(e.dataset.value),e.querySelector(".jsDeleteItem").addEventListener("click",(e=>this.deleteItem(e)))}))}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const n=document.createElement("span");n.innerHTML='<fa-icon name="xmark" solid></fa-icon>',n.classList.add("jsDeleteItem","jsTooltip","pointer"),n.title=o.get("wcf.global.button.delete"),n.addEventListener("click",(e=>this.deleteItem(e))),t.append(n),t.append(document.createTextNode(" "));const i=document.createElement("span");i.innerText=e,t.append(i);const r=Array.from(this.itemList.children).find((t=>t.dataset.value>e));r?this.itemList.insertBefore(t,r):this.itemList.append(t),this.showList()}keydown(e){"Enter"===e.key&&this.addItem(e)}paste(e){if(this.uiDisabled)return;const t=e.clipboardData.getData("text/plain").split("\n");t.length>1&&(e.preventDefault(),t.forEach((e=>{""===(e=e.trim())||this.items.has(e)||this.insertItem(e)})),this.resetInput())}resetInput(){r.default.innerError(this.itemInput.parentElement,""),this.itemInput.value=""}showList(){r.default.show(this.itemList),r.default.show(this.clearButton)}submit(){const e=Array.from(this.items).join("\n");if(this.submitField)this.submitField.value=e;else{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}}}t.UiItemListLineBreakSeparatedText=a,t.default=a})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText","WoltLabSuite/Core/Language","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.MultilineItemListFormField=void 0,t.getValues=function(e){if(!a.has(e))throw new Error(`Element id '${e}' is unknown.`);return a.get(e).getItems()},i=n.__importStar(i),r=n.__importDefault(r);const a=new Map;class s extends i.UiItemListLineBreakSeparatedText{constructor(e,t){super(e,t),null!=t.submitFieldName?a.set(t.submitFieldName,this):a.set(this.submitField.id,this)}getItems(){return this.items}initValues(){super.initValues(),Array.from(this.itemList.children).forEach((e=>{e.querySelector(".jsEditItem").addEventListener("click",(e=>{this.editItem(e)}))}))}editItem(e){if(this.uiDisabled)return;const t=e.currentTarget,n=t.closest("li"),i=n.querySelector(".jsDeleteItem"),a=n.querySelector("span"),s=t.closest("li").dataset.value;r.default.hide(i),r.default.hide(t),r.default.hide(a);const l=document.createElement("input");l.type="text",l.value=s;const c=document.createElement("button");c.classList.add("jsSaveItem","jsTooltip"),c.title=(0,o.getPhrase)("wcf.global.button.save");let d=document.createElement("fa-icon");d.setIcon("save"),c.append(d);const u=document.createElement("button");u.classList.add("jsCancelItem","jsTooltip"),u.title=(0,o.getPhrase)("wcf.global.button.cancel"),d=document.createElement("fa-icon"),d.setIcon("times"),u.append(d);const h=()=>{l.remove(),c.remove(),u.remove(),r.default.show(i),r.default.show(t),r.default.show(a)},p=e=>{if(e.preventDefault(),this.uiDisabled)return;const n=l.value.trim();""===n?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.global.form.error.empty")):this.items.has(n)&&n!==s?r.default.innerError(l.parentElement,(0,o.getPhrase)("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate",{item:n}),!0):(r.default.innerError(l.parentElement,""),t.closest("li").dataset.value=n,a.textContent=n,this.items.delete(s),this.items.add(n),h()),l.focus()};l.addEventListener("keydown",(e=>{"Enter"===e.key?p(e):"Escape"===e.key&&h()})),c.addEventListener("click",(e=>{p(e)})),u.addEventListener("click",(()=>{h()})),n.append(c,u,l),l.focus()}insertItem(e){this.items.add(e);const t=document.createElement("li");t.dataset.value=e;const n=document.createElement("button");n.type="button",n.classList.add("jsDeleteItem","jsTooltip"),n.title=(0,o.getPhrase)("wcf.global.button.delete"),n.addEventListener("click",(e=>{this.deleteItem(e)}));let i=document.createElement("fa-icon");i.setIcon("trash"),n.append(i);const r=document.createElement("button");r.type="button",r.classList.add("jsEditItem","jsTooltip"),r.title=(0,o.getPhrase)("wcf.global.button.edit"),r.addEventListener("click",(e=>{this.editItem(e)})),i=document.createElement("fa-icon"),i.setIcon("pencil"),r.append(i);const a=document.createElement("span");a.innerText=e,t.append(r,n," ",a);const s=Array.from(this.itemList.children).find((t=>t.dataset.value>e));s?this.itemList.insertBefore(t,s):this.itemList.append(t),this.showList()}submit(){this.submitField?this.submitField.value=Array.from(this.items).join("\n"):Array.from(this.items).forEach((e=>{const t=document.createElement("input");t.type="hidden",t.name=this.options.submitFieldName,t.value=e,this.itemList.parentElement.append(t)}))}}t.MultilineItemListFormField=s})),define("WoltLabSuite/Core/Form/Builder/Field/MultilineItemList",["require","exports","tslib","WoltLabSuite/Core/Form/Builder/Field/Field","./Controller/MultilineItemList"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultilineItemList=void 0,i=n.__importDefault(i);class r extends i.default{_getData(){return{[this._fieldId]:(0,o.getValues)(this._fieldId)}}}t.MultilineItemList=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/NumericRange",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{#ro;#ao;constructor(e){if(super(e),this.#ro=document.getElementById(this._fieldId),null===this.#ro)throw new Error("Unknown field with id '"+this._fieldId+"'.");if(this.#ao=document.getElementById(this._fieldId+"_to"),null===this.#ao)throw new Error("Unknown field with id '"+this._fieldId+"'.")}_getData(){return{[this._fieldId]:{from:this.#ro.value,to:this.#ao.value}}}_readField(){}}return o}
1)),define("WoltLabSuite/Core/Form/Builder/Field/RadioButton",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i);class r extends i.default{_fields;constructor(e){super(e),this._fields=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}"]`))}_getData(){const e={};return this._fields.some((t=>!!t.checked&&(e[this._fieldId]=t.value,!0))),e}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Select",["require","exports","tslib","./Field"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i=n.__importDefault(i);class o extends i.default{_getData(){const e=Array.from(this._field.querySelectorAll("option")).filter((e=>e.selected)).map((e=>e.value));return{[this._fieldId]:e}}}t.default=o})),define("WoltLabSuite/Core/Form/Builder/Field/SelectOptions",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Language","WoltLabSuite/Core/Language/Input","sortablejs"],(function(e,t,n,i,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=function(e,t){new s(e,t)},a=n.__importDefault(a);class s{#Co;#ln;#Ao;constructor(e,t){if(null===e.form)throw new Error("Cannot create select options for an form field that is not part of a form.",{cause:{formField:e}});this.#Co=t,this.#Ao=document.getElementById(`${e.id}_template`),this.#ln=this.#Lo(e),this.#Io(e),this.#xo(),e.form.addEventListener("submit",(()=>{this.#ko(e)}))}#Lo(e){const t=document.createElement("ul");t.classList.add("selectOptionsList"),e.insertAdjacentElement("afterend",t);const n=this.#To();return n.addEventListener("click",(()=>{this.#Mo(void 0,!0)})),t.insertAdjacentElement("afterend",n),t}#Io(e){e.value?JSON.parse(e.value).forEach((e=>{this.#Mo(e)})):this.#Mo()}#To(){const e=document.createElement("button");return e.type="button",e.classList.add("button","small","selectOptionsListItem__addItem"),e.textContent=(0,o.getPhrase)("wcf.form.selectOptions.addItem"),e}#Mo(e,t=!1){const n=document.createElement("li");n.classList.add("selectOptionsListItem"),n.append(this.#Ao.content.cloneNode(!0)),this.#ln.append(n),n.querySelector(".selectOptionsListItem__remove").addEventListener("click",(()=>{n.remove(),this.#ln.childElementCount||this.#Mo()}));const o=n.querySelector(".selectOptionsListItem__key");o.addEventListener("keydown",(e=>{"Enter"===e.key&&(e.preventDefault(),this.#Mo(void 0,!0))})),o.value=e?e.key:"";const a=n.querySelector(".selectOptionsListItem__value");a.addEventListener("keydown",(e=>{"Enter"===e.key&&(e.preventDefault(),this.#Mo(void 0,!0))}));const s=e&&!Object.hasOwn(e.value,0);(0,r.init)((0,i.identify)(a),s?e.value:{},this.#Co,!1),s||(a.value=e?.value[0]??""),t&&o.focus()}#xo(){new a.default(this.#ln,{direction:"vertical",animation:150,fallbackOnBody:!0,draggable:"li",handle:".selectOptionsListItem__handle"})}#ko(e){const t=[];this.#ln.querySelectorAll(".selectOptionsListItem").forEach((e=>{const n=e.querySelector(".selectOptionsListItem__key").value,i=e.querySelector(".selectOptionsListItem__value");t.push({key:n,value:Object.fromEntries((0,r.getValues)(i.id))})})),e.value=JSON.stringify(t)}}})),define("WoltLabSuite/Core/Form/Builder/Field/SimpleAcl",["require","exports","tslib","./Field","WoltLabSuite/Core/Dom/Util"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i);class r extends i.default{_getData(){const e=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[group][]"]`)).map((e=>e.value)),t=Array.from(document.querySelectorAll(`input[name="${(0,o.escapeAttributeSelector)(this._fieldId)}[user][]"]`)).map((e=>e.value));return{[this._fieldId]:{group:e,user:t}}}_readField(){}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Tag",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/User",["require","exports","tslib","./Field","../../../Ui/ItemList"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e=o.getValues(this._fieldId).map((e=>e.value));return{[this._fieldId]:e.join(",")}}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/ValueI18n",["require","exports","tslib","./Field","../../../Language/Input"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_getData(){const e={}
1,t=o.getValues(this._fieldId);return t.size>1?(Object.prototype.hasOwnProperty.call(e,this._fieldId+"_i18n")||(e[this._fieldId+"_i18n"]={}),t.forEach(((t,n)=>{e[this._fieldId+"_i18n"][n]=t}))):e[this._fieldId]=t.get(0),e}destroy(){o.unregister(this._fieldId)}}return r})),define("WoltLabSuite/Core/Ui/Object/Action/Toogle",["require","exports","./Toggle"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return n.setup}})})),define("WoltLabSuite/Core/Ui/User/Search/Input",["require","exports","tslib","../../../Core","../../Search/Input"],(function(e,t,n,i,o){"use strict";i=n.__importStar(i),o=n.__importDefault(o);class r extends o.default{constructor(e,t){const n=i.isPlainObject(t)&&!0===t.includeUserGroups;super(e,t=i.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:n?1:0}}}},t))}createListItem(e){const t=super.createListItem(e);t.dataset.type=e.type;const n=document.createElement("div");return n.className="box16",n.innerHTML="group"===e.type?'<fa-icon name="users" solid></fa-icon>':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Label",["require","exports","tslib","../../../../Core","../../../../Dom/Util","../../../../Language","../../../../Ui/Dropdown/Simple"],(function(e,t,n,i,o,r,a){"use strict";return i=n.__importStar(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a),class{_formFieldContainer;_input;_labelChooser;_options;constructor(e,t,n){this._formFieldContainer=document.getElementById(e+"Container"),this._labelChooser=this._formFieldContainer.getElementsByClassName("labelChooser")[0],this._options=i.extend({forceSelection:!1,showWithoutSelection:!1},n),this._input=document.createElement("input"),this._input.type="hidden",this._input.id=e,this._input.name=e,this._input.value=t,this._formFieldContainer.appendChild(this._input);const s=o.identify(this._labelChooser);let l=a.default.getDropdownMenu(s);null===l&&(a.default.init(this._labelChooser.getElementsByClassName("dropdownToggle")[0]),l=a.default.getDropdownMenu(s));let c=null;if(this._options.showWithoutSelection||!this._options.forceSelection){c=document.createElement("ul"),l.appendChild(c);const e=document.createElement("li");e.classList.add("dropdownDivider"),c.appendChild(e)}if(this._options.showWithoutSelection){const e=document.createElement("li");e.dataset.labelId="-1",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const n=document.createElement("span");n.classList.add("badge","label"),n.innerHTML=r.get("wcf.label.withoutSelection"),t.appendChild(n)}if(!this._options.forceSelection){const e=document.createElement("li");e.dataset.labelId="0",this._blockScroll(e),c.appendChild(e);const t=document.createElement("span");e.appendChild(t);const n=document.createElement("span");n.classList.add("badge","label"),n.innerHTML=r.get("wcf.label.none"),t.appendChild(n)}l.querySelectorAll("li:not(.dropdownDivider)").forEach((e=>{e.addEventListener("click",(e=>this._click(e))),t&&e.dataset.labelId===t&&this._selectLabel(e)}))}_blockScroll(e){e.addEventListener("wheel",(e=>e.preventDefault()),{passive:!1})}_click(e){e.preventDefault(),this._selectLabel(e.currentTarget)}_selectLabel(e){let t=e.dataset.labelId;t||(t="0");const n=e.querySelector("span > span"),i=this._labelChooser.querySelector(".dropdownToggle > span");i.className=n.className,i.textContent=n.textContent,this._input.value=t}}})),define("WoltLabSuite/Core/Form/Builder/Field/Controller/Rating",["require","exports","tslib","../../../../Environment"],(function(e,t,n,i){"use strict";return i=n.__importStar(i),class{_field;_input;_ratingElements;constructor(e,t){if(this._field=document.getElementById(e+"Container"),null===this._field)throw new Error("Unknown field with id '"+e+"'");this._input=document.createElement("input"),this._input.id=e,this._input.name=e,this._input.type="hidden",this._input.value=t,this._field.appendChild(this._input),this._ratingElements=new Map;const n=this._field.querySelector(".ratingList");n.addEventListener("mouseleave",(()=>this._restoreRating())),n.querySelectorAll("li").forEach((e=>{e.classList.contains("ratingMetaButton")?(e.addEventListener("click",(e=>this._metaButtonClick(e))),e.addEventListener("mouseenter",(()=>this._restoreRating()))):(this._ratingElements.set(e.dataset.rating,e),e.addEventListener("click",(e=>this._listItemClick(e))),e.addEventListener("mouseenter",(e=>this._listItemMouseEnter(e))),e.addEventListener("mouseleave",(()=>this._listItemMouseLeave())))}))}_listItemClick(e){const t=e.currentTarget;this._input.value=t.dataset.rating,"desktop"!==i.platform()&&this._restoreRating()}_listItemMouseEnter(e){const t=e.currentTarget.dataset.rating;
1this._ratingElements.forEach(((e,n)=>{const i=e.querySelector("fa-icon");this._toggleIcon(i,~~n<=~~t)}))}_listItemMouseLeave(){this._ratingElements.forEach((e=>{const t=e.querySelector("fa-icon");this._toggleIcon(t,!1)}))}_metaButtonClick(e){"removeRating"===e.currentTarget.dataset.action&&(this._input.value="",this._listItemMouseLeave())}_restoreRating(){this._ratingElements.forEach(((e,t)=>{const n=e.querySelector("fa-icon");this._toggleIcon(n,~~t<=~~this._input.value)}))}_toggleIcon(e,t=!1){t?e.setIcon("star",!0):e.setIcon("star")}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract",["require","exports","tslib","WoltLabSuite/Core/Dom/Util","./Manager"],(function(e,t,n,i,o){"use strict";return o=n.__importStar(o),class{_dependentElement;_field;_fields;_noField;constructor(e,t){this.init(e,t)}checkDependency(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Abstract.checkDependency!")}getDependentNode(){return this._dependentElement}getField(){return this._field}getFields(){return this._fields}init(e,t){if(this._dependentElement=document.getElementById(e),null===this._dependentElement)throw new Error("Unknown dependent element with container id '"+e+"Container'.");if(this._field=document.getElementById(t),null===this._field){if(this._fields=[],document.querySelectorAll(`input[type=radio][name="${(0,i.escapeAttributeSelector)(t)}"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length&&(document.querySelectorAll(`input[type=checkbox][name="${(0,i.escapeAttributeSelector)(t)}[]"]`).forEach((e=>{this._fields.push(e)})),!this._fields.length))throw new Error("Unknown field with id '"+t+"'.")}else if(this._fields=[this._field],"INPUT"===this._field.nodeName&&"radio"===this._field.type&&""!==this._field.dataset.noInputId){if(this._noField=document.getElementById(this._field.dataset.noInputId),null===this._noField)throw new Error("Cannot find 'no' input field for input field '"+t+"'");this._fields.push(this._noField)}o.addDependency(this)}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Empty",["require","exports","tslib","./Abstract"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return!e.checked;case"radio":return!(!this._noField||!this._noField.checked)||!e.checked;default:{const t=e.closest(".inputItemList");return null!==t?null===t.querySelector("li.item"):0===e.value.trim().length}}}case"SELECT":{const e=this._field;return e.multiple?0===this._field.querySelectorAll("option:checked").length:"0"==e.value||0===e.value.length}case"TEXTAREA":return 0===this._field.value.trim().length}return this._fields.every((e=>!e.checked))}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/IsNotClicked",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsNotClicked=void 0,i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{constructor(e,t){super(e,t),this._field.addEventListener("click",(()=>{this._field.dataset.isClicked="1",o.checkDependencies()}))}checkDependency(){return"1"!==this._field.dataset.isClicked}}t.IsNotClicked=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/NonEmpty",["require","exports","tslib","./Abstract"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{checkDependency(){if(null!==this._field)switch(this._field.tagName){case"INPUT":{const e=this._field;switch(e.type){case"checkbox":return e.checked;case"radio":return(!this._noField||!this._noField.checked)&&e.checked;default:{const t=e.closest(".inputItemList");return null!==t?null!==t.querySelector("li.item"):0!==e.value.trim().length}}}case"SELECT":{const e=this._field;return e.multiple?0!==e.querySelectorAll("option:checked").length:"0"!=e.value&&0!==e.value.length}case"TEXTAREA":return 0!==this._field.value.trim().length}return this._fields.some((e=>e.checked))}}return o}
1)),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Value",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_isNegated=!1;_values;checkDependency(){if(!this._values)throw new Error("Values have not been set.");const e=[];if(this._field){if(o.isHiddenByDependencies(this._field))return!1;e.push(this._field.value)}else{let t=!0;if(this._fields.forEach((n=>{if(n.checked){if(o.isHiddenByDependencies(n))return t=!1,!1;e.push(n.value)}})),!t)return!1}let t=!1;return this._values.forEach((n=>{e.forEach((e=>{n==e&&(t=!0)}))})),t?!this._isNegated:this._isNegated}negate(e){return this._isNegated=e,this}values(e){return this._values=e,this}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/ValueInterval",["require","exports","tslib","./Abstract","./Manager"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueInterval=void 0,i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{_maximum=null;_minimum=null;checkDependency(){if(this._field){if(o.isHiddenByDependencies(this._field))return!1;const e=parseFloat(this._field.value);return!(isNaN(e)||null!==this._minimum&&this._minimum>e||null!==this._maximum&&this._maximum<e)}throw new Error("'ValueInterval' is only supported for individual fields.")}maximum(e){return this._maximum=e,this}minimum(e){return this._minimum=e,this}}t.ValueInterval=r,t.default=r})),define("WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage",["require","exports","tslib","../Value","../../../../Language/Chooser"],(function(e,t,n,i,o){"use strict";i=n.__importDefault(i),o=n.__importStar(o);class r extends i.default{destroy(){o.removeChooser(this._fieldId)}}return r})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment",["require","exports","tslib","../Value"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{constructor(e){super(e+"_tmpHash")}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Poll",["require","exports","tslib","../Field"],(function(e,t,n,i){"use strict";i=n.__importDefault(i);class o extends i.default{_pollEditor;_getData(){return this._pollEditor.getData()}_readField(){}setPollEditor(e){this._pollEditor=e}}return o})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Abstract",["require","exports","tslib","../Manager"],(function(e,t,n,i){"use strict";return i=n.__importStar(i),class{_container;constructor(e){this.init(e)}checkContainer(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Dependency/Container.checkContainer!")}init(e){if("string"!=typeof e)throw new TypeError("Container id has to be a string.");if(this._container=document.getElementById(e),null===this._container)throw new Error("Unknown container with id '"+e+"'.");i.addContainerCheckCallback((()=>this.checkContainer()))}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Default",["require","exports","tslib","./Abstract","../../../../../Core","../Manager","../../../../../Dom/Util"],(function(e,t,n,i,o,r,a){"use strict";i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importDefault(a);class s extends i.default{checkContainer(){if(o.stringToBool(this._container.dataset.ignoreDependencies||""))return;if(r.isHiddenByDependencies(this._container))return;const e=!a.default.isHidden(this._container),t=Array.from(this._container.children).some(((e,t)=>(0!==t||"H2"!==e.tagName&&"HEADER"!==e.tagName)&&!a.default.isHidden(e)));e!==t&&(t?a.default.show(this._container):a.default.hide(this._container),r.checkContainers())}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,n,i,o,r,a){"use strict";i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a);class s extends i.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=Array.from(this._container.children).some((e=>!r.isHidden(e)));if(e!==t){const e=this._container.parentNode.parentNode.querySelector("#"+r.identify(this._container.parentNode)+" > nav > ul > li[data-name="+this._container.id+"]");if(null===e)throw new Error("Cannot find tab menu entry for tab '"+this._container.id+"'.");if(t)r.show(this._container),r.show(e);else{r.hide(this._container),r.hide(e);const t=a.getTabMenu(r.identify(e.closest(".tabMenuContainer")));t.getActiveTab()===e&&t.selectFirstVisible()}o.checkContainers()}}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/TabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util","../../../../../Ui/TabMenu"],(function(e,t,n,i,o,r,a){"use strict";i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r),a=n.__importStar(a);class s extends i.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!r.isHidden(this._container),t=this._container.parentNode.querySelectorAll("#"+r.identify(this._container)+" > nav > ul > li"),n=Array.from(t).some((e=>!r.isHidden(e)));e!==n&&(n?(r.show(this._container),a.getTabMenu(r.identify(this._container)).selectFirstVisible()):r.hide(this._container),o.checkContainers())}}return s})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/WysiwygTab",["require","exports","tslib","./Abstract","../Manager","WoltLabSuite/Core/Component/Message/MessageTabMenu"],(function(e,t,n,i,o,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.WysiwygTab=void 0,i=n.__importDefault(i),o=n.__importStar(o);class a extends i.default{#Po;#Do;constructor(e,t,n){super(e),this.#Po=t,this.#Do=n}checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!this._container.hidden,t=(0,r.getTabMenu)(this.#Do),n=!t.isHiddenTab(this.#Po)&&t.activeTabName===this.#Po;e!==n&&(n?t.showTab(this.#Po):t.hideTab(this.#Po),o.checkContainers())}}t.WysiwygTab=a})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/WysiwygTabMenu",["require","exports","tslib","./Abstract","../Manager","../../../../../Dom/Util"],(function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WysiwygTabMenu=void 0,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importStar(r);class a extends i.default{checkContainer(){if(o.isHiddenByDependencies(this._container))return;const e=!this._container.hidden,t=this._container.parentNode.querySelectorAll("#"+r.identify(this._container)+" > nav > ul > li"),n=Array.from(t).some((e=>!e.hidden));e!==n&&(this._container.hidden=!n,o.checkContainers())}}t.WysiwygTabMenu=a})),function(e){function t(){for(;i.length&&"function"==typeof i[0];)i.shift()()}var n=e.require,i=[],o=0;e.orgRequire=n,e.require=function(r,a,s){if(!Array.isArray(r))return n.apply(e,arguments);var l=new Promise((function(e,a){var s=o++;i.push(s),n(r,(function(){var n=arguments;i[i.indexOf(s)]=function(){e(n)},t()}),(function(e){i[i.indexOf(s)]=function(){a(e)},t()}))}));return a&&(l=l.then((function(t){return a.apply(e,t)}))),s&&l.catch(s),l},e.require.config=n.config}(window),define("require.linearExecution",(function(){})); 2//# sourceMappingURL=../proxy_sourcemap.php?W9-hW_W2Wer2xzqhquR1mEd95B-PotBRwNhr2yw5sRbJbvAOrYkpVLv8GETBYe3KGtso1K9HRHXCuD980UDYe3u4wIMyPrY_-PZlnRXx7qWwEgrg3ap9Goa6DsNMXUXEsj9YVbDD1C6t1yiJZz9PRAEhHh5RkhZ1Hc8sQvES8ll2s5KwZFKEtnvVS1K-FiQEH5qbbmXeclS1vHYMHaBscKLpRmmYfLRocmPhITIbhbqqeWFc7uVrk0K9yLS27UzEBp0ZT6is4Jd8MozjBNWbKl_kFHpwJX_L4k1keP7v-Qy-0J7tYRk45nVBShSNYGRk9eCHtYtG5U53MxRmkpMUTw/WCF/0edc9ae141e41d188e1d5143bb83a0bce0e2250aebeb90fa1061cd8fabdde744
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.