@bool-ts/core 2.2.4 → 2.3.1

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