@bool-ts/core 1.9.27 → 2.0.0

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.
Files changed (44) hide show
  1. package/dist/decorators/arguments.d.ts +19 -20
  2. package/dist/decorators/container.d.ts +10 -11
  3. package/dist/decorators/http.d.ts +11 -11
  4. package/dist/decorators/index.d.ts +1 -2
  5. package/dist/entities/application.d.ts +111 -0
  6. package/dist/entities/context.d.ts +14 -0
  7. package/dist/entities/httpRoute.d.ts +18 -9
  8. package/dist/entities/httpRouter.d.ts +13 -0
  9. package/dist/entities/httpRouterGroup.d.ts +6 -0
  10. package/dist/entities/index.d.ts +2 -0
  11. package/dist/entities/injector.d.ts +29 -0
  12. package/dist/entities/validationFailed.d.ts +5 -0
  13. package/dist/entities/webSocketRoute.d.ts +1 -0
  14. package/dist/entities/webSocketRouter.d.ts +1 -0
  15. package/dist/entities/webSocketRouterGroup.d.ts +1 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +6 -6
  18. package/dist/index.js.map +22 -21
  19. package/dist/interfaces/customValidator.d.ts +4 -0
  20. package/dist/interfaces/index.d.ts +1 -0
  21. package/dist/producers/factory.d.ts +3 -1
  22. package/dist/producers/index.d.ts +1 -1
  23. package/package.json +5 -2
  24. package/src/decorators/arguments.ts +44 -39
  25. package/src/decorators/container.ts +12 -12
  26. package/src/decorators/http.ts +8 -8
  27. package/src/decorators/index.ts +1 -2
  28. package/src/entities/application.ts +2236 -0
  29. package/src/{producers → entities}/context.ts +2 -0
  30. package/src/entities/httpRoute.ts +18 -9
  31. package/src/entities/httpRouter.ts +13 -0
  32. package/src/entities/httpRouterGroup.ts +10 -4
  33. package/src/entities/index.ts +2 -0
  34. package/src/entities/validationFailed.ts +5 -0
  35. package/src/entities/webSocketRoute.ts +2 -0
  36. package/src/entities/webSocketRouter.ts +2 -0
  37. package/src/entities/webSocketRouterGroup.ts +2 -0
  38. package/src/index.ts +1 -0
  39. package/src/interfaces/customValidator.ts +10 -0
  40. package/src/interfaces/index.ts +1 -0
  41. package/src/producers/factory.ts +7 -2037
  42. package/src/producers/index.ts +1 -1
  43. package/src/decorators/zodSchema.ts +0 -21
  44. /package/src/{producers → entities}/injector.ts +0 -0
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var J0=Object.create;var{getPrototypeOf:w0,defineProperty:_A,getOwnPropertyNames:q0}=Object;var B0=Object.prototype.hasOwnProperty;var h_=(_,T,E)=>{E=_!=null?J0(w0(_)):{};let A=T||!_||!_.__esModule?_A(E,"default",{value:_,enumerable:!0}):E;for(let C of q0(_))if(!B0.call(A,C))_A(A,C,{get:()=>_[C],enumerable:!0});return A};var u=(_,T)=>()=>(T||_((T={exports:{}}).exports,T),T.exports);var D0=(_,T)=>{for(var E in T)_A(_,E,{get:T[E],enumerable:!0,configurable:!0,set:(A)=>T[E]=()=>A})};var z0=((_)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(_,{get:(T,E)=>(typeof require!=="undefined"?require:T)[E]}):_)(function(_){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+_+'" is not supported')});var O_=u(()=>{/*! *****************************************************************************
1
+ var U0=Object.create;var{getPrototypeOf:X0,defineProperty:r_,getOwnPropertyNames:J0}=Object;var Z0=Object.prototype.hasOwnProperty;var N_=(_,T,A)=>{A=_!=null?U0(X0(_)):{};let C=T||!_||!_.__esModule?r_(A,"default",{value:_,enumerable:!0}):A;for(let E of J0(_))if(!Z0.call(C,E))r_(C,E,{get:()=>_[E],enumerable:!0});return C};var O=(_,T)=>()=>(T||_((T={exports:{}}).exports,T),T.exports);var B0=(_,T)=>{for(var A in T)r_(_,A,{get:T[A],enumerable:!0,configurable:!0,set:(C)=>T[A]=()=>C})};var V0=((_)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(_,{get:(T,A)=>(typeof require!=="undefined"?require:T)[A]}):_)(function(_){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+_+'" is not supported')});var n_=O(()=>{/*! *****************************************************************************
2
2
  Copyright (C) Microsoft. All rights reserved.
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -11,10 +11,10 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
11
11
 
12
12
  See the Apache Version 2.0 License for specific language governing permissions
13
13
  and limitations under the License.
14
- ***************************************************************************** */var jA;(function(_){(function(T){var E=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:Y(),A=C(_);if(typeof E.Reflect!=="undefined")A=C(E.Reflect,A);if(T(A,E),typeof E.Reflect==="undefined")E.Reflect=_;function C(H,U){return function(X,D){if(Object.defineProperty(H,X,{configurable:!0,writable:!0,value:D}),U)U(X,D)}}function R(){try{return Function("return this;")()}catch(H){}}function W(){try{return(0,eval)("(function() { return this; })()")}catch(H){}}function Y(){return R()||W()}})(function(T,E){var A=Object.prototype.hasOwnProperty,C=typeof Symbol==="function",R=C&&typeof Symbol.toPrimitive!=="undefined"?Symbol.toPrimitive:"@@toPrimitive",W=C&&typeof Symbol.iterator!=="undefined"?Symbol.iterator:"@@iterator",Y=typeof Object.create==="function",H={__proto__:[]}instanceof Array,U=!Y&&!H,X={create:Y?function(){return TA(Object.create(null))}:H?function(){return TA({__proto__:null})}:function(){return TA({})},has:U?function(L,f){return A.call(L,f)}:function(L,f){return f in L},get:U?function(L,f){return A.call(L,f)?L[f]:void 0}:function(L,f){return L[f]}},D=Object.getPrototypeOf(Function),Q=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:F0(),G=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:Q0(),w=typeof WeakMap==="function"?WeakMap:U0(),z=C?Symbol.for("@reflect-metadata:registry"):void 0,K=Y0(),S=Z0(K);function h(L,f,x,q){if(!M(x)){if(!MA(L))throw new TypeError;if(!s(f))throw new TypeError;if(!s(q)&&!M(q)&&!WT(q))throw new TypeError;if(WT(q))q=void 0;return x=wT(x),d(L,f,x,q)}else{if(!MA(L))throw new TypeError;if(!uA(f))throw new TypeError;return p(L,f)}}T("decorate",h);function Z(L,f){function x(q,m){if(!s(q))throw new TypeError;if(!M(m)&&!H0(m))throw new TypeError;t(L,f,q,m)}return x}T("metadata",Z);function J(L,f,x,q){if(!s(x))throw new TypeError;if(!M(q))q=wT(q);return t(L,f,x,q)}T("defineMetadata",J);function B(L,f,x){if(!s(f))throw new TypeError;if(!M(x))x=wT(x);return CT(L,f,x)}T("hasMetadata",B);function b(L,f,x){if(!s(f))throw new TypeError;if(!M(x))x=wT(x);return AT(L,f,x)}T("hasOwnMetadata",b);function F(L,f,x){if(!s(f))throw new TypeError;if(!M(x))x=wT(x);return LT(L,f,x)}T("getMetadata",F);function O(L,f,x){if(!s(f))throw new TypeError;if(!M(x))x=wT(x);return ST(L,f,x)}T("getOwnMetadata",O);function P(L,f){if(!s(L))throw new TypeError;if(!M(f))f=wT(f);return TT(L,f)}T("getMetadataKeys",P);function $(L,f){if(!s(L))throw new TypeError;if(!M(f))f=wT(f);return YT(L,f)}T("getOwnMetadataKeys",$);function j(L,f,x){if(!s(f))throw new TypeError;if(!M(x))x=wT(x);if(!s(f))throw new TypeError;if(!M(x))x=wT(x);var q=Y_(f,x,!1);if(M(q))return!1;return q.OrdinaryDeleteMetadata(L,f,x)}T("deleteMetadata",j);function p(L,f){for(var x=L.length-1;x>=0;--x){var q=L[x],m=q(f);if(!M(m)&&!WT(m)){if(!uA(m))throw new TypeError;f=m}}return f}function d(L,f,x,q){for(var m=L.length-1;m>=0;--m){var o=L[m],e=o(f,x,q);if(!M(e)&&!WT(e)){if(!s(e))throw new TypeError;q=e}}return q}function CT(L,f,x){var q=AT(L,f,x);if(q)return!0;var m=a_(f);if(!WT(m))return CT(L,m,x);return!1}function AT(L,f,x){var q=Y_(f,x,!1);if(M(q))return!1;return PA(q.OrdinaryHasOwnMetadata(L,f,x))}function LT(L,f,x){var q=AT(L,f,x);if(q)return ST(L,f,x);var m=a_(f);if(!WT(m))return LT(L,m,x);return}function ST(L,f,x){var q=Y_(f,x,!1);if(M(q))return;return q.OrdinaryGetOwnMetadata(L,f,x)}function t(L,f,x,q){var m=Y_(x,q,!0);m.OrdinaryDefineOwnMetadata(L,f,x,q)}function TT(L,f){var x=YT(L,f),q=a_(L);if(q===null)return x;var m=TT(q,f);if(m.length<=0)return x;if(x.length<=0)return m;var o=new G,e=[];for(var k=0,V=x;k<V.length;k++){var N=V[k],c=o.has(N);if(!c)o.add(N),e.push(N)}for(var I=0,g=m;I<g.length;I++){var N=g[I],c=o.has(N);if(!c)o.add(N),e.push(N)}return e}function YT(L,f){var x=Y_(L,f,!1);if(!x)return[];return x.OrdinaryOwnMetadataKeys(L,f)}function kT(L){if(L===null)return 1;switch(typeof L){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return L===null?1:6;default:return 6}}function M(L){return L===void 0}function WT(L){return L===null}function nT(L){return typeof L==="symbol"}function s(L){return typeof L==="object"?L!==null:typeof L==="function"}function f_(L,f){switch(kT(L)){case 0:return L;case 1:return L;case 2:return L;case 3:return L;case 4:return L;case 5:return L}var x=f===3?"string":f===5?"number":"default",q=bA(L,R);if(q!==void 0){var m=q.call(L,x);if(s(m))throw new TypeError;return m}return t_(L,x==="default"?"number":x)}function t_(L,f){if(f==="string"){var x=L.toString;if(rT(x)){var q=x.call(L);if(!s(q))return q}var m=L.valueOf;if(rT(m)){var q=m.call(L);if(!s(q))return q}}else{var m=L.valueOf;if(rT(m)){var q=m.call(L);if(!s(q))return q}var o=L.toString;if(rT(o)){var q=o.call(L);if(!s(q))return q}}throw new TypeError}function PA(L){return!!L}function W0(L){return""+L}function wT(L){var f=f_(L,3);if(nT(f))return f;return W0(f)}function MA(L){return Array.isArray?Array.isArray(L):L instanceof Object?L instanceof Array:Object.prototype.toString.call(L)==="[object Array]"}function rT(L){return typeof L==="function"}function uA(L){return typeof L==="function"}function H0(L){switch(kT(L)){case 3:return!0;case 4:return!0;default:return!1}}function e_(L,f){return L===f||L!==L&&f!==f}function bA(L,f){var x=L[f];if(x===void 0||x===null)return;if(!rT(x))throw new TypeError;return x}function kA(L){var f=bA(L,W);if(!rT(f))throw new TypeError;var x=f.call(L);if(!s(x))throw new TypeError;return x}function gA(L){return L.value}function vA(L){var f=L.next();return f.done?!1:f}function nA(L){var f=L.return;if(f)f.call(L)}function a_(L){var f=Object.getPrototypeOf(L);if(typeof L!=="function"||L===D)return f;if(f!==D)return f;var x=L.prototype,q=x&&Object.getPrototypeOf(x);if(q==null||q===Object.prototype)return f;var m=q.constructor;if(typeof m!=="function")return f;if(m===L)return f;return m}function f0(){var L;if(!M(z)&&typeof E.Reflect!=="undefined"&&!(z in E.Reflect)&&typeof E.Reflect.defineMetadata==="function")L=x0(E.Reflect);var f,x,q,m=new w,o={registerProvider:e,getProvider:V,setProvider:c};return o;function e(I){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case L===I:break;case M(f):f=I;break;case f===I:break;case M(x):x=I;break;case x===I:break;default:if(q===void 0)q=new G;q.add(I);break}}function k(I,g){if(!M(f)){if(f.isProviderFor(I,g))return f;if(!M(x)){if(x.isProviderFor(I,g))return f;if(!M(q)){var l=kA(q);while(!0){var r=vA(l);if(!r)return;var JT=gA(r);if(JT.isProviderFor(I,g))return nA(l),JT}}}}if(!M(L)&&L.isProviderFor(I,g))return L;return}function V(I,g){var l=m.get(I),r;if(!M(l))r=l.get(g);if(!M(r))return r;if(r=k(I,g),!M(r)){if(M(l))l=new Q,m.set(I,l);l.set(g,r)}return r}function N(I){if(M(I))throw new TypeError;return f===I||x===I||!M(q)&&q.has(I)}function c(I,g,l){if(!N(l))throw new Error("Metadata provider not registered.");var r=V(I,g);if(r!==l){if(!M(r))return!1;var JT=m.get(I);if(M(JT))JT=new Q,m.set(I,JT);JT.set(g,l)}return!0}}function Y0(){var L;if(!M(z)&&s(E.Reflect)&&Object.isExtensible(E.Reflect))L=E.Reflect[z];if(M(L))L=f0();if(!M(z)&&s(E.Reflect)&&Object.isExtensible(E.Reflect))Object.defineProperty(E.Reflect,z,{enumerable:!1,configurable:!1,writable:!1,value:L});return L}function Z0(L){var f=new w,x={isProviderFor:function(N,c){var I=f.get(N);if(M(I))return!1;return I.has(c)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:m,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:k,OrdinaryDeleteMetadata:V};return K.registerProvider(x),x;function q(N,c,I){var g=f.get(N),l=!1;if(M(g)){if(!I)return;g=new Q,f.set(N,g),l=!0}var r=g.get(c);if(M(r)){if(!I)return;if(r=new Q,g.set(c,r),!L.setProvider(N,c,x)){if(g.delete(c),l)f.delete(N);throw new Error("Wrong provider for target.")}}return r}function m(N,c,I){var g=q(c,I,!1);if(M(g))return!1;return PA(g.has(N))}function o(N,c,I){var g=q(c,I,!1);if(M(g))return;return g.get(N)}function e(N,c,I,g){var l=q(I,g,!0);l.set(N,c)}function k(N,c){var I=[],g=q(N,c,!1);if(M(g))return I;var l=g.keys(),r=kA(l),JT=0;while(!0){var yA=vA(r);if(!yA)return I.length=JT,I;var X0=gA(yA);try{I[JT]=X0}catch(S0){try{nA(r)}finally{throw S0}}JT++}}function V(N,c,I){var g=q(c,I,!1);if(M(g))return!1;if(!g.delete(N))return!1;if(g.size===0){var l=f.get(c);if(!M(l)){if(l.delete(I),l.size===0)f.delete(l)}}return!0}}function x0(L){var{defineMetadata:f,hasOwnMetadata:x,getOwnMetadata:q,getOwnMetadataKeys:m,deleteMetadata:o}=L,e=new w,k={isProviderFor:function(V,N){var c=e.get(V);if(!M(c)&&c.has(N))return!0;if(m(V,N).length){if(M(c))c=new G,e.set(V,c);return c.add(N),!0}return!1},OrdinaryDefineOwnMetadata:f,OrdinaryHasOwnMetadata:x,OrdinaryGetOwnMetadata:q,OrdinaryOwnMetadataKeys:m,OrdinaryDeleteMetadata:o};return k}function Y_(L,f,x){var q=K.getProvider(L,f);if(!M(q))return q;if(x){if(K.setProvider(L,f,S))return S;throw new Error("Illegal state.")}return}function F0(){var L={},f=[],x=function(){function k(V,N,c){this._index=0,this._keys=V,this._values=N,this._selector=c}return k.prototype["@@iterator"]=function(){return this},k.prototype[W]=function(){return this},k.prototype.next=function(){var V=this._index;if(V>=0&&V<this._keys.length){var N=this._selector(this._keys[V],this._values[V]);if(V+1>=this._keys.length)this._index=-1,this._keys=f,this._values=f;else this._index++;return{value:N,done:!1}}return{value:void 0,done:!0}},k.prototype.throw=function(V){if(this._index>=0)this._index=-1,this._keys=f,this._values=f;throw V},k.prototype.return=function(V){if(this._index>=0)this._index=-1,this._keys=f,this._values=f;return{value:V,done:!0}},k}(),q=function(){function k(){this._keys=[],this._values=[],this._cacheKey=L,this._cacheIndex=-2}return Object.defineProperty(k.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),k.prototype.has=function(V){return this._find(V,!1)>=0},k.prototype.get=function(V){var N=this._find(V,!1);return N>=0?this._values[N]:void 0},k.prototype.set=function(V,N){var c=this._find(V,!0);return this._values[c]=N,this},k.prototype.delete=function(V){var N=this._find(V,!1);if(N>=0){var c=this._keys.length;for(var I=N+1;I<c;I++)this._keys[I-1]=this._keys[I],this._values[I-1]=this._values[I];if(this._keys.length--,this._values.length--,e_(V,this._cacheKey))this._cacheKey=L,this._cacheIndex=-2;return!0}return!1},k.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=L,this._cacheIndex=-2},k.prototype.keys=function(){return new x(this._keys,this._values,m)},k.prototype.values=function(){return new x(this._keys,this._values,o)},k.prototype.entries=function(){return new x(this._keys,this._values,e)},k.prototype["@@iterator"]=function(){return this.entries()},k.prototype[W]=function(){return this.entries()},k.prototype._find=function(V,N){if(!e_(this._cacheKey,V)){this._cacheIndex=-1;for(var c=0;c<this._keys.length;c++)if(e_(this._keys[c],V)){this._cacheIndex=c;break}}if(this._cacheIndex<0&&N)this._cacheIndex=this._keys.length,this._keys.push(V),this._values.push(void 0);return this._cacheIndex},k}();return q;function m(k,V){return k}function o(k,V){return V}function e(k,V){return[k,V]}}function Q0(){var L=function(){function f(){this._map=new Q}return Object.defineProperty(f.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),f.prototype.has=function(x){return this._map.has(x)},f.prototype.add=function(x){return this._map.set(x,x),this},f.prototype.delete=function(x){return this._map.delete(x)},f.prototype.clear=function(){this._map.clear()},f.prototype.keys=function(){return this._map.keys()},f.prototype.values=function(){return this._map.keys()},f.prototype.entries=function(){return this._map.entries()},f.prototype["@@iterator"]=function(){return this.keys()},f.prototype[W]=function(){return this.keys()},f}();return L}function U0(){var L=16,f=X.create(),x=q();return function(){function V(){this._key=q()}return V.prototype.has=function(N){var c=m(N,!1);return c!==void 0?X.has(c,this._key):!1},V.prototype.get=function(N){var c=m(N,!1);return c!==void 0?X.get(c,this._key):void 0},V.prototype.set=function(N,c){var I=m(N,!0);return I[this._key]=c,this},V.prototype.delete=function(N){var c=m(N,!1);return c!==void 0?delete c[this._key]:!1},V.prototype.clear=function(){this._key=q()},V}();function q(){var V;do V="@@WeakMap@@"+k();while(X.has(f,V));return f[V]=!0,V}function m(V,N){if(!A.call(V,x)){if(!N)return;Object.defineProperty(V,x,{value:X.create()})}return V[x]}function o(V,N){for(var c=0;c<N;++c)V[c]=Math.random()*255|0;return V}function e(V){if(typeof Uint8Array==="function"){var N=new Uint8Array(V);if(typeof crypto!=="undefined")crypto.getRandomValues(N);else if(typeof msCrypto!=="undefined")msCrypto.getRandomValues(N);else o(N,V);return N}return o(new Array(V),V)}function k(){var V=e(L);V[6]=V[6]&79|64,V[8]=V[8]&191|128;var N="";for(var c=0;c<L;++c){var I=V[c];if(c===4||c===6||c===8)N+="-";if(I<16)N+="0";N+=I.toString(16).toLowerCase()}return N}}function TA(L){return L.__=void 0,delete L.__,L}})})(jA||(jA={}))});var sT=u((kL,sA)=>{sA.exports=TypeError});var q_=u((gL,xE)=>{var xA=typeof Map==="function"&&Map.prototype,EA=Object.getOwnPropertyDescriptor&&xA?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b_=xA&&EA&&typeof EA.get==="function"?EA.get:null,pA=xA&&Map.prototype.forEach,FA=typeof Set==="function"&&Set.prototype,CA=Object.getOwnPropertyDescriptor&&FA?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,k_=FA&&CA&&typeof CA.get==="function"?CA.get:null,iA=FA&&Set.prototype.forEach,LR=typeof WeakMap==="function"&&WeakMap.prototype,J_=LR?WeakMap.prototype.has:null,WR=typeof WeakSet==="function"&&WeakSet.prototype,w_=WR?WeakSet.prototype.has:null,HR=typeof WeakRef==="function"&&WeakRef.prototype,oA=HR?WeakRef.prototype.deref:null,fR=Boolean.prototype.valueOf,YR=Object.prototype.toString,ZR=Function.prototype.toString,xR=String.prototype.match,QA=String.prototype.slice,gT=String.prototype.replace,FR=String.prototype.toUpperCase,rA=String.prototype.toLowerCase,RE=RegExp.prototype.test,tA=Array.prototype.concat,KT=Array.prototype.join,QR=Array.prototype.slice,eA=Math.floor,WA=typeof BigInt==="function"?BigInt.prototype.valueOf:null,RA=Object.getOwnPropertySymbols,HA=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,__=typeof Symbol==="function"&&typeof Symbol.iterator==="object",ET=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===__?"object":"symbol")?Symbol.toStringTag:null,LE=Object.prototype.propertyIsEnumerable,aA=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_){return _.__proto__}:null);function TE(_,T){if(_===1/0||_===-1/0||_!==_||_&&_>-1000&&_<1000||RE.call(/e/,T))return T;var E=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _==="number"){var A=_<0?-eA(-_):eA(_);if(A!==_){var C=String(A),R=QA.call(T,C.length+1);return gT.call(C,E,"$&_")+"."+gT.call(gT.call(R,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gT.call(T,E,"$&_")}var fA=(()=>({})),_E=fA.custom,AE=fE(_E)?_E:null,WE={__proto__:null,double:'"',single:"'"},UR={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};xE.exports=function _(T,E,A,C){var R=E||{};if(uT(R,"quoteStyle")&&!uT(WE,R.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(uT(R,"maxStringLength")&&(typeof R.maxStringLength==="number"?R.maxStringLength<0&&R.maxStringLength!==1/0:R.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var W=uT(R,"customInspect")?R.customInspect:!0;if(typeof W!=="boolean"&&W!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(uT(R,"indent")&&R.indent!==null&&R.indent!=="\t"&&!(parseInt(R.indent,10)===R.indent&&R.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(uT(R,"numericSeparator")&&typeof R.numericSeparator!=="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Y=R.numericSeparator;if(typeof T==="undefined")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return ZE(T,R);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var H=String(T);return Y?TE(T,H):H}if(typeof T==="bigint"){var U=String(T)+"n";return Y?TE(T,U):U}var X=typeof R.depth==="undefined"?5:R.depth;if(typeof A==="undefined")A=0;if(A>=X&&X>0&&typeof T==="object")return YA(T)?"[Array]":"[Object]";var D=mR(R,A);if(typeof C==="undefined")C=[];else if(YE(C,T)>=0)return"[Circular]";function Q(d,CT,AT){if(CT)C=QR.call(C),C.push(CT);if(AT){var LT={depth:R.depth};if(uT(R,"quoteStyle"))LT.quoteStyle=R.quoteStyle;return _(d,LT,A+1,C)}return _(d,R,A+1,C)}if(typeof T==="function"&&!EE(T)){var G=GR(T),w=u_(T,Q);return"[Function"+(G?": "+G:" (anonymous)")+"]"+(w.length>0?" { "+KT.call(w,", ")+" }":"")}if(fE(T)){var z=__?gT.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):HA.call(T);return typeof T==="object"&&!__?S_(z):z}if(KR(T)){var K="<"+rA.call(String(T.nodeName)),S=T.attributes||[];for(var h=0;h<S.length;h++)K+=" "+S[h].name+"="+HE(XR(S[h].value),"double",R);if(K+=">",T.childNodes&&T.childNodes.length)K+="...";return K+="</"+rA.call(String(T.nodeName))+">",K}if(YA(T)){if(T.length===0)return"[]";var Z=u_(T,Q);if(D&&!OR(Z))return"["+ZA(Z,D)+"]";return"[ "+KT.call(Z,", ")+" ]"}if(JR(T)){var J=u_(T,Q);if(!("cause"in Error.prototype)&&"cause"in T&&!LE.call(T,"cause"))return"{ ["+String(T)+"] "+KT.call(tA.call("[cause]: "+Q(T.cause),J),", ")+" }";if(J.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+KT.call(J,", ")+" }"}if(typeof T==="object"&&W){if(AE&&typeof T[AE]==="function"&&fA)return fA(T,{depth:X-A});else if(W!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if(VR(T)){var B=[];if(pA)pA.call(T,function(d,CT){B.push(Q(CT,T,!0)+" => "+Q(d,T))});return CE("Map",b_.call(T),B,D)}if($R(T)){var b=[];if(iA)iA.call(T,function(d){b.push(Q(d,T))});return CE("Set",k_.call(T),b,D)}if(NR(T))return LA("WeakMap");if(IR(T))return LA("WeakSet");if(cR(T))return LA("WeakRef");if(qR(T))return S_(Q(Number(T)));if(DR(T))return S_(Q(WA.call(T)));if(BR(T))return S_(fR.call(T));if(wR(T))return S_(Q(String(T)));if(typeof window!=="undefined"&&T===window)return"{ [object Window] }";if(typeof globalThis!=="undefined"&&T===globalThis||typeof global!=="undefined"&&T===global)return"{ [object globalThis] }";if(!SR(T)&&!EE(T)){var F=u_(T,Q),O=aA?aA(T)===Object.prototype:T instanceof Object||T.constructor===Object,P=T instanceof Object?"":"null prototype",$=!O&&ET&&Object(T)===T&&ET in T?QA.call(vT(T),8,-1):P?"Object":"",j=O||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",p=j+($||P?"["+KT.call(tA.call([],$||[],P||[]),": ")+"] ":"");if(F.length===0)return p+"{}";if(D)return p+"{"+ZA(F,D)+"}";return p+"{ "+KT.call(F,", ")+" }"}return String(T)};function HE(_,T,E){var A=E.quoteStyle||T,C=WE[A];return C+_+C}function XR(_){return gT.call(String(_),/"/g,"&quot;")}function YA(_){return vT(_)==="[object Array]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function SR(_){return vT(_)==="[object Date]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function EE(_){return vT(_)==="[object RegExp]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function JR(_){return vT(_)==="[object Error]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function wR(_){return vT(_)==="[object String]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function qR(_){return vT(_)==="[object Number]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function BR(_){return vT(_)==="[object Boolean]"&&(!ET||!(typeof _==="object"&&(ET in _)))}function fE(_){if(__)return _&&typeof _==="object"&&_ instanceof Symbol;if(typeof _==="symbol")return!0;if(!_||typeof _!=="object"||!HA)return!1;try{return HA.call(_),!0}catch(T){}return!1}function DR(_){if(!_||typeof _!=="object"||!WA)return!1;try{return WA.call(_),!0}catch(T){}return!1}var zR=Object.prototype.hasOwnProperty||function(_){return _ in this};function uT(_,T){return zR.call(_,T)}function vT(_){return YR.call(_)}function GR(_){if(_.name)return _.name;var T=xR.call(ZR.call(_),/^function\s*([\w$]+)/);if(T)return T[1];return null}function YE(_,T){if(_.indexOf)return _.indexOf(T);for(var E=0,A=_.length;E<A;E++)if(_[E]===T)return E;return-1}function VR(_){if(!b_||!_||typeof _!=="object")return!1;try{b_.call(_);try{k_.call(_)}catch(T){return!0}return _ instanceof Map}catch(T){}return!1}function NR(_){if(!J_||!_||typeof _!=="object")return!1;try{J_.call(_,J_);try{w_.call(_,w_)}catch(T){return!0}return _ instanceof WeakMap}catch(T){}return!1}function cR(_){if(!oA||!_||typeof _!=="object")return!1;try{return oA.call(_),!0}catch(T){}return!1}function $R(_){if(!k_||!_||typeof _!=="object")return!1;try{k_.call(_);try{b_.call(_)}catch(T){return!0}return _ instanceof Set}catch(T){}return!1}function IR(_){if(!w_||!_||typeof _!=="object")return!1;try{w_.call(_,w_);try{J_.call(_,J_)}catch(T){return!0}return _ instanceof WeakSet}catch(T){}return!1}function KR(_){if(!_||typeof _!=="object")return!1;if(typeof HTMLElement!=="undefined"&&_ instanceof HTMLElement)return!0;return typeof _.nodeName==="string"&&typeof _.getAttribute==="function"}function ZE(_,T){if(_.length>T.maxStringLength){var E=_.length-T.maxStringLength,A="... "+E+" more character"+(E>1?"s":"");return ZE(QA.call(_,0,T.maxStringLength),T)+A}var C=UR[T.quoteStyle||"single"];C.lastIndex=0;var R=gT.call(gT.call(_,C,"\\$1"),/[\x00-\x1f]/g,hR);return HE(R,"single",T)}function hR(_){var T=_.charCodeAt(0),E={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(E)return"\\"+E;return"\\x"+(T<16?"0":"")+FR.call(T.toString(16))}function S_(_){return"Object("+_+")"}function LA(_){return _+" { ? }"}function CE(_,T,E,A){var C=A?ZA(E,A):KT.call(E,", ");return _+" ("+T+") {"+C+"}"}function OR(_){for(var T=0;T<_.length;T++)if(YE(_[T],`
15
- `)>=0)return!1;return!0}function mR(_,T){var E;if(_.indent==="\t")E="\t";else if(typeof _.indent==="number"&&_.indent>0)E=KT.call(Array(_.indent+1)," ");else return null;return{base:E,prev:KT.call(Array(T+1),E)}}function ZA(_,T){if(_.length===0)return"";var E=`
16
- `+T.prev+T.base;return E+KT.call(_,","+E)+`
17
- `+T.prev}function u_(_,T){var E=YA(_),A=[];if(E){A.length=_.length;for(var C=0;C<_.length;C++)A[C]=uT(_,C)?T(_[C],_):""}var R=typeof RA==="function"?RA(_):[],W;if(__){W={};for(var Y=0;Y<R.length;Y++)W["$"+R[Y]]=R[Y]}for(var H in _){if(!uT(_,H))continue;if(E&&String(Number(H))===H&&H<_.length)continue;if(__&&W["$"+H]instanceof Symbol)continue;else if(RE.call(/[^\w$]/,H))A.push(T(H,_)+": "+T(_[H],_));else A.push(H+": "+T(_[H],_))}if(typeof RA==="function"){for(var U=0;U<R.length;U++)if(LE.call(_,R[U]))A.push("["+T(R[U])+"]: "+T(_[R[U]],_))}return A}});var QE=u((vL,FE)=>{var PR=q_(),MR=sT(),g_=function(_,T,E){var A=_,C;for(;(C=A.next)!=null;A=C)if(C.key===T){if(A.next=C.next,!E)C.next=_.next,_.next=C;return C}},uR=function(_,T){if(!_)return;var E=g_(_,T);return E&&E.value},bR=function(_,T,E){var A=g_(_,T);if(A)A.value=E;else _.next={key:T,next:_.next,value:E}},kR=function(_,T){if(!_)return!1;return!!g_(_,T)},gR=function(_,T){if(_)return g_(_,T,!0)};FE.exports=function _(){var T,E={assert:function(A){if(!E.has(A))throw new MR("Side channel does not contain "+PR(A))},delete:function(A){var C=T&&T.next,R=gR(T,A);if(R&&C&&C===R)T=void 0;return!!R},get:function(A){return uR(T,A)},has:function(A){return kR(T,A)},set:function(A,C){if(!T)T={next:void 0};bR(T,A,C)}};return E}});var UA=u((nL,UE)=>{UE.exports=Object});var SE=u((yL,XE)=>{XE.exports=Error});var wE=u((jL,JE)=>{JE.exports=EvalError});var BE=u((lL,qE)=>{qE.exports=RangeError});var zE=u((dL,DE)=>{DE.exports=ReferenceError});var VE=u((sL,GE)=>{GE.exports=SyntaxError});var cE=u((pL,NE)=>{NE.exports=URIError});var IE=u((iL,$E)=>{$E.exports=Math.abs});var hE=u((oL,KE)=>{KE.exports=Math.floor});var mE=u((rL,OE)=>{OE.exports=Math.max});var ME=u((tL,PE)=>{PE.exports=Math.min});var bE=u((eL,uE)=>{uE.exports=Math.pow});var gE=u((aL,kE)=>{kE.exports=Math.round});var nE=u((TW,vE)=>{vE.exports=Number.isNaN||function _(T){return T!==T}});var jE=u((_W,yE)=>{var vR=nE();yE.exports=function _(T){if(vR(T)||T===0)return T;return T<0?-1:1}});var dE=u((AW,lE)=>{lE.exports=Object.getOwnPropertyDescriptor});var XA=u((EW,sE)=>{var v_=dE();if(v_)try{v_([],"length")}catch(_){v_=null}sE.exports=v_});var iE=u((CW,pE)=>{var n_=Object.defineProperty||!1;if(n_)try{n_({},"a",{value:1})}catch(_){n_=!1}pE.exports=n_});var rE=u((RW,oE)=>{oE.exports=function _(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},E=Symbol("test"),A=Object(E);if(typeof E==="string")return!1;if(Object.prototype.toString.call(E)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(A)!=="[object Symbol]")return!1;var C=42;T[E]=C;for(var R 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 W=Object.getOwnPropertySymbols(T);if(W.length!==1||W[0]!==E)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,E))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var Y=Object.getOwnPropertyDescriptor(T,E);if(Y.value!==C||Y.enumerable!==!0)return!1}return!0}});var aE=u((LW,eE)=>{var tE=typeof Symbol!=="undefined"&&Symbol,nR=rE();eE.exports=function _(){if(typeof tE!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof tE("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return nR()}});var SA=u((WW,TC)=>{TC.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null});var JA=u((HW,_C)=>{var yR=UA();_C.exports=yR.getPrototypeOf||null});var CC=u((fW,EC)=>{var jR="Function.prototype.bind called on incompatible ",lR=Object.prototype.toString,dR=Math.max,sR="[object Function]",AC=function _(T,E){var A=[];for(var C=0;C<T.length;C+=1)A[C]=T[C];for(var R=0;R<E.length;R+=1)A[R+T.length]=E[R];return A},pR=function _(T,E){var A=[];for(var C=E||0,R=0;C<T.length;C+=1,R+=1)A[R]=T[C];return A},iR=function(_,T){var E="";for(var A=0;A<_.length;A+=1)if(E+=_[A],A+1<_.length)E+=T;return E};EC.exports=function _(T){var E=this;if(typeof E!=="function"||lR.apply(E)!==sR)throw new TypeError(jR+E);var A=pR(arguments,1),C,R=function(){if(this instanceof C){var X=E.apply(this,AC(A,arguments));if(Object(X)===X)return X;return this}return E.apply(T,AC(A,arguments))},W=dR(0,E.length-A.length),Y=[];for(var H=0;H<W;H++)Y[H]="$"+H;if(C=Function("binder","return function ("+iR(Y,",")+"){ return binder.apply(this,arguments); }")(R),E.prototype){var U=function X(){};U.prototype=E.prototype,C.prototype=new U,U.prototype=null}return C}});var B_=u((YW,RC)=>{var oR=CC();RC.exports=Function.prototype.bind||oR});var y_=u((ZW,LC)=>{LC.exports=Function.prototype.call});var wA=u((xW,WC)=>{WC.exports=Function.prototype.apply});var fC=u((FW,HC)=>{HC.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply});var ZC=u((QW,YC)=>{var rR=B_(),tR=wA(),eR=y_(),aR=fC();YC.exports=aR||rR.call(eR,tR)});var qA=u((UW,xC)=>{var T1=B_(),_1=sT(),A1=y_(),E1=ZC();xC.exports=function _(T){if(T.length<1||typeof T[0]!=="function")throw new _1("a function is required");return E1(T1,A1,T)}});var JC=u((XW,SC)=>{var C1=qA(),FC=XA(),UC;try{UC=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!=="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var BA=!!UC&&FC&&FC(Object.prototype,"__proto__"),XC=Object,QC=XC.getPrototypeOf;SC.exports=BA&&typeof BA.get==="function"?C1([BA.get]):typeof QC==="function"?function _(T){return QC(T==null?T:XC(T))}:!1});var zC=u((SW,DC)=>{var wC=SA(),qC=JA(),BC=JC();DC.exports=wC?function _(T){return wC(T)}:qC?function _(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw new TypeError("getProto: not an object");return qC(T)}:BC?function _(T){return BC(T)}:null});var VC=u((JW,GC)=>{var R1=Function.prototype.call,L1=Object.prototype.hasOwnProperty,W1=B_();GC.exports=W1.call(R1,L1)});var d_=u((wW,KC)=>{var v,H1=UA(),f1=SE(),Y1=wE(),Z1=BE(),x1=zE(),R_=VE(),C_=sT(),F1=cE(),Q1=IE(),U1=hE(),X1=mE(),S1=ME(),J1=bE(),w1=gE(),q1=jE(),$C=Function,DA=function(_){try{return $C('"use strict"; return ('+_+").constructor;")()}catch(T){}},D_=XA(),B1=iE(),zA=function(){throw new C_},D1=D_?function(){try{return arguments.callee,zA}catch(_){try{return D_(arguments,"callee").get}catch(T){return zA}}}():zA,A_=aE()(),_T=zC(),z1=JA(),G1=SA(),IC=wA(),z_=y_(),E_={},V1=typeof Uint8Array==="undefined"||!_T?v:_T(Uint8Array),pT={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?v:ArrayBuffer,"%ArrayIteratorPrototype%":A_&&_T?_T([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":E_,"%AsyncGenerator%":E_,"%AsyncGeneratorFunction%":E_,"%AsyncIteratorPrototype%":E_,"%Atomics%":typeof Atomics==="undefined"?v:Atomics,"%BigInt%":typeof BigInt==="undefined"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":f1,"%eval%":eval,"%EvalError%":Y1,"%Float32Array%":typeof Float32Array==="undefined"?v:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?v:FinalizationRegistry,"%Function%":$C,"%GeneratorFunction%":E_,"%Int8Array%":typeof Int8Array==="undefined"?v:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?v:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A_&&_T?_T(_T([][Symbol.iterator]())):v,"%JSON%":typeof JSON==="object"?JSON:v,"%Map%":typeof Map==="undefined"?v:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!A_||!_T?v:_T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":H1,"%Object.getOwnPropertyDescriptor%":D_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?v:Promise,"%Proxy%":typeof Proxy==="undefined"?v:Proxy,"%RangeError%":Z1,"%ReferenceError%":x1,"%Reflect%":typeof Reflect==="undefined"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?v:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!A_||!_T?v:_T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A_&&_T?_T(""[Symbol.iterator]()):v,"%Symbol%":A_?Symbol:v,"%SyntaxError%":R_,"%ThrowTypeError%":D1,"%TypedArray%":V1,"%TypeError%":C_,"%Uint8Array%":typeof Uint8Array==="undefined"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?v:Uint32Array,"%URIError%":F1,"%WeakMap%":typeof WeakMap==="undefined"?v:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?v:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?v:WeakSet,"%Function.prototype.call%":z_,"%Function.prototype.apply%":IC,"%Object.defineProperty%":B1,"%Object.getPrototypeOf%":z1,"%Math.abs%":Q1,"%Math.floor%":U1,"%Math.max%":X1,"%Math.min%":S1,"%Math.pow%":J1,"%Math.round%":w1,"%Math.sign%":q1,"%Reflect.getPrototypeOf%":G1};if(_T)try{null.error}catch(_){GA=_T(_T(_)),pT["%Error.prototype%"]=GA}var GA,N1=function _(T){var E;if(T==="%AsyncFunction%")E=DA("async function () {}");else if(T==="%GeneratorFunction%")E=DA("function* () {}");else if(T==="%AsyncGeneratorFunction%")E=DA("async function* () {}");else if(T==="%AsyncGenerator%"){var A=_("%AsyncGeneratorFunction%");if(A)E=A.prototype}else if(T==="%AsyncIteratorPrototype%"){var C=_("%AsyncGenerator%");if(C&&_T)E=_T(C.prototype)}return pT[T]=E,E},NC={__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"]},G_=B_(),j_=VC(),c1=G_.call(z_,Array.prototype.concat),$1=G_.call(IC,Array.prototype.splice),cC=G_.call(z_,String.prototype.replace),l_=G_.call(z_,String.prototype.slice),I1=G_.call(z_,RegExp.prototype.exec),K1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,h1=/\\(\\)?/g,O1=function _(T){var E=l_(T,0,1),A=l_(T,-1);if(E==="%"&&A!=="%")throw new R_("invalid intrinsic syntax, expected closing `%`");else if(A==="%"&&E!=="%")throw new R_("invalid intrinsic syntax, expected opening `%`");var C=[];return cC(T,K1,function(R,W,Y,H){C[C.length]=Y?cC(H,h1,"$1"):W||R}),C},m1=function _(T,E){var A=T,C;if(j_(NC,A))C=NC[A],A="%"+C[0]+"%";if(j_(pT,A)){var R=pT[A];if(R===E_)R=N1(A);if(typeof R==="undefined"&&!E)throw new C_("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:C,name:A,value:R}}throw new R_("intrinsic "+T+" does not exist!")};KC.exports=function _(T,E){if(typeof T!=="string"||T.length===0)throw new C_("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof E!=="boolean")throw new C_('"allowMissing" argument must be a boolean');if(I1(/^%?[^%]*%?$/,T)===null)throw new R_("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var A=O1(T),C=A.length>0?A[0]:"",R=m1("%"+C+"%",E),W=R.name,Y=R.value,H=!1,U=R.alias;if(U)C=U[0],$1(A,c1([0,1],U));for(var X=1,D=!0;X<A.length;X+=1){var Q=A[X],G=l_(Q,0,1),w=l_(Q,-1);if((G==='"'||G==="'"||G==="`"||(w==='"'||w==="'"||w==="`"))&&G!==w)throw new R_("property names with quotes must have matching quotes");if(Q==="constructor"||!D)H=!0;if(C+="."+Q,W="%"+C+"%",j_(pT,W))Y=pT[W];else if(Y!=null){if(!(Q in Y)){if(!E)throw new C_("base intrinsic for "+T+" exists, but the property is not available.");return}if(D_&&X+1>=A.length){var z=D_(Y,Q);if(D=!!z,D&&"get"in z&&!("originalValue"in z.get))Y=z.get;else Y=Y[Q]}else D=j_(Y,Q),Y=Y[Q];if(D&&!H)pT[W]=Y}}return Y}});var VA=u((qW,mC)=>{var hC=d_(),OC=qA(),P1=OC([hC("%String.prototype.indexOf%")]);mC.exports=function _(T,E){var A=hC(T,!!E);if(typeof A==="function"&&P1(T,".prototype.")>-1)return OC([A]);return A}});var NA=u((BW,MC)=>{var M1=d_(),V_=VA(),u1=q_(),b1=sT(),PC=M1("%Map%",!0),k1=V_("Map.prototype.get",!0),g1=V_("Map.prototype.set",!0),v1=V_("Map.prototype.has",!0),n1=V_("Map.prototype.delete",!0),y1=V_("Map.prototype.size",!0);MC.exports=!!PC&&function _(){var T,E={assert:function(A){if(!E.has(A))throw new b1("Side channel does not contain "+u1(A))},delete:function(A){if(T){var C=n1(T,A);if(y1(T)===0)T=void 0;return C}return!1},get:function(A){if(T)return k1(T,A)},has:function(A){if(T)return v1(T,A);return!1},set:function(A,C){if(!T)T=new PC;g1(T,A,C)}};return E}});var bC=u((DW,uC)=>{var j1=d_(),p_=VA(),l1=q_(),s_=NA(),d1=sT(),L_=j1("%WeakMap%",!0),s1=p_("WeakMap.prototype.get",!0),p1=p_("WeakMap.prototype.set",!0),i1=p_("WeakMap.prototype.has",!0),o1=p_("WeakMap.prototype.delete",!0);uC.exports=L_?function _(){var T,E,A={assert:function(C){if(!A.has(C))throw new d1("Side channel does not contain "+l1(C))},delete:function(C){if(L_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return o1(T,C)}else if(s_){if(E)return E.delete(C)}return!1},get:function(C){if(L_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return s1(T,C)}return E&&E.get(C)},has:function(C){if(L_&&C&&(typeof C==="object"||typeof C==="function")){if(T)return i1(T,C)}return!!E&&E.has(C)},set:function(C,R){if(L_&&C&&(typeof C==="object"||typeof C==="function")){if(!T)T=new L_;p1(T,C,R)}else if(s_){if(!E)E=s_();E.set(C,R)}}};return A}:s_});var gC=u((zW,kC)=>{var r1=sT(),t1=q_(),e1=QE(),a1=NA(),T4=bC(),_4=T4||a1||e1;kC.exports=function _(){var T,E={assert:function(A){if(!E.has(A))throw new r1("Side channel does not contain "+t1(A))},delete:function(A){return!!T&&T.delete(A)},get:function(A){return T&&T.get(A)},has:function(A){return!!T&&T.has(A)},set:function(A,C){if(!T)T=_4();T.set(A,C)}};return E}});var i_=u((GW,vC)=>{var A4=String.prototype.replace,E4=/%20/g,cA={RFC1738:"RFC1738",RFC3986:"RFC3986"};vC.exports={default:cA.RFC3986,formatters:{RFC1738:function(_){return A4.call(_,E4,"+")},RFC3986:function(_){return String(_)}},RFC1738:cA.RFC1738,RFC3986:cA.RFC3986}});var KA=u((VW,yC)=>{var C4=i_(),$A=Object.prototype.hasOwnProperty,iT=Array.isArray,hT=function(){var _=[];for(var T=0;T<256;++T)_.push("%"+((T<16?"0":"")+T.toString(16)).toUpperCase());return _}(),R4=function _(T){while(T.length>1){var E=T.pop(),A=E.obj[E.prop];if(iT(A)){var C=[];for(var R=0;R<A.length;++R)if(typeof A[R]!=="undefined")C.push(A[R]);E.obj[E.prop]=C}}},nC=function _(T,E){var A=E&&E.plainObjects?{__proto__:null}:{};for(var C=0;C<T.length;++C)if(typeof T[C]!=="undefined")A[C]=T[C];return A},L4=function _(T,E,A){if(!E)return T;if(typeof E!=="object"&&typeof E!=="function"){if(iT(T))T.push(E);else if(T&&typeof T==="object"){if(A&&(A.plainObjects||A.allowPrototypes)||!$A.call(Object.prototype,E))T[E]=!0}else return[T,E];return T}if(!T||typeof T!=="object")return[T].concat(E);var C=T;if(iT(T)&&!iT(E))C=nC(T,A);if(iT(T)&&iT(E))return E.forEach(function(R,W){if($A.call(T,W)){var Y=T[W];if(Y&&typeof Y==="object"&&R&&typeof R==="object")T[W]=_(Y,R,A);else T.push(R)}else T[W]=R}),T;return Object.keys(E).reduce(function(R,W){var Y=E[W];if($A.call(R,W))R[W]=_(R[W],Y,A);else R[W]=Y;return R},C)},W4=function _(T,E){return Object.keys(E).reduce(function(A,C){return A[C]=E[C],A},T)},H4=function(_,T,E){var A=_.replace(/\+/g," ");if(E==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch(C){return A}},IA=1024,f4=function _(T,E,A,C,R){if(T.length===0)return T;var W=T;if(typeof T==="symbol")W=Symbol.prototype.toString.call(T);else if(typeof T!=="string")W=String(T);if(A==="iso-8859-1")return escape(W).replace(/%u[0-9a-f]{4}/gi,function(G){return"%26%23"+parseInt(G.slice(2),16)+"%3B"});var Y="";for(var H=0;H<W.length;H+=IA){var U=W.length>=IA?W.slice(H,H+IA):W,X=[];for(var D=0;D<U.length;++D){var Q=U.charCodeAt(D);if(Q===45||Q===46||Q===95||Q===126||Q>=48&&Q<=57||Q>=65&&Q<=90||Q>=97&&Q<=122||R===C4.RFC1738&&(Q===40||Q===41)){X[X.length]=U.charAt(D);continue}if(Q<128){X[X.length]=hT[Q];continue}if(Q<2048){X[X.length]=hT[192|Q>>6]+hT[128|Q&63];continue}if(Q<55296||Q>=57344){X[X.length]=hT[224|Q>>12]+hT[128|Q>>6&63]+hT[128|Q&63];continue}D+=1,Q=65536+((Q&1023)<<10|U.charCodeAt(D)&1023),X[X.length]=hT[240|Q>>18]+hT[128|Q>>12&63]+hT[128|Q>>6&63]+hT[128|Q&63]}Y+=X.join("")}return Y},Y4=function _(T){var E=[{obj:{o:T},prop:"o"}],A=[];for(var C=0;C<E.length;++C){var R=E[C],W=R.obj[R.prop],Y=Object.keys(W);for(var H=0;H<Y.length;++H){var U=Y[H],X=W[U];if(typeof X==="object"&&X!==null&&A.indexOf(X)===-1)E.push({obj:W,prop:U}),A.push(X)}}return R4(E),T},Z4=function _(T){return Object.prototype.toString.call(T)==="[object RegExp]"},x4=function _(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},F4=function _(T,E){return[].concat(T,E)},Q4=function _(T,E){if(iT(T)){var A=[];for(var C=0;C<T.length;C+=1)A.push(E(T[C]));return A}return E(T)};yC.exports={arrayToObject:nC,assign:W4,combine:F4,compact:Y4,decode:H4,encode:f4,isBuffer:x4,isRegExp:Z4,maybeMap:Q4,merge:L4}});var iC=u((NW,pC)=>{var lC=gC(),o_=KA(),N_=i_(),U4=Object.prototype.hasOwnProperty,dC={brackets:function _(T){return T+"[]"},comma:"comma",indices:function _(T,E){return T+"["+E+"]"},repeat:function _(T){return T}},OT=Array.isArray,X4=Array.prototype.push,sC=function(_,T){X4.apply(_,OT(T)?T:[T])},S4=Date.prototype.toISOString,jC=N_.default,a={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:jC,formatter:N_.formatters[jC],indices:!1,serializeDate:function _(T){return S4.call(T)},skipNulls:!1,strictNullHandling:!1},J4=function _(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},hA={},w4=function _(T,E,A,C,R,W,Y,H,U,X,D,Q,G,w,z,K,S,h){var Z=T,J=h,B=0,b=!1;while((J=J.get(hA))!==void 0&&!b){var F=J.get(T);if(B+=1,typeof F!=="undefined")if(F===B)throw new RangeError("Cyclic object value");else b=!0;if(typeof J.get(hA)==="undefined")B=0}if(typeof X==="function")Z=X(E,Z);else if(Z instanceof Date)Z=G(Z);else if(A==="comma"&&OT(Z))Z=o_.maybeMap(Z,function(YT){if(YT instanceof Date)return G(YT);return YT});if(Z===null){if(W)return U&&!K?U(E,a.encoder,S,"key",w):E;Z=""}if(J4(Z)||o_.isBuffer(Z)){if(U){var O=K?E:U(E,a.encoder,S,"key",w);return[z(O)+"="+z(U(Z,a.encoder,S,"value",w))]}return[z(E)+"="+z(String(Z))]}var P=[];if(typeof Z==="undefined")return P;var $;if(A==="comma"&&OT(Z)){if(K&&U)Z=o_.maybeMap(Z,U);$=[{value:Z.length>0?Z.join(",")||null:void 0}]}else if(OT(X))$=X;else{var j=Object.keys(Z);$=D?j.sort(D):j}var p=H?String(E).replace(/\./g,"%2E"):String(E),d=C&&OT(Z)&&Z.length===1?p+"[]":p;if(R&&OT(Z)&&Z.length===0)return d+"[]";for(var CT=0;CT<$.length;++CT){var AT=$[CT],LT=typeof AT==="object"&&AT&&typeof AT.value!=="undefined"?AT.value:Z[AT];if(Y&&LT===null)continue;var ST=Q&&H?String(AT).replace(/\./g,"%2E"):String(AT),t=OT(Z)?typeof A==="function"?A(d,ST):d:d+(Q?"."+ST:"["+ST+"]");h.set(T,B);var TT=lC();TT.set(hA,h),sC(P,_(LT,t,A,C,R,W,Y,H,A==="comma"&&K&&OT(Z)?null:U,X,D,Q,G,w,z,K,S,TT))}return P},q4=function _(T){if(!T)return a;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys!=="undefined"&&typeof T.encodeDotInKeys!=="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder!=="undefined"&&typeof T.encoder!=="function")throw new TypeError("Encoder has to be a function.");var E=T.charset||a.charset;if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=N_.default;if(typeof T.format!=="undefined"){if(!U4.call(N_.formatters,T.format))throw new TypeError("Unknown format option provided.");A=T.format}var C=N_.formatters[A],R=a.filter;if(typeof T.filter==="function"||OT(T.filter))R=T.filter;var W;if(T.arrayFormat in dC)W=T.arrayFormat;else if("indices"in T)W=T.indices?"indices":"repeat";else W=a.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var Y=typeof T.allowDots==="undefined"?T.encodeDotInKeys===!0?!0:a.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:a.addQueryPrefix,allowDots:Y,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:a.allowEmptyArrays,arrayFormat:W,charset:E,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:a.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter==="undefined"?a.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:a.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:a.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:a.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:a.encodeValuesOnly,filter:R,format:A,formatter:C,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:a.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:a.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:a.strictNullHandling}};pC.exports=function(_,T){var E=_,A=q4(T),C,R;if(typeof A.filter==="function")R=A.filter,E=R("",E);else if(OT(A.filter))R=A.filter,C=R;var W=[];if(typeof E!=="object"||E===null)return"";var Y=dC[A.arrayFormat],H=Y==="comma"&&A.commaRoundTrip;if(!C)C=Object.keys(E);if(A.sort)C.sort(A.sort);var U=lC();for(var X=0;X<C.length;++X){var D=C[X],Q=E[D];if(A.skipNulls&&Q===null)continue;sC(W,w4(Q,D,Y,H,A.allowEmptyArrays,A.strictNullHandling,A.skipNulls,A.encodeDotInKeys,A.encode?A.encoder:null,A.filter,A.sort,A.allowDots,A.serializeDate,A.format,A.formatter,A.encodeValuesOnly,A.charset,U))}var G=W.join(A.delimiter),w=A.addQueryPrefix===!0?"?":"";if(A.charsetSentinel)if(A.charset==="iso-8859-1")w+="utf8=%26%2310003%3B&";else w+="utf8=%E2%9C%93&";return G.length>0?w+G:""}});var eC=u((cW,tC)=>{var oT=KA(),OA=Object.prototype.hasOwnProperty,oC=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:oT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},B4=function(_){return _.replace(/&#(\d+);/g,function(T,E){return String.fromCharCode(parseInt(E,10))})},rC=function(_,T,E){if(_&&typeof _==="string"&&T.comma&&_.indexOf(",")>-1)return _.split(",");if(T.throwOnLimitExceeded&&E>=T.arrayLimit)throw new RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return _},D4="utf8=%26%2310003%3B",z4="utf8=%E2%9C%93",G4=function _(T,E){var A={__proto__:null},C=E.ignoreQueryPrefix?T.replace(/^\?/,""):T;C=C.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var R=E.parameterLimit===1/0?void 0:E.parameterLimit,W=C.split(E.delimiter,E.throwOnLimitExceeded?R+1:R);if(E.throwOnLimitExceeded&&W.length>R)throw new RangeError("Parameter limit exceeded. Only "+R+" parameter"+(R===1?"":"s")+" allowed.");var Y=-1,H,U=E.charset;if(E.charsetSentinel){for(H=0;H<W.length;++H)if(W[H].indexOf("utf8=")===0){if(W[H]===z4)U="utf-8";else if(W[H]===D4)U="iso-8859-1";Y=H,H=W.length}}for(H=0;H<W.length;++H){if(H===Y)continue;var X=W[H],D=X.indexOf("]="),Q=D===-1?X.indexOf("="):D+1,G,w;if(Q===-1)G=E.decoder(X,i.decoder,U,"key"),w=E.strictNullHandling?null:"";else G=E.decoder(X.slice(0,Q),i.decoder,U,"key"),w=oT.maybeMap(rC(X.slice(Q+1),E,oC(A[G])?A[G].length:0),function(K){return E.decoder(K,i.decoder,U,"value")});if(w&&E.interpretNumericEntities&&U==="iso-8859-1")w=B4(String(w));if(X.indexOf("[]=")>-1)w=oC(w)?[w]:w;var z=OA.call(A,G);if(z&&E.duplicates==="combine")A[G]=oT.combine(A[G],w);else if(!z||E.duplicates==="last")A[G]=w}return A},V4=function(_,T,E,A){var C=0;if(_.length>0&&_[_.length-1]==="[]"){var R=_.slice(0,-1).join("");C=Array.isArray(T)&&T[R]?T[R].length:0}var W=A?T:rC(T,E,C);for(var Y=_.length-1;Y>=0;--Y){var H,U=_[Y];if(U==="[]"&&E.parseArrays)H=E.allowEmptyArrays&&(W===""||E.strictNullHandling&&W===null)?[]:oT.combine([],W);else{H=E.plainObjects?{__proto__:null}:{};var X=U.charAt(0)==="["&&U.charAt(U.length-1)==="]"?U.slice(1,-1):U,D=E.decodeDotInKeys?X.replace(/%2E/g,"."):X,Q=parseInt(D,10);if(!E.parseArrays&&D==="")H={0:W};else if(!isNaN(Q)&&U!==D&&String(Q)===D&&Q>=0&&(E.parseArrays&&Q<=E.arrayLimit))H=[],H[Q]=W;else if(D!=="__proto__")H[D]=W}W=H}return W},N4=function _(T,E,A,C){if(!T)return;var R=A.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,W=/(\[[^[\]]*])/,Y=/(\[[^[\]]*])/g,H=A.depth>0&&W.exec(R),U=H?R.slice(0,H.index):R,X=[];if(U){if(!A.plainObjects&&OA.call(Object.prototype,U)){if(!A.allowPrototypes)return}X.push(U)}var D=0;while(A.depth>0&&(H=Y.exec(R))!==null&&D<A.depth){if(D+=1,!A.plainObjects&&OA.call(Object.prototype,H[1].slice(1,-1))){if(!A.allowPrototypes)return}X.push(H[1])}if(H){if(A.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+A.depth+" and strictDepth is true");X.push("["+R.slice(H.index)+"]")}return V4(X,E,A,C)},c4=function _(T){if(!T)return i;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys!=="undefined"&&typeof T.decodeDotInKeys!=="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder!=="undefined"&&typeof T.decoder!=="function")throw new TypeError("Decoder has to be a function.");if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded!=="undefined"&&typeof T.throwOnLimitExceeded!=="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var E=typeof T.charset==="undefined"?i.charset:T.charset,A=typeof T.duplicates==="undefined"?i.duplicates:T.duplicates;if(A!=="combine"&&A!=="first"&&A!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var C=typeof T.allowDots==="undefined"?T.decodeDotInKeys===!0?!0:i.allowDots:!!T.allowDots;return{allowDots:C,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:i.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:i.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:i.arrayLimit,charset:E,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:i.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:i.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:i.decoder,delimiter:typeof T.delimiter==="string"||oT.isRegExp(T.delimiter)?T.delimiter:i.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:i.depth,duplicates:A,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:i.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:i.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:i.strictDepth,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};tC.exports=function(_,T){var E=c4(T);if(_===""||_===null||typeof _==="undefined")return E.plainObjects?{__proto__:null}:{};var A=typeof _==="string"?G4(_,E):_,C=E.plainObjects?{__proto__:null}:{},R=Object.keys(A);for(var W=0;W<R.length;++W){var Y=R[W],H=N4(Y,A[Y],E,typeof _==="string");C=oT.merge(C,H,E)}if(E.allowSparse===!0)return C;return oT.compact(C)}});var T0=u(($W,aC)=>{var $4=iC(),I4=eC(),K4=i_();aC.exports={formats:K4,parse:I4,stringify:$4}});var UH=h_(O_(),1);var lA={};D0(lA,{zodSchemaKey:()=>P_,webSocketServerArgsKey:()=>GT,webSocketMessageArgsKey:()=>lT,webSocketKey:()=>zT,webSocketEventKey:()=>jT,webSocketEventArgumentsKey:()=>RT,webSocketConnectionArgsKey:()=>VT,webSocketCloseReasonArgsKey:()=>x_,webSocketCloseCodeArgsKey:()=>Z_,routeModelArgsKey:()=>UT,responseStatusTextArgsKey:()=>AA,responseStatusArgsKey:()=>U_,responseHeadersArgsKey:()=>HT,responseBodyArgsKey:()=>Q_,requestHeadersArgsKey:()=>NT,requestHeaderArgsKey:()=>FT,requestBodyArgsKey:()=>cT,requestArgsKey:()=>QT,queryArgsKey:()=>F_,paramsArgsKey:()=>aT,paramArgsKey:()=>$T,moduleKey:()=>DT,middlewareKey:()=>BT,interceptorKey:()=>yT,injectableKey:()=>MT,injectKey:()=>eT,httpServerArgsKey:()=>xT,guardKey:()=>PT,controllerKey:()=>qT,controllerHttpKey:()=>tT,contextArgsKey:()=>IT,containerKey:()=>ZT,configKey:()=>m_,argumentsKey:()=>y});var y=Symbol("__bool:arguments__"),RT=Symbol("__bool:webSocketEventArguments__"),m_=Symbol("__bool:config__"),qT=Symbol("__bool:controller__"),yT=Symbol("__bool:interceptor__"),PT=Symbol("__bool:guard__"),tT=Symbol("__bool:controller.http__"),eT=Symbol("__bool:inject__"),MT=Symbol("__bool:injectable__"),BT=Symbol("__bool:middleware__"),DT=Symbol("__bool:module__"),ZT=Symbol("__bool:container__"),P_=Symbol("__bool:zodSchema__"),zT=Symbol("__bool:webSocket__"),jT=Symbol("__bool:webSocket:event__"),GT=Symbol("__bool:webSocketArguments:server__"),VT=Symbol("__bool:webSocketArguments:connection__"),lT=Symbol("__bool:webSocketArguments:message__"),Z_=Symbol("__bool:webSocketArguments:closeCode__"),x_=Symbol("__bool:webSocketArguments:closeReason__"),xT=Symbol("__bool:httpArguments:server__"),NT=Symbol("__bool:httpArguments:requestHeaders__"),FT=Symbol("__bool:httpArguments:requestHeader__"),cT=Symbol("__bool:httpArguments:requestBody__"),aT=Symbol("__bool:httpArguments:params__"),$T=Symbol("__bool:httpArguments:param__"),F_=Symbol("__bool:httpArguments:query__"),QT=Symbol("__bool:httpArguments:request__"),HT=Symbol("__bool:httpArguments:responseHeaders__"),IT=Symbol("__bool:httpArguments:context__"),UT=Symbol("__bool:httpArguments:routeModel__"),Q_=Symbol("__bool:httpArguments:responseBody__"),U_=Symbol("__bool:httpArguments:responseStatus__"),AA=Symbol("__bool:httpArguments:responseStatusText__");var G0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:NT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},V0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:FT,key:_,zodSchema:T},Reflect.defineMetadata(y,R,E.constructor,A)},N0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:cT,zodSchema:_,parser:T},Reflect.defineMetadata(y,R,E.constructor,A)},c0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:aT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},$0=(_,T)=>(E,A,C)=>{if(!A)return;let R=Reflect.getOwnMetadata(y,E.constructor,A)||{};R[`argumentIndexes.${C}`]={index:C,type:$T,key:_,zodSchema:T},Reflect.defineMetadata(y,R,E.constructor,A)},I0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:F_,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},K0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:QT,zodSchema:_},Reflect.defineMetadata(y,C,T.constructor,E)},h0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:HT},Reflect.defineMetadata(y,A,_.constructor,T)},O0=(_)=>(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(y,T.constructor,E)||{};C[`argumentIndexes.${A}`]={index:A,type:IT,key:_},Reflect.defineMetadata(y,C,T.constructor,E)},m0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:UT},Reflect.defineMetadata(y,A,_.constructor,T)},P0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(y,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:xT},Reflect.defineMetadata(y,A,_.constructor,T)};var M0=(_)=>(T)=>{let{modules:E,middlewares:A,guards:C,dependencies:R}=_||{};if(Reflect.hasOwnMetadata(DT,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(E){for(let W=0;W<E.length;W++)if(!Reflect.getOwnMetadataKeys(E[W]).includes(DT))throw Error(`${E[W].name} is not a module.`)}if(A){for(let W=0;W<A.length;W++)if(!Reflect.getOwnMetadataKeys(A[W]).includes(BT))throw Error(`${A[W].name} is not a middleware.`)}if(A){for(let W=0;W<A.length;W++)if(!Reflect.getOwnMetadataKeys(A[W]).includes(BT))throw Error(`${A[W].name} is not a middleware.`)}if(C){for(let W=0;W<C.length;W++)if(!Reflect.getOwnMetadataKeys(C[W]).includes(PT))throw Error(`${C[W].name} is not a guard.`)}if(R){for(let W=0;W<R.length;W++)if(!Reflect.getOwnMetadataKeys(R[W]).includes(MT))throw Error(`${R[W].name} is not an injectable.`)}Reflect.defineMetadata(ZT,_,T)};var u0=(_)=>(T)=>{let E={prefix:!_?.startsWith("/")?`/${_||""}`:_,httpMetadata:[...Reflect.getOwnMetadata(tT,T)||[]]};Reflect.defineMetadata(qT,E,T)};var b0=()=>(_)=>{if(!("enforce"in _.prototype)||typeof _.prototype.enforce!=="function")return;let T=void 0;return Reflect.defineMetadata(PT,T,_),_};var T_=(_,T)=>(E,A,C)=>{if(!(C?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let R=Reflect.getOwnMetadata(y,E.constructor,A)||{},W=[...Reflect.getOwnMetadata(tT,E.constructor)||[],{path:!_.startsWith("/")?`/${_}`:_,httpMethod:T.toUpperCase(),methodName:A,descriptor:C,argumentsMetadata:R}];Reflect.defineMetadata(tT,W,E.constructor)},k0=(_="/")=>T_(_,"Get"),g0=(_="/")=>T_(_,"Post"),v0=(_="/")=>T_(_,"Put"),n0=(_="/")=>T_(_,"Patch"),y0=(_="/")=>T_(_,"Delete"),j0=(_="/")=>T_(_,"Options");var l0=(_)=>(T,E,A)=>{let C=Reflect.getMetadata(eT,T)||[];C[A]=_,Reflect.defineMetadata(eT,C,T)};var d0=()=>(_)=>Reflect.defineMetadata(MT,void 0,_);var s0=()=>(_)=>{Reflect.defineMetadata(yT,void 0,_)};var p0=()=>(_)=>{Reflect.defineMetadata(BT,void 0,_)};var i0=(_)=>(T)=>{if(Reflect.hasOwnMetadata(ZT,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:E,guards:A,interceptors:C,controllers:R,dependencies:W,webSockets:Y}=_||{};if(E){for(let H=0;H<E.length;H++)if(!Reflect.getOwnMetadataKeys(E[H]).includes(BT))throw Error(`${E[H].name} is not a middleware.`)}if(A){for(let H=0;H<A.length;H++)if(!Reflect.getOwnMetadataKeys(A[H]).includes(PT))throw Error(`${A[H].name} is not a guard.`)}if(C){for(let H=0;H<C.length;H++)if(!Reflect.getOwnMetadataKeys(C[H]).includes(yT))throw Error(`${C[H].name} is not a interceptor.`)}if(R){for(let H=0;H<R.length;H++)if(!Reflect.getOwnMetadataKeys(R[H]).includes(qT))throw Error(`${R[H].name} is not a controller.`)}if(W){for(let H=0;H<W.length;H++)if(!Reflect.getOwnMetadataKeys(W[H]).includes(MT))throw Error(`${W[H].name} is not an injectable.`)}if(Y){for(let H=0;H<Y.length;H++)if(!Reflect.getOwnMetadataKeys(Y[H]).includes(zT))throw Error(`${Y[H].name} is not a websocket gateway.`)}Reflect.defineMetadata(DT,_,T)};var M_=Symbol("__bool:webSocket.upgrade__"),o0=(_,T,E)=>{let A=new URL(T.url);return _.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:A.pathname,query:E}})},r0=(_)=>(T)=>{let{prefix:E}=_||{};T.prototype[M_]=o0;let A=Object.getOwnPropertyDescriptor(T.prototype,M_),C=!A?[]:[{path:"/",httpMethod:"GET",methodName:M_,descriptor:A,argumentsMetadata:{}},{path:"/",httpMethod:"POST",methodName:M_,descriptor:A,argumentsMetadata:{}}],R={prefix:!E?.startsWith("/")?`/${E||""}`:E,events:Reflect.getOwnMetadata(jT,T)||{},http:C};Reflect.defineMetadata(zT,R,T)};var t0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(RT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:VT},Reflect.defineMetadata(RT,A,_.constructor,T)},e0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(RT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:GT},Reflect.defineMetadata(RT,A,_.constructor,T)},a0=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(RT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:Z_},Reflect.defineMetadata(RT,A,_.constructor,T)},TR=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(RT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:x_},Reflect.defineMetadata(RT,A,_.constructor,T)},_R=()=>(_,T,E)=>{if(!T)return;let A=Reflect.getOwnMetadata(RT,_.constructor,T)||{};A[`argumentIndexes.${E}`]={index:E,type:lT},Reflect.defineMetadata(RT,A,_.constructor,T)};var AR=(_)=>(T,E,A)=>{if(!(A.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let C=Reflect.getOwnMetadata(RT,T.constructor,E),R=Object.freeze({methodName:E,descriptor:A,arguments:C}),W={...Reflect.getOwnMetadata(jT,T.constructor)||void 0,[_]:R};Reflect.defineMetadata(jT,R,T.constructor,E),Reflect.defineMetadata(jT,W,T.constructor)};var ER=(_)=>{return(T,E,A)=>{if(!E)return;let C=Reflect.getOwnMetadata(P_,T.constructor,E)||{};C[`paramterIndexes.${A}`]={index:A,schema:_},Reflect.defineMetadata(P_,C,T.constructor,E)}};var CR=Object.freeze({400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENCATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY_",426:"UPGRAGE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS"});class dT extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:E}){super();this.httpCode=_,this.message=!E?.trim()?CR[_]:E.trim(),this.data=T}}var RR=Object.freeze({500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"});class X_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:E}){super();this.httpCode=_,this.message=!E?.trim()?RR[_]:E.trim(),this.data=T}}var dA=(_,T=new Headers)=>{if(T.set("Content-Type","application/json"),_ instanceof dT||_ instanceof X_)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})};var EH=h_(O_(),1),L0=h_(T0(),1);var XT;(function(_){_.year="year",_.month="month",_.day="day",_.hours="hours",_.minutes="minutes",_.seconds="seconds",_.miliseconds="miliseconds"})(XT||(XT={}));var _0=(_,T,E=XT.day)=>{let A=_ instanceof Date?_:new Date(_);switch(E){case XT.year:A.setFullYear(A.getFullYear()+T);break;case XT.month:A.setMonth(A.getMonth()+T);break;case XT.day:A.setDate(A.getDate()+T);break;case XT.hours:A.setHours(A.getHours()+T);break;case XT.minutes:A.setMinutes(A.getMinutes()+T);break;case XT.seconds:A.setSeconds(A.getSeconds()+T);break;case XT.miliseconds:A.setMilliseconds(A.getMilliseconds()+T);break}return A};class mT{static rootPattern=":([a-z0-9A-Z_-]{1,})";static innerRootPattern="([a-z0-9A-Z_-]{1,})";alias;_map=new Map;constructor(_){this.alias=this._thinAlias(_)}test(_,T){try{let E=this._map.get(T),A=this.alias.split("/"),C=this._thinAlias(_).split("/");if(!E)return;if(A.length!==C.length)return;let R=Object(),W=this.alias.replace(new RegExp(mT.rootPattern,"g"),mT.innerRootPattern);if(!new RegExp(W).test(this._thinAlias(_)))return;for(let Y=0;Y<A.length;Y++){let H=A[Y],U=C[Y];if(!new RegExp(mT.rootPattern,"g").test(H)){if(H!==U)return}else{let X=!1;if(H.replace(new RegExp(mT.rootPattern,"g"),(D,Q,G)=>{if(G===0)U.replace(new RegExp(mT.innerRootPattern,"g"),(w,z,K)=>{if(K===0)Object.assign(R,{[Q]:w});return w});return D}),X)return}continue}return Object.freeze({parameters:R,model:E})}catch(E){return console.error(E),!1}}isMatch(_,T){try{if(!this._map.get(T))return;let A=this.alias.split("/"),C=this._thinAlias(_).split("/");if(A.length!==C.length)return!1;let R=Object();for(let W=0;W<A.length;W++){let Y=A[W],H=C[W];if(!new RegExp(mT.rootPattern,"g").test(Y)){if(Y!==H)return!1}else{let U=!1;if(Y.replace(new RegExp(mT.rootPattern,"g"),(X,D,Q)=>{if(!new RegExp(Q,"g").test(H))U=!0;else Object.assign(R,{[D]:H});return""}),U)return!1}continue}return!0}catch(E){console.error(E);return}}get(_){if(!this._map.get("GET"))this._map.set("GET",_);return this}post(_){if(!this._map.get("POST"))this._map.set("POST",_);return this}put(_){if(!this._map.get("PUT"))this._map.set("PUT",_);return this}delete(_){if(!this._map.get("DELETE"))this._map.set("DELETE",_);return this}connect(_){if(!this._map.get("CONNECT"))return this._map.set("CONNECT",_);return this}options(_){if(!this._map.get("OPTIONS"))return this._map.set("OPTIONS",_);return this}trace(_){if(!this._map.get("TRACE"))return this._map.set("TRACE",_);return this}patch(_){if(!this._map.get("PATCH"))return this._map.set("PATCH",_);return this}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((E,A)=>{let C=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!C.test(E)){if(C=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!C.test(E))return E;return E.replace(C,(R,W)=>`${R}(.*?)`)}return E}).join("/")}get _filteredPath(){return this.alias.split("/").map((E,A)=>{let C=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!C.test(E)){if(C=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!C.test(E))return E;return E.replace(C,(R,W)=>"(.*?)")}return E.replace(C,(R,W,Y)=>Y)}).join("/")}}var A0=mT;class c_{alias;_routes=new Map;constructor(_){this.alias=this._thinAlias(_)}route(_){let T=this._thinAlias(`${this.alias}/${_}`),E=this._routes.get(T),A=!E?new A0(`${this.alias}/${_}`):E;if(!E)this._routes.set(T,A);return A}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this._routes}}class $_{_routers=new Map;add(..._){for(let T=0;T<_.length;T++){if(this._routers.has(_[T].alias))continue;this._routers.set(_[T].alias,_[T])}return this}find(_,T){for(let E of[...this._routers.values()])for(let A of E.routes.values()){let C=A.test(_,T);if(!C)continue;return C}return}}class r_{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 I_{rawAlias;alias;routes=[];constructor(_="/"){this.rawAlias=_;this.alias=I_.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 W_{rawPrefix;prefix;routers=[];constructor(_="/"){this.rawPrefix=_;this.prefix=W_.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 E=T.execute();for(let[A,C]of E.entries())_.set(`/${W_.thinPrefix(`${this.prefix}/${A}`)}`,C)}return _}static thinPrefix(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}var lW=async function(){}.constructor;var E0=Object.freeze({black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,gray:90}),C0=Object.freeze({black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,gray:100}),bT=(_,T={})=>{let{color:E,backgroundColor:A,bold:C,underline:R}=T,W="";if(C)W+="\x1B[1m";if(R)W+="\x1B[4m";if(E&&E0[E])W+=`\x1B[${E0[E]}m`;if(A&&C0[A])W+=`\x1B[${C0[A]}m`;return`${W}${_}\x1B[0m`};var R0=(_)=>{let{headers:T,method:E}=_,A=T.get("upgrade")?.toLowerCase()||"",C=T.get("connection")?.toLowerCase()||"";return E==="GET"&&A?.toLowerCase()==="websocket"&&C?.toLowerCase().includes("upgrade")};class K_{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(..._){_.forEach((T)=>{T.staticEntries.forEach(([E,A])=>this.set(E,A,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([E,A])=>this.set(E,A,{isStatic:!1}))})}get(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.get(_):this._staticMap.get(_)}has(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.has(_):this._staticMap.has(_)}set(_,T,E){let A=E||this._options;if(!A?.isStatic)this._dynamicMap.set(_,T);else if(!this._staticMap.has(_))this._staticMap.set(_,T);else if(!A.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()]}}var TH=h_(O_(),1);class H_{_mapper=new Map;constructor(..._){_.forEach((T)=>{T.entries.forEach(([E,A])=>{this._mapper.set(E,A)})})}get(_){if(this._mapper.has(_))return this._mapper.get(_);if(typeof _!=="function")return;let T=Reflect.getMetadataKeys(_);if(![MT,qT,BT,PT,yT,zT].some((R)=>T.includes(R)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let A=(Reflect.getOwnMetadata(eT,_)||[]).map((R)=>this.get(R)),C=new _(...A);return this._mapper.set(_,C),C}set(_,T){if(this._mapper.has(_))throw Error(`${String(_)} already exists in injector collection.`);this._mapper.set(_,T)}get entries(){return[...this._mapper.entries()]}}var h4=900,fT=(_)=>{return _.headers.set("X-Powered-By","Bool Typescript"),_},O4=({status:_,statusText:T,headers:E,data:A})=>{let C=E.get("Content-Type")||"text/plain";if(C.includes("application/json"))return fT(new Response(A instanceof ReadableStream?A:JSON.stringify(A),{status:_,statusText:T,headers:E}));if(C.includes("text/plain")||C.includes("text/html"))return fT(new Response(A instanceof ReadableStream?A:String(A),{status:_,statusText:T,headers:E}));if(C.includes("application/octet-stream")){if(A instanceof Uint8Array||A instanceof ArrayBuffer||A instanceof Blob||A instanceof ReadableStream)return fT(new Response(A,{status:_,statusText:T,headers:E}));throw new Error("Invalid data type for application/octet-stream")}if(C.includes("multipart/form-data")){if(A instanceof FormData)return fT(new Response(A,{status:_,statusText:T,headers:E}));throw new Error("multipart/form-data requires FormData object")}return fT(new Response(String(A),{status:_,statusText:T,headers:E}))},m4=({controllerConstructor:_,httpRouterGroup:T,injector:E,prefix:A})=>{if(!Reflect.getOwnMetadataKeys(_).includes(qT))throw Error(`${_.name} is not a controller.`);let C=E.get(_);if(!C)throw Error("Can not initialize controller.");let R=Reflect.getOwnMetadata(qT,_)||{prefix:"/",httpMetadata:[]},W=new c_(`/${A||""}/${R.prefix}`);return R.httpMetadata.forEach((Y)=>{if(typeof Y.descriptor.value!=="function")return;let H=W.route(Y.path),U=Y.descriptor.value.bind(C),X=Object.freeze({class:_,funcName:Y.methodName,func:U,argumentsMetadata:Y.argumentsMetadata});switch(Y.httpMethod){case"GET":return H.get(X);case"POST":return H.post(X);case"PUT":return H.put(X);case"PATCH":return H.patch(X);case"DELETE":return H.delete(X);case"OPTIONS":return H.options(X)}}),T.add(W)},P4=({injector:_,httpRouterGroup:T,prefix:E,webSocketRouterGroup:A,webSocketConstructor:C})=>{if(!Reflect.getOwnMetadataKeys(C).includes(zT))throw Error(`${C.name} is not a websocket route.`);let R=_.get(C);if(!R)throw Error("Can not initialize webSocket.");let W=Reflect.getOwnMetadata(zT,C)||{prefix:"/",events:[],http:[]},Y=`/${E||""}/${W.prefix}`,H=new c_(Y);for(let[X,D]of Object.entries(W.http)){if(typeof D.descriptor?.value!=="function")continue;let Q=H.route(D.path),G=D.descriptor.value.bind(R),w=Object.freeze({class:C,funcName:D.methodName,func:G,argumentsMetadata:D.argumentsMetadata});switch(D.httpMethod){case"GET":Q.get(w);break;case"POST":Q.post(w);break}}T.add(H);let U=new I_(Y);for(let[X,D]of Object.entries(W.events)){let Q=new r_({eventName:X,metadata:D});U.addRoutes(Q)}return U.bind(R),A.addRouters(U),Object.freeze({httpRouterGroup:T,webSocketRouterGroup:A})},n=async(_,T,E,A)=>{try{let C=await T.safeParseAsync(_);if(!C.success)throw new dT({httpCode:400,message:`Validation at the [${A.toString()}] method fails at positional argument [${E}].`,data:C.error.issues});return C.data}catch(C){if(C instanceof dT)throw C;throw new X_({httpCode:500,message:`Validation at the [${A.toString()}] method error at positional argument [${E}].`,data:!(C instanceof Error)?C:[{message:C.message,code:C.name,cause:C.cause}]})}},M4=async({containerClass:_,options:T,extendInjector:E})=>{if(!Reflect.getOwnMetadataKeys(_).includes(ZT))throw Error(`${_.name} is not a container.`);let A=new H_(E),C=Reflect.getOwnMetadata(ZT,_),{loaders:R,middlewares:W,guards:Y,dependencies:H,config:U}=C||{},{config:X}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof U!=="function"?typeof U!=="object"?void 0:("key"in U)&&("value"in U)&&typeof U.key==="symbol"?typeof U.value!=="function"?U.value:await U.value():U:await U()}});if(A.set(U&&"key"in U&&"value"in U&&typeof U.key==="symbol"?U.key:m_,X),R){let w=[];for(let[K,S]of Object.entries(R))w.push(async()=>{try{let h=await S({config:X});return console.info(`${bT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${K}] initialized successfully.`),h}catch(h){throw console.error(`${bT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${K}] initialization failed.`),T.debug&&console.error(h),h}});let z=await Promise.all(w.map((K)=>K()));for(let K=0;K<z.length;K++){let[S,h]=z[K];A.set(S,h)}}!H||H.map((w)=>A.get(w));let D=[],Q=[];!W||W.forEach((w)=>{let z=A.get(w);if(z.start&&typeof z.start==="function"){let K=Reflect.getOwnMetadata(y,w,"start")||{};D.push(Object.freeze({class:w,funcName:"start",func:z.start.bind(z),argumentsMetadata:K}))}if(z.end&&typeof z.end==="function"){let K=Reflect.getOwnMetadata(y,w,"end")||{};Q.push(Object.freeze({class:w,funcName:"end",func:z.end.bind(z),argumentsMetadata:K}))}});let G=!Y?[]:Y.map((w)=>{let z=A.get(w),K=Reflect.getOwnMetadata(y,w,"enforce")||{};return Object.freeze({class:w,funcName:"enforce",func:z.enforce.bind(z),argumentsMetadata:K})});return Object.freeze({injector:A,startMiddlewareGroup:D,endMiddlewareGroup:Q,guardGroup:G})},u4=async({moduleClass:_,options:T,extendInjector:E})=>{if(!Reflect.getOwnMetadataKeys(_).includes(DT))throw Error(`${_.name} is not a module.`);let A=new H_(E),C=Reflect.getOwnMetadata(DT,_),{loaders:R,middlewares:W,guards:Y,interceptors:H,controllers:U,dependencies:X,webSockets:D,prefix:Q,config:G}=C||{},w=`${T.prefix||""}/${Q||""}`,{config:z}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof G!=="function"?typeof G!=="object"?void 0:("key"in G)&&("value"in G)&&typeof G.key==="symbol"?typeof G.value!=="function"?G.value:await G.value():G:await G()}});if(A.set(G&&"key"in G&&"value"in G&&typeof G.key==="symbol"?G.key:m_,z),R){let O=[];for(let[$,j]of Object.entries(R))O.push(async()=>{try{let p=await j({config:z});return console.info(`${bT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${$}] initialized successfully.`),p}catch(p){throw console.error(`${bT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${$}] initialization failed.`),T.debug&&console.error(p),p}});let P=await Promise.all(O.map(($)=>$()));for(let $=0;$<P.length;$++){let[j,p]=P[$];A.set(j,p)}}!X||X.map((O)=>A.get(O));let K=[],S=[];!W||W.forEach((O)=>{let P=A.get(O);if(P.start&&typeof P.start==="function"){let $=Reflect.getOwnMetadata(y,O,"start")||{};K.push(Object.freeze({class:O,funcName:"start",func:P.start.bind(P),argumentsMetadata:$}))}if(P.end&&typeof P.end==="function"){let $=Reflect.getOwnMetadata(y,O,"end")||{};S.push(Object.freeze({class:O,funcName:"end",func:P.end.bind(P),argumentsMetadata:$}))}});let h=!Y?[]:Y.map((O)=>{let P=A.get(O),$=Reflect.getOwnMetadata(y,O,"enforce")||{};return Object.freeze({class:O,funcName:"enforce",func:P.enforce.bind(P),argumentsMetadata:$})}),Z=[],J=[];!H||H.forEach((O)=>{let P=A.get(O);if(P.open&&typeof P.open==="function"){let $=Reflect.getOwnMetadata(y,O,"open")||{};Z.push(Object.freeze({class:O,funcName:"open",func:P.open.bind(P),argumentsMetadata:$}))}if(P.close&&typeof P.close==="function"){let $=Reflect.getOwnMetadata(y,O,"close")||{};J.push(Object.freeze({class:O,funcName:"close",func:P.close.bind(P),argumentsMetadata:$}))}});let B=new $_;!U||U.forEach((O)=>m4({controllerConstructor:O,httpRouterGroup:B,injector:A,prefix:w}));let b=new $_,F=new W_;return D&&D.forEach((O)=>P4({webSocketConstructor:O,httpRouterGroup:b,webSocketRouterGroup:F,injector:A,prefix:w})),Object.freeze({prefix:Q||"",injector:A,startMiddlewareGroup:K,endMiddlewareGroup:S,guardGroup:h,openInterceptorGroup:Z,closeInterceptorGroup:J,controllerRouterGroup:B,webSocketHttpRouterGroup:b,webSocketRouterGroup:F})},b4=async(_,T)=>{let{request:E,server:A}=_,{query:C,responseHeaders:R,route:{model:W}}=T,Y=await W.func(...[A,E,C]);if(typeof Y!=="boolean")return fT(new Response(JSON.stringify({httpCode:500,message:"Can not detect webSocket upgrade result.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));if(!Y)return fT(new Response(JSON.stringify({httpCode:500,message:"Can not upgrade.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));return Y},mA=async({context:_,route:T,options:E,resolutedMap:A})=>{let C={isStatic:!0},R=(!_?new K_:new K_(_)).setOptions(C);if(T)R.set(aT,T.parameters).set(UT,T.model);let W=R.get(xT,C)||void 0,Y=R.get(QT,C)||void 0,H=R.get(FT,C)||void 0,U=R.get(HT,C)||void 0,X=R.get(aT,C)||void 0,D=R.get(UT,C)||void 0;if(A){let{startMiddlewareGroup:Q,guardGroup:G}=A;if(Q)for(let w=0;w<Q.length;w++){let z=[],{func:K,funcName:S,argumentsMetadata:h}=Q[w];for(let[Z,J]of Object.entries(h))switch(J.type){case IT:z[J.index]=!J.key?R:R.get(J.key,C);break;case QT:z[J.index]=!J.zodSchema?Y:await n(Y,J.zodSchema,J.index,S);break;case cT:z[J.index]=!J.zodSchema?await Y?.[J.parser||"json"]():await n(await Y?.[J.parser||"json"](),J.zodSchema,J.index,S);break;case NT:z[J.index]=!J.zodSchema?H:await n(H?.toJSON(),J.zodSchema,J.index,S);break;case FT:z[J.index]=!J.zodSchema?H?.get(J.key)||void 0:await n(H?.get(J.key)||void 0,J.zodSchema,J.index,S);break;case $T:z[J.index]=!J.zodSchema?X?.[J.key]||void 0:await n(X?.[J.key]||void 0,J.zodSchema,J.index,S);break;case UT:z[J.index]=D;break;case HT:z[J.index]=U;break;case xT:z[J.index]=W;break;default:z[J.index]=!J.zodSchema?!R.has(J.type,C)?void 0:R.get(J.type,C):await n(!(J.type in R)?void 0:R.get(J.type,C),J.zodSchema,J.index,S);break}await K(...z)}if(G)for(let w=0;w<G.length;w++){let z=[],{func:K,funcName:S,argumentsMetadata:h}=G[w];for(let[J,B]of Object.entries(h))switch(B.type){case QT:z[B.index]=!B.zodSchema?Y:await n(Y,B.zodSchema,B.index,S);break;case cT:z[B.index]=!B.zodSchema?await Y?.[B.parser||"json"]():await n(await Y?.[B.parser||"json"](),B.zodSchema,B.index,S);break;case IT:z[B.index]=!B.key?R:R.get(B.key);break;case NT:z[B.index]=!B.zodSchema?H:await n(H?.toJSON(),B.zodSchema,B.index,S);break;case HT:z[B.index]=U;break;case FT:z[B.index]=!B.zodSchema?H?.get(B.key)||void 0:await n(H?.get(B.key)||void 0,B.zodSchema,B.index,S);break;case $T:z[B.index]=!B.zodSchema?X?.[B.key]||void 0:await n(X?.[B.key],B.zodSchema,B.index,S);break;case UT:z[B.index]=D;break;case xT:z[B.index]=W;break;default:z[B.index]=!B.zodSchema?!R.has(B.type)?void 0:R.get(B.type):await n(R.get(B.type),B.zodSchema,B.index,S);break}let Z=await K(...z);if(typeof Z!=="boolean"||!Z)throw new dT({httpCode:401,message:"Unauthorization.",data:void 0})}}if(D&&!E?.isContainer){if(A&&"openInterceptorGroup"in A&&A.openInterceptorGroup){let{openInterceptorGroup:K}=A;for(let S=0;S<K.length;S++){let h=[],{func:Z,funcName:J,argumentsMetadata:B}=K[S];for(let[b,F]of Object.entries(B))switch(F.type){case QT:h[F.index]=!F.zodSchema?Y:await n(Y,F.zodSchema,F.index,J);break;case cT:h[F.index]=!F.zodSchema?await Y?.[F.parser||"json"]():await n(await Y?.[F.parser||"json"](),F.zodSchema,F.index,J);break;case IT:h[F.index]=!F.key?R:R.get(F.key);break;case NT:h[F.index]=!F.zodSchema?H:await n(H?.toJSON(),F.zodSchema,F.index,J);break;case FT:h[F.index]=!F.zodSchema?H?.get(F.key)||void 0:await n(H?.get(F.key)||void 0,F.zodSchema,F.index,J);break;case HT:h[F.index]=U;break;case $T:h[F.index]=!F.zodSchema?X?.[F.key]||void 0:await n(X?.[F.key]||void 0,F.zodSchema,F.index,J);break;case UT:h[F.index]=D;break;case xT:h[F.index]=W;break;default:h[F.index]=!F.zodSchema?!R.has(F.type)?void 0:R.get(F.type):await n(R.get(F.type),F.zodSchema,F.index,J);break}await Z(...h)}}let Q=[],{func:G,funcName:w,argumentsMetadata:z}=D;for(let[K,S]of Object.entries(z))switch(S.type){case QT:Q[S.index]=!S.zodSchema?Y:await n(Y,S.zodSchema,S.index,w);break;case cT:Q[S.index]=!S.zodSchema?await Y?.[S.parser||"json"]():await n(await Y?.[S.parser||"json"](),S.zodSchema,S.index,w);break;case IT:Q[S.index]=!S.key?R:R.get(S.key);break;case NT:Q[S.index]=!S.zodSchema?H:await n(H?.toJSON(),S.zodSchema,S.index,w);break;case FT:Q[S.index]=!S.zodSchema?H?.get(S.key)||void 0:await n(H?.get(S.key)||void 0,S.zodSchema,S.index,w);break;case HT:Q[S.index]=U;break;case $T:Q[S.index]=!S.zodSchema?X?.[S.key]||void 0:await n(X?.[S.key]||void 0,S.zodSchema,S.index,w);break;case UT:Q[S.index]=D;break;case xT:Q[S.index]=W;break;default:Q[S.index]=!S.zodSchema?!R.has(S.type)?void 0:R.get(S.type):await n(R.get(S.type),S.zodSchema,S.index,w);break}if(R.set(Q_,await G(...Q),{isStatic:!1}),A&&"closeInterceptorGroup"in A&&A.closeInterceptorGroup){let{closeInterceptorGroup:K}=A;for(let S=0;S<K.length;S++){let h=[],{func:Z,funcName:J,argumentsMetadata:B}=K[S];for(let[b,F]of Object.entries(B))switch(F.type){case QT:h[F.index]=!F.zodSchema?Y:await n(Y,F.zodSchema,F.index,J);break;case cT:h[F.index]=!F.zodSchema?await Y?.[F.parser||"json"]():await n(await Y?.[F.parser||"json"](),F.zodSchema,F.index,J);break;case IT:h[F.index]=!F.key?R:R.get(F.key);break;case NT:h[F.index]=!F.zodSchema?H:await n(H?.toJSON(),F.zodSchema,F.index,J);break;case HT:h[F.index]=R.get(F.type);break;case FT:h[F.index]=!F.zodSchema?H?.get(F.key)||void 0:await n(H?.get(F.key)||void 0,F.zodSchema,F.index,J);break;case $T:h[F.index]=!F.zodSchema?X?.[F.key]||void 0:await n(X?.[F.key]||void 0,F.zodSchema,F.index,J);break;case UT:h[F.index]=D;break;case xT:h[F.index]=W;break;default:h[F.index]=!F.zodSchema?!R.has(F.type)?void 0:R.get(F.type):await n(R.get(F.type),F.zodSchema,F.index,J);break}await Z(...h)}}}if(A){let{endMiddlewareGroup:Q}=A;if(Q)for(let G=0;G<Q.length;G++){let w=[],{func:z,funcName:K,argumentsMetadata:S}=Q[G];for(let[h,Z]of Object.entries(S))switch(Z.type){case QT:w[Z.index]=!Z.zodSchema?Y:await n(Y,Z.zodSchema,Z.index,K);break;case cT:w[Z.index]=!Z.zodSchema?await Y?.[Z.parser||"json"]():await n(await Y?.[Z.parser||"json"](),Z.zodSchema,Z.index,K);break;case IT:w[Z.index]=!Z.key?R:R.get(Z.key);break;case NT:w[Z.index]=!Z.zodSchema?H:await n(H?.toJSON(),Z.zodSchema,Z.index,K);break;case HT:w[Z.index]=R.get(Z.type);break;case FT:w[Z.index]=!Z.zodSchema?H?.get(Z.key)||void 0:await n(H?.get(Z.key)||void 0,Z.zodSchema,Z.index,K);break;case $T:w[Z.index]=!Z.zodSchema?X?.[Z.key]||void 0:await n(X?.[Z.key]||void 0,Z.zodSchema,Z.index,K);break;case UT:w[Z.index]=D;break;case xT:w[Z.index]=W;break;default:w[Z.index]=!Z.zodSchema?!R.has(Z.type)?void 0:R.get(Z.type):await n(!(Z.type in R)?void 0:R.get(Z.type),Z.zodSchema,Z.index,K);break}await z(...w)}}return Object.freeze({context:R})},k4=async(_,T)=>{try{let E=new Map,{allowLogsMethods:A,staticOption:C,allowOrigins:R,allowMethods:W,allowCredentials:Y,allowHeaders:H}=Object.freeze({allowLogsMethods:T?.log?.methods,staticOption:T.static,allowOrigins:!T.cors?.origins?["*"]:typeof T.cors.origins!=="string"?T.cors.origins.includes("*")||T.cors.origins.length<1?["*"]:T.cors.origins:[T.cors.origins!=="*"?T.cors.origins:"*"],allowMethods:T.cors?.methods||["GET","POST","PUT","PATCH","DELETE","OPTIONS"],allowCredentials:!T.cors?.credentials?!1:!0,allowHeaders:!T.cors?.headers||T.cors.headers.includes("*")?["*"]:T.cors.headers}),U=Reflect.getOwnMetadataKeys(_);if(!U.includes(ZT)&&!U.includes(DT))throw Error(`Can not detect! ${_.name} class is not a container or module.`);let X=new H_,D=!U.includes(ZT)?void 0:Reflect.getOwnMetadata(ZT,_),Q=!U.includes(ZT)?[_]:D?.modules||[],G=!D?void 0:await M4({containerClass:_,options:T,extendInjector:X}),z=(await Promise.all(Q.map((Z)=>u4({moduleClass:Z,options:T,extendInjector:!G?X:G.injector})))).filter((Z)=>typeof Z!=="undefined");if([...new Set(z.map((Z)=>Z.prefix))].length!==z.length)throw Error("Module prefix should be unique.");let S=new Map;for(let Z of z){let J=Z.webSocketRouterGroup.execute();for(let[B,b]of J.entries())S.set(B,b)}let h=Bun.serve({port:T.port,fetch:async(Z,J)=>{let B=performance.now(),b=new URL(Z.url),F=L0.default.parse(b.searchParams.toString(),T.queryParser),O=Z.headers.get("origin")||"*",P=Z.method.toUpperCase(),$=new Headers,j=new K_().setOptions({isStatic:!0}).set(xT,J).set(QT,Z).set(FT,Z.headers).set(HT,$).set(F_,F);try{let p=R0(Z),d;if(p){for(let TT of z){let YT=TT.webSocketHttpRouterGroup.find(b.pathname,Z.method);if(YT){d=Object.freeze({route:YT,resolution:TT});break}}if(!d)return fT(new Response(JSON.stringify({httpCode:404,message:"Route not found",data:void 0}),{status:404,statusText:"Not found.",headers:$}));let t=await b4({request:Z,server:J},{query:F,responseHeaders:$,route:d.route,moduleResolution:d.resolution});return t instanceof Response?t:void 0}if([...!Y?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:R.includes("*")?"*":!R.includes(O)?R[0]:O},{key:"Access-Control-Allow-Methods",value:W.join(", ")},{key:"Access-Control-Allow-Headers",value:H.join(", ")}].forEach(({key:t,value:TT})=>$.set(t,TT)),!W.includes(P))return fT(new Response(void 0,{status:405,statusText:"Method Not Allowed.",headers:$}));if(Z.method.toUpperCase()==="OPTIONS")return fT(R.includes("*")||R.includes(O)?new Response(void 0,{status:204,statusText:"No Content.",headers:$}):new Response(void 0,{status:417,statusText:"Expectation Failed.",headers:$}));if(C){let{path:t,headers:TT,cacheTimeInSeconds:YT}=C,kT=`${t}/${b.pathname}`,M=E.get(kT);if(!M){let WT=Bun.file(kT);if(await WT.exists()){if(TT)for(let[s,f_]of Object.entries(TT))$.set(s,f_);return $.set("Content-Type",WT.type),fT(new Response(await WT.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:$}))}}else{let WT=new Date>M.expiredAt;if(WT)E.delete(kT);let nT=!WT?M.file:Bun.file(kT);if(await nT.exists()){if(E.set(kT,Object.freeze({expiredAt:_0(new Date,typeof YT!=="number"?h4:YT,XT.seconds),file:nT})),TT)for(let[f_,t_]of Object.entries(TT))$.set(f_,t_);return $.set("Content-Type",nT.type),fT(new Response(await nT.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:$}))}}}if(G){let{context:t}=await mA({context:j,resolutedMap:{injector:G.injector,startMiddlewareGroup:G.startMiddlewareGroup,guardGroup:G.guardGroup},options:{isContainer:!0}});j=t}for(let t of z){let TT=t.controllerRouterGroup.find(b.pathname,P);if(TT){d=Object.freeze({route:TT,resolution:t});break}}if(!d)j.setOptions({isStatic:!1}).set(U_,404).set(AA,"Not found.").set(Q_,JSON.stringify({httpCode:404,message:"Route not found",data:void 0}));else{let{context:t}=await mA({context:j,route:d.route,resolutedMap:d.resolution});j=t}if(G){let{context:t}=await mA({context:j,resolutedMap:{injector:G.injector,endMiddlewareGroup:G.endMiddlewareGroup},options:{isContainer:!0}});j=t}let CT=j.get(HT,{isStatic:!0})||new Headers,AT=j.get(Q_,{isStatic:!1})||void 0,LT=j.get(U_,{isStatic:!1}),ST=j.get(U_,{isStatic:!1});return O4({status:typeof LT!=="number"?void 0:LT,statusText:typeof ST!=="string"?void 0:ST,headers:CT,data:AT})}catch(p){return T.debug&&console.error(p),fT(dA(p,$))}finally{if(A){let p=performance.now(),d=bT(b.pathname,{color:"blue"}),CT=`${Bun.color("yellow","ansi")}${process.pid}`,AT=bT(Z.method,{color:"yellow",backgroundColor:"blue"}),LT=bT(`${Z.headers.get("x-forwarded-for")||Z.headers.get("x-real-ip")||J.requestIP(Z)?.address||"<Unknown>"}`,{color:"yellow"}),ST=bT(`${Math.round((p-B+Number.EPSILON)*100)/100}ms`,{color:"yellow",backgroundColor:"blue"});A.includes(Z.method.toUpperCase())&&console.info(`PID: ${CT} - Method: ${AT} - IP: ${LT} - ${d} - Time: ${ST}`)}}},websocket:{open:(Z)=>{let J=`${Z.data.pathname}:::open`,B=S.get(J);if(!B)return;let b=B.arguments||{},F=[];for(let[O,P]of Object.entries(b))switch(P.type){case VT:F[P.index]=Z;break;case GT:F[P.index]=h;break}B.descriptor.value(...F)},close:(Z,J,B)=>{let b=`${Z.data.pathname}:::close`,F=S.get(b);if(!F)return;let O=F.arguments||{},P=[];for(let[$,j]of Object.entries(O))switch(j.type){case VT:P[j.index]=Z;break;case GT:P[j.index]=h;break;case Z_:P[j.index]=J;break;case x_:P[j.index]=B;break}F.descriptor.value(...P)},message:(Z,J)=>{let B=`${Z.data.pathname}:::message`,b=S.get(B);if(!b)return;let F=b.arguments||{},O=[];for(let[P,$]of Object.entries(F))switch($.type){case VT:O[$.index]=Z;break;case lT:O[$.index]=J;break;case GT:O[$.index]=h;break}b.descriptor.value(...O)},drain:(Z)=>{let J=`${Z.data.pathname}:::drain`,B=S.get(J);if(!B)return;let b=B.arguments||{},F=[];for(let[O,P]of Object.entries(b))switch(P.type){case VT:F[P.index]=Z;break;case GT:F[P.index]=h;break}B.descriptor.value(...F)},ping:(Z,J)=>{let B=`${Z.data.pathname}:::ping`,b=S.get(B);if(!b)return;let F=b.arguments||{},O=[];for(let[P,$]of Object.entries(F))switch($.type){case VT:O[$.index]=Z;break;case GT:O[$.index]=h;break;case lT:O[$.index]=J;break}b.descriptor.value(...O)},pong:(Z,J)=>{let B=`${Z.data.pathname}:::pong`,b=S.get(B);if(!b)return;let F=b.arguments||{},O=[];for(let[P,$]of Object.entries(F))switch($.type){case VT:O[$.index]=Z;break;case GT:O[$.index]=h;break;case lT:O[$.index]=J;break}b.descriptor.value(...O)}}})}catch(E){throw T.debug&&console.error(E),E}};export{dA as jsonErrorInfer,RR as httpServerErrors,CR as httpClientErrors,ER as ZodSchema,e0 as WebSocketServer,_R as WebSocketMessage,AR as WebSocketEvent,t0 as WebSocketConnection,TR as WebSocketCloseReason,a0 as WebSocketCloseCode,r0 as WebSocket,m0 as RouteModel,h0 as ResponseHeaders,G0 as RequestHeaders,V0 as RequestHeader,N0 as RequestBody,K0 as Request,I0 as Query,v0 as Put,g0 as Post,n0 as Patch,c0 as Params,$0 as Param,j0 as Options,i0 as Module,p0 as Middleware,lA as Keys,s0 as Interceptor,H_ as Injector,d0 as Injectable,l0 as Inject,X_ as HttpServerError,P0 as HttpServer,dT as HttpClientError,b0 as Guard,k0 as Get,y0 as Delete,u0 as Controller,O0 as Context,M0 as Container,k4 as BoolFactory};
14
+ ***************************************************************************** */var bC;(function(_){(function(T){var A=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:w(),C=E(_);if(typeof A.Reflect!=="undefined")C=E(A.Reflect,C);if(T(C,A),typeof A.Reflect==="undefined")A.Reflect=_;function E(L,Y){return function(F,J){if(Object.defineProperty(L,F,{configurable:!0,writable:!0,value:J}),Y)Y(F,J)}}function R(){try{return Function("return this;")()}catch(L){}}function c(){try{return(0,eval)("(function() { return this; })()")}catch(L){}}function w(){return R()||c()}})(function(T,A){var C=Object.prototype.hasOwnProperty,E=typeof Symbol==="function",R=E&&typeof Symbol.toPrimitive!=="undefined"?Symbol.toPrimitive:"@@toPrimitive",c=E&&typeof Symbol.iterator!=="undefined"?Symbol.iterator:"@@iterator",w=typeof Object.create==="function",L={__proto__:[]}instanceof Array,Y=!w&&!L,F={create:w?function(){return p_(Object.create(null))}:L?function(){return p_({__proto__:null})}:function(){return p_({})},has:Y?function(x,H){return C.call(x,H)}:function(x,H){return H in x},get:Y?function(x,H){return C.call(x,H)?x[H]:void 0}:function(x,H){return x[H]}},J=Object.getPrototypeOf(Function),S=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:W0(),Z=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:q0(),Q=typeof WeakMap==="function"?WeakMap:Y0(),X=E?Symbol.for("@reflect-metadata:registry"):void 0,D=w0(),q=F0(D);function N(x,H,W,B){if(!m(W)){if(!$C(x))throw new TypeError;if(!y(H))throw new TypeError;if(!y(B)&&!m(B)&&!yT(B))throw new TypeError;if(yT(B))B=void 0;return W=FT(W),s(x,H,W,B)}else{if(!$C(x))throw new TypeError;if(!hC(H))throw new TypeError;return o(x,H)}}T("decorate",N);function U(x,H){function W(B,$){if(!y(B))throw new TypeError;if(!m($)&&!L0($))throw new TypeError;z_(x,H,B,$)}return W}T("metadata",U);function V(x,H,W,B){if(!y(W))throw new TypeError;if(!m(B))B=FT(B);return z_(x,H,W,B)}T("defineMetadata",V);function K(x,H,W){if(!y(H))throw new TypeError;if(!m(W))W=FT(W);return e(x,H,W)}T("hasMetadata",K);function a(x,H,W){if(!y(H))throw new TypeError;if(!m(W))W=FT(W);return TT(x,H,W)}T("hasOwnMetadata",a);function f(x,H,W){if(!y(H))throw new TypeError;if(!m(W))W=FT(W);return AT(x,H,W)}T("getMetadata",f);function P(x,H,W){if(!y(H))throw new TypeError;if(!m(W))W=FT(W);return IT(x,H,W)}T("getOwnMetadata",P);function h(x,H){if(!y(x))throw new TypeError;if(!m(H))H=FT(H);return A_(x,H)}T("getMetadataKeys",h);function M(x,H){if(!y(x))throw new TypeError;if(!m(H))H=FT(H);return lT(x,H)}T("getOwnMetadataKeys",M);function i(x,H,W){if(!y(H))throw new TypeError;if(!m(W))W=FT(W);if(!y(H))throw new TypeError;if(!m(W))W=FT(W);var B=E_(H,W,!1);if(m(B))return!1;return B.OrdinaryDeleteMetadata(x,H,W)}T("deleteMetadata",i);function o(x,H){for(var W=x.length-1;W>=0;--W){var B=x[W],$=B(H);if(!m($)&&!yT($)){if(!hC($))throw new TypeError;H=$}}return H}function s(x,H,W,B){for(var $=x.length-1;$>=0;--$){var j=x[$],p=j(H,W,B);if(!m(p)&&!yT(p)){if(!y(p))throw new TypeError;B=p}}return B}function e(x,H,W){var B=TT(x,H,W);if(B)return!0;var $=o_(H);if(!yT($))return e(x,$,W);return!1}function TT(x,H,W){var B=E_(H,W,!1);if(m(B))return!1;return IC(B.OrdinaryHasOwnMetadata(x,H,W))}function AT(x,H,W){var B=TT(x,H,W);if(B)return IT(x,H,W);var $=o_(H);if(!yT($))return AT(x,$,W);return}function IT(x,H,W){var B=E_(H,W,!1);if(m(B))return;return B.OrdinaryGetOwnMetadata(x,H,W)}function z_(x,H,W,B){var $=E_(W,B,!0);$.OrdinaryDefineOwnMetadata(x,H,W,B)}function A_(x,H){var W=lT(x,H),B=o_(x);if(B===null)return W;var $=A_(B,H);if($.length<=0)return W;if(W.length<=0)return $;var j=new Z,p=[];for(var u=0,G=W;u<G.length;u++){var z=G[u],n=j.has(z);if(!n)j.add(z),p.push(z)}for(var I=0,b=$;I<b.length;I++){var z=b[I],n=j.has(z);if(!n)j.add(z),p.push(z)}return p}function lT(x,H){var W=E_(x,H,!1);if(!W)return[];return W.OrdinaryOwnMetadataKeys(x,H)}function KC(x){if(x===null)return 1;switch(typeof x){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return x===null?1:6;default:return 6}}function m(x){return x===void 0}function yT(x){return x===null}function E0(x){return typeof x==="symbol"}function y(x){return typeof x==="object"?x!==null:typeof x==="function"}function R0(x,H){switch(KC(x)){case 0:return x;case 1:return x;case 2:return x;case 3:return x;case 4:return x;case 5:return x}var W=H===3?"string":H===5?"number":"default",B=mC(x,R);if(B!==void 0){var $=B.call(x,W);if(y($))throw new TypeError;return $}return c0(x,W==="default"?"number":W)}function c0(x,H){if(H==="string"){var W=x.toString;if(jT(W)){var B=W.call(x);if(!y(B))return B}var $=x.valueOf;if(jT($)){var B=$.call(x);if(!y(B))return B}}else{var $=x.valueOf;if(jT($)){var B=$.call(x);if(!y(B))return B}var j=x.toString;if(jT(j)){var B=j.call(x);if(!y(B))return B}}throw new TypeError}function IC(x){return!!x}function x0(x){return""+x}function FT(x){var H=R0(x,3);if(E0(H))return H;return x0(H)}function $C(x){return Array.isArray?Array.isArray(x):x instanceof Object?x instanceof Array:Object.prototype.toString.call(x)==="[object Array]"}function jT(x){return typeof x==="function"}function hC(x){return typeof x==="function"}function L0(x){switch(KC(x)){case 3:return!0;case 4:return!0;default:return!1}}function i_(x,H){return x===H||x!==x&&H!==H}function mC(x,H){var W=x[H];if(W===void 0||W===null)return;if(!jT(W))throw new TypeError;return W}function OC(x){var H=mC(x,c);if(!jT(H))throw new TypeError;var W=H.call(x);if(!y(W))throw new TypeError;return W}function MC(x){return x.value}function uC(x){var H=x.next();return H.done?!1:H}function gC(x){var H=x.return;if(H)H.call(x)}function o_(x){var H=Object.getPrototypeOf(x);if(typeof x!=="function"||x===J)return H;if(H!==J)return H;var W=x.prototype,B=W&&Object.getPrototypeOf(W);if(B==null||B===Object.prototype)return H;var $=B.constructor;if(typeof $!=="function")return H;if($===x)return H;return $}function H0(){var x;if(!m(X)&&typeof A.Reflect!=="undefined"&&!(X in A.Reflect)&&typeof A.Reflect.defineMetadata==="function")x=S0(A.Reflect);var H,W,B,$=new Q,j={registerProvider:p,getProvider:G,setProvider:n};return j;function p(I){if(!Object.isExtensible(j))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case x===I:break;case m(H):H=I;break;case H===I:break;case m(W):W=I;break;case W===I:break;default:if(B===void 0)B=new Z;B.add(I);break}}function u(I,b){if(!m(H)){if(H.isProviderFor(I,b))return H;if(!m(W)){if(W.isProviderFor(I,b))return H;if(!m(B)){var v=OC(B);while(!0){var d=uC(v);if(!d)return;var wT=MC(d);if(wT.isProviderFor(I,b))return gC(v),wT}}}}if(!m(x)&&x.isProviderFor(I,b))return x;return}function G(I,b){var v=$.get(I),d;if(!m(v))d=v.get(b);if(!m(d))return d;if(d=u(I,b),!m(d)){if(m(v))v=new S,$.set(I,v);v.set(b,d)}return d}function z(I){if(m(I))throw new TypeError;return H===I||W===I||!m(B)&&B.has(I)}function n(I,b,v){if(!z(v))throw new Error("Metadata provider not registered.");var d=G(I,b);if(d!==v){if(!m(d))return!1;var wT=$.get(I);if(m(wT))wT=new S,$.set(I,wT);wT.set(b,v)}return!0}}function w0(){var x;if(!m(X)&&y(A.Reflect)&&Object.isExtensible(A.Reflect))x=A.Reflect[X];if(m(x))x=H0();if(!m(X)&&y(A.Reflect)&&Object.isExtensible(A.Reflect))Object.defineProperty(A.Reflect,X,{enumerable:!1,configurable:!1,writable:!1,value:x});return x}function F0(x){var H=new Q,W={isProviderFor:function(z,n){var I=H.get(z);if(m(I))return!1;return I.has(n)},OrdinaryDefineOwnMetadata:p,OrdinaryHasOwnMetadata:$,OrdinaryGetOwnMetadata:j,OrdinaryOwnMetadataKeys:u,OrdinaryDeleteMetadata:G};return D.registerProvider(W),W;function B(z,n,I){var b=H.get(z),v=!1;if(m(b)){if(!I)return;b=new S,H.set(z,b),v=!0}var d=b.get(n);if(m(d)){if(!I)return;if(d=new S,b.set(n,d),!x.setProvider(z,n,W)){if(b.delete(n),v)H.delete(z);throw new Error("Wrong provider for target.")}}return d}function $(z,n,I){var b=B(n,I,!1);if(m(b))return!1;return IC(b.has(z))}function j(z,n,I){var b=B(n,I,!1);if(m(b))return;return b.get(z)}function p(z,n,I,b){var v=B(I,b,!0);v.set(z,n)}function u(z,n){var I=[],b=B(z,n,!1);if(m(b))return I;var v=b.keys(),d=OC(v),wT=0;while(!0){var PC=uC(d);if(!PC)return I.length=wT,I;var Q0=MC(PC);try{I[wT]=Q0}catch(f0){try{gC(d)}finally{throw f0}}wT++}}function G(z,n,I){var b=B(n,I,!1);if(m(b))return!1;if(!b.delete(z))return!1;if(b.size===0){var v=H.get(n);if(!m(v)){if(v.delete(I),v.size===0)H.delete(v)}}return!0}}function S0(x){var{defineMetadata:H,hasOwnMetadata:W,getOwnMetadata:B,getOwnMetadataKeys:$,deleteMetadata:j}=x,p=new Q,u={isProviderFor:function(G,z){var n=p.get(G);if(!m(n)&&n.has(z))return!0;if($(G,z).length){if(m(n))n=new Z,p.set(G,n);return n.add(z),!0}return!1},OrdinaryDefineOwnMetadata:H,OrdinaryHasOwnMetadata:W,OrdinaryGetOwnMetadata:B,OrdinaryOwnMetadataKeys:$,OrdinaryDeleteMetadata:j};return u}function E_(x,H,W){var B=D.getProvider(x,H);if(!m(B))return B;if(W){if(D.setProvider(x,H,q))return q;throw new Error("Illegal state.")}return}function W0(){var x={},H=[],W=function(){function u(G,z,n){this._index=0,this._keys=G,this._values=z,this._selector=n}return u.prototype["@@iterator"]=function(){return this},u.prototype[c]=function(){return this},u.prototype.next=function(){var G=this._index;if(G>=0&&G<this._keys.length){var z=this._selector(this._keys[G],this._values[G]);if(G+1>=this._keys.length)this._index=-1,this._keys=H,this._values=H;else this._index++;return{value:z,done:!1}}return{value:void 0,done:!0}},u.prototype.throw=function(G){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;throw G},u.prototype.return=function(G){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;return{value:G,done:!0}},u}(),B=function(){function u(){this._keys=[],this._values=[],this._cacheKey=x,this._cacheIndex=-2}return Object.defineProperty(u.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),u.prototype.has=function(G){return this._find(G,!1)>=0},u.prototype.get=function(G){var z=this._find(G,!1);return z>=0?this._values[z]:void 0},u.prototype.set=function(G,z){var n=this._find(G,!0);return this._values[n]=z,this},u.prototype.delete=function(G){var z=this._find(G,!1);if(z>=0){var n=this._keys.length;for(var I=z+1;I<n;I++)this._keys[I-1]=this._keys[I],this._values[I-1]=this._values[I];if(this._keys.length--,this._values.length--,i_(G,this._cacheKey))this._cacheKey=x,this._cacheIndex=-2;return!0}return!1},u.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=x,this._cacheIndex=-2},u.prototype.keys=function(){return new W(this._keys,this._values,$)},u.prototype.values=function(){return new W(this._keys,this._values,j)},u.prototype.entries=function(){return new W(this._keys,this._values,p)},u.prototype["@@iterator"]=function(){return this.entries()},u.prototype[c]=function(){return this.entries()},u.prototype._find=function(G,z){if(!i_(this._cacheKey,G)){this._cacheIndex=-1;for(var n=0;n<this._keys.length;n++)if(i_(this._keys[n],G)){this._cacheIndex=n;break}}if(this._cacheIndex<0&&z)this._cacheIndex=this._keys.length,this._keys.push(G),this._values.push(void 0);return this._cacheIndex},u}();return B;function $(u,G){return u}function j(u,G){return G}function p(u,G){return[u,G]}}function q0(){var x=function(){function H(){this._map=new S}return Object.defineProperty(H.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),H.prototype.has=function(W){return this._map.has(W)},H.prototype.add=function(W){return this._map.set(W,W),this},H.prototype.delete=function(W){return this._map.delete(W)},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 x}function Y0(){var x=16,H=F.create(),W=B();return function(){function G(){this._key=B()}return G.prototype.has=function(z){var n=$(z,!1);return n!==void 0?F.has(n,this._key):!1},G.prototype.get=function(z){var n=$(z,!1);return n!==void 0?F.get(n,this._key):void 0},G.prototype.set=function(z,n){var I=$(z,!0);return I[this._key]=n,this},G.prototype.delete=function(z){var n=$(z,!1);return n!==void 0?delete n[this._key]:!1},G.prototype.clear=function(){this._key=B()},G}();function B(){var G;do G="@@WeakMap@@"+u();while(F.has(H,G));return H[G]=!0,G}function $(G,z){if(!C.call(G,W)){if(!z)return;Object.defineProperty(G,W,{value:F.create()})}return G[W]}function j(G,z){for(var n=0;n<z;++n)G[n]=Math.random()*255|0;return G}function p(G){if(typeof Uint8Array==="function"){var z=new Uint8Array(G);if(typeof crypto!=="undefined")crypto.getRandomValues(z);else if(typeof msCrypto!=="undefined")msCrypto.getRandomValues(z);else j(z,G);return z}return j(new Array(G),G)}function u(){var G=p(x);G[6]=G[6]&79|64,G[8]=G[8]&191|128;var z="";for(var n=0;n<x;++n){var I=G[n];if(n===4||n===6||n===8)z+="-";if(I<16)z+="0";z+=I.toString(16).toLowerCase()}return z}}function p_(x){return x.__=void 0,delete x.__,x}})})(bC||(bC={}))});var gT=O((K4,yC)=>{yC.exports=TypeError});var Y_=O((I4,HA)=>{var xC=typeof Map==="function"&&Map.prototype,e_=Object.getOwnPropertyDescriptor&&xC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,h_=xC&&e_&&typeof e_.get==="function"?e_.get:null,jC=xC&&Map.prototype.forEach,LC=typeof Set==="function"&&Set.prototype,a_=Object.getOwnPropertyDescriptor&&LC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,m_=LC&&a_&&typeof a_.get==="function"?a_.get:null,dC=LC&&Set.prototype.forEach,cR=typeof WeakMap==="function"&&WeakMap.prototype,S_=cR?WeakMap.prototype.has:null,xR=typeof WeakSet==="function"&&WeakSet.prototype,W_=xR?WeakSet.prototype.has:null,LR=typeof WeakRef==="function"&&WeakRef.prototype,sC=LR?WeakRef.prototype.deref:null,HR=Boolean.prototype.valueOf,wR=Object.prototype.toString,FR=Function.prototype.toString,SR=String.prototype.match,HC=String.prototype.slice,$T=String.prototype.replace,WR=String.prototype.toUpperCase,iC=String.prototype.toLowerCase,CA=RegExp.prototype.test,oC=Array.prototype.concat,BT=Array.prototype.join,qR=Array.prototype.slice,pC=Math.floor,CC=typeof BigInt==="function"?BigInt.prototype.valueOf:null,TC=Object.getOwnPropertySymbols,AC=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,pT=typeof Symbol==="function"&&typeof Symbol.iterator==="object",q_=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===pT?"object":"symbol")?Symbol.toStringTag:null,AA=Object.prototype.propertyIsEnumerable,rC=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_){return _.__proto__}:null);function tC(_,T){if(_===1/0||_===-1/0||_!==_||_&&_>-1000&&_<1000||CA.call(/e/,T))return T;var A=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _==="number"){var C=_<0?-pC(-_):pC(_);if(C!==_){var E=String(C),R=HC.call(T,E.length+1);return $T.call(E,A,"$&_")+"."+$T.call($T.call(R,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $T.call(T,A,"$&_")}var EC=(()=>({})),eC=EC.custom,aC=cA(eC)?eC:null,EA={__proto__:null,double:'"',single:"'"},YR={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};HA.exports=function _(T,A,C,E){var R=A||{};if(nT(R,"quoteStyle")&&!nT(EA,R.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(nT(R,"maxStringLength")&&(typeof R.maxStringLength==="number"?R.maxStringLength<0&&R.maxStringLength!==1/0:R.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=nT(R,"customInspect")?R.customInspect:!0;if(typeof c!=="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(nT(R,"indent")&&R.indent!==null&&R.indent!=="\t"&&!(parseInt(R.indent,10)===R.indent&&R.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(nT(R,"numericSeparator")&&typeof R.numericSeparator!=="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=R.numericSeparator;if(typeof T==="undefined")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return LA(T,R);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var L=String(T);return w?tC(T,L):L}if(typeof T==="bigint"){var Y=String(T)+"n";return w?tC(T,Y):Y}var F=typeof R.depth==="undefined"?5:R.depth;if(typeof C==="undefined")C=0;if(C>=F&&F>0&&typeof T==="object")return RC(T)?"[Array]":"[Object]";var J=mR(R,C);if(typeof E==="undefined")E=[];else if(xA(E,T)>=0)return"[Circular]";function S(s,e,TT){if(e)E=qR.call(E),E.push(e);if(TT){var AT={depth:R.depth};if(nT(R,"quoteStyle"))AT.quoteStyle=R.quoteStyle;return _(s,AT,C+1,E)}return _(s,R,C+1,E)}if(typeof T==="function"&&!TA(T)){var Z=DR(T),Q=$_(T,S);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(Q.length>0?" { "+BT.call(Q,", ")+" }":"")}if(cA(T)){var X=pT?$T.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):AC.call(T);return typeof T==="object"&&!pT?F_(X):X}if(IR(T)){var D="<"+iC.call(String(T.nodeName)),q=T.attributes||[];for(var N=0;N<q.length;N++)D+=" "+q[N].name+"="+RA(QR(q[N].value),"double",R);if(D+=">",T.childNodes&&T.childNodes.length)D+="...";return D+="</"+iC.call(String(T.nodeName))+">",D}if(RC(T)){if(T.length===0)return"[]";var U=$_(T,S);if(J&&!hR(U))return"["+cC(U,J)+"]";return"[ "+BT.call(U,", ")+" ]"}if(UR(T)){var V=$_(T,S);if(!("cause"in Error.prototype)&&"cause"in T&&!AA.call(T,"cause"))return"{ ["+String(T)+"] "+BT.call(oC.call("[cause]: "+S(T.cause),V),", ")+" }";if(V.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+BT.call(V,", ")+" }"}if(typeof T==="object"&&c){if(aC&&typeof T[aC]==="function"&&EC)return EC(T,{depth:F-C});else if(c!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if(GR(T)){var K=[];if(jC)jC.call(T,function(s,e){K.push(S(e,T,!0)+" => "+S(s,T))});return _A("Map",h_.call(T),K,J)}if(nR(T)){var a=[];if(dC)dC.call(T,function(s){a.push(S(s,T))});return _A("Set",m_.call(T),a,J)}if(zR(T))return _C("WeakMap");if(KR(T))return _C("WeakSet");if(NR(T))return _C("WeakRef");if(JR(T))return F_(S(Number(T)));if(BR(T))return F_(S(CC.call(T)));if(ZR(T))return F_(HR.call(T));if(XR(T))return F_(S(String(T)));if(typeof window!=="undefined"&&T===window)return"{ [object Window] }";if(typeof globalThis!=="undefined"&&T===globalThis||typeof global!=="undefined"&&T===global)return"{ [object globalThis] }";if(!fR(T)&&!TA(T)){var f=$_(T,S),P=rC?rC(T)===Object.prototype:T instanceof Object||T.constructor===Object,h=T instanceof Object?"":"null prototype",M=!P&&q_&&Object(T)===T&&q_ in T?HC.call(hT(T),8,-1):h?"Object":"",i=P||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",o=i+(M||h?"["+BT.call(oC.call([],M||[],h||[]),": ")+"] ":"");if(f.length===0)return o+"{}";if(J)return o+"{"+cC(f,J)+"}";return o+"{ "+BT.call(f,", ")+" }"}return String(T)};function RA(_,T,A){var C=A.quoteStyle||T,E=EA[C];return E+_+E}function QR(_){return $T.call(String(_),/"/g,"&quot;")}function PT(_){return!q_||!(typeof _==="object"&&((q_ in _)||typeof _[q_]!=="undefined"))}function RC(_){return hT(_)==="[object Array]"&&PT(_)}function fR(_){return hT(_)==="[object Date]"&&PT(_)}function TA(_){return hT(_)==="[object RegExp]"&&PT(_)}function UR(_){return hT(_)==="[object Error]"&&PT(_)}function XR(_){return hT(_)==="[object String]"&&PT(_)}function JR(_){return hT(_)==="[object Number]"&&PT(_)}function ZR(_){return hT(_)==="[object Boolean]"&&PT(_)}function cA(_){if(pT)return _&&typeof _==="object"&&_ instanceof Symbol;if(typeof _==="symbol")return!0;if(!_||typeof _!=="object"||!AC)return!1;try{return AC.call(_),!0}catch(T){}return!1}function BR(_){if(!_||typeof _!=="object"||!CC)return!1;try{return CC.call(_),!0}catch(T){}return!1}var VR=Object.prototype.hasOwnProperty||function(_){return _ in this};function nT(_,T){return VR.call(_,T)}function hT(_){return wR.call(_)}function DR(_){if(_.name)return _.name;var T=SR.call(FR.call(_),/^function\s*([\w$]+)/);if(T)return T[1];return null}function xA(_,T){if(_.indexOf)return _.indexOf(T);for(var A=0,C=_.length;A<C;A++)if(_[A]===T)return A;return-1}function GR(_){if(!h_||!_||typeof _!=="object")return!1;try{h_.call(_);try{m_.call(_)}catch(T){return!0}return _ instanceof Map}catch(T){}return!1}function zR(_){if(!S_||!_||typeof _!=="object")return!1;try{S_.call(_,S_);try{W_.call(_,W_)}catch(T){return!0}return _ instanceof WeakMap}catch(T){}return!1}function NR(_){if(!sC||!_||typeof _!=="object")return!1;try{return sC.call(_),!0}catch(T){}return!1}function nR(_){if(!m_||!_||typeof _!=="object")return!1;try{m_.call(_);try{h_.call(_)}catch(T){return!0}return _ instanceof Set}catch(T){}return!1}function KR(_){if(!W_||!_||typeof _!=="object")return!1;try{W_.call(_,W_);try{S_.call(_,S_)}catch(T){return!0}return _ instanceof WeakSet}catch(T){}return!1}function IR(_){if(!_||typeof _!=="object")return!1;if(typeof HTMLElement!=="undefined"&&_ instanceof HTMLElement)return!0;return typeof _.nodeName==="string"&&typeof _.getAttribute==="function"}function LA(_,T){if(_.length>T.maxStringLength){var A=_.length-T.maxStringLength,C="... "+A+" more character"+(A>1?"s":"");return LA(HC.call(_,0,T.maxStringLength),T)+C}var E=YR[T.quoteStyle||"single"];E.lastIndex=0;var R=$T.call($T.call(_,E,"\\$1"),/[\x00-\x1f]/g,$R);return RA(R,"single",T)}function $R(_){var T=_.charCodeAt(0),A={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(A)return"\\"+A;return"\\x"+(T<16?"0":"")+WR.call(T.toString(16))}function F_(_){return"Object("+_+")"}function _C(_){return _+" { ? }"}function _A(_,T,A,C){var E=C?cC(A,C):BT.call(A,", ");return _+" ("+T+") {"+E+"}"}function hR(_){for(var T=0;T<_.length;T++)if(xA(_[T],`
15
+ `)>=0)return!1;return!0}function mR(_,T){var A;if(_.indent==="\t")A="\t";else if(typeof _.indent==="number"&&_.indent>0)A=BT.call(Array(_.indent+1)," ");else return null;return{base:A,prev:BT.call(Array(T+1),A)}}function cC(_,T){if(_.length===0)return"";var A=`
16
+ `+T.prev+T.base;return A+BT.call(_,","+A)+`
17
+ `+T.prev}function $_(_,T){var A=RC(_),C=[];if(A){C.length=_.length;for(var E=0;E<_.length;E++)C[E]=nT(_,E)?T(_[E],_):""}var R=typeof TC==="function"?TC(_):[],c;if(pT){c={};for(var w=0;w<R.length;w++)c["$"+R[w]]=R[w]}for(var L in _){if(!nT(_,L))continue;if(A&&String(Number(L))===L&&L<_.length)continue;if(pT&&c["$"+L]instanceof Symbol)continue;else if(CA.call(/[^\w$]/,L))C.push(T(L,_)+": "+T(_[L],_));else C.push(L+": "+T(_[L],_))}if(typeof TC==="function"){for(var Y=0;Y<R.length;Y++)if(AA.call(_,R[Y]))C.push("["+T(R[Y])+"]: "+T(_[R[Y]],_))}return C}});var FA=O(($4,wA)=>{var OR=Y_(),MR=gT(),O_=function(_,T,A){var C=_,E;for(;(E=C.next)!=null;C=E)if(E.key===T){if(C.next=E.next,!A)E.next=_.next,_.next=E;return E}},uR=function(_,T){if(!_)return;var A=O_(_,T);return A&&A.value},gR=function(_,T,A){var C=O_(_,T);if(C)C.value=A;else _.next={key:T,next:_.next,value:A}},PR=function(_,T){if(!_)return!1;return!!O_(_,T)},bR=function(_,T){if(_)return O_(_,T,!0)};wA.exports=function _(){var T,A={assert:function(C){if(!A.has(C))throw new MR("Side channel does not contain "+OR(C))},delete:function(C){var E=T&&T.next,R=bR(T,C);if(R&&E&&E===R)T=void 0;return!!R},get:function(C){return uR(T,C)},has:function(C){return PR(T,C)},set:function(C,E){if(!T)T={next:void 0};gR(T,C,E)}};return A}});var wC=O((h4,SA)=>{SA.exports=Object});var qA=O((m4,WA)=>{WA.exports=Error});var QA=O((O4,YA)=>{YA.exports=EvalError});var UA=O((M4,fA)=>{fA.exports=RangeError});var JA=O((u4,XA)=>{XA.exports=ReferenceError});var BA=O((g4,ZA)=>{ZA.exports=SyntaxError});var DA=O((P4,VA)=>{VA.exports=URIError});var zA=O((b4,GA)=>{GA.exports=Math.abs});var nA=O((k4,NA)=>{NA.exports=Math.floor});var IA=O((v4,KA)=>{KA.exports=Math.max});var hA=O((l4,$A)=>{$A.exports=Math.min});var OA=O((y4,mA)=>{mA.exports=Math.pow});var uA=O((j4,MA)=>{MA.exports=Math.round});var PA=O((d4,gA)=>{gA.exports=Number.isNaN||function _(T){return T!==T}});var kA=O((s4,bA)=>{var kR=PA();bA.exports=function _(T){if(kR(T)||T===0)return T;return T<0?-1:1}});var lA=O((i4,vA)=>{vA.exports=Object.getOwnPropertyDescriptor});var FC=O((o4,yA)=>{var M_=lA();if(M_)try{M_([],"length")}catch(_){M_=null}yA.exports=M_});var dA=O((p4,jA)=>{var u_=Object.defineProperty||!1;if(u_)try{u_({},"a",{value:1})}catch(_){u_=!1}jA.exports=u_});var iA=O((r4,sA)=>{sA.exports=function _(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},A=Symbol("test"),C=Object(A);if(typeof A==="string")return!1;if(Object.prototype.toString.call(A)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(C)!=="[object Symbol]")return!1;var E=42;T[A]=E;for(var R 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]!==A)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,A))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var w=Object.getOwnPropertyDescriptor(T,A);if(w.value!==E||w.enumerable!==!0)return!1}return!0}});var rA=O((t4,pA)=>{var oA=typeof Symbol!=="undefined"&&Symbol,vR=iA();pA.exports=function _(){if(typeof oA!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof oA("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return vR()}});var SC=O((e4,tA)=>{tA.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null});var WC=O((a4,eA)=>{var lR=wC();eA.exports=lR.getPrototypeOf||null});var _E=O((Tx,TE)=>{var yR="Function.prototype.bind called on incompatible ",jR=Object.prototype.toString,dR=Math.max,sR="[object Function]",aA=function _(T,A){var C=[];for(var E=0;E<T.length;E+=1)C[E]=T[E];for(var R=0;R<A.length;R+=1)C[R+T.length]=A[R];return C},iR=function _(T,A){var C=[];for(var E=A||0,R=0;E<T.length;E+=1,R+=1)C[R]=T[E];return C},oR=function(_,T){var A="";for(var C=0;C<_.length;C+=1)if(A+=_[C],C+1<_.length)A+=T;return A};TE.exports=function _(T){var A=this;if(typeof A!=="function"||jR.apply(A)!==sR)throw new TypeError(yR+A);var C=iR(arguments,1),E,R=function(){if(this instanceof E){var F=A.apply(this,aA(C,arguments));if(Object(F)===F)return F;return this}return A.apply(T,aA(C,arguments))},c=dR(0,A.length-C.length),w=[];for(var L=0;L<c;L++)w[L]="$"+L;if(E=Function("binder","return function ("+oR(w,",")+"){ return binder.apply(this,arguments); }")(R),A.prototype){var Y=function F(){};Y.prototype=A.prototype,E.prototype=new Y,Y.prototype=null}return E}});var Q_=O((_x,CE)=>{var pR=_E();CE.exports=Function.prototype.bind||pR});var g_=O((Cx,AE)=>{AE.exports=Function.prototype.call});var qC=O((Ax,EE)=>{EE.exports=Function.prototype.apply});var cE=O((Ex,RE)=>{RE.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply});var LE=O((Rx,xE)=>{var rR=Q_(),tR=qC(),eR=g_(),aR=cE();xE.exports=aR||rR.call(eR,tR)});var YC=O((cx,HE)=>{var Tc=Q_(),_c=gT(),Cc=g_(),Ac=LE();HE.exports=function _(T){if(T.length<1||typeof T[0]!=="function")throw new _c("a function is required");return Ac(Tc,Cc,T)}});var YE=O((xx,qE)=>{var Ec=YC(),wE=FC(),SE;try{SE=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!=="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var QC=!!SE&&wE&&wE(Object.prototype,"__proto__"),WE=Object,FE=WE.getPrototypeOf;qE.exports=QC&&typeof QC.get==="function"?Ec([QC.get]):typeof FE==="function"?function _(T){return FE(T==null?T:WE(T))}:!1});var JE=O((Lx,XE)=>{var QE=SC(),fE=WC(),UE=YE();XE.exports=QE?function _(T){return QE(T)}:fE?function _(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw new TypeError("getProto: not an object");return fE(T)}:UE?function _(T){return UE(T)}:null});var BE=O((Hx,ZE)=>{var Rc=Function.prototype.call,cc=Object.prototype.hasOwnProperty,xc=Q_();ZE.exports=xc.call(Rc,cc)});var k_=O((wx,NE)=>{var g,Lc=wC(),Hc=qA(),wc=QA(),Fc=UA(),Sc=JA(),aT=BA(),eT=gT(),Wc=DA(),qc=zA(),Yc=nA(),Qc=IA(),fc=hA(),Uc=OA(),Xc=uA(),Jc=kA(),GE=Function,fC=function(_){try{return GE('"use strict"; return ('+_+").constructor;")()}catch(T){}},f_=FC(),Zc=dA(),UC=function(){throw new eT},Bc=f_?function(){try{return arguments.callee,UC}catch(_){try{return f_(arguments,"callee").get}catch(T){return UC}}}():UC,rT=rA()(),t=JE(),Vc=WC(),Dc=SC(),zE=qC(),U_=g_(),tT={},Gc=typeof Uint8Array==="undefined"||!t?g:t(Uint8Array),bT={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?g:ArrayBuffer,"%ArrayIteratorPrototype%":rT&&t?t([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":tT,"%AsyncGenerator%":tT,"%AsyncGeneratorFunction%":tT,"%AsyncIteratorPrototype%":tT,"%Atomics%":typeof Atomics==="undefined"?g:Atomics,"%BigInt%":typeof BigInt==="undefined"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Hc,"%eval%":eval,"%EvalError%":wc,"%Float16Array%":typeof Float16Array==="undefined"?g:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?g:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?g:FinalizationRegistry,"%Function%":GE,"%GeneratorFunction%":tT,"%Int8Array%":typeof Int8Array==="undefined"?g:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?g:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":rT&&t?t(t([][Symbol.iterator]())):g,"%JSON%":typeof JSON==="object"?JSON:g,"%Map%":typeof Map==="undefined"?g:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!rT||!t?g:t(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Lc,"%Object.getOwnPropertyDescriptor%":f_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?g:Promise,"%Proxy%":typeof Proxy==="undefined"?g:Proxy,"%RangeError%":Fc,"%ReferenceError%":Sc,"%Reflect%":typeof Reflect==="undefined"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?g:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!rT||!t?g:t(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":rT&&t?t(""[Symbol.iterator]()):g,"%Symbol%":rT?Symbol:g,"%SyntaxError%":aT,"%ThrowTypeError%":Bc,"%TypedArray%":Gc,"%TypeError%":eT,"%Uint8Array%":typeof Uint8Array==="undefined"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?g:Uint32Array,"%URIError%":Wc,"%WeakMap%":typeof WeakMap==="undefined"?g:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?g:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?g:WeakSet,"%Function.prototype.call%":U_,"%Function.prototype.apply%":zE,"%Object.defineProperty%":Zc,"%Object.getPrototypeOf%":Vc,"%Math.abs%":qc,"%Math.floor%":Yc,"%Math.max%":Qc,"%Math.min%":fc,"%Math.pow%":Uc,"%Math.round%":Xc,"%Math.sign%":Jc,"%Reflect.getPrototypeOf%":Dc};if(t)try{null.error}catch(_){XC=t(t(_)),bT["%Error.prototype%"]=XC}var XC,zc=function _(T){var A;if(T==="%AsyncFunction%")A=fC("async function () {}");else if(T==="%GeneratorFunction%")A=fC("function* () {}");else if(T==="%AsyncGeneratorFunction%")A=fC("async function* () {}");else if(T==="%AsyncGenerator%"){var C=_("%AsyncGeneratorFunction%");if(C)A=C.prototype}else if(T==="%AsyncIteratorPrototype%"){var E=_("%AsyncGenerator%");if(E&&t)A=t(E.prototype)}return bT[T]=A,A},VE={__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_(),P_=BE(),Nc=X_.call(U_,Array.prototype.concat),nc=X_.call(zE,Array.prototype.splice),DE=X_.call(U_,String.prototype.replace),b_=X_.call(U_,String.prototype.slice),Kc=X_.call(U_,RegExp.prototype.exec),Ic=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$c=/\\(\\)?/g,hc=function _(T){var A=b_(T,0,1),C=b_(T,-1);if(A==="%"&&C!=="%")throw new aT("invalid intrinsic syntax, expected closing `%`");else if(C==="%"&&A!=="%")throw new aT("invalid intrinsic syntax, expected opening `%`");var E=[];return DE(T,Ic,function(R,c,w,L){E[E.length]=w?DE(L,$c,"$1"):c||R}),E},mc=function _(T,A){var C=T,E;if(P_(VE,C))E=VE[C],C="%"+E[0]+"%";if(P_(bT,C)){var R=bT[C];if(R===tT)R=zc(C);if(typeof R==="undefined"&&!A)throw new eT("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:E,name:C,value:R}}throw new aT("intrinsic "+T+" does not exist!")};NE.exports=function _(T,A){if(typeof T!=="string"||T.length===0)throw new eT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof A!=="boolean")throw new eT('"allowMissing" argument must be a boolean');if(Kc(/^%?[^%]*%?$/,T)===null)throw new aT("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var C=hc(T),E=C.length>0?C[0]:"",R=mc("%"+E+"%",A),c=R.name,w=R.value,L=!1,Y=R.alias;if(Y)E=Y[0],nc(C,Nc([0,1],Y));for(var F=1,J=!0;F<C.length;F+=1){var S=C[F],Z=b_(S,0,1),Q=b_(S,-1);if((Z==='"'||Z==="'"||Z==="`"||(Q==='"'||Q==="'"||Q==="`"))&&Z!==Q)throw new aT("property names with quotes must have matching quotes");if(S==="constructor"||!J)L=!0;if(E+="."+S,c="%"+E+"%",P_(bT,c))w=bT[c];else if(w!=null){if(!(S in w)){if(!A)throw new eT("base intrinsic for "+T+" exists, but the property is not available.");return}if(f_&&F+1>=C.length){var X=f_(w,S);if(J=!!X,J&&"get"in X&&!("originalValue"in X.get))w=X.get;else w=w[S]}else J=P_(w,S),w=w[S];if(J&&!L)bT[c]=w}}return w}});var JC=O((Fx,IE)=>{var nE=k_(),KE=YC(),Oc=KE([nE("%String.prototype.indexOf%")]);IE.exports=function _(T,A){var C=nE(T,!!A);if(typeof C==="function"&&Oc(T,".prototype.")>-1)return KE([C]);return C}});var ZC=O((Sx,hE)=>{var Mc=k_(),J_=JC(),uc=Y_(),gc=gT(),$E=Mc("%Map%",!0),Pc=J_("Map.prototype.get",!0),bc=J_("Map.prototype.set",!0),kc=J_("Map.prototype.has",!0),vc=J_("Map.prototype.delete",!0),lc=J_("Map.prototype.size",!0);hE.exports=!!$E&&function _(){var T,A={assert:function(C){if(!A.has(C))throw new gc("Side channel does not contain "+uc(C))},delete:function(C){if(T){var E=vc(T,C);if(lc(T)===0)T=void 0;return E}return!1},get:function(C){if(T)return Pc(T,C)},has:function(C){if(T)return kc(T,C);return!1},set:function(C,E){if(!T)T=new $E;bc(T,C,E)}};return A}});var OE=O((Wx,mE)=>{var yc=k_(),l_=JC(),jc=Y_(),v_=ZC(),dc=gT(),T_=yc("%WeakMap%",!0),sc=l_("WeakMap.prototype.get",!0),ic=l_("WeakMap.prototype.set",!0),oc=l_("WeakMap.prototype.has",!0),pc=l_("WeakMap.prototype.delete",!0);mE.exports=T_?function _(){var T,A,C={assert:function(E){if(!C.has(E))throw new dc("Side channel does not contain "+jc(E))},delete:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return pc(T,E)}else if(v_){if(A)return A.delete(E)}return!1},get:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return sc(T,E)}return A&&A.get(E)},has:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return oc(T,E)}return!!A&&A.has(E)},set:function(E,R){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(!T)T=new T_;ic(T,E,R)}else if(v_){if(!A)A=v_();A.set(E,R)}}};return C}:v_});var uE=O((qx,ME)=>{var rc=gT(),tc=Y_(),ec=FA(),ac=ZC(),T1=OE(),_1=T1||ac||ec;ME.exports=function _(){var T,A={assert:function(C){if(!A.has(C))throw new rc("Side channel does not contain "+tc(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=_1();T.set(C,E)}};return A}});var y_=O((Yx,gE)=>{var C1=String.prototype.replace,A1=/%20/g,BC={RFC1738:"RFC1738",RFC3986:"RFC3986"};gE.exports={default:BC.RFC3986,formatters:{RFC1738:function(_){return C1.call(_,A1,"+")},RFC3986:function(_){return String(_)}},RFC1738:BC.RFC1738,RFC3986:BC.RFC3986}});var GC=O((Qx,bE)=>{var E1=y_(),VC=Object.prototype.hasOwnProperty,kT=Array.isArray,VT=function(){var _=[];for(var T=0;T<256;++T)_.push("%"+((T<16?"0":"")+T.toString(16)).toUpperCase());return _}(),R1=function _(T){while(T.length>1){var A=T.pop(),C=A.obj[A.prop];if(kT(C)){var E=[];for(var R=0;R<C.length;++R)if(typeof C[R]!=="undefined")E.push(C[R]);A.obj[A.prop]=E}}},PE=function _(T,A){var C=A&&A.plainObjects?{__proto__:null}:{};for(var E=0;E<T.length;++E)if(typeof T[E]!=="undefined")C[E]=T[E];return C},c1=function _(T,A,C){if(!A)return T;if(typeof A!=="object"&&typeof A!=="function"){if(kT(T))T.push(A);else if(T&&typeof T==="object"){if(C&&(C.plainObjects||C.allowPrototypes)||!VC.call(Object.prototype,A))T[A]=!0}else return[T,A];return T}if(!T||typeof T!=="object")return[T].concat(A);var E=T;if(kT(T)&&!kT(A))E=PE(T,C);if(kT(T)&&kT(A))return A.forEach(function(R,c){if(VC.call(T,c)){var w=T[c];if(w&&typeof w==="object"&&R&&typeof R==="object")T[c]=_(w,R,C);else T.push(R)}else T[c]=R}),T;return Object.keys(A).reduce(function(R,c){var w=A[c];if(VC.call(R,c))R[c]=_(R[c],w,C);else R[c]=w;return R},E)},x1=function _(T,A){return Object.keys(A).reduce(function(C,E){return C[E]=A[E],C},T)},L1=function(_,T,A){var C=_.replace(/\+/g," ");if(A==="iso-8859-1")return C.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(C)}catch(E){return C}},DC=1024,H1=function _(T,A,C,E,R){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(Z){return"%26%23"+parseInt(Z.slice(2),16)+"%3B"});var w="";for(var L=0;L<c.length;L+=DC){var Y=c.length>=DC?c.slice(L,L+DC):c,F=[];for(var J=0;J<Y.length;++J){var S=Y.charCodeAt(J);if(S===45||S===46||S===95||S===126||S>=48&&S<=57||S>=65&&S<=90||S>=97&&S<=122||R===E1.RFC1738&&(S===40||S===41)){F[F.length]=Y.charAt(J);continue}if(S<128){F[F.length]=VT[S];continue}if(S<2048){F[F.length]=VT[192|S>>6]+VT[128|S&63];continue}if(S<55296||S>=57344){F[F.length]=VT[224|S>>12]+VT[128|S>>6&63]+VT[128|S&63];continue}J+=1,S=65536+((S&1023)<<10|Y.charCodeAt(J)&1023),F[F.length]=VT[240|S>>18]+VT[128|S>>12&63]+VT[128|S>>6&63]+VT[128|S&63]}w+=F.join("")}return w},w1=function _(T){var A=[{obj:{o:T},prop:"o"}],C=[];for(var E=0;E<A.length;++E){var R=A[E],c=R.obj[R.prop],w=Object.keys(c);for(var L=0;L<w.length;++L){var Y=w[L],F=c[Y];if(typeof F==="object"&&F!==null&&C.indexOf(F)===-1)A.push({obj:c,prop:Y}),C.push(F)}}return R1(A),T},F1=function _(T){return Object.prototype.toString.call(T)==="[object RegExp]"},S1=function _(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},W1=function _(T,A){return[].concat(T,A)},q1=function _(T,A){if(kT(T)){var C=[];for(var E=0;E<T.length;E+=1)C.push(A(T[E]));return C}return A(T)};bE.exports={arrayToObject:PE,assign:x1,combine:W1,compact:w1,decode:L1,encode:H1,isBuffer:S1,isRegExp:F1,maybeMap:q1,merge:c1}});var dE=O((fx,jE)=>{var vE=uE(),j_=GC(),Z_=y_(),Y1=Object.prototype.hasOwnProperty,lE={brackets:function _(T){return T+"[]"},comma:"comma",indices:function _(T,A){return T+"["+A+"]"},repeat:function _(T){return T}},DT=Array.isArray,Q1=Array.prototype.push,yE=function(_,T){Q1.apply(_,DT(T)?T:[T])},f1=Date.prototype.toISOString,kE=Z_.default,r={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:j_.encode,encodeValuesOnly:!1,filter:void 0,format:kE,formatter:Z_.formatters[kE],indices:!1,serializeDate:function _(T){return f1.call(T)},skipNulls:!1,strictNullHandling:!1},U1=function _(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},zC={},X1=function _(T,A,C,E,R,c,w,L,Y,F,J,S,Z,Q,X,D,q,N){var U=T,V=N,K=0,a=!1;while((V=V.get(zC))!==void 0&&!a){var f=V.get(T);if(K+=1,typeof f!=="undefined")if(f===K)throw new RangeError("Cyclic object value");else a=!0;if(typeof V.get(zC)==="undefined")K=0}if(typeof F==="function")U=F(A,U);else if(U instanceof Date)U=Z(U);else if(C==="comma"&&DT(U))U=j_.maybeMap(U,function(lT){if(lT instanceof Date)return Z(lT);return lT});if(U===null){if(c)return Y&&!D?Y(A,r.encoder,q,"key",Q):A;U=""}if(U1(U)||j_.isBuffer(U)){if(Y){var P=D?A:Y(A,r.encoder,q,"key",Q);return[X(P)+"="+X(Y(U,r.encoder,q,"value",Q))]}return[X(A)+"="+X(String(U))]}var h=[];if(typeof U==="undefined")return h;var M;if(C==="comma"&&DT(U)){if(D&&Y)U=j_.maybeMap(U,Y);M=[{value:U.length>0?U.join(",")||null:void 0}]}else if(DT(F))M=F;else{var i=Object.keys(U);M=J?i.sort(J):i}var o=L?String(A).replace(/\./g,"%2E"):String(A),s=E&&DT(U)&&U.length===1?o+"[]":o;if(R&&DT(U)&&U.length===0)return s+"[]";for(var e=0;e<M.length;++e){var TT=M[e],AT=typeof TT==="object"&&TT&&typeof TT.value!=="undefined"?TT.value:U[TT];if(w&&AT===null)continue;var IT=S&&L?String(TT).replace(/\./g,"%2E"):String(TT),z_=DT(U)?typeof C==="function"?C(s,IT):s:s+(S?"."+IT:"["+IT+"]");N.set(T,K);var A_=vE();A_.set(zC,N),yE(h,_(AT,z_,C,E,R,c,w,L,C==="comma"&&D&&DT(U)?null:Y,F,J,S,Z,Q,X,D,q,A_))}return h},J1=function _(T){if(!T)return r;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys!=="undefined"&&typeof T.encodeDotInKeys!=="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder!=="undefined"&&typeof T.encoder!=="function")throw new TypeError("Encoder has to be a function.");var A=T.charset||r.charset;if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var C=Z_.default;if(typeof T.format!=="undefined"){if(!Y1.call(Z_.formatters,T.format))throw new TypeError("Unknown format option provided.");C=T.format}var E=Z_.formatters[C],R=r.filter;if(typeof T.filter==="function"||DT(T.filter))R=T.filter;var c;if(T.arrayFormat in lE)c=T.arrayFormat;else if("indices"in T)c=T.indices?"indices":"repeat";else c=r.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var w=typeof T.allowDots==="undefined"?T.encodeDotInKeys===!0?!0:r.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:r.addQueryPrefix,allowDots:w,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:r.allowEmptyArrays,arrayFormat:c,charset:A,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:r.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter==="undefined"?r.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:r.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:r.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:r.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:r.encodeValuesOnly,filter:R,format:C,formatter:E,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:r.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:r.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:r.strictNullHandling}};jE.exports=function(_,T){var A=_,C=J1(T),E,R;if(typeof C.filter==="function")R=C.filter,A=R("",A);else if(DT(C.filter))R=C.filter,E=R;var c=[];if(typeof A!=="object"||A===null)return"";var w=lE[C.arrayFormat],L=w==="comma"&&C.commaRoundTrip;if(!E)E=Object.keys(A);if(C.sort)E.sort(C.sort);var Y=vE();for(var F=0;F<E.length;++F){var J=E[F],S=A[J];if(C.skipNulls&&S===null)continue;yE(c,X1(S,J,w,L,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,Y))}var Z=c.join(C.delimiter),Q=C.addQueryPrefix===!0?"?":"";if(C.charsetSentinel)if(C.charset==="iso-8859-1")Q+="utf8=%26%2310003%3B&";else Q+="utf8=%E2%9C%93&";return Z.length>0?Q+Z:""}});var pE=O((Ux,oE)=>{var vT=GC(),NC=Object.prototype.hasOwnProperty,sE=Array.isArray,l={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:vT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},Z1=function(_){return _.replace(/&#(\d+);/g,function(T,A){return String.fromCharCode(parseInt(A,10))})},iE=function(_,T,A){if(_&&typeof _==="string"&&T.comma&&_.indexOf(",")>-1)return _.split(",");if(T.throwOnLimitExceeded&&A>=T.arrayLimit)throw new RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return _},B1="utf8=%26%2310003%3B",V1="utf8=%E2%9C%93",D1=function _(T,A){var C={__proto__:null},E=A.ignoreQueryPrefix?T.replace(/^\?/,""):T;E=E.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var R=A.parameterLimit===1/0?void 0:A.parameterLimit,c=E.split(A.delimiter,A.throwOnLimitExceeded?R+1:R);if(A.throwOnLimitExceeded&&c.length>R)throw new RangeError("Parameter limit exceeded. Only "+R+" parameter"+(R===1?"":"s")+" allowed.");var w=-1,L,Y=A.charset;if(A.charsetSentinel){for(L=0;L<c.length;++L)if(c[L].indexOf("utf8=")===0){if(c[L]===V1)Y="utf-8";else if(c[L]===B1)Y="iso-8859-1";w=L,L=c.length}}for(L=0;L<c.length;++L){if(L===w)continue;var F=c[L],J=F.indexOf("]="),S=J===-1?F.indexOf("="):J+1,Z,Q;if(S===-1)Z=A.decoder(F,l.decoder,Y,"key"),Q=A.strictNullHandling?null:"";else Z=A.decoder(F.slice(0,S),l.decoder,Y,"key"),Q=vT.maybeMap(iE(F.slice(S+1),A,sE(C[Z])?C[Z].length:0),function(D){return A.decoder(D,l.decoder,Y,"value")});if(Q&&A.interpretNumericEntities&&Y==="iso-8859-1")Q=Z1(String(Q));if(F.indexOf("[]=")>-1)Q=sE(Q)?[Q]:Q;var X=NC.call(C,Z);if(X&&A.duplicates==="combine")C[Z]=vT.combine(C[Z],Q);else if(!X||A.duplicates==="last")C[Z]=Q}return C},G1=function(_,T,A,C){var E=0;if(_.length>0&&_[_.length-1]==="[]"){var R=_.slice(0,-1).join("");E=Array.isArray(T)&&T[R]?T[R].length:0}var c=C?T:iE(T,A,E);for(var w=_.length-1;w>=0;--w){var L,Y=_[w];if(Y==="[]"&&A.parseArrays)L=A.allowEmptyArrays&&(c===""||A.strictNullHandling&&c===null)?[]:vT.combine([],c);else{L=A.plainObjects?{__proto__:null}:{};var F=Y.charAt(0)==="["&&Y.charAt(Y.length-1)==="]"?Y.slice(1,-1):Y,J=A.decodeDotInKeys?F.replace(/%2E/g,"."):F,S=parseInt(J,10);if(!A.parseArrays&&J==="")L={0:c};else if(!isNaN(S)&&Y!==J&&String(S)===J&&S>=0&&(A.parseArrays&&S<=A.arrayLimit))L=[],L[S]=c;else if(J!=="__proto__")L[J]=c}c=L}return c},z1=function _(T,A,C,E){if(!T)return;var R=C.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,c=/(\[[^[\]]*])/,w=/(\[[^[\]]*])/g,L=C.depth>0&&c.exec(R),Y=L?R.slice(0,L.index):R,F=[];if(Y){if(!C.plainObjects&&NC.call(Object.prototype,Y)){if(!C.allowPrototypes)return}F.push(Y)}var J=0;while(C.depth>0&&(L=w.exec(R))!==null&&J<C.depth){if(J+=1,!C.plainObjects&&NC.call(Object.prototype,L[1].slice(1,-1))){if(!C.allowPrototypes)return}F.push(L[1])}if(L){if(C.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+C.depth+" and strictDepth is true");F.push("["+R.slice(L.index)+"]")}return G1(F,A,C,E)},N1=function _(T){if(!T)return l;if(typeof T.allowEmptyArrays!=="undefined"&&typeof T.allowEmptyArrays!=="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys!=="undefined"&&typeof T.decodeDotInKeys!=="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder!=="undefined"&&typeof T.decoder!=="function")throw new TypeError("Decoder has to be a function.");if(typeof T.charset!=="undefined"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded!=="undefined"&&typeof T.throwOnLimitExceeded!=="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var A=typeof T.charset==="undefined"?l.charset:T.charset,C=typeof T.duplicates==="undefined"?l.duplicates:T.duplicates;if(C!=="combine"&&C!=="first"&&C!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var E=typeof T.allowDots==="undefined"?T.decodeDotInKeys===!0?!0:l.allowDots:!!T.allowDots;return{allowDots:E,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:l.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:l.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:l.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:l.arrayLimit,charset:A,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:l.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:l.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:l.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:l.decoder,delimiter:typeof T.delimiter==="string"||vT.isRegExp(T.delimiter)?T.delimiter:l.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:l.depth,duplicates:C,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:l.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:l.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:l.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:l.strictDepth,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:l.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};oE.exports=function(_,T){var A=N1(T);if(_===""||_===null||typeof _==="undefined")return A.plainObjects?{__proto__:null}:{};var C=typeof _==="string"?D1(_,A):_,E=A.plainObjects?{__proto__:null}:{},R=Object.keys(C);for(var c=0;c<R.length;++c){var w=R[c],L=z1(w,C[w],A,typeof _==="string");E=vT.merge(E,L,A)}if(A.allowSparse===!0)return E;return vT.compact(E)}});var tE=O((Xx,rE)=>{var n1=dE(),K1=pE(),I1=y_();rE.exports={formats:I1,parse:K1,stringify:n1}});var YL=N_(n_(),1);var kC={};B0(kC,{zodSchemaKey:()=>D0,webSocketServerArgsKey:()=>QT,webSocketMessageArgsKey:()=>MT,webSocketKey:()=>YT,webSocketEventKey:()=>OT,webSocketEventArgumentsKey:()=>_T,webSocketConnectionArgsKey:()=>fT,webSocketCloseReasonArgsKey:()=>c_,webSocketCloseCodeArgsKey:()=>R_,routeModelArgsKey:()=>LT,responseStatusTextArgsKey:()=>t_,responseStatusArgsKey:()=>H_,responseHeadersArgsKey:()=>CT,responseBodyArgsKey:()=>L_,requestHeadersArgsKey:()=>UT,requestHeaderArgsKey:()=>cT,requestBodyArgsKey:()=>XT,requestArgsKey:()=>xT,queryArgsKey:()=>x_,paramsArgsKey:()=>iT,paramArgsKey:()=>JT,moduleKey:()=>qT,middlewareKey:()=>WT,interceptorKey:()=>mT,injectableKey:()=>NT,injectKey:()=>sT,httpServerArgsKey:()=>RT,guardKey:()=>zT,controllerKey:()=>ST,controllerHttpKey:()=>dT,contextArgsKey:()=>ZT,containerKey:()=>ET,configKey:()=>K_,argumentsKey:()=>k});var k=Symbol("__bool:arguments__"),_T=Symbol("__bool:webSocketEventArguments__"),K_=Symbol("__bool:config__"),ST=Symbol("__bool:controller__"),mT=Symbol("__bool:interceptor__"),zT=Symbol("__bool:guard__"),dT=Symbol("__bool:controller.http__"),sT=Symbol("__bool:inject__"),NT=Symbol("__bool:injectable__"),WT=Symbol("__bool:middleware__"),qT=Symbol("__bool:module__"),ET=Symbol("__bool:container__"),D0=Symbol("__bool:zodSchema__"),YT=Symbol("__bool:webSocket__"),OT=Symbol("__bool:webSocket:event__"),QT=Symbol("__bool:webSocketArguments:server__"),fT=Symbol("__bool:webSocketArguments:connection__"),MT=Symbol("__bool:webSocketArguments:message__"),R_=Symbol("__bool:webSocketArguments:closeCode__"),c_=Symbol("__bool:webSocketArguments:closeReason__"),RT=Symbol("__bool:httpArguments:server__"),UT=Symbol("__bool:httpArguments:requestHeaders__"),cT=Symbol("__bool:httpArguments:requestHeader__"),XT=Symbol("__bool:httpArguments:requestBody__"),iT=Symbol("__bool:httpArguments:params__"),JT=Symbol("__bool:httpArguments:param__"),x_=Symbol("__bool:httpArguments:query__"),xT=Symbol("__bool:httpArguments:request__"),CT=Symbol("__bool:httpArguments:responseHeaders__"),ZT=Symbol("__bool:httpArguments:context__"),LT=Symbol("__bool:httpArguments:routeModel__"),L_=Symbol("__bool:httpArguments:responseBody__"),H_=Symbol("__bool:httpArguments:responseStatus__"),t_=Symbol("__bool:httpArguments:responseStatusText__");var G0=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(k,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:UT,validationSchema:_},Reflect.defineMetadata(k,E,T.constructor,A)},z0=(_,T)=>(A,C,E)=>{if(!C)return;let R=Reflect.getOwnMetadata(k,A.constructor,C)||{};R[`argumentIndexes.${E}`]={index:E,type:cT,key:_,validationSchema:T},Reflect.defineMetadata(k,R,A.constructor,C)},N0=(_,T)=>(A,C,E)=>{if(!C)return;let R=Reflect.getOwnMetadata(k,A.constructor,C)||{};R[`argumentIndexes.${E}`]={index:E,type:XT,validationSchema:_,parser:T},Reflect.defineMetadata(k,R,A.constructor,C)},n0=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(k,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:iT,validationSchema:_},Reflect.defineMetadata(k,E,T.constructor,A)},K0=(_,T)=>(A,C,E)=>{if(!C)return;let R=Reflect.getOwnMetadata(k,A.constructor,C)||{};R[`argumentIndexes.${E}`]={index:E,type:JT,key:_,validationSchema:T},Reflect.defineMetadata(k,R,A.constructor,C)},I0=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(k,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:x_,validationSchema:_},Reflect.defineMetadata(k,E,T.constructor,A)},$0=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(k,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:xT,validationSchema:_},Reflect.defineMetadata(k,E,T.constructor,A)},h0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(k,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:CT},Reflect.defineMetadata(k,C,_.constructor,T)},m0=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(k,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:ZT,key:_},Reflect.defineMetadata(k,E,T.constructor,A)},O0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(k,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:LT},Reflect.defineMetadata(k,C,_.constructor,T)},M0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(k,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:RT},Reflect.defineMetadata(k,C,_.constructor,T)};var u0=(_)=>(T)=>{let{modules:A,middlewares:C,guards:E,dependencies:R}=_||{};if(Reflect.hasOwnMetadata(qT,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(A){for(let c=0;c<A.length;c++)if(!Reflect.getOwnMetadataKeys(A[c]).includes(qT))throw Error(`${A[c].name} is not a module.`)}if(C){for(let c=0;c<C.length;c++)if(!Reflect.getOwnMetadataKeys(C[c]).includes(WT))throw Error(`${C[c].name} is not a middleware.`)}if(C){for(let c=0;c<C.length;c++)if(!Reflect.getOwnMetadataKeys(C[c]).includes(WT))throw Error(`${C[c].name} is not a middleware.`)}if(E){for(let c=0;c<E.length;c++)if(!Reflect.getOwnMetadataKeys(E[c]).includes(zT))throw Error(`${E[c].name} is not a guard.`)}if(R){for(let c=0;c<R.length;c++)if(!Reflect.getOwnMetadataKeys(R[c]).includes(NT))throw Error(`${R[c].name} is not an injectable.`)}Reflect.defineMetadata(ET,_,T)};var g0=(_)=>(T)=>{let A={prefix:!_?.startsWith("/")?`/${_||""}`:_,httpMetadata:[...Reflect.getOwnMetadata(dT,T)||[]]};Reflect.defineMetadata(ST,A,T)};var P0=()=>(_)=>{if(!("enforce"in _.prototype)||typeof _.prototype.enforce!=="function")return;let T=void 0;return Reflect.defineMetadata(zT,T,_),_};var oT=(_,T)=>(A,C,E)=>{if(!(E?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let R=Reflect.getOwnMetadata(k,A.constructor,C)||{},c=[...Reflect.getOwnMetadata(dT,A.constructor)||[],{path:!_.startsWith("/")?`/${_}`:_,httpMethod:T.toUpperCase(),methodName:C,descriptor:E,argumentsMetadata:R}];Reflect.defineMetadata(dT,c,A.constructor)},b0=(_="/")=>oT(_,"Get"),k0=(_="/")=>oT(_,"Post"),v0=(_="/")=>oT(_,"Put"),l0=(_="/")=>oT(_,"Patch"),y0=(_="/")=>oT(_,"Delete"),j0=(_="/")=>oT(_,"Options");var d0=(_)=>(T,A,C)=>{let E=Reflect.getMetadata(sT,T)||[];E[C]=_,Reflect.defineMetadata(sT,E,T)};var s0=()=>(_)=>Reflect.defineMetadata(NT,void 0,_);var i0=()=>(_)=>{Reflect.defineMetadata(mT,void 0,_)};var o0=()=>(_)=>{Reflect.defineMetadata(WT,void 0,_)};var p0=(_)=>(T)=>{if(Reflect.hasOwnMetadata(ET,T))throw new Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:A,guards:C,interceptors:E,controllers:R,dependencies:c,webSockets:w}=_||{};if(A){for(let L=0;L<A.length;L++)if(!Reflect.getOwnMetadataKeys(A[L]).includes(WT))throw Error(`${A[L].name} is not a middleware.`)}if(C){for(let L=0;L<C.length;L++)if(!Reflect.getOwnMetadataKeys(C[L]).includes(zT))throw Error(`${C[L].name} is not a guard.`)}if(E){for(let L=0;L<E.length;L++)if(!Reflect.getOwnMetadataKeys(E[L]).includes(mT))throw Error(`${E[L].name} is not a interceptor.`)}if(R){for(let L=0;L<R.length;L++)if(!Reflect.getOwnMetadataKeys(R[L]).includes(ST))throw Error(`${R[L].name} is not a controller.`)}if(c){for(let L=0;L<c.length;L++)if(!Reflect.getOwnMetadataKeys(c[L]).includes(NT))throw Error(`${c[L].name} is not an injectable.`)}if(w){for(let L=0;L<w.length;L++)if(!Reflect.getOwnMetadataKeys(w[L]).includes(YT))throw Error(`${w[L].name} is not a websocket gateway.`)}Reflect.defineMetadata(qT,_,T)};var I_=Symbol("__bool:webSocket.upgrade__"),r0=(_,T,A)=>{let C=new URL(T.url);return _.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:C.pathname,query:A}})},t0=(_)=>(T)=>{let{prefix:A}=_||{};T.prototype[I_]=r0;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:{}}],R={prefix:!A?.startsWith("/")?`/${A||""}`:A,events:Reflect.getOwnMetadata(OT,T)||{},http:E};Reflect.defineMetadata(YT,R,T)};var e0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:fT},Reflect.defineMetadata(_T,C,_.constructor,T)},a0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:QT},Reflect.defineMetadata(_T,C,_.constructor,T)},TR=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:R_},Reflect.defineMetadata(_T,C,_.constructor,T)},_R=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:c_},Reflect.defineMetadata(_T,C,_.constructor,T)},CR=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:MT},Reflect.defineMetadata(_T,C,_.constructor,T)};var AR=(_)=>(T,A,C)=>{if(!(C.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let E=Reflect.getOwnMetadata(_T,T.constructor,A),R=Object.freeze({methodName:A,descriptor:C,arguments:E}),c={...Reflect.getOwnMetadata(OT,T.constructor)||void 0,[_]:R};Reflect.defineMetadata(OT,R,T.constructor,A),Reflect.defineMetadata(OT,c,T.constructor)};var ER=Object.freeze({400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENCATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY_",426:"UPGRAGE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS"});class uT extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:A}){super();this.httpCode=_,this.message=!A?.trim()?ER[_]:A.trim(),this.data=T}}var RR=Object.freeze({500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"});class w_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:A}){super();this.httpCode=_,this.message=!A?.trim()?RR[_]:A.trim(),this.data=T}}var vC=(_,T=new Headers)=>{if(T.set("Content-Type","application/json"),_ instanceof uT||_ instanceof w_)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})};var HT;(function(_){_.year="year",_.month="month",_.day="day",_.hours="hours",_.minutes="minutes",_.seconds="seconds",_.miliseconds="miliseconds"})(HT||(HT={}));var lC=(_,T,A=HT.day)=>{let C=_ instanceof Date?_:new Date(_);switch(A){case HT.year:C.setFullYear(C.getFullYear()+T);break;case HT.month:C.setMonth(C.getMonth()+T);break;case HT.day:C.setDate(C.getDate()+T);break;case HT.hours:C.setHours(C.getHours()+T);break;case HT.minutes:C.setMinutes(C.getMinutes()+T);break;case HT.seconds:C.setSeconds(C.getSeconds()+T);break;case HT.miliseconds:C.setMilliseconds(C.getMilliseconds()+T);break}return C};var A0=N_(tE(),1);var Jx=async function(){}.constructor;var eE=Object.freeze({black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,gray:90}),aE=Object.freeze({black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,gray:100}),KT=(_,T={})=>{let{color:A,backgroundColor:C,bold:E,underline:R}=T,c="";if(E)c+="\x1B[1m";if(R)c+="\x1B[4m";if(A&&eE[A])c+=`\x1B[${eE[A]}m`;if(C&&aE[C])c+=`\x1B[${aE[C]}m`;return`${c}${_}\x1B[0m`};var T0=(_)=>{let{headers:T,method:A}=_,C=T.get("upgrade")?.toLowerCase()||"",E=T.get("connection")?.toLowerCase()||"";return A==="GET"&&C?.toLowerCase()==="websocket"&&E?.toLowerCase().includes("upgrade")};class B_{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(..._){_.forEach((T)=>{T.staticEntries.forEach(([A,C])=>this.set(A,C,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([A,C])=>this.set(A,C,{isStatic:!1}))})}get(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.get(_):this._staticMap.get(_)}has(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.has(_):this._staticMap.has(_)}set(_,T,A){let C=A||this._options;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 GT{static rootPattern=":([a-z0-9A-Z_-]{1,})";static innerRootPattern="([a-z0-9A-Z_-]{1,})";alias;_map=new Map;constructor(_){this.alias=this._thinAlias(_)}test(_,T){try{let A=this._map.get(T),C=this.alias.split("/"),E=this._thinAlias(_).split("/");if(!A)return;if(C.length!==E.length)return;let R=Object(),c=this.alias.replace(new RegExp(GT.rootPattern,"g"),GT.innerRootPattern);if(!new RegExp(c).test(this._thinAlias(_)))return;for(let w=0;w<C.length;w++){let L=C[w],Y=E[w];if(!new RegExp(GT.rootPattern,"g").test(L)){if(L!==Y)return}else{let F=!1;if(L.replace(new RegExp(GT.rootPattern,"g"),(J,S,Z)=>{if(Z===0)Y.replace(new RegExp(GT.innerRootPattern,"g"),(Q,X,D)=>{if(D===0)Object.assign(R,{[S]:Q});return Q});return J}),F)return}continue}return Object.freeze({parameters:R,model:A})}catch(A){return console.error(A),!1}}isMatch(_,T){try{if(!this._map.get(T))return;let C=this.alias.split("/"),E=this._thinAlias(_).split("/");if(C.length!==E.length)return!1;let R=Object();for(let c=0;c<C.length;c++){let w=C[c],L=E[c];if(!new RegExp(GT.rootPattern,"g").test(w)){if(w!==L)return!1}else{let Y=!1;if(w.replace(new RegExp(GT.rootPattern,"g"),(F,J,S)=>{if(!new RegExp(S,"g").test(L))Y=!0;else Object.assign(R,{[J]:L});return""}),Y)return!1}continue}return!0}catch(A){console.error(A);return}}get(_){if(!this._map.get("GET"))this._map.set("GET",_);return this}post(_){if(!this._map.get("POST"))this._map.set("POST",_);return this}put(_){if(!this._map.get("PUT"))this._map.set("PUT",_);return this}delete(_){if(!this._map.get("DELETE"))this._map.set("DELETE",_);return this}connect(_){if(!this._map.get("CONNECT"))return this._map.set("CONNECT",_);return this}options(_){if(!this._map.get("OPTIONS"))return this._map.set("OPTIONS",_);return this}trace(_){if(!this._map.get("TRACE"))return this._map.set("TRACE",_);return this}patch(_){if(!this._map.get("PATCH"))return this._map.set("PATCH",_);return this}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((A,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!E.test(A)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(A))return A;return A.replace(E,(R,c)=>`${R}(.*?)`)}return A}).join("/")}get _filteredPath(){return this.alias.split("/").map((A,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!E.test(A)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(A))return A;return A.replace(E,(R,c)=>"(.*?)")}return A.replace(E,(R,c,w)=>w)}).join("/")}}var _0=GT;class V_{alias;_routes=new Map;constructor(_){this.alias=this._thinAlias(_)}route(_){let T=this._thinAlias(`${this.alias}/${_}`),A=this._routes.get(T),C=!A?new _0(`${this.alias}/${_}`):A;if(!A)this._routes.set(T,C);return C}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this._routes}}class D_{_routers=new Map;add(..._){for(let T of _){if(this._routers.has(T.alias))continue;this._routers.set(T.alias,T)}return this}find(_,T){for(let A of this._routers.values())for(let C of A.routes.values()){let E=C.test(_,T);if(!E)continue;return E}return}}var Ox=N_(n_(),1);class __{_mapper=new Map;constructor(..._){_.forEach((T)=>{T.entries.forEach(([A,C])=>{this._mapper.set(A,C)})})}get(_){if(this._mapper.has(_))return this._mapper.get(_);if(typeof _!=="function")return;let T=Reflect.getMetadataKeys(_);if(![NT,ST,WT,zT,mT,YT].some((R)=>T.includes(R)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let C=(Reflect.getOwnMetadata(sT,_)||[]).map((R)=>this.get(R)),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 nC{error;constructor(_){this.error=_}}var C0=nC;class d_{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 C_{rawPrefix;prefix;routers=[];constructor(_="/"){this.rawPrefix=_;this.prefix=C_.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 A=T.execute();for(let[C,E]of A.entries())_.set(`/${C_.thinPrefix(`${this.prefix}/${C}`)}`,E)}return _}static thinPrefix(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class s_{classConstructor;options;#_;#T;#E=new __;#C=new Map;#R;#c=900;#A;constructor(_,T){this.classConstructor=_;this.options=T;if(this.#T=Reflect.getOwnMetadataKeys(_),!this.#T.includes(ET)&&!this.#T.includes(qT))throw Error(`Can not detect! ${_.name} class is not a container or module.`);this.#c=typeof T.static?.cacheTimeInSeconds!=="number"?900:T.static.cacheTimeInSeconds,this.#R=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||["GET","POST","PUT","PATCH","DELETE","OPTIONS"],allowCredentials:!this.options.cors?.credentials?!1:!0,allowHeaders:!this.options.cors?.headers||this.options.cors.headers.includes("*")?["*"]:this.options.cors.headers})}useValidator(_){this.#A=_}async preLaunch(){if(this.#_)return this.#_;let _=!this.#T.includes(ET)?void 0:Reflect.getOwnMetadata(ET,this.classConstructor),T=!this.#T.includes(ET)?[this.classConstructor]:_?.modules||[],A=!_?void 0:await this.containerResolution({containerClass:this.classConstructor,options:this.options,extendInjector:this.#E}),C=await Promise.all(T.map((w)=>this.moduleResolution({moduleClass:w,options:this.options,extendInjector:!A?this.#E:A.injector})));if([...new Set(C.map((w)=>w.prefix))].length!==C.length)throw Error("Module prefix should be unique.");let R=new Map;for(let w of C){let L=w.webSocketRouterGroup.execute();for(let[Y,F]of L.entries())R.set(Y,F)}let c=Object.freeze({containerMetadata:_,modulesConverted:T,resolutedContainer:A,resolutedModules:C,webSocketsMap:R});return this.#_=c,c}async listen(){let{allowLogsMethods:_,allowOrigins:T,allowMethods:A,allowHeaders:C,allowCredentials:E,staticOption:R}=this.#R,{resolutedContainer:c,resolutedModules:w,webSocketsMap:L}=await this.preLaunch(),Y=Bun.serve({port:this.options.port,fetch:async(F,J)=>{let S=performance.now(),Z=new URL(F.url),Q=A0.parse(Z.searchParams.toString(),this.options.queryParser),X=F.headers.get("origin")||"*",D=F.method.toUpperCase(),q=new Headers,N=new B_().setOptions({isStatic:!0}).set(RT,J).set(xT,F).set(cT,F.headers).set(CT,q).set(x_,Q);try{let U=T0(F),V;if(U){for(let M of w){let i=M.webSocketHttpRouterGroup.find(Z.pathname,F.method);if(i){V=Object.freeze({route:i,resolution:M});break}}if(!V)return this.finalizeResponse(new Response(JSON.stringify({httpCode:404,message:"Route not found",data:void 0}),{status:404,statusText:"Not found.",headers:q}));let h=await this.webSocketFetcher({request:F,server:J},{query:Q,responseHeaders:q,route:V.route,moduleResolution:V.resolution});return h instanceof Response?h:void 0}if([...!E?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:T.includes("*")?"*":!T.includes(X)?T[0]:X},{key:"Access-Control-Allow-Methods",value:A.join(", ")},{key:"Access-Control-Allow-Headers",value:C.join(", ")}].forEach(({key:h,value:M})=>q.set(h,M)),!A.includes(D))return this.finalizeResponse(new Response(void 0,{status:405,statusText:"Method Not Allowed.",headers:q}));if(F.method.toUpperCase()==="OPTIONS")return this.finalizeResponse(T.includes("*")||T.includes(X)?new Response(void 0,{status:204,statusText:"No Content.",headers:q}):new Response(void 0,{status:417,statusText:"Expectation Failed.",headers:q}));if(R){let{path:h,headers:M}=R,i=`${h}/${Z.pathname}`,o=this.#C.get(i);if(!o){let s=Bun.file(i);if(await s.exists()){if(M)for(let[TT,AT]of Object.entries(M))q.set(TT,AT);return q.set("Content-Type",s.type),this.finalizeResponse(new Response(await s.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:q}))}}else{let s=new Date>o.expiredAt;if(s)this.#C.delete(i);let e=!s?o.file:Bun.file(i);if(await e.exists()){if(this.#C.set(i,Object.freeze({expiredAt:lC(new Date,this.#c,HT.seconds),file:e})),M)for(let[AT,IT]of Object.entries(M))q.set(AT,IT);return q.set("Content-Type",e.type),this.finalizeResponse(new Response(await e.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:q}))}}}if(c){let{context:h}=await this.httpFetcher({context:N,resolutedMap:{injector:c.injector,startMiddlewareGroup:c.startMiddlewareGroup,guardGroup:c.guardGroup},options:{isContainer:!0}});N=h}for(let h of w){let M=h.controllerRouterGroup.find(Z.pathname,D);if(M){V=Object.freeze({route:M,resolution:h});break}}if(!V)N.setOptions({isStatic:!1}).set(H_,404).set(t_,"Not found.").set(L_,JSON.stringify({httpCode:404,message:"Route not found",data:void 0}));else{let{context:h}=await this.httpFetcher({context:N,route:V.route,resolutedMap:V.resolution});N=h}if(c){let{context:h}=await this.httpFetcher({context:N,resolutedMap:{injector:c.injector,endMiddlewareGroup:c.endMiddlewareGroup},options:{isContainer:!0}});N=h}let K=N.get(CT,{isStatic:!0})||new Headers,a=N.get(L_,{isStatic:!1})||void 0,f=N.get(H_,{isStatic:!1}),P=N.get(H_,{isStatic:!1});return this.serializeResponse({status:typeof f!=="number"?void 0:f,statusText:typeof P!=="string"?void 0:P,headers:K,data:a})}catch(U){return this.options.debug&&console.error(U),this.finalizeResponse(vC(U,q))}finally{if(_){let U=performance.now(),V=KT(Z.pathname,{color:"blue"}),K=`${Bun.color("yellow","ansi")}${process.pid}`,a=KT(F.method,{color:"yellow",backgroundColor:"blue"}),f=KT(`${F.headers.get("x-forwarded-for")||F.headers.get("x-real-ip")||J.requestIP(F)?.address||"<Unknown>"}`,{color:"yellow"}),P=KT(`${Math.round((U-S+Number.EPSILON)*100)/100}ms`,{color:"yellow",backgroundColor:"blue"});_.includes(F.method.toUpperCase())&&console.info(`PID: ${K} - Method: ${a} - IP: ${f} - ${V} - Time: ${P}`)}}},websocket:{open:(F)=>{let J=`${F.data.pathname}:::open`,S=L.get(J);if(!S)return;let Z=S.arguments||{},Q=[];for(let[X,D]of Object.entries(Z))switch(D.type){case fT:Q[D.index]=F;break;case QT:Q[D.index]=Y;break}S.descriptor.value(...Q)},close:(F,J,S)=>{let Z=`${F.data.pathname}:::close`,Q=L.get(Z);if(!Q)return;let X=Q.arguments||{},D=[];for(let[q,N]of Object.entries(X))switch(N.type){case fT:D[N.index]=F;break;case QT:D[N.index]=Y;break;case R_:D[N.index]=J;break;case c_:D[N.index]=S;break}Q.descriptor.value(...D)},message:(F,J)=>{let S=`${F.data.pathname}:::message`,Z=L.get(S);if(!Z)return;let Q=Z.arguments||{},X=[];for(let[D,q]of Object.entries(Q))switch(q.type){case fT:X[q.index]=F;break;case MT:X[q.index]=J;break;case QT:X[q.index]=Y;break}Z.descriptor.value(...X)},drain:(F)=>{let J=`${F.data.pathname}:::drain`,S=L.get(J);if(!S)return;let Z=S.arguments||{},Q=[];for(let[X,D]of Object.entries(Z))switch(D.type){case fT:Q[D.index]=F;break;case QT:Q[D.index]=Y;break}S.descriptor.value(...Q)},ping:(F,J)=>{let S=`${F.data.pathname}:::ping`,Z=L.get(S);if(!Z)return;let Q=Z.arguments||{},X=[];for(let[D,q]of Object.entries(Q))switch(q.type){case fT:X[q.index]=F;break;case QT:X[q.index]=Y;break;case MT:X[q.index]=J;break}Z.descriptor.value(...X)},pong:(F,J)=>{let S=`${F.data.pathname}:::pong`,Z=L.get(S);if(!Z)return;let Q=Z.arguments||{},X=[];for(let[D,q]of Object.entries(Q))switch(q.type){case fT:X[q.index]=F;break;case QT:X[q.index]=Y;break;case MT:X[q.index]=J;break}Z.descriptor.value(...X)}}})}async containerResolution({containerClass:_,options:T,extendInjector:A}){if(!Reflect.getOwnMetadataKeys(_).includes(ET))throw Error(`${_.name} is not a container.`);let C=new __(A),E=Reflect.getOwnMetadata(ET,_),{loaders:R,middlewares:c,guards:w,dependencies:L,config:Y}=E||{},{config:F}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof Y!=="function"?typeof Y!=="object"?void 0:("key"in Y)&&("value"in Y)&&typeof Y.key==="symbol"?typeof Y.value!=="function"?Y.value:await Y.value():Y:await Y()}});if(C.set(Y&&"key"in Y&&"value"in Y&&typeof Y.key==="symbol"?Y.key:K_,F),R){let Q=[];for(let[D,q]of Object.entries(R))Q.push(async()=>{try{let N=await q({config:F});return console.info(`${KT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${D}] initialized successfully.`),N}catch(N){throw console.error(`${KT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${D}] initialization failed.`),T.debug&&console.error(N),N}});let X=await Promise.all(Q.map((D)=>D()));for(let[D,q]of X)C.set(D,q)}!L||L.map((Q)=>C.get(Q));let J=[],S=[];!c||c.forEach((Q)=>{let X=C.get(Q);if(X.start&&typeof X.start==="function"){let D=Reflect.getOwnMetadata(k,Q,"start")||{};J.push(Object.freeze({class:Q,funcName:"start",func:X.start.bind(X),argumentsMetadata:D}))}if(X.end&&typeof X.end==="function"){let D=Reflect.getOwnMetadata(k,Q,"end")||{};S.push(Object.freeze({class:Q,funcName:"end",func:X.end.bind(X),argumentsMetadata:D}))}});let Z=!w?[]:w.map((Q)=>{let X=C.get(Q),D=Reflect.getOwnMetadata(k,Q,"enforce")||{};return Object.freeze({class:Q,funcName:"enforce",func:X.enforce.bind(X),argumentsMetadata:D})});return Object.freeze({injector:C,startMiddlewareGroup:J,endMiddlewareGroup:S,guardGroup:Z})}async moduleResolution({moduleClass:_,options:T,extendInjector:A}){if(!Reflect.getOwnMetadataKeys(_).includes(qT))throw Error(`${_.name} is not a module.`);let C=new __(A),E=Reflect.getOwnMetadata(qT,_),{loaders:R,middlewares:c,guards:w,interceptors:L,controllers:Y,dependencies:F,webSockets:J,prefix:S,config:Z}=E||{},Q=`${T.prefix||""}/${S||""}`,{config:X}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof Z!=="function"?typeof Z!=="object"?void 0:("key"in Z)&&("value"in Z)&&typeof Z.key==="symbol"?typeof Z.value!=="function"?Z.value:await Z.value():Z:await Z()}});if(C.set(Z&&"key"in Z&&"value"in Z&&typeof Z.key==="symbol"?Z.key:K_,X),R){let P=[];for(let[M,i]of Object.entries(R))P.push(async()=>{try{let o=await i({config:X});return console.info(`${KT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${M}] initialized successfully.`),o}catch(o){throw console.error(`${KT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${M}] initialization failed.`),T.debug&&console.error(o),o}});let h=await Promise.all(P.map((M)=>M()));for(let M=0;M<h.length;M++){let[i,o]=h[M];C.set(i,o)}}!F||F.map((P)=>C.get(P));let D=[],q=[];!c||c.forEach((P)=>{let h=C.get(P);if(h.start&&typeof h.start==="function"){let M=Reflect.getOwnMetadata(k,P,"start")||{};D.push(Object.freeze({class:P,funcName:"start",func:h.start.bind(h),argumentsMetadata:M}))}if(h.end&&typeof h.end==="function"){let M=Reflect.getOwnMetadata(k,P,"end")||{};q.push(Object.freeze({class:P,funcName:"end",func:h.end.bind(h),argumentsMetadata:M}))}});let N=!w?[]:w.map((P)=>{let h=C.get(P),M=Reflect.getOwnMetadata(k,P,"enforce")||{};return Object.freeze({class:P,funcName:"enforce",func:h.enforce.bind(h),argumentsMetadata:M})}),U=[],V=[];!L||L.forEach((P)=>{let h=C.get(P);if(h.open&&typeof h.open==="function"){let M=Reflect.getOwnMetadata(k,P,"open")||{};U.push(Object.freeze({class:P,funcName:"open",func:h.open.bind(h),argumentsMetadata:M}))}if(h.close&&typeof h.close==="function"){let M=Reflect.getOwnMetadata(k,P,"close")||{};V.push(Object.freeze({class:P,funcName:"close",func:h.close.bind(h),argumentsMetadata:M}))}});let K=new D_;!Y||Y.forEach((P)=>this.initControllerInstance({controllerConstructor:P,httpRouterGroup:K,injector:C,prefix:Q}));let a=new D_,f=new C_;return J&&J.forEach((P)=>this.initWebSocketInstance({webSocketConstructor:P,httpRouterGroup:a,webSocketRouterGroup:f,injector:C,prefix:Q})),Object.freeze({prefix:S||"",injector:C,startMiddlewareGroup:D,endMiddlewareGroup:q,guardGroup:N,openInterceptorGroup:U,closeInterceptorGroup:V,controllerRouterGroup:K,webSocketHttpRouterGroup:a,webSocketRouterGroup:f})}async argumentsResolution(_,T,A,C){if(!this.#A)return _;try{let E=await this.#A.validate(_,T,A,C);if(!(E instanceof C0))return E;throw new uT({httpCode:400,message:`Validation at the [${C.toString()}] method fails at positional argument [${A}].`,data:E.error})}catch(E){if(E instanceof uT)throw E;throw new w_({httpCode:500,message:`Validation at the [${C.toString()}] method error at positional argument [${A}].`,data:!(E instanceof Error)?E:[{message:E.message,code:E.name,cause:E.cause}]})}}initControllerInstance({controllerConstructor:_,httpRouterGroup:T,injector:A,prefix:C}){if(!Reflect.getOwnMetadataKeys(_).includes(ST))throw Error(`${_.name} is not a controller.`);let E=A.get(_);if(!E)throw Error("Can not initialize controller.");let R=Reflect.getOwnMetadata(ST,_)||{prefix:"/",httpMetadata:[]},c=new V_(`/${C||""}/${R.prefix}`);return R.httpMetadata.forEach((w)=>{if(typeof w.descriptor.value!=="function")return;let L=c.route(w.path),Y=w.descriptor.value.bind(E),F=Object.freeze({class:_,funcName:w.methodName,func:Y,argumentsMetadata:w.argumentsMetadata});switch(w.httpMethod){case"GET":return L.get(F);case"POST":return L.post(F);case"PUT":return L.put(F);case"PATCH":return L.patch(F);case"DELETE":return L.delete(F);case"OPTIONS":return L.options(F)}}),T.add(c)}initWebSocketInstance({injector:_,httpRouterGroup:T,prefix:A,webSocketRouterGroup:C,webSocketConstructor:E}){if(!Reflect.getOwnMetadataKeys(E).includes(YT))throw Error(`${E.name} is not a websocket route.`);let R=_.get(E);if(!R)throw Error("Can not initialize webSocket.");let c=Reflect.getOwnMetadata(YT,E)||{prefix:"/",events:[],http:[]},w=`/${A||""}/${c.prefix}`,L=new V_(w);for(let[F,J]of Object.entries(c.http)){if(typeof J.descriptor?.value!=="function")continue;let S=L.route(J.path),Z=J.descriptor.value.bind(R),Q=Object.freeze({class:E,funcName:J.methodName,func:Z,argumentsMetadata:J.argumentsMetadata});switch(J.httpMethod){case"GET":S.get(Q);break;case"POST":S.post(Q);break}}T.add(L);let Y=new G_(w);for(let[F,J]of Object.entries(c.events)){let S=new d_({eventName:F,metadata:J});Y.addRoutes(S)}return Y.bind(R),C.addRouters(Y),Object.freeze({httpRouterGroup:T,webSocketRouterGroup:C})}serializeResponse({status:_,statusText:T,headers:A,data:C}){let E=A.get("Content-Type")||"text/plain";if(E.includes("application/json"))return this.finalizeResponse(new Response(C instanceof ReadableStream?C:JSON.stringify(C),{status:_,statusText:T,headers:A}));if(E.includes("text/plain")||E.includes("text/html"))return this.finalizeResponse(new Response(C instanceof ReadableStream?C:String(C),{status:_,statusText:T,headers:A}));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:_,statusText:T,headers:A}));throw new 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:_,statusText:T,headers:A}));throw new Error("multipart/form-data requires FormData object")}return this.finalizeResponse(new Response(String(C),{status:_,statusText:T,headers:A}))}finalizeResponse(_){return _.headers.set("X-Powered-By","Bool Typescript"),_}async httpFetcher({context:_,route:T,options:A,resolutedMap:C}){let E={isStatic:!0},R=(!_?new B_:new B_(_)).setOptions(E);if(T)R.set(iT,T.parameters).set(LT,T.model);let c=R.get(RT,E)||void 0,w=R.get(xT,E)||void 0,L=R.get(cT,E)||void 0,Y=R.get(CT,E)||void 0,F=R.get(iT,E)||void 0,J=R.get(LT,E)||void 0;if(C){let{startMiddlewareGroup:S,guardGroup:Z}=C;if(S)for(let Q=0;Q<S.length;Q++){let X=[],{func:D,funcName:q,argumentsMetadata:N}=S[Q];for(let[U,V]of Object.entries(N))switch(V.type){case ZT:X[V.index]=!V.key?R:R.get(V.key,E);break;case xT:X[V.index]=!V.validationSchema?w:await this.argumentsResolution(w,V.validationSchema,V.index,q);break;case XT:X[V.index]=!V.validationSchema?await w?.[V.parser||"json"]():await this.argumentsResolution(await w?.[V.parser||"json"](),V.validationSchema,V.index,q);break;case UT:X[V.index]=!V.validationSchema?L:await this.argumentsResolution(L?.toJSON(),V.validationSchema,V.index,q);break;case cT:X[V.index]=!V.validationSchema?L?.get(V.key)||void 0:await this.argumentsResolution(L?.get(V.key)||void 0,V.validationSchema,V.index,q);break;case JT:X[V.index]=!V.validationSchema?F?.[V.key]||void 0:await this.argumentsResolution(F?.[V.key]||void 0,V.validationSchema,V.index,q);break;case LT:X[V.index]=J;break;case CT:X[V.index]=Y;break;case RT:X[V.index]=c;break;default:X[V.index]=!V.validationSchema?!R.has(V.type,E)?void 0:R.get(V.type,E):await this.argumentsResolution(!(V.type in R)?void 0:R.get(V.type,E),V.validationSchema,V.index,q);break}await D(...X)}if(Z)for(let Q=0;Q<Z.length;Q++){let X=[],{func:D,funcName:q,argumentsMetadata:N}=Z[Q];for(let[V,K]of Object.entries(N))switch(K.type){case xT:X[K.index]=!K.validationSchema?w:await this.argumentsResolution(w,K.validationSchema,K.index,q);break;case XT:X[K.index]=!K.validationSchema?await w?.[K.parser||"json"]():await this.argumentsResolution(await w?.[K.parser||"json"](),K.validationSchema,K.index,q);break;case ZT:X[K.index]=!K.key?R:R.get(K.key);break;case UT:X[K.index]=!K.validationSchema?L:await this.argumentsResolution(L?.toJSON(),K.validationSchema,K.index,q);break;case CT:X[K.index]=Y;break;case cT:X[K.index]=!K.validationSchema?L?.get(K.key)||void 0:await this.argumentsResolution(L?.get(K.key)||void 0,K.validationSchema,K.index,q);break;case JT:X[K.index]=!K.validationSchema?F?.[K.key]||void 0:await this.argumentsResolution(F?.[K.key],K.validationSchema,K.index,q);break;case LT:X[K.index]=J;break;case RT:X[K.index]=c;break;default:X[K.index]=!K.validationSchema?!R.has(K.type)?void 0:R.get(K.type):await this.argumentsResolution(R.get(K.type),K.validationSchema,K.index,q);break}let U=await D(...X);if(typeof U!=="boolean"||!U)throw new uT({httpCode:401,message:"Unauthorization.",data:void 0})}}if(J&&!A?.isContainer){if(C&&"openInterceptorGroup"in C&&C.openInterceptorGroup){let{openInterceptorGroup:D}=C;for(let q=0;q<D.length;q++){let N=[],{func:U,funcName:V,argumentsMetadata:K}=D[q];for(let[a,f]of Object.entries(K))switch(f.type){case xT:N[f.index]=!f.validationSchema?w:await this.argumentsResolution(w,f.validationSchema,f.index,V);break;case XT:N[f.index]=!f.validationSchema?await w?.[f.parser||"json"]():await this.argumentsResolution(await w?.[f.parser||"json"](),f.validationSchema,f.index,V);break;case ZT:N[f.index]=!f.key?R:R.get(f.key);break;case UT:N[f.index]=!f.validationSchema?L:await this.argumentsResolution(L?.toJSON(),f.validationSchema,f.index,V);break;case cT:N[f.index]=!f.validationSchema?L?.get(f.key)||void 0:await this.argumentsResolution(L?.get(f.key)||void 0,f.validationSchema,f.index,V);break;case CT:N[f.index]=Y;break;case JT:N[f.index]=!f.validationSchema?F?.[f.key]||void 0:await this.argumentsResolution(F?.[f.key]||void 0,f.validationSchema,f.index,V);break;case LT:N[f.index]=J;break;case RT:N[f.index]=c;break;default:N[f.index]=!f.validationSchema?!R.has(f.type)?void 0:R.get(f.type):await this.argumentsResolution(R.get(f.type),f.validationSchema,f.index,V);break}await U(...N)}}let S=[],{func:Z,funcName:Q,argumentsMetadata:X}=J;for(let[D,q]of Object.entries(X))switch(q.type){case xT:S[q.index]=!q.validationSchema?w:await this.argumentsResolution(w,q.validationSchema,q.index,Q);break;case XT:S[q.index]=!q.validationSchema?await w?.[q.parser||"json"]():await this.argumentsResolution(await w?.[q.parser||"json"](),q.validationSchema,q.index,Q);break;case ZT:S[q.index]=!q.key?R:R.get(q.key);break;case UT:S[q.index]=!q.validationSchema?L:await this.argumentsResolution(L?.toJSON(),q.validationSchema,q.index,Q);break;case cT:S[q.index]=!q.validationSchema?L?.get(q.key)||void 0:await this.argumentsResolution(L?.get(q.key)||void 0,q.validationSchema,q.index,Q);break;case CT:S[q.index]=Y;break;case JT:S[q.index]=!q.validationSchema?F?.[q.key]||void 0:await this.argumentsResolution(F?.[q.key]||void 0,q.validationSchema,q.index,Q);break;case LT:S[q.index]=J;break;case RT:S[q.index]=c;break;default:S[q.index]=!q.validationSchema?!R.has(q.type)?void 0:R.get(q.type):await this.argumentsResolution(R.get(q.type),q.validationSchema,q.index,Q);break}if(R.set(L_,await Z(...S),{isStatic:!1}),C&&"closeInterceptorGroup"in C&&C.closeInterceptorGroup){let{closeInterceptorGroup:D}=C;for(let q=0;q<D.length;q++){let N=[],{func:U,funcName:V,argumentsMetadata:K}=D[q];for(let[a,f]of Object.entries(K))switch(f.type){case xT:N[f.index]=!f.validationSchema?w:await this.argumentsResolution(w,f.validationSchema,f.index,V);break;case XT:N[f.index]=!f.validationSchema?await w?.[f.parser||"json"]():await this.argumentsResolution(await w?.[f.parser||"json"](),f.validationSchema,f.index,V);break;case ZT:N[f.index]=!f.key?R:R.get(f.key);break;case UT:N[f.index]=!f.validationSchema?L:await this.argumentsResolution(L?.toJSON(),f.validationSchema,f.index,V);break;case CT:N[f.index]=R.get(f.type);break;case cT:N[f.index]=!f.validationSchema?L?.get(f.key)||void 0:await this.argumentsResolution(L?.get(f.key)||void 0,f.validationSchema,f.index,V);break;case JT:N[f.index]=!f.validationSchema?F?.[f.key]||void 0:await this.argumentsResolution(F?.[f.key]||void 0,f.validationSchema,f.index,V);break;case LT:N[f.index]=J;break;case RT:N[f.index]=c;break;default:N[f.index]=!f.validationSchema?!R.has(f.type)?void 0:R.get(f.type):await this.argumentsResolution(R.get(f.type),f.validationSchema,f.index,V);break}await U(...N)}}}if(C){let{endMiddlewareGroup:S}=C;if(S)for(let Z=0;Z<S.length;Z++){let Q=[],{func:X,funcName:D,argumentsMetadata:q}=S[Z];for(let[N,U]of Object.entries(q))switch(U.type){case xT:Q[U.index]=!U.validationSchema?w:await this.argumentsResolution(w,U.validationSchema,U.index,D);break;case XT:Q[U.index]=!U.validationSchema?await w?.[U.parser||"json"]():await this.argumentsResolution(await w?.[U.parser||"json"](),U.validationSchema,U.index,D);break;case ZT:Q[U.index]=!U.key?R:R.get(U.key);break;case UT:Q[U.index]=!U.validationSchema?L:await this.argumentsResolution(L?.toJSON(),U.validationSchema,U.index,D);break;case CT:Q[U.index]=R.get(U.type);break;case cT:Q[U.index]=!U.validationSchema?L?.get(U.key)||void 0:await this.argumentsResolution(L?.get(U.key)||void 0,U.validationSchema,U.index,D);break;case JT:Q[U.index]=!U.validationSchema?F?.[U.key]||void 0:await this.argumentsResolution(F?.[U.key]||void 0,U.validationSchema,U.index,D);break;case LT:Q[U.index]=J;break;case RT:Q[U.index]=c;break;default:Q[U.index]=!U.validationSchema?!R.has(U.type)?void 0:R.get(U.type):await this.argumentsResolution(!(U.type in R)?void 0:R.get(U.type),U.validationSchema,U.index,D);break}await X(...Q)}}return Object.freeze({context:R})}async webSocketFetcher(_,T){let{request:A,server:C}=_,{query:E,responseHeaders:R,route:{model:c}}=T,w=await c.func(...[C,A,E]);if(typeof w!=="boolean")return this.finalizeResponse(new Response(JSON.stringify({httpCode:500,message:"Can not detect webSocket upgrade result.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));if(!w)return this.finalizeResponse(new Response(JSON.stringify({httpCode:500,message:"Can not upgrade.",data:void 0}),{status:500,statusText:"Internal server error.",headers:R}));return w}}var HL=N_(n_(),1);var $1=async(_,T)=>{try{let A=new s_(_,T);return await A.preLaunch(),A}catch(A){throw T.debug&&console.error(A),A}};export{vC as jsonErrorInfer,RR as httpServerErrors,ER as httpClientErrors,a0 as WebSocketServer,C_ as WebSocketRouterGroup,G_ as WebSocketRouter,d_ as WebSocketRoute,CR as WebSocketMessage,AR as WebSocketEvent,e0 as WebSocketConnection,_R as WebSocketCloseReason,TR as WebSocketCloseCode,t0 as WebSocket,nC as ValidationFailed,O0 as RouteModel,h0 as ResponseHeaders,G0 as RequestHeaders,z0 as RequestHeader,N0 as RequestBody,$0 as Request,I0 as Query,v0 as Put,k0 as Post,l0 as Patch,n0 as Params,K0 as Param,j0 as Options,p0 as Module,o0 as Middleware,kC as Keys,i0 as Interceptor,__ as Injector,s0 as Injectable,d0 as Inject,w_ as HttpServerError,M0 as HttpServer,D_ as HttpRouterGroup,V_ as HttpRouter,GT as HttpRoute,uT as HttpClientError,P0 as Guard,b0 as Get,y0 as Delete,g0 as Controller,m0 as Context,u0 as Container,$1 as BoolFactory,s_ as Application};
18
18
 
19
- //# debugId=CC3441A88D117F6264756E2164756E21
19
+ //# debugId=F53711692113259464756E2164756E21
20
20
  //# sourceMappingURL=index.js.map