(()=>{"use strict";vart={d:(e,n)=>{for(varrinn)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{actions:()=>P,addAction:()=>A,addFilter:()=>m,applyFilters:()=>w,applyFiltersAsync:()=>I,createHooks:()=>h,currentAction:()=>x,currentFilter:()=>T,defaultHooks:()=>f,didAction:()=>j,didFilter:()=>z,doAction:()=>g,doActionAsync:()=>k,doingAction:()=>O,doingFilter:()=>S,filters:()=>Z,hasAction:()=>_,hasFilter:()=>v,removeAction:()=>p,removeAllActions:()=>F,removeAllFilters:()=>b,removeFilter:()=>y});constn=function(t){return"string"!=typeoft||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};constr=function(t){return"string"!=typeoft||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};consto=function(t,e){returnfunction(o,i,s,c=10){constl=t[e];if(!r(o))return;if(!n(i))return;if("function"!=typeofs)returnvoidconsole.error("The hook callback must be a function.");if("number"!=typeofc)returnvoidconsole.error("If specified, the hook priority must be a number.");consta={callback:s,priority:c,namespace:i};if(l[o]){constt=l[o].handlers;lete;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),l.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex++}))}elsel[o]={handlers:[a],runs:0};"hookAdded"!==o&&t.doAction("hookAdded",o,i,s,c)}};consti=function(t,e,o=!1){returnfunction(i,s){constc=t[e];if(!r(i))return;if(!o&&!n(s))return;if(!c[i])return0;letl=0;if(o)l=c[i].handlers.length,c[i]={runs:c[i].runs,handlers:[]};else{constt=c[i].handlers;for(lete=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===i&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==i&&t.doAction("hookRemoved",i,s),l}};consts=function(t,e){returnfunction(n,r){consto=t[e];returnvoid0!==r?nino&&o[n].handlers.some((t=>t.namespace===r)):nino}};constc=function(t,e,n,r){returnfunction(o,...i){consts=t[e];s[o]||(s[o]={handlers:[],runs:0}),s[o].runs++;constc=s[o].handlers;if(!c||!c.length)returnn?i[0]:void0;constl={name:o,currentIndex:0};return(r?asyncfunction(){try{s.__current.add(l);lett=n?i[0]:void0;for(;l.currentIndex<c.length;){conste=c[l.currentIndex];t=awaite.callback.apply(null,i),n&&(i[0]=t),l.currentIndex++}returnn?t:void0}finally{s.__current.delete(l)}}:function(){try{s.__current.add(l);lett=n?i[0]:void0;for(;l.currentIndex<c.length;){t=c[l.currentIndex].callback.apply(null,i),n&&(i[0]=t),l.currentIndex++}returnn?t:void0}finally{s.__current.delete(l)}})()}};constl=function(t,e){returnfunction(){varn;constr=t[e],o=Array.from(r.__current);returnnull!==(n=o.at(-1)?.name)&&void0!==n?n:null}};consta=function(t,e){returnfunction(n){constr=t[e];returnvoid0===n?r.__current.size>0:Array.from(r.__current).some((t=>t.name===n))}};constu=function(t,e){returnfunction(n){consto=t[e];if(r(n))returno[n]&&o[n].runs?o[n].runs:0}};classd{constructor(){this.actions=Object.create(null),this.actions.__current=newSet,this.filters=Object.create(null),this.filters.__current=newSet,this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=i(this,"actions",!0),this.removeAllFilters=i(this,"filters",!0),this.doAction=c(this,"actions",!1,!1),this.doActionAsync=c(this,"actions",!1,!0),this.applyFilters