"use strict";(()=>{var Vf=Object.create;var Yr=Object.defineProperty;var Ko=Object.getOwnPropertyDescriptor;var $f=Object.getOwnPropertyNames;var Hf=Object.getPrototypeOf,Kf=Object.prototype.hasOwnProperty;var I=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Yf=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of $f(e))!Kf.call(t,i)&&i!==n&&Yr(t,i,{get:()=>e[i],enumerable:!(r=Ko(e,i))||r.enumerable});return t};var Z=(t,e,n)=>(n=t!=null?Vf(Hf(t)):{},Yf(e||!t||!t.__esModule?Yr(n,"default",{value:t,enumerable:!0}):n,t));var bn=(t,e,n,r)=>{for(var i=r>1?void 0:r?Ko(e,n):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(r?s(e,n,i):s(i))||i);return r&&i&&Yr(e,n,i),i};var zo=g(()=>{var Yo;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:u(),r=i(t);typeof n.Reflect<"u"&&(r=i(n.Reflect,r)),e(r,n),typeof n.Reflect>"u"&&(n.Reflect=t);function i(c,a){return function(l,p){Object.defineProperty(c,l,{configurable:!0,writable:!0,value:p}),a&&a(l,p)}}function o(){try{return Function("return this;")()}catch{}}function s(){try{return(0,eval)("(function() { return this; })()")}catch{}}function u(){return o()||s()}})(function(e,n){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",u=typeof Object.create=="function",c={__proto__:[]}instanceof Array,a=!u&&!c,l={create:u?function(){return Kr(Object.create(null))}:c?function(){return Kr({__proto__:null})}:function(){return Kr({})},has:a?function(f,d){return r.call(f,d)}:function(f,d){return d in f},get:a?function(f,d){return r.call(f,d)?f[d]:void 0}:function(f,d){return f[d]}},p=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Ff(),b=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Uf(),T=typeof WeakMap=="function"?WeakMap:qf(),w=i?Symbol.for("@reflect-metadata:registry"):void 0,R=Lf(),K=kf(R);function ue(f,d,h,y){if(O(h)){if(!Fo(f))throw new TypeError;if(!Uo(d))throw new TypeError;return If(f,d)}else{if(!Fo(f))throw new TypeError;if(!B(d))throw new TypeError;if(!B(y)&&!O(y)&&!ht(y))throw new TypeError;return ht(y)&&(y=void 0),h=we(h),Of(f,d,h,y)}}e("decorate",ue);function pt(f,d){function h(y,C){if(!B(y))throw new TypeError;if(!O(C)&&!Df(C))throw new TypeError;Do(f,d,y,C)}return h}e("metadata",pt);function ge(f,d,h,y){if(!B(h))throw new TypeError;return O(y)||(y=we(y)),Do(f,d,h,y)}e("defineMetadata",ge);function be(f,d,h){if(!B(d))throw new TypeError;return O(h)||(h=we(h)),No(f,d,h)}e("hasMetadata",be);function Ze(f,d,h){if(!B(d))throw new TypeError;return O(h)||(h=we(h)),Vr(f,d,h)}e("hasOwnMetadata",Ze);function Ke(f,d,h){if(!B(d))throw new TypeError;return O(h)||(h=we(h)),Ro(f,d,h)}e("getMetadata",Ke);function vn(f,d,h){if(!B(d))throw new TypeError;return O(h)||(h=we(h)),Mo(f,d,h)}e("getOwnMetadata",vn);function jt(f,d){if(!B(f))throw new TypeError;return O(d)||(d=we(d)),Bo(f,d)}e("getMetadataKeys",jt);function Wr(f,d){if(!B(f))throw new TypeError;return O(d)||(d=we(d)),Lo(f,d)}e("getOwnMetadataKeys",Wr);function Cf(f,d,h){if(!B(d))throw new TypeError;if(O(h)||(h=we(h)),!B(d))throw new TypeError;O(h)||(h=we(h));var y=Ft(d,h,!1);return O(y)?!1:y.OrdinaryDeleteMetadata(f,d,h)}e("deleteMetadata",Cf);function If(f,d){for(var h=f.length-1;h>=0;--h){var y=f[h],C=y(d);if(!O(C)&&!ht(C)){if(!Uo(C))throw new TypeError;d=C}}return d}function Of(f,d,h,y){for(var C=f.length-1;C>=0;--C){var L=f[C],G=L(d,h,y);if(!O(G)&&!ht(G)){if(!B(G))throw new TypeError;y=G}}return y}function No(f,d,h){var y=Vr(f,d,h);if(y)return!0;var C=Hr(d);return ht(C)?!1:No(f,C,h)}function Vr(f,d,h){var y=Ft(d,h,!1);return O(y)?!1:jo(y.OrdinaryHasOwnMetadata(f,d,h))}function Ro(f,d,h){var y=Vr(f,d,h);if(y)return Mo(f,d,h);var C=Hr(d);if(!ht(C))return Ro(f,C,h)}function Mo(f,d,h){var y=Ft(d,h,!1);if(!O(y))return y.OrdinaryGetOwnMetadata(f,d,h)}function Do(f,d,h,y){var C=Ft(h,y,!0);C.OrdinaryDefineOwnMetadata(f,d,h,y)}function Bo(f,d){var h=Lo(f,d),y=Hr(f);if(y===null)return h;var C=Bo(y,d);if(C.length<=0)return h;if(h.length<=0)return C;for(var L=new b,G=[],P=0,_=h;P<_.length;P++){var x=_[P],E=L.has(x);E||(L.add(x),G.push(x))}for(var A=0,N=C;A=0&&_=this._keys.length?(this._index=-1,this._keys=d,this._values=d):this._index++,{value:x,done:!1}}return{value:void 0,done:!0}},P.prototype.throw=function(_){throw this._index>=0&&(this._index=-1,this._keys=d,this._values=d),_},P.prototype.return=function(_){return this._index>=0&&(this._index=-1,this._keys=d,this._values=d),{value:_,done:!0}},P}(),y=function(){function P(){this._keys=[],this._values=[],this._cacheKey=f,this._cacheIndex=-2}return Object.defineProperty(P.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),P.prototype.has=function(_){return this._find(_,!1)>=0},P.prototype.get=function(_){var x=this._find(_,!1);return x>=0?this._values[x]:void 0},P.prototype.set=function(_,x){var E=this._find(_,!0);return this._values[E]=x,this},P.prototype.delete=function(_){var x=this._find(_,!1);if(x>=0){for(var E=this._keys.length,A=x+1;A{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.NON_CUSTOM_TAG_KEYS=M.PRE_DESTROY=M.POST_CONSTRUCT=M.DESIGN_PARAM_TYPES=M.PARAM_TYPES=M.TAGGED_PROP=M.TAGGED=M.MULTI_INJECT_TAG=M.INJECT_TAG=M.OPTIONAL_TAG=M.UNMANAGED_TAG=M.NAME_TAG=M.NAMED_TAG=void 0;M.NAMED_TAG="named";M.NAME_TAG="name";M.UNMANAGED_TAG="unmanaged";M.OPTIONAL_TAG="optional";M.INJECT_TAG="inject";M.MULTI_INJECT_TAG="multi_inject";M.TAGGED="inversify:tagged";M.TAGGED_PROP="inversify:tagged_props";M.PARAM_TYPES="inversify:paramtypes";M.DESIGN_PARAM_TYPES="design:paramtypes";M.POST_CONSTRUCT="post_construct";M.PRE_DESTROY="pre_destroy";function Jf(){return[M.INJECT_TAG,M.MULTI_INJECT_TAG,M.NAME_TAG,M.UNMANAGED_TAG,M.NAMED_TAG,M.OPTIONAL_TAG]}M.NON_CUSTOM_TAG_KEYS=Jf()});var ce=g(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.TargetTypeEnum=Ye.BindingTypeEnum=Ye.BindingScopeEnum=void 0;var Xf={Request:"Request",Singleton:"Singleton",Transient:"Transient"};Ye.BindingScopeEnum=Xf;var Qf={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};Ye.BindingTypeEnum=Qf;var Zf={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};Ye.TargetTypeEnum=Zf});var ze=g(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.id=void 0;var ed=0;function td(){return ed++}wn.id=td});var Xo=g(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.Binding=void 0;var Jo=ce(),nd=ze(),rd=function(){function t(e,n){this.id=(0,nd.id)(),this.activated=!1,this.serviceIdentifier=e,this.scope=n,this.type=Jo.BindingTypeEnum.Invalid,this.constraint=function(r){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===Jo.BindingScopeEnum.Singleton?this.activated:!1,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.onDeactivation=this.onDeactivation,e.cache=this.cache,e},t}();Sn.Binding=rd});var Y=g(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.STACK_OVERFLOW=S.CIRCULAR_DEPENDENCY_IN_FACTORY=S.ON_DEACTIVATION_ERROR=S.PRE_DESTROY_ERROR=S.POST_CONSTRUCT_ERROR=S.ASYNC_UNBIND_REQUIRED=S.MULTIPLE_POST_CONSTRUCT_METHODS=S.MULTIPLE_PRE_DESTROY_METHODS=S.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=S.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=S.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=S.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=S.ARGUMENTS_LENGTH_MISMATCH=S.INVALID_DECORATOR_OPERATION=S.INVALID_TO_SELF_VALUE=S.LAZY_IN_SYNC=S.INVALID_FUNCTION_BINDING=S.INVALID_MIDDLEWARE_RETURN=S.NO_MORE_SNAPSHOTS_AVAILABLE=S.INVALID_BINDING_TYPE=S.NOT_IMPLEMENTED=S.CIRCULAR_DEPENDENCY=S.UNDEFINED_INJECT_ANNOTATION=S.MISSING_INJECT_ANNOTATION=S.MISSING_INJECTABLE_ANNOTATION=S.NOT_REGISTERED=S.CANNOT_UNBIND=S.AMBIGUOUS_MATCH=S.KEY_NOT_FOUND=S.NULL_ARGUMENT=S.DUPLICATED_METADATA=S.DUPLICATED_INJECTABLE_DECORATOR=void 0;S.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.";S.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:";S.NULL_ARGUMENT="NULL argument";S.KEY_NOT_FOUND="Key Not Found";S.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:";S.CANNOT_UNBIND="Could not unbind serviceIdentifier:";S.NOT_REGISTERED="No matching bindings found for serviceIdentifier:";S.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:";S.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";var id=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifier to overcome this limitation."};S.UNDEFINED_INJECT_ANNOTATION=id;S.CIRCULAR_DEPENDENCY="Circular dependency found:";S.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.";S.INVALID_BINDING_TYPE="Invalid binding type:";S.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.";S.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!";S.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!";var od=function(t){return"You are attempting to construct '"+t+`' in a synchronous way but it has asynchronous dependencies.`};S.LAZY_IN_SYNC=od;S.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier";S.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";var sd=function(){for(var t=[],e=0;e= than the number of constructor arguments of its base class.")};S.ARGUMENTS_LENGTH_MISMATCH=sd;S.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.";S.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE='Invalid Container option. Default scope must be a string ("singleton" or "transient").';S.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean";S.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean";S.MULTIPLE_PRE_DESTROY_METHODS="Cannot apply @preDestroy decorator multiple times in the same class";S.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";S.ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)";var ad=function(t,e){return"@postConstruct error in class "+t+": "+e};S.POST_CONSTRUCT_ERROR=ad;var ud=function(t,e){return"@preDestroy error in class "+t+": "+e};S.PRE_DESTROY_ERROR=ud;var cd=function(t,e){return"onDeactivation() error in class "+t+": "+e};S.ON_DEACTIVATION_ERROR=cd;var ld=function(t,e){return"It looks like there is a circular dependency in one of the '"+t+"' bindings. Please investigate bindings with "+("service identifier '"+e+"'.")};S.CIRCULAR_DEPENDENCY_IN_FACTORY=ld;S.STACK_OVERFLOW="Maximum call stack size exceeded"});var Jr=g(Se=>{"use strict";var fd=Se&&Se.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),dd=Se&&Se.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pd=Se&&Se.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&fd(e,t,n);return dd(e,t),e};Object.defineProperty(Se,"__esModule",{value:!0});Se.MetadataReader=void 0;var zr=pd(U()),hd=function(){function t(){}return t.prototype.getConstructorMetadata=function(e){var n=Reflect.getMetadata(zr.PARAM_TYPES,e),r=Reflect.getMetadata(zr.TAGGED,e);return{compilerGeneratedMetadata:n,userGeneratedMetadata:r||{}}},t.prototype.getPropertiesMetadata=function(e){var n=Reflect.getMetadata(zr.TAGGED_PROP,e)||[];return n},t}();Se.MetadataReader=hd});var Qo=g(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.BindingCount=void 0;Tn.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}});var Xr=g(le=>{"use strict";var gd=le&&le.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),md=le&&le.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yd=le&&le.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&gd(e,t,n);return md(e,t),e};Object.defineProperty(le,"__esModule",{value:!0});le.tryAndThrowErrorIfStackOverflow=le.isStackOverflowExeption=void 0;var _d=yd(Y());function Zo(t){return t instanceof RangeError||t.message===_d.STACK_OVERFLOW}le.isStackOverflowExeption=Zo;var vd=function(t,e){try{return t()}catch(n){throw Zo(n)&&(n=e()),n}};le.tryAndThrowErrorIfStackOverflow=vd});var et=g(q=>{"use strict";var bd=q&&q.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),wd=q&&q.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Sd=q&&q.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&bd(e,t,n);return wd(e,t),e};Object.defineProperty(q,"__esModule",{value:!0});q.getSymbolDescription=q.circularDependencyToException=q.listMetadataForTarget=q.listRegisteredBindingsForServiceIdentifier=q.getServiceIdentifierAsString=q.getFunctionName=void 0;var Td=Sd(Y());function es(t){if(typeof t=="function"){var e=t;return e.name}else{if(typeof t=="symbol")return t.toString();var e=t;return e}}q.getServiceIdentifierAsString=es;function Ed(t,e,n){var r="",i=n(t,e);return i.length!==0&&(r=` Registered bindings:`,i.forEach(function(o){var s="Object";o.implementationType!==null&&(s=rs(o.implementationType)),r=r+` `+s,o.constraint.metaData&&(r=r+" - "+o.constraint.metaData)})),r}q.listRegisteredBindingsForServiceIdentifier=Ed;function ts(t,e){return t.parentRequest===null?!1:t.parentRequest.serviceIdentifier===e?!0:ts(t.parentRequest,e)}function xd(t){function e(r,i){i===void 0&&(i=[]);var o=es(r.serviceIdentifier);return i.push(o),r.parentRequest!==null?e(r.parentRequest,i):i}var n=e(t);return n.reverse().join(" --> ")}function ns(t){t.childRequests.forEach(function(e){if(ts(e,e.serviceIdentifier)){var n=xd(e);throw new Error(Td.CIRCULAR_DEPENDENCY+" "+n)}else ns(e)})}q.circularDependencyToException=ns;function Ad(t,e){if(e.isTagged()||e.isNamed()){var n="",r=e.getNamedTag(),i=e.getCustomTags();return r!==null&&(n+=r.toString()+` `),i!==null&&i.forEach(function(o){n+=o.toString()+` `})," "+t+` `+t+" - "+n}else return" "+t}q.listMetadataForTarget=Ad;function rs(t){if(t.name)return t.name;var e=t.toString(),n=e.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+e}q.getFunctionName=rs;function Cd(t){return t.toString().slice(7,-1)}q.getSymbolDescription=Cd});var is=g(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.Context=void 0;var Id=ze(),Od=function(){function t(e){this.id=(0,Id.id)(),this.container=e}return t.prototype.addPlan=function(e){this.plan=e},t.prototype.setCurrentRequest=function(e){this.currentRequest=e},t}();En.Context=Od});var ye=g(Te=>{"use strict";var Pd=Te&&Te.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Nd=Te&&Te.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rd=Te&&Te.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Pd(e,t,n);return Nd(e,t),e};Object.defineProperty(Te,"__esModule",{value:!0});Te.Metadata=void 0;var Md=Rd(U()),Dd=function(){function t(e,n){this.key=e,this.value=n}return t.prototype.toString=function(){return this.key===Md.NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},t}();Te.Metadata=Dd});var os=g(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.Plan=void 0;var Bd=function(){function t(e,n){this.parentContext=e,this.rootRequest=n}return t}();xn.Plan=Bd});var Cn=g(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.LazyServiceIdentifier=void 0;var Ld=function(){function t(e){this._cb=e}return t.prototype.unwrap=function(){return this._cb()},t}();An.LazyServiceIdentifier=Ld});var ss=g(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.QueryableString=void 0;var kd=function(){function t(e){this.str=e}return t.prototype.startsWith=function(e){return this.str.indexOf(e)===0},t.prototype.endsWith=function(e){var n="",r=e.split("").reverse().join("");return n=this.str.split("").reverse().join(""),this.startsWith.call({str:n},r)},t.prototype.contains=function(e){return this.str.indexOf(e)!==-1},t.prototype.equals=function(e){return this.str===e},t.prototype.value=function(){return this.str},t}();In.QueryableString=kd});var Qr=g(Ee=>{"use strict";var jd=Ee&&Ee.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Fd=Ee&&Ee.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ud=Ee&&Ee.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&jd(e,t,n);return Fd(e,t),e};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Target=void 0;var Ge=Ud(U()),qd=ze(),Gd=et(),as=ye(),Wd=ss(),Vd=function(){function t(e,n,r,i){this.id=(0,qd.id)(),this.type=e,this.serviceIdentifier=r;var o=typeof n=="symbol"?(0,Gd.getSymbolDescription)(n):n;this.name=new Wd.QueryableString(o||""),this.identifier=n,this.metadata=new Array;var s=null;typeof i=="string"?s=new as.Metadata(Ge.NAMED_TAG,i):i instanceof as.Metadata&&(s=i),s!==null&&this.metadata.push(s)}return t.prototype.hasTag=function(e){for(var n=0,r=this.metadata;n{"use strict";var $d=z&&z.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Hd=z&&z.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),us=z&&z.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&$d(e,t,n);return Hd(e,t),e},On=z&&z.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0,l=c.length>n.length,p=a||l?c.length:n.length,m=Jd(r,e,o,u,p),b=ds(t,n,e),T=On(On([],m,!0),b,!0);return T}function zd(t,e,n,r,i){var o=i[t.toString()]||[],s=hs(o),u=s.unmanaged!==!0,c=r[t],a=s.inject||s.multiInject;if(c=a||c,c instanceof Kd.LazyServiceIdentifier&&(c=c.unwrap()),u){var l=c===Object,p=c===Function,m=c===void 0,b=l||p||m;if(!e&&b){var T=Zr.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".";throw new Error(T)}var w=new ls.Target(cs.TargetTypeEnum.ConstructorArgument,s.targetName,c);return w.metadata=o,w}return null}function Jd(t,e,n,r,i){for(var o=[],s=0;s0?u:ps(t,n)}else return 0}z.getBaseClassDependencyCount=ps;function hs(t){var e={};return t.forEach(function(n){e[n.key.toString()]=n.value}),{inject:e[Ut.INJECT_TAG],multiInject:e[Ut.MULTI_INJECT_TAG],targetName:e[Ut.NAME_TAG],unmanaged:e[Ut.UNMANAGED_TAG]}}});var ms=g(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.Request=void 0;var Qd=ze(),Zd=function(){function t(e,n,r,i,o){this.id=(0,Qd.id)(),this.serviceIdentifier=e,this.parentContext=n,this.parentRequest=r,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=r===null?new Map:null}return t.prototype.addChildRequest=function(e,n,r){var i=new t(e,this.parentContext,this,n,r);return this.childRequests.push(i),i},t}();Pn.Request=Zd});var oi=g(ie=>{"use strict";var ep=ie&&ie.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),tp=ie&&ie.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vs=ie&&ie.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&ep(e,t,n);return tp(e,t),e};Object.defineProperty(ie,"__esModule",{value:!0});ie.getBindingDictionary=ie.createMockRequest=ie.plan=void 0;var Nn=Qo(),ni=vs(Y()),bs=ce(),ys=vs(U()),np=Xr(),mt=et(),ws=is(),ri=ye(),rp=os(),ti=gs(),ii=ms(),Ss=Qr();function Ts(t){return t._bindingDictionary}ie.getBindingDictionary=Ts;function ip(t,e,n,r,i,o){var s=t?ys.MULTI_INJECT_TAG:ys.INJECT_TAG,u=new ri.Metadata(s,n),c=new Ss.Target(e,r,n,u);if(i!==void 0){var a=new ri.Metadata(i,o);c.metadata.push(a)}return c}function _s(t,e,n,r,i){var o=qt(n.container,i.serviceIdentifier),s=[];return o.length===Nn.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&typeof i.serviceIdentifier=="function"&&t.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=qt(n.container,i.serviceIdentifier)),e?s=o:s=o.filter(function(u){var c=new ii.Request(u.serviceIdentifier,n,r,u,i);return u.constraint(c)}),op(i.serviceIdentifier,s,i,n.container),s}function op(t,e,n,r){switch(e.length){case Nn.BindingCount.NoBindingsAvailable:if(n.isOptional())return e;var i=(0,mt.getServiceIdentifierAsString)(t),o=ni.NOT_REGISTERED;throw o+=(0,mt.listMetadataForTarget)(i,n),o+=(0,mt.listRegisteredBindingsForServiceIdentifier)(r,i,qt),new Error(o);case Nn.BindingCount.OnlyOneBindingAvailable:return e;case Nn.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return e;var i=(0,mt.getServiceIdentifierAsString)(t),o=ni.AMBIGUOUS_MATCH+" "+i;throw o+=(0,mt.listRegisteredBindingsForServiceIdentifier)(r,i,qt),new Error(o)}}function Es(t,e,n,r,i,o){var s,u;if(i===null){s=_s(t,e,r,null,o),u=new ii.Request(n,r,null,s,o);var c=new rp.Plan(r,u);r.addPlan(c)}else s=_s(t,e,r,i,o),u=i.addChildRequest(o.serviceIdentifier,s,o);s.forEach(function(a){var l=null;if(o.isArray())l=u.addChildRequest(a.serviceIdentifier,a,o);else{if(a.cache)return;l=u}if(a.type===bs.BindingTypeEnum.Instance&&a.implementationType!==null){var p=(0,ti.getDependencies)(t,a.implementationType);if(!r.container.options.skipBaseClassChecks){var m=(0,ti.getBaseClassDependencyCount)(t,a.implementationType);if(p.length{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.isPromiseOrContainsPromise=yt.isPromise=void 0;function si(t){var e=typeof t=="object"&&t!==null||typeof t=="function";return e&&typeof t.then=="function"}yt.isPromise=si;function up(t){return si(t)?!0:Array.isArray(t)&&t.some(si)}yt.isPromiseOrContainsPromise=up});var xs=g(xe=>{"use strict";var cp=xe&&xe.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function u(l){try{a(r.next(l))}catch(p){s(p)}}function c(l){try{a(r.throw(l))}catch(p){s(p)}}function a(l){l.done?o(l.value):i(l.value).then(u,c)}a((r=r.apply(t,e||[])).next())})},lp=xe&&xe.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(l){return c([a,l])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=a[0]&2?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[a[0]&2,o.value]),a[0]){case 0:case 1:o=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.FactoryType=void 0;var yp;(function(t){t.DynamicValue="toDynamicValue",t.Factory="toFactory",t.Provider="toProvider"})(yp=Wt.FactoryType||(Wt.FactoryType={}))});var ui=g(oe=>{"use strict";var _p=oe&&oe.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),vp=oe&&oe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bp=oe&&oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&_p(e,t,n);return vp(e,t),e};Object.defineProperty(oe,"__esModule",{value:!0});oe.getFactoryDetails=oe.ensureFullyBound=oe.multiBindToService=void 0;var wp=et(),Sp=bp(Y()),Ae=ce(),ai=As(),Tp=function(t){return function(e){return function(){for(var n=[],r=0;r{"use strict";var _t=V&&V.__assign||function(){return _t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]0){var i=Pp(e,n),o=_t(_t({},i),{constr:t});i.isAsync?r=Rp(o):r=Ns(o)}else r=new t;return r}function Ns(t){var e,n=new((e=t.constr).bind.apply(e,Op([void 0],t.constructorInjections,!1)));return t.propertyRequests.forEach(function(r,i){var o=r.target.identifier,s=t.propertyInjections[i];(!r.target.isOptional()||s!==void 0)&&(n[o]=s)}),n}function Rp(t){return Os(this,void 0,void 0,function(){var e,n;return Ps(this,function(r){switch(r.label){case 0:return[4,Cs(t.constructorInjections)];case 1:return e=r.sent(),[4,Cs(t.propertyInjections)];case 2:return n=r.sent(),[2,Ns(_t(_t({},t),{constructorInjections:e,propertyInjections:n}))]}})})}function Cs(t){return Os(this,void 0,void 0,function(){var e,n,r,i;return Ps(this,function(o){for(e=[],n=0,r=t;n{"use strict";var kp=se&&se.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),jp=se&&se.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Fp=se&&se.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&kp(e,t,n);return jp(e,t),e},Up=se&&se.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function u(l){try{a(r.next(l))}catch(p){s(p)}}function c(l){try{a(r.throw(l))}catch(p){s(p)}}function a(l){l.done?o(l.value):i(l.value).then(u,c)}a((r=r.apply(t,e||[])).next())})},qp=se&&se.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(l){return c([a,l])}}function c(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=a[0]&2?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[a[0]&2,o.value]),a[0]){case 0:case 1:o=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]{"use strict";var th=J&&J.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),nh=J&&J.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rh=J&&J.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&th(e,t,n);return nh(e,t),e};Object.defineProperty(J,"__esModule",{value:!0});J.typeConstraint=J.namedConstraint=J.taggedConstraint=J.traverseAncerstors=void 0;var ih=rh(U()),oh=ye(),js=function(t,e){var n=t.parentRequest;return n!==null?e(n)?!0:js(n,e):!1};J.traverseAncerstors=js;var Fs=function(t){return function(e){var n=function(r){return r!==null&&r.target!==null&&r.target.matchesTag(t)(e)};return n.metaData=new oh.Metadata(t,e),n}};J.taggedConstraint=Fs;var sh=Fs(ih.NAMED_TAG);J.namedConstraint=sh;var ah=function(t){return function(e){var n=null;if(e!==null)if(n=e.bindings[0],typeof t=="string"){var r=n.serviceIdentifier;return r===t}else{var i=e.bindings[0].implementationType;return t===i}return!1}};J.typeConstraint=ah});var Bn=g(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.BindingWhenSyntax=void 0;var ee=Ln(),W=gi(),uh=function(){function t(e){this._binding=e}return t.prototype.when=function(e){return this._binding.constraint=e,new ee.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(e){return this._binding.constraint=(0,W.namedConstraint)(e),new ee.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){if(e===null)return!1;var n=e.target!==null&&!e.target.isNamed()&&!e.target.isTagged();return n},new ee.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(e,n){return this._binding.constraint=(0,W.taggedConstraint)(e)(n),new ee.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(n){return n!==null&&(0,W.typeConstraint)(e)(n.parentRequest)},new ee.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(e){return this._binding.constraint=function(n){return n!==null&&(0,W.namedConstraint)(e)(n.parentRequest)},new ee.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(e,n){return this._binding.constraint=function(r){return r!==null&&(0,W.taggedConstraint)(e)(n)(r.parentRequest)},new ee.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(n){return n!==null&&(0,W.traverseAncerstors)(n,(0,W.typeConstraint)(e))},new ee.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(n){return n!==null&&!(0,W.traverseAncerstors)(n,(0,W.typeConstraint)(e))},new ee.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(n){return n!==null&&(0,W.traverseAncerstors)(n,(0,W.namedConstraint)(e))},new ee.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(n){return n!==null&&!(0,W.traverseAncerstors)(n,(0,W.namedConstraint)(e))},new ee.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(e,n){return this._binding.constraint=function(r){return r!==null&&(0,W.traverseAncerstors)(r,(0,W.taggedConstraint)(e)(n))},new ee.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(e,n){return this._binding.constraint=function(r){return r!==null&&!(0,W.traverseAncerstors)(r,(0,W.taggedConstraint)(e)(n))},new ee.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(n){return n!==null&&(0,W.traverseAncerstors)(n,e)},new ee.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(n){return n!==null&&!(0,W.traverseAncerstors)(n,e)},new ee.BindingOnSyntax(this._binding)},t}();Dn.BindingWhenSyntax=uh});var Ln=g(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.BindingOnSyntax=void 0;var Us=Bn(),ch=function(){function t(e){this._binding=e}return t.prototype.onActivation=function(e){return this._binding.onActivation=e,new Us.BindingWhenSyntax(this._binding)},t.prototype.onDeactivation=function(e){return this._binding.onDeactivation=e,new Us.BindingWhenSyntax(this._binding)},t}();kn.BindingOnSyntax=ch});var mi=g(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.BindingWhenOnSyntax=void 0;var lh=Ln(),fh=Bn(),dh=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new fh.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new lh.BindingOnSyntax(this._binding)}return t.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},t.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(e,n){return this._bindingWhenSyntax.whenTargetTagged(e,n)},t.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},t.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},t.prototype.whenParentTagged=function(e,n){return this._bindingWhenSyntax.whenParentTagged(e,n)},t.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},t.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},t.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},t.prototype.whenAnyAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,n)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenNoAncestorTagged(e,n)},t.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},t.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},t.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},t.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},t}();jn.BindingWhenOnSyntax=dh});var qs=g(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.BindingInSyntax=void 0;var yi=ce(),_i=mi(),ph=function(){function t(e){this._binding=e}return t.prototype.inRequestScope=function(){return this._binding.scope=yi.BindingScopeEnum.Request,new _i.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=yi.BindingScopeEnum.Singleton,new _i.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=yi.BindingScopeEnum.Transient,new _i.BindingWhenOnSyntax(this._binding)},t}();Fn.BindingInSyntax=ph});var Gs=g(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.BindingInWhenOnSyntax=void 0;var hh=qs(),gh=Ln(),mh=Bn(),yh=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new mh.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new gh.BindingOnSyntax(this._binding),this._bindingInSyntax=new hh.BindingInSyntax(e)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},t.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(e,n){return this._bindingWhenSyntax.whenTargetTagged(e,n)},t.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},t.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},t.prototype.whenParentTagged=function(e,n){return this._bindingWhenSyntax.whenParentTagged(e,n)},t.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},t.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},t.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},t.prototype.whenAnyAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,n)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,n){return this._bindingWhenSyntax.whenNoAncestorTagged(e,n)},t.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},t.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},t.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},t.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},t}();Un.BindingInWhenOnSyntax=yh});var $s=g(Ce=>{"use strict";var _h=Ce&&Ce.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),vh=Ce&&Ce.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bh=Ce&&Ce.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&_h(e,t,n);return vh(e,t),e};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.BindingToSyntax=void 0;var Ws=bh(Y()),te=ce(),Vs=Gs(),vt=mi(),wh=function(){function t(e){this._binding=e}return t.prototype.to=function(e){return this._binding.type=te.BindingTypeEnum.Instance,this._binding.implementationType=e,new Vs.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+Ws.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},t.prototype.toConstantValue=function(e){return this._binding.type=te.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=te.BindingScopeEnum.Singleton,new vt.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(e){return this._binding.type=te.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new Vs.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(e){return this._binding.type=te.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=te.BindingScopeEnum.Singleton,new vt.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(e){return this._binding.type=te.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=te.BindingScopeEnum.Singleton,new vt.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(e){if(typeof e!="function")throw new Error(Ws.INVALID_FUNCTION_BINDING);var n=this.toConstantValue(e);return this._binding.type=te.BindingTypeEnum.Function,this._binding.scope=te.BindingScopeEnum.Singleton,n},t.prototype.toAutoFactory=function(e){return this._binding.type=te.BindingTypeEnum.Factory,this._binding.factory=function(n){var r=function(){return n.container.get(e)};return r},this._binding.scope=te.BindingScopeEnum.Singleton,new vt.BindingWhenOnSyntax(this._binding)},t.prototype.toAutoNamedFactory=function(e){return this._binding.type=te.BindingTypeEnum.Factory,this._binding.factory=function(n){return function(r){return n.container.getNamed(e,r)}},new vt.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(e){return this._binding.type=te.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=te.BindingScopeEnum.Singleton,new vt.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(e){this.toDynamicValue(function(n){return n.container.get(e)})},t}();Ce.BindingToSyntax=wh});var Hs=g(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.ContainerSnapshot=void 0;var Sh=function(){function t(){}return t.of=function(e,n,r,i,o){var s=new t;return s.bindings=e,s.middleware=n,s.deactivations=i,s.activations=r,s.moduleActivationStore=o,s},t}();qn.ContainerSnapshot=Sh});var Ks=g(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.isClonable=void 0;function Th(t){return typeof t=="object"&&t!==null&&"clone"in t&&typeof t.clone=="function"}Gn.isClonable=Th});var vi=g(Ie=>{"use strict";var Eh=Ie&&Ie.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),xh=Ie&&Ie.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ah=Ie&&Ie.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Eh(e,t,n);return xh(e,t),e};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Lookup=void 0;var tt=Ah(Y()),Ch=Ks(),Ih=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(e,n){if(e==null)throw new Error(tt.NULL_ARGUMENT);if(n==null)throw new Error(tt.NULL_ARGUMENT);var r=this._map.get(e);r!==void 0?r.push(n):this._map.set(e,[n])},t.prototype.get=function(e){if(e==null)throw new Error(tt.NULL_ARGUMENT);var n=this._map.get(e);if(n!==void 0)return n;throw new Error(tt.KEY_NOT_FOUND)},t.prototype.remove=function(e){if(e==null)throw new Error(tt.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(tt.KEY_NOT_FOUND)},t.prototype.removeIntersection=function(e){var n=this;this.traverse(function(r,i){var o=e.hasKey(r)?e.get(r):void 0;if(o!==void 0){var s=i.filter(function(u){return!o.some(function(c){return u===c})});n._setValue(r,s)}})},t.prototype.removeByCondition=function(e){var n=this,r=[];return this._map.forEach(function(i,o){for(var s=[],u=0,c=i;u0?this._map.set(e,n):this._map.delete(e)},t}();Ie.Lookup=Ih});var zs=g(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.ModuleActivationStore=void 0;var Ys=vi(),Oh=function(){function t(){this._map=new Map}return t.prototype.remove=function(e){if(this._map.has(e)){var n=this._map.get(e);return this._map.delete(e),n}return this._getEmptyHandlersStore()},t.prototype.addDeactivation=function(e,n,r){this._getModuleActivationHandlers(e).onDeactivations.add(n,r)},t.prototype.addActivation=function(e,n,r){this._getModuleActivationHandlers(e).onActivations.add(n,r)},t.prototype.clone=function(){var e=new t;return this._map.forEach(function(n,r){e._map.set(r,{onActivations:n.onActivations.clone(),onDeactivations:n.onDeactivations.clone()})}),e},t.prototype._getModuleActivationHandlers=function(e){var n=this._map.get(e);return n===void 0&&(n=this._getEmptyHandlersStore(),this._map.set(e,n)),n},t.prototype._getEmptyHandlersStore=function(){var e={onActivations:new Ys.Lookup,onDeactivations:new Ys.Lookup};return e},t}();Wn.ModuleActivationStore=Oh});var Xs=g($=>{"use strict";var $n=$&&$.__assign||function(){return $n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.AsyncContainerModule=wt.ContainerModule=void 0;var Qs=ze(),Gh=function(){function t(e){this.id=(0,Qs.id)(),this.registry=e}return t}();wt.ContainerModule=Gh;var Wh=function(){function t(e){this.id=(0,Qs.id)(),this.registry=e}return t}();wt.AsyncContainerModule=Wh});var ea=g(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.getFirstArrayDuplicate=void 0;function Vh(t){for(var e=new Set,n=0,r=t;n{"use strict";var $h=X&&X.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Hh=X&&X.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),na=X&&X.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&$h(e,t,n);return Hh(e,t),e};Object.defineProperty(X,"__esModule",{value:!0});X.createTaggedDecorator=X.tagProperty=X.tagParameter=X.decorate=void 0;var Kn=na(Y()),ra=na(U()),Kh=ea();function Yh(t){return t.prototype!==void 0}function zh(t){if(t!==void 0)throw new Error(Kn.INVALID_DECORATOR_OPERATION)}function ia(t,e,n,r){zh(e),sa(ra.TAGGED,t,n.toString(),r)}X.tagParameter=ia;function oa(t,e,n){if(Yh(t))throw new Error(Kn.INVALID_DECORATOR_OPERATION);sa(ra.TAGGED_PROP,t.constructor,e,n)}X.tagProperty=oa;function Jh(t){var e=[];if(Array.isArray(t)){e=t;var n=(0,Kh.getFirstArrayDuplicate)(e.map(function(r){return r.key}));if(n!==void 0)throw new Error(Kn.DUPLICATED_METADATA+" "+n.toString())}else e=[t];return e}function sa(t,e,n,r){var i=Jh(r),o={};Reflect.hasOwnMetadata(t,e)&&(o=Reflect.getMetadata(t,e));var s=o[n];if(s===void 0)s=[];else for(var u=function(p){if(i.some(function(m){return m.key===p.key}))throw new Error(Kn.DUPLICATED_METADATA+" "+p.key.toString())},c=0,a=s;c{"use strict";var eg=Oe&&Oe.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),tg=Oe&&Oe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),aa=Oe&&Oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&eg(e,t,n);return tg(e,t),e};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.injectable=void 0;var ng=aa(Y()),bi=aa(U());function rg(){return function(t){if(Reflect.hasOwnMetadata(bi.PARAM_TYPES,t))throw new Error(ng.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(bi.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(bi.PARAM_TYPES,e,t),t}}Oe.injectable=rg});var ca=g(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.tagged=void 0;var ig=ye(),og=We();function sg(t,e){return(0,og.createTaggedDecorator)(new ig.Metadata(t,e))}Yn.tagged=sg});var la=g(Pe=>{"use strict";var ag=Pe&&Pe.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ug=Pe&&Pe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cg=Pe&&Pe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&ag(e,t,n);return ug(e,t),e};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.named=void 0;var lg=cg(U()),fg=ye(),dg=We();function pg(t){return(0,dg.createTaggedDecorator)(new fg.Metadata(lg.NAMED_TAG,t))}Pe.named=pg});var wi=g(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.injectBase=void 0;var hg=Y(),gg=ye(),mg=We();function yg(t){return function(e){return function(n,r,i){if(e===void 0){var o=typeof n=="function"?n.name:n.constructor.name;throw new Error((0,hg.UNDEFINED_INJECT_ANNOTATION)(o))}return(0,mg.createTaggedDecorator)(new gg.Metadata(t,e))(n,r,i)}}}zn.injectBase=yg});var fa=g(Ne=>{"use strict";var _g=Ne&&Ne.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),vg=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bg=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&_g(e,t,n);return vg(e,t),e};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.inject=void 0;var wg=bg(U()),Sg=wi(),Tg=(0,Sg.injectBase)(wg.INJECT_TAG);Ne.inject=Tg});var da=g(Re=>{"use strict";var Eg=Re&&Re.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),xg=Re&&Re.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ag=Re&&Re.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Eg(e,t,n);return xg(e,t),e};Object.defineProperty(Re,"__esModule",{value:!0});Re.optional=void 0;var Cg=Ag(U()),Ig=ye(),Og=We();function Pg(){return(0,Og.createTaggedDecorator)(new Ig.Metadata(Cg.OPTIONAL_TAG,!0))}Re.optional=Pg});var pa=g(Me=>{"use strict";var Ng=Me&&Me.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Rg=Me&&Me.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Mg=Me&&Me.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Ng(e,t,n);return Rg(e,t),e};Object.defineProperty(Me,"__esModule",{value:!0});Me.unmanaged=void 0;var Dg=Mg(U()),Bg=ye(),Lg=We();function kg(){return function(t,e,n){var r=new Bg.Metadata(Dg.UNMANAGED_TAG,!0);(0,Lg.tagParameter)(t,e,n,r)}}Me.unmanaged=kg});var ha=g(De=>{"use strict";var jg=De&&De.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Fg=De&&De.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ug=De&&De.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&jg(e,t,n);return Fg(e,t),e};Object.defineProperty(De,"__esModule",{value:!0});De.multiInject=void 0;var qg=Ug(U()),Gg=wi(),Wg=(0,Gg.injectBase)(qg.MULTI_INJECT_TAG);De.multiInject=Wg});var ga=g(Be=>{"use strict";var Vg=Be&&Be.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),$g=Be&&Be.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Hg=Be&&Be.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Vg(e,t,n);return $g(e,t),e};Object.defineProperty(Be,"__esModule",{value:!0});Be.targetName=void 0;var Kg=Hg(U()),Yg=ye(),zg=We();function Jg(t){return function(e,n,r){var i=new Yg.Metadata(Kg.NAME_TAG,t);(0,zg.tagParameter)(e,n,r,i)}}Be.targetName=Jg});var Si=g(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.propertyEventDecorator=void 0;var Xg=ye();function Qg(t,e){return function(){return function(n,r){var i=new Xg.Metadata(t,r);if(Reflect.hasOwnMetadata(t,n.constructor))throw new Error(e);Reflect.defineMetadata(t,i,n.constructor)}}}Jn.propertyEventDecorator=Qg});var ya=g(Le=>{"use strict";var Zg=Le&&Le.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),em=Le&&Le.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ma=Le&&Le.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Zg(e,t,n);return em(e,t),e};Object.defineProperty(Le,"__esModule",{value:!0});Le.postConstruct=void 0;var tm=ma(Y()),nm=ma(U()),rm=Si(),im=(0,rm.propertyEventDecorator)(nm.POST_CONSTRUCT,tm.MULTIPLE_POST_CONSTRUCT_METHODS);Le.postConstruct=im});var va=g(ke=>{"use strict";var om=ke&&ke.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),sm=ke&&ke.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_a=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&om(e,t,n);return sm(e,t),e};Object.defineProperty(ke,"__esModule",{value:!0});ke.preDestroy=void 0;var am=_a(Y()),um=_a(U()),cm=Si(),lm=(0,cm.propertyEventDecorator)(um.PRE_DESTROY,am.MULTIPLE_PRE_DESTROY_METHODS);ke.preDestroy=lm});var ba=g(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.interfaces=void 0;var Ti;Ti||(Ti={});Xn.interfaces=Ti});var xi=g(v=>{"use strict";var fm=v&&v.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),dm=v&&v.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pm=v&&v.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&fm(e,t,n);return dm(e,t),e};Object.defineProperty(v,"__esModule",{value:!0});v.multiBindToService=v.getServiceIdentifierAsString=v.typeConstraint=v.namedConstraint=v.taggedConstraint=v.traverseAncerstors=v.decorate=v.interfaces=v.id=v.MetadataReader=v.preDestroy=v.postConstruct=v.targetName=v.multiInject=v.unmanaged=v.optional=v.LazyServiceIdentifer=v.LazyServiceIdentifier=v.inject=v.named=v.tagged=v.injectable=v.createTaggedDecorator=v.ContainerModule=v.AsyncContainerModule=v.TargetTypeEnum=v.BindingTypeEnum=v.BindingScopeEnum=v.Container=v.METADATA_KEY=void 0;var hm=pm(U());v.METADATA_KEY=hm;var gm=Xs();Object.defineProperty(v,"Container",{enumerable:!0,get:function(){return gm.Container}});var Ei=ce();Object.defineProperty(v,"BindingScopeEnum",{enumerable:!0,get:function(){return Ei.BindingScopeEnum}});Object.defineProperty(v,"BindingTypeEnum",{enumerable:!0,get:function(){return Ei.BindingTypeEnum}});Object.defineProperty(v,"TargetTypeEnum",{enumerable:!0,get:function(){return Ei.TargetTypeEnum}});var wa=Zs();Object.defineProperty(v,"AsyncContainerModule",{enumerable:!0,get:function(){return wa.AsyncContainerModule}});Object.defineProperty(v,"ContainerModule",{enumerable:!0,get:function(){return wa.ContainerModule}});var mm=We();Object.defineProperty(v,"createTaggedDecorator",{enumerable:!0,get:function(){return mm.createTaggedDecorator}});var ym=ua();Object.defineProperty(v,"injectable",{enumerable:!0,get:function(){return ym.injectable}});var _m=ca();Object.defineProperty(v,"tagged",{enumerable:!0,get:function(){return _m.tagged}});var vm=la();Object.defineProperty(v,"named",{enumerable:!0,get:function(){return vm.named}});var bm=fa();Object.defineProperty(v,"inject",{enumerable:!0,get:function(){return bm.inject}});var wm=Cn();Object.defineProperty(v,"LazyServiceIdentifier",{enumerable:!0,get:function(){return wm.LazyServiceIdentifier}});var Sm=Cn();Object.defineProperty(v,"LazyServiceIdentifer",{enumerable:!0,get:function(){return Sm.LazyServiceIdentifier}});var Tm=da();Object.defineProperty(v,"optional",{enumerable:!0,get:function(){return Tm.optional}});var Em=pa();Object.defineProperty(v,"unmanaged",{enumerable:!0,get:function(){return Em.unmanaged}});var xm=ha();Object.defineProperty(v,"multiInject",{enumerable:!0,get:function(){return xm.multiInject}});var Am=ga();Object.defineProperty(v,"targetName",{enumerable:!0,get:function(){return Am.targetName}});var Cm=ya();Object.defineProperty(v,"postConstruct",{enumerable:!0,get:function(){return Cm.postConstruct}});var Im=va();Object.defineProperty(v,"preDestroy",{enumerable:!0,get:function(){return Im.preDestroy}});var Om=Jr();Object.defineProperty(v,"MetadataReader",{enumerable:!0,get:function(){return Om.MetadataReader}});var Pm=ze();Object.defineProperty(v,"id",{enumerable:!0,get:function(){return Pm.id}});var Nm=ba();Object.defineProperty(v,"interfaces",{enumerable:!0,get:function(){return Nm.interfaces}});var Rm=We();Object.defineProperty(v,"decorate",{enumerable:!0,get:function(){return Rm.decorate}});var Qn=gi();Object.defineProperty(v,"traverseAncerstors",{enumerable:!0,get:function(){return Qn.traverseAncerstors}});Object.defineProperty(v,"taggedConstraint",{enumerable:!0,get:function(){return Qn.taggedConstraint}});Object.defineProperty(v,"namedConstraint",{enumerable:!0,get:function(){return Qn.namedConstraint}});Object.defineProperty(v,"typeConstraint",{enumerable:!0,get:function(){return Qn.typeConstraint}});var Mm=et();Object.defineProperty(v,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return Mm.getServiceIdentifierAsString}});var Dm=ui();Object.defineProperty(v,"multiBindToService",{enumerable:!0,get:function(){return Dm.multiBindToService}})});var Da=g((uT,Ma)=>{"use strict";var{Duplex:Hm}=I("stream");function Na(t){t.emit("close")}function Km(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ra(t){this.removeListener("error",Ra),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function Ym(t,e){let n=!0,r=new Hm({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(o,s){let u=!s&&r._readableState.objectMode?o.toString():o;r.push(u)||t.pause()}),t.once("error",function(o){r.destroyed||(n=!1,r.destroy(o))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,o){if(t.readyState===t.CLOSED){o(i),process.nextTick(Na,r);return}let s=!1;t.once("error",function(c){s=!0,o(c)}),t.once("close",function(){s||o(i),process.nextTick(Na,r)}),n&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,o,s){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,o,s)});return}t.send(i,s)},r.on("end",Km),r.on("error",Ra),r}Ma.exports=Ym});var Je=g((cT,Ba)=>{"use strict";Ba.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Ht=g((lT,or)=>{"use strict";var{EMPTY_BUFFER:zm}=Je(),Ni=Buffer[Symbol.species];function Jm(t,e){if(t.length===0)return zm;if(t.length===1)return t[0];let n=Buffer.allocUnsafe(e),r=0;for(let i=0;i{"use strict";var ja=Symbol("kDone"),Mi=Symbol("kRun"),Di=class{constructor(e){this[ja]=()=>{this.pending--,this[Mi]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Mi]()}[Mi](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[ja])}}};Fa.exports=Di});var zt=g((dT,Va)=>{"use strict";var Kt=I("zlib"),qa=Ht(),Qm=Ua(),{kStatusCode:Ga}=Je(),Zm=Buffer[Symbol.species],ey=Buffer.from([0,0,255,255]),ur=Symbol("permessage-deflate"),Ve=Symbol("total-length"),Yt=Symbol("callback"),Xe=Symbol("buffers"),ar=Symbol("error"),sr,Bi=class{constructor(e,n,r){if(this._maxPayload=r|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!n,this._deflate=null,this._inflate=null,this.params=null,!sr){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;sr=new Qm(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Yt];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let n=this._options,r=e.find(i=>!(n.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(n.serverMaxWindowBits===!1||typeof n.serverMaxWindowBits=="number"&&n.serverMaxWindowBits>i.server_max_window_bits)||typeof n.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return n.serverNoContextTakeover&&(r.server_no_context_takeover=!0),n.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof n.serverMaxWindowBits=="number"&&(r.server_max_window_bits=n.serverMaxWindowBits),typeof n.clientMaxWindowBits=="number"?r.client_max_window_bits=n.clientMaxWindowBits:(r.client_max_window_bits===!0||n.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let n=e[0];if(this._options.clientNoContextTakeover===!1&&n.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!n.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(n.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&n.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return n}normalizeParams(e){return e.forEach(n=>{Object.keys(n).forEach(r=>{let i=n[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let o=+i;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let o=+i;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=o}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);n[r]=i})}),e}decompress(e,n,r){sr.add(i=>{this._decompress(e,n,(o,s)=>{i(),r(o,s)})})}compress(e,n,r){sr.add(i=>{this._compress(e,n,(o,s)=>{i(),r(o,s)})})}_decompress(e,n,r){let i=this._isServer?"client":"server";if(!this._inflate){let o=`${i}_max_window_bits`,s=typeof this.params[o]!="number"?Kt.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=Kt.createInflateRaw({...this._options.zlibInflateOptions,windowBits:s}),this._inflate[ur]=this,this._inflate[Ve]=0,this._inflate[Xe]=[],this._inflate.on("error",ny),this._inflate.on("data",Wa)}this._inflate[Yt]=r,this._inflate.write(e),n&&this._inflate.write(ey),this._inflate.flush(()=>{let o=this._inflate[ar];if(o){this._inflate.close(),this._inflate=null,r(o);return}let s=qa.concat(this._inflate[Xe],this._inflate[Ve]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Ve]=0,this._inflate[Xe]=[],n&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,s)})}_compress(e,n,r){let i=this._isServer?"server":"client";if(!this._deflate){let o=`${i}_max_window_bits`,s=typeof this.params[o]!="number"?Kt.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=Kt.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:s}),this._deflate[Ve]=0,this._deflate[Xe]=[],this._deflate.on("data",ty)}this._deflate[Yt]=r,this._deflate.write(e),this._deflate.flush(Kt.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=qa.concat(this._deflate[Xe],this._deflate[Ve]);n&&(o=new Zm(o.buffer,o.byteOffset,o.length-4)),this._deflate[Yt]=null,this._deflate[Ve]=0,this._deflate[Xe]=[],n&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,o)})}};Va.exports=Bi;function ty(t){this[Xe].push(t),this[Ve]+=t.length}function Wa(t){if(this[Ve]+=t.length,this[ur]._maxPayload<1||this[Ve]<=this[ur]._maxPayload){this[Xe].push(t);return}this[ar]=new RangeError("Max payload size exceeded"),this[ar].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ar][Ga]=1009,this.removeListener("data",Wa),this.reset()}function ny(t){this[ur]._inflate=null,t[Ga]=1007,this[Yt](t)}});var Jt=g((pT,cr)=>{"use strict";var{isUtf8:$a}=I("buffer"),ry=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function iy(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Li(t){let e=t.length,n=0;for(;n=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||t[n]===224&&(t[n+1]&224)===128||t[n]===237&&(t[n+1]&224)===160)return!1;n+=3}else if((t[n]&248)===240){if(n+3>=e||(t[n+1]&192)!==128||(t[n+2]&192)!==128||(t[n+3]&192)!==128||t[n]===240&&(t[n+1]&240)===128||t[n]===244&&t[n+1]>143||t[n]>244)return!1;n+=4}else return!1;return!0}cr.exports={isValidStatusCode:iy,isValidUTF8:Li,tokenChars:ry};if($a)cr.exports.isValidUTF8=function(t){return t.length<24?Li(t):$a(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=I("utf-8-validate");cr.exports.isValidUTF8=function(e){return e.length<32?Li(e):t(e)}}catch{}});var qi=g((hT,Qa)=>{"use strict";var{Writable:oy}=I("stream"),Ha=zt(),{BINARY_TYPES:sy,EMPTY_BUFFER:Ka,kStatusCode:ay,kWebSocket:uy}=Je(),{concat:ki,toArrayBuffer:cy,unmask:ly}=Ht(),{isValidStatusCode:fy,isValidUTF8:Ya}=Jt(),lr=Buffer[Symbol.species],he=0,za=1,Ja=2,Xa=3,ji=4,Fi=5,fr=6,Ui=class extends oy{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||sy[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[uy]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=he}_write(e,n,r){if(this._opcode===8&&this._state==he)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e=r.length?n.set(this._buffers.shift(),i):(n.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new lr(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return n}startLoop(e){this._loop=!0;do switch(this._state){case he:this.getInfo(e);break;case za:this.getPayloadLength16(e);break;case Ja:this.getPayloadLength64(e);break;case Xa:this.getMask();break;case ji:this.getData(e);break;case Fi:case fr:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let n=this.consume(2);if(n[0]&48){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(n[0]&64)===64;if(r&&!this._extensions[Ha.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(n[0]&128)===128,this._opcode=n[0]&15,this._payloadLength=n[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(n[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=za:this._payloadLength===127?this._state=Ja:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let n=this.consume(8),r=n.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+n.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let n=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(n);return}this._masked?this._state=Xa:this._state=ji}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ji}getData(e){let n=Ka;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(n,e);return}if(this._compressed){this._state=Fi,this.decompress(n,e);return}n.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(n)),this.dataMessage(e)}decompress(e,n){this._extensions[Ha.extensionName].decompress(e,this._fin,(i,o)=>{if(i)return n(i);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");n(s);return}this._fragments.push(o)}this.dataMessage(n),this._state===he&&this.startLoop(n)})}dataMessage(e){if(!this._fin){this._state=he;return}let n=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=ki(r,n):this._binaryType==="arraybuffer"?i=cy(ki(r,n)):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=he):(this._state=fr,setImmediate(()=>{this.emit("message",i,!0),this._state=he,this.startLoop(e)}))}else{let i=ki(r,n);if(!this._skipUTF8Validation&&!Ya(i)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(o);return}this._state===Fi||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=he):(this._state=fr,setImmediate(()=>{this.emit("message",i,!1),this._state=he,this.startLoop(e)}))}}controlMessage(e,n){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Ka),this.end();else{let r=e.readUInt16BE(0);if(!fy(r)){let o=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");n(o);return}let i=new lr(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Ya(i)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");n(o);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=he;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=he):(this._state=fr,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=he,this.startLoop(n)}))}createError(e,n,r,i,o){this._loop=!1,this._errored=!0;let s=new e(r?`Invalid WebSocket frame: ${n}`:n);return Error.captureStackTrace(s,this.createError),s.code=o,s[ay]=i,s}};Qa.exports=Ui});var Wi=g((mT,tu)=>{"use strict";var{Duplex:gT}=I("stream"),{randomFillSync:dy}=I("crypto"),Za=zt(),{EMPTY_BUFFER:py}=Je(),{isValidStatusCode:hy}=Jt(),{mask:eu,toBuffer:Et}=Ht(),ve=Symbol("kByteLength"),gy=Buffer.alloc(4),dr=8*1024,it,xt=dr,Gi=class t{constructor(e,n,r){this._extensions=n||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,n){let r,i=!1,o=2,s=!1;n.mask&&(r=n.maskBuffer||gy,n.generateMask?n.generateMask(r):(xt===dr&&(it===void 0&&(it=Buffer.alloc(dr)),dy(it,0,dr),xt=0),r[0]=it[xt++],r[1]=it[xt++],r[2]=it[xt++],r[3]=it[xt++]),s=(r[0]|r[1]|r[2]|r[3])===0,o=6);let u;typeof e=="string"?(!n.mask||s)&&n[ve]!==void 0?u=n[ve]:(e=Buffer.from(e),u=e.length):(u=e.length,i=n.mask&&n.readOnly&&!s);let c=u;u>=65536?(o+=8,c=127):u>125&&(o+=2,c=126);let a=Buffer.allocUnsafe(i?u+o:o);return a[0]=n.fin?n.opcode|128:n.opcode,n.rsv1&&(a[0]|=64),a[1]=c,c===126?a.writeUInt16BE(u,2):c===127&&(a[2]=a[3]=0,a.writeUIntBE(u,4,6)),n.mask?(a[1]|=128,a[o-4]=r[0],a[o-3]=r[1],a[o-2]=r[2],a[o-1]=r[3],s?[a,e]:i?(eu(e,r,a,o,u),[a]):(eu(e,r,e,0,u),[a,e])):[a,e]}close(e,n,r,i){let o;if(e===void 0)o=py;else{if(typeof e!="number"||!hy(e))throw new TypeError("First argument must be a valid error code number");if(n===void 0||!n.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0);else{let u=Buffer.byteLength(n);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+u),o.writeUInt16BE(e,0),typeof n=="string"?o.write(n,2):o.set(n,2)}}let s={[ve]:o.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,s,i]):this.sendFrame(t.frame(o,s),i)}ping(e,n,r){let i,o;if(typeof e=="string"?(i=Buffer.byteLength(e),o=!1):(e=Et(e),i=e.length,o=Et.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[ve]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,s,r]):this.sendFrame(t.frame(e,s),r)}pong(e,n,r){let i,o;if(typeof e=="string"?(i=Buffer.byteLength(e),o=!1):(e=Et(e),i=e.length,o=Et.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[ve]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,s,r]):this.sendFrame(t.frame(e,s),r)}send(e,n,r){let i=this._extensions[Za.extensionName],o=n.binary?2:1,s=n.compress,u,c;if(typeof e=="string"?(u=Buffer.byteLength(e),c=!1):(e=Et(e),u=e.length,c=Et.readOnly),this._firstFragment?(this._firstFragment=!1,s&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=u>=i._threshold),this._compress=s):(s=!1,o=0),n.fin&&(this._firstFragment=!0),i){let a={[ve]:u,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:c,rsv1:s};this._deflating?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}else this.sendFrame(t.frame(e,{[ve]:u,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:c,rsv1:!1}),r)}dispatch(e,n,r,i){if(!n){this.sendFrame(t.frame(e,r),i);return}let o=this._extensions[Za.extensionName];this._bufferedBytes+=r[ve],this._deflating=!0,o.compress(e,r.fin,(s,u)=>{if(this._socket.destroyed){let c=new Error("The socket was closed while data was being compressed");typeof i=="function"&&i(c);for(let a=0;a{"use strict";var{kForOnEventAttribute:Xt,kListener:Vi}=Je(),nu=Symbol("kCode"),ru=Symbol("kData"),iu=Symbol("kError"),ou=Symbol("kMessage"),su=Symbol("kReason"),At=Symbol("kTarget"),au=Symbol("kType"),uu=Symbol("kWasClean"),$e=class{constructor(e){this[At]=null,this[au]=e}get target(){return this[At]}get type(){return this[au]}};Object.defineProperty($e.prototype,"target",{enumerable:!0});Object.defineProperty($e.prototype,"type",{enumerable:!0});var ot=class extends $e{constructor(e,n={}){super(e),this[nu]=n.code===void 0?0:n.code,this[su]=n.reason===void 0?"":n.reason,this[uu]=n.wasClean===void 0?!1:n.wasClean}get code(){return this[nu]}get reason(){return this[su]}get wasClean(){return this[uu]}};Object.defineProperty(ot.prototype,"code",{enumerable:!0});Object.defineProperty(ot.prototype,"reason",{enumerable:!0});Object.defineProperty(ot.prototype,"wasClean",{enumerable:!0});var Ct=class extends $e{constructor(e,n={}){super(e),this[iu]=n.error===void 0?null:n.error,this[ou]=n.message===void 0?"":n.message}get error(){return this[iu]}get message(){return this[ou]}};Object.defineProperty(Ct.prototype,"error",{enumerable:!0});Object.defineProperty(Ct.prototype,"message",{enumerable:!0});var Qt=class extends $e{constructor(e,n={}){super(e),this[ru]=n.data===void 0?null:n.data}get data(){return this[ru]}};Object.defineProperty(Qt.prototype,"data",{enumerable:!0});var my={addEventListener(t,e,n={}){for(let i of this.listeners(t))if(!n[Xt]&&i[Vi]===e&&!i[Xt])return;let r;if(t==="message")r=function(o,s){let u=new Qt("message",{data:s?o:o.toString()});u[At]=this,pr(e,this,u)};else if(t==="close")r=function(o,s){let u=new ot("close",{code:o,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[At]=this,pr(e,this,u)};else if(t==="error")r=function(o){let s=new Ct("error",{error:o,message:o.message});s[At]=this,pr(e,this,s)};else if(t==="open")r=function(){let o=new $e("open");o[At]=this,pr(e,this,o)};else return;r[Xt]=!!n[Xt],r[Vi]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let n of this.listeners(t))if(n[Vi]===e&&!n[Xt]){this.removeListener(t,n);break}}};cu.exports={CloseEvent:ot,ErrorEvent:Ct,Event:$e,EventTarget:my,MessageEvent:Qt};function pr(t,e,n){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}});var $i=g((_T,fu)=>{"use strict";var{tokenChars:Zt}=Jt();function je(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}function yy(t){let e=Object.create(null),n=Object.create(null),r=!1,i=!1,o=!1,s,u,c=-1,a=-1,l=-1,p=0;for(;p{let n=t[e];return Array.isArray(n)||(n=[n]),n.map(r=>[e].concat(Object.keys(r).map(i=>{let o=r[i];return Array.isArray(o)||(o=[o]),o.map(s=>s===!0?i:`${i}=${s}`).join("; ")})).join("; ")).join(", ")}).join(", ")}fu.exports={format:_y,parse:yy}});var Ji=g((wT,Su)=>{"use strict";var vy=I("events"),by=I("https"),wy=I("http"),hu=I("net"),Sy=I("tls"),{randomBytes:Ty,createHash:Ey}=I("crypto"),{Duplex:vT,Readable:bT}=I("stream"),{URL:Hi}=I("url"),Qe=zt(),xy=qi(),Ay=Wi(),{BINARY_TYPES:du,EMPTY_BUFFER:hr,GUID:Cy,kForOnEventAttribute:Ki,kListener:Iy,kStatusCode:Oy,kWebSocket:Q,NOOP:gu}=Je(),{EventTarget:{addEventListener:Py,removeEventListener:Ny}}=lu(),{format:Ry,parse:My}=$i(),{toBuffer:Dy}=Ht(),By=30*1e3,mu=Symbol("kAborted"),Yi=[8,13],He=["CONNECTING","OPEN","CLOSING","CLOSED"],Ly=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,j=class t extends vy{constructor(e,n,r){super(),this._binaryType=du[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=hr,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n=="object"&&n!==null?(r=n,n=[]):n=[n]),yu(this,e,n,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){du.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,n,r){let i=new xy({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new Ay(e,this._extensions,r.generateMask),this._receiver=i,this._socket=e,i[Q]=this,e[Q]=this,i.on("conclude",Fy),i.on("drain",Uy),i.on("error",qy),i.on("message",Gy),i.on("ping",Wy),i.on("pong",Vy),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),n.length>0&&e.unshift(n),e.on("close",vu),e.on("data",mr),e.on("end",bu),e.on("error",wu),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Qe.extensionName]&&this._extensions[Qe.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,n){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){ae(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,n,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),By)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,n,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){zi(this,e,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(e||hr,n,r)}pong(e,n,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){zi(this,e,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(e||hr,n,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,n,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof n=="function"&&(r=n,n={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){zi(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[Qe.extensionName]||(i.compress=!1),this._sender.send(e||hr,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){ae(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(j,"CONNECTING",{enumerable:!0,value:He.indexOf("CONNECTING")});Object.defineProperty(j.prototype,"CONNECTING",{enumerable:!0,value:He.indexOf("CONNECTING")});Object.defineProperty(j,"OPEN",{enumerable:!0,value:He.indexOf("OPEN")});Object.defineProperty(j.prototype,"OPEN",{enumerable:!0,value:He.indexOf("OPEN")});Object.defineProperty(j,"CLOSING",{enumerable:!0,value:He.indexOf("CLOSING")});Object.defineProperty(j.prototype,"CLOSING",{enumerable:!0,value:He.indexOf("CLOSING")});Object.defineProperty(j,"CLOSED",{enumerable:!0,value:He.indexOf("CLOSED")});Object.defineProperty(j.prototype,"CLOSED",{enumerable:!0,value:He.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(j.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(j.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Ki])return e[Iy];return null},set(e){for(let n of this.listeners(t))if(n[Ki]){this.removeListener(t,n);break}typeof e=="function"&&this.addEventListener(t,e,{[Ki]:!0})}})});j.prototype.addEventListener=Py;j.prototype.removeEventListener=Ny;Su.exports=j;function yu(t,e,n,r){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Yi[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,!Yi.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Yi.join(", ")})`);let o;if(e instanceof Hi)o=e;else try{o=new Hi(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),t._url=o.href;let s=o.protocol==="wss:",u=o.protocol==="ws+unix:",c;if(o.protocol!=="ws:"&&!s&&!u?c=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:u&&!o.pathname?c="The URL's pathname is empty":o.hash&&(c="The URL contains a fragment identifier"),c){let w=new SyntaxError(c);if(t._redirects===0)throw w;gr(t,w);return}let a=s?443:80,l=Ty(16).toString("base64"),p=s?by.request:wy.request,m=new Set,b;if(i.createConnection=i.createConnection||(s?jy:ky),i.defaultPort=i.defaultPort||a,i.port=o.port||a,i.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},i.path=o.pathname+o.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(b=new Qe(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=Ry({[Qe.extensionName]:b.offer()})),n.length){for(let w of n){if(typeof w!="string"||!Ly.test(w)||m.has(w))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(w)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(o.username||o.password)&&(i.auth=`${o.username}:${o.password}`),u){let w=i.path.split(":");i.socketPath=w[0],i.path=w[1]}let T;if(i.followRedirects){if(t._redirects===0){t._originalIpc=u,t._originalSecure=s,t._originalHostOrSocketPath=u?i.socketPath:o.host;let w=r&&r.headers;if(r={...r,headers:{}},w)for(let[R,K]of Object.entries(w))r.headers[R.toLowerCase()]=K}else if(t.listenerCount("redirect")===0){let w=u?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:o.host===t._originalHostOrSocketPath;(!w||t._originalSecure&&!s)&&(delete i.headers.authorization,delete i.headers.cookie,w||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),T=t._req=p(i),t._redirects&&t.emit("redirect",t.url,T)}else T=t._req=p(i);i.timeout&&T.on("timeout",()=>{ae(t,T,"Opening handshake has timed out")}),T.on("error",w=>{T===null||T[mu]||(T=t._req=null,gr(t,w))}),T.on("response",w=>{let R=w.headers.location,K=w.statusCode;if(R&&i.followRedirects&&K>=300&&K<400){if(++t._redirects>i.maxRedirects){ae(t,T,"Maximum redirects exceeded");return}T.abort();let ue;try{ue=new Hi(R,e)}catch{let ge=new SyntaxError(`Invalid URL: ${R}`);gr(t,ge);return}yu(t,ue,n,r)}else t.emit("unexpected-response",T,w)||ae(t,T,`Unexpected server response: ${w.statusCode}`)}),T.on("upgrade",(w,R,K)=>{if(t.emit("upgrade",w),t.readyState!==j.CONNECTING)return;T=t._req=null;let ue=w.headers.upgrade;if(ue===void 0||ue.toLowerCase()!=="websocket"){ae(t,R,"Invalid Upgrade header");return}let pt=Ey("sha1").update(l+Cy).digest("base64");if(w.headers["sec-websocket-accept"]!==pt){ae(t,R,"Invalid Sec-WebSocket-Accept header");return}let ge=w.headers["sec-websocket-protocol"],be;if(ge!==void 0?m.size?m.has(ge)||(be="Server sent an invalid subprotocol"):be="Server sent a subprotocol but none was requested":m.size&&(be="Server sent no subprotocol"),be){ae(t,R,be);return}ge&&(t._protocol=ge);let Ze=w.headers["sec-websocket-extensions"];if(Ze!==void 0){if(!b){ae(t,R,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Ke;try{Ke=My(Ze)}catch{ae(t,R,"Invalid Sec-WebSocket-Extensions header");return}let vn=Object.keys(Ke);if(vn.length!==1||vn[0]!==Qe.extensionName){ae(t,R,"Server indicated an extension that was not requested");return}try{b.accept(Ke[Qe.extensionName])}catch{ae(t,R,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Qe.extensionName]=b}t.setSocket(R,K,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(T,t):T.end()}function gr(t,e){t._readyState=j.CLOSING,t.emit("error",e),t.emitClose()}function ky(t){return t.path=t.socketPath,hu.connect(t)}function jy(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=hu.isIP(t.host)?"":t.host),Sy.connect(t)}function ae(t,e,n){t._readyState=j.CLOSING;let r=new Error(n);Error.captureStackTrace(r,ae),e.setHeader?(e[mu]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(gr,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function zi(t,e,n){if(e){let r=Dy(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(n){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${He[t.readyState]})`);process.nextTick(n,r)}}function Fy(t,e){let n=this[Q];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,n._socket[Q]!==void 0&&(n._socket.removeListener("data",mr),process.nextTick(_u,n._socket),t===1005?n.close():n.close(t,e))}function Uy(){let t=this[Q];t.isPaused||t._socket.resume()}function qy(t){let e=this[Q];e._socket[Q]!==void 0&&(e._socket.removeListener("data",mr),process.nextTick(_u,e._socket),e.close(t[Oy])),e.emit("error",t)}function pu(){this[Q].emitClose()}function Gy(t,e){this[Q].emit("message",t,e)}function Wy(t){let e=this[Q];e._autoPong&&e.pong(t,!this._isServer,gu),e.emit("ping",t)}function Vy(t){this[Q].emit("pong",t)}function _u(t){t.resume()}function vu(){let t=this[Q];this.removeListener("close",vu),this.removeListener("data",mr),this.removeListener("end",bu),t._readyState=j.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[Q]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",pu),t._receiver.on("finish",pu))}function mr(t){this[Q]._receiver.write(t)||this.pause()}function bu(){let t=this[Q];t._readyState=j.CLOSING,t._receiver.end(),this.end()}function wu(){let t=this[Q];this.removeListener("error",wu),this.on("error",gu),t&&(t._readyState=j.CLOSING,this.destroy())}});var Eu=g((ST,Tu)=>{"use strict";var{tokenChars:$y}=Jt();function Hy(t){let e=new Set,n=-1,r=-1,i=0;for(i;i{"use strict";var Ky=I("events"),yr=I("http"),{Duplex:TT}=I("stream"),{createHash:Yy}=I("crypto"),xu=$i(),st=zt(),zy=Eu(),Jy=Ji(),{GUID:Xy,kWebSocket:Qy}=Je(),Zy=/^[+/0-9A-Za-z]{22}==$/,Au=0,Cu=1,Ou=2,Xi=class extends Ky{constructor(e,n){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Jy,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=yr.createServer((r,i)=>{let o=yr.STATUS_CODES[426];i.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),i.end(o)}),this._server.listen(e.port,e.host,e.backlog,n)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=e_(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,o,s)=>{this.handleUpgrade(i,o,s,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Au}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Ou){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(en,this);return}if(e&&this.once("close",e),this._state!==Cu)if(this._state=Cu,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(en,this):process.nextTick(en,this);else{let n=this._server;this._removeListeners(),this._removeListeners=this._server=null,n.close(()=>{en(this)})}}shouldHandle(e){if(this.options.path){let n=e.url.indexOf("?");if((n!==-1?e.url.slice(0,n):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,n,r,i){n.on("error",Iu);let o=e.headers["sec-websocket-key"],s=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){at(this,e,n,405,"Invalid HTTP method");return}if(s===void 0||s.toLowerCase()!=="websocket"){at(this,e,n,400,"Invalid Upgrade header");return}if(o===void 0||!Zy.test(o)){at(this,e,n,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){at(this,e,n,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){tn(n,400);return}let c=e.headers["sec-websocket-protocol"],a=new Set;if(c!==void 0)try{a=zy.parse(c)}catch{at(this,e,n,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],p={};if(this.options.perMessageDeflate&&l!==void 0){let m=new st(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let b=xu.parse(l);b[st.extensionName]&&(m.accept(b[st.extensionName]),p[st.extensionName]=m)}catch{at(this,e,n,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:e.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(b,T,w,R)=>{if(!b)return tn(n,T||401,w,R);this.completeUpgrade(p,o,a,e,n,r,i)});return}if(!this.options.verifyClient(m))return tn(n,401)}this.completeUpgrade(p,o,a,e,n,r,i)}completeUpgrade(e,n,r,i,o,s,u){if(!o.readable||!o.writable)return o.destroy();if(o[Qy])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Au)return tn(o,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Yy("sha1").update(n+Xy).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(r.size){let p=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;p&&(a.push(`Sec-WebSocket-Protocol: ${p}`),l._protocol=p)}if(e[st.extensionName]){let p=e[st.extensionName].params,m=xu.format({[st.extensionName]:[p]});a.push(`Sec-WebSocket-Extensions: ${m}`),l._extensions=e}this.emit("headers",a,i),o.write(a.concat(`\r `).join(`\r `)),o.removeListener("error",Iu),l.setSocket(o,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(en,this)})),u(l,i)}};Pu.exports=Xi;function e_(t,e){for(let n of Object.keys(e))t.on(n,e[n]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function en(t){t._state=Ou,t.emit("close")}function Iu(){this.destroy()}function tn(t,e,n,r){n=n||yr.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${yr.STATUS_CODES[e]}\r `+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r `)+`\r \r `+n)}function at(t,e,n,r,i){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,at),t.emit("wsClientError",o,n,e)}else tn(n,r,i)}});var Nc=g((XT,Pc)=>{Pc.exports=Oc;Oc.sync=tv;var Cc=I("fs");function ev(t,e){var n=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r{Bc.exports=Mc;Mc.sync=nv;var Rc=I("fs");function Mc(t,e,n){Rc.stat(t,function(r,i){n(r,r?!1:Dc(i,e))})}function nv(t,e){return Dc(Rc.statSync(t),e)}function Dc(t,e){return t.isFile()&&rv(t,e)}function rv(t,e){var n=t.mode,r=t.uid,i=t.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),a=parseInt("001",8),l=u|c,p=n&a||n&c&&i===s||n&u&&r===o||n&l&&o===0;return p}});var jc=g((eE,kc)=>{var ZT=I("fs"),Cr;process.platform==="win32"||global.TESTING_WINDOWS?Cr=Nc():Cr=Lc();kc.exports=uo;uo.sync=iv;function uo(t,e,n){if(typeof e=="function"&&(n=e,e={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){uo(t,e||{},function(o,s){o?i(o):r(s)})})}Cr(t,e||{},function(r,i){r&&(r.code==="EACCES"||e&&e.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function iv(t,e){try{return Cr.sync(t,e||{})}catch(n){if(e&&e.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var $c=g((tE,Vc)=>{var Rt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Fc=I("path"),ov=Rt?";":":",Uc=jc(),qc=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Gc=(t,e)=>{let n=e.colon||ov,r=t.match(/\//)||Rt&&t.match(/\\/)?[""]:[...Rt?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(n)],i=Rt?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Rt?i.split(n):[""];return Rt&&t.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},Wc=(t,e,n)=>{typeof e=="function"&&(n=e,e={}),e||(e={});let{pathEnv:r,pathExt:i,pathExtExe:o}=Gc(t,e),s=[],u=a=>new Promise((l,p)=>{if(a===r.length)return e.all&&s.length?l(s):p(qc(t));let m=r[a],b=/^".*"$/.test(m)?m.slice(1,-1):m,T=Fc.join(b,t),w=!b&&/^\.[\\\/]/.test(t)?t.slice(0,2)+T:T;l(c(w,a,0))}),c=(a,l,p)=>new Promise((m,b)=>{if(p===i.length)return m(u(l+1));let T=i[p];Uc(a+T,{pathExt:o},(w,R)=>{if(!w&&R)if(e.all)s.push(a+T);else return m(a+T);return m(c(a,l,p+1))})});return n?u(0).then(a=>n(null,a),n):u(0)},sv=(t,e)=>{e=e||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=Gc(t,e),o=[];for(let s=0;s{"use strict";var Hc=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};co.exports=Hc;co.exports.default=Hc});var Xc=g((rE,Jc)=>{"use strict";var Yc=I("path"),av=$c(),uv=Kc();function zc(t,e){let n=t.options.env||process.env,r=process.cwd(),i=t.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(t.options.cwd)}catch{}let s;try{s=av.sync(t.command,{path:n[uv({env:n})],pathExt:e?Yc.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=Yc.resolve(i?t.options.cwd:"",s)),s}function cv(t){return zc(t)||zc(t,!0)}Jc.exports=cv});var Qc=g((iE,fo)=>{"use strict";var lo=/([()\][%!^"`<>&|;, *?])/g;function lv(t){return t=t.replace(lo,"^$1"),t}function fv(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(lo,"^$1"),e&&(t=t.replace(lo,"^$1")),t}fo.exports.command=lv;fo.exports.argument=fv});var el=g((oE,Zc)=>{"use strict";Zc.exports=/^#!(.*)/});var nl=g((sE,tl)=>{"use strict";var dv=el();tl.exports=(t="")=>{let e=t.match(dv);if(!e)return null;let[n,r]=e[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var il=g((aE,rl)=>{"use strict";var po=I("fs"),pv=nl();function hv(t){let n=Buffer.alloc(150),r;try{r=po.openSync(t,"r"),po.readSync(r,n,0,150,0),po.closeSync(r)}catch{}return pv(n.toString())}rl.exports=hv});var ul=g((uE,al)=>{"use strict";var gv=I("path"),ol=Xc(),sl=Qc(),mv=il(),yv=process.platform==="win32",_v=/\.(?:com|exe)$/i,vv=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function bv(t){t.file=ol(t);let e=t.file&&mv(t.file);return e?(t.args.unshift(t.file),t.command=e,ol(t)):t.file}function wv(t){if(!yv)return t;let e=bv(t),n=!_v.test(e);if(t.options.forceShell||n){let r=vv.test(e);t.command=gv.normalize(t.command),t.command=sl.command(t.command),t.args=t.args.map(o=>sl.argument(o,r));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Sv(t,e,n){e&&!Array.isArray(e)&&(n=e,e=null),e=e?e.slice(0):[],n=Object.assign({},n);let r={command:t,args:e,options:n,file:void 0,original:{command:t,args:e}};return n.shell?r:wv(r)}al.exports=Sv});var fl=g((cE,ll)=>{"use strict";var ho=process.platform==="win32";function go(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function Tv(t,e){if(!ho)return;let n=t.emit;t.emit=function(r,i){if(r==="exit"){let o=cl(i,e,"spawn");if(o)return n.call(t,"error",o)}return n.apply(t,arguments)}}function cl(t,e){return ho&&t===1&&!e.file?go(e.original,"spawn"):null}function Ev(t,e){return ho&&t===1&&!e.file?go(e.original,"spawnSync"):null}ll.exports={hookChildProcess:Tv,verifyENOENT:cl,verifyENOENTSync:Ev,notFoundError:go}});var hl=g((lE,Mt)=>{"use strict";var dl=I("child_process"),mo=ul(),yo=fl();function pl(t,e,n){let r=mo(t,e,n),i=dl.spawn(r.command,r.args,r.options);return yo.hookChildProcess(i,r),i}function xv(t,e,n){let r=mo(t,e,n),i=dl.spawnSync(r.command,r.args,r.options);return i.error=i.error||yo.verifyENOENTSync(i.status,r),i}Mt.exports=pl;Mt.exports.spawn=pl;Mt.exports.sync=xv;Mt.exports._parse=mo;Mt.exports._enoent=yo});var ml=g((fE,gl)=>{"use strict";gl.exports=t=>{let e=typeof t=="string"?` `:10,n=typeof t=="string"?"\r":13;return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===n&&(t=t.slice(0,t.length-1)),t}});var _l=g((dE,_o)=>{"use strict";var yl=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};_o.exports=yl;_o.exports.default=yl});var wl=g((pE,fn)=>{"use strict";var ln=I("path"),vl=_l(),bl=t=>{t={cwd:process.cwd(),path:process.env[vl()],execPath:process.execPath,...t};let e,n=ln.resolve(t.cwd),r=[];for(;e!==n;)r.push(ln.join(n,"node_modules/.bin")),e=n,n=ln.resolve(n,"..");let i=ln.resolve(t.cwd,t.execPath,"..");return r.push(i),r.concat(t.path).join(ln.delimiter)};fn.exports=bl;fn.exports.default=bl;fn.exports.env=t=>{t={env:process.env,...t};let e={...t.env},n=vl({env:e});return t.path=e[n],e[n]=fn.exports(t),e}});var Tl=g((hE,vo)=>{"use strict";var Sl=(t,e)=>{for(let n of Reflect.ownKeys(e))Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t};vo.exports=Sl;vo.exports.default=Sl});var xl=g((gE,Or)=>{"use strict";var Av=Tl(),Ir=new WeakMap,El=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let n,r=0,i=t.displayName||t.name||"",o=function(...s){if(Ir.set(o,++r),r===1)n=t.apply(this,s),t=null;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return n};return Av(o,t),Ir.set(o,r),o};Or.exports=El;Or.exports.default=El;Or.exports.callCount=t=>{if(!Ir.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Ir.get(t)}});var Al=g(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.SIGNALS=void 0;var Cv=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];Pr.SIGNALS=Cv});var bo=g(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.SIGRTMAX=Dt.getRealtimeSignals=void 0;var Iv=function(){let t=Il-Cl+1;return Array.from({length:t},Ov)};Dt.getRealtimeSignals=Iv;var Ov=function(t,e){return{name:`SIGRT${e+1}`,number:Cl+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Cl=34,Il=64;Dt.SIGRTMAX=Il});var Ol=g(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.getSignals=void 0;var Pv=I("os"),Nv=Al(),Rv=bo(),Mv=function(){let t=(0,Rv.getRealtimeSignals)();return[...Nv.SIGNALS,...t].map(Dv)};Nr.getSignals=Mv;var Dv=function({name:t,number:e,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[t]:s}}=Pv.constants,u=s!==void 0;return{name:t,number:u?s:e,description:n,supported:u,action:r,forced:i,standard:o}}});var Nl=g(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.signalsByNumber=Bt.signalsByName=void 0;var Bv=I("os"),Pl=Ol(),Lv=bo(),kv=function(){return(0,Pl.getSignals)().reduce(jv,{})},jv=function(t,{name:e,number:n,description:r,supported:i,action:o,forced:s,standard:u}){return{...t,[e]:{name:e,number:n,description:r,supported:i,action:o,forced:s,standard:u}}},Fv=kv();Bt.signalsByName=Fv;var Uv=function(){let t=(0,Pl.getSignals)(),e=Lv.SIGRTMAX+1,n=Array.from({length:e},(r,i)=>qv(i,t));return Object.assign({},...n)},qv=function(t,e){let n=Gv(t,e);if(n===void 0)return{};let{name:r,description:i,supported:o,action:s,forced:u,standard:c}=n;return{[t]:{name:r,number:t,description:i,supported:o,action:s,forced:u,standard:c}}},Gv=function(t,e){let n=e.find(({name:r})=>Bv.constants.signals[r]===t);return n!==void 0?n:e.find(r=>r.number===t)},Wv=Uv();Bt.signalsByNumber=Wv});var Ml=g((bE,Rl)=>{"use strict";var{signalsByName:Vv}=Nl(),$v=({timedOut:t,timeout:e,errorCode:n,signal:r,signalDescription:i,exitCode:o,isCanceled:s})=>t?`timed out after ${e} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed",Hv=({stdout:t,stderr:e,all:n,error:r,signal:i,exitCode:o,command:s,escapedCommand:u,timedOut:c,isCanceled:a,killed:l,parsed:{options:{timeout:p}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let m=i===void 0?void 0:Vv[i].description,b=r&&r.code,w=`Command ${$v({timedOut:c,timeout:p,errorCode:b,signal:i,signalDescription:m,exitCode:o,isCanceled:a})}: ${s}`,R=Object.prototype.toString.call(r)==="[object Error]",K=R?`${w} ${r.message}`:w,ue=[K,e,t].filter(Boolean).join(` `);return R?(r.originalMessage=r.message,r.message=ue):r=new Error(ue),r.shortMessage=K,r.command=s,r.escapedCommand=u,r.exitCode=o,r.signal=i,r.signalDescription=m,r.stdout=t,r.stderr=e,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=a,r.killed=l&&!c,r};Rl.exports=Hv});var Bl=g((wE,wo)=>{"use strict";var Rr=["stdin","stdout","stderr"],Kv=t=>Rr.some(e=>t[e]!==void 0),Dl=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return Rr.map(r=>t[r]);if(Kv(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Rr.map(r=>`\`${r}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let n=Math.max(e.length,Rr.length);return Array.from({length:n},(r,i)=>e[i])};wo.exports=Dl;wo.exports.node=t=>{let e=Dl(t);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var Ll=g((SE,Mr)=>{Mr.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Mr.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Mr.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Fl=g((TE,hn)=>{var Yv=I("assert"),dn=Ll(),zv=/^win/i.test(process.platform),Dr=I("events");typeof Dr!="function"&&(Dr=Dr.EventEmitter);var H;process.__signal_exit_emitter__?H=process.__signal_exit_emitter__:(H=process.__signal_exit_emitter__=new Dr,H.count=0,H.emitted={});H.infinite||(H.setMaxListeners(1/0),H.infinite=!0);hn.exports=function(t,e){Yv.equal(typeof t,"function","a callback must be provided for exit handler"),pn===!1&&kl();var n="exit";e&&e.alwaysLast&&(n="afterexit");var r=function(){H.removeListener(n,t),H.listeners("exit").length===0&&H.listeners("afterexit").length===0&&To()};return H.on(n,t),r};hn.exports.unload=To;function To(){pn&&(pn=!1,dn.forEach(function(t){try{process.removeListener(t,Eo[t])}catch{}}),process.emit=So,process.reallyExit=jl,H.count-=1)}function Lt(t,e,n){H.emitted[t]||(H.emitted[t]=!0,H.emit(t,e,n))}var Eo={};dn.forEach(function(t){Eo[t]=function(){var n=process.listeners(t);n.length===H.count&&(To(),Lt("exit",null,t),Lt("afterexit",null,t),zv&&t==="SIGHUP"&&(t="SIGINT"),process.kill(process.pid,t))}});hn.exports.signals=function(){return dn};hn.exports.load=kl;var pn=!1;function kl(){pn||(pn=!0,H.count+=1,dn=dn.filter(function(t){try{return process.on(t,Eo[t]),!0}catch{return!1}}),process.emit=Xv,process.reallyExit=Jv)}var jl=process.reallyExit;function Jv(t){process.exitCode=t||0,Lt("exit",process.exitCode,null),Lt("afterexit",process.exitCode,null),jl.call(process,process.exitCode)}var So=process.emit;function Xv(t,e){if(t==="exit"){e!==void 0&&(process.exitCode=e);var n=So.apply(this,arguments);return Lt("exit",process.exitCode,null),Lt("afterexit",process.exitCode,null),n}else return So.apply(this,arguments)}});var ql=g((EE,Ul)=>{"use strict";var Qv=I("os"),Zv=Fl(),eb=1e3*5,tb=(t,e="SIGTERM",n={})=>{let r=t(e);return nb(t,e,n,r),r},nb=(t,e,n,r)=>{if(!rb(e,n,r))return;let i=ob(n),o=setTimeout(()=>{t("SIGKILL")},i);o.unref&&o.unref()},rb=(t,{forceKillAfterTimeout:e},n)=>ib(t)&&e!==!1&&n,ib=t=>t===Qv.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",ob=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return eb;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},sb=(t,e)=>{t.kill()&&(e.isCanceled=!0)},ab=(t,e,n)=>{t.kill(e),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},ub=(t,{timeout:e,killSignal:n="SIGTERM"},r)=>{if(e===0||e===void 0)return r;let i,o=new Promise((u,c)=>{i=setTimeout(()=>{ab(t,n,c)},e)}),s=r.finally(()=>{clearTimeout(i)});return Promise.race([o,s])},cb=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},lb=async(t,{cleanup:e,detached:n},r)=>{if(!e||n)return r;let i=Zv(()=>{t.kill()});return r.finally(()=>{i()})};Ul.exports={spawnedKill:tb,spawnedCancel:sb,setupTimeout:ub,validateTimeout:cb,setExitHandler:lb}});var Wl=g((xE,Gl)=>{"use strict";var qe=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";qe.writable=t=>qe(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";qe.readable=t=>qe(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";qe.duplex=t=>qe.writable(t)&&qe.readable(t);qe.transform=t=>qe.duplex(t)&&typeof t._transform=="function"&&typeof t._transformState=="object";Gl.exports=qe});var $l=g((AE,Vl)=>{"use strict";var{PassThrough:fb}=I("stream");Vl.exports=t=>{t={...t};let{array:e}=t,{encoding:n}=t,r=n==="buffer",i=!1;e?i=!(n||r):n=n||"utf8",r&&(n=null);let o=new fb({objectMode:i});n&&o.setEncoding(n);let s=0,u=[];return o.on("data",c=>{u.push(c),i?s=u.length:s+=c.length}),o.getBufferedValue=()=>e?u:r?Buffer.concat(u,s):u.join(""),o.getBufferedLength=()=>s,o}});var Hl=g((CE,gn)=>{"use strict";var{constants:db}=I("buffer"),pb=I("stream"),{promisify:hb}=I("util"),gb=$l(),mb=hb(pb.pipeline),Br=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function xo(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:n}=e,r=gb(e);return await new Promise((i,o)=>{let s=u=>{u&&r.getBufferedLength()<=db.MAX_LENGTH&&(u.bufferedData=r.getBufferedValue()),o(u)};(async()=>{try{await mb(t,r),i()}catch(u){s(u)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new Br)})}),r.getBufferedValue()}gn.exports=xo;gn.exports.buffer=(t,e)=>xo(t,{...e,encoding:"buffer"});gn.exports.array=(t,e)=>xo(t,{...e,array:!0});gn.exports.MaxBufferError=Br});var Yl=g((IE,Kl)=>{"use strict";var{PassThrough:yb}=I("stream");Kl.exports=function(){var t=[],e=new yb({objectMode:!0});return e.setMaxListeners(0),e.add=n,e.isEmpty=r,e.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(n),e;function n(o){return Array.isArray(o)?(o.forEach(n),this):(t.push(o),o.once("end",i.bind(null,o)),o.once("error",e.emit.bind(e,"error")),o.pipe(e,{end:!1}),this)}function r(){return t.length==0}function i(o){t=t.filter(function(s){return s!==o}),!t.length&&e.readable&&e.end()}}});var Ql=g((OE,Xl)=>{"use strict";var Jl=Wl(),zl=Hl(),_b=Yl(),vb=(t,e)=>{e===void 0||t.stdin===void 0||(Jl(e)?e.pipe(t.stdin):t.stdin.end(e))},bb=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let n=_b();return t.stdout&&n.add(t.stdout),t.stderr&&n.add(t.stderr),n},Ao=async(t,e)=>{if(t){t.destroy();try{return await e}catch(n){return n.bufferedData}}},Co=(t,{encoding:e,buffer:n,maxBuffer:r})=>{if(!(!t||!n))return e?zl(t,{encoding:e,maxBuffer:r}):zl.buffer(t,{maxBuffer:r})},wb=async({stdout:t,stderr:e,all:n},{encoding:r,buffer:i,maxBuffer:o},s)=>{let u=Co(t,{encoding:r,buffer:i,maxBuffer:o}),c=Co(e,{encoding:r,buffer:i,maxBuffer:o}),a=Co(n,{encoding:r,buffer:i,maxBuffer:o*2});try{return await Promise.all([s,u,c,a])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},Ao(t,u),Ao(e,c),Ao(n,a)])}},Sb=({input:t})=>{if(Jl(t))throw new TypeError("The `input` option cannot be a stream in sync mode")};Xl.exports={handleInput:vb,makeAllStream:bb,getSpawnedResult:wb,validateInputSync:Sb}});var ef=g((PE,Zl)=>{"use strict";var Tb=(async()=>{})().constructor.prototype,Eb=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(Tb,t)]),xb=(t,e)=>{for(let[n,r]of Eb){let i=typeof e=="function"?(...o)=>Reflect.apply(r.value,e(),o):r.value.bind(e);Reflect.defineProperty(t,n,{...r,value:i})}return t},Ab=t=>new Promise((e,n)=>{t.on("exit",(r,i)=>{e({exitCode:r,signal:i})}),t.on("error",r=>{n(r)}),t.stdin&&t.stdin.on("error",r=>{n(r)})});Zl.exports={mergePromise:xb,getSpawnedPromise:Ab}});var rf=g((NE,nf)=>{"use strict";var tf=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],Cb=/^[\w.-]+$/,Ib=/"/g,Ob=t=>typeof t!="string"||Cb.test(t)?t:`"${t.replace(Ib,'\\"')}"`,Pb=(t,e)=>tf(t,e).join(" "),Nb=(t,e)=>tf(t,e).map(n=>Ob(n)).join(" "),Rb=/ +/g,Mb=t=>{let e=[];for(let n of t.trim().split(Rb)){let r=e[e.length-1];r&&r.endsWith("\\")?e[e.length-1]=`${r.slice(0,-1)} ${n}`:e.push(n)}return e};nf.exports={joinCommand:Pb,getEscapedCommand:Nb,parseCommand:Mb}});var ff=g((RE,kt)=>{"use strict";var Db=I("path"),Io=I("child_process"),Bb=hl(),Lb=ml(),kb=wl(),jb=xl(),Lr=Ml(),sf=Bl(),{spawnedKill:Fb,spawnedCancel:Ub,setupTimeout:qb,validateTimeout:Gb,setExitHandler:Wb}=ql(),{handleInput:Vb,getSpawnedResult:$b,makeAllStream:Hb,validateInputSync:Kb}=Ql(),{mergePromise:of,getSpawnedPromise:Yb}=ef(),{joinCommand:af,parseCommand:uf,getEscapedCommand:cf}=rf(),zb=1e3*1e3*100,Jb=({env:t,extendEnv:e,preferLocal:n,localDir:r,execPath:i})=>{let o=e?{...process.env,...t}:t;return n?kb.env({env:o,cwd:r,execPath:i}):o},lf=(t,e,n={})=>{let r=Bb._parse(t,e,n);return t=r.command,e=r.args,n=r.options,n={maxBuffer:zb,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=Jb(n),n.stdio=sf(n),process.platform==="win32"&&Db.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:n,parsed:r}},mn=(t,e,n)=>typeof e!="string"&&!Buffer.isBuffer(e)?n===void 0?void 0:"":t.stripFinalNewline?Lb(e):e,kr=(t,e,n)=>{let r=lf(t,e,n),i=af(t,e),o=cf(t,e);Gb(r.options);let s;try{s=Io.spawn(r.file,r.args,r.options)}catch(b){let T=new Io.ChildProcess,w=Promise.reject(Lr({error:b,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return of(T,w)}let u=Yb(s),c=qb(s,r.options,u),a=Wb(s,r.options,c),l={isCanceled:!1};s.kill=Fb.bind(null,s.kill.bind(s)),s.cancel=Ub.bind(null,s,l);let m=jb(async()=>{let[{error:b,exitCode:T,signal:w,timedOut:R},K,ue,pt]=await $b(s,r.options,a),ge=mn(r.options,K),be=mn(r.options,ue),Ze=mn(r.options,pt);if(b||T!==0||w!==null){let Ke=Lr({error:b,exitCode:T,signal:w,stdout:ge,stderr:be,all:Ze,command:i,escapedCommand:o,parsed:r,timedOut:R,isCanceled:l.isCanceled,killed:s.killed});if(!r.options.reject)return Ke;throw Ke}return{command:i,escapedCommand:o,exitCode:0,stdout:ge,stderr:be,all:Ze,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return Vb(s,r.options.input),s.all=Hb(s,r.options),of(s,m)};kt.exports=kr;kt.exports.sync=(t,e,n)=>{let r=lf(t,e,n),i=af(t,e),o=cf(t,e);Kb(r.options);let s;try{s=Io.spawnSync(r.file,r.args,r.options)}catch(a){throw Lr({error:a,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let u=mn(r.options,s.stdout,s.error),c=mn(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let a=Lr({stdout:u,stderr:c,error:s.error,signal:s.signal,exitCode:s.status,command:i,escapedCommand:o,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return a;throw a}return{command:i,escapedCommand:o,exitCode:0,stdout:u,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};kt.exports.command=(t,e)=>{let[n,...r]=uf(t);return kr(n,r,e)};kt.exports.commandSync=(t,e)=>{let[n,...r]=uf(t);return kr.sync(n,r,e)};kt.exports.node=(t,e,n={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(n=e,e=[]);let r=sf.node(n),i=process.execArgv.filter(u=>!u.startsWith("--inspect")),{nodePath:o=process.execPath,nodeOptions:s=i}=n;return kr(o,[...s,t,...Array.isArray(e)?e:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var tA=Z(zo());var zf={runtime:null,"runtime.sourcecreate":null,"runtime.assertion":null,"runtime.launch":null,"runtime.target":null,"runtime.welcome":null,"runtime.exception":null,"runtime.sourcemap":null,"runtime.breakpoints":null,"sourcemap.parsing":null,"perf.function":null,"cdp.send":null,"cdp.receive":null,"dap.send":null,"dap.receive":null,internal:null,proxyActivity:null},lw=Object.keys(zf),fw=Symbol("ILogger");var Aa=Z(xi()),tr=Z(I("os"));var Bm={"pwa-extensionHost":null,"node-terminal":null,"pwa-node":null,"pwa-chrome":null,"pwa-msedge":null},Lm={"extension.js-debug.addCustomBreakpoints":null,"extension.js-debug.addXHRBreakpoints":null,"extension.js-debug.editXHRBreakpoints":null,"extension.pwa-node-debug.attachNodeProcess":null,"extension.js-debug.clearAutoAttachVariables":null,"extension.js-debug.setAutoAttachVariables":null,"extension.js-debug.autoAttachToProcess":null,"extension.js-debug.createDebuggerTerminal":null,"extension.js-debug.createDiagnostics":null,"extension.js-debug.getDiagnosticLogs":null,"extension.js-debug.debugLink":null,"extension.js-debug.npmScript":null,"extension.js-debug.pickNodeProcess":null,"extension.js-debug.prettyPrint":null,"extension.js-debug.removeXHRBreakpoint":null,"extension.js-debug.removeAllCustomBreakpoints":null,"extension.js-debug.revealPage":null,"extension.js-debug.startProfile":null,"extension.js-debug.stopProfile":null,"extension.js-debug.toggleSkippingFile":null,"extension.node-debug.startWithStopOnEntry":null,"extension.js-debug.requestCDPProxy":null,"extension.js-debug.openEdgeDevTools":null,"extension.js-debug.callers.add":null,"extension.js-debug.callers.goToCaller":null,"extension.js-debug.callers.gotToTarget":null,"extension.js-debug.callers.remove":null,"extension.js-debug.callers.removeAll":null,"extension.js-debug.enableSourceMapStepping":null,"extension.js-debug.disableSourceMapStepping":null},dS=new Set(Object.keys(Lm)),pS=new Set(Object.keys(Bm));var Ai=Symbol("unset");function Ci(t){let e=Ai,n=(...r)=>(e===Ai&&(n.value=e=t(...r)),e);return n.forget=()=>{e=Ai,n.value=void 0},n.value=void 0,n}function Sa(t){let e=new Map,n=r=>{if(e.has(r))return e.get(r);let i=t(r);return e.set(r,i),i};return n.clear=()=>e.clear(),n}var gS=2**31-1;var SS=Symbol("AnyLaunchConfiguration"),Ta={type:"",name:"",request:"",trace:!1,outputCapture:"console",timeout:1e4,timeouts:{},showAsyncStacks:!0,skipFiles:[],smartStep:!0,sourceMaps:!0,sourceMapRenames:!0,pauseForSourceMap:!0,resolveSourceMapLocations:null,rootPath:"${workspaceFolder}",outFiles:["${workspaceFolder}/**/*.(m|c|)js","!**/node_modules/**"],sourceMapPathOverrides:xa("${workspaceFolder}"),enableContentValidation:!0,cascadeTerminateToConfigurations:[],enableDWARF:!0,__workspaceFolder:"",__remoteFilePrefix:void 0,__breakOnConditionalError:!1,customDescriptionGenerator:void 0,customPropertiesGenerator:void 0},$t={...Ta,cwd:"${workspaceFolder}",env:{},envFile:null,pauseForSourceMap:!1,sourceMaps:!0,localRoot:null,remoteRoot:null,resolveSourceMapLocations:["**","!**/node_modules/**"],autoAttachChildProcesses:!0,runtimeSourcemapPausePatterns:[],skipFiles:["/**"]},km={...$t,showAsyncStacks:{onceBreakpointResolved:16},type:"node-terminal",request:"launch",name:"JavaScript Debug Terminal"},TS={...$t,type:"node-terminal",request:"attach",name:km.name,showAsyncStacks:{onceBreakpointResolved:16},delegateId:-1},ES={...$t,type:"pwa-extensionHost",name:"Debug Extension",request:"launch",args:["--extensionDevelopmentPath=${workspaceFolder}"],outFiles:["${workspaceFolder}/out/**/*.js"],resolveSourceMapLocations:["${workspaceFolder}/**","!**/node_modules/**"],rendererDebugOptions:{},runtimeExecutable:"${execPath}",autoAttachChildProcesses:!1,debugWebviews:!1,debugWebWorkerHost:!1,__sessionId:""},xS={...$t,type:"pwa-node",request:"launch",program:"",cwd:"${workspaceFolder}",stopOnEntry:!1,console:"internalConsole",restart:!1,args:[],runtimeExecutable:"node",runtimeVersion:"default",runtimeArgs:[],profileStartup:!1,attachSimplePort:null,killBehavior:"forceful"},Ea={...Ta,type:"pwa-chrome",request:"attach",address:"localhost",port:0,disableNetworkCache:!0,pathMapping:{},url:null,restart:!1,urlFilter:"",sourceMapPathOverrides:xa("${webRoot}"),webRoot:"${workspaceFolder}",server:null,browserAttachLocation:"workspace",targetSelection:"automatic",vueComponentPaths:["${workspaceFolder}/**/*.vue","!**/node_modules/**"],perScriptSourcemaps:"auto"},AS={...Ea,type:"pwa-msedge",useWebView:!1},jm={...Ea,type:"pwa-chrome",request:"launch",cwd:null,file:null,env:{},urlFilter:"*",includeDefaultArgs:!0,includeLaunchArgs:!0,runtimeArgs:null,runtimeExecutable:"*",userDataDir:!0,browserLaunchLocation:"workspace",profileStartup:!1,cleanUp:"wholeBrowser"},CS={...jm,type:"pwa-msedge",useWebView:!1},IS={...$t,type:"pwa-node",attachExistingChildren:!0,address:"localhost",port:9229,restart:!1,request:"attach",continueOnAttach:!1};function xa(t){return{"webpack:///./~/*":`${t}/node_modules/*`,"webpack:////*":"/*","webpack://@?:*/?:*/*":`${t}/*`,"webpack://?:*/*":`${t}/*`,"webpack:///([a-z]):/(.+)":"$1:/$2","meteor://\u{1F4BB}app/*":`${t}/*`,"turbopack://[project]/*":"${workspaceFolder}/*"}}var Zn="js-debug",Ii="1.91.0",Fm="ms-vscode",OS=Zn.includes("nightly"),PS=`${Fm}.${Zn}`;var er=class{async setup(){}dispose(){}write(e){if(e.level>2)throw new Error(e.message);console.log(JSON.stringify(e))}};var Oi=class{constructor(e=512){this.size=e;this.items=[];this.i=0}write(e){this.items[this.i]=e,this.i=(this.i+1)%this.size}read(){return this.items.slice(this.i).concat(this.items.slice(0,this.i))}},pe=class{constructor(){this.logTarget={queue:[]};this.logBuffer=new Oi}static async test(){let e=new pe;return e.setup({sinks:[new er],showWelcome:!1}),e}info(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:1})}verbose(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:0})}warn(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:2})}error(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:3})}fatal(e,n,r){this.log({tag:e,timestamp:Date.now(),message:n,metadata:r,level:4})}assert(e,n){if(e===!1||e===void 0||e===null){if(this.error("runtime.assertion",n,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(n);debugger;return!1}return!0}log(e){if(this.logBuffer.write(e),"queue"in this.logTarget){this.logTarget.queue.push(e);return}for(let n of this.logTarget.sinks)n.write(e)}getRecentLogs(){return this.logBuffer.read()}dispose(){if("sinks"in this.logTarget){for(let e of this.logTarget.sinks)e.dispose();this.logTarget={queue:[]}}}forTarget(){return this}async setup(e){if(await Promise.all(e.sinks.map(r=>r.setup())),e.showWelcome!==!1){let r=qm();for(let i of e.sinks)i.write(r)}let n=this.logTarget;this.logTarget={sinks:e.sinks.slice()},"sinks"in n?n.sinks.forEach(r=>r.dispose()):n.queue.forEach(r=>this.log(r))}};pe.null=(()=>{let e=new pe;return e.setup({sinks:[]}),e})(),pe=bn([(0,Aa.injectable)()],pe);var qm=()=>({timestamp:Date.now(),tag:"runtime.welcome",level:1,message:`${Zn} v${Ii} started`,metadata:{os:`${tr.platform()} ${tr.arch()}`,nodeVersion:process.version,adapterVersion:Ii}});var ne=class{constructor(){this._listeners=new Set;this.event=(e,n,r)=>{let i={listener:e,thisArg:n};this._listeners.add(i);let o={dispose:()=>{o.dispose=()=>{},this._listeners.delete(i)}};return r&&r.push(o),o}}get size(){return this._listeners.size}fire(e){let n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(let r of this._listeners)this._deliveryQueue.push({data:r,event:e});if(n){for(let r=0;r{process.removeListener("uncaughtException",r),process.removeListener("unhandledRejection",i)}}}var Ia=(t,e,n,r=!0)=>i=>{Vm(i)&&(e.report("error",{"!error":i,error:r?void 0:i,exceptionType:n}),t.error("runtime.exception","Unhandled error in debug adapter",i))},Gm=t=>typeof t=="object"&&!!t&&"stack"in t,Wm=nr.dirname(nr.dirname(nr.dirname(__dirname)));function Vm(t){var e;return!$m||Gm(t)&&!!((e=t.stack)!=null&&e.includes(Wm))}var $m=!1;var Af=Z(I("net"));var Tt=class t{constructor(e=process.hrtime()){this.value=e}get ms(){return this.s*1e3}get s(){return this.value[0]+this.value[1]/1e9}elapsed(){return new t().subtract(this)}subtract(e){let n=this.value[1]-e.value[1],r=this.value[0]-e.value[0];return n<0&&(n+=1e9,r--),new t([r,n])}};var Pa=I("stream"),rr=class extends Pa.Transform{constructor(n){super();this.prefix=[];this.splitSuffix=Buffer.alloc(0);if(typeof n=="string"&&n.length===1)this.splitter=n.charCodeAt(0);else if(typeof n=="number")this.splitter=n;else throw new Error("not implemented here")}_transform(n,r,i){let o=0;for(;o{var e;this.streams&&(this.beforeClose(),this.streams.read.removeAllListeners(),(e=this.pipeRead)==null||e.destroy(),this.streams.write.removeListener("end",this.onceEnded),this.streams.write.removeListener("error",this.onWriteError),this.streams.write.on("error",()=>{}),this.streams.write.end(),this.streams=void 0,this.endEmitter.fire())});this.onWriteError=e=>{this.logger.error("internal","pipeWrite error",{error:e})};let i=r||n;this.streams={read:i.on("error",o=>this.logger.error("internal","pipeRead error",{error:o})).pipe(new rr(0)).on("data",o=>this.messageEmitter.fire([o.toString(),new Tt])).on("end",this.onceEnded),write:n.on("end",this.onceEnded).on("error",this.onWriteError)}}send(e){var n;(n=this.streams)==null||n.write.write(e+"\0")}dispose(){this.onceEnded()}beforeClose(){}};var t_=Z(Da(),1),n_=Z(qi(),1),r_=Z(Wi(),1),Ru=Z(Ji(),1),i_=Z(Nu(),1);var Mu=Ru.default;var nn=class extends Error{get cause(){return this._cause}constructor(e){super("__errorMarker"in e?e.error.format:e.format),this._cause="__errorMarker"in e?e.error:e}};var Du=t=>isFinite(t)?new Promise(e=>setTimeout(e,t)):new Promise(()=>{});function Bu(){let t=null,e=null,n=!1,r,i=new Promise((o,s)=>{t=u=>{n=!0,r=u,o(u)},e=u=>{n=!0,s(u)}});return{resolve:t,reject:e,promise:i,get settledValue(){return r},hasSettled:()=>n}}var _r=class extends nn{constructor(e){super({id:9243,format:e,showUser:!0}),this._cause={id:9243,format:e,showUser:!0}}};function Lu(t,e,n){if(e.isCancellationRequested)return Promise.reject(new _r(n||"Task cancelled"));let r=Bu(),i=e.onCancellationRequested(r.resolve);return Promise.race([r.promise.then(()=>{throw new _r(n||"Task cancelled")}),t.then(o=>(i.dispose(),o)).catch(o=>{throw i.dispose(),o})])}var ku=Object.freeze(function(t,e){let n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}}),o_=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),s_=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ku}),Ot=class t{constructor(e){this._token=void 0;this._parentListener=void 0;this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}static withTimeout(e,n){let r=new t(n),i=r._token=new It,o=setTimeout(()=>i.cancel(),e);return i.onCancellationRequested(()=>clearTimeout(o)),r}get token(){return this._token||(this._token=new It),this._token}cancel(){this._token?this._token instanceof It&&this._token.cancel():this._token=s_}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof It&&this._token.dispose():this._token=o_}},It=class{constructor(){this._isCancelled=!1;this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ku:(this._emitter||(this._emitter=new ne),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var wf=I("dns"),dt=Z(I("path")),_n=I("url");var ju,Pt,a_,rn=class{constructor(){this._indexes={__proto__:null},this.array=[]}};ju=(t,e)=>t._indexes[e],Pt=(t,e)=>{let n=ju(t,e);if(n!==void 0)return n;let{array:r,_indexes:i}=t;return i[e]=r.push(e)-1},a_=t=>{let{array:e,_indexes:n}=t;if(e.length===0)return;let r=e.pop();n[r]=void 0};var Fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qu=new Uint8Array(64),Gu=new Uint8Array(128);for(let t=0;t>>=1,u&&(i=-2147483648|-i),n[r]+=i,e}function Uu(t,e,n){return e>=n?!1:t.charCodeAt(e)!==44}function c_(t){t.sort(l_)}function l_(t,e){return t[0]-e[0]}function vr(t){let e=new Int32Array(5),n=1024*16,r=n-36,i=new Uint8Array(n),o=i.subarray(0,r),s=0,u="";for(let c=0;c0&&(s===n&&(u+=Qi.decode(i),s=0),i[s++]=59),a.length!==0){e[0]=0;for(let l=0;lr&&(u+=Qi.decode(o),i.copyWithin(0,r,s),s-=r),l>0&&(i[s++]=44),s=sn(i,s,e,p,0),p.length!==1&&(s=sn(i,s,e,p,1),s=sn(i,s,e,p,2),s=sn(i,s,e,p,3),p.length!==4&&(s=sn(i,s,e,p,4)))}}}return u+Qi.decode(i.subarray(0,s))}function sn(t,e,n,r,i){let o=r[i],s=o-n[i];n[i]=o,s=s<0?-s<<1|1:s<<1;do{let u=s&31;s>>>=5,s>0&&(u|=32),t[e++]=qu[u]}while(s>0);return e}var f_=/^[\w+.-]+:\/\//,d_=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,p_=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i,F;(function(t){t[t.Empty=1]="Empty",t[t.Hash=2]="Hash",t[t.Query=3]="Query",t[t.RelativePath=4]="RelativePath",t[t.AbsolutePath=5]="AbsolutePath",t[t.SchemeRelative=6]="SchemeRelative",t[t.Absolute=7]="Absolute"})(F||(F={}));function h_(t){return f_.test(t)}function g_(t){return t.startsWith("//")}function Hu(t){return t.startsWith("/")}function m_(t){return t.startsWith("file:")}function Vu(t){return/^[.?#]/.test(t)}function br(t){let e=d_.exec(t);return Ku(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}function y_(t){let e=p_.exec(t),n=e[2];return Ku("file:","",e[1]||"","",Hu(n)?n:"/"+n,e[3]||"",e[4]||"")}function Ku(t,e,n,r,i,o,s){return{scheme:t,user:e,host:n,port:r,path:i,query:o,hash:s,type:F.Absolute}}function $u(t){if(g_(t)){let n=br("http:"+t);return n.scheme="",n.type=F.SchemeRelative,n}if(Hu(t)){let n=br("http://foo.com"+t);return n.scheme="",n.host="",n.type=F.AbsolutePath,n}if(m_(t))return y_(t);if(h_(t))return br(t);let e=br("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?F.Query:t.startsWith("#")?F.Hash:F.RelativePath:F.Empty,e}function __(t){if(t.endsWith("/.."))return t;let e=t.lastIndexOf("/");return t.slice(0,e+1)}function v_(t,e){Yu(e,e.type),t.path==="/"?t.path=e.path:t.path=__(e.path)+t.path}function Yu(t,e){let n=e<=F.RelativePath,r=t.path.split("/"),i=1,o=0,s=!1;for(let c=1;cr&&(r=s)}Yu(n,r);let i=n.query+n.hash;switch(r){case F.Hash:case F.Query:return i;case F.RelativePath:{let o=n.path.slice(1);return o?Vu(e||t)&&!Vu(o)?"./"+o+i:o+i:i||"."}case F.AbsolutePath:return n.path+i;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+i}}function Ju(t,e){return e&&!e.endsWith("/")&&(e+="/"),zu(t,e)}function b_(t){if(!t)return"";let e=t.lastIndexOf("/");return t.slice(0,e+1)}var Ue=0,tc=1,nc=2,rc=3,w_=4,ic=1,oc=2;function S_(t,e){let n=Xu(t,0);if(n===t.length)return t;e||(t=t.slice());for(let r=n;r>1),o=t[i][Ue]-e;if(o===0)return ut=!0,i;o<0?n=i+1:r=i-1}return ut=!1,n-1}function eo(t,e,n){for(let r=n+1;r=0&&t[r][Ue]===e;n=r--);return n}function ac(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function uc(t,e,n,r){let{lastKey:i,lastNeedle:o,lastIndex:s}=n,u=0,c=t.length-1;if(r===i){if(e===o)return ut=s!==-1&&t[s][Ue]===e,s;e>=o?u=s===-1?0:s:c=s}return n.lastKey=r,n.lastNeedle=e,n.lastIndex=A_(t,e,u,c)}function C_(t,e){let n=e.map(O_);for(let r=0;re;r--)t[r]=t[r-1];t[e]=n}function O_(){return{__proto__:null}}var Qu="`line` must be greater than 0 (lines start at line 1)",Zu="`column` must be greater than or equal to 0 (columns start at column 0)",Tr=-1,ct=1,ec,Fe,P_,to,no,ro,io,N_,R_,M_,D_,un=class{constructor(e,n){let r=typeof e=="string";if(!r&&e._decodedMemo)return e;let i=r?JSON.parse(e):e,{version:o,file:s,names:u,sourceRoot:c,sources:a,sourcesContent:l}=i;this.version=o,this.file=s,this.names=u||[],this.sourceRoot=c,this.sources=a,this.sourcesContent=l;let p=Ju(c||"",b_(n));this.resolvedSources=a.map(b=>Ju(b||"",p));let{mappings:m}=i;typeof m=="string"?(this._encoded=m,this._decoded=void 0):(this._encoded=void 0,this._decoded=S_(m,r)),this._decodedMemo=ac(),this._bySources=void 0,this._bySourceMemos=void 0}};(()=>{ec=e=>{var n;return(n=e._encoded)!==null&&n!==void 0?n:e._encoded=vr(e._decoded)},Fe=e=>e._decoded||(e._decoded=Wu(e._encoded)),P_=(e,n,r)=>{let i=Fe(e);if(n>=i.length)return null;let o=i[n],s=Sr(o,e._decodedMemo,n,r,ct);return s===-1?null:o[s]},to=(e,{line:n,column:r,bias:i})=>{if(n--,n<0)throw new Error(Qu);if(r<0)throw new Error(Zu);let o=Fe(e);if(n>=o.length)return wr(null,null,null,null);let s=o[n],u=Sr(s,e._decodedMemo,n,r,i||ct);if(u===-1)return wr(null,null,null,null);let c=s[u];if(c.length===1)return wr(null,null,null,null);let{names:a,resolvedSources:l}=e;return wr(l[c[tc]],c[nc]+1,c[rc],c.length===5?a[c[w_]]:null)},ro=(e,{source:n,line:r,column:i,bias:o})=>t(e,n,r,i,o||Tr,!0),no=(e,{source:n,line:r,column:i,bias:o})=>t(e,n,r,i,o||ct,!1),io=(e,n)=>{let r=Fe(e),{names:i,resolvedSources:o}=e;for(let s=0;s{let{sources:r,resolvedSources:i,sourcesContent:o}=e;if(o==null)return null;let s=r.indexOf(n);return s===-1&&(s=i.indexOf(n)),s===-1?null:o[s]},R_=(e,n)=>{let r=new un(Zi(e,[]),n);return r._decoded=e.mappings,r},M_=e=>Zi(e,Fe(e)),D_=e=>Zi(e,ec(e));function t(e,n,r,i,o,s){if(r--,r<0)throw new Error(Qu);if(i<0)throw new Error(Zu);let{sources:u,resolvedSources:c}=e,a=u.indexOf(n);if(a===-1&&(a=c.indexOf(n)),a===-1)return s?[]:an(null,null);let p=(e._bySources||(e._bySources=C_(Fe(e),e._bySourceMemos=u.map(ac))))[a][r];if(p==null)return s?[]:an(null,null);let m=e._bySourceMemos[a];if(s)return B_(p,m,r,i,o);let b=Sr(p,m,r,i,o);if(b===-1)return an(null,null);let T=p[b];return an(T[ic]+1,T[oc])}})();function Zi(t,e){return{version:t.version,file:t.file,names:t.names,sourceRoot:t.sourceRoot,sources:t.sources,sourcesContent:t.sourcesContent,mappings:e}}function wr(t,e,n,r){return{source:t,line:e,column:n,name:r}}function an(t,e){return{line:t,column:e}}function Sr(t,e,n,r,i){let o=uc(t,r,e,n);return ut?o=(i===Tr?eo:sc)(t,r,o):i===Tr&&o++,o===-1||o===t.length?-1:o}function B_(t,e,n,r,i){let o=Sr(t,e,n,r,ct);if(!ut&&i===Tr&&o++,o===-1||o===t.length)return[];let s=ut?r:t[o][Ue];ut||(o=sc(t,s,o));let u=eo(t,s,o),c=[];for(;o<=u;o++){let a=t[o];c.push(an(a[ic]+1,a[oc]))}return c}var dc=0,pc=1,hc=2,gc=3,mc=4,yc=-1,_c,L_,k_,j_,vc,oo,F_,U_,q_,cn,Er=class{constructor({file:e,sourceRoot:n}={}){this._names=new rn,this._sources=new rn,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=n}};_c=(t,e,n,r,i,o,s,u)=>cn(!1,t,e,n,r,i,o,s,u),k_=(t,e,n,r,i,o,s,u)=>cn(!0,t,e,n,r,i,o,s,u),L_=(t,e)=>fc(!1,t,e),j_=(t,e)=>fc(!0,t,e),vc=(t,e,n)=>{let{_sources:r,_sourcesContent:i}=t;i[Pt(r,e)]=n},oo=t=>{let{file:e,sourceRoot:n,_mappings:r,_sources:i,_sourcesContent:o,_names:s}=t;return V_(r),{version:3,file:e||void 0,names:s.array,sourceRoot:n||void 0,sources:i.array,sourcesContent:o,mappings:r}},F_=t=>{let e=oo(t);return Object.assign(Object.assign({},e),{mappings:vr(e.mappings)})},q_=t=>{let e=[],{_mappings:n,_sources:r,_names:i}=t;for(let o=0;o{let e=new un(t),n=new Er({file:e.file,sourceRoot:e.sourceRoot});return lc(n._names,e.names),lc(n._sources,e.sources),n._sourcesContent=e.sourcesContent||e.sources.map(()=>null),n._mappings=Fe(e),n},cn=(t,e,n,r,i,o,s,u,c)=>{let{_mappings:a,_sources:l,_sourcesContent:p,_names:m}=e,b=G_(a,n),T=W_(b,r);if(!i)return t&&$_(b,T)?void 0:cc(b,T,[r]);let w=Pt(l,i),R=u?Pt(m,u):yc;if(w===p.length&&(p[w]=c!=null?c:null),!(t&&H_(b,T,w,o,s,R)))return cc(b,T,u?[r,w,o,s,R]:[r,w,o,s])};function G_(t,e){for(let n=t.length;n<=e;n++)t[n]=[];return t[e]}function W_(t,e){let n=t.length;for(let r=n-1;r>=0;n=r--){let i=t[r];if(e>=i[dc])break}return n}function cc(t,e,n){for(let r=t.length;r>e;r--)t[r]=t[r-1];t[e]=n}function V_(t){let{length:e}=t,n=e;for(let r=n-1;r>=0&&!(t[r].length>0);n=r,r--);n":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},lt=17;function Nt(t,e){let{generator:n}=t;if(t.write("("),e!=null&&e.length>0){n[e[0].type](e[0],t);let{length:r}=e;for(let i=1;i0){t.write(r);for(let s=1;s0){n.VariableDeclarator(r[0],t);for(let o=1;o0){e.write(r),i&&t.comments!=null&&re(e,t.comments,o,r);let{length:u}=s;for(let c=0;c0){for(;i0&&e.write(", ");let o=n[i],s=o.type[6];if(s==="D")e.write(o.local.name,o),i++;else if(s==="N")e.write("* as "+o.local.name,o),i++;else break}if(i0)for(let i=0;;){let o=n[i],{name:s}=o.local;if(e.write(s,o),s!==o.exported.name&&e.write(" as "+o.exported.name),++i "),t.body.type[0]==="O"?(e.write("("),this.ObjectExpression(t.body,e),e.write(")")):this[t.body.type](t.body,e)},ThisExpression(t,e){e.write("this",t)},Super(t,e){e.write("super",t)},RestElement:Sc=function(t,e){e.write("..."),this[t.argument.type](t.argument,e)},SpreadElement:Sc,YieldExpression(t,e){e.write(t.delegate?"yield*":"yield"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e))},AwaitExpression(t,e){e.write("await ",t),Ar(e,t.argument,t)},TemplateLiteral(t,e){let{quasis:n,expressions:r}=t;e.write("`");let{length:i}=r;for(let s=0;s0){let{elements:n}=t,{length:r}=n;for(let i=0;;){let o=n[i];if(o!=null&&this[o.type](o,e),++i0){e.write(r),i&&t.comments!=null&&re(e,t.comments,o,r);let s=","+r,{properties:u}=t,{length:c}=u;for(let a=0;;){let l=u[a];if(i&&l.comments!=null&&re(e,l.comments,o,r),e.write(o),this[l.type](l,e),++a0){let{properties:n}=t,{length:r}=n;for(let i=0;this[n[i].type](n[i],e),++i1||i[0]==="U"&&(i[1]==="n"||i[1]==="p")&&r.prefix&&r.operator[0]===n&&(n==="+"||n==="-"))&&e.write(" "),o?(e.write(n.length>1?" (":"("),this[i](r,e),e.write(")")):this[i](r,e)}else this[t.argument.type](t.argument,e),e.write(t.operator)},UpdateExpression(t,e){t.prefix?(e.write(t.operator),this[t.argument.type](t.argument,e)):(this[t.argument.type](t.argument,e),e.write(t.operator))},AssignmentExpression(t,e){this[t.left.type](t.left,e),e.write(" "+t.operator+" "),this[t.right.type](t.right,e)},AssignmentPattern(t,e){this[t.left.type](t.left,e),e.write(" = "),this[t.right.type](t.right,e)},BinaryExpression:Tc=function(t,e){let n=t.operator==="in";n&&e.write("("),Ar(e,t.left,t,!1),e.write(" "+t.operator+" "),Ar(e,t.right,t,!0),n&&e.write(")")},LogicalExpression:Tc,ConditionalExpression(t,e){let{test:n}=t,r=e.expressionsPrecedence[n.type];r===lt||r<=e.expressionsPrecedence.ConditionalExpression?(e.write("("),this[n.type](n,e),e.write(")")):this[n.type](n,e),e.write(" ? "),this[t.consequent.type](t.consequent,e),e.write(" : "),this[t.alternate.type](t.alternate,e)},NewExpression(t,e){e.write("new ");let n=e.expressionsPrecedence[t.callee.type];n===lt||nt.startsWith(yn)&&t[yn.length+1]===":";function Qb(t,e=!1){if(!t)return t;if(hf(t)){let n=yn.length;t=yn+t[n].toLowerCase()+t.substr(n+1)}else mf(t)&&(t=(e?t[0].toUpperCase():t[0].toLowerCase())+t.substr(1));return t}function Oo(t,e=!1){if(!t)return t;if(t=Qb(t,e),hf(t)){let n=yn.length;t=t.substr(0,n+1)+t.substr(n+1).replace(/\//g,"\\")}else mf(t)&&(t=t.replace(/\//g,"\\"));return t}var gf=t=>t.startsWith("\\\\"),mf=t=>/^[A-Za-z]:/.test(t)||gf(t);var jr=class jr{constructor(e,n,r,i,o){this.original=e;this.metadata=n;this.actualRoot=r;this.actualSources=i;this.hasNames=o;this.sourceActualToOriginal=new Map;this.sourceOriginalToActual=new Map;this.id=jr.idCounter++;if(i.length!==e.sources.length)throw new Error("Expected actualSources.length === original.source.length");for(let s=0;sZb(o,s)*i)}return no(this.original,{...e,source:n})}allGeneratedPositionsFor(e){var n;return ro(this.original,{...e,source:(n=this.sourceActualToOriginal.get(e.source))!=null?n:e.source})}sourceContentFor(e){var r,i,o;e=(r=this.sourceActualToOriginal.get(e))!=null?r:e;let n=this.original.sources.indexOf(e);return n===-1?null:(o=(i=this.original.sourcesContent)==null?void 0:i[n])!=null?o:null}eachMapping(e){io(this.original,e)}decodedMappings(){return Fe(this.original)}names(){return this.original.names}getBestGeneratedForOriginal(e,n){let r;return this.eachMapping(i=>{i.source===e&&(!r||n(i,r)>0)&&(r=i)}),r?{column:r.generatedColumn,line:r.generatedLine}:{column:null,line:null}}};jr.idCounter=0;var Po=jr,Zb=({originalLine:t,originalColumn:e},{originalLine:n,originalColumn:r})=>(t||0)-(n||0)||(e||0)-(r||0);var kx=process.platform!=="win32";var bf,jx=process.platform==="win32"?(bf=process.env.PATHEXT)==null?void 0:bf.toLowerCase().split(";"):void 0;var tw=new Set(["localhost","127.0.0.1","::1"]);var vf=t=>tw.has(t.toLowerCase()),nw=t=>{try{return new _n.URL(t).hostname.replace(/^\[|\]$/g,"")}catch{return t}};var Sf=Sa(async t=>{let e=nw(t);if(vf(e))return!0;try{let n=await wf.promises.lookup(e);return vf(n.address)}catch{return!1}});function yf(t,e){try{return new _n.URL(e),e}catch{}let n;try{n=new _n.URL(t||"")}catch{return e}let r=n.protocol+"//";return n.username&&(r+=n.username+":"+n.password+"@"),r+=n.host,r+=dt.dirname(n.pathname),r[r.length-1]!=="/"&&(r+="/"),r+=e,r}function _f(t){return!!t&&t.startsWith("data:")}var Fx=process.platform;var rw=50,Fr=class t{constructor(e){this.messageEmitter=new ne;this.endEmitter=new ne;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this._ws=e,this._ws.addEventListener("message",n=>{this.messageEmitter.fire([n.data.toString("utf-8"),new Tt])}),this._ws.addEventListener("close",()=>{this.endEmitter.fire(),this._ws=void 0}),this._ws.addEventListener("error",()=>{})}static async create(e,n,r){let i=!e.startsWith("ws://"),o=await Sf(e);for(;;){let s=Date.now()+rw;try{let u={headers:{host:r!=null?r:"localhost"},perMessageDeflate:!1,maxPayload:268435456,rejectUnauthorized:!(i&&o),followRedirects:!0},c=new Mu(e,[],u);return await Lu(new Promise((a,l)=>{c.addEventListener("open",()=>a(new t(c))),c.addEventListener("error",p=>{let m=e===c.url?e:c.url.replace(/^http(s?):/,"ws$1:");if(m===e){l(p.error);return}this.create(m,n,r).then(a,l)})}),Ot.withTimeout(2e3,n).token,`Could not open ${e}`).catch(a=>{throw c.close(),a})}catch(u){if(n.isCancellationRequested)throw u;let c=s-Date.now();c>0&&await Du(c)}}}send(e){var n;(n=this._ws)==null||n.send(e)}dispose(){return new Promise(e=>{if(!this._ws)return e();this._ws.addEventListener("close",()=>e()),this._ws.close()})}};var Tf=I("crypto"),Ef=()=>(0,Tf.randomBytes)(12).toString("hex");var xf,Ur=class t{constructor(e,n){this.info=e;this.server=n;this.onEndEmitter=new ne;this.cts=new Ot;this.gracefulExit=!1;this.targetAlive=!1;this.targetInfo={targetId:(xf=this.info.ownId)!=null?xf:Ef(),processId:Number(this.info.pid)||0,type:this.info.waitForDebugger?"waitingForDebugger":"",title:this.info.scriptName,url:"file://"+this.info.scriptName,openerId:this.info.openerId,attached:!0,canAccessOpener:!1,processInspectorPort:Number(new URL(this.info.inspectorURL).port)};this.onEnd=this.onEndEmitter.event;this.listenToServer()}get isTargetAlive(){return this.targetAlive}static async attach(e){let n=await new Promise((i,o)=>{let s=Af.createConnection(e.ipcAddress,()=>i(s));s.on("error",o)}),r=new ir(pe.null,n);return new t(e,r)}listenToServer(){let{server:e,targetInfo:n}=this;e.send(JSON.stringify({method:"Target.targetCreated",params:{targetInfo:n}})),e.onMessage(async([r])=>{if(this.target&&!r.includes("Target.attachToTarget")&&!r.includes("Target.detachFromTarget")){this.target.send(r);return}let i=await this.execute(r);i&&e.send(JSON.stringify(i))}),e.onEnd(()=>{this.disposeTarget(),this.onEndEmitter.fire({killed:this.gracefulExit,code:this.gracefulExit?0:1})})}dispose(){this.gracefulExit=!0,this.cts.dispose(!0),this.disposeTarget(),this.server.dispose()}async execute(e){var r;let n=JSON.parse(e);switch(n.method){case"Target.attachToTarget":return this.target&&this.disposeTarget(),this.target=await this.createTarget(),{id:n.id,result:{sessionId:this.targetInfo.targetId,__dynamicAttach:this.info.dynamicAttach?!0:void 0}};case"Target.detachFromTarget":return this.gracefulExit=!0,this.disposeTarget(),{id:n.id,result:{}};default:(r=this.target)==null||r.send(n);return}}async createTarget(){this.gracefulExit=!1;let e=await Fr.create(this.info.inspectorURL,this.cts.token,this.info.remoteHostHeader);return e.onMessage(([n])=>this.server.send(n)),e.onEnd(()=>{e&&this.server.send(JSON.stringify({method:"Target.targetDestroyed",params:{targetId:this.targetInfo.targetId,sessionId:this.targetInfo.targetId}})),this.targetAlive=!1,this.server.dispose()}),e}disposeTarget(){this.target&&(this.target.dispose(),this.target=void 0)}};var qr=JSON.parse(process.env.NODE_INSPECTOR_INFO),Gr=new pe;Gr.setup({sinks:[]});Oa(Gr,new St);(async()=>{process.on("exit",()=>{Gr.info("runtime","Process exiting"),Gr.dispose(),qr.pid&&!qr.dynamicAttach&&(!t||t.isTargetAlive)&&process.kill(Number(qr.pid))});let t=await Ur.attach(qr);t.onEnd(()=>process.exit())})();})(); /*! Bundled license information: reflect-metadata/Reflect.js: (*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** *) */ //# sourceMappingURL=watchdog.js.map