@bool-ts/core 2.3.7 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var IE=Object.create;var{getPrototypeOf:mE,defineProperty:E_,getOwnPropertyNames:PE}=Object;var bE=Object.prototype.hasOwnProperty;function kE(C){return this[C]}var vE,sE,$C=(C,T,_)=>{var f=C!=null&&typeof C==="object";if(f){var c=T?vE??=new WeakMap:sE??=new WeakMap,E=c.get(C);if(E)return E}_=C!=null?IE(mE(C)):{};let A=T||!C||!C.__esModule?E_(_,"default",{value:C,enumerable:!0}):_;for(let u of PE(C))if(!bE.call(A,u))E_(A,u,{get:kE.bind(C,u),enumerable:!0});if(f)c.set(C,A);return A};var G=(C,T)=>()=>(T||C((T={exports:{}}).exports,T),T.exports);var tE=(C)=>C;function dE(C,T){this[C]=tE.bind(null,T)}var p_=(C,T)=>{for(var _ in T)E_(C,_,{get:T[_],enumerable:!0,configurable:!0,set:dE.bind(T,_)})};var jE=import.meta.require;var hC=G(()=>{/*! *****************************************************************************
|
|
3
3
|
Copyright (C) Microsoft. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
5
5
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -12,9 +12,9 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
12
12
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
|
-
***************************************************************************** */var ef;(function(_){(function(T){var f=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:u(),C=E(_);if(typeof f.Reflect<"u")C=E(f.Reflect,C);if(T(C,f),typeof f.Reflect>"u")f.Reflect=_;function E(S,U){return function(z,q){if(Object.defineProperty(S,z,{configurable:!0,writable:!0,value:q}),U)U(z,q)}}function A(){try{return Function("return this;")()}catch(S){}}function c(){try{return(0,eval)("(function() { return this; })()")}catch(S){}}function u(){return A()||c()}})(function(T,f){var C=Object.prototype.hasOwnProperty,E=typeof Symbol==="function",A=E&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",c=E&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",u=typeof Object.create==="function",S={__proto__:[]}instanceof Array,U=!u&&!S,z={create:u?function(){return Ef(Object.create(null))}:S?function(){return Ef({__proto__:null})}:function(){return Ef({})},has:U?function(R,H){return C.call(R,H)}:function(R,H){return H in R},get:U?function(R,H){return C.call(R,H)?R[H]:void 0}:function(R,H){return R[H]}},q=Object.getPrototypeOf(Function),x=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:gA(),Q=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:nA(),Y=typeof WeakMap==="function"?WeakMap:OA(),W=E?Symbol.for("@reflect-metadata:registry"):void 0,P=BA(),L=VA(P);function r(R,H,F,w){if(!O(F)){if(!sf(R))throw TypeError();if(!l(H))throw TypeError();if(!l(w)&&!O(w)&&!yT(w))throw TypeError();if(yT(w))w=void 0;return F=ST(F),d(R,H,F,w)}else{if(!sf(R))throw TypeError();if(!tf(H))throw TypeError();return s(R,H)}}T("decorate",r);function n(R,H){function F(w,B){if(!l(w))throw TypeError();if(!O(B)&&!NA(B))throw TypeError();O_(R,H,w,B)}return F}T("metadata",n);function j(R,H,F,w){if(!l(F))throw TypeError();if(!O(w))w=ST(w);return O_(R,H,F,w)}T("defineMetadata",j);function $(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return ET(R,H,F)}T("hasMetadata",$);function b(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return fT(R,H,F)}T("hasOwnMetadata",b);function k(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return GT(R,H,F)}T("getMetadata",k);function G(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return dT(R,H,F)}T("getOwnMetadata",G);function M(R,H){if(!l(R))throw TypeError();if(!O(H))H=ST(H);return u_(R,H)}T("getMetadataKeys",M);function N(R,H){if(!l(R))throw TypeError();if(!O(H))H=ST(H);return lT(R,H)}T("getOwnMetadataKeys",N);function V(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);if(!l(H))throw TypeError();if(!O(F))F=ST(F);var w=H_(H,F,!1);if(O(w))return!1;return w.OrdinaryDeleteMetadata(R,H,F)}T("deleteMetadata",V);function s(R,H){for(var F=R.length-1;F>=0;--F){var w=R[F],B=w(H);if(!O(B)&&!yT(B)){if(!tf(B))throw TypeError();H=B}}return H}function d(R,H,F,w){for(var B=R.length-1;B>=0;--B){var y=R[B],o=y(H,F,w);if(!O(o)&&!yT(o)){if(!l(o))throw TypeError();w=o}}return w}function ET(R,H,F){var w=fT(R,H,F);if(w)return!0;var B=Cf(H);if(!yT(B))return ET(R,B,F);return!1}function fT(R,H,F){var w=H_(H,F,!1);if(O(w))return!1;return vf(w.OrdinaryHasOwnMetadata(R,H,F))}function GT(R,H,F){var w=fT(R,H,F);if(w)return dT(R,H,F);var B=Cf(H);if(!yT(B))return GT(R,B,F);return}function dT(R,H,F){var w=H_(H,F,!1);if(O(w))return;return w.OrdinaryGetOwnMetadata(R,H,F)}function O_(R,H,F,w){var B=H_(F,w,!0);B.OrdinaryDefineOwnMetadata(R,H,F,w)}function u_(R,H){var F=lT(R,H),w=Cf(R);if(w===null)return F;var B=u_(w,H);if(B.length<=0)return F;if(F.length<=0)return B;var y=new Q,o=[];for(var h=0,D=F;h<D.length;h++){var X=D[h],J=y.has(X);if(!J)y.add(X),o.push(X)}for(var Z=0,m=B;Z<m.length;Z++){var X=m[Z],J=y.has(X);if(!J)y.add(X),o.push(X)}return o}function lT(R,H){var F=H_(R,H,!1);if(!F)return[];return F.OrdinaryOwnMetadataKeys(R,H)}function kf(R){if(R===null)return 1;switch(typeof R){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return R===null?1:6;default:return 6}}function O(R){return R===void 0}function yT(R){return R===null}function DA(R){return typeof R==="symbol"}function l(R){return typeof R==="object"?R!==null:typeof R==="function"}function MA(R,H){switch(kf(R)){case 0:return R;case 1:return R;case 2:return R;case 3:return R;case 4:return R;case 5:return R}var F=H===3?"string":H===5?"number":"default",w=jf(R,A);if(w!==void 0){var B=w.call(R,F);if(l(B))throw TypeError();return B}return XA(R,F==="default"?"number":F)}function XA(R,H){if(H==="string"){var F=R.toString;if(iT(F)){var w=F.call(R);if(!l(w))return w}var B=R.valueOf;if(iT(B)){var w=B.call(R);if(!l(w))return w}}else{var B=R.valueOf;if(iT(B)){var w=B.call(R);if(!l(w))return w}var y=R.toString;if(iT(y)){var w=y.call(R);if(!l(w))return w}}throw TypeError()}function vf(R){return!!R}function JA(R){return""+R}function ST(R){var H=MA(R,3);if(DA(H))return H;return JA(H)}function sf(R){return Array.isArray?Array.isArray(R):R instanceof Object?R instanceof Array:Object.prototype.toString.call(R)==="[object Array]"}function iT(R){return typeof R==="function"}function tf(R){return typeof R==="function"}function NA(R){switch(kf(R)){case 3:return!0;case 4:return!0;default:return!1}}function ff(R,H){return R===H||R!==R&&H!==H}function jf(R,H){var F=R[H];if(F===void 0||F===null)return;if(!iT(F))throw TypeError();return F}function df(R){var H=jf(R,c);if(!iT(H))throw TypeError();var F=H.call(R);if(!l(F))throw TypeError();return F}function lf(R){return R.value}function yf(R){var H=R.next();return H.done?!1:H}function rf(R){var H=R.return;if(H)H.call(R)}function Cf(R){var H=Object.getPrototypeOf(R);if(typeof R!=="function"||R===q)return H;if(H!==q)return H;var F=R.prototype,w=F&&Object.getPrototypeOf(F);if(w==null||w===Object.prototype)return H;var B=w.constructor;if(typeof B!=="function")return H;if(B===R)return H;return B}function ZA(){var R;if(!O(W)&&typeof f.Reflect<"u"&&!(W in f.Reflect)&&typeof f.Reflect.defineMetadata==="function")R=GA(f.Reflect);var H,F,w,B=new Y,y={registerProvider:o,getProvider:D,setProvider:J};return y;function o(Z){if(!Object.isExtensible(y))throw Error("Cannot add provider to a frozen registry.");switch(!0){case R===Z:break;case O(H):H=Z;break;case H===Z:break;case O(F):F=Z;break;case F===Z:break;default:if(w===void 0)w=new Q;w.add(Z);break}}function h(Z,m){if(!O(H)){if(H.isProviderFor(Z,m))return H;if(!O(F)){if(F.isProviderFor(Z,m))return H;if(!O(w)){var v=df(w);while(!0){var i=yf(v);if(!i)return;var AT=lf(i);if(AT.isProviderFor(Z,m))return rf(v),AT}}}}if(!O(R)&&R.isProviderFor(Z,m))return R;return}function D(Z,m){var v=B.get(Z),i;if(!O(v))i=v.get(m);if(!O(i))return i;if(i=h(Z,m),!O(i)){if(O(v))v=new x,B.set(Z,v);v.set(m,i)}return i}function X(Z){if(O(Z))throw TypeError();return H===Z||F===Z||!O(w)&&w.has(Z)}function J(Z,m,v){if(!X(v))throw Error("Metadata provider not registered.");var i=D(Z,m);if(i!==v){if(!O(i))return!1;var AT=B.get(Z);if(O(AT))AT=new x,B.set(Z,AT);AT.set(m,v)}return!0}}function BA(){var R;if(!O(W)&&l(f.Reflect)&&Object.isExtensible(f.Reflect))R=f.Reflect[W];if(O(R))R=ZA();if(!O(W)&&l(f.Reflect)&&Object.isExtensible(f.Reflect))Object.defineProperty(f.Reflect,W,{enumerable:!1,configurable:!1,writable:!1,value:R});return R}function VA(R){var H=new Y,F={isProviderFor:function(X,J){var Z=H.get(X);if(O(Z))return!1;return Z.has(J)},OrdinaryDefineOwnMetadata:o,OrdinaryHasOwnMetadata:B,OrdinaryGetOwnMetadata:y,OrdinaryOwnMetadataKeys:h,OrdinaryDeleteMetadata:D};return P.registerProvider(F),F;function w(X,J,Z){var m=H.get(X),v=!1;if(O(m)){if(!Z)return;m=new x,H.set(X,m),v=!0}var i=m.get(J);if(O(i)){if(!Z)return;if(i=new x,m.set(J,i),!R.setProvider(X,J,F)){if(m.delete(J),v)H.delete(X);throw Error("Wrong provider for target.")}}return i}function B(X,J,Z){var m=w(J,Z,!1);if(O(m))return!1;return vf(m.has(X))}function y(X,J,Z){var m=w(J,Z,!1);if(O(m))return;return m.get(X)}function o(X,J,Z,m){var v=w(Z,m,!0);v.set(X,J)}function h(X,J){var Z=[],m=w(X,J,!1);if(O(m))return Z;var v=m.keys(),i=df(v),AT=0;while(!0){var pf=yf(i);if(!pf)return Z.length=AT,Z;var $A=lf(pf);try{Z[AT]=$A}catch(hA){try{rf(i)}finally{throw hA}}AT++}}function D(X,J,Z){var m=w(J,Z,!1);if(O(m))return!1;if(!m.delete(X))return!1;if(m.size===0){var v=H.get(J);if(!O(v)){if(v.delete(Z),v.size===0)H.delete(v)}}return!0}}function GA(R){var{defineMetadata:H,hasOwnMetadata:F,getOwnMetadata:w,getOwnMetadataKeys:B,deleteMetadata:y}=R,o=new Y,h={isProviderFor:function(D,X){var J=o.get(D);if(!O(J)&&J.has(X))return!0;if(B(D,X).length){if(O(J))J=new Q,o.set(D,J);return J.add(X),!0}return!1},OrdinaryDefineOwnMetadata:H,OrdinaryHasOwnMetadata:F,OrdinaryGetOwnMetadata:w,OrdinaryOwnMetadataKeys:B,OrdinaryDeleteMetadata:y};return h}function H_(R,H,F){var w=P.getProvider(R,H);if(!O(w))return w;if(F){if(P.setProvider(R,H,L))return L;throw Error("Illegal state.")}return}function gA(){var R={},H=[],F=function(){function h(D,X,J){this._index=0,this._keys=D,this._values=X,this._selector=J}return h.prototype["@@iterator"]=function(){return this},h.prototype[c]=function(){return this},h.prototype.next=function(){var D=this._index;if(D>=0&&D<this._keys.length){var X=this._selector(this._keys[D],this._values[D]);if(D+1>=this._keys.length)this._index=-1,this._keys=H,this._values=H;else this._index++;return{value:X,done:!1}}return{value:void 0,done:!0}},h.prototype.throw=function(D){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;throw D},h.prototype.return=function(D){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;return{value:D,done:!0}},h}(),w=function(){function h(){this._keys=[],this._values=[],this._cacheKey=R,this._cacheIndex=-2}return Object.defineProperty(h.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),h.prototype.has=function(D){return this._find(D,!1)>=0},h.prototype.get=function(D){var X=this._find(D,!1);return X>=0?this._values[X]:void 0},h.prototype.set=function(D,X){var J=this._find(D,!0);return this._values[J]=X,this},h.prototype.delete=function(D){var X=this._find(D,!1);if(X>=0){var J=this._keys.length;for(var Z=X+1;Z<J;Z++)this._keys[Z-1]=this._keys[Z],this._values[Z-1]=this._values[Z];if(this._keys.length--,this._values.length--,ff(D,this._cacheKey))this._cacheKey=R,this._cacheIndex=-2;return!0}return!1},h.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=R,this._cacheIndex=-2},h.prototype.keys=function(){return new F(this._keys,this._values,B)},h.prototype.values=function(){return new F(this._keys,this._values,y)},h.prototype.entries=function(){return new F(this._keys,this._values,o)},h.prototype["@@iterator"]=function(){return this.entries()},h.prototype[c]=function(){return this.entries()},h.prototype._find=function(D,X){if(!ff(this._cacheKey,D)){this._cacheIndex=-1;for(var J=0;J<this._keys.length;J++)if(ff(this._keys[J],D)){this._cacheIndex=J;break}}if(this._cacheIndex<0&&X)this._cacheIndex=this._keys.length,this._keys.push(D),this._values.push(void 0);return this._cacheIndex},h}();return w;function B(h,D){return h}function y(h,D){return D}function o(h,D){return[h,D]}}function nA(){var R=function(){function H(){this._map=new x}return Object.defineProperty(H.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),H.prototype.has=function(F){return this._map.has(F)},H.prototype.add=function(F){return this._map.set(F,F),this},H.prototype.delete=function(F){return this._map.delete(F)},H.prototype.clear=function(){this._map.clear()},H.prototype.keys=function(){return this._map.keys()},H.prototype.values=function(){return this._map.keys()},H.prototype.entries=function(){return this._map.entries()},H.prototype["@@iterator"]=function(){return this.keys()},H.prototype[c]=function(){return this.keys()},H}();return R}function OA(){var R=16,H=z.create(),F=w();return function(){function D(){this._key=w()}return D.prototype.has=function(X){var J=B(X,!1);return J!==void 0?z.has(J,this._key):!1},D.prototype.get=function(X){var J=B(X,!1);return J!==void 0?z.get(J,this._key):void 0},D.prototype.set=function(X,J){var Z=B(X,!0);return Z[this._key]=J,this},D.prototype.delete=function(X){var J=B(X,!1);return J!==void 0?delete J[this._key]:!1},D.prototype.clear=function(){this._key=w()},D}();function w(){var D;do D="@@WeakMap@@"+h();while(z.has(H,D));return H[D]=!0,D}function B(D,X){if(!C.call(D,F)){if(!X)return;Object.defineProperty(D,F,{value:z.create()})}return D[F]}function y(D,X){for(var J=0;J<X;++J)D[J]=Math.random()*255|0;return D}function o(D){if(typeof Uint8Array==="function"){var X=new Uint8Array(D);if(typeof crypto<"u")crypto.getRandomValues(X);else if(typeof msCrypto<"u")msCrypto.getRandomValues(X);else y(X,D);return X}return y(Array(D),D)}function h(){var D=o(R);D[6]=D[6]&79|64,D[8]=D[8]&191|128;var X="";for(var J=0;J<R;++J){var Z=D[J];if(J===4||J===6||J===8)X+="-";if(Z<16)X+="0";X+=Z.toString(16).toLowerCase()}return X}}function Ef(R){return R.__=void 0,delete R.__,R}})})(ef||(ef={}))});var kT=g((l0,cC)=>{cC.exports=TypeError});var xC=g((y0,RC)=>{RC.exports=jA("util").inspect});var w_=g((i0,VC)=>{var qf=typeof Map==="function"&&Map.prototype,cf=Object.getOwnPropertyDescriptor&&qf?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,P_=qf&&cf&&typeof cf.get==="function"?cf.get:null,SC=qf&&Map.prototype.forEach,Uf=typeof Set==="function"&&Set.prototype,Rf=Object.getOwnPropertyDescriptor&&Uf?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,b_=Uf&&Rf&&typeof Rf.get==="function"?Rf.get:null,uC=Uf&&Set.prototype.forEach,Zc=typeof WeakMap==="function"&&WeakMap.prototype,U_=Zc?WeakMap.prototype.has:null,Bc=typeof WeakSet==="function"&&WeakSet.prototype,W_=Bc?WeakSet.prototype.has:null,Vc=typeof WeakRef==="function"&&WeakRef.prototype,HC=Vc?WeakRef.prototype.deref:null,Gc=Boolean.prototype.valueOf,gc=Object.prototype.toString,nc=Function.prototype.toString,Oc=String.prototype.match,Wf=String.prototype.slice,hT=String.prototype.replace,$c=String.prototype.toUpperCase,LC=String.prototype.toLowerCase,DC=RegExp.prototype.test,zC=Array.prototype.concat,WT=Array.prototype.join,hc=Array.prototype.slice,FC=Math.floor,uf=typeof BigInt==="function"?BigInt.prototype.valueOf:null,xf=Object.getOwnPropertySymbols,Hf=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,__=typeof Symbol==="function"&&typeof Symbol.iterator==="object",Y_=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===__?"object":"symbol")?Symbol.toStringTag:null,MC=Object.prototype.propertyIsEnumerable,qC=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_){return _.__proto__}:null);function UC(_,T){if(_===1/0||_===-1/0||_!==_||_&&_>-1000&&_<1000||DC.call(/e/,T))return T;var f=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _==="number"){var C=_<0?-FC(-_):FC(_);if(C!==_){var E=String(C),A=Wf.call(T,E.length+1);return hT.call(E,f,"$&_")+"."+hT.call(hT.call(A,/([0-9]{3})/g,"$&_"),/_$/,"")}}return hT.call(T,f,"$&_")}var Lf=xC(),WC=Lf.custom,YC=NC(WC)?WC:null,XC={__proto__:null,double:'"',single:"'"},Kc={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};VC.exports=function _(T,f,C,E){var A=f||{};if(ZT(A,"quoteStyle")&&!ZT(XC,A.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(ZT(A,"maxStringLength")&&(typeof A.maxStringLength==="number"?A.maxStringLength<0&&A.maxStringLength!==1/0:A.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=ZT(A,"customInspect")?A.customInspect:!0;if(typeof c!=="boolean"&&c!=="symbol")throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ZT(A,"indent")&&A.indent!==null&&A.indent!=="\t"&&!(parseInt(A.indent,10)===A.indent&&A.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ZT(A,"numericSeparator")&&typeof A.numericSeparator!=="boolean")throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=A.numericSeparator;if(typeof T>"u")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return BC(T,A);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var S=String(T);return u?UC(T,S):S}if(typeof T==="bigint"){var U=String(T)+"n";return u?UC(T,U):U}var z=typeof A.depth>"u"?5:A.depth;if(typeof C>"u")C=0;if(C>=z&&z>0&&typeof T==="object")return zf(T)?"[Array]":"[Object]";var q=ac(A,C);if(typeof E>"u")E=[];else if(ZC(E,T)>=0)return"[Circular]";function x(d,ET,fT){if(ET)E=hc.call(E),E.push(ET);if(fT){var GT={depth:A.depth};if(ZT(A,"quoteStyle"))GT.quoteStyle=A.quoteStyle;return _(d,GT,C+1,E)}return _(d,A,C+1,E)}if(typeof T==="function"&&!wC(T)){var Q=jc(T),Y=m_(T,x);return"[Function"+(Q?": "+Q:" (anonymous)")+"]"+(Y.length>0?" { "+WT.call(Y,", ")+" }":"")}if(NC(T)){var W=__?hT.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):Hf.call(T);return typeof T==="object"&&!__?q_(W):W}if(pc(T)){var P="<"+LC.call(String(T.nodeName)),L=T.attributes||[];for(var r=0;r<L.length;r++)P+=" "+L[r].name+"="+JC(Ic(L[r].value),"double",A);if(P+=">",T.childNodes&&T.childNodes.length)P+="...";return P+="</"+LC.call(String(T.nodeName))+">",P}if(zf(T)){if(T.length===0)return"[]";var n=m_(T,x);if(q&&!ec(n))return"["+Ff(n,q)+"]";return"[ "+WT.call(n,", ")+" ]"}if(Pc(T)){var j=m_(T,x);if(!("cause"in Error.prototype)&&"cause"in T&&!MC.call(T,"cause"))return"{ ["+String(T)+"] "+WT.call(zC.call("[cause]: "+x(T.cause),j),", ")+" }";if(j.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+WT.call(j,", ")+" }"}if(typeof T==="object"&&c){if(YC&&typeof T[YC]==="function"&&Lf)return Lf(T,{depth:z-C});else if(c!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if(dc(T)){var $=[];if(SC)SC.call(T,function(d,ET){$.push(x(ET,T,!0)+" => "+x(d,T))});return QC("Map",P_.call(T),$,q)}if(ic(T)){var b=[];if(uC)uC.call(T,function(d){b.push(x(d,T))});return QC("Set",b_.call(T),b,q)}if(lc(T))return Sf("WeakMap");if(rc(T))return Sf("WeakSet");if(yc(T))return Sf("WeakRef");if(kc(T))return q_(x(Number(T)));if(sc(T))return q_(x(uf.call(T)));if(vc(T))return q_(Gc.call(T));if(bc(T))return q_(x(String(T)));if(typeof window<"u"&&T===window)return"{ [object Window] }";if(typeof globalThis<"u"&&T===globalThis||typeof global<"u"&&T===global)return"{ [object globalThis] }";if(!mc(T)&&!wC(T)){var k=m_(T,x),G=qC?qC(T)===Object.prototype:T instanceof Object||T.constructor===Object,M=T instanceof Object?"":"null prototype",N=!G&&Y_&&Object(T)===T&&Y_ in T?Wf.call(KT(T),8,-1):M?"Object":"",V=G||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",s=V+(N||M?"["+WT.call(zC.call([],N||[],M||[]),": ")+"] ":"");if(k.length===0)return s+"{}";if(q)return s+"{"+Ff(k,q)+"}";return s+"{ "+WT.call(k,", ")+" }"}return String(T)};function JC(_,T,f){var C=f.quoteStyle||T,E=XC[C];return E+_+E}function Ic(_){return hT.call(String(_),/"/g,""")}function vT(_){return!Y_||!(typeof _==="object"&&((Y_ in _)||typeof _[Y_]<"u"))}function zf(_){return KT(_)==="[object Array]"&&vT(_)}function mc(_){return KT(_)==="[object Date]"&&vT(_)}function wC(_){return KT(_)==="[object RegExp]"&&vT(_)}function Pc(_){return KT(_)==="[object Error]"&&vT(_)}function bc(_){return KT(_)==="[object String]"&&vT(_)}function kc(_){return KT(_)==="[object Number]"&&vT(_)}function vc(_){return KT(_)==="[object Boolean]"&&vT(_)}function NC(_){if(__)return _&&typeof _==="object"&&_ instanceof Symbol;if(typeof _==="symbol")return!0;if(!_||typeof _!=="object"||!Hf)return!1;try{return Hf.call(_),!0}catch(T){}return!1}function sc(_){if(!_||typeof _!=="object"||!uf)return!1;try{return uf.call(_),!0}catch(T){}return!1}var tc=Object.prototype.hasOwnProperty||function(_){return _ in this};function ZT(_,T){return tc.call(_,T)}function KT(_){return gc.call(_)}function jc(_){if(_.name)return _.name;var T=Oc.call(nc.call(_),/^function\s*([\w$]+)/);if(T)return T[1];return null}function ZC(_,T){if(_.indexOf)return _.indexOf(T);for(var f=0,C=_.length;f<C;f++)if(_[f]===T)return f;return-1}function dc(_){if(!P_||!_||typeof _!=="object")return!1;try{P_.call(_);try{b_.call(_)}catch(T){return!0}return _ instanceof Map}catch(T){}return!1}function lc(_){if(!U_||!_||typeof _!=="object")return!1;try{U_.call(_,U_);try{W_.call(_,W_)}catch(T){return!0}return _ instanceof WeakMap}catch(T){}return!1}function yc(_){if(!HC||!_||typeof _!=="object")return!1;try{return HC.call(_),!0}catch(T){}return!1}function ic(_){if(!b_||!_||typeof _!=="object")return!1;try{b_.call(_);try{P_.call(_)}catch(T){return!0}return _ instanceof Set}catch(T){}return!1}function rc(_){if(!W_||!_||typeof _!=="object")return!1;try{W_.call(_,W_);try{U_.call(_,U_)}catch(T){return!0}return _ instanceof WeakSet}catch(T){}return!1}function pc(_){if(!_||typeof _!=="object")return!1;if(typeof HTMLElement<"u"&&_ instanceof HTMLElement)return!0;return typeof _.nodeName==="string"&&typeof _.getAttribute==="function"}function BC(_,T){if(_.length>T.maxStringLength){var f=_.length-T.maxStringLength,C="... "+f+" more character"+(f>1?"s":"");return BC(Wf.call(_,0,T.maxStringLength),T)+C}var E=Kc[T.quoteStyle||"single"];E.lastIndex=0;var A=hT.call(hT.call(_,E,"\\$1"),/[\x00-\x1f]/g,oc);return JC(A,"single",T)}function oc(_){var T=_.charCodeAt(0),f={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(f)return"\\"+f;return"\\x"+(T<16?"0":"")+$c.call(T.toString(16))}function q_(_){return"Object("+_+")"}function Sf(_){return _+" { ? }"}function QC(_,T,f,C){var E=C?Ff(f,C):WT.call(f,", ");return _+" ("+T+") {"+E+"}"}function ec(_){for(var T=0;T<_.length;T++)if(ZC(_[T],`
|
|
16
|
-
`)>=0)return!1;return!0}function
|
|
17
|
-
`+T.prev+T.base;return
|
|
18
|
-
`+T.prev}function m_(_,T){var f=zf(_),C=[];if(f){C.length=_.length;for(var E=0;E<_.length;E++)C[E]=ZT(_,E)?T(_[E],_):""}var A=typeof xf==="function"?xf(_):[],c;if(__){c={};for(var u=0;u<A.length;u++)c["$"+A[u]]=A[u]}for(var S in _){if(!ZT(_,S))continue;if(f&&String(Number(S))===S&&S<_.length)continue;if(__&&c["$"+S]instanceof Symbol)continue;else if(DC.call(/[^\w$]/,S))C.push(T(S,_)+": "+T(_[S],_));else C.push(S+": "+T(_[S],_))}if(typeof xf==="function"){for(var U=0;U<A.length;U++)if(MC.call(_,A[U]))C.push("["+T(A[U])+"]: "+T(_[A[U]],_))}return C}});var gC=g((r0,GC)=>{var TR=w_(),_R=kT(),k_=function(_,T,f){var C=_,E;for(;(E=C.next)!=null;C=E)if(E.key===T){if(C.next=E.next,!f)E.next=_.next,_.next=E;return E}},fR=function(_,T){if(!_)return;var f=k_(_,T);return f&&f.value},CR=function(_,T,f){var C=k_(_,T);if(C)C.value=f;else _.next={key:T,next:_.next,value:f}},ER=function(_,T){if(!_)return!1;return!!k_(_,T)},AR=function(_,T){if(_)return k_(_,T,!0)};GC.exports=function(){var T,f={assert:function(C){if(!f.has(C))throw new _R("Side channel does not contain "+TR(C))},delete:function(C){var E=T&&T.next,A=AR(T,C);if(A&&E&&E===A)T=void 0;return!!A},get:function(C){return fR(T,C)},has:function(C){return ER(T,C)},set:function(C,E){if(!T)T={next:void 0};CR(T,C,E)}};return f}});var Yf=g((p0,nC)=>{nC.exports=Object});var $C=g((o0,OC)=>{OC.exports=Error});var KC=g((e0,hC)=>{hC.exports=EvalError});var mC=g((a0,IC)=>{IC.exports=RangeError});var bC=g((TS,PC)=>{PC.exports=ReferenceError});var vC=g((_S,kC)=>{kC.exports=SyntaxError});var tC=g((fS,sC)=>{sC.exports=URIError});var dC=g((CS,jC)=>{jC.exports=Math.abs});var yC=g((ES,lC)=>{lC.exports=Math.floor});var rC=g((AS,iC)=>{iC.exports=Math.max});var oC=g((cS,pC)=>{pC.exports=Math.min});var aC=g((RS,eC)=>{eC.exports=Math.pow});var _E=g((xS,TE)=>{TE.exports=Math.round});var CE=g((SS,fE)=>{fE.exports=Number.isNaN||function(T){return T!==T}});var AE=g((uS,EE)=>{var cR=CE();EE.exports=function(T){if(cR(T)||T===0)return T;return T<0?-1:1}});var RE=g((HS,cE)=>{cE.exports=Object.getOwnPropertyDescriptor});var wf=g((LS,xE)=>{var v_=RE();if(v_)try{v_([],"length")}catch(_){v_=null}xE.exports=v_});var uE=g((zS,SE)=>{var s_=Object.defineProperty||!1;if(s_)try{s_({},"a",{value:1})}catch(_){s_=!1}SE.exports=s_});var LE=g((FS,HE)=>{HE.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},f=Symbol("test"),C=Object(f);if(typeof f==="string")return!1;if(Object.prototype.toString.call(f)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(C)!=="[object Symbol]")return!1;var E=42;T[f]=E;for(var A in T)return!1;if(typeof Object.keys==="function"&&Object.keys(T).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(T).length!==0)return!1;var c=Object.getOwnPropertySymbols(T);if(c.length!==1||c[0]!==f)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,f))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var u=Object.getOwnPropertyDescriptor(T,f);if(u.value!==E||u.enumerable!==!0)return!1}return!0}});var qE=g((qS,FE)=>{var zE=typeof Symbol<"u"&&Symbol,RR=LE();FE.exports=function(){if(typeof zE!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof zE("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return RR()}});var Qf=g((US,UE)=>{UE.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Df=g((WS,WE)=>{var xR=Yf();WE.exports=xR.getPrototypeOf||null});var QE=g((YS,wE)=>{var SR="Function.prototype.bind called on incompatible ",uR=Object.prototype.toString,HR=Math.max,LR="[object Function]",YE=function(T,f){var C=[];for(var E=0;E<T.length;E+=1)C[E]=T[E];for(var A=0;A<f.length;A+=1)C[A+T.length]=f[A];return C},zR=function(T,f){var C=[];for(var E=f||0,A=0;E<T.length;E+=1,A+=1)C[A]=T[E];return C},FR=function(_,T){var f="";for(var C=0;C<_.length;C+=1)if(f+=_[C],C+1<_.length)f+=T;return f};wE.exports=function(T){var f=this;if(typeof f!=="function"||uR.apply(f)!==LR)throw TypeError(SR+f);var C=zR(arguments,1),E,A=function(){if(this instanceof E){var z=f.apply(this,YE(C,arguments));if(Object(z)===z)return z;return this}return f.apply(T,YE(C,arguments))},c=HR(0,f.length-C.length),u=[];for(var S=0;S<c;S++)u[S]="$"+S;if(E=Function("binder","return function ("+FR(u,",")+"){ return binder.apply(this,arguments); }")(A),f.prototype){var U=function(){};U.prototype=f.prototype,E.prototype=new U,U.prototype=null}return E}});var Q_=g((wS,DE)=>{var qR=QE();DE.exports=Function.prototype.bind||qR});var t_=g((QS,ME)=>{ME.exports=Function.prototype.call});var Mf=g((DS,XE)=>{XE.exports=Function.prototype.apply});var NE=g((MS,JE)=>{JE.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var BE=g((XS,ZE)=>{var UR=Q_(),WR=Mf(),YR=t_(),wR=NE();ZE.exports=wR||UR.call(YR,WR)});var Xf=g((JS,VE)=>{var QR=Q_(),DR=kT(),MR=t_(),XR=BE();VE.exports=function(T){if(T.length<1||typeof T[0]!=="function")throw new DR("a function is required");return XR(QR,MR,T)}});var hE=g((NS,$E)=>{var JR=Xf(),GE=wf(),nE;try{nE=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!=="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var Jf=!!nE&&GE&&GE(Object.prototype,"__proto__"),OE=Object,gE=OE.getPrototypeOf;$E.exports=Jf&&typeof Jf.get==="function"?JR([Jf.get]):typeof gE==="function"?function(T){return gE(T==null?T:OE(T))}:!1});var bE=g((ZS,PE)=>{var KE=Qf(),IE=Df(),mE=hE();PE.exports=KE?function(T){return KE(T)}:IE?function(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw TypeError("getProto: not an object");return IE(T)}:mE?function(T){return mE(T)}:null});var vE=g((BS,kE)=>{var NR=Function.prototype.call,ZR=Object.prototype.hasOwnProperty,BR=Q_();kE.exports=BR.call(NR,ZR)});var l_=g((VS,lE)=>{var I,VR=Yf(),GR=$C(),gR=KC(),nR=mC(),OR=bC(),A_=vC(),E_=kT(),$R=tC(),hR=dC(),KR=yC(),IR=rC(),mR=oC(),PR=aC(),bR=_E(),kR=AE(),jE=Function,Nf=function(_){try{return jE('"use strict"; return ('+_+").constructor;")()}catch(T){}},D_=wf(),vR=uE(),Zf=function(){throw new E_},sR=D_?function(){try{return arguments.callee,Zf}catch(_){try{return D_(arguments,"callee").get}catch(T){return Zf}}}():Zf,f_=qE()(),a=bE(),tR=Df(),jR=Qf(),dE=Mf(),M_=t_(),C_={},dR=typeof Uint8Array>"u"||!a?I:a(Uint8Array),sT={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":f_&&a?a([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":C_,"%AsyncGenerator%":C_,"%AsyncGeneratorFunction%":C_,"%AsyncIteratorPrototype%":C_,"%Atomics%":typeof Atomics>"u"?I:Atomics,"%BigInt%":typeof BigInt>"u"?I:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?I:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?I:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":GR,"%eval%":eval,"%EvalError%":gR,"%Float16Array%":typeof Float16Array>"u"?I:Float16Array,"%Float32Array%":typeof Float32Array>"u"?I:Float32Array,"%Float64Array%":typeof Float64Array>"u"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?I:FinalizationRegistry,"%Function%":jE,"%GeneratorFunction%":C_,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f_&&a?a(a([][Symbol.iterator]())):I,"%JSON%":typeof JSON==="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f_||!a?I:a(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":VR,"%Object.getOwnPropertyDescriptor%":D_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?I:Promise,"%Proxy%":typeof Proxy>"u"?I:Proxy,"%RangeError%":nR,"%ReferenceError%":OR,"%Reflect%":typeof Reflect>"u"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?I:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f_||!a?I:a(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f_&&a?a(""[Symbol.iterator]()):I,"%Symbol%":f_?Symbol:I,"%SyntaxError%":A_,"%ThrowTypeError%":sR,"%TypedArray%":dR,"%TypeError%":E_,"%Uint8Array%":typeof Uint8Array>"u"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?I:Uint32Array,"%URIError%":$R,"%WeakMap%":typeof WeakMap>"u"?I:WeakMap,"%WeakRef%":typeof WeakRef>"u"?I:WeakRef,"%WeakSet%":typeof WeakSet>"u"?I:WeakSet,"%Function.prototype.call%":M_,"%Function.prototype.apply%":dE,"%Object.defineProperty%":vR,"%Object.getPrototypeOf%":tR,"%Math.abs%":hR,"%Math.floor%":KR,"%Math.max%":IR,"%Math.min%":mR,"%Math.pow%":PR,"%Math.round%":bR,"%Math.sign%":kR,"%Reflect.getPrototypeOf%":jR};if(a)try{null.error}catch(_){Bf=a(a(_)),sT["%Error.prototype%"]=Bf}var Bf,lR=function _(T){var f;if(T==="%AsyncFunction%")f=Nf("async function () {}");else if(T==="%GeneratorFunction%")f=Nf("function* () {}");else if(T==="%AsyncGeneratorFunction%")f=Nf("async function* () {}");else if(T==="%AsyncGenerator%"){var C=_("%AsyncGeneratorFunction%");if(C)f=C.prototype}else if(T==="%AsyncIteratorPrototype%"){var E=_("%AsyncGenerator%");if(E&&a)f=a(E.prototype)}return sT[T]=f,f},sE={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},X_=Q_(),j_=vE(),yR=X_.call(M_,Array.prototype.concat),iR=X_.call(dE,Array.prototype.splice),tE=X_.call(M_,String.prototype.replace),d_=X_.call(M_,String.prototype.slice),rR=X_.call(M_,RegExp.prototype.exec),pR=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oR=/\\(\\)?/g,eR=function(T){var f=d_(T,0,1),C=d_(T,-1);if(f==="%"&&C!=="%")throw new A_("invalid intrinsic syntax, expected closing `%`");else if(C==="%"&&f!=="%")throw new A_("invalid intrinsic syntax, expected opening `%`");var E=[];return tE(T,pR,function(A,c,u,S){E[E.length]=u?tE(S,oR,"$1"):c||A}),E},aR=function(T,f){var C=T,E;if(j_(sE,C))E=sE[C],C="%"+E[0]+"%";if(j_(sT,C)){var A=sT[C];if(A===C_)A=lR(C);if(typeof A>"u"&&!f)throw new E_("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:E,name:C,value:A}}throw new A_("intrinsic "+T+" does not exist!")};lE.exports=function(T,f){if(typeof T!=="string"||T.length===0)throw new E_("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof f!=="boolean")throw new E_('"allowMissing" argument must be a boolean');if(rR(/^%?[^%]*%?$/,T)===null)throw new A_("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var C=eR(T),E=C.length>0?C[0]:"",A=aR("%"+E+"%",f),c=A.name,u=A.value,S=!1,U=A.alias;if(U)E=U[0],iR(C,yR([0,1],U));for(var z=1,q=!0;z<C.length;z+=1){var x=C[z],Q=d_(x,0,1),Y=d_(x,-1);if((Q==='"'||Q==="'"||Q==="`"||(Y==='"'||Y==="'"||Y==="`"))&&Q!==Y)throw new A_("property names with quotes must have matching quotes");if(x==="constructor"||!q)S=!0;if(E+="."+x,c="%"+E+"%",j_(sT,c))u=sT[c];else if(u!=null){if(!(x in u)){if(!f)throw new E_("base intrinsic for "+T+" exists, but the property is not available.");return}if(D_&&z+1>=C.length){var W=D_(u,x);if(q=!!W,q&&"get"in W&&!("originalValue"in W.get))u=W.get;else u=u[x]}else q=j_(u,x),u=u[x];if(q&&!S)sT[c]=u}}return u}});var Vf=g((GS,rE)=>{var yE=l_(),iE=Xf(),Tx=iE([yE("%String.prototype.indexOf%")]);rE.exports=function(T,f){var C=yE(T,!!f);if(typeof C==="function"&&Tx(T,".prototype.")>-1)return iE([C]);return C}});var Gf=g((gS,oE)=>{var _x=l_(),J_=Vf(),fx=w_(),Cx=kT(),pE=_x("%Map%",!0),Ex=J_("Map.prototype.get",!0),Ax=J_("Map.prototype.set",!0),cx=J_("Map.prototype.has",!0),Rx=J_("Map.prototype.delete",!0),xx=J_("Map.prototype.size",!0);oE.exports=!!pE&&function(){var T,f={assert:function(C){if(!f.has(C))throw new Cx("Side channel does not contain "+fx(C))},delete:function(C){if(T){var E=Rx(T,C);if(xx(T)===0)T=void 0;return E}return!1},get:function(C){if(T)return Ex(T,C)},has:function(C){if(T)return cx(T,C);return!1},set:function(C,E){if(!T)T=new pE;Ax(T,C,E)}};return f}});var aE=g((nS,eE)=>{var Sx=l_(),i_=Vf(),ux=w_(),y_=Gf(),Hx=kT(),c_=Sx("%WeakMap%",!0),Lx=i_("WeakMap.prototype.get",!0),zx=i_("WeakMap.prototype.set",!0),Fx=i_("WeakMap.prototype.has",!0),qx=i_("WeakMap.prototype.delete",!0);eE.exports=c_?function(){var T,f,C={assert:function(E){if(!C.has(E))throw new Hx("Side channel does not contain "+ux(E))},delete:function(E){if(c_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return qx(T,E)}else if(y_){if(f)return f.delete(E)}return!1},get:function(E){if(c_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return Lx(T,E)}return f&&f.get(E)},has:function(E){if(c_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return Fx(T,E)}return!!f&&f.has(E)},set:function(E,A){if(c_&&E&&(typeof E==="object"||typeof E==="function")){if(!T)T=new c_;zx(T,E,A)}else if(y_){if(!f)f=y_();f.set(E,A)}}};return C}:y_});var gf=g((OS,TA)=>{var Ux=kT(),Wx=w_(),Yx=gC(),wx=Gf(),Qx=aE(),Dx=Qx||wx||Yx;TA.exports=function(){var T,f={assert:function(C){if(!f.has(C))throw new Ux("Side channel does not contain "+Wx(C))},delete:function(C){return!!T&&T.delete(C)},get:function(C){return T&&T.get(C)},has:function(C){return!!T&&T.has(C)},set:function(C,E){if(!T)T=Dx();T.set(C,E)}};return f}});var r_=g(($S,_A)=>{var Mx=String.prototype.replace,Xx=/%20/g,nf={RFC1738:"RFC1738",RFC3986:"RFC3986"};_A.exports={default:nf.RFC3986,formatters:{RFC1738:function(_){return Mx.call(_,Xx,"+")},RFC3986:function(_){return String(_)}},RFC1738:nf.RFC1738,RFC3986:nf.RFC3986}});var Kf=g((hS,fA)=>{var Jx=r_(),Nx=gf(),Of=Object.prototype.hasOwnProperty,tT=Array.isArray,p_=Nx(),R_=function(T,f){return p_.set(T,f),T},jT=function(T){return p_.has(T)},N_=function(T){return p_.get(T)},hf=function(T,f){p_.set(T,f)},YT=function(){var _=[];for(var T=0;T<256;++T)_[_.length]="%"+((T<16?"0":"")+T.toString(16)).toUpperCase();return _}(),Zx=function(T){while(T.length>1){var f=T.pop(),C=f.obj[f.prop];if(tT(C)){var E=[];for(var A=0;A<C.length;++A)if(typeof C[A]<"u")E[E.length]=C[A];f.obj[f.prop]=E}}},Z_=function(T,f){var C=f&&f.plainObjects?{__proto__:null}:{};for(var E=0;E<T.length;++E)if(typeof T[E]<"u")C[E]=T[E];return C},Bx=function _(T,f,C){if(!f)return T;if(typeof f!=="object"&&typeof f!=="function"){if(tT(T)){var E=T.length;if(C&&typeof C.arrayLimit==="number"&&E>C.arrayLimit)return R_(Z_(T.concat(f),C),E);T[E]=f}else if(T&&typeof T==="object"){if(jT(T)){var A=N_(T)+1;T[A]=f,hf(T,A)}else if(C&&C.strictMerge)return[T,f];else if(C&&(C.plainObjects||C.allowPrototypes)||!Of.call(Object.prototype,f))T[f]=!0}else return[T,f];return T}if(!T||typeof T!=="object"){if(jT(f)){var c=Object.keys(f),u=C&&C.plainObjects?{__proto__:null,0:T}:{0:T};for(var S=0;S<c.length;S++){var U=parseInt(c[S],10);u[U+1]=f[c[S]]}return R_(u,N_(f)+1)}var z=[T].concat(f);if(C&&typeof C.arrayLimit==="number"&&z.length>C.arrayLimit)return R_(Z_(z,C),z.length-1);return z}var q=T;if(tT(T)&&!tT(f))q=Z_(T,C);if(tT(T)&&tT(f))return f.forEach(function(x,Q){if(Of.call(T,Q)){var Y=T[Q];if(Y&&typeof Y==="object"&&x&&typeof x==="object")T[Q]=_(Y,x,C);else T[T.length]=x}else T[Q]=x}),T;return Object.keys(f).reduce(function(x,Q){var Y=f[Q];if(Of.call(x,Q))x[Q]=_(x[Q],Y,C);else x[Q]=Y;if(jT(f)&&!jT(x))R_(x,N_(f));if(jT(x)){var W=parseInt(Q,10);if(String(W)===Q&&W>=0&&W>N_(x))hf(x,W)}return x},q)},Vx=function(T,f){return Object.keys(f).reduce(function(C,E){return C[E]=f[E],C},T)},Gx=function(_,T,f){var C=_.replace(/\+/g," ");if(f==="iso-8859-1")return C.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(C)}catch(E){return C}},$f=1024,gx=function(T,f,C,E,A){if(T.length===0)return T;var c=T;if(typeof T==="symbol")c=Symbol.prototype.toString.call(T);else if(typeof T!=="string")c=String(T);if(C==="iso-8859-1")return escape(c).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});var u="";for(var S=0;S<c.length;S+=$f){var U=c.length>=$f?c.slice(S,S+$f):c,z=[];for(var q=0;q<U.length;++q){var x=U.charCodeAt(q);if(x===45||x===46||x===95||x===126||x>=48&&x<=57||x>=65&&x<=90||x>=97&&x<=122||A===Jx.RFC1738&&(x===40||x===41)){z[z.length]=U.charAt(q);continue}if(x<128){z[z.length]=YT[x];continue}if(x<2048){z[z.length]=YT[192|x>>6]+YT[128|x&63];continue}if(x<55296||x>=57344){z[z.length]=YT[224|x>>12]+YT[128|x>>6&63]+YT[128|x&63];continue}q+=1,x=65536+((x&1023)<<10|U.charCodeAt(q)&1023),z[z.length]=YT[240|x>>18]+YT[128|x>>12&63]+YT[128|x>>6&63]+YT[128|x&63]}u+=z.join("")}return u},nx=function(T){var f=[{obj:{o:T},prop:"o"}],C=[];for(var E=0;E<f.length;++E){var A=f[E],c=A.obj[A.prop],u=Object.keys(c);for(var S=0;S<u.length;++S){var U=u[S],z=c[U];if(typeof z==="object"&&z!==null&&C.indexOf(z)===-1)f[f.length]={obj:c,prop:U},C[C.length]=z}}return Zx(f),T},Ox=function(T){return Object.prototype.toString.call(T)==="[object RegExp]"},$x=function(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},hx=function(T,f,C,E){if(jT(T)){var A=N_(T)+1;return T[A]=f,hf(T,A),T}var c=[].concat(T,f);if(c.length>C)return R_(Z_(c,{plainObjects:E}),c.length-1);return c},Kx=function(T,f){if(tT(T)){var C=[];for(var E=0;E<T.length;E+=1)C[C.length]=f(T[E]);return C}return f(T)};fA.exports={arrayToObject:Z_,assign:Vx,combine:hx,compact:nx,decode:Gx,encode:gx,isBuffer:$x,isOverflow:jT,isRegExp:Ox,markOverflow:R_,maybeMap:Kx,merge:Bx}});var xA=g((KS,RA)=>{var EA=gf(),o_=Kf(),B_=r_(),Ix=Object.prototype.hasOwnProperty,AA={brackets:function(T){return T+"[]"},comma:"comma",indices:function(T,f){return T+"["+f+"]"},repeat:function(T){return T}},wT=Array.isArray,mx=Array.prototype.push,cA=function(_,T){mx.apply(_,wT(T)?T:[T])},Px=Date.prototype.toISOString,CA=B_.default,e={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o_.encode,encodeValuesOnly:!1,filter:void 0,format:CA,formatter:B_.formatters[CA],indices:!1,serializeDate:function(T){return Px.call(T)},skipNulls:!1,strictNullHandling:!1},bx=function(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},If={},kx=function _(T,f,C,E,A,c,u,S,U,z,q,x,Q,Y,W,P,L,r){var n=T,j=r,$=0,b=!1;while((j=j.get(If))!==void 0&&!b){var k=j.get(T);if($+=1,typeof k<"u")if(k===$)throw RangeError("Cyclic object value");else b=!0;if(typeof j.get(If)>"u")$=0}if(typeof z==="function")n=z(f,n);else if(n instanceof Date)n=Q(n);else if(C==="comma"&&wT(n))n=o_.maybeMap(n,function(lT){if(lT instanceof Date)return Q(lT);return lT});if(n===null){if(c)return U&&!P?U(f,e.encoder,L,"key",Y):f;n=""}if(bx(n)||o_.isBuffer(n)){if(U){var G=P?f:U(f,e.encoder,L,"key",Y);return[W(G)+"="+W(U(n,e.encoder,L,"value",Y))]}return[W(f)+"="+W(String(n))]}var M=[];if(typeof n>"u")return M;var N;if(C==="comma"&&wT(n)){if(P&&U)n=o_.maybeMap(n,U);N=[{value:n.length>0?n.join(",")||null:void 0}]}else if(wT(z))N=z;else{var V=Object.keys(n);N=q?V.sort(q):V}var s=S?String(f).replace(/\./g,"%2E"):String(f),d=E&&wT(n)&&n.length===1?s+"[]":s;if(A&&wT(n)&&n.length===0)return d+"[]";for(var ET=0;ET<N.length;++ET){var fT=N[ET],GT=typeof fT==="object"&&fT&&typeof fT.value<"u"?fT.value:n[fT];if(u&>===null)continue;var dT=x&&S?String(fT).replace(/\./g,"%2E"):String(fT),O_=wT(n)?typeof C==="function"?C(d,dT):d:d+(x?"."+dT:"["+dT+"]");r.set(T,$);var u_=EA();u_.set(If,r),cA(M,_(GT,O_,C,E,A,c,u,S,C==="comma"&&P&&wT(n)?null:U,z,q,x,Q,Y,W,P,L,u_))}return M},vx=function(T){if(!T)return e;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys<"u"&&typeof T.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder<"u"&&typeof T.encoder!=="function")throw TypeError("Encoder has to be a function.");var f=T.charset||e.charset;if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var C=B_.default;if(typeof T.format<"u"){if(!Ix.call(B_.formatters,T.format))throw TypeError("Unknown format option provided.");C=T.format}var E=B_.formatters[C],A=e.filter;if(typeof T.filter==="function"||wT(T.filter))A=T.filter;var c;if(T.arrayFormat in AA)c=T.arrayFormat;else if("indices"in T)c=T.indices?"indices":"repeat";else c=e.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof T.allowDots>"u"?T.encodeDotInKeys===!0?!0:e.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:e.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:e.allowEmptyArrays,arrayFormat:c,charset:f,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:e.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter>"u"?e.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:e.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:e.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:e.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:e.encodeValuesOnly,filter:A,format:C,formatter:E,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:e.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:e.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:e.strictNullHandling}};RA.exports=function(_,T){var f=_,C=vx(T),E,A;if(typeof C.filter==="function")A=C.filter,f=A("",f);else if(wT(C.filter))A=C.filter,E=A;var c=[];if(typeof f!=="object"||f===null)return"";var u=AA[C.arrayFormat],S=u==="comma"&&C.commaRoundTrip;if(!E)E=Object.keys(f);if(C.sort)E.sort(C.sort);var U=EA();for(var z=0;z<E.length;++z){var q=E[z],x=f[q];if(C.skipNulls&&x===null)continue;cA(c,kx(x,q,u,S,C.allowEmptyArrays,C.strictNullHandling,C.skipNulls,C.encodeDotInKeys,C.encode?C.encoder:null,C.filter,C.sort,C.allowDots,C.serializeDate,C.format,C.formatter,C.encodeValuesOnly,C.charset,U))}var Q=c.join(C.delimiter),Y=C.addQueryPrefix===!0?"?":"";if(C.charsetSentinel)if(C.charset==="iso-8859-1")Y+="utf8=%26%2310003%3B&";else Y+="utf8=%E2%9C%93&";return Q.length>0?Y+Q:""}});var HA=g((IS,uA)=>{var QT=Kf(),e_=Object.prototype.hasOwnProperty,mf=Array.isArray,t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:QT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},sx=function(_){return _.replace(/&#(\d+);/g,function(T,f){return String.fromCharCode(parseInt(f,10))})},SA=function(_,T,f){if(_&&typeof _==="string"&&T.comma&&_.indexOf(",")>-1)return _.split(",");if(T.throwOnLimitExceeded&&f>=T.arrayLimit)throw RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return _},tx="utf8=%26%2310003%3B",jx="utf8=%E2%9C%93",dx=function(T,f){var C={__proto__:null},E=f.ignoreQueryPrefix?T.replace(/^\?/,""):T;E=E.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var A=f.parameterLimit===1/0?void 0:f.parameterLimit,c=E.split(f.delimiter,f.throwOnLimitExceeded?A+1:A);if(f.throwOnLimitExceeded&&c.length>A)throw RangeError("Parameter limit exceeded. Only "+A+" parameter"+(A===1?"":"s")+" allowed.");var u=-1,S,U=f.charset;if(f.charsetSentinel){for(S=0;S<c.length;++S)if(c[S].indexOf("utf8=")===0){if(c[S]===jx)U="utf-8";else if(c[S]===tx)U="iso-8859-1";u=S,S=c.length}}for(S=0;S<c.length;++S){if(S===u)continue;var z=c[S],q=z.indexOf("]="),x=q===-1?z.indexOf("="):q+1,Q,Y;if(x===-1)Q=f.decoder(z,t.decoder,U,"key"),Y=f.strictNullHandling?null:"";else if(Q=f.decoder(z.slice(0,x),t.decoder,U,"key"),Q!==null)Y=QT.maybeMap(SA(z.slice(x+1),f,mf(C[Q])?C[Q].length:0),function(P){return f.decoder(P,t.decoder,U,"value")});if(Y&&f.interpretNumericEntities&&U==="iso-8859-1")Y=sx(String(Y));if(z.indexOf("[]=")>-1)Y=mf(Y)?[Y]:Y;if(f.comma&&mf(Y)&&Y.length>f.arrayLimit){if(f.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");Y=QT.combine([],Y,f.arrayLimit,f.plainObjects)}if(Q!==null){var W=e_.call(C,Q);if(W&&(f.duplicates==="combine"||z.indexOf("[]=")>-1))C[Q]=QT.combine(C[Q],Y,f.arrayLimit,f.plainObjects);else if(!W||f.duplicates==="last")C[Q]=Y}}return C},lx=function(_,T,f,C){var E=0;if(_.length>0&&_[_.length-1]==="[]"){var A=_.slice(0,-1).join("");E=Array.isArray(T)&&T[A]?T[A].length:0}var c=C?T:SA(T,f,E);for(var u=_.length-1;u>=0;--u){var S,U=_[u];if(U==="[]"&&f.parseArrays)if(QT.isOverflow(c))S=c;else S=f.allowEmptyArrays&&(c===""||f.strictNullHandling&&c===null)?[]:QT.combine([],c,f.arrayLimit,f.plainObjects);else{S=f.plainObjects?{__proto__:null}:{};var z=U.charAt(0)==="["&&U.charAt(U.length-1)==="]"?U.slice(1,-1):U,q=f.decodeDotInKeys?z.replace(/%2E/g,"."):z,x=parseInt(q,10),Q=!isNaN(x)&&U!==q&&String(x)===q&&x>=0&&f.parseArrays;if(!f.parseArrays&&q==="")S={0:c};else if(Q&&x<f.arrayLimit)S=[],S[x]=c;else if(Q&&f.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");else if(Q)S[x]=c,QT.markOverflow(S,x);else if(q!=="__proto__")S[q]=c}c=S}return c},yx=function(T,f){var C=f.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T;if(f.depth<=0){if(!f.plainObjects&&e_.call(Object.prototype,C)){if(!f.allowPrototypes)return}return[C]}var E=/(\[[^[\]]*])/,A=/(\[[^[\]]*])/g,c=E.exec(C),u=c?C.slice(0,c.index):C,S=[];if(u){if(!f.plainObjects&&e_.call(Object.prototype,u)){if(!f.allowPrototypes)return}S[S.length]=u}var U=0;while((c=A.exec(C))!==null&&U<f.depth){U+=1;var z=c[1].slice(1,-1);if(!f.plainObjects&&e_.call(Object.prototype,z)){if(!f.allowPrototypes)return}S[S.length]=c[1]}if(c){if(f.strictDepth===!0)throw RangeError("Input depth exceeded depth option of "+f.depth+" and strictDepth is true");S[S.length]="["+C.slice(c.index)+"]"}return S},ix=function(T,f,C,E){if(!T)return;var A=yx(T,C);if(!A)return;return lx(A,f,C,E)},rx=function(T){if(!T)return t;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys<"u"&&typeof T.decodeDotInKeys!=="boolean")throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder<"u"&&typeof T.decoder!=="function")throw TypeError("Decoder has to be a function.");if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded<"u"&&typeof T.throwOnLimitExceeded!=="boolean")throw TypeError("`throwOnLimitExceeded` option must be a boolean");var f=typeof T.charset>"u"?t.charset:T.charset,C=typeof T.duplicates>"u"?t.duplicates:T.duplicates;if(C!=="combine"&&C!=="first"&&C!=="last")throw TypeError("The duplicates option must be either combine, first, or last");var E=typeof T.allowDots>"u"?T.decodeDotInKeys===!0?!0:t.allowDots:!!T.allowDots;return{allowDots:E,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:t.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:t.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:t.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:t.arrayLimit,charset:f,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:t.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:t.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:t.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:t.decoder,delimiter:typeof T.delimiter==="string"||QT.isRegExp(T.delimiter)?T.delimiter:t.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:t.depth,duplicates:C,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:t.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:t.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:t.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:t.strictDepth,strictMerge:typeof T.strictMerge==="boolean"?!!T.strictMerge:t.strictMerge,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:t.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};uA.exports=function(_,T){var f=rx(T);if(_===""||_===null||typeof _>"u")return f.plainObjects?{__proto__:null}:{};var C=typeof _==="string"?dx(_,f):_,E=f.plainObjects?{__proto__:null}:{},A=Object.keys(C);for(var c=0;c<A.length;++c){var u=A[c],S=ix(u,C[u],f,typeof _==="string");E=QT.merge(E,S,f)}if(f.allowSparse===!0)return E;return QT.compact(E)}});var zA=g((mS,LA)=>{var px=xA(),ox=HA(),ex=r_();LA.exports={formats:ex,parse:ox,stringify:px}});var y1=$_(h_(),1);var af={};of(af,{zodSchemaKey:()=>dA,webSocketServerArgsKey:()=>TT,webSocketMessageArgsKey:()=>PT,webSocketKey:()=>LT,webSocketEventKey:()=>mT,webSocketEventArgumentsKey:()=>_T,webSocketConnectionArgsKey:()=>zT,webSocketCloseReasonArgsKey:()=>z_,webSocketCloseCodeArgsKey:()=>L_,routeModelArgsKey:()=>xT,responseStatusTextArgsKey:()=>aT,responseStatusArgsKey:()=>bT,responseHeadersArgsKey:()=>RT,responseBodyArgsKey:()=>eT,requestHeadersArgsKey:()=>gT,requestHeaderArgsKey:()=>qT,requestBodyArgsKey:()=>nT,requestArgsKey:()=>UT,queryArgsKey:()=>F_,paramsArgsKey:()=>oT,paramArgsKey:()=>OT,moduleKey:()=>cT,middlewareKey:()=>NT,interceptorKey:()=>MT,injectableKey:()=>JT,injectKey:()=>pT,httpServerArgsKey:()=>FT,guardKey:()=>XT,controllerKey:()=>uT,controllerHttpKey:()=>rT,contextArgsKey:()=>$T,containerKey:()=>HT,configKey:()=>K_,argumentsKey:()=>K});var K=Symbol.for("____boolTypescriptCore:arguments__"),_T=Symbol.for("____boolTypescriptCore:webSocketEventArguments__"),K_=Symbol.for("____boolTypescriptCore:config__"),uT=Symbol.for("____boolTypescriptCore:controller__"),MT=Symbol.for("____boolTypescriptCore:interceptor__"),XT=Symbol.for("____boolTypescriptCore:guard__"),rT=Symbol.for("____boolTypescriptCore:controller.http__"),pT=Symbol.for("____boolTypescriptCore:inject__"),JT=Symbol.for("____boolTypescriptCore:injectable__"),NT=Symbol.for("____boolTypescriptCore:middleware__"),cT=Symbol.for("____boolTypescriptCore:module__"),HT=Symbol.for("____boolTypescriptCore:container__"),dA=Symbol.for("____boolTypescriptCore:zodSchema__"),LT=Symbol.for("____boolTypescriptCore:webSocket__"),mT=Symbol.for("____boolTypescriptCore:webSocket:event__"),TT=Symbol.for("____boolTypescriptCore:webSocketArguments:server__"),zT=Symbol.for("____boolTypescriptCore:webSocketArguments:connection__"),PT=Symbol.for("____boolTypescriptCore:webSocketArguments:message__"),L_=Symbol.for("____boolTypescriptCore:webSocketArguments:closeCode__"),z_=Symbol.for("____boolTypescriptCore:webSocketArguments:closeReason__"),FT=Symbol.for("____boolTypescriptCore:httpArguments:server__"),gT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeaders__"),qT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeader__"),nT=Symbol.for("____boolTypescriptCore:httpArguments:requestBody__"),oT=Symbol.for("____boolTypescriptCore:httpArguments:params__"),OT=Symbol.for("____boolTypescriptCore:httpArguments:param__"),F_=Symbol.for("____boolTypescriptCore:httpArguments:query__"),UT=Symbol.for("____boolTypescriptCore:httpArguments:request__"),RT=Symbol.for("____boolTypescriptCore:httpArguments:responseHeaders__"),$T=Symbol.for("____boolTypescriptCore:httpArguments:context__"),xT=Symbol.for("____boolTypescriptCore:httpArguments:routeModel__"),eT=Symbol.for("____boolTypescriptCore:httpArguments:responseBody__"),bT=Symbol.for("____boolTypescriptCore:httpArguments:responseStatus__"),aT=Symbol.for("____boolTypescriptCore:httpArguments:responseStatusText__");var p={};of(p,{successfulStatuses:()=>_C,serverErrorStatuses:()=>EC,redirectionStatuses:()=>fC,informationalStatuses:()=>TC,httpStatuses:()=>lA,clientErrorStatuses:()=>CC});var TC=Object.freeze({CONTINUE:Object.freeze({status:100,statusText:"Continue"}),SWITCHING_PROTOCOLS:Object.freeze({status:101,statusText:"Switching Protocols"}),EARLY_HINTS:Object.freeze({status:103,statusText:"Early Hints"})}),_C=Object.freeze({OK:Object.freeze({status:200,statusText:"OK"}),CREATED:Object.freeze({status:201,statusText:"Created"}),ACCEPTED:Object.freeze({status:202,statusText:"Accepted"}),NON_AUTHORITATIVE_INFORMATION:Object.freeze({status:203,statusText:"Non-Authoritative Information"}),NO_CONTENT:Object.freeze({status:204,statusText:"No Content"}),RESET_CONTENT:Object.freeze({status:205,statusText:"Reset Content"}),PARTIAL_CONTENT:Object.freeze({status:206,statusText:"Partial Content"}),MULTI_STATUS:Object.freeze({status:207,statusText:"Multi-Status"}),ALREADY_REPORTED:Object.freeze({status:208,statusText:"Already Reported"}),IM_USED:Object.freeze({status:226,statusText:"IM Used"})}),fC=Object.freeze({MULTIPLE_CHOICES:Object.freeze({status:300,statusText:"Multiple Choices"}),MOVED_PERMANENTLY:Object.freeze({status:301,statusText:"Moved Permanently"}),FOUND:Object.freeze({status:302,statusText:"Found"}),SEE_OTHER:Object.freeze({status:303,statusText:"See Other"}),NOT_MODIFIED:Object.freeze({status:304,statusText:"Not Modified"}),UNUSED:Object.freeze({status:306,statusText:"Unused"}),TEMPORARY_REDIRECT:Object.freeze({status:307,statusText:"Temporary Redirect"}),PERMANENT_REDIRECT:Object.freeze({status:308,statusText:"Permanent Redirect"})}),CC=Object.freeze({BAD_REQUEST:Object.freeze({status:400,statusText:"Bad Request"}),UNAUTHORIZED:Object.freeze({status:401,statusText:"Unauthorized"}),PAYMENT_REQUIRED:Object.freeze({status:402,statusText:"Payment Required"}),FORBIDDEN:Object.freeze({status:403,statusText:"Forbidden"}),NOT_FOUND:Object.freeze({status:404,statusText:"Not Found"}),METHOD_NOT_ALLOWED:Object.freeze({status:405,statusText:"Method Not Allowed"}),NOT_ACCEPTABLE:Object.freeze({status:406,statusText:"Not Acceptable"}),PROXY_AUTHENTICATION_REQUIRED:Object.freeze({status:407,statusText:"Proxy Authentication Required"}),REQUEST_TIMEOUT:Object.freeze({status:408,statusText:"Request Timeout"}),CONFLICT:Object.freeze({status:409,statusText:"Conflict"}),GONE:Object.freeze({status:410,statusText:"Gone"}),LENGTH_REQUIRED:Object.freeze({status:411,statusText:"Length Required"}),PRECONDITION_FAILED:Object.freeze({status:412,statusText:"Precondition Failed"}),CONTENT_TOO_LARGE:Object.freeze({status:413,statusText:"Content Too Large"}),URI_TOO_LONG:Object.freeze({status:414,statusText:"URI Too Long"}),UNSUPPORTED_MEDIA_TYPE:Object.freeze({status:415,statusText:"Unsupported Media Type"}),RANGE_NOT_SATISFIABLE:Object.freeze({status:416,statusText:"Range Not Satisfiable"}),EXPECTATION_FAILED:Object.freeze({status:417,statusText:"Expectation Failed"}),I_AM_A_TEAPOT:Object.freeze({status:418,statusText:"I'm a teapot"}),MISDIRECTED_REQUEST:Object.freeze({status:421,statusText:"Misdirected Request"}),UNPROCESSABLE_CONTENT:Object.freeze({status:422,statusText:"Unprocessable Content"}),LOCKED:Object.freeze({status:423,statusText:"Locked"}),FAILED_DEPENDENCY:Object.freeze({status:424,statusText:"Failed Dependency"}),TOO_EARLY:Object.freeze({status:425,statusText:"Too Early"}),UPGRADE_REQUIRED:Object.freeze({status:426,statusText:"Upgrade Required"}),PRECONDITION_REQUIRED:Object.freeze({status:428,statusText:"Precondition Required"}),TOO_MANY_REQUESTS:Object.freeze({status:429,statusText:"Too Many Requests"}),REQUEST_HEADER_FIELDS_TOO_LARGE:Object.freeze({status:431,statusText:"Request Header Fields Too Large"}),UNAVAILABLE_FOR_LEGAL_REASONS:Object.freeze({status:451,statusText:"Unavailable For Legal Reasons"})}),EC=Object.freeze({INTERNAL_SERVER_ERROR:Object.freeze({status:500,statusText:"Internal Server Error"}),NOT_IMPLEMENTED:Object.freeze({status:501,statusText:"Not Implemented"}),BAD_GATEWAY:Object.freeze({status:502,statusText:"Bad Gateway"}),SERVICE_UNAVAILABLE:Object.freeze({status:503,statusText:"Service Unavailable"}),GATEWAY_TIMEOUT:Object.freeze({status:504,statusText:"Gateway Timeout"}),HTTP_VERSION_NOT_SUPPORTED:Object.freeze({status:505,statusText:"HTTP Version Not Supported"}),VARIANT_ALSO_NEGOTIATES:Object.freeze({status:506,statusText:"Variant Also Negotiates"}),INSUFFICIENT_STORAGE:Object.freeze({status:507,statusText:"Insufficient Storage"}),LOOP_DETECTED:Object.freeze({status:508,statusText:"Loop Detected"}),NOT_EXTENDED:Object.freeze({status:510,statusText:"Not Extended"}),NETWORK_AUTHENTICATION_REQUIRED:Object.freeze({status:511,statusText:"Network Authentication Required"})}),lA=Object.freeze({...TC,..._C,...fC,...CC,...EC});var yA=(_)=>(T,f,C)=>{if(!f)return;let E=Reflect.getOwnMetadata(K,T.constructor,f)||{};E[`argumentIndexes.${C}`]={index:C,type:gT,validationSchema:_},Reflect.defineMetadata(K,E,T.constructor,f)},iA=(_,T)=>(f,C,E)=>{if(!C)return;let A=Reflect.getOwnMetadata(K,f.constructor,C)||{};A[`argumentIndexes.${E}`]={index:E,type:qT,key:_,validationSchema:T},Reflect.defineMetadata(K,A,f.constructor,C)},rA=(_,T)=>(f,C,E)=>{if(!C)return;let A=Reflect.getOwnMetadata(K,f.constructor,C)||{};A[`argumentIndexes.${E}`]={index:E,type:nT,validationSchema:_,parser:T},Reflect.defineMetadata(K,A,f.constructor,C)},pA=(_)=>(T,f,C)=>{if(!f)return;let E=Reflect.getOwnMetadata(K,T.constructor,f)||{};E[`argumentIndexes.${C}`]={index:C,type:oT,validationSchema:_},Reflect.defineMetadata(K,E,T.constructor,f)},oA=(_,T)=>(f,C,E)=>{if(!C)return;let A=Reflect.getOwnMetadata(K,f.constructor,C)||{};A[`argumentIndexes.${E}`]={index:E,type:OT,key:_,validationSchema:T},Reflect.defineMetadata(K,A,f.constructor,C)},eA=(_)=>(T,f,C)=>{if(!f)return;let E=Reflect.getOwnMetadata(K,T.constructor,f)||{};E[`argumentIndexes.${C}`]={index:C,type:F_,validationSchema:_},Reflect.defineMetadata(K,E,T.constructor,f)},aA=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(K,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:UT},Reflect.defineMetadata(K,C,_.constructor,T)},Tc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(K,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:RT},Reflect.defineMetadata(K,C,_.constructor,T)},_c=(_)=>(T,f,C)=>{if(!f)return;let E=Reflect.getOwnMetadata(K,T.constructor,f)||{};E[`argumentIndexes.${C}`]={index:C,type:$T,key:_},Reflect.defineMetadata(K,E,T.constructor,f)},fc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(K,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:xT},Reflect.defineMetadata(K,C,_.constructor,T)},Cc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(K,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:FT},Reflect.defineMetadata(K,C,_.constructor,T)};var Ec=(_)=>(T)=>{let{modules:f,middlewares:C,guards:E,interceptors:A,dependencies:c}=_||{};if(Reflect.hasOwnMetadata(cT,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(f){let u=[];for(let S of f){if(!Reflect.getOwnMetadataKeys(S).includes(cT))throw Error(`[${S.name}] is not a module.`);let U=Reflect.getOwnMetadata(cT,S);if(u.includes(U?.prefix||""))throw Error(`Duplicated prefix of module [${S.name}].`)}}if(C){for(let u of C)if(!Reflect.getOwnMetadataKeys(u).includes(NT))throw Error(`[${u.name}] is not a middleware.`)}if(E){for(let u of E)if(!Reflect.getOwnMetadataKeys(u).includes(XT))throw Error(`[${u.name}] is not a guard.`)}if(A){for(let u of A)if(!Reflect.getOwnMetadataKeys(u).includes(MT))throw Error(`${u.name} is not a middleware.`)}if(c){for(let u of c)if(!Reflect.getOwnMetadataKeys(u).includes(JT))throw Error(`${u.name} is not an injectable.`)}Reflect.defineMetadata(HT,_,T)};var Ac=(_)=>(T)=>{let f={prefix:!_?.startsWith("/")?`/${_||""}`:_,httpMetadata:[...Reflect.getOwnMetadata(rT,T)||[]]};Reflect.defineMetadata(uT,f,T)};var cc=()=>(_)=>{if(!("enforce"in _.prototype)||typeof _.prototype.enforce!=="function")return;let T=void 0;return Reflect.defineMetadata(XT,T,_),_};var T_=(_,T)=>(f,C,E)=>{if(!(E?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let A=Reflect.getOwnMetadata(K,f.constructor,C)||{},c=[...Reflect.getOwnMetadata(rT,f.constructor)||[],{path:!_.startsWith("/")?`/${_}`:_,httpMethod:T.toUpperCase(),methodName:C,descriptor:E,argumentsMetadata:A}];Reflect.defineMetadata(rT,c,f.constructor)},Rc=(_="/")=>T_(_,"Get"),xc=(_="/")=>T_(_,"Post"),Sc=(_="/")=>T_(_,"Put"),uc=(_="/")=>T_(_,"Patch"),Hc=(_="/")=>T_(_,"Delete"),Lc=(_="/")=>T_(_,"Options");var zc=(_)=>(T,f,C)=>{let E=Reflect.getMetadata(pT,T)||[];E[C]=_,Reflect.defineMetadata(pT,E,T)};var Fc=()=>(_)=>Reflect.defineMetadata(JT,void 0,_);var qc=()=>(_)=>{Reflect.defineMetadata(MT,void 0,_)};var Uc=()=>(_)=>{Reflect.defineMetadata(NT,void 0,_)};var Wc=(_)=>(T)=>{if(Reflect.hasOwnMetadata(HT,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:f,guards:C,interceptors:E,controllers:A,dependencies:c,webSockets:u}=_||{};if(f){for(let S=0;S<f.length;S++)if(!Reflect.getOwnMetadataKeys(f[S]).includes(NT))throw Error(`${f[S].name} is not a middleware.`)}if(C){for(let S=0;S<C.length;S++)if(!Reflect.getOwnMetadataKeys(C[S]).includes(XT))throw Error(`${C[S].name} is not a guard.`)}if(E){for(let S=0;S<E.length;S++)if(!Reflect.getOwnMetadataKeys(E[S]).includes(MT))throw Error(`${E[S].name} is not a interceptor.`)}if(A){for(let S=0;S<A.length;S++)if(!Reflect.getOwnMetadataKeys(A[S]).includes(uT))throw Error(`${A[S].name} is not a controller.`)}if(c){for(let S=0;S<c.length;S++)if(!Reflect.getOwnMetadataKeys(c[S]).includes(JT))throw Error(`${c[S].name} is not an injectable.`)}if(u){for(let S=0;S<u.length;S++)if(!Reflect.getOwnMetadataKeys(u[S]).includes(LT))throw Error(`${u[S].name} is not a websocket gateway.`)}Reflect.defineMetadata(cT,_,T)};var I_=Symbol("__bool:webSocket.upgrade__"),Yc=(_,T,f)=>{let C=new URL(T.url);return _.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:C.pathname,query:f}})},wc=(_)=>(T)=>{let{prefix:f}=_||{};T.prototype[I_]=Yc;let C=Object.getOwnPropertyDescriptor(T.prototype,I_),E=!C?[]:[{path:"/",httpMethod:"GET",methodName:I_,descriptor:C,argumentsMetadata:{}},{path:"/",httpMethod:"POST",methodName:I_,descriptor:C,argumentsMetadata:{}}],A={prefix:!f?.startsWith("/")?`/${f||""}`:f,events:Reflect.getOwnMetadata(mT,T)||{},http:E};Reflect.defineMetadata(LT,A,T)};var Qc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:zT},Reflect.defineMetadata(_T,C,_.constructor,T)},Dc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:TT},Reflect.defineMetadata(_T,C,_.constructor,T)},Mc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:L_},Reflect.defineMetadata(_T,C,_.constructor,T)},Xc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:z_},Reflect.defineMetadata(_T,C,_.constructor,T)},Jc=()=>(_,T,f)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${f}`]={index:f,type:PT},Reflect.defineMetadata(_T,C,_.constructor,T)};var Nc=(_)=>(T,f,C)=>{if(!(C.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let E=Reflect.getOwnMetadata(_T,T.constructor,f),A=Object.freeze({methodName:f,descriptor:C,arguments:E}),c={...Reflect.getOwnMetadata(mT,T.constructor)||void 0,[_]:A};Reflect.defineMetadata(mT,A,T.constructor,f),Reflect.defineMetadata(mT,c,T.constructor)};var CT;(function(_){_.year="year",_.month="month",_.day="day",_.hours="hours",_.minutes="minutes",_.seconds="seconds",_.miliseconds="miliseconds"})(CT||(CT={}));var AC=(_,T,f=CT.day)=>{let C=_ instanceof Date?_:new Date(_);switch(f){case CT.year:C.setFullYear(C.getFullYear()+T);break;case CT.month:C.setMonth(C.getMonth()+T);break;case CT.day:C.setDate(C.getDate()+T);break;case CT.hours:C.setHours(C.getHours()+T);break;case CT.minutes:C.setMinutes(C.getMinutes()+T);break;case CT.seconds:C.setSeconds(C.getSeconds()+T);break;case CT.miliseconds:C.setMilliseconds(C.getMilliseconds()+T);break}return C};var QA=$_(zA(),1);var{serve:ax}=globalThis.Bun;var PS=async function(){}.constructor;var FA=Object.freeze({black:"38;5;16",red:"38;5;196",green:"38;5;46",yellow:"38;5;226",blue:"38;5;21",magenta:"38;5;201",cyan:"38;5;51",white:"38;5;231",gray:"38;5;244"}),qA=Object.freeze({black:"48;5;16",red:"48;5;196",green:"48;5;46",yellow:"48;5;226",blue:"48;5;21",magenta:"48;5;201",cyan:"48;5;51",white:"48;5;231",gray:"48;5;244"}),DT=(_,T={})=>{let{color:f,backgroundColor:C,bold:E,underline:A}=T,c=[];if(E)c.push("1");if(A)c.push("4");if(f&&FA[f])c.push(FA[f]);if(C&&qA[C])c.push(qA[C]);if(c.length===0)return _;return`\x1B[${c.join(";")}m${_}\x1B[0m`};var x_=(_)=>{for(let[T,f]of Object.entries(p.httpStatuses)){if(f.status!==_)continue;return f.statusText}return"Unknown error"};var UA=(_)=>{let{headers:T,method:f}=_,C=T.get("upgrade")?.toLowerCase()||"",E=T.get("connection")?.toLowerCase()||"";return f==="GET"&&C?.toLowerCase()==="websocket"&&E?.toLowerCase().includes("upgrade")};class S_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:f}){super();this.httpCode=_,this.message=!f?.trim()?x_(_):f.trim(),this.data=T}}class V_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:f}){super();this.httpCode=_,this.message=!f?.trim()?x_(_):f.trim(),this.data=T}}var Pf=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"],WA=(_)=>!!Pf.find((T)=>T===_),YA=(_,T=new Headers)=>{if(T.set("Content-Type","application/json"),_ instanceof S_||_ instanceof V_)return new Response(JSON.stringify(_),{status:_.httpCode,statusText:_.message,headers:T});return new Response(JSON.stringify((()=>{switch(typeof _){case"object":return!(_ instanceof Error)?_:{message:_.message,code:_.name,cause:_.cause};case"string":return{message:_};case"number":return{code:_};default:return}})()),{status:500,statusText:"INTERNAL SERVER ERROR",headers:T})};class a_{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(..._){_.forEach((T)=>{T.staticEntries.forEach(([f,C])=>this.set(f,C,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([f,C])=>this.set(f,C,{isStatic:!1}))})}get(_,T){return!{...this._options,...T}?.isStatic?this._dynamicMap.get(_):this._staticMap.get(_)}has(_,T){return!{...this._options,...T}?.isStatic?this._dynamicMap.has(_):this._staticMap.has(_)}set(_,T,f){let C={...this._options,...f};if(!C?.isStatic)this._dynamicMap.set(_,T);else if(!this._staticMap.has(_))this._staticMap.set(_,T);else if(!C.isPassthrough)throw Error(`${String(_)} already exists in context static collection.`);return this}setOptions(_){return this._options=_,this}get staticEntries(){return[...this._staticMap.entries()]}get dynamicEntries(){return[...this._dynamicMap.entries()]}}class bf{alias;#T=new Map;#C;constructor({alias:_}){let T=this._thinAlias(_);this.alias=T,this.#C=new URLPattern({pathname:T,baseURL:"https://www.booljs.com"})}test({pathname:_}){try{return this.#C.test({pathname:this._thinAlias(_),baseURL:"https://www.booljs.com"})}catch(T){return console.error(T),!1}}exec({pathname:_,method:T}){try{let f=this.#T.get(T);if(!f)return null;let C=this.#C.exec({pathname:this._thinAlias(_),baseURL:"https://www.booljs.com"});if(!C)return null;let E=C.pathname.groups;return Object.freeze({parameters:E,model:f})}catch(f){return console.error(f),null}}get({model:_}){if(!this.#T.get("GET"))this.#T.set("GET",_);return this}post({model:_}){if(!this.#T.get("POST"))this.#T.set("POST",_);return this}put({model:_}){if(!this.#T.get("PUT"))this.#T.set("PUT",_);return this}delete({model:_}){if(!this.#T.get("DELETE"))this.#T.set("DELETE",_);return this}connect({model:_}){if(!this.#T.get("CONNECT"))return this.#T.set("CONNECT",_);return this}options({model:_}){if(!this.#T.get("OPTIONS"))return this.#T.set("OPTIONS",_);return this}trace({model:_}){if(!this.#T.get("TRACE"))return this.#T.set("TRACE",_);return this}patch({model:_}){if(!this.#T.get("PATCH"))return this.#T.set("PATCH",_);return this}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((f,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!E.test(f)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(f))return f;return f.replace(E,(A,c)=>`${A}(.*?)`)}return f}).join("/")}get _filteredPath(){return this.alias.split("/").map((f,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!E.test(f)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(f))return f;return f.replace(E,(A,c)=>"(.*?)")}return f.replace(E,(A,c,u)=>u)}).join("/")}}var wA=bf;class G_{alias;#T=new Map;#C;#c;#E;constructor({alias:_,guardHandlers:T=[],openInterceptorHandlers:f=[],closeInterceptorHandlers:C=[]}){this.alias=this._thinAlias(_),this.#C=T,this.#c=f,this.#E=C}route({alias:_}){let T=this._thinAlias(`${this.alias}/${_}`),f=this.#T.get(T),C=!f?new wA({alias:`${this.alias}/${_}`}):f;if(!f)this.#T.set(T,C);return C}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this.#T}get pipes(){return Object.freeze({guardHandlers:[...this.#C],openInterceptorHandlers:[...this.#c],closeInterceptorHandlers:[...this.#E]})}}class BT{#T=new Map;add(..._){for(let T of _){if(this.#T.has(T.alias))continue;this.#T.set(T.alias,T)}return this}find({pathname:_,method:T}){for(let f of this.#T.values())for(let C of f.routes.values()){if(!C.test({pathname:_}))continue;let A=C.exec({pathname:_,method:T});if(!A)continue;return Object.freeze({...A,...f.pipes})}return null}}var u1=$_(h_(),1);class VT{_mapper=new Map;constructor(..._){_.forEach((T)=>{T.entries.forEach(([f,C])=>{this._mapper.set(f,C)})})}get(_){if(this._mapper.has(_))return this._mapper.get(_);if(typeof _!=="function")return;let T=Reflect.getMetadataKeys(_);if(![JT,uT,NT,XT,MT,LT].some((A)=>T.includes(A)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let C=(Reflect.getOwnMetadata(pT,_)||[]).map((A)=>this.get(A)),E=new _(...C);return this._mapper.set(_,E),E}set(_,T){if(this._mapper.has(_))throw Error(`${String(_)} already exists in injector collection.`);this._mapper.set(_,T)}get entries(){return[...this._mapper.entries()]}}class Tf{error;constructor(_){this.error=_}}class _f{eventName;metadata;_context=void 0;constructor({eventName:_,metadata:T}){this.eventName=_,this.metadata=T}bind(_){return this._context=_,this}execute(){if(this._context&&typeof this.metadata.descriptor.value==="function")this.metadata.descriptor.value=this.metadata.descriptor.value.bind(this._context);return Object.freeze({methodName:this.metadata.methodName,descriptor:this.metadata.descriptor,arguments:this.metadata.arguments})}}class g_{rawAlias;alias;routes=[];constructor(_="/"){this.rawAlias=_;this.alias=g_.thinAlias(_)}addRoutes(..._){for(let T of _)if(!this.routes.includes(T))this.routes.push(T);return this}bind(_){for(let T of this.routes)T.bind(_);return this}execute(){let _=new Map;for(let T of this.routes)_.set(`${this.alias}:::${T.eventName}`,T.execute());return _}static thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class IT{rawPrefix;prefix;routers=[];constructor(_="/"){this.rawPrefix=_;this.prefix=IT.thinPrefix(_)}addRouters(..._){for(let T=0;T<_.length;T++)if(!this.routers.includes(_[T]))this.routers.push(_[T]);for(let T of _)if(!this.routers.includes(T))this.routers.push(T);return this}execute(){let _=new Map;for(let T of this.routers){let f=T.execute();for(let[C,E]of f.entries())_.set(`/${IT.thinPrefix(`${this.prefix}/${C}`)}`,E)}return _}static thinPrefix(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class n_{classConstructor;options;#T;#C;#c=new Map;#E;#x=900;#R;#A=new a_;constructor(_,T){this.classConstructor=_;this.options=T;let f=Reflect.getOwnMetadataKeys(_);if(!f.includes(HT)&&!f.includes(cT))throw Error(`Can not detect! ${_.name} class is not a container or module.`);this.#C=!f.includes(HT)?"MODULE":"CONTAINER",this.#x=typeof T.static?.cacheTimeInSeconds!=="number"?900:T.static.cacheTimeInSeconds,this.#E=Object.freeze({allowLogsMethods:this.options?.log?.methods||[],staticOption:this.options.static,allowOrigins:!this.options.cors?.origins?["*"]:typeof this.options.cors.origins!=="string"?this.options.cors.origins.includes("*")||this.options.cors.origins.length<1?["*"]:this.options.cors.origins:[this.options.cors.origins!=="*"?this.options.cors.origins:"*"],allowMethods:this.options.cors?.methods||Pf,allowCredentials:!this.options.cors?.credentials?!1:!0,allowHeaders:!this.options.cors?.headers||this.options.cors.headers.includes("*")?["*"]:this.options.cors.headers,pipelineStrategy:(()=>{switch(T.pipelineStrategy?.type){case"SIMPLE":return Object.freeze({startMiddlewares:"FIFO",endMiddlewares:T.pipelineStrategy.targets?.middlewares||"FIFO",openInterceptors:"FIFO",closeInterceptors:T.pipelineStrategy.targets?.interceptors||"FIFO"});default:return Object.freeze({startMiddlewares:"FIFO",endMiddlewares:"FIFO",openInterceptors:"FIFO",closeInterceptors:"FIFO"})}})()})}static async create(_,T){let f=new n_(_,T);return await f.preLaunch(),f}useValidator(_){this.#R=_}async preLaunch(){if(this.#T)return this.#T;let{startMiddlewareHandlers:_,endMiddlewareHandlers:T,controllerRouterGroup:f,webSocketHttpRouterGroup:C,webSocketRouterGroup:E}=this.#C!=="MODULE"?await this.#q({containerClass:this.classConstructor,prefix:this.options.prefix,options:this.options}):await this.#S({moduleClass:this.classConstructor,prefix:this.options.prefix,options:this.options}),A=new Map,c=E.execute();for(let[u,S]of c.entries())A.set(u,S);return this.#T=Object.freeze({startMiddlewareHandlers:_,endMiddlewareHandlers:T,controllerRouterGroup:f,webSocketHttpRouterGroup:C,webSocketRouterGroup:E,webSocketsMap:A}),this.#T}async listen(){let _=ax({port:this.options.port,idleTimeout:typeof this.options.idleTimeoutInSeconds!=="number"||this.options.idleTimeoutInSeconds<=0?void 0:this.options.idleTimeoutInSeconds,fetch:this.#u.bind(this),websocket:await this.#H.bind(this)()});this.#A.set(TT,_)}async#u(_,T){let{allowLogsMethods:f,allowOrigins:C,allowMethods:E,allowHeaders:A,allowCredentials:c,staticOption:u}=this.#E,{startMiddlewareHandlers:S,endMiddlewareHandlers:U,controllerRouterGroup:z,webSocketHttpRouterGroup:q}=await this.preLaunch(),x=performance.now(),Q=new URL(_.url),Y=QA.parse(Q.searchParams.toString(),this.options.queryParser),W=_.headers.get("origin")||"*",P=_.method.toUpperCase(),L=new Headers,r=new a_().setOptions({isStatic:!0}).set(FT,T).set(UT,_).set(qT,_.headers).set(RT,L).set(F_,Y);try{if([...!c?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:C.includes("*")?"*":!C.includes(W)?C[0]:W},{key:"Access-Control-Allow-Methods",value:E.join(", ")},{key:"Access-Control-Allow-Headers",value:A.join(", ")}].forEach(({key:$,value:b})=>L.set($,b)),!WA(P)||!E.includes(P))return this.finalizeResponse(new Response(void 0,{...p.clientErrorStatuses.METHOD_NOT_ALLOWED,headers:L}));if(UA(_))return await this.#L({request:_,server:T,context:r,url:Q,query:Y,method:P,responseHeaders:L,httpRouterGroup:q,startMiddlewareHandlers:S,endMiddlewareHandlers:U});if(_.method.toUpperCase()==="OPTIONS")return this.finalizeResponse(C.includes("*")||C.includes(W)?new Response(void 0,{...p.successfulStatuses.NO_CONTENT,headers:L}):new Response(void 0,{...p.clientErrorStatuses.EXPECTATION_FAILED,headers:L}));if(u){let $=await this.#z({url:Q,responseHeaders:L,path:u.path,headers:u.headers,cacheTimeInSeconds:u.cacheTimeInSeconds});if($ instanceof Response)return $}return await this.#F({url:Q,method:P,context:r,httpRouterGroup:z,startMiddlewareHandlers:S,endMiddlewareHandlers:U})}catch(n){return this.options.debug&&console.error(n),this.finalizeResponse(YA(n,L))}finally{if(f){let n=performance.now(),j=r.get(bT,{isStatic:!1}),$=typeof j!=="number"||!j?0:j,b=DT(Q.pathname,{color:"blue"}),k=`${Bun.color("yellow","ansi")}${process.pid}`,G=DT(` ${_.method} `,{color:"yellow",backgroundColor:"blue"}),M=DT(`${_.headers.get("x-forwarded-for")||_.headers.get("x-real-ip")||T.requestIP(_)?.address||"<Unknown>"}`,{color:"yellow"}),N=Math.round((n-x+Number.EPSILON)*100)/100,V=DT(` ${N}ms `.padStart(10),(()=>{if(N>=500)return{color:"white",backgroundColor:"red"};if(N>=300)return{color:"black",backgroundColor:"yellow"};else return{color:"white",backgroundColor:"blue"}})()),s=DT(` ${$} `.padStart(5),(()=>{if($>=100&&$<200)return{color:"white",backgroundColor:"cyan"};else if($>=200&&$<300)return{color:"white",backgroundColor:"blue"};else if($>=300&&$<400)return{color:"black",backgroundColor:"magenta"};else if($>=400&&$<500)return{color:"black",backgroundColor:"yellow"};else if($>=500&&$<600)return{color:"white",backgroundColor:"red"};else return{color:"black",backgroundColor:"gray"}})());f.includes(_.method.toUpperCase())&&console.info([`PID: ${k}`,`Method: ${G}`,`Time: ${V}`,typeof j!=="number"||!j?void 0:`Status: ${s}`,`IP: ${M}`,b].filter((d)=>!!d).join(" - "))}}}async#H(){let{webSocketsMap:_}=await this.preLaunch();return{open:(T)=>{let f=`${T.data.pathname}:::open`,C=_.get(f);if(!C)return;let E=C.arguments||{},A=[];for(let[,c]of Object.entries(E))switch(c.type){case zT:A[c.index]=T;break;case TT:A[c.index]=this.#A.get(TT);break}C.descriptor.value(...A)},close:(T,f,C)=>{let E=`${T.data.pathname}:::close`,A=_.get(E);if(!A)return;let c=A.arguments||{},u=[];for(let[,S]of Object.entries(c))switch(S.type){case zT:u[S.index]=T;break;case L_:u[S.index]=f;break;case z_:u[S.index]=C;break;case TT:u[S.index]=this.#A.get(TT);break}A.descriptor.value(...u)},message:(T,f)=>{let C=`${T.data.pathname}:::message`,E=_.get(C);if(!E)return;let A=E.arguments||{},c=[];for(let[,u]of Object.entries(A))switch(u.type){case zT:c[u.index]=T;break;case PT:c[u.index]=f;break;case TT:c[u.index]=this.#A.get(TT);break}E.descriptor.value(...c)},drain:(T)=>{let f=`${T.data.pathname}:::drain`,C=_.get(f);if(!C)return;let E=C.arguments||{},A=[];for(let[,c]of Object.entries(E))switch(c.type){case zT:A[c.index]=T;break;case TT:A[c.index]=this.#A.get(TT);break}C.descriptor.value(...A)},ping:(T,f)=>{let C=`${T.data.pathname}:::ping`,E=_.get(C);if(!E)return;let A=E.arguments||{},c=[];for(let[,u]of Object.entries(A))switch(u.type){case zT:c[u.index]=T;break;case PT:c[u.index]=f;break;case TT:c[u.index]=this.#A.get(TT);break}E.descriptor.value(...c)},pong:(T,f)=>{let C=`${T.data.pathname}:::pong`,E=_.get(C);if(!E)return;let A=E.arguments||{},c=[];for(let[,u]of Object.entries(A))switch(u.type){case zT:c[u.index]=T;break;case PT:c[u.index]=f;break;case TT:c[u.index]=this.#A.get(TT);break}E.descriptor.value(...c)}}}async#L({request:_,server:T,context:f,url:C,query:E,method:A,responseHeaders:c,httpRouterGroup:u,startMiddlewareHandlers:S,endMiddlewareHandlers:U}){try{await this.#f({type:"START_MIDDLEWARES",handlers:S,context:f});let z=u.find({pathname:C.pathname,method:A}),q=this.finalizeResponse(new Response(void 0,{...p.serverErrorStatuses.INTERNAL_SERVER_ERROR,headers:c}));if(z){let x=await this.#f({type:"GUARDS",handlers:z.guardHandlers,context:f});if(x!==!0)q=this.finalizeResponse(new Response(void 0,{...!x||x==="UNAUTHORIZATION"?p.clientErrorStatuses.UNAUTHORIZED:p.clientErrorStatuses.FORBIDDEN,headers:c}));else{f.set(xT,z.model),await this.#f({type:"OPEN_INTERCEPTORS",handlers:z.openInterceptorHandlers,context:f});let Q=await z.model.func(...[T,_,E]);if(await this.#f({type:"CLOSE_INTERCEPTORS",handlers:z.closeInterceptorHandlers,context:f}),typeof Q!=="boolean"||!Q)q=this.finalizeResponse(new Response(void 0,{...p.serverErrorStatuses.INTERNAL_SERVER_ERROR,headers:c}));else q=void 0}}return await this.#f({type:"END_MIDDLEWARES",handlers:U,context:f}),q}catch(z){throw console.error(z),z}}async#z({url:_,path:T,headers:f,cacheTimeInSeconds:C,responseHeaders:E}){let A=`${T}/${_.pathname}`,c=this.#c.get(A);if(!c){let u=Bun.file(A);if(await u.exists()){if(f)for(let[U,z]of Object.entries(f))E.set(U,z);return E.set("Content-Type",u.type),this.finalizeResponse(new Response(await u.arrayBuffer(),{...p.successfulStatuses.OK,headers:E}))}}else{let u=new Date>c.expiredAt;if(u)this.#c.delete(A);let S=!u?c.file:Bun.file(A);if(await S.exists()){if(this.#c.set(A,Object.freeze({expiredAt:AC(new Date,this.#x,CT.seconds),file:S})),f)for(let[z,q]of Object.entries(f))E.set(z,q);return E.set("Content-Type",S.type),this.finalizeResponse(new Response(await S.arrayBuffer(),{...p.successfulStatuses.OK,headers:E}))}}}async#F({context:_,url:T,method:f,httpRouterGroup:C,startMiddlewareHandlers:E=[],endMiddlewareHandlers:A=[]}){let c={isStatic:!0};_.setOptions(c),await this.#f({type:"START_MIDDLEWARES",handlers:E,context:_});let u=C.find({pathname:T.pathname,method:f});if(!u)_.setOptions({isStatic:!1}).set(bT,p.clientErrorStatuses.NOT_FOUND.status).set(aT,p.clientErrorStatuses.NOT_FOUND.statusText).set(eT,void 0);else{_.set(xT,u.model),_.set(oT,u.parameters);let x=await this.#f({type:"GUARDS",handlers:u.guardHandlers,context:_});if(x!==!0)_.setOptions({isStatic:!1}).set(bT,!x||x==="UNAUTHORIZATION"?p.clientErrorStatuses.UNAUTHORIZED.status:p.clientErrorStatuses.FORBIDDEN.status).set(aT,!x||x==="UNAUTHORIZATION"?p.clientErrorStatuses.UNAUTHORIZED.statusText:p.clientErrorStatuses.FORBIDDEN.statusText).set(eT,void 0);else await this.#f({type:"OPEN_INTERCEPTORS",handlers:u.openInterceptorHandlers,context:_}),await this.#f({type:"CONTROLLER",context:_}),await this.#f({type:"CLOSE_INTERCEPTORS",handlers:u.closeInterceptorHandlers,context:_})}await this.#f({type:"END_MIDDLEWARES",handlers:A,context:_});let S=_.get(RT,{isStatic:!0})||new Headers,U=_.get(eT,{isStatic:!1})||void 0,z=_.get(bT,{isStatic:!1}),q=_.get(aT,{isStatic:!1});return this.serializeResponse({status:typeof z!=="number"?f==="POST"?201:void 0:z,statusText:typeof q!=="string"?void 0:q,headers:S,data:U})}async#q({prefix:_="",startMiddlewareHandlers:T=[],endMiddlewareHandlers:f=[],guardHandlers:C=[],openInterceptorHandlers:E=[],closeInterceptorHandlers:A=[],controllerRouterGroup:c=new BT,webSocketHttpRouterGroup:u=new BT,webSocketRouterGroup:S=new IT,containerClass:U,options:z,extendInjector:q}){if(!Reflect.getOwnMetadataKeys(U).includes(HT))throw Error(`[${U.name}] is not a container.`);let x=!q?new VT:new VT(q),Q=Reflect.getOwnMetadata(HT,U),{loaders:Y,middlewares:W,dependencies:P,modules:L,guards:r,interceptors:n,prefix:j,config:$}=Q||{},{config:b}=Object.freeze({config:{...typeof z.config!=="function"?z.config:await z.config(),...typeof $!=="function"?typeof $!=="object"?void 0:("key"in $)&&("value"in $)&&typeof $.key==="symbol"?typeof $.value!=="function"?$.value:await $.value():$:await $()}});if(x.set($&&"key"in $&&"value"in $&&typeof $.key==="symbol"?$.key:K_,b),Y){let k=[];for(let[M,N]of Object.entries(Y))k.push(async()=>{try{let V=await N({config:b});return console.info(`${DT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${M}] initialized successfully.`),V}catch(V){throw console.error(`${DT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${M}] initialization failed.`),z.debug&&console.error(V),V}});let G=await Promise.all(k.map((M)=>M()));for(let[M,N]of G)x.set(M,N)}if(P){for(let k of P)if(!x.get(k))throw Error(`Can not collect dependency [${k.name}].`)}if(W){let k=(G,M)=>!!G;for(let G of W){let M=x.get(G);if(!M||!k(M,G))throw Error(`Can not collect middleware [${G.name}].`);if(M.start&&typeof M.start==="function"){let N=Reflect.getOwnMetadata(K,G,"start")||{};T.push(Object.freeze({class:G,funcName:"start",func:M.start.bind(M),argumentsMetadata:N}))}if(M.end&&typeof M.end==="function"){let N=Reflect.getOwnMetadata(K,G,"end")||{};f.push(Object.freeze({class:G,funcName:"end",func:M.end.bind(M),argumentsMetadata:N}))}}}if(r){let k=(G,M)=>!!G;for(let G of r){let M=x.get(G);if(!M||!k(M,G))throw Error(`Can not collect guard [${G.name}].`);let N=Reflect.getOwnMetadata(K,G,"enforce")||{};C.push(Object.freeze({class:G,funcName:"enforce",func:M.enforce.bind(M),argumentsMetadata:N}))}}if(n){let k=(G,M)=>!!G;for(let G of n){let M=x.get(G);if(!M||!k(M,G))throw Error(`Can not collect interceptor [${G.name}].`);if(M){if(M.open&&typeof M.open==="function"){let N=Reflect.getOwnMetadata(K,G,"open")||{};E.push(Object.freeze({class:G,funcName:"open",func:M.open.bind(M),argumentsMetadata:N}))}if(M.close&&typeof M.close==="function"){let N=Reflect.getOwnMetadata(K,G,"close")||{};A.push(Object.freeze({class:G,funcName:"close",func:M.close.bind(M),argumentsMetadata:N}))}}}}if(L){let k=[_.trim(),j?.trim()||""].filter((G)=>G.length>0).join("/");for(let G of L)try{await this.#S({prefix:k,moduleClass:G,extendInjector:x,options:z,startMiddlewareHandlers:T,endMiddlewareHandlers:f,guardHandlers:[...C],openInterceptorHandlers:[...E],closeInterceptorHandlers:[...A],controllerRouterGroup:c,webSocketHttpRouterGroup:u,webSocketRouterGroup:S})}catch(M){throw console.group(`Can not resolve module: [${G.name}].`),console.error(M),console.groupEnd(),M}}return Object.freeze({startMiddlewareHandlers:T,endMiddlewareHandlers:f,controllerRouterGroup:c,webSocketHttpRouterGroup:u,webSocketRouterGroup:S})}async#S({prefix:_="",startMiddlewareHandlers:T=[],endMiddlewareHandlers:f=[],guardHandlers:C=[],openInterceptorHandlers:E=[],closeInterceptorHandlers:A=[],controllerRouterGroup:c=new BT,webSocketHttpRouterGroup:u=new BT,webSocketRouterGroup:S=new IT,moduleClass:U,options:z,extendInjector:q}){if(!Reflect.getOwnMetadataKeys(U).includes(cT))throw Error(`[${U.name}] is not a module.`);let x=!q?new VT:new VT(q),Q=Reflect.getOwnMetadata(cT,U),{loaders:Y,middlewares:W,guards:P,interceptors:L,controllers:r,dependencies:n,webSockets:j,prefix:$,config:b}=Q||{},k=[_.trim(),$?.trim()||""].filter((M)=>M.length>0).join("/"),{config:G}=Object.freeze({config:!b?void 0:{...typeof z.config!=="function"?z.config:await z.config(),...typeof b!=="function"?typeof b!=="object"?void 0:("key"in b)&&("value"in b)&&typeof b.key==="symbol"?typeof b.value!=="function"?b.value:await b.value():b:await b()}});if(G&&x.set(b&&"key"in b&&"value"in b&&typeof b.key==="symbol"?b.key:K_,G),Y){let M=[];for(let[V,s]of Object.entries(Y))M.push(async()=>{try{let d=await s({config:G});return console.info(`${DT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${V}] initialized successfully.`),d}catch(d){throw console.error(`${DT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${V}] initialization failed.`),z.debug&&console.error(d),d}});let N=await Promise.all(M.map((V)=>V()));for(let V=0;V<N.length;V++){let[s,d]=N[V];x.set(s,d)}}if(n){for(let M of n)if(!x.get(M))throw Error(`Can not collect dependency [${M.name}].`)}if(W){let M=(N,V)=>!!N;for(let N of W){let V=x.get(N);if(!V||!M(V,N))throw Error(`Can not collect middleware [${N.name}].`);if(V.start&&typeof V.start==="function"){let s=Reflect.getOwnMetadata(K,N,"start")||{};T.push(Object.freeze({class:N,funcName:"start",func:V.start.bind(V),argumentsMetadata:s}))}if(V.end&&typeof V.end==="function"){let s=Reflect.getOwnMetadata(K,N,"end")||{};f.push(Object.freeze({class:N,funcName:"end",func:V.end.bind(V),argumentsMetadata:s}))}}}if(P){let M=(N,V)=>!!N;for(let N of P){let V=x.get(N);if(!V||!M(V,N))throw Error(`Can not collect guard [${N.name}].`);let s=Reflect.getOwnMetadata(K,N,"enforce")||{};C.push(Object.freeze({class:N,funcName:"enforce",func:V.enforce.bind(V),argumentsMetadata:s}))}}if(L){let M=(N,V)=>!!N;for(let N of L){let V=x.get(N);if(!V||!M(V,N))throw Error(`Can not collect interceptor [${N.name}].`);if(V){if(V.open&&typeof V.open==="function"){let s=Reflect.getOwnMetadata(K,N,"open")||{};E.push(Object.freeze({class:N,funcName:"open",func:V.open.bind(V),argumentsMetadata:s}))}if(V.close&&typeof V.close==="function"){let s=Reflect.getOwnMetadata(K,N,"close")||{};A.push(Object.freeze({class:N,funcName:"close",func:V.close.bind(V),argumentsMetadata:s}))}}}}if(r)for(let M of r)this.#U({controllerConstructor:M,prefix:k,injector:x,httpRouterGroup:c,guardHandlers:[...C],openInterceptorHandlers:[...E],closeInterceptorHandlers:[...A]});if(j)for(let M of j)this.#W({webSocketConstructor:M,injector:x,prefix:k,webSocketHttpRouterGroup:u,webSocketRouterGroup:S});return Object.freeze({startMiddlewareHandlers:T,endMiddlewareHandlers:f,controllerRouterGroup:c,webSocketHttpRouterGroup:u,webSocketRouterGroup:S})}#U({controllerConstructor:_,prefix:T="",injector:f=new VT,httpRouterGroup:C=new BT,guardHandlers:E=[],openInterceptorHandlers:A=[],closeInterceptorHandlers:c=[]}){if(!Reflect.getOwnMetadataKeys(_).includes(uT))throw Error(`[${_.name}] is not a controller.`);let u=f.get(_);if(!u)throw Error("Can not initialize controller.");let S=Reflect.getOwnMetadata(uT,_)||{prefix:"/",httpMetadata:[]},U=[T.trim(),S.prefix.trim()].filter((q)=>q.length>0).join("/"),z=new G_({alias:U,guardHandlers:E,openInterceptorHandlers:A,closeInterceptorHandlers:c});for(let q of S.httpMetadata){if(typeof q.descriptor.value!=="function")continue;let x=z.route({alias:q.path}),Q=q.descriptor.value.bind(u),Y=Object.freeze({class:_,funcName:q.methodName,func:Q,argumentsMetadata:q.argumentsMetadata});switch(q.httpMethod){case"GET":x.get({model:Y});break;case"POST":x.post({model:Y});break;case"PUT":x.put({model:Y});break;case"PATCH":x.patch({model:Y});break;case"DELETE":x.delete({model:Y});break;case"OPTIONS":x.options({model:Y});break}}return C.add(z)}async#_({data:_,validationSchema:T,argumentIndex:f,funcName:C}){if(!this.#R)return _;try{let E=await this.#R.validate(_,T,f,C);if(!(E instanceof Tf))return E;throw new S_({httpCode:400,message:`Validation at the [${C.toString()}] method fails at positional argument [${f}].`,data:E.error})}catch(E){if(E instanceof S_)throw E;throw new V_({httpCode:500,message:`Validation at the [${C.toString()}] method error at positional argument [${f}].`,data:!(E instanceof Error)?E:[{message:E.message,code:E.name,cause:E.cause}]})}}#W({webSocketConstructor:_,prefix:T="",injector:f=new VT,webSocketHttpRouterGroup:C=new BT,webSocketRouterGroup:E=new IT,guardHandlers:A=[],openInterceptorHandlers:c=[],closeInterceptorHandlers:u=[]}){if(!Reflect.getOwnMetadataKeys(_).includes(LT))throw Error(`[${_.name}] is not a websocket route.`);let S=f.get(_);if(!S)throw Error("Can not initialize webSocket.");let U=Reflect.getOwnMetadata(LT,_)||{prefix:"/",events:[],http:[]},z=`/${T}/${U.prefix}`,q=new G_({alias:z,guardHandlers:A,openInterceptorHandlers:c,closeInterceptorHandlers:u});for(let[Q,Y]of Object.entries(U.http)){if(typeof Y.descriptor?.value!=="function")continue;let W=q.route({alias:Y.path}),P=Y.descriptor.value.bind(S),L=Object.freeze({class:_,funcName:Y.methodName,func:P,argumentsMetadata:Y.argumentsMetadata});switch(Y.httpMethod){case"GET":W.get({model:L});break;case"POST":W.post({model:L});break}}C.add(q);let x=new g_(z);for(let[Q,Y]of Object.entries(U.events)){let W=new _f({eventName:Q,metadata:Y});x.addRoutes(W)}return x.bind(S),E.addRouters(x),Object.freeze({webSocketHttpRouterGroup:C,webSocketRouterGroup:E})}async#f({type:_,handlers:T,context:f}){let C={isStatic:!0};f.setOptions(C);let E=f.get(FT,C)||void 0,A=f.get(UT,C)||void 0,c=f.get(qT,C)||void 0,u=f.get(RT,C)||void 0,S=f.get(oT,C)||void 0,U=f.get(xT,C)||void 0;if(_==="START_MIDDLEWARES"||_==="END_MIDDLEWARES"){let z=_==="START_MIDDLEWARES"?this.#E.pipelineStrategy.startMiddlewares:this.#E.pipelineStrategy.endMiddlewares;for(let q=z==="FIFO"?0:T.length-1;z==="FIFO"?q<T.length:q>-1;z==="FIFO"?q++:q--){let x=[],{func:Q,funcName:Y,argumentsMetadata:W}=T[q];for(let[P,L]of Object.entries(W))switch(L.type){case $T:x[L.index]=!L.key?f:f.get(L.key,C);break;case UT:x[L.index]=A;break;case nT:x[L.index]=!L.validationSchema?await A?.[L.parser||"json"]():await this.#_({data:await A?.[L.parser||"json"](),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case gT:x[L.index]=!L.validationSchema?c:await this.#_({data:c?.toJSON(),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case qT:x[L.index]=!L.validationSchema?c?.get(L.key)||void 0:await this.#_({data:c?.get(L.key)||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case OT:x[L.index]=!L.validationSchema?S?.[L.key]||void 0:await this.#_({data:S?.[L.key]||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case xT:x[L.index]=void 0;break;case RT:x[L.index]=u;break;case FT:x[L.index]=E;break;default:x[L.index]=!L.validationSchema?f.get(L.type,C):await this.#_({data:f.get(L.type,C),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break}await Q(...x)}}else if(_==="GUARDS"){if(!U||T.length===0)return!0;for(let z=0;z<T.length;z++){let q=[],{func:x,funcName:Q,argumentsMetadata:Y}=T[z];for(let[P,L]of Object.entries(Y))switch(L.type){case UT:q[L.index]=A;break;case nT:q[L.index]=!L.validationSchema?await A?.[L.parser||"json"]():await this.#_({data:await A?.[L.parser||"json"](),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case $T:q[L.index]=!L.key?f:f.get(L.key);break;case gT:q[L.index]=!L.validationSchema?c:await this.#_({data:c?.toJSON(),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case RT:q[L.index]=u;break;case qT:q[L.index]=!L.validationSchema?c?.get(L.key)||void 0:await this.#_({data:c?.get(L.key)||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case OT:q[L.index]=!L.validationSchema?S?.[L.key]||void 0:await this.#_({data:S?.[L.key],validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case xT:q[L.index]=U;break;case FT:q[L.index]=E;break;default:q[L.index]=!L.validationSchema?f.get(L.type):await this.#_({data:f.get(L.type),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break}let W=await x(...q);if(W!==!0)return W}return!0}else if(_==="OPEN_INTERCEPTORS"||_==="CLOSE_INTERCEPTORS"){if(!U)return;let z=_==="OPEN_INTERCEPTORS"?this.#E.pipelineStrategy.openInterceptors:this.#E.pipelineStrategy.closeInterceptors;for(let q=z==="FIFO"?0:T.length-1;z==="FIFO"?q<T.length:q>-1;z==="FIFO"?q++:q--){let x=[],{func:Q,funcName:Y,argumentsMetadata:W}=T[q];for(let[P,L]of Object.entries(W))switch(L.type){case UT:x[L.index]=A;break;case nT:x[L.index]=!L.validationSchema?await A?.[L.parser||"json"]():await this.#_({data:await A?.[L.parser||"json"](),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case $T:x[L.index]=!L.key?f:f.get(L.key);break;case gT:x[L.index]=!L.validationSchema?c:await this.#_({data:c?.toJSON(),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case qT:x[L.index]=!L.validationSchema?c?.get(L.key)||void 0:await this.#_({data:c?.get(L.key)||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case RT:x[L.index]=u;break;case OT:x[L.index]=!L.validationSchema?S?.[L.key]||void 0:await this.#_({data:S?.[L.key]||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case xT:x[L.index]=U;break;case FT:x[L.index]=E;break;default:x[L.index]=!L.validationSchema?f.get(L.type):await this.#_({data:f.get(L.type),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break}await Q(...x)}}else if(_==="CONTROLLER"){if(!U){f.setOptions({isStatic:!1}).set(bT,404).set(aT,"Not found.");return}let z=[],{func:q,funcName:x,argumentsMetadata:Q}=U;for(let[Y,W]of Object.entries(Q))switch(W.type){case UT:z[W.index]=A;break;case nT:z[W.index]=!W.validationSchema?await A?.[W.parser||"json"]():await this.#_({data:await A?.[W.parser||"json"](),validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case $T:z[W.index]=!W.key?f:f.get(W.key);break;case gT:z[W.index]=!W.validationSchema?c:await this.#_({data:c?.toJSON(),validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case qT:z[W.index]=!W.validationSchema?c?.get(W.key)||void 0:await this.#_({data:c?.get(W.key)||void 0,validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case RT:z[W.index]=u;break;case OT:z[W.index]=!W.validationSchema?S?.[W.key]||void 0:await this.#_({data:S?.[W.key]||void 0,validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case xT:z[W.index]=U;break;case FT:z[W.index]=E;break;default:z[W.index]=!W.validationSchema?f.get(W.type):await this.#_({data:f.get(W.type),validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break}f.set(eT,await q(...z),{isStatic:!1})}return}serializeResponse({status:_,statusText:T,headers:f,data:C}){let E=f.get("Content-Type")||"text/plain",A=!_?!C?204:200:_,c=x_(A);if(E.includes("application/json"))return this.finalizeResponse(new Response(!C?void 0:C instanceof ReadableStream?C:JSON.stringify(C),{status:A,statusText:c,headers:f}));if(E.includes("text/plain")||E.includes("text/html"))return this.finalizeResponse(new Response(!C?void 0:C instanceof ReadableStream?C:String(C),{status:A,statusText:c,headers:f}));if(E.includes("application/octet-stream")){if(C instanceof Uint8Array||C instanceof ArrayBuffer||C instanceof Blob||C instanceof ReadableStream)return this.finalizeResponse(new Response(C,{status:A,statusText:c,headers:f}));throw Error("Invalid data type for application/octet-stream")}if(E.includes("multipart/form-data")){if(C instanceof FormData)return this.finalizeResponse(new Response(C,{status:A,statusText:c,headers:f}));throw Error("multipart/form-data requires FormData object")}return this.finalizeResponse(new Response(!C?void 0:String(C),{status:A,statusText:c,headers:f}))}finalizeResponse(_){return _.headers.set("X-Powered-By","Bool Typescript"),_}}var v1=$_(h_(),1);var T0=async(_,T)=>{try{let f=new n_(_,T);return await f.preLaunch(),f}catch(f){throw T.debug&&console.error(f),f}};export{YA as jsonErrorInfer,WA as httpMethodsStandardization,Pf as httpMethods,Dc as WebSocketServer,IT as WebSocketRouterGroup,g_ as WebSocketRouter,_f as WebSocketRoute,Jc as WebSocketMessage,Nc as WebSocketEvent,Qc as WebSocketConnection,Xc as WebSocketCloseReason,Mc as WebSocketCloseCode,wc as WebSocket,Tf as ValidationFailed,fc as RouteModel,Tc as ResponseHeaders,yA as RequestHeaders,iA as RequestHeader,rA as RequestBody,aA as Request,eA as Query,Sc as Put,xc as Post,uc as Patch,pA as Params,oA as Param,Lc as Options,p as Objects,Wc as Module,Uc as Middleware,af as Keys,qc as Interceptor,VT as Injector,Fc as Injectable,zc as Inject,V_ as HttpServerError,Cc as HttpServer,BT as HttpRouterGroup,G_ as HttpRouter,bf as HttpRoute,S_ as HttpClientError,cc as Guard,Rc as Get,Hc as Delete,Ac as Controller,_c as Context,Ec as Container,T0 as BoolFactory,n_ as Application};
|
|
15
|
+
***************************************************************************** */var o_;(function(C){(function(T){var _=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:u(),f=c(C);if(typeof _.Reflect<"u")f=c(_.Reflect,f);if(T(f,_),typeof _.Reflect>"u")_.Reflect=C;function c(S,U){return function(z,q){if(Object.defineProperty(S,z,{configurable:!0,writable:!0,value:q}),U)U(z,q)}}function E(){try{return Function("return this;")()}catch(S){}}function A(){try{return(0,eval)("(function() { return this; })()")}catch(S){}}function u(){return E()||A()}})(function(T,_){var f=Object.prototype.hasOwnProperty,c=typeof Symbol==="function",E=c&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",A=c&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",u=typeof Object.create==="function",S={__proto__:[]}instanceof Array,U=!u&&!S,z={create:u?function(){return c_(Object.create(null))}:S?function(){return c_({__proto__:null})}:function(){return c_({})},has:U?function(R,H){return f.call(R,H)}:function(R,H){return H in R},get:U?function(R,H){return f.call(R,H)?R[H]:void 0}:function(R,H){return R[H]}},q=Object.getPrototypeOf(Function),x=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:gE(),Q=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:OE(),Y=typeof WeakMap==="function"?WeakMap:$E(),W=c?Symbol.for("@reflect-metadata:registry"):void 0,P=BE(),L=nE(P);function r(R,H,F,w){if(!O(F)){if(!s_(R))throw TypeError();if(!l(H))throw TypeError();if(!l(w)&&!O(w)&&!yT(w))throw TypeError();if(yT(w))w=void 0;return F=ST(F),j(R,H,F,w)}else{if(!s_(R))throw TypeError();if(!t_(H))throw TypeError();return s(R,H)}}T("decorate",r);function g(R,H){function F(w,Z){if(!l(w))throw TypeError();if(!O(Z)&&!VE(Z))throw TypeError();OC(R,H,w,Z)}return F}T("metadata",g);function d(R,H,F,w){if(!l(F))throw TypeError();if(!O(w))w=ST(w);return OC(R,H,F,w)}T("defineMetadata",d);function $(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return cT(R,H,F)}T("hasMetadata",$);function b(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return _T(R,H,F)}T("hasOwnMetadata",b);function k(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return nT(R,H,F)}T("getMetadata",k);function n(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);return jT(R,H,F)}T("getOwnMetadata",n);function M(R,H){if(!l(R))throw TypeError();if(!O(H))H=ST(H);return uC(R,H)}T("getMetadataKeys",M);function N(R,H){if(!l(R))throw TypeError();if(!O(H))H=ST(H);return lT(R,H)}T("getOwnMetadataKeys",N);function B(R,H,F){if(!l(H))throw TypeError();if(!O(F))F=ST(F);if(!l(H))throw TypeError();if(!O(F))F=ST(F);var w=HC(H,F,!1);if(O(w))return!1;return w.OrdinaryDeleteMetadata(R,H,F)}T("deleteMetadata",B);function s(R,H){for(var F=R.length-1;F>=0;--F){var w=R[F],Z=w(H);if(!O(Z)&&!yT(Z)){if(!t_(Z))throw TypeError();H=Z}}return H}function j(R,H,F,w){for(var Z=R.length-1;Z>=0;--Z){var y=R[Z],o=y(H,F,w);if(!O(o)&&!yT(o)){if(!l(o))throw TypeError();w=o}}return w}function cT(R,H,F){var w=_T(R,H,F);if(w)return!0;var Z=f_(H);if(!yT(Z))return cT(R,Z,F);return!1}function _T(R,H,F){var w=HC(H,F,!1);if(O(w))return!1;return v_(w.OrdinaryHasOwnMetadata(R,H,F))}function nT(R,H,F){var w=_T(R,H,F);if(w)return jT(R,H,F);var Z=f_(H);if(!yT(Z))return nT(R,Z,F);return}function jT(R,H,F){var w=HC(H,F,!1);if(O(w))return;return w.OrdinaryGetOwnMetadata(R,H,F)}function OC(R,H,F,w){var Z=HC(F,w,!0);Z.OrdinaryDefineOwnMetadata(R,H,F,w)}function uC(R,H){var F=lT(R,H),w=f_(R);if(w===null)return F;var Z=uC(w,H);if(Z.length<=0)return F;if(F.length<=0)return Z;var y=new Q,o=[];for(var h=0,D=F;h<D.length;h++){var X=D[h],J=y.has(X);if(!J)y.add(X),o.push(X)}for(var V=0,m=Z;V<m.length;V++){var X=m[V],J=y.has(X);if(!J)y.add(X),o.push(X)}return o}function lT(R,H){var F=HC(R,H,!1);if(!F)return[];return F.OrdinaryOwnMetadataKeys(R,H)}function k_(R){if(R===null)return 1;switch(typeof R){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return R===null?1:6;default:return 6}}function O(R){return R===void 0}function yT(R){return R===null}function ME(R){return typeof R==="symbol"}function l(R){return typeof R==="object"?R!==null:typeof R==="function"}function XE(R,H){switch(k_(R)){case 0:return R;case 1:return R;case 2:return R;case 3:return R;case 4:return R;case 5:return R}var F=H===3?"string":H===5?"number":"default",w=d_(R,E);if(w!==void 0){var Z=w.call(R,F);if(l(Z))throw TypeError();return Z}return JE(R,F==="default"?"number":F)}function JE(R,H){if(H==="string"){var F=R.toString;if(iT(F)){var w=F.call(R);if(!l(w))return w}var Z=R.valueOf;if(iT(Z)){var w=Z.call(R);if(!l(w))return w}}else{var Z=R.valueOf;if(iT(Z)){var w=Z.call(R);if(!l(w))return w}var y=R.toString;if(iT(y)){var w=y.call(R);if(!l(w))return w}}throw TypeError()}function v_(R){return!!R}function NE(R){return""+R}function ST(R){var H=XE(R,3);if(ME(H))return H;return NE(H)}function s_(R){return Array.isArray?Array.isArray(R):R instanceof Object?R instanceof Array:Object.prototype.toString.call(R)==="[object Array]"}function iT(R){return typeof R==="function"}function t_(R){return typeof R==="function"}function VE(R){switch(k_(R)){case 3:return!0;case 4:return!0;default:return!1}}function __(R,H){return R===H||R!==R&&H!==H}function d_(R,H){var F=R[H];if(F===void 0||F===null)return;if(!iT(F))throw TypeError();return F}function j_(R){var H=d_(R,A);if(!iT(H))throw TypeError();var F=H.call(R);if(!l(F))throw TypeError();return F}function l_(R){return R.value}function y_(R){var H=R.next();return H.done?!1:H}function i_(R){var H=R.return;if(H)H.call(R)}function f_(R){var H=Object.getPrototypeOf(R);if(typeof R!=="function"||R===q)return H;if(H!==q)return H;var F=R.prototype,w=F&&Object.getPrototypeOf(F);if(w==null||w===Object.prototype)return H;var Z=w.constructor;if(typeof Z!=="function")return H;if(Z===R)return H;return Z}function ZE(){var R;if(!O(W)&&typeof _.Reflect<"u"&&!(W in _.Reflect)&&typeof _.Reflect.defineMetadata==="function")R=GE(_.Reflect);var H,F,w,Z=new Y,y={registerProvider:o,getProvider:D,setProvider:J};return y;function o(V){if(!Object.isExtensible(y))throw Error("Cannot add provider to a frozen registry.");switch(!0){case R===V:break;case O(H):H=V;break;case H===V:break;case O(F):F=V;break;case F===V:break;default:if(w===void 0)w=new Q;w.add(V);break}}function h(V,m){if(!O(H)){if(H.isProviderFor(V,m))return H;if(!O(F)){if(F.isProviderFor(V,m))return H;if(!O(w)){var v=j_(w);while(!0){var i=y_(v);if(!i)return;var ET=l_(i);if(ET.isProviderFor(V,m))return i_(v),ET}}}}if(!O(R)&&R.isProviderFor(V,m))return R;return}function D(V,m){var v=Z.get(V),i;if(!O(v))i=v.get(m);if(!O(i))return i;if(i=h(V,m),!O(i)){if(O(v))v=new x,Z.set(V,v);v.set(m,i)}return i}function X(V){if(O(V))throw TypeError();return H===V||F===V||!O(w)&&w.has(V)}function J(V,m,v){if(!X(v))throw Error("Metadata provider not registered.");var i=D(V,m);if(i!==v){if(!O(i))return!1;var ET=Z.get(V);if(O(ET))ET=new x,Z.set(V,ET);ET.set(m,v)}return!0}}function BE(){var R;if(!O(W)&&l(_.Reflect)&&Object.isExtensible(_.Reflect))R=_.Reflect[W];if(O(R))R=ZE();if(!O(W)&&l(_.Reflect)&&Object.isExtensible(_.Reflect))Object.defineProperty(_.Reflect,W,{enumerable:!1,configurable:!1,writable:!1,value:R});return R}function nE(R){var H=new Y,F={isProviderFor:function(X,J){var V=H.get(X);if(O(V))return!1;return V.has(J)},OrdinaryDefineOwnMetadata:o,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:y,OrdinaryOwnMetadataKeys:h,OrdinaryDeleteMetadata:D};return P.registerProvider(F),F;function w(X,J,V){var m=H.get(X),v=!1;if(O(m)){if(!V)return;m=new x,H.set(X,m),v=!0}var i=m.get(J);if(O(i)){if(!V)return;if(i=new x,m.set(J,i),!R.setProvider(X,J,F)){if(m.delete(J),v)H.delete(X);throw Error("Wrong provider for target.")}}return i}function Z(X,J,V){var m=w(J,V,!1);if(O(m))return!1;return v_(m.has(X))}function y(X,J,V){var m=w(J,V,!1);if(O(m))return;return m.get(X)}function o(X,J,V,m){var v=w(V,m,!0);v.set(X,J)}function h(X,J){var V=[],m=w(X,J,!1);if(O(m))return V;var v=m.keys(),i=j_(v),ET=0;while(!0){var r_=y_(i);if(!r_)return V.length=ET,V;var hE=l_(r_);try{V[ET]=hE}catch(KE){try{i_(i)}finally{throw KE}}ET++}}function D(X,J,V){var m=w(J,V,!1);if(O(m))return!1;if(!m.delete(X))return!1;if(m.size===0){var v=H.get(J);if(!O(v)){if(v.delete(V),v.size===0)H.delete(v)}}return!0}}function GE(R){var{defineMetadata:H,hasOwnMetadata:F,getOwnMetadata:w,getOwnMetadataKeys:Z,deleteMetadata:y}=R,o=new Y,h={isProviderFor:function(D,X){var J=o.get(D);if(!O(J)&&J.has(X))return!0;if(Z(D,X).length){if(O(J))J=new Q,o.set(D,J);return J.add(X),!0}return!1},OrdinaryDefineOwnMetadata:H,OrdinaryHasOwnMetadata:F,OrdinaryGetOwnMetadata:w,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:y};return h}function HC(R,H,F){var w=P.getProvider(R,H);if(!O(w))return w;if(F){if(P.setProvider(R,H,L))return L;throw Error("Illegal state.")}return}function gE(){var R={},H=[],F=function(){function h(D,X,J){this._index=0,this._keys=D,this._values=X,this._selector=J}return h.prototype["@@iterator"]=function(){return this},h.prototype[A]=function(){return this},h.prototype.next=function(){var D=this._index;if(D>=0&&D<this._keys.length){var X=this._selector(this._keys[D],this._values[D]);if(D+1>=this._keys.length)this._index=-1,this._keys=H,this._values=H;else this._index++;return{value:X,done:!1}}return{value:void 0,done:!0}},h.prototype.throw=function(D){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;throw D},h.prototype.return=function(D){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;return{value:D,done:!0}},h}(),w=function(){function h(){this._keys=[],this._values=[],this._cacheKey=R,this._cacheIndex=-2}return Object.defineProperty(h.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),h.prototype.has=function(D){return this._find(D,!1)>=0},h.prototype.get=function(D){var X=this._find(D,!1);return X>=0?this._values[X]:void 0},h.prototype.set=function(D,X){var J=this._find(D,!0);return this._values[J]=X,this},h.prototype.delete=function(D){var X=this._find(D,!1);if(X>=0){var J=this._keys.length;for(var V=X+1;V<J;V++)this._keys[V-1]=this._keys[V],this._values[V-1]=this._values[V];if(this._keys.length--,this._values.length--,__(D,this._cacheKey))this._cacheKey=R,this._cacheIndex=-2;return!0}return!1},h.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=R,this._cacheIndex=-2},h.prototype.keys=function(){return new F(this._keys,this._values,Z)},h.prototype.values=function(){return new F(this._keys,this._values,y)},h.prototype.entries=function(){return new F(this._keys,this._values,o)},h.prototype["@@iterator"]=function(){return this.entries()},h.prototype[A]=function(){return this.entries()},h.prototype._find=function(D,X){if(!__(this._cacheKey,D)){this._cacheIndex=-1;for(var J=0;J<this._keys.length;J++)if(__(this._keys[J],D)){this._cacheIndex=J;break}}if(this._cacheIndex<0&&X)this._cacheIndex=this._keys.length,this._keys.push(D),this._values.push(void 0);return this._cacheIndex},h}();return w;function Z(h,D){return h}function y(h,D){return D}function o(h,D){return[h,D]}}function OE(){var R=function(){function H(){this._map=new x}return Object.defineProperty(H.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),H.prototype.has=function(F){return this._map.has(F)},H.prototype.add=function(F){return this._map.set(F,F),this},H.prototype.delete=function(F){return this._map.delete(F)},H.prototype.clear=function(){this._map.clear()},H.prototype.keys=function(){return this._map.keys()},H.prototype.values=function(){return this._map.keys()},H.prototype.entries=function(){return this._map.entries()},H.prototype["@@iterator"]=function(){return this.keys()},H.prototype[A]=function(){return this.keys()},H}();return R}function $E(){var R=16,H=z.create(),F=w();return function(){function D(){this._key=w()}return D.prototype.has=function(X){var J=Z(X,!1);return J!==void 0?z.has(J,this._key):!1},D.prototype.get=function(X){var J=Z(X,!1);return J!==void 0?z.get(J,this._key):void 0},D.prototype.set=function(X,J){var V=Z(X,!0);return V[this._key]=J,this},D.prototype.delete=function(X){var J=Z(X,!1);return J!==void 0?delete J[this._key]:!1},D.prototype.clear=function(){this._key=w()},D}();function w(){var D;do D="@@WeakMap@@"+h();while(z.has(H,D));return H[D]=!0,D}function Z(D,X){if(!f.call(D,F)){if(!X)return;Object.defineProperty(D,F,{value:z.create()})}return D[F]}function y(D,X){for(var J=0;J<X;++J)D[J]=Math.random()*255|0;return D}function o(D){if(typeof Uint8Array==="function"){var X=new Uint8Array(D);if(typeof crypto<"u")crypto.getRandomValues(X);else if(typeof msCrypto<"u")msCrypto.getRandomValues(X);else y(X,D);return X}return y(Array(D),D)}function h(){var D=o(R);D[6]=D[6]&79|64,D[8]=D[8]&191|128;var X="";for(var J=0;J<R;++J){var V=D[J];if(J===4||J===6||J===8)X+="-";if(V<16)X+="0";X+=V.toString(16).toLowerCase()}return X}}function c_(R){return R.__=void 0,delete R.__,R}})})(o_||(o_={}))});var kT=G((y0,Ef)=>{Ef.exports=TypeError});var Rf=G((i0,Af)=>{Af.exports=jE("util").inspect});var wC=G((r0,Zf)=>{var q_=typeof Map==="function"&&Map.prototype,A_=Object.getOwnPropertyDescriptor&&q_?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,PC=q_&&A_&&typeof A_.get==="function"?A_.get:null,xf=q_&&Map.prototype.forEach,U_=typeof Set==="function"&&Set.prototype,R_=Object.getOwnPropertyDescriptor&&U_?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,bC=U_&&R_&&typeof R_.get==="function"?R_.get:null,Sf=U_&&Set.prototype.forEach,ZA=typeof WeakMap==="function"&&WeakMap.prototype,UC=ZA?WeakMap.prototype.has:null,BA=typeof WeakSet==="function"&&WeakSet.prototype,WC=BA?WeakSet.prototype.has:null,nA=typeof WeakRef==="function"&&WeakRef.prototype,uf=nA?WeakRef.prototype.deref:null,GA=Boolean.prototype.valueOf,gA=Object.prototype.toString,OA=Function.prototype.toString,$A=String.prototype.match,W_=String.prototype.slice,hT=String.prototype.replace,hA=String.prototype.toUpperCase,Hf=String.prototype.toLowerCase,Qf=RegExp.prototype.test,Lf=Array.prototype.concat,WT=Array.prototype.join,KA=Array.prototype.slice,zf=Math.floor,u_=typeof BigInt==="function"?BigInt.prototype.valueOf:null,x_=Object.getOwnPropertySymbols,H_=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,CC=typeof Symbol==="function"&&typeof Symbol.iterator==="object",YC=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===CC?"object":"symbol")?Symbol.toStringTag:null,Df=Object.prototype.propertyIsEnumerable,Ff=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(C){return C.__proto__}:null);function qf(C,T){if(C===1/0||C===-1/0||C!==C||C&&C>-1000&&C<1000||Qf.call(/e/,T))return T;var _=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof C==="number"){var f=C<0?-zf(-C):zf(C);if(f!==C){var c=String(f),E=W_.call(T,c.length+1);return hT.call(c,_,"$&_")+"."+hT.call(hT.call(E,/([0-9]{3})/g,"$&_"),/_$/,"")}}return hT.call(T,_,"$&_")}var L_=Rf(),Uf=L_.custom,Wf=Jf(Uf)?Uf:null,Mf={__proto__:null,double:'"',single:"'"},IA={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Zf.exports=function C(T,_,f,c){var E=_||{};if(VT(E,"quoteStyle")&&!VT(Mf,E.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(VT(E,"maxStringLength")&&(typeof E.maxStringLength==="number"?E.maxStringLength<0&&E.maxStringLength!==1/0:E.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=VT(E,"customInspect")?E.customInspect:!0;if(typeof A!=="boolean"&&A!=="symbol")throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(VT(E,"indent")&&E.indent!==null&&E.indent!=="\t"&&!(parseInt(E.indent,10)===E.indent&&E.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(VT(E,"numericSeparator")&&typeof E.numericSeparator!=="boolean")throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=E.numericSeparator;if(typeof T>"u")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return Vf(T,E);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var S=String(T);return u?qf(T,S):S}if(typeof T==="bigint"){var U=String(T)+"n";return u?qf(T,U):U}var z=typeof E.depth>"u"?5:E.depth;if(typeof f>"u")f=0;if(f>=z&&z>0&&typeof T==="object")return z_(T)?"[Array]":"[Object]";var q=TR(E,f);if(typeof c>"u")c=[];else if(Nf(c,T)>=0)return"[Circular]";function x(j,cT,_T){if(cT)c=KA.call(c),c.push(cT);if(_T){var nT={depth:E.depth};if(VT(E,"quoteStyle"))nT.quoteStyle=E.quoteStyle;return C(j,nT,f+1,c)}return C(j,E,f+1,c)}if(typeof T==="function"&&!Yf(T)){var Q=jA(T),Y=mC(T,x);return"[Function"+(Q?": "+Q:" (anonymous)")+"]"+(Y.length>0?" { "+WT.call(Y,", ")+" }":"")}if(Jf(T)){var W=CC?hT.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):H_.call(T);return typeof T==="object"&&!CC?qC(W):W}if(oA(T)){var P="<"+Hf.call(String(T.nodeName)),L=T.attributes||[];for(var r=0;r<L.length;r++)P+=" "+L[r].name+"="+Xf(mA(L[r].value),"double",E);if(P+=">",T.childNodes&&T.childNodes.length)P+="...";return P+="</"+Hf.call(String(T.nodeName))+">",P}if(z_(T)){if(T.length===0)return"[]";var g=mC(T,x);if(q&&!aA(g))return"["+F_(g,q)+"]";return"[ "+WT.call(g,", ")+" ]"}if(bA(T)){var d=mC(T,x);if(!("cause"in Error.prototype)&&"cause"in T&&!Df.call(T,"cause"))return"{ ["+String(T)+"] "+WT.call(Lf.call("[cause]: "+x(T.cause),d),", ")+" }";if(d.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+WT.call(d,", ")+" }"}if(typeof T==="object"&&A){if(Wf&&typeof T[Wf]==="function"&&L_)return L_(T,{depth:z-f});else if(A!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if(lA(T)){var $=[];if(xf)xf.call(T,function(j,cT){$.push(x(cT,T,!0)+" => "+x(j,T))});return wf("Map",PC.call(T),$,q)}if(rA(T)){var b=[];if(Sf)Sf.call(T,function(j){b.push(x(j,T))});return wf("Set",bC.call(T),b,q)}if(yA(T))return S_("WeakMap");if(pA(T))return S_("WeakSet");if(iA(T))return S_("WeakRef");if(vA(T))return qC(x(Number(T)));if(tA(T))return qC(x(u_.call(T)));if(sA(T))return qC(GA.call(T));if(kA(T))return qC(x(String(T)));if(typeof window<"u"&&T===window)return"{ [object Window] }";if(typeof globalThis<"u"&&T===globalThis||typeof global<"u"&&T===global)return"{ [object globalThis] }";if(!PA(T)&&!Yf(T)){var k=mC(T,x),n=Ff?Ff(T)===Object.prototype:T instanceof Object||T.constructor===Object,M=T instanceof Object?"":"null prototype",N=!n&&YC&&Object(T)===T&&YC in T?W_.call(KT(T),8,-1):M?"Object":"",B=n||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",s=B+(N||M?"["+WT.call(Lf.call([],N||[],M||[]),": ")+"] ":"");if(k.length===0)return s+"{}";if(q)return s+"{"+F_(k,q)+"}";return s+"{ "+WT.call(k,", ")+" }"}return String(T)};function Xf(C,T,_){var f=_.quoteStyle||T,c=Mf[f];return c+C+c}function mA(C){return hT.call(String(C),/"/g,""")}function vT(C){return!YC||!(typeof C==="object"&&((YC in C)||typeof C[YC]<"u"))}function z_(C){return KT(C)==="[object Array]"&&vT(C)}function PA(C){return KT(C)==="[object Date]"&&vT(C)}function Yf(C){return KT(C)==="[object RegExp]"&&vT(C)}function bA(C){return KT(C)==="[object Error]"&&vT(C)}function kA(C){return KT(C)==="[object String]"&&vT(C)}function vA(C){return KT(C)==="[object Number]"&&vT(C)}function sA(C){return KT(C)==="[object Boolean]"&&vT(C)}function Jf(C){if(CC)return C&&typeof C==="object"&&C instanceof Symbol;if(typeof C==="symbol")return!0;if(!C||typeof C!=="object"||!H_)return!1;try{return H_.call(C),!0}catch(T){}return!1}function tA(C){if(!C||typeof C!=="object"||!u_)return!1;try{return u_.call(C),!0}catch(T){}return!1}var dA=Object.prototype.hasOwnProperty||function(C){return C in this};function VT(C,T){return dA.call(C,T)}function KT(C){return gA.call(C)}function jA(C){if(C.name)return C.name;var T=$A.call(OA.call(C),/^function\s*([\w$]+)/);if(T)return T[1];return null}function Nf(C,T){if(C.indexOf)return C.indexOf(T);for(var _=0,f=C.length;_<f;_++)if(C[_]===T)return _;return-1}function lA(C){if(!PC||!C||typeof C!=="object")return!1;try{PC.call(C);try{bC.call(C)}catch(T){return!0}return C instanceof Map}catch(T){}return!1}function yA(C){if(!UC||!C||typeof C!=="object")return!1;try{UC.call(C,UC);try{WC.call(C,WC)}catch(T){return!0}return C instanceof WeakMap}catch(T){}return!1}function iA(C){if(!uf||!C||typeof C!=="object")return!1;try{return uf.call(C),!0}catch(T){}return!1}function rA(C){if(!bC||!C||typeof C!=="object")return!1;try{bC.call(C);try{PC.call(C)}catch(T){return!0}return C instanceof Set}catch(T){}return!1}function pA(C){if(!WC||!C||typeof C!=="object")return!1;try{WC.call(C,WC);try{UC.call(C,UC)}catch(T){return!0}return C instanceof WeakSet}catch(T){}return!1}function oA(C){if(!C||typeof C!=="object")return!1;if(typeof HTMLElement<"u"&&C instanceof HTMLElement)return!0;return typeof C.nodeName==="string"&&typeof C.getAttribute==="function"}function Vf(C,T){if(C.length>T.maxStringLength){var _=C.length-T.maxStringLength,f="... "+_+" more character"+(_>1?"s":"");return Vf(W_.call(C,0,T.maxStringLength),T)+f}var c=IA[T.quoteStyle||"single"];c.lastIndex=0;var E=hT.call(hT.call(C,c,"\\$1"),/[\x00-\x1f]/g,eA);return Xf(E,"single",T)}function eA(C){var T=C.charCodeAt(0),_={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(_)return"\\"+_;return"\\x"+(T<16?"0":"")+hA.call(T.toString(16))}function qC(C){return"Object("+C+")"}function S_(C){return C+" { ? }"}function wf(C,T,_,f){var c=f?F_(_,f):WT.call(_,", ");return C+" ("+T+") {"+c+"}"}function aA(C){for(var T=0;T<C.length;T++)if(Nf(C[T],`
|
|
16
|
+
`)>=0)return!1;return!0}function TR(C,T){var _;if(C.indent==="\t")_="\t";else if(typeof C.indent==="number"&&C.indent>0)_=WT.call(Array(C.indent+1)," ");else return null;return{base:_,prev:WT.call(Array(T+1),_)}}function F_(C,T){if(C.length===0)return"";var _=`
|
|
17
|
+
`+T.prev+T.base;return _+WT.call(C,","+_)+`
|
|
18
|
+
`+T.prev}function mC(C,T){var _=z_(C),f=[];if(_){f.length=C.length;for(var c=0;c<C.length;c++)f[c]=VT(C,c)?T(C[c],C):""}var E=typeof x_==="function"?x_(C):[],A;if(CC){A={};for(var u=0;u<E.length;u++)A["$"+E[u]]=E[u]}for(var S in C){if(!VT(C,S))continue;if(_&&String(Number(S))===S&&S<C.length)continue;if(CC&&A["$"+S]instanceof Symbol)continue;else if(Qf.call(/[^\w$]/,S))f.push(T(S,C)+": "+T(C[S],C));else f.push(S+": "+T(C[S],C))}if(typeof x_==="function"){for(var U=0;U<E.length;U++)if(Df.call(C,E[U]))f.push("["+T(E[U])+"]: "+T(C[E[U]],C))}return f}});var nf=G((p0,Bf)=>{var CR=wC(),_R=kT(),kC=function(C,T,_){var f=C,c;for(;(c=f.next)!=null;f=c)if(c.key===T){if(f.next=c.next,!_)c.next=C.next,C.next=c;return c}},fR=function(C,T){if(!C)return;var _=kC(C,T);return _&&_.value},cR=function(C,T,_){var f=kC(C,T);if(f)f.value=_;else C.next={key:T,next:C.next,value:_}},ER=function(C,T){if(!C)return!1;return!!kC(C,T)},AR=function(C,T){if(C)return kC(C,T,!0)};Bf.exports=function(){var T,_={assert:function(f){if(!_.has(f))throw new _R("Side channel does not contain "+CR(f))},delete:function(f){var c=T&&T.next,E=AR(T,f);if(E&&c&&c===E)T=void 0;return!!E},get:function(f){return fR(T,f)},has:function(f){return ER(T,f)},set:function(f,c){if(!T)T={next:void 0};cR(T,f,c)}};return _}});var Y_=G((o0,Gf)=>{Gf.exports=Object});var Of=G((e0,gf)=>{gf.exports=Error});var hf=G((a0,$f)=>{$f.exports=EvalError});var If=G((TS,Kf)=>{Kf.exports=RangeError});var Pf=G((CS,mf)=>{mf.exports=ReferenceError});var kf=G((_S,bf)=>{bf.exports=SyntaxError});var sf=G((fS,vf)=>{vf.exports=URIError});var df=G((cS,tf)=>{tf.exports=Math.abs});var lf=G((ES,jf)=>{jf.exports=Math.floor});var rf=G((AS,yf)=>{yf.exports=Math.max});var of=G((RS,pf)=>{pf.exports=Math.min});var af=G((xS,ef)=>{ef.exports=Math.pow});var Cc=G((SS,Tc)=>{Tc.exports=Math.round});var fc=G((uS,_c)=>{_c.exports=Number.isNaN||function(T){return T!==T}});var Ec=G((HS,cc)=>{var RR=fc();cc.exports=function(T){if(RR(T)||T===0)return T;return T<0?-1:1}});var Rc=G((LS,Ac)=>{Ac.exports=Object.getOwnPropertyDescriptor});var w_=G((zS,xc)=>{var vC=Rc();if(vC)try{vC([],"length")}catch(C){vC=null}xc.exports=vC});var uc=G((FS,Sc)=>{var sC=Object.defineProperty||!1;if(sC)try{sC({},"a",{value:1})}catch(C){sC=!1}Sc.exports=sC});var Lc=G((qS,Hc)=>{Hc.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},_=Symbol("test"),f=Object(_);if(typeof _==="string")return!1;if(Object.prototype.toString.call(_)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(f)!=="[object Symbol]")return!1;var c=42;T[_]=c;for(var E in T)return!1;if(typeof Object.keys==="function"&&Object.keys(T).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(T).length!==0)return!1;var A=Object.getOwnPropertySymbols(T);if(A.length!==1||A[0]!==_)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,_))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var u=Object.getOwnPropertyDescriptor(T,_);if(u.value!==c||u.enumerable!==!0)return!1}return!0}});var qc=G((US,Fc)=>{var zc=typeof Symbol<"u"&&Symbol,xR=Lc();Fc.exports=function(){if(typeof zc!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof zc("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return xR()}});var Q_=G((WS,Uc)=>{Uc.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var D_=G((YS,Wc)=>{var SR=Y_();Wc.exports=SR.getPrototypeOf||null});var Qc=G((wS,wc)=>{var uR="Function.prototype.bind called on incompatible ",HR=Object.prototype.toString,LR=Math.max,zR="[object Function]",Yc=function(T,_){var f=[];for(var c=0;c<T.length;c+=1)f[c]=T[c];for(var E=0;E<_.length;E+=1)f[E+T.length]=_[E];return f},FR=function(T,_){var f=[];for(var c=_||0,E=0;c<T.length;c+=1,E+=1)f[E]=T[c];return f},qR=function(C,T){var _="";for(var f=0;f<C.length;f+=1)if(_+=C[f],f+1<C.length)_+=T;return _};wc.exports=function(T){var _=this;if(typeof _!=="function"||HR.apply(_)!==zR)throw TypeError(uR+_);var f=FR(arguments,1),c,E=function(){if(this instanceof c){var z=_.apply(this,Yc(f,arguments));if(Object(z)===z)return z;return this}return _.apply(T,Yc(f,arguments))},A=LR(0,_.length-f.length),u=[];for(var S=0;S<A;S++)u[S]="$"+S;if(c=Function("binder","return function ("+qR(u,",")+"){ return binder.apply(this,arguments); }")(E),_.prototype){var U=function(){};U.prototype=_.prototype,c.prototype=new U,U.prototype=null}return c}});var QC=G((QS,Dc)=>{var UR=Qc();Dc.exports=Function.prototype.bind||UR});var tC=G((DS,Mc)=>{Mc.exports=Function.prototype.call});var M_=G((MS,Xc)=>{Xc.exports=Function.prototype.apply});var Nc=G((XS,Jc)=>{Jc.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Zc=G((JS,Vc)=>{var WR=QC(),YR=M_(),wR=tC(),QR=Nc();Vc.exports=QR||WR.call(wR,YR)});var X_=G((NS,Bc)=>{var DR=QC(),MR=kT(),XR=tC(),JR=Zc();Bc.exports=function(T){if(T.length<1||typeof T[0]!=="function")throw new MR("a function is required");return JR(DR,XR,T)}});var hc=G((VS,$c)=>{var NR=X_(),nc=w_(),gc;try{gc=[].__proto__===Array.prototype}catch(C){if(!C||typeof C!=="object"||!("code"in C)||C.code!=="ERR_PROTO_ACCESS")throw C}var J_=!!gc&&nc&&nc(Object.prototype,"__proto__"),Oc=Object,Gc=Oc.getPrototypeOf;$c.exports=J_&&typeof J_.get==="function"?NR([J_.get]):typeof Gc==="function"?function(T){return Gc(T==null?T:Oc(T))}:!1});var bc=G((ZS,Pc)=>{var Kc=Q_(),Ic=D_(),mc=hc();Pc.exports=Kc?function(T){return Kc(T)}:Ic?function(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw TypeError("getProto: not an object");return Ic(T)}:mc?function(T){return mc(T)}:null});var vc=G((BS,kc)=>{var VR=Function.prototype.call,ZR=Object.prototype.hasOwnProperty,BR=QC();kc.exports=BR.call(VR,ZR)});var lC=G((nS,lc)=>{var I,nR=Y_(),GR=Of(),gR=hf(),OR=If(),$R=Pf(),EC=kf(),cC=kT(),hR=sf(),KR=df(),IR=lf(),mR=rf(),PR=of(),bR=af(),kR=Cc(),vR=Ec(),dc=Function,N_=function(C){try{return dc('"use strict"; return ('+C+").constructor;")()}catch(T){}},DC=w_(),sR=uc(),V_=function(){throw new cC},tR=DC?function(){try{return arguments.callee,V_}catch(C){try{return DC(arguments,"callee").get}catch(T){return V_}}}():V_,_C=qc()(),a=bc(),dR=D_(),jR=Q_(),jc=M_(),MC=tC(),fC={},lR=typeof Uint8Array>"u"||!a?I:a(Uint8Array),sT={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":_C&&a?a([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":fC,"%AsyncGenerator%":fC,"%AsyncGeneratorFunction%":fC,"%AsyncIteratorPrototype%":fC,"%Atomics%":typeof Atomics>"u"?I:Atomics,"%BigInt%":typeof BigInt>"u"?I:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?I:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?I:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":GR,"%eval%":eval,"%EvalError%":gR,"%Float16Array%":typeof Float16Array>"u"?I:Float16Array,"%Float32Array%":typeof Float32Array>"u"?I:Float32Array,"%Float64Array%":typeof Float64Array>"u"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?I:FinalizationRegistry,"%Function%":dc,"%GeneratorFunction%":fC,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_C&&a?a(a([][Symbol.iterator]())):I,"%JSON%":typeof JSON==="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_C||!a?I:a(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":nR,"%Object.getOwnPropertyDescriptor%":DC,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?I:Promise,"%Proxy%":typeof Proxy>"u"?I:Proxy,"%RangeError%":OR,"%ReferenceError%":$R,"%Reflect%":typeof Reflect>"u"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?I:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_C||!a?I:a(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_C&&a?a(""[Symbol.iterator]()):I,"%Symbol%":_C?Symbol:I,"%SyntaxError%":EC,"%ThrowTypeError%":tR,"%TypedArray%":lR,"%TypeError%":cC,"%Uint8Array%":typeof Uint8Array>"u"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?I:Uint32Array,"%URIError%":hR,"%WeakMap%":typeof WeakMap>"u"?I:WeakMap,"%WeakRef%":typeof WeakRef>"u"?I:WeakRef,"%WeakSet%":typeof WeakSet>"u"?I:WeakSet,"%Function.prototype.call%":MC,"%Function.prototype.apply%":jc,"%Object.defineProperty%":sR,"%Object.getPrototypeOf%":dR,"%Math.abs%":KR,"%Math.floor%":IR,"%Math.max%":mR,"%Math.min%":PR,"%Math.pow%":bR,"%Math.round%":kR,"%Math.sign%":vR,"%Reflect.getPrototypeOf%":jR};if(a)try{null.error}catch(C){Z_=a(a(C)),sT["%Error.prototype%"]=Z_}var Z_,yR=function C(T){var _;if(T==="%AsyncFunction%")_=N_("async function () {}");else if(T==="%GeneratorFunction%")_=N_("function* () {}");else if(T==="%AsyncGeneratorFunction%")_=N_("async function* () {}");else if(T==="%AsyncGenerator%"){var f=C("%AsyncGeneratorFunction%");if(f)_=f.prototype}else if(T==="%AsyncIteratorPrototype%"){var c=C("%AsyncGenerator%");if(c&&a)_=a(c.prototype)}return sT[T]=_,_},sc={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},XC=QC(),dC=vc(),iR=XC.call(MC,Array.prototype.concat),rR=XC.call(jc,Array.prototype.splice),tc=XC.call(MC,String.prototype.replace),jC=XC.call(MC,String.prototype.slice),pR=XC.call(MC,RegExp.prototype.exec),oR=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,eR=/\\(\\)?/g,aR=function(T){var _=jC(T,0,1),f=jC(T,-1);if(_==="%"&&f!=="%")throw new EC("invalid intrinsic syntax, expected closing `%`");else if(f==="%"&&_!=="%")throw new EC("invalid intrinsic syntax, expected opening `%`");var c=[];return tc(T,oR,function(E,A,u,S){c[c.length]=u?tc(S,eR,"$1"):A||E}),c},Tx=function(T,_){var f=T,c;if(dC(sc,f))c=sc[f],f="%"+c[0]+"%";if(dC(sT,f)){var E=sT[f];if(E===fC)E=yR(f);if(typeof E>"u"&&!_)throw new cC("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:c,name:f,value:E}}throw new EC("intrinsic "+T+" does not exist!")};lc.exports=function(T,_){if(typeof T!=="string"||T.length===0)throw new cC("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof _!=="boolean")throw new cC('"allowMissing" argument must be a boolean');if(pR(/^%?[^%]*%?$/,T)===null)throw new EC("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var f=aR(T),c=f.length>0?f[0]:"",E=Tx("%"+c+"%",_),A=E.name,u=E.value,S=!1,U=E.alias;if(U)c=U[0],rR(f,iR([0,1],U));for(var z=1,q=!0;z<f.length;z+=1){var x=f[z],Q=jC(x,0,1),Y=jC(x,-1);if((Q==='"'||Q==="'"||Q==="`"||(Y==='"'||Y==="'"||Y==="`"))&&Q!==Y)throw new EC("property names with quotes must have matching quotes");if(x==="constructor"||!q)S=!0;if(c+="."+x,A="%"+c+"%",dC(sT,A))u=sT[A];else if(u!=null){if(!(x in u)){if(!_)throw new cC("base intrinsic for "+T+" exists, but the property is not available.");return}if(DC&&z+1>=f.length){var W=DC(u,x);if(q=!!W,q&&"get"in W&&!("originalValue"in W.get))u=W.get;else u=u[x]}else q=dC(u,x),u=u[x];if(q&&!S)sT[A]=u}}return u}});var B_=G((GS,rc)=>{var yc=lC(),ic=X_(),Cx=ic([yc("%String.prototype.indexOf%")]);rc.exports=function(T,_){var f=yc(T,!!_);if(typeof f==="function"&&Cx(T,".prototype.")>-1)return ic([f]);return f}});var n_=G((gS,oc)=>{var _x=lC(),JC=B_(),fx=wC(),cx=kT(),pc=_x("%Map%",!0),Ex=JC("Map.prototype.get",!0),Ax=JC("Map.prototype.set",!0),Rx=JC("Map.prototype.has",!0),xx=JC("Map.prototype.delete",!0),Sx=JC("Map.prototype.size",!0);oc.exports=!!pc&&function(){var T,_={assert:function(f){if(!_.has(f))throw new cx("Side channel does not contain "+fx(f))},delete:function(f){if(T){var c=xx(T,f);if(Sx(T)===0)T=void 0;return c}return!1},get:function(f){if(T)return Ex(T,f)},has:function(f){if(T)return Rx(T,f);return!1},set:function(f,c){if(!T)T=new pc;Ax(T,f,c)}};return _}});var ac=G((OS,ec)=>{var ux=lC(),iC=B_(),Hx=wC(),yC=n_(),Lx=kT(),AC=ux("%WeakMap%",!0),zx=iC("WeakMap.prototype.get",!0),Fx=iC("WeakMap.prototype.set",!0),qx=iC("WeakMap.prototype.has",!0),Ux=iC("WeakMap.prototype.delete",!0);ec.exports=AC?function(){var T,_,f={assert:function(c){if(!f.has(c))throw new Lx("Side channel does not contain "+Hx(c))},delete:function(c){if(AC&&c&&(typeof c==="object"||typeof c==="function")){if(T)return Ux(T,c)}else if(yC){if(_)return _.delete(c)}return!1},get:function(c){if(AC&&c&&(typeof c==="object"||typeof c==="function")){if(T)return zx(T,c)}return _&&_.get(c)},has:function(c){if(AC&&c&&(typeof c==="object"||typeof c==="function")){if(T)return qx(T,c)}return!!_&&_.has(c)},set:function(c,E){if(AC&&c&&(typeof c==="object"||typeof c==="function")){if(!T)T=new AC;Fx(T,c,E)}else if(yC){if(!_)_=yC();_.set(c,E)}}};return f}:yC});var G_=G(($S,TE)=>{var Wx=kT(),Yx=wC(),wx=nf(),Qx=n_(),Dx=ac(),Mx=Dx||Qx||wx;TE.exports=function(){var T,_={assert:function(f){if(!_.has(f))throw new Wx("Side channel does not contain "+Yx(f))},delete:function(f){return!!T&&T.delete(f)},get:function(f){return T&&T.get(f)},has:function(f){return!!T&&T.has(f)},set:function(f,c){if(!T)T=Mx();T.set(f,c)}};return _}});var rC=G((hS,CE)=>{var Xx=String.prototype.replace,Jx=/%20/g,g_={RFC1738:"RFC1738",RFC3986:"RFC3986"};CE.exports={default:g_.RFC3986,formatters:{RFC1738:function(C){return Xx.call(C,Jx,"+")},RFC3986:function(C){return String(C)}},RFC1738:g_.RFC1738,RFC3986:g_.RFC3986}});var K_=G((KS,_E)=>{var Nx=rC(),Vx=G_(),O_=Object.prototype.hasOwnProperty,tT=Array.isArray,pC=Vx(),RC=function(T,_){return pC.set(T,_),T},dT=function(T){return pC.has(T)},NC=function(T){return pC.get(T)},h_=function(T,_){pC.set(T,_)},YT=function(){var C=[];for(var T=0;T<256;++T)C[C.length]="%"+((T<16?"0":"")+T.toString(16)).toUpperCase();return C}(),Zx=function(T){while(T.length>1){var _=T.pop(),f=_.obj[_.prop];if(tT(f)){var c=[];for(var E=0;E<f.length;++E)if(typeof f[E]<"u")c[c.length]=f[E];_.obj[_.prop]=c}}},VC=function(T,_){var f=_&&_.plainObjects?{__proto__:null}:{};for(var c=0;c<T.length;++c)if(typeof T[c]<"u")f[c]=T[c];return f},Bx=function C(T,_,f){if(!_)return T;if(typeof _!=="object"&&typeof _!=="function"){if(tT(T)){var c=T.length;if(f&&typeof f.arrayLimit==="number"&&c>f.arrayLimit)return RC(VC(T.concat(_),f),c);T[c]=_}else if(T&&typeof T==="object"){if(dT(T)){var E=NC(T)+1;T[E]=_,h_(T,E)}else if(f&&f.strictMerge)return[T,_];else if(f&&(f.plainObjects||f.allowPrototypes)||!O_.call(Object.prototype,_))T[_]=!0}else return[T,_];return T}if(!T||typeof T!=="object"){if(dT(_)){var A=Object.keys(_),u=f&&f.plainObjects?{__proto__:null,0:T}:{0:T};for(var S=0;S<A.length;S++){var U=parseInt(A[S],10);u[U+1]=_[A[S]]}return RC(u,NC(_)+1)}var z=[T].concat(_);if(f&&typeof f.arrayLimit==="number"&&z.length>f.arrayLimit)return RC(VC(z,f),z.length-1);return z}var q=T;if(tT(T)&&!tT(_))q=VC(T,f);if(tT(T)&&tT(_))return _.forEach(function(x,Q){if(O_.call(T,Q)){var Y=T[Q];if(Y&&typeof Y==="object"&&x&&typeof x==="object")T[Q]=C(Y,x,f);else T[T.length]=x}else T[Q]=x}),T;return Object.keys(_).reduce(function(x,Q){var Y=_[Q];if(O_.call(x,Q))x[Q]=C(x[Q],Y,f);else x[Q]=Y;if(dT(_)&&!dT(x))RC(x,NC(_));if(dT(x)){var W=parseInt(Q,10);if(String(W)===Q&&W>=0&&W>NC(x))h_(x,W)}return x},q)},nx=function(T,_){return Object.keys(_).reduce(function(f,c){return f[c]=_[c],f},T)},Gx=function(C,T,_){var f=C.replace(/\+/g," ");if(_==="iso-8859-1")return f.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(f)}catch(c){return f}},$_=1024,gx=function(T,_,f,c,E){if(T.length===0)return T;var A=T;if(typeof T==="symbol")A=Symbol.prototype.toString.call(T);else if(typeof T!=="string")A=String(T);if(f==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});var u="";for(var S=0;S<A.length;S+=$_){var U=A.length>=$_?A.slice(S,S+$_):A,z=[];for(var q=0;q<U.length;++q){var x=U.charCodeAt(q);if(x===45||x===46||x===95||x===126||x>=48&&x<=57||x>=65&&x<=90||x>=97&&x<=122||E===Nx.RFC1738&&(x===40||x===41)){z[z.length]=U.charAt(q);continue}if(x<128){z[z.length]=YT[x];continue}if(x<2048){z[z.length]=YT[192|x>>6]+YT[128|x&63];continue}if(x<55296||x>=57344){z[z.length]=YT[224|x>>12]+YT[128|x>>6&63]+YT[128|x&63];continue}q+=1,x=65536+((x&1023)<<10|U.charCodeAt(q)&1023),z[z.length]=YT[240|x>>18]+YT[128|x>>12&63]+YT[128|x>>6&63]+YT[128|x&63]}u+=z.join("")}return u},Ox=function(T){var _=[{obj:{o:T},prop:"o"}],f=[];for(var c=0;c<_.length;++c){var E=_[c],A=E.obj[E.prop],u=Object.keys(A);for(var S=0;S<u.length;++S){var U=u[S],z=A[U];if(typeof z==="object"&&z!==null&&f.indexOf(z)===-1)_[_.length]={obj:A,prop:U},f[f.length]=z}}return Zx(_),T},$x=function(T){return Object.prototype.toString.call(T)==="[object RegExp]"},hx=function(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},Kx=function(T,_,f,c){if(dT(T)){var E=NC(T)+1;return T[E]=_,h_(T,E),T}var A=[].concat(T,_);if(A.length>f)return RC(VC(A,{plainObjects:c}),A.length-1);return A},Ix=function(T,_){if(tT(T)){var f=[];for(var c=0;c<T.length;c+=1)f[f.length]=_(T[c]);return f}return _(T)};_E.exports={arrayToObject:VC,assign:nx,combine:Kx,compact:Ox,decode:Gx,encode:gx,isBuffer:hx,isOverflow:dT,isRegExp:$x,markOverflow:RC,maybeMap:Ix,merge:Bx}});var xE=G((IS,RE)=>{var cE=G_(),oC=K_(),ZC=rC(),mx=Object.prototype.hasOwnProperty,EE={brackets:function(T){return T+"[]"},comma:"comma",indices:function(T,_){return T+"["+_+"]"},repeat:function(T){return T}},wT=Array.isArray,Px=Array.prototype.push,AE=function(C,T){Px.apply(C,wT(T)?T:[T])},bx=Date.prototype.toISOString,fE=ZC.default,e={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:oC.encode,encodeValuesOnly:!1,filter:void 0,format:fE,formatter:ZC.formatters[fE],indices:!1,serializeDate:function(T){return bx.call(T)},skipNulls:!1,strictNullHandling:!1},kx=function(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},I_={},vx=function C(T,_,f,c,E,A,u,S,U,z,q,x,Q,Y,W,P,L,r){var g=T,d=r,$=0,b=!1;while((d=d.get(I_))!==void 0&&!b){var k=d.get(T);if($+=1,typeof k<"u")if(k===$)throw RangeError("Cyclic object value");else b=!0;if(typeof d.get(I_)>"u")$=0}if(typeof z==="function")g=z(_,g);else if(g instanceof Date)g=Q(g);else if(f==="comma"&&wT(g))g=oC.maybeMap(g,function(lT){if(lT instanceof Date)return Q(lT);return lT});if(g===null){if(A)return U&&!P?U(_,e.encoder,L,"key",Y):_;g=""}if(kx(g)||oC.isBuffer(g)){if(U){var n=P?_:U(_,e.encoder,L,"key",Y);return[W(n)+"="+W(U(g,e.encoder,L,"value",Y))]}return[W(_)+"="+W(String(g))]}var M=[];if(typeof g>"u")return M;var N;if(f==="comma"&&wT(g)){if(P&&U)g=oC.maybeMap(g,U);N=[{value:g.length>0?g.join(",")||null:void 0}]}else if(wT(z))N=z;else{var B=Object.keys(g);N=q?B.sort(q):B}var s=S?String(_).replace(/\./g,"%2E"):String(_),j=c&&wT(g)&&g.length===1?s+"[]":s;if(E&&wT(g)&&g.length===0)return j+"[]";for(var cT=0;cT<N.length;++cT){var _T=N[cT],nT=typeof _T==="object"&&_T&&typeof _T.value<"u"?_T.value:g[_T];if(u&&nT===null)continue;var jT=x&&S?String(_T).replace(/\./g,"%2E"):String(_T),OC=wT(g)?typeof f==="function"?f(j,jT):j:j+(x?"."+jT:"["+jT+"]");r.set(T,$);var uC=cE();uC.set(I_,r),AE(M,C(nT,OC,f,c,E,A,u,S,f==="comma"&&P&&wT(g)?null:U,z,q,x,Q,Y,W,P,L,uC))}return M},sx=function(T){if(!T)return e;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys<"u"&&typeof T.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder<"u"&&typeof T.encoder!=="function")throw TypeError("Encoder has to be a function.");var _=T.charset||e.charset;if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var f=ZC.default;if(typeof T.format<"u"){if(!mx.call(ZC.formatters,T.format))throw TypeError("Unknown format option provided.");f=T.format}var c=ZC.formatters[f],E=e.filter;if(typeof T.filter==="function"||wT(T.filter))E=T.filter;var A;if(T.arrayFormat in EE)A=T.arrayFormat;else if("indices"in T)A=T.indices?"indices":"repeat";else A=e.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof T.allowDots>"u"?T.encodeDotInKeys===!0?!0:e.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:e.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:e.allowEmptyArrays,arrayFormat:A,charset:_,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:e.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter>"u"?e.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:e.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:e.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:e.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:e.encodeValuesOnly,filter:E,format:f,formatter:c,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:e.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:e.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:e.strictNullHandling}};RE.exports=function(C,T){var _=C,f=sx(T),c,E;if(typeof f.filter==="function")E=f.filter,_=E("",_);else if(wT(f.filter))E=f.filter,c=E;var A=[];if(typeof _!=="object"||_===null)return"";var u=EE[f.arrayFormat],S=u==="comma"&&f.commaRoundTrip;if(!c)c=Object.keys(_);if(f.sort)c.sort(f.sort);var U=cE();for(var z=0;z<c.length;++z){var q=c[z],x=_[q];if(f.skipNulls&&x===null)continue;AE(A,vx(x,q,u,S,f.allowEmptyArrays,f.strictNullHandling,f.skipNulls,f.encodeDotInKeys,f.encode?f.encoder:null,f.filter,f.sort,f.allowDots,f.serializeDate,f.format,f.formatter,f.encodeValuesOnly,f.charset,U))}var Q=A.join(f.delimiter),Y=f.addQueryPrefix===!0?"?":"";if(f.charsetSentinel)if(f.charset==="iso-8859-1")Y+="utf8=%26%2310003%3B&";else Y+="utf8=%E2%9C%93&";return Q.length>0?Y+Q:""}});var HE=G((mS,uE)=>{var QT=K_(),eC=Object.prototype.hasOwnProperty,m_=Array.isArray,t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:QT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},tx=function(C){return C.replace(/&#(\d+);/g,function(T,_){return String.fromCharCode(parseInt(_,10))})},SE=function(C,T,_){if(C&&typeof C==="string"&&T.comma&&C.indexOf(",")>-1)return C.split(",");if(T.throwOnLimitExceeded&&_>=T.arrayLimit)throw RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return C},dx="utf8=%26%2310003%3B",jx="utf8=%E2%9C%93",lx=function(T,_){var f={__proto__:null},c=_.ignoreQueryPrefix?T.replace(/^\?/,""):T;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var E=_.parameterLimit===1/0?void 0:_.parameterLimit,A=c.split(_.delimiter,_.throwOnLimitExceeded?E+1:E);if(_.throwOnLimitExceeded&&A.length>E)throw RangeError("Parameter limit exceeded. Only "+E+" parameter"+(E===1?"":"s")+" allowed.");var u=-1,S,U=_.charset;if(_.charsetSentinel){for(S=0;S<A.length;++S)if(A[S].indexOf("utf8=")===0){if(A[S]===jx)U="utf-8";else if(A[S]===dx)U="iso-8859-1";u=S,S=A.length}}for(S=0;S<A.length;++S){if(S===u)continue;var z=A[S],q=z.indexOf("]="),x=q===-1?z.indexOf("="):q+1,Q,Y;if(x===-1)Q=_.decoder(z,t.decoder,U,"key"),Y=_.strictNullHandling?null:"";else if(Q=_.decoder(z.slice(0,x),t.decoder,U,"key"),Q!==null)Y=QT.maybeMap(SE(z.slice(x+1),_,m_(f[Q])?f[Q].length:0),function(P){return _.decoder(P,t.decoder,U,"value")});if(Y&&_.interpretNumericEntities&&U==="iso-8859-1")Y=tx(String(Y));if(z.indexOf("[]=")>-1)Y=m_(Y)?[Y]:Y;if(_.comma&&m_(Y)&&Y.length>_.arrayLimit){if(_.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+_.arrayLimit+" element"+(_.arrayLimit===1?"":"s")+" allowed in an array.");Y=QT.combine([],Y,_.arrayLimit,_.plainObjects)}if(Q!==null){var W=eC.call(f,Q);if(W&&(_.duplicates==="combine"||z.indexOf("[]=")>-1))f[Q]=QT.combine(f[Q],Y,_.arrayLimit,_.plainObjects);else if(!W||_.duplicates==="last")f[Q]=Y}}return f},yx=function(C,T,_,f){var c=0;if(C.length>0&&C[C.length-1]==="[]"){var E=C.slice(0,-1).join("");c=Array.isArray(T)&&T[E]?T[E].length:0}var A=f?T:SE(T,_,c);for(var u=C.length-1;u>=0;--u){var S,U=C[u];if(U==="[]"&&_.parseArrays)if(QT.isOverflow(A))S=A;else S=_.allowEmptyArrays&&(A===""||_.strictNullHandling&&A===null)?[]:QT.combine([],A,_.arrayLimit,_.plainObjects);else{S=_.plainObjects?{__proto__:null}:{};var z=U.charAt(0)==="["&&U.charAt(U.length-1)==="]"?U.slice(1,-1):U,q=_.decodeDotInKeys?z.replace(/%2E/g,"."):z,x=parseInt(q,10),Q=!isNaN(x)&&U!==q&&String(x)===q&&x>=0&&_.parseArrays;if(!_.parseArrays&&q==="")S={0:A};else if(Q&&x<_.arrayLimit)S=[],S[x]=A;else if(Q&&_.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+_.arrayLimit+" element"+(_.arrayLimit===1?"":"s")+" allowed in an array.");else if(Q)S[x]=A,QT.markOverflow(S,x);else if(q!=="__proto__")S[q]=A}A=S}return A},ix=function(T,_){var f=_.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T;if(_.depth<=0){if(!_.plainObjects&&eC.call(Object.prototype,f)){if(!_.allowPrototypes)return}return[f]}var c=/(\[[^[\]]*])/,E=/(\[[^[\]]*])/g,A=c.exec(f),u=A?f.slice(0,A.index):f,S=[];if(u){if(!_.plainObjects&&eC.call(Object.prototype,u)){if(!_.allowPrototypes)return}S[S.length]=u}var U=0;while((A=E.exec(f))!==null&&U<_.depth){U+=1;var z=A[1].slice(1,-1);if(!_.plainObjects&&eC.call(Object.prototype,z)){if(!_.allowPrototypes)return}S[S.length]=A[1]}if(A){if(_.strictDepth===!0)throw RangeError("Input depth exceeded depth option of "+_.depth+" and strictDepth is true");S[S.length]="["+f.slice(A.index)+"]"}return S},rx=function(T,_,f,c){if(!T)return;var E=ix(T,f);if(!E)return;return yx(E,_,f,c)},px=function(T){if(!T)return t;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys<"u"&&typeof T.decodeDotInKeys!=="boolean")throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder<"u"&&typeof T.decoder!=="function")throw TypeError("Decoder has to be a function.");if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded<"u"&&typeof T.throwOnLimitExceeded!=="boolean")throw TypeError("`throwOnLimitExceeded` option must be a boolean");var _=typeof T.charset>"u"?t.charset:T.charset,f=typeof T.duplicates>"u"?t.duplicates:T.duplicates;if(f!=="combine"&&f!=="first"&&f!=="last")throw TypeError("The duplicates option must be either combine, first, or last");var c=typeof T.allowDots>"u"?T.decodeDotInKeys===!0?!0:t.allowDots:!!T.allowDots;return{allowDots:c,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:t.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:t.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:t.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:t.arrayLimit,charset:_,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:t.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:t.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:t.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:t.decoder,delimiter:typeof T.delimiter==="string"||QT.isRegExp(T.delimiter)?T.delimiter:t.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:t.depth,duplicates:f,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:t.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:t.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:t.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:t.strictDepth,strictMerge:typeof T.strictMerge==="boolean"?!!T.strictMerge:t.strictMerge,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:t.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};uE.exports=function(C,T){var _=px(T);if(C===""||C===null||typeof C>"u")return _.plainObjects?{__proto__:null}:{};var f=typeof C==="string"?lx(C,_):C,c=_.plainObjects?{__proto__:null}:{},E=Object.keys(f);for(var A=0;A<E.length;++A){var u=E[A],S=rx(u,f[u],_,typeof C==="string");c=QT.merge(c,S,_)}if(_.allowSparse===!0)return c;return QT.compact(c)}});var zE=G((PS,LE)=>{var ox=xE(),ex=HE(),ax=rC();LE.exports={formats:ax,parse:ex,stringify:ox}});var i1=$C(hC(),1);var e_={};p_(e_,{zodSchemaKey:()=>lE,webSocketServerArgsKey:()=>TT,webSocketMessageArgsKey:()=>PT,webSocketKey:()=>LT,webSocketEventKey:()=>mT,webSocketEventArgumentsKey:()=>CT,webSocketConnectionArgsKey:()=>zT,webSocketCloseReasonArgsKey:()=>zC,webSocketCloseCodeArgsKey:()=>LC,routeModelArgsKey:()=>xT,responseStatusTextArgsKey:()=>aT,responseStatusArgsKey:()=>bT,responseHeadersArgsKey:()=>RT,responseBodyArgsKey:()=>eT,requestHeadersArgsKey:()=>GT,requestHeaderArgsKey:()=>qT,requestBodyArgsKey:()=>gT,requestArgsKey:()=>UT,queryArgsKey:()=>FC,paramsArgsKey:()=>oT,paramArgsKey:()=>OT,moduleKey:()=>AT,middlewareKey:()=>NT,interceptorKey:()=>MT,injectableKey:()=>JT,injectKey:()=>pT,httpServerArgsKey:()=>FT,guardKey:()=>XT,controllerKey:()=>uT,controllerHttpKey:()=>rT,contextArgsKey:()=>$T,containerKey:()=>HT,configKey:()=>KC,argumentsKey:()=>K});var K=Symbol.for("____boolTypescriptCore:arguments__"),CT=Symbol.for("____boolTypescriptCore:webSocketEventArguments__"),KC=Symbol.for("____boolTypescriptCore:config__"),uT=Symbol.for("____boolTypescriptCore:controller__"),MT=Symbol.for("____boolTypescriptCore:interceptor__"),XT=Symbol.for("____boolTypescriptCore:guard__"),rT=Symbol.for("____boolTypescriptCore:controller.http__"),pT=Symbol.for("____boolTypescriptCore:inject__"),JT=Symbol.for("____boolTypescriptCore:injectable__"),NT=Symbol.for("____boolTypescriptCore:middleware__"),AT=Symbol.for("____boolTypescriptCore:module__"),HT=Symbol.for("____boolTypescriptCore:container__"),lE=Symbol.for("____boolTypescriptCore:zodSchema__"),LT=Symbol.for("____boolTypescriptCore:webSocket__"),mT=Symbol.for("____boolTypescriptCore:webSocket:event__"),TT=Symbol.for("____boolTypescriptCore:webSocketArguments:server__"),zT=Symbol.for("____boolTypescriptCore:webSocketArguments:connection__"),PT=Symbol.for("____boolTypescriptCore:webSocketArguments:message__"),LC=Symbol.for("____boolTypescriptCore:webSocketArguments:closeCode__"),zC=Symbol.for("____boolTypescriptCore:webSocketArguments:closeReason__"),FT=Symbol.for("____boolTypescriptCore:httpArguments:server__"),GT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeaders__"),qT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeader__"),gT=Symbol.for("____boolTypescriptCore:httpArguments:requestBody__"),oT=Symbol.for("____boolTypescriptCore:httpArguments:params__"),OT=Symbol.for("____boolTypescriptCore:httpArguments:param__"),FC=Symbol.for("____boolTypescriptCore:httpArguments:query__"),UT=Symbol.for("____boolTypescriptCore:httpArguments:request__"),RT=Symbol.for("____boolTypescriptCore:httpArguments:responseHeaders__"),$T=Symbol.for("____boolTypescriptCore:httpArguments:context__"),xT=Symbol.for("____boolTypescriptCore:httpArguments:routeModel__"),eT=Symbol.for("____boolTypescriptCore:httpArguments:responseBody__"),bT=Symbol.for("____boolTypescriptCore:httpArguments:responseStatus__"),aT=Symbol.for("____boolTypescriptCore:httpArguments:responseStatusText__");var p={};p_(p,{successfulStatuses:()=>Tf,serverErrorStatuses:()=>ff,redirectionStatuses:()=>Cf,informationalStatuses:()=>a_,httpStatuses:()=>yE,clientErrorStatuses:()=>_f});var a_=Object.freeze({CONTINUE:Object.freeze({status:100,statusText:"Continue"}),SWITCHING_PROTOCOLS:Object.freeze({status:101,statusText:"Switching Protocols"}),EARLY_HINTS:Object.freeze({status:103,statusText:"Early Hints"})}),Tf=Object.freeze({OK:Object.freeze({status:200,statusText:"OK"}),CREATED:Object.freeze({status:201,statusText:"Created"}),ACCEPTED:Object.freeze({status:202,statusText:"Accepted"}),NON_AUTHORITATIVE_INFORMATION:Object.freeze({status:203,statusText:"Non-Authoritative Information"}),NO_CONTENT:Object.freeze({status:204,statusText:"No Content"}),RESET_CONTENT:Object.freeze({status:205,statusText:"Reset Content"}),PARTIAL_CONTENT:Object.freeze({status:206,statusText:"Partial Content"}),MULTI_STATUS:Object.freeze({status:207,statusText:"Multi-Status"}),ALREADY_REPORTED:Object.freeze({status:208,statusText:"Already Reported"}),IM_USED:Object.freeze({status:226,statusText:"IM Used"})}),Cf=Object.freeze({MULTIPLE_CHOICES:Object.freeze({status:300,statusText:"Multiple Choices"}),MOVED_PERMANENTLY:Object.freeze({status:301,statusText:"Moved Permanently"}),FOUND:Object.freeze({status:302,statusText:"Found"}),SEE_OTHER:Object.freeze({status:303,statusText:"See Other"}),NOT_MODIFIED:Object.freeze({status:304,statusText:"Not Modified"}),UNUSED:Object.freeze({status:306,statusText:"Unused"}),TEMPORARY_REDIRECT:Object.freeze({status:307,statusText:"Temporary Redirect"}),PERMANENT_REDIRECT:Object.freeze({status:308,statusText:"Permanent Redirect"})}),_f=Object.freeze({BAD_REQUEST:Object.freeze({status:400,statusText:"Bad Request"}),UNAUTHORIZED:Object.freeze({status:401,statusText:"Unauthorized"}),PAYMENT_REQUIRED:Object.freeze({status:402,statusText:"Payment Required"}),FORBIDDEN:Object.freeze({status:403,statusText:"Forbidden"}),NOT_FOUND:Object.freeze({status:404,statusText:"Not Found"}),METHOD_NOT_ALLOWED:Object.freeze({status:405,statusText:"Method Not Allowed"}),NOT_ACCEPTABLE:Object.freeze({status:406,statusText:"Not Acceptable"}),PROXY_AUTHENTICATION_REQUIRED:Object.freeze({status:407,statusText:"Proxy Authentication Required"}),REQUEST_TIMEOUT:Object.freeze({status:408,statusText:"Request Timeout"}),CONFLICT:Object.freeze({status:409,statusText:"Conflict"}),GONE:Object.freeze({status:410,statusText:"Gone"}),LENGTH_REQUIRED:Object.freeze({status:411,statusText:"Length Required"}),PRECONDITION_FAILED:Object.freeze({status:412,statusText:"Precondition Failed"}),CONTENT_TOO_LARGE:Object.freeze({status:413,statusText:"Content Too Large"}),URI_TOO_LONG:Object.freeze({status:414,statusText:"URI Too Long"}),UNSUPPORTED_MEDIA_TYPE:Object.freeze({status:415,statusText:"Unsupported Media Type"}),RANGE_NOT_SATISFIABLE:Object.freeze({status:416,statusText:"Range Not Satisfiable"}),EXPECTATION_FAILED:Object.freeze({status:417,statusText:"Expectation Failed"}),I_AM_A_TEAPOT:Object.freeze({status:418,statusText:"I'm a teapot"}),MISDIRECTED_REQUEST:Object.freeze({status:421,statusText:"Misdirected Request"}),UNPROCESSABLE_CONTENT:Object.freeze({status:422,statusText:"Unprocessable Content"}),LOCKED:Object.freeze({status:423,statusText:"Locked"}),FAILED_DEPENDENCY:Object.freeze({status:424,statusText:"Failed Dependency"}),TOO_EARLY:Object.freeze({status:425,statusText:"Too Early"}),UPGRADE_REQUIRED:Object.freeze({status:426,statusText:"Upgrade Required"}),PRECONDITION_REQUIRED:Object.freeze({status:428,statusText:"Precondition Required"}),TOO_MANY_REQUESTS:Object.freeze({status:429,statusText:"Too Many Requests"}),REQUEST_HEADER_FIELDS_TOO_LARGE:Object.freeze({status:431,statusText:"Request Header Fields Too Large"}),UNAVAILABLE_FOR_LEGAL_REASONS:Object.freeze({status:451,statusText:"Unavailable For Legal Reasons"})}),ff=Object.freeze({INTERNAL_SERVER_ERROR:Object.freeze({status:500,statusText:"Internal Server Error"}),NOT_IMPLEMENTED:Object.freeze({status:501,statusText:"Not Implemented"}),BAD_GATEWAY:Object.freeze({status:502,statusText:"Bad Gateway"}),SERVICE_UNAVAILABLE:Object.freeze({status:503,statusText:"Service Unavailable"}),GATEWAY_TIMEOUT:Object.freeze({status:504,statusText:"Gateway Timeout"}),HTTP_VERSION_NOT_SUPPORTED:Object.freeze({status:505,statusText:"HTTP Version Not Supported"}),VARIANT_ALSO_NEGOTIATES:Object.freeze({status:506,statusText:"Variant Also Negotiates"}),INSUFFICIENT_STORAGE:Object.freeze({status:507,statusText:"Insufficient Storage"}),LOOP_DETECTED:Object.freeze({status:508,statusText:"Loop Detected"}),NOT_EXTENDED:Object.freeze({status:510,statusText:"Not Extended"}),NETWORK_AUTHENTICATION_REQUIRED:Object.freeze({status:511,statusText:"Network Authentication Required"})}),yE=Object.freeze({...a_,...Tf,...Cf,..._f,...ff});var iE=(C)=>(T,_,f)=>{if(!_)return;let c=Reflect.getOwnMetadata(K,T.constructor,_)||{};c[`argumentIndexes.${f}`]={index:f,type:GT,validationSchema:C},Reflect.defineMetadata(K,c,T.constructor,_)},rE=(C,T)=>(_,f,c)=>{if(!f)return;let E=Reflect.getOwnMetadata(K,_.constructor,f)||{};E[`argumentIndexes.${c}`]={index:c,type:qT,key:C,validationSchema:T},Reflect.defineMetadata(K,E,_.constructor,f)},pE=(C,T)=>(_,f,c)=>{if(!f)return;let E=Reflect.getOwnMetadata(K,_.constructor,f)||{};E[`argumentIndexes.${c}`]={index:c,type:gT,validationSchema:C,parser:T},Reflect.defineMetadata(K,E,_.constructor,f)},oE=(C)=>(T,_,f)=>{if(!_)return;let c=Reflect.getOwnMetadata(K,T.constructor,_)||{};c[`argumentIndexes.${f}`]={index:f,type:oT,validationSchema:C},Reflect.defineMetadata(K,c,T.constructor,_)},eE=(C,T)=>(_,f,c)=>{if(!f)return;let E=Reflect.getOwnMetadata(K,_.constructor,f)||{};E[`argumentIndexes.${c}`]={index:c,type:OT,key:C,validationSchema:T},Reflect.defineMetadata(K,E,_.constructor,f)},aE=(C)=>(T,_,f)=>{if(!_)return;let c=Reflect.getOwnMetadata(K,T.constructor,_)||{};c[`argumentIndexes.${f}`]={index:f,type:FC,validationSchema:C},Reflect.defineMetadata(K,c,T.constructor,_)},TA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(K,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:UT},Reflect.defineMetadata(K,f,C.constructor,T)},CA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(K,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:RT},Reflect.defineMetadata(K,f,C.constructor,T)},_A=(C)=>(T,_,f)=>{if(!_)return;let c=Reflect.getOwnMetadata(K,T.constructor,_)||{};c[`argumentIndexes.${f}`]={index:f,type:$T,key:C},Reflect.defineMetadata(K,c,T.constructor,_)},fA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(K,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:xT},Reflect.defineMetadata(K,f,C.constructor,T)},cA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(K,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:FT},Reflect.defineMetadata(K,f,C.constructor,T)};var EA=(C)=>(T)=>{let{modules:_,middlewares:f,guards:c,interceptors:E,dependencies:A}=C||{};if(Reflect.hasOwnMetadata(AT,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(_){let u=[];for(let S of _){if(!Reflect.getOwnMetadataKeys(S).includes(AT))throw Error(`[${S.name}] is not a module.`);let U=Reflect.getOwnMetadata(AT,S);if(u.includes(U?.prefix||""))throw Error(`Duplicated prefix of module [${S.name}].`)}}if(f){for(let u of f)if(!Reflect.getOwnMetadataKeys(u).includes(NT))throw Error(`[${u.name}] is not a middleware.`)}if(c){for(let u of c)if(!Reflect.getOwnMetadataKeys(u).includes(XT))throw Error(`[${u.name}] is not a guard.`)}if(E){for(let u of E)if(!Reflect.getOwnMetadataKeys(u).includes(MT))throw Error(`${u.name} is not a middleware.`)}if(A){for(let u of A)if(!Reflect.getOwnMetadataKeys(u).includes(JT))throw Error(`${u.name} is not an injectable.`)}Reflect.defineMetadata(HT,C,T)};var AA=(C)=>(T)=>{let _={prefix:!C?.startsWith("/")?`/${C||""}`:C,httpMetadata:[...Reflect.getOwnMetadata(rT,T)||[]]};Reflect.defineMetadata(uT,_,T)};var RA=()=>(C)=>{if(!("enforce"in C.prototype)||typeof C.prototype.enforce!=="function")return;let T=void 0;return Reflect.defineMetadata(XT,T,C),C};var TC=(C,T)=>(_,f,c)=>{if(!(c?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let E=Reflect.getOwnMetadata(K,_.constructor,f)||{},A=[...Reflect.getOwnMetadata(rT,_.constructor)||[],{path:!C.startsWith("/")?`/${C}`:C,httpMethod:T.toUpperCase(),methodName:f,descriptor:c,argumentsMetadata:E}];Reflect.defineMetadata(rT,A,_.constructor)},xA=(C="/")=>TC(C,"Get"),SA=(C="/")=>TC(C,"Post"),uA=(C="/")=>TC(C,"Put"),HA=(C="/")=>TC(C,"Patch"),LA=(C="/")=>TC(C,"Delete"),zA=(C="/")=>TC(C,"Options");var FA=(C)=>(T,_,f)=>{let c=Reflect.getMetadata(pT,T)||[];c[f]=C,Reflect.defineMetadata(pT,c,T)};var qA=()=>(C)=>Reflect.defineMetadata(JT,void 0,C);var UA=()=>(C)=>{Reflect.defineMetadata(MT,void 0,C)};var WA=()=>(C)=>{Reflect.defineMetadata(NT,void 0,C)};var YA=(C)=>(T)=>{if(Reflect.hasOwnMetadata(HT,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:_,guards:f,interceptors:c,controllers:E,dependencies:A,webSockets:u}=C||{};if(_){for(let S=0;S<_.length;S++)if(!Reflect.getOwnMetadataKeys(_[S]).includes(NT))throw Error(`${_[S].name} is not a middleware.`)}if(f){for(let S=0;S<f.length;S++)if(!Reflect.getOwnMetadataKeys(f[S]).includes(XT))throw Error(`${f[S].name} is not a guard.`)}if(c){for(let S=0;S<c.length;S++)if(!Reflect.getOwnMetadataKeys(c[S]).includes(MT))throw Error(`${c[S].name} is not a interceptor.`)}if(E){for(let S=0;S<E.length;S++)if(!Reflect.getOwnMetadataKeys(E[S]).includes(uT))throw Error(`${E[S].name} is not a controller.`)}if(A){for(let S=0;S<A.length;S++)if(!Reflect.getOwnMetadataKeys(A[S]).includes(JT))throw Error(`${A[S].name} is not an injectable.`)}if(u){for(let S=0;S<u.length;S++)if(!Reflect.getOwnMetadataKeys(u[S]).includes(LT))throw Error(`${u[S].name} is not a websocket gateway.`)}Reflect.defineMetadata(AT,C,T)};var IC=Symbol("__bool:webSocket.upgrade__"),wA=(C,T,_)=>{let f=new URL(T.url);return C.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:f.pathname,query:_}})},QA=(C)=>(T)=>{let{prefix:_}=C||{};T.prototype[IC]=wA;let f=Object.getOwnPropertyDescriptor(T.prototype,IC),c=!f?[]:[{path:"/",httpMethod:"GET",methodName:IC,descriptor:f,argumentsMetadata:{}},{path:"/",httpMethod:"POST",methodName:IC,descriptor:f,argumentsMetadata:{}}],E={prefix:!_?.startsWith("/")?`/${_||""}`:_,events:Reflect.getOwnMetadata(mT,T)||{},http:c};Reflect.defineMetadata(LT,E,T)};var DA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(CT,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:zT},Reflect.defineMetadata(CT,f,C.constructor,T)},MA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(CT,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:TT},Reflect.defineMetadata(CT,f,C.constructor,T)},XA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(CT,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:LC},Reflect.defineMetadata(CT,f,C.constructor,T)},JA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(CT,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:zC},Reflect.defineMetadata(CT,f,C.constructor,T)},NA=()=>(C,T,_)=>{if(!T)return;let f=Reflect.getOwnMetadata(CT,C.constructor,T)||{};f[`argumentIndexes.${_}`]={index:_,type:PT},Reflect.defineMetadata(CT,f,C.constructor,T)};var VA=(C)=>(T,_,f)=>{if(!(f.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let c=Reflect.getOwnMetadata(CT,T.constructor,_),E=Object.freeze({methodName:_,descriptor:f,arguments:c}),A={...Reflect.getOwnMetadata(mT,T.constructor)||void 0,[C]:E};Reflect.defineMetadata(mT,E,T.constructor,_),Reflect.defineMetadata(mT,A,T.constructor)};var fT;(function(C){C.year="year",C.month="month",C.day="day",C.hours="hours",C.minutes="minutes",C.seconds="seconds",C.miliseconds="miliseconds"})(fT||(fT={}));var cf=(C,T,_=fT.day)=>{let f=C instanceof Date?C:new Date(C);switch(_){case fT.year:f.setFullYear(f.getFullYear()+T);break;case fT.month:f.setMonth(f.getMonth()+T);break;case fT.day:f.setDate(f.getDate()+T);break;case fT.hours:f.setHours(f.getHours()+T);break;case fT.minutes:f.setMinutes(f.getMinutes()+T);break;case fT.seconds:f.setSeconds(f.getSeconds()+T);break;case fT.miliseconds:f.setMilliseconds(f.getMilliseconds()+T);break}return f};var DE=$C(zE(),1);var{serve:T0}=globalThis.Bun;var bS=async function(){}.constructor;var FE=Object.freeze({black:"38;5;16",red:"38;5;196",green:"38;5;46",yellow:"38;5;226",blue:"38;5;21",magenta:"38;5;201",cyan:"38;5;51",white:"38;5;231",gray:"38;5;244"}),qE=Object.freeze({black:"48;5;16",red:"48;5;196",green:"48;5;46",yellow:"48;5;226",blue:"48;5;21",magenta:"48;5;201",cyan:"48;5;51",white:"48;5;231",gray:"48;5;244"}),DT=(C,T={})=>{let{color:_,backgroundColor:f,bold:c,underline:E}=T,A=[];if(c)A.push("1");if(E)A.push("4");if(_&&FE[_])A.push(FE[_]);if(f&&qE[f])A.push(qE[f]);if(A.length===0)return C;return`\x1B[${A.join(";")}m${C}\x1B[0m`};var xC=(C)=>{for(let[T,_]of Object.entries(p.httpStatuses)){if(_.status!==C)continue;return _.statusText}return"Unknown error"},UE=(C)=>{return typeof C==="function"&&!(C.prototype&&Object.getOwnPropertyDescriptor(C,"prototype")?.writable===!1)};var WE=(C)=>{let{headers:T,method:_}=C,f=T.get("upgrade")?.toLowerCase()||"",c=T.get("connection")?.toLowerCase()||"";return _==="GET"&&f?.toLowerCase()==="websocket"&&c?.toLowerCase().includes("upgrade")};class SC extends Error{httpCode;message;data;constructor({httpCode:C,data:T,message:_}){super();this.httpCode=C,this.message=!_?.trim()?xC(C):_.trim(),this.data=T}}class BC extends Error{httpCode;message;data;constructor({httpCode:C,data:T,message:_}){super();this.httpCode=C,this.message=!_?.trim()?xC(C):_.trim(),this.data=T}}var P_=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"],YE=(C)=>!!P_.find((T)=>T===C),wE=(C,T=new Headers)=>{if(T.set("Content-Type","application/json"),C instanceof SC||C instanceof BC)return new Response(JSON.stringify(C),{status:C.httpCode,statusText:C.message,headers:T});return new Response(JSON.stringify((()=>{switch(typeof C){case"object":return!(C instanceof Error)?C:{message:C.message,code:C.name,cause:C.cause};case"string":return{message:C};case"number":return{code:C};default:return}})()),{status:500,statusText:"INTERNAL SERVER ERROR",headers:T})};class aC{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(...C){C.forEach((T)=>{T.staticEntries.forEach(([_,f])=>this.set(_,f,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([_,f])=>this.set(_,f,{isStatic:!1}))})}get(C,T){return!{...this._options,...T}?.isStatic?this._dynamicMap.get(C):this._staticMap.get(C)}has(C,T){return!{...this._options,...T}?.isStatic?this._dynamicMap.has(C):this._staticMap.has(C)}set(C,T,_){let f={...this._options,..._};if(!f?.isStatic)this._dynamicMap.set(C,T);else if(!this._staticMap.has(C))this._staticMap.set(C,T);else if(!f.isPassthrough)throw Error(`${String(C)} already exists in context static collection.`);return this}setOptions(C){return this._options=C,this}get staticEntries(){return[...this._staticMap.entries()]}get dynamicEntries(){return[...this._dynamicMap.entries()]}}class b_{alias;#T=new Map;#f;constructor({alias:C}){let T=this._thinAlias(C);this.alias=T,this.#f=new URLPattern({pathname:T,baseURL:"https://www.booljs.com"})}test({pathname:C}){try{return this.#f.test({pathname:this._thinAlias(C),baseURL:"https://www.booljs.com"})}catch(T){return console.error(T),!1}}exec({pathname:C,method:T}){try{let _=this.#T.get(T);if(!_)return null;let f=this.#f.exec({pathname:this._thinAlias(C),baseURL:"https://www.booljs.com"});if(!f)return null;let c=f.pathname.groups;return Object.freeze({parameters:c,model:_})}catch(_){return console.error(_),null}}get({model:C}){if(!this.#T.get("GET"))this.#T.set("GET",C);return this}post({model:C}){if(!this.#T.get("POST"))this.#T.set("POST",C);return this}put({model:C}){if(!this.#T.get("PUT"))this.#T.set("PUT",C);return this}delete({model:C}){if(!this.#T.get("DELETE"))this.#T.set("DELETE",C);return this}connect({model:C}){if(!this.#T.get("CONNECT"))return this.#T.set("CONNECT",C);return this}options({model:C}){if(!this.#T.get("OPTIONS"))return this.#T.set("OPTIONS",C);return this}trace({model:C}){if(!this.#T.get("TRACE"))return this.#T.set("TRACE",C);return this}patch({model:C}){if(!this.#T.get("PATCH"))return this.#T.set("PATCH",C);return this}_thinAlias(C){return C.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((_,f)=>{let c=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!c.test(_)){if(c=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!c.test(_))return _;return _.replace(c,(E,A)=>`${E}(.*?)`)}return _}).join("/")}get _filteredPath(){return this.alias.split("/").map((_,f)=>{let c=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!c.test(_)){if(c=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!c.test(_))return _;return _.replace(c,(E,A)=>"(.*?)")}return _.replace(c,(E,A,u)=>u)}).join("/")}}var QE=b_;class nC{alias;#T=new Map;#f;#A;#c;constructor({alias:C,guardHandlers:T=[],openInterceptorHandlers:_=[],closeInterceptorHandlers:f=[]}){this.alias=this._thinAlias(C),this.#f=T,this.#A=_,this.#c=f}route({alias:C}){let T=this._thinAlias(`${this.alias}/${C}`),_=this.#T.get(T),f=!_?new QE({alias:`${this.alias}/${C}`}):_;if(!_)this.#T.set(T,f);return f}_thinAlias(C){return C.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this.#T}get pipes(){return Object.freeze({guardHandlers:[...this.#f],openInterceptorHandlers:[...this.#A],closeInterceptorHandlers:[...this.#c]})}}class ZT{#T=new Map;add(...C){for(let T of C){if(this.#T.has(T.alias))continue;this.#T.set(T.alias,T)}return this}find({pathname:C,method:T}){for(let _ of this.#T.values())for(let f of _.routes.values()){if(!f.test({pathname:C}))continue;let E=f.exec({pathname:C,method:T});if(!E)continue;return Object.freeze({...E,..._.pipes})}return null}}var H1=$C(hC(),1);class BT{_mapper=new Map;constructor(...C){C.forEach((T)=>{T.entries.forEach(([_,f])=>{this._mapper.set(_,f)})})}get(C){if(this._mapper.has(C))return this._mapper.get(C);if(typeof C!=="function")return;let T=Reflect.getMetadataKeys(C);if(![JT,uT,NT,XT,MT,LT].some((E)=>T.includes(E)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let f=(Reflect.getOwnMetadata(pT,C)||[]).map((E)=>this.get(E)),c=new C(...f);return this._mapper.set(C,c),c}set(C,T){if(this._mapper.has(C))throw Error(`${String(C)} already exists in injector collection.`);this._mapper.set(C,T)}get entries(){return[...this._mapper.entries()]}}class T_{error;constructor(C){this.error=C}}class C_{eventName;metadata;_context=void 0;constructor({eventName:C,metadata:T}){this.eventName=C,this.metadata=T}bind(C){return this._context=C,this}execute(){if(this._context&&typeof this.metadata.descriptor.value==="function")this.metadata.descriptor.value=this.metadata.descriptor.value.bind(this._context);return Object.freeze({methodName:this.metadata.methodName,descriptor:this.metadata.descriptor,arguments:this.metadata.arguments})}}class GC{rawAlias;alias;routes=[];constructor(C="/"){this.rawAlias=C;this.alias=GC.thinAlias(C)}addRoutes(...C){for(let T of C)if(!this.routes.includes(T))this.routes.push(T);return this}bind(C){for(let T of this.routes)T.bind(C);return this}execute(){let C=new Map;for(let T of this.routes)C.set(`${this.alias}:::${T.eventName}`,T.execute());return C}static thinAlias(C){return C.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class IT{rawPrefix;prefix;routers=[];constructor(C="/"){this.rawPrefix=C;this.prefix=IT.thinPrefix(C)}addRouters(...C){for(let T=0;T<C.length;T++)if(!this.routers.includes(C[T]))this.routers.push(C[T]);for(let T of C)if(!this.routers.includes(T))this.routers.push(T);return this}execute(){let C=new Map;for(let T of this.routers){let _=T.execute();for(let[f,c]of _.entries())C.set(`/${IT.thinPrefix(`${this.prefix}/${f}`)}`,c)}return C}static thinPrefix(C){return C.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class gC{classConstructor;options;#T;#f;#A=new Map;#c;#x=900;#R;#E=new aC;constructor(C,T){this.classConstructor=C;this.options=T;let _=Reflect.getOwnMetadataKeys(C);if(!_.includes(HT)&&!_.includes(AT))throw Error(`Can not detect! ${C.name} class is not a container or module.`);this.#f=!_.includes(HT)?"MODULE":"CONTAINER",this.#x=typeof T.static?.cacheTimeInSeconds!=="number"?900:T.static.cacheTimeInSeconds,this.#c=Object.freeze({allowLogsMethods:this.options?.log?.methods||[],staticOption:this.options.static,allowOrigins:!this.options.cors?.origins?["*"]:typeof this.options.cors.origins!=="string"?this.options.cors.origins.includes("*")||this.options.cors.origins.length<1?["*"]:this.options.cors.origins:[this.options.cors.origins!=="*"?this.options.cors.origins:"*"],allowMethods:this.options.cors?.methods||P_,allowCredentials:!this.options.cors?.credentials?!1:!0,allowHeaders:!this.options.cors?.headers||this.options.cors.headers.includes("*")?["*"]:this.options.cors.headers,pipelineStrategy:(()=>{switch(T.pipelineStrategy?.type){case"SIMPLE":return Object.freeze({startMiddlewares:"FIFO",endMiddlewares:T.pipelineStrategy.targets?.middlewares||"FIFO",openInterceptors:"FIFO",closeInterceptors:T.pipelineStrategy.targets?.interceptors||"FIFO"});default:return Object.freeze({startMiddlewares:"FIFO",endMiddlewares:"FIFO",openInterceptors:"FIFO",closeInterceptors:"FIFO"})}})()})}static async create(C,T){let _=new gC(C,T);return await _.preLaunch(),_}useValidator(C){this.#R=C}async preLaunch(){if(this.#T)return this.#T;let{startMiddlewareHandlers:C,endMiddlewareHandlers:T,controllerRouterGroup:_,webSocketHttpRouterGroup:f,webSocketRouterGroup:c}=this.#f!=="MODULE"?await this.#q({containerClass:this.classConstructor,prefix:this.options.prefix,options:this.options}):await this.#S({moduleClass:this.classConstructor,prefix:this.options.prefix,options:this.options}),E=new Map,A=c.execute();for(let[u,S]of A.entries())E.set(u,S);return this.#T=Object.freeze({startMiddlewareHandlers:C,endMiddlewareHandlers:T,controllerRouterGroup:_,webSocketHttpRouterGroup:f,webSocketRouterGroup:c,webSocketsMap:E}),this.#T}async listen(){let C=T0({port:this.options.port,idleTimeout:typeof this.options.idleTimeoutInSeconds!=="number"||this.options.idleTimeoutInSeconds<=0?void 0:this.options.idleTimeoutInSeconds,fetch:this.#u.bind(this),websocket:await this.#H.bind(this)()});this.#E.set(TT,C)}async#u(C,T){let{allowLogsMethods:_,allowOrigins:f,allowMethods:c,allowHeaders:E,allowCredentials:A,staticOption:u}=this.#c,{startMiddlewareHandlers:S,endMiddlewareHandlers:U,controllerRouterGroup:z,webSocketHttpRouterGroup:q}=await this.preLaunch(),x=performance.now(),Q=new URL(C.url),Y=DE.parse(Q.searchParams.toString(),this.options.queryParser),W=C.headers.get("origin")||"*",P=C.method.toUpperCase(),L=new Headers,r=new aC().setOptions({isStatic:!0}).set(FT,T).set(UT,C).set(qT,C.headers).set(RT,L).set(FC,Y);try{if([...!A?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:f.includes("*")?"*":!f.includes(W)?f[0]:W},{key:"Access-Control-Allow-Methods",value:c.join(", ")},{key:"Access-Control-Allow-Headers",value:E.join(", ")}].forEach(({key:$,value:b})=>L.set($,b)),!YE(P)||!c.includes(P))return this.finalizeResponse(new Response(void 0,{...p.clientErrorStatuses.METHOD_NOT_ALLOWED,headers:L}));if(WE(C))return await this.#L({request:C,server:T,context:r,url:Q,query:Y,method:P,responseHeaders:L,httpRouterGroup:q,startMiddlewareHandlers:S,endMiddlewareHandlers:U});if(C.method.toUpperCase()==="OPTIONS")return this.finalizeResponse(f.includes("*")||f.includes(W)?new Response(void 0,{...p.successfulStatuses.NO_CONTENT,headers:L}):new Response(void 0,{...p.clientErrorStatuses.EXPECTATION_FAILED,headers:L}));if(u){let $=await this.#z({url:Q,responseHeaders:L,path:u.path,headers:u.headers,cacheTimeInSeconds:u.cacheTimeInSeconds});if($ instanceof Response)return $}return await this.#F({url:Q,method:P,context:r,httpRouterGroup:z,startMiddlewareHandlers:S,endMiddlewareHandlers:U})}catch(g){return this.options.debug&&console.error(g),this.finalizeResponse(wE(g,L))}finally{if(_){let g=performance.now(),d=r.get(bT,{isStatic:!1}),$=typeof d!=="number"||!d?0:d,b=DT(Q.pathname,{color:"blue"}),k=`${Bun.color("yellow","ansi")}${process.pid}`,n=DT(` ${C.method} `,{color:"yellow",backgroundColor:"blue"}),M=DT(`${C.headers.get("x-forwarded-for")||C.headers.get("x-real-ip")||T.requestIP(C)?.address||"<Unknown>"}`,{color:"yellow"}),N=Math.round((g-x+Number.EPSILON)*100)/100,B=DT(` ${N}ms `.padStart(10),(()=>{if(N>=500)return{color:"white",backgroundColor:"red"};if(N>=300)return{color:"black",backgroundColor:"yellow"};else return{color:"white",backgroundColor:"blue"}})()),s=DT(` ${$} `.padStart(5),(()=>{if($>=100&&$<200)return{color:"white",backgroundColor:"cyan"};else if($>=200&&$<300)return{color:"white",backgroundColor:"blue"};else if($>=300&&$<400)return{color:"black",backgroundColor:"magenta"};else if($>=400&&$<500)return{color:"black",backgroundColor:"yellow"};else if($>=500&&$<600)return{color:"white",backgroundColor:"red"};else return{color:"black",backgroundColor:"gray"}})());_.includes(C.method.toUpperCase())&&console.info([`PID: ${k}`,`Method: ${n}`,`Time: ${B}`,typeof d!=="number"||!d?void 0:`Status: ${s}`,`IP: ${M}`,b].filter((j)=>!!j).join(" - "))}}}async#H(){let{webSocketsMap:C}=await this.preLaunch();return{open:(T)=>{let _=`${T.data.pathname}:::open`,f=C.get(_);if(!f)return;let c=f.arguments||{},E=[];for(let[,A]of Object.entries(c))switch(A.type){case zT:E[A.index]=T;break;case TT:E[A.index]=this.#E.get(TT);break}f.descriptor.value(...E)},close:(T,_,f)=>{let c=`${T.data.pathname}:::close`,E=C.get(c);if(!E)return;let A=E.arguments||{},u=[];for(let[,S]of Object.entries(A))switch(S.type){case zT:u[S.index]=T;break;case LC:u[S.index]=_;break;case zC:u[S.index]=f;break;case TT:u[S.index]=this.#E.get(TT);break}E.descriptor.value(...u)},message:(T,_)=>{let f=`${T.data.pathname}:::message`,c=C.get(f);if(!c)return;let E=c.arguments||{},A=[];for(let[,u]of Object.entries(E))switch(u.type){case zT:A[u.index]=T;break;case PT:A[u.index]=_;break;case TT:A[u.index]=this.#E.get(TT);break}c.descriptor.value(...A)},drain:(T)=>{let _=`${T.data.pathname}:::drain`,f=C.get(_);if(!f)return;let c=f.arguments||{},E=[];for(let[,A]of Object.entries(c))switch(A.type){case zT:E[A.index]=T;break;case TT:E[A.index]=this.#E.get(TT);break}f.descriptor.value(...E)},ping:(T,_)=>{let f=`${T.data.pathname}:::ping`,c=C.get(f);if(!c)return;let E=c.arguments||{},A=[];for(let[,u]of Object.entries(E))switch(u.type){case zT:A[u.index]=T;break;case PT:A[u.index]=_;break;case TT:A[u.index]=this.#E.get(TT);break}c.descriptor.value(...A)},pong:(T,_)=>{let f=`${T.data.pathname}:::pong`,c=C.get(f);if(!c)return;let E=c.arguments||{},A=[];for(let[,u]of Object.entries(E))switch(u.type){case zT:A[u.index]=T;break;case PT:A[u.index]=_;break;case TT:A[u.index]=this.#E.get(TT);break}c.descriptor.value(...A)}}}async#L({request:C,server:T,context:_,url:f,query:c,method:E,responseHeaders:A,httpRouterGroup:u,startMiddlewareHandlers:S,endMiddlewareHandlers:U}){try{await this.#_({type:"START_MIDDLEWARES",handlers:S,context:_});let z=u.find({pathname:f.pathname,method:E}),q=this.finalizeResponse(new Response(void 0,{...p.serverErrorStatuses.INTERNAL_SERVER_ERROR,headers:A}));if(z){let x=await this.#_({type:"GUARDS",handlers:z.guardHandlers,context:_});if(x!==!0)q=this.finalizeResponse(new Response(void 0,{...!x||x==="UNAUTHORIZATION"?p.clientErrorStatuses.UNAUTHORIZED:p.clientErrorStatuses.FORBIDDEN,headers:A}));else{_.set(xT,z.model),await this.#_({type:"OPEN_INTERCEPTORS",handlers:z.openInterceptorHandlers,context:_});let Q=await z.model.func(...[T,C,c]);if(await this.#_({type:"CLOSE_INTERCEPTORS",handlers:z.closeInterceptorHandlers,context:_}),typeof Q!=="boolean"||!Q)q=this.finalizeResponse(new Response(void 0,{...p.serverErrorStatuses.INTERNAL_SERVER_ERROR,headers:A}));else q=void 0}}return await this.#_({type:"END_MIDDLEWARES",handlers:U,context:_}),q}catch(z){throw console.error(z),z}}async#z({url:C,path:T,headers:_,cacheTimeInSeconds:f,responseHeaders:c}){let E=`${T}/${C.pathname}`,A=this.#A.get(E);if(!A){let u=Bun.file(E);if(await u.exists()){if(_)for(let[U,z]of Object.entries(_))c.set(U,z);return c.set("Content-Type",u.type),this.finalizeResponse(new Response(await u.arrayBuffer(),{...p.successfulStatuses.OK,headers:c}))}}else{let u=new Date>A.expiredAt;if(u)this.#A.delete(E);let S=!u?A.file:Bun.file(E);if(await S.exists()){if(this.#A.set(E,Object.freeze({expiredAt:cf(new Date,this.#x,fT.seconds),file:S})),_)for(let[z,q]of Object.entries(_))c.set(z,q);return c.set("Content-Type",S.type),this.finalizeResponse(new Response(await S.arrayBuffer(),{...p.successfulStatuses.OK,headers:c}))}}}async#F({context:C,url:T,method:_,httpRouterGroup:f,startMiddlewareHandlers:c=[],endMiddlewareHandlers:E=[]}){let A={isStatic:!0};C.setOptions(A),await this.#_({type:"START_MIDDLEWARES",handlers:c,context:C});let u=f.find({pathname:T.pathname,method:_});if(!u)C.setOptions({isStatic:!1}).set(bT,p.clientErrorStatuses.NOT_FOUND.status).set(aT,p.clientErrorStatuses.NOT_FOUND.statusText).set(eT,void 0);else{C.set(xT,u.model),C.set(oT,u.parameters);let x=await this.#_({type:"GUARDS",handlers:u.guardHandlers,context:C});if(x!==!0)C.setOptions({isStatic:!1}).set(bT,!x||x==="UNAUTHORIZATION"?p.clientErrorStatuses.UNAUTHORIZED.status:p.clientErrorStatuses.FORBIDDEN.status).set(aT,!x||x==="UNAUTHORIZATION"?p.clientErrorStatuses.UNAUTHORIZED.statusText:p.clientErrorStatuses.FORBIDDEN.statusText).set(eT,void 0);else await this.#_({type:"OPEN_INTERCEPTORS",handlers:u.openInterceptorHandlers,context:C}),await this.#_({type:"CONTROLLER",context:C}),await this.#_({type:"CLOSE_INTERCEPTORS",handlers:u.closeInterceptorHandlers,context:C})}await this.#_({type:"END_MIDDLEWARES",handlers:E,context:C});let S=C.get(RT,{isStatic:!0})||new Headers,U=C.get(eT,{isStatic:!1})||void 0,z=C.get(bT,{isStatic:!1}),q=C.get(aT,{isStatic:!1});return this.serializeResponse({status:typeof z!=="number"?_==="POST"?201:void 0:z,statusText:typeof q!=="string"?void 0:q,headers:S,data:U})}async#q({prefix:C="",startMiddlewareHandlers:T=[],endMiddlewareHandlers:_=[],guardHandlers:f=[],openInterceptorHandlers:c=[],closeInterceptorHandlers:E=[],controllerRouterGroup:A=new ZT,webSocketHttpRouterGroup:u=new ZT,webSocketRouterGroup:S=new IT,containerClass:U,options:z,extendInjector:q}){if(!Reflect.getOwnMetadataKeys(U).includes(HT))throw Error(`[${U.name}] is not a container.`);let x=!q?new BT:new BT(q),Q=Reflect.getOwnMetadata(HT,U),{loaders:Y,middlewares:W,dependencies:P,modules:L,guards:r,interceptors:g,prefix:d,config:$}=Q||{},{config:b}=Object.freeze({config:{...typeof z.config!=="function"?z.config:await z.config(),...typeof $!=="function"?typeof $!=="object"?void 0:("key"in $)&&("value"in $)&&typeof $.key==="symbol"?typeof $.value!=="function"?$.value:await $.value():$:await $()}});if(x.set($&&"key"in $&&"value"in $&&typeof $.key==="symbol"?$.key:KC,b),Y){let k=[];for(let[M,N]of Object.entries(Y))k.push(async()=>{try{let B=await N({config:b});return console.info(`${DT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${M}] initialized successfully.`),B}catch(B){throw console.error(`${DT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${M}] initialization failed.`),z.debug&&console.error(B),B}});let n=await Promise.all(k.map((M)=>M()));for(let[M,N]of n)x.set(M,N)}if(P){for(let k of P)if(!x.get(k))throw Error(`Can not collect dependency [${k.name}].`)}if(W){let k=(n,M)=>!!n;for(let n of W){let M=x.get(n);if(!M||!k(M,n))throw Error(`Can not collect middleware [${n.name}].`);if(M.start&&typeof M.start==="function"){let N=Reflect.getOwnMetadata(K,n,"start")||{};T.push(Object.freeze({class:n,funcName:"start",func:M.start.bind(M),argumentsMetadata:N}))}if(M.end&&typeof M.end==="function"){let N=Reflect.getOwnMetadata(K,n,"end")||{};_.push(Object.freeze({class:n,funcName:"end",func:M.end.bind(M),argumentsMetadata:N}))}}}if(r){let k=(n,M)=>!!n;for(let n of r){let M=x.get(n);if(!M||!k(M,n))throw Error(`Can not collect guard [${n.name}].`);let N=Reflect.getOwnMetadata(K,n,"enforce")||{};f.push(Object.freeze({class:n,funcName:"enforce",func:M.enforce.bind(M),argumentsMetadata:N}))}}if(g){let k=(n,M)=>!!n;for(let n of g){let M=x.get(n);if(!M||!k(M,n))throw Error(`Can not collect interceptor [${n.name}].`);if(M){if(M.open&&typeof M.open==="function"){let N=Reflect.getOwnMetadata(K,n,"open")||{};c.push(Object.freeze({class:n,funcName:"open",func:M.open.bind(M),argumentsMetadata:N}))}if(M.close&&typeof M.close==="function"){let N=Reflect.getOwnMetadata(K,n,"close")||{};E.push(Object.freeze({class:n,funcName:"close",func:M.close.bind(M),argumentsMetadata:N}))}}}}if(L){let k=[C.trim(),d?.trim()||""].filter((n)=>n.length>0).join("/");for(let n of L)try{await this.#S({prefix:k,moduleClass:n,extendInjector:x,options:z,startMiddlewareHandlers:T,endMiddlewareHandlers:_,guardHandlers:[...f],openInterceptorHandlers:[...c],closeInterceptorHandlers:[...E],controllerRouterGroup:A,webSocketHttpRouterGroup:u,webSocketRouterGroup:S})}catch(M){throw console.group(`Can not resolve module: [${n.name}].`),console.error(M),console.groupEnd(),M}}return Object.freeze({startMiddlewareHandlers:T,endMiddlewareHandlers:_,controllerRouterGroup:A,webSocketHttpRouterGroup:u,webSocketRouterGroup:S})}async#S({prefix:C="",startMiddlewareHandlers:T=[],endMiddlewareHandlers:_=[],guardHandlers:f=[],openInterceptorHandlers:c=[],closeInterceptorHandlers:E=[],controllerRouterGroup:A=new ZT,webSocketHttpRouterGroup:u=new ZT,webSocketRouterGroup:S=new IT,moduleClass:U,options:z,extendInjector:q}){if(!Reflect.getOwnMetadataKeys(U).includes(AT))throw Error(`[${U.name}] is not a module.`);let x=!q?new BT:new BT(q),Q=Reflect.getOwnMetadata(AT,U),{loaders:Y,middlewares:W,guards:P,interceptors:L,controllers:r,dependencies:g,webSockets:d,prefix:$,config:b}=Q||{},k=[C.trim(),$?.trim()||""].filter((M)=>M.length>0).join("/"),{config:n}=Object.freeze({config:!b?void 0:{...typeof z.config!=="function"?z.config:await z.config(),...typeof b!=="function"?typeof b!=="object"?void 0:("key"in b)&&("value"in b)&&typeof b.key==="symbol"?typeof b.value!=="function"?b.value:await b.value():b:await b()}});if(n&&x.set(b&&"key"in b&&"value"in b&&typeof b.key==="symbol"?b.key:KC,n),Y){let M=[];for(let[B,s]of Object.entries(Y))M.push(async()=>{try{let j=await s({config:n});return console.info(`${DT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${B}] initialized successfully.`),j}catch(j){throw console.error(`${DT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${B}] initialization failed.`),z.debug&&console.error(j),j}});let N=await Promise.all(M.map((B)=>B()));for(let B=0;B<N.length;B++){let[s,j]=N[B];x.set(s,j)}}if(g){for(let M of g)if(!x.get(M))throw Error(`Can not collect dependency [${M.name}].`)}if(W){let M=(N,B)=>!!N;for(let N of W){let B=x.get(N);if(!B||!M(B,N))throw Error(`Can not collect middleware [${N.name}].`);if(B.start&&typeof B.start==="function"){let s=Reflect.getOwnMetadata(K,N,"start")||{};T.push(Object.freeze({class:N,funcName:"start",func:B.start.bind(B),argumentsMetadata:s}))}if(B.end&&typeof B.end==="function"){let s=Reflect.getOwnMetadata(K,N,"end")||{};_.push(Object.freeze({class:N,funcName:"end",func:B.end.bind(B),argumentsMetadata:s}))}}}if(P){let M=(N,B)=>!!N;for(let N of P){let B=x.get(N);if(!B||!M(B,N))throw Error(`Can not collect guard [${N.name}].`);let s=Reflect.getOwnMetadata(K,N,"enforce")||{};f.push(Object.freeze({class:N,funcName:"enforce",func:B.enforce.bind(B),argumentsMetadata:s}))}}if(L){let M=(N,B)=>!!N;for(let N of L){let B=x.get(N);if(!B||!M(B,N))throw Error(`Can not collect interceptor [${N.name}].`);if(B){if(B.open&&typeof B.open==="function"){let s=Reflect.getOwnMetadata(K,N,"open")||{};c.push(Object.freeze({class:N,funcName:"open",func:B.open.bind(B),argumentsMetadata:s}))}if(B.close&&typeof B.close==="function"){let s=Reflect.getOwnMetadata(K,N,"close")||{};E.push(Object.freeze({class:N,funcName:"close",func:B.close.bind(B),argumentsMetadata:s}))}}}}if(r)for(let M of r)this.#U({controllerConstructor:M,prefix:k,injector:x,httpRouterGroup:A,guardHandlers:[...f],openInterceptorHandlers:[...c],closeInterceptorHandlers:[...E]});if(d)for(let M of d)this.#W({webSocketConstructor:M,injector:x,prefix:k,webSocketHttpRouterGroup:u,webSocketRouterGroup:S});return Object.freeze({startMiddlewareHandlers:T,endMiddlewareHandlers:_,controllerRouterGroup:A,webSocketHttpRouterGroup:u,webSocketRouterGroup:S})}#U({controllerConstructor:C,prefix:T="",injector:_=new BT,httpRouterGroup:f=new ZT,guardHandlers:c=[],openInterceptorHandlers:E=[],closeInterceptorHandlers:A=[]}){if(!Reflect.getOwnMetadataKeys(C).includes(uT))throw Error(`[${C.name}] is not a controller.`);let u=_.get(C);if(!u)throw Error("Can not initialize controller.");let S=Reflect.getOwnMetadata(uT,C)||{prefix:"/",httpMetadata:[]},U=[T.trim(),S.prefix.trim()].filter((q)=>q.length>0).join("/"),z=new nC({alias:U,guardHandlers:c,openInterceptorHandlers:E,closeInterceptorHandlers:A});for(let q of S.httpMetadata){if(typeof q.descriptor.value!=="function")continue;let x=z.route({alias:q.path}),Q=q.descriptor.value.bind(u),Y=Object.freeze({class:C,funcName:q.methodName,func:Q,argumentsMetadata:q.argumentsMetadata});switch(q.httpMethod){case"GET":x.get({model:Y});break;case"POST":x.post({model:Y});break;case"PUT":x.put({model:Y});break;case"PATCH":x.patch({model:Y});break;case"DELETE":x.delete({model:Y});break;case"OPTIONS":x.options({model:Y});break}}return f.add(z)}async#C({context:C,data:T,validationSchema:_,argumentIndex:f,funcName:c}){if(!this.#R||!_||Object.getOwnPropertyDescriptor(_,"prototype"))return T;try{let E=typeof _==="function"&&UE(_)?await _(C):_,A=await this.#R.validate(T,E,f,c);if(!(A instanceof T_))return A;throw new SC({httpCode:400,message:`Validation at the [${c.toString()}] method fails at positional argument [${f}].`,data:A.error})}catch(E){if(E instanceof SC)throw E;throw new BC({httpCode:500,message:`Validation at the [${c.toString()}] method error at positional argument [${f}].`,data:!(E instanceof Error)?E:[{message:E.message,code:E.name,cause:E.cause}]})}}#W({webSocketConstructor:C,prefix:T="",injector:_=new BT,webSocketHttpRouterGroup:f=new ZT,webSocketRouterGroup:c=new IT,guardHandlers:E=[],openInterceptorHandlers:A=[],closeInterceptorHandlers:u=[]}){if(!Reflect.getOwnMetadataKeys(C).includes(LT))throw Error(`[${C.name}] is not a websocket route.`);let S=_.get(C);if(!S)throw Error("Can not initialize webSocket.");let U=Reflect.getOwnMetadata(LT,C)||{prefix:"/",events:[],http:[]},z=`/${T}/${U.prefix}`,q=new nC({alias:z,guardHandlers:E,openInterceptorHandlers:A,closeInterceptorHandlers:u});for(let[Q,Y]of Object.entries(U.http)){if(typeof Y.descriptor?.value!=="function")continue;let W=q.route({alias:Y.path}),P=Y.descriptor.value.bind(S),L=Object.freeze({class:C,funcName:Y.methodName,func:P,argumentsMetadata:Y.argumentsMetadata});switch(Y.httpMethod){case"GET":W.get({model:L});break;case"POST":W.post({model:L});break}}f.add(q);let x=new GC(z);for(let[Q,Y]of Object.entries(U.events)){let W=new C_({eventName:Q,metadata:Y});x.addRoutes(W)}return x.bind(S),c.addRouters(x),Object.freeze({webSocketHttpRouterGroup:f,webSocketRouterGroup:c})}async#_({type:C,handlers:T,context:_}){let f={isStatic:!0};_.setOptions(f);let c=_.get(FT,f)||void 0,E=_.get(UT,f)||void 0,A=_.get(qT,f)||void 0,u=_.get(RT,f)||void 0,S=_.get(oT,f)||void 0,U=_.get(xT,f)||void 0;if(C==="START_MIDDLEWARES"||C==="END_MIDDLEWARES"){let z=C==="START_MIDDLEWARES"?this.#c.pipelineStrategy.startMiddlewares:this.#c.pipelineStrategy.endMiddlewares;for(let q=z==="FIFO"?0:T.length-1;z==="FIFO"?q<T.length:q>-1;z==="FIFO"?q++:q--){let x=[],{func:Q,funcName:Y,argumentsMetadata:W}=T[q];for(let[P,L]of Object.entries(W))switch(L.type){case $T:x[L.index]=!L.key?_:_.get(L.key,f);break;case UT:x[L.index]=E;break;case gT:x[L.index]=!L.validationSchema?await E?.[L.parser||"json"]():await this.#C({context:_,data:await E?.[L.parser||"json"](),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case GT:x[L.index]=!L.validationSchema?A:await this.#C({context:_,data:A?.toJSON(),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case qT:x[L.index]=!L.validationSchema?A?.get(L.key)||void 0:await this.#C({context:_,data:A?.get(L.key)||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case OT:x[L.index]=!L.validationSchema?S?.[L.key]||void 0:await this.#C({context:_,data:S?.[L.key]||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case xT:x[L.index]=void 0;break;case RT:x[L.index]=u;break;case FT:x[L.index]=c;break;default:x[L.index]=!L.validationSchema?_.get(L.type,f):await this.#C({context:_,data:_.get(L.type,f),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break}await Q(...x)}}else if(C==="GUARDS"){if(!U||T.length===0)return!0;for(let z=0;z<T.length;z++){let q=[],{func:x,funcName:Q,argumentsMetadata:Y}=T[z];for(let[P,L]of Object.entries(Y))switch(L.type){case UT:q[L.index]=E;break;case gT:q[L.index]=!L.validationSchema?await E?.[L.parser||"json"]():await this.#C({context:_,data:await E?.[L.parser||"json"](),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case $T:q[L.index]=!L.key?_:_.get(L.key);break;case GT:q[L.index]=!L.validationSchema?A:await this.#C({context:_,data:A?.toJSON(),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case RT:q[L.index]=u;break;case qT:q[L.index]=!L.validationSchema?A?.get(L.key)||void 0:await this.#C({context:_,data:A?.get(L.key)||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case OT:q[L.index]=!L.validationSchema?S?.[L.key]||void 0:await this.#C({context:_,data:S?.[L.key],validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break;case xT:q[L.index]=U;break;case FT:q[L.index]=c;break;default:q[L.index]=!L.validationSchema?_.get(L.type):await this.#C({context:_,data:_.get(L.type),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Q});break}let W=await x(...q);if(W!==!0)return W}return!0}else if(C==="OPEN_INTERCEPTORS"||C==="CLOSE_INTERCEPTORS"){if(!U)return;let z=C==="OPEN_INTERCEPTORS"?this.#c.pipelineStrategy.openInterceptors:this.#c.pipelineStrategy.closeInterceptors;for(let q=z==="FIFO"?0:T.length-1;z==="FIFO"?q<T.length:q>-1;z==="FIFO"?q++:q--){let x=[],{func:Q,funcName:Y,argumentsMetadata:W}=T[q];for(let[P,L]of Object.entries(W))switch(L.type){case UT:x[L.index]=E;break;case gT:x[L.index]=!L.validationSchema?await E?.[L.parser||"json"]():await this.#C({context:_,data:await E?.[L.parser||"json"](),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case $T:x[L.index]=!L.key?_:_.get(L.key);break;case GT:x[L.index]=!L.validationSchema?A:await this.#C({context:_,data:A?.toJSON(),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case qT:x[L.index]=!L.validationSchema?A?.get(L.key)||void 0:await this.#C({context:_,data:A?.get(L.key)||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case RT:x[L.index]=u;break;case OT:x[L.index]=!L.validationSchema?S?.[L.key]||void 0:await this.#C({context:_,data:S?.[L.key]||void 0,validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break;case xT:x[L.index]=U;break;case FT:x[L.index]=c;break;default:x[L.index]=!L.validationSchema?_.get(L.type):await this.#C({context:_,data:_.get(L.type),validationSchema:L.validationSchema,argumentIndex:L.index,funcName:Y});break}await Q(...x)}}else if(C==="CONTROLLER"){if(!U){_.setOptions({isStatic:!1}).set(bT,404).set(aT,"Not found.");return}let z=[],{func:q,funcName:x,argumentsMetadata:Q}=U;for(let[Y,W]of Object.entries(Q))switch(W.type){case UT:z[W.index]=E;break;case gT:z[W.index]=!W.validationSchema?await E?.[W.parser||"json"]():await this.#C({context:_,data:await E?.[W.parser||"json"](),validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case $T:z[W.index]=!W.key?_:_.get(W.key);break;case GT:z[W.index]=!W.validationSchema?A:await this.#C({context:_,data:A?.toJSON(),validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case qT:z[W.index]=!W.validationSchema?A?.get(W.key)||void 0:await this.#C({context:_,data:A?.get(W.key)||void 0,validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case RT:z[W.index]=u;break;case OT:z[W.index]=!W.validationSchema?S?.[W.key]||void 0:await this.#C({context:_,data:S?.[W.key]||void 0,validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break;case xT:z[W.index]=U;break;case FT:z[W.index]=c;break;default:z[W.index]=!W.validationSchema?_.get(W.type):await this.#C({context:_,data:_.get(W.type),validationSchema:W.validationSchema,argumentIndex:W.index,funcName:x});break}_.set(eT,await q(...z),{isStatic:!1})}return}serializeResponse({status:C,statusText:T,headers:_,data:f}){let c=_.get("Content-Type")||"text/plain",E=!C?!f?204:200:C,A=xC(E);if(c.includes("application/json"))return this.finalizeResponse(new Response(!f?void 0:f instanceof ReadableStream?f:JSON.stringify(f),{status:E,statusText:A,headers:_}));if(c.includes("text/plain")||c.includes("text/html"))return this.finalizeResponse(new Response(!f?void 0:f instanceof ReadableStream?f:String(f),{status:E,statusText:A,headers:_}));if(c.includes("application/octet-stream")){if(f instanceof Uint8Array||f instanceof ArrayBuffer||f instanceof Blob||f instanceof ReadableStream)return this.finalizeResponse(new Response(f,{status:E,statusText:A,headers:_}));throw Error("Invalid data type for application/octet-stream")}if(c.includes("multipart/form-data")){if(f instanceof FormData)return this.finalizeResponse(new Response(f,{status:E,statusText:A,headers:_}));throw Error("multipart/form-data requires FormData object")}return this.finalizeResponse(new Response(!f?void 0:String(f),{status:E,statusText:A,headers:_}))}finalizeResponse(C){return C.headers.set("X-Powered-By","Bool Typescript"),C}}var s1=$C(hC(),1);var C0=async(C,T)=>{try{let _=new gC(C,T);return await _.preLaunch(),_}catch(_){throw T.debug&&console.error(_),_}};export{wE as jsonErrorInfer,YE as httpMethodsStandardization,P_ as httpMethods,MA as WebSocketServer,IT as WebSocketRouterGroup,GC as WebSocketRouter,C_ as WebSocketRoute,NA as WebSocketMessage,VA as WebSocketEvent,DA as WebSocketConnection,JA as WebSocketCloseReason,XA as WebSocketCloseCode,QA as WebSocket,T_ as ValidationFailed,fA as RouteModel,CA as ResponseHeaders,iE as RequestHeaders,rE as RequestHeader,pE as RequestBody,TA as Request,aE as Query,uA as Put,SA as Post,HA as Patch,oE as Params,eE as Param,zA as Options,p as Objects,YA as Module,WA as Middleware,e_ as Keys,UA as Interceptor,BT as Injector,qA as Injectable,FA as Inject,BC as HttpServerError,cA as HttpServer,ZT as HttpRouterGroup,nC as HttpRouter,b_ as HttpRoute,SC as HttpClientError,RA as Guard,xA as Get,LA as Delete,AA as Controller,_A as Context,EA as Container,C0 as BoolFactory,gC as Application};
|
|
19
19
|
|
|
20
|
-
//# debugId=
|
|
20
|
+
//# debugId=1FE4BAE94C15397264756E2164756E21
|