"use strict";(()=>{var Z8=Object.create;var Nb=Object.defineProperty;var AE=Object.getOwnPropertyDescriptor;var eW=Object.getOwnPropertyNames;var tW=Object.getPrototypeOf,rW=Object.prototype.hasOwnProperty;var w=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var iW=(t,e)=>()=>(t&&(e=t(t=0)),e);var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var nW=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of eW(e))!rW.call(t,n)&&n!==r&&Nb(t,n,{get:()=>e[n],enumerable:!(i=AE(e,n))||i.enumerable});return t};var F=(t,e,r)=>(r=t!=null?Z8(tW(t)):{},nW(e||!t||!t.__esModule?Nb(r,"default",{value:t,enumerable:!0}):r,t));var X=(t,e,r,i)=>{for(var n=i>1?void 0:i?AE(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Nb(e,r,n),n},x=(t,e)=>(r,i)=>e(r,i,t);var Ct=v((Cle,CE)=>{"use strict";var sW=Object.create,rh=Object.defineProperty,oW=Object.getOwnPropertyDescriptor,EE=Object.getOwnPropertyNames,aW=Object.getPrototypeOf,uW=Object.prototype.hasOwnProperty,cW=(t,e)=>function(){return e||(0,t[EE(t)[0]])((e={exports:{}}).exports,e),e.exports},lW=(t,e)=>{for(var r in e)rh(t,r,{get:e[r],enumerable:!0})},xE=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of EE(e))!uW.call(t,n)&&n!==r&&rh(t,n,{get:()=>e[n],enumerable:!(i=oW(e,n))||i.enumerable});return t},pW=(t,e,r)=>(r=t!=null?sW(aW(t)):{},xE(e||!t||!t.__esModule?rh(r,"default",{value:t,enumerable:!0}):r,t)),fW=t=>xE(rh({},"__esModule",{value:!0}),t),dW=cW({"node_modules/request-light/lib/node/main.js"(t){(()=>{var e={46:(o,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(u,c,{signal:l}={}){return new Promise((p,f)=>{function H(){l==null||l.removeEventListener("abort",H),u.removeListener(c,m),u.removeListener("error",y)}function m(...b){H(),p(b)}function y(b){H(),f(b)}l==null||l.addEventListener("abort",H),u.on(c,m),u.on("error",y)})}},54:function(o,a,u){"use strict";var c=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};let l=u(361),p=c(u(374)),f=c(u(304)),H=p.default("agent-base");function m(){let{stack:b}=new Error;return typeof b=="string"&&b.split(`
`).some(A=>A.indexOf("(https.js:")!==-1||A.indexOf("node:https:")!==-1)}function y(b,A){return new y.Agent(b,A)}(function(b){class A extends l.EventEmitter{constructor(q,L){super();let D=L;typeof q=="function"?this.callback=q:q&&(D=q),this.timeout=null,D&&typeof D.timeout=="number"&&(this.timeout=D.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:m()?443:80}set defaultPort(q){this.explicitDefaultPort=q}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:m()?"https:":"http:"}set protocol(q){this.explicitProtocol=q}callback(q,L,D){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(q,L){let D=Object.assign({},L);typeof D.secureEndpoint!="boolean"&&(D.secureEndpoint=m()),D.host==null&&(D.host="localhost"),D.port==null&&(D.port=D.secureEndpoint?443:80),D.protocol==null&&(D.protocol=D.secureEndpoint?"https:":"http:"),D.host&&D.path&&delete D.path,delete D.agent,delete D.hostname,delete D._defaultAgent,delete D.defaultPort,delete D.createConnection,q._last=!0,q.shouldKeepAlive=!1;let G=!1,W=null,N=D.timeout||this.timeout,M=O=>{q._hadError||(q.emit("error",O),q._hadError=!0)},R=()=>{W=null,G=!0;let O=new Error(`A "socket" was not created for HTTP request before ${N}ms`);O.code="ETIMEOUT",M(O)},S=O=>{G||(W!==null&&(clearTimeout(W),W=null),M(O))},$=O=>{if(G)return;if(W!=null&&(clearTimeout(W),W=null),z=O,Boolean(z)&&typeof z.addRequest=="function")return H("Callback returned another Agent instance %o",O.constructor.name),void O.addRequest(q,D);var z;if(O)return O.once("free",()=>{this.freeSocket(O,D)}),void q.onSocket(O);let C=new Error(`no Duplex stream was returned to agent-base for \`${q.method} ${q.path}\``);M(C)};if(typeof this.callback=="function"){this.promisifiedCallback||(this.callback.length>=3?(H("Converting legacy callback function to promise"),this.promisifiedCallback=f.default(this.callback)):this.promisifiedCallback=this.callback),typeof N=="number"&&N>0&&(W=setTimeout(R,N)),"port"in D&&typeof D.port!="number"&&(D.port=Number(D.port));try{H("Resolving socket for %o request: %o",D.protocol,`${q.method} ${q.path}`),Promise.resolve(this.promisifiedCallback(q,D)).then($,S)}catch(O){Promise.reject(O).catch(S)}}else M(new Error("`callback` is not defined"))}freeSocket(q,L){H("Freeing socket %o %o",q.constructor.name,L),q.destroy()}destroy(){H("Destroying agent %o",this.constructor.name)}}b.Agent=A,b.prototype=b.Agent.prototype})(y||(y={})),o.exports=y},304:(o,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(u){return function(c,l){return new Promise((p,f)=>{u.call(this,c,l,(H,m)=>{H?f(H):p(m)})})}}},370:function(o,a,u){"use strict";var c=this&&this.__awaiter||function(q,L,D,G){return new(D||(D=Promise))(function(W,N){function M($){try{S(G.next($))}catch(O){N(O)}}function R($){try{S(G.throw($))}catch(O){N(O)}}function S($){var O;$.done?W($.value):(O=$.value,O instanceof D?O:new D(function(z){z(O)})).then(M,R)}S((G=G.apply(q,L||[])).next())})},l=this&&this.__importDefault||function(q){return q&&q.__esModule?q:{default:q}};Object.defineProperty(a,"__esModule",{value:!0});let p=l(u(808)),f=l(u(404)),H=l(u(310)),m=l(u(374)),y=l(u(46)),b=u(54),A=(0,m.default)("http-proxy-agent");class B extends b.Agent{constructor(L){let D;if(D=typeof L=="string"?H.default.parse(L):L,!D)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");A("Creating new HttpProxyAgent instance: %o",D),super(D);let G=Object.assign({},D);var W;this.secureProxy=D.secureProxy||typeof(W=G.protocol)=="string"&&/^https:?$/i.test(W),G.host=G.hostname||G.host,typeof G.port=="string"&&(G.port=parseInt(G.port,10)),!G.port&&G.host&&(G.port=this.secureProxy?443:80),G.host&&G.path&&(delete G.path,delete G.pathname),this.proxy=G}callback(L,D){return c(this,void 0,void 0,function*(){let{proxy:G,secureProxy:W}=this,N=H.default.parse(L.path),M;if(N.protocol||(N.protocol="http:"),N.hostname||(N.hostname=D.hostname||D.host||null),N.port==null&&(D.port,1)&&(N.port=String(D.port)),N.port==="80"&&(N.port=""),L.path=H.default.format(N),G.auth&&L.setHeader("Proxy-Authorization",`Basic ${Buffer.from(G.auth).toString("base64")}`),W?(A("Creating `tls.Socket`: %o",G),M=f.default.connect(G)):(A("Creating `net.Socket`: %o",G),M=p.default.connect(G)),L._header){let R,S;A("Regenerating stored HTTP header string for request"),L._header=null,L._implicitHeader(),L.output&&L.output.length>0?(A("Patching connection write() output buffer with updated header"),R=L.output[0],S=R.indexOf(`\r
\r
`)+4,L.output[0]=L._header+R.substring(S),A("Output buffer: %o",L.output)):L.outputData&&L.outputData.length>0&&(A("Patching connection write() output buffer with updated header"),R=L.outputData[0].data,S=R.indexOf(`\r
\r
`)+4,L.outputData[0].data=L._header+R.substring(S),A("Output buffer: %o",L.outputData[0].data))}return yield(0,y.default)(M,"connect"),M})}}a.default=B},201:function(o,a,u){"use strict";let c=(this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}})(u(370));function l(p){return new c.default(p)}(function(p){p.HttpProxyAgent=c.default,p.prototype=c.default.prototype})(l||(l={})),o.exports=l},146:function(o,a,u){"use strict";var c=this&&this.__awaiter||function(D,G,W,N){return new(W||(W=Promise))(function(M,R){function S(z){try{O(N.next(z))}catch(C){R(C)}}function $(z){try{O(N.throw(z))}catch(C){R(C)}}function O(z){var C;z.done?M(z.value):(C=z.value,C instanceof W?C:new W(function(P){P(C)})).then(S,$)}O((N=N.apply(D,G||[])).next())})},l=this&&this.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(a,"__esModule",{value:!0});let p=l(u(808)),f=l(u(404)),H=l(u(310)),m=l(u(491)),y=l(u(374)),b=u(54),A=l(u(829)),B=y.default("https-proxy-agent:agent");class q extends b.Agent{constructor(G){let W;if(W=typeof G=="string"?H.default.parse(G):G,!W)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");B("creating new HttpsProxyAgent instance: %o",W),super(W);let N=Object.assign({},W);var M;this.secureProxy=W.secureProxy||typeof(M=N.protocol)=="string"&&/^https:?$/i.test(M),N.host=N.hostname||N.host,typeof N.port=="string"&&(N.port=parseInt(N.port,10)),!N.port&&N.host&&(N.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in N)&&(N.ALPNProtocols=["http 1.1"]),N.host&&N.path&&(delete N.path,delete N.pathname),this.proxy=N}callback(G,W){return c(this,void 0,void 0,function*(){let{proxy:N,secureProxy:M}=this,R;M?(B("Creating `tls.Socket`: %o",N),R=f.default.connect(N)):(B("Creating `net.Socket`: %o",N),R=p.default.connect(N));let S=Object.assign({},N.headers),$=`CONNECT ${W.host}:${W.port} HTTP/1.1\r
`;N.auth&&(S["Proxy-Authorization"]=`Basic ${Buffer.from(N.auth).toString("base64")}`);let{host:O,port:z,secureEndpoint:C}=W;(function(oe,ie){return Boolean(!ie&&oe===80||ie&&oe===443)})(z,C)||(O+=`:${z}`),S.Host=O,S.Connection="close";for(let oe of Object.keys(S))$+=`${oe}: ${S[oe]}\r
`;let P=A.default(R);R.write(`${$}\r
`);let{statusCode:ee,buffered:te}=yield P;if(ee===200){if(G.once("socket",L),W.secureEndpoint){B("Upgrading socket connection to TLS");let oe=W.servername||W.host;return f.default.connect(Object.assign(Object.assign({},function(ie,...de){let we={},He;for(He in ie)de.includes(He)||(we[He]=ie[He]);return we}(W,"host","hostname","path","port")),{socket:R,servername:oe}))}return R}R.destroy();let se=new p.default.Socket({writable:!1});return se.readable=!0,G.once("socket",oe=>{B("replaying proxy buffer for failed request"),m.default(oe.listenerCount("data")>0),oe.push(te),oe.push(null)}),se})}}function L(D){D.resume()}a.default=q},18:function(o,a,u){"use strict";let c=(this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}})(u(146));function l(p){return new c.default(p)}(function(p){p.HttpsProxyAgent=c.default,p.prototype=c.default.prototype})(l||(l={})),o.exports=l},829:function(o,a,u){"use strict";var c=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(a,"__esModule",{value:!0});let l=c(u(374)).default("https-proxy-agent:parse-proxy-response");a.default=function(p){return new Promise((f,H)=>{let m=0,y=[];function b(){let q=p.read();q?function(L){y.push(L),m+=L.length;let D=Buffer.concat(y,m);if(D.indexOf(`\r
\r
`)===-1)return l("have not received end of HTTP headers yet..."),void b();let G=D.toString("ascii",0,D.indexOf(`\r
`)),W=+G.split(" ")[1];l("got proxy server response: %o",G),f({statusCode:W,buffered:D})}(q):p.once("readable",b)}function A(q){l("onclose had error %o",q)}function B(){l("onend")}p.on("error",function q(L){p.removeListener("end",B),p.removeListener("error",q),p.removeListener("close",A),p.removeListener("readable",b),l("onerror %o",L),H(L)}),p.on("close",A),p.on("end",B),b()})}},539:function(o,a,u){"use strict";var c,l=this&&this.__extends||(c=function(M,R){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,$){S.__proto__=$}||function(S,$){for(var O in $)Object.prototype.hasOwnProperty.call($,O)&&(S[O]=$[O])},c(M,R)},function(M,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function S(){this.constructor=M}c(M,R),M.prototype=R===null?Object.create(R):(S.prototype=R.prototype,new S)}),p=this&&this.__assign||function(){return p=Object.assign||function(M){for(var R,S=1,$=arguments.length;S<$;S++)for(var O in R=arguments[S])Object.prototype.hasOwnProperty.call(R,O)&&(M[O]=R[O]);return M},p.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.getErrorStatusDescription=a.xhr=a.configure=void 0;var f=u(685),H=u(687),m=u(310),y=u(472),b=u(796),A=u(201),B=u(18);if(process.env.VSCODE_NLS_CONFIG){var q=process.env.VSCODE_NLS_CONFIG;y.config(JSON.parse(q))}var L=y.loadMessageBundle(),D=void 0,G=!0;function W(M){var R;return new Promise(function(S,$){var O=(0,m.parse)(M.url),z={hostname:O.hostname,agent:!!M.agent&&M.agent,port:O.port?parseInt(O.port):O.protocol==="https:"?443:80,path:O.path,method:M.type||"GET",headers:M.headers,rejectUnauthorized:typeof M.strictSSL!="boolean"||M.strictSSL};M.user&&M.password&&(z.auth=M.user+":"+M.password);var C=function(P){if(P.statusCode>=300&&P.statusCode<400&&M.followRedirects&&M.followRedirects>0&&P.headers.location){var ee=P.headers.location;ee.startsWith("/")&&(ee=(0,m.format)({protocol:O.protocol,hostname:O.hostname,port:O.port,pathname:ee})),S(W(function(te){for(var se=[],oe=1;oe<arguments.length;oe++)se[oe-1]=arguments[oe];return se.forEach(function(ie){return Object.keys(ie).forEach(function(de){return te[de]=ie[de]})}),te}({},M,{url:ee,followRedirects:M.followRedirects-1})))}else S({req:R,res:P})};(R=O.protocol==="https:"?H.request(z,C):f.request(z,C)).on("error",$),M.timeout&&R.setTimeout(M.timeout),M.data&&R.write(M.data),R.end(),M.token&&(M.token.isCancellationRequested&&R.destroy(new N),M.token.onCancellationRequested(function(){R.destroy(new N)}))})}a.configure=function(M,R){D=M,G=R},a.xhr=function(M){return typeof(M=p({},M)).strictSSL!="boolean"&&(M.strictSSL=G),M.agent||(M.agent=function(R,S){S===void 0&&(S={});var $=(0,m.parse)(R),O=S.proxyUrl||function(P){return P.protocol==="http:"?process.env.HTTP_PROXY||process.env.http_proxy||null:P.protocol==="https:"&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}($);if(!O)return null;var z=(0,m.parse)(O);if(!/^https?:$/.test(z.protocol))return null;var C={host:z.hostname,port:Number(z.port),auth:z.auth,rejectUnauthorized:typeof S.strictSSL!="boolean"||S.strictSSL,protocol:z.protocol};return $.protocol==="http:"?A(C):B(C)}(M.url,{proxyUrl:D,strictSSL:G})),typeof M.followRedirects!="number"&&(M.followRedirects=5),W(M).then(function(R){return new Promise(function(S,$){var O,z,C=R.res,P=C,ee=!1,te=C.headers&&C.headers["content-encoding"];if(te&&(O=M.type,z=R.res.statusCode,!(O==="HEAD"||z>=100&&z<200||z===204||z===304))){var se={flush:b.constants.Z_SYNC_FLUSH,finishFlush:b.constants.Z_SYNC_FLUSH};if(te==="gzip"){var oe=b.createGunzip(se);C.pipe(oe),P=oe}else if(te==="deflate"){var ie=b.createInflate(se);C.pipe(ie),P=ie}}var de=[];P.on("data",function(we){return de.push(we)}),P.on("end",function(){if(!ee){if(ee=!0,M.followRedirects>0&&(C.statusCode>=300&&C.statusCode<=303||C.statusCode===307)){var we=C.headers.location;if(we.startsWith("/")){var He=(0,m.parse)(M.url);we=(0,m.format)({protocol:He.protocol,hostname:He.hostname,port:He.port,pathname:we})}if(we){var Lt={type:M.type,url:we,user:M.user,password:M.password,headers:M.headers,timeout:M.timeout,followRedirects:M.followRedirects-1,data:M.data,token:M.token};return void(0,a.xhr)(Lt).then(S,$)}}var be=Buffer.concat(de),yr={responseText:be.toString(),body:be,status:C.statusCode,headers:C.headers||{}};C.statusCode>=200&&C.statusCode<300||C.statusCode===1223?S(yr):$(yr)}}),P.on("error",function(we){var He;He=N.is(we)?we:{responseText:L("error","Unable to access {0}. Error: {1}",M.url,we.message),body:Buffer.concat(de),status:500,headers:{}},ee=!0,$(He)}),M.token&&(M.token.isCancellationRequested&&P.destroy(new N),M.token.onCancellationRequested(function(){P.destroy(new N)}))})},function(R){var S;return S=N.is(R)?R:{responseText:M.agent?L("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",M.url,R.message):L("error.cannot.connect","Unable to connect to {0}. Error: {1}",M.url,R.message),body:Buffer.concat([]),status:404,headers:{}},Promise.reject(S)})},a.getErrorStatusDescription=function(M){if(!(M<400))switch(M){case 400:return L("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return L("status.401","Unauthorized. The server is refusing to respond.");case 403:return L("status.403","Forbidden. The server is refusing to respond.");case 404:return L("status.404","Not Found. The requested location could not be found.");case 405:return L("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return L("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return L("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return L("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return L("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return L("status.410","Gone. The requested page is no longer available.");case 411:return L("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return L("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return L("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return L("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return L("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return L("status.500","Internal Server Error.");case 501:return L("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 503:return L("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return L("status.416","HTTP status code {0}",M)}};var N=function(M){function R(){var S=M.call(this,"The user aborted a request")||this;return S.name="AbortError",Object.setPrototypeOf(S,R.prototype),S}return l(R,M),R.is=function(S){return S instanceof R},R}(Error)},800:(o,a,u)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.config=a.loadMessageBundle=a.localize=a.format=a.setPseudo=a.isPseudo=a.isDefined=a.BundleFormat=a.MessageFormat=void 0;var c,l,p,f=u(926);function H(y){return y!==void 0}function m(y,b){return a.isPseudo&&(y="\uFF3B"+y.replace(/[aouei]/g,"$&$&")+"\uFF3D"),b.length===0?y:y.replace(/\{(\d+)\}/g,function(A,B){var q=B[0],L=b[q],D=A;return typeof L=="string"?D=L:typeof L!="number"&&typeof L!="boolean"&&L!=null||(D=String(L)),D})}(p=a.MessageFormat||(a.MessageFormat={})).file="file",p.bundle="bundle",p.both="both",(l=a.BundleFormat||(a.BundleFormat={})).standalone="standalone",l.languagePack="languagePack",function(y){y.is=function(b){var A=b;return A&&H(A.key)&&H(A.comment)}}(c||(c={})),a.isDefined=H,a.isPseudo=!1,a.setPseudo=function(y){a.isPseudo=y},a.format=m,a.localize=function(y,b){for(var A=[],B=2;B<arguments.length;B++)A[B-2]=arguments[B];return m(b,A)},a.loadMessageBundle=function(y){return(0,f.default)().loadMessageBundle(y)},a.config=function(y){return(0,f.default)().config(y)}},926:(o,a)=>{"use strict";var u;function c(){if(u===void 0)throw new Error("No runtime abstraction layer installed");return u}Object.defineProperty(a,"__esModule",{value:!0}),function(l){l.install=function(p){if(p===void 0)throw new Error("No runtime abstraction layer provided");u=p}}(c||(c={})),a.default=c},472:(o,a,u)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.config=a.loadMessageBundle=a.BundleFormat=a.MessageFormat=void 0;var c=u(17),l=u(147),p=u(926),f=u(800),H=u(800);Object.defineProperty(a,"MessageFormat",{enumerable:!0,get:function(){return H.MessageFormat}}),Object.defineProperty(a,"BundleFormat",{enumerable:!0,get:function(){return H.BundleFormat}});var m,y,b=Object.prototype.toString;function A(R){return b.call(R)==="[object Number]"}function B(R){return b.call(R)==="[object String]"}function q(R){return JSON.parse(l.readFileSync(R,"utf8"))}function L(R){return function(S,$){for(var O=[],z=2;z<arguments.length;z++)O[z-2]=arguments[z];return A(S)?S>=R.length?void console.error(`Broken localize call found. Index out of bounds. Stacktrace is
: `.concat(new Error("").stack)):(0,f.format)(R[S],O):B($)?(console.warn("Message ".concat($," didn't get externalized correctly.")),(0,f.format)($,O)):void console.error(`Broken localize call found. Stacktrace is
: `.concat(new Error("").stack))}}function D(R,S){return m[R]=S,S}function G(R){try{return function(S){var $=q(c.join(S,"nls.metadata.json")),O=Object.create(null);for(var z in $){var C=$[z];O[z]=C.messages}return O}(R)}catch(S){return void console.log("Generating default bundle from meta data failed.",S)}}function W(R,S){var $;if(y.languagePackSupport===!0&&y.cacheRoot!==void 0&&y.languagePackId!==void 0&&y.translationsConfigFile!==void 0&&y.translationsConfig!==void 0)try{$=function(z,C){var P,ee,te,se=c.join(y.cacheRoot,"".concat(z.id,"-").concat(z.hash,".json")),oe=!1,ie=!1;try{return P=JSON.parse(l.readFileSync(se,{encoding:"utf8",flag:"r"})),ee=se,te=new Date,l.utimes(ee,te,te,function(){}),P}catch(de){if(de.code==="ENOENT")ie=!0;else{if(!(de instanceof SyntaxError))throw de;console.log("Syntax error parsing message bundle: ".concat(de.message,".")),l.unlink(se,function(we){we&&console.error("Deleting corrupted bundle ".concat(se," failed."))}),oe=!0}}if(P=function(de,we){var He=y.translationsConfig[de.id];if(He){var Lt=q(He).contents,be=q(c.join(we,"nls.metadata.json")),yr=Object.create(null);for(var Vr in be){var Q=be[Vr],Ce=Lt["".concat(de.outDir,"/").concat(Vr)];if(Ce){for(var Y=[],ge=0;ge<Q.keys.length;ge++){var Ne=Q.keys[ge],lt=Ce[B(Ne)?Ne:Ne.key];lt===void 0&&(lt=Q.messages[ge]),Y.push(lt)}yr[Vr]=Y}else yr[Vr]=Q.messages}return yr}}(z,C),!P||oe)return P;if(ie)try{l.writeFileSync(se,JSON.stringify(P),{encoding:"utf8",flag:"wx"})}catch(de){if(de.code==="EEXIST")return P;throw de}return P}(R,S)}catch(z){console.log("Load or create bundle failed ",z)}if(!$){if(y.languagePackSupport)return G(S);var O=function(z){for(var C=y.language;C;){var P=c.join(z,"nls.bundle.".concat(C,".json"));if(l.existsSync(P))return P;var ee=C.lastIndexOf("-");C=ee>0?C.substring(0,ee):void 0}if(C===void 0&&(P=c.join(z,"nls.bundle.json"),l.existsSync(P)))return P}(S);if(O)try{return q(O)}catch(z){console.log("Loading in the box message bundle failed.",z)}$=G(S)}return $}function N(R){if(!R)return f.localize;var S=c.extname(R);if(S&&(R=R.substr(0,R.length-S.length)),y.messageFormat===f.MessageFormat.both||y.messageFormat===f.MessageFormat.bundle){var $=function(oe){for(var ie,de=c.dirname(oe);ie=c.join(de,"nls.metadata.header.json"),!l.existsSync(ie);){var we=c.dirname(de);if(we===de){ie=void 0;break}de=we}return ie}(R);if($){var O=c.dirname($),z=m[O];if(z===void 0)try{var C=JSON.parse(l.readFileSync($,"utf8"));try{var P=W(C,O);z=D(O,P?{header:C,nlsBundle:P}:null)}catch(oe){console.error("Failed to load nls bundle",oe),z=D(O,null)}}catch(oe){console.error("Failed to read header file",oe),z=D(O,null)}if(z){var ee=R.substr(O.length+1).replace(/\\/g,"/"),te=z.nlsBundle[ee];return te===void 0?(console.error("Messages for file ".concat(R," not found. See console for details.")),function(){return"Messages not found."}):L(te)}}}if(y.messageFormat===f.MessageFormat.both||y.messageFormat===f.MessageFormat.file)try{var se=q(function(oe){var ie;if(!(y.cacheLanguageResolution&&ie)){if(f.isPseudo||!y.language)ie=".nls.json";else for(var de=y.language;de;){var we=".nls."+de+".json";if(l.existsSync(oe+we)){ie=we;break}var He=de.lastIndexOf("-");He>0?de=de.substring(0,He):(ie=".nls.json",de=null)}y.cacheLanguageResolution}return oe+ie}(R));return Array.isArray(se)?L(se):(0,f.isDefined)(se.messages)&&(0,f.isDefined)(se.keys)?L(se.messages):(console.error("String bundle '".concat(R,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(oe){oe.code!=="ENOENT"&&console.error("Failed to load single file bundle",oe)}return console.error("Failed to load message bundle for file ".concat(R)),function(){return"Failed to load message bundle. See console for details."}}function M(R){return R&&(B(R.locale)&&(y.locale=R.locale.toLowerCase(),y.language=y.locale,m=Object.create(null)),R.messageFormat!==void 0&&(y.messageFormat=R.messageFormat),R.bundleFormat===f.BundleFormat.standalone&&y.languagePackSupport===!0&&(y.languagePackSupport=!1)),(0,f.setPseudo)(y.locale==="pseudo"),N}(function(){if(y={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:f.MessageFormat.bundle},B(process.env.VSCODE_NLS_CONFIG))try{var R=JSON.parse(process.env.VSCODE_NLS_CONFIG),S=void 0;if(R.availableLanguages){var $=R.availableLanguages["*"];B($)&&(S=$)}if(B(R.locale)&&(y.locale=R.locale.toLowerCase()),S===void 0?y.language=y.locale:S!=="en"&&(y.language=S),function(z){return z===!0||z===!1}(R._languagePackSupport)&&(y.languagePackSupport=R._languagePackSupport),B(R._cacheRoot)&&(y.cacheRoot=R._cacheRoot),B(R._languagePackId)&&(y.languagePackId=R._languagePackId),B(R._translationsConfigFile)){y.translationsConfigFile=R._translationsConfigFile;try{y.translationsConfig=q(y.translationsConfigFile)}catch{if(R._corruptedFile){var O=c.dirname(R._corruptedFile);l.exists(O,function(C){C&&l.writeFile(R._corruptedFile,"corrupted","utf8",function(P){console.error(P)})})}}}}catch{}(0,f.setPseudo)(y.locale==="pseudo"),m=Object.create(null)})(),a.loadMessageBundle=N,a.config=M,p.default.install(Object.freeze({loadMessageBundle:N,config:M}))},374:(o,a)=>{function u(){}Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(c){return u}},491:o=>{"use strict";o.exports=w("assert")},361:o=>{"use strict";o.exports=w("events")},147:o=>{"use strict";o.exports=w("fs")},685:o=>{"use strict";o.exports=w("http")},687:o=>{"use strict";o.exports=w("https")},808:o=>{"use strict";o.exports=w("net")},17:o=>{"use strict";o.exports=w("path")},404:o=>{"use strict";o.exports=w("tls")},310:o=>{"use strict";o.exports=w("url")},796:o=>{"use strict";o.exports=w("zlib")}},r={},i=function o(a){var u=r[a];if(u!==void 0)return u.exports;var c=r[a]={exports:{}};return e[a].call(c.exports,c,c.exports,o),c.exports}(539),n=t;for(var s in i)n[s]=i[s];i.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})()}}),LE={};lW(LE,{config:()=>yW,t:()=>bW});CE.exports=fW(LE);var hW=w("fs"),mW=w("fs/promises"),IE=pW(dW());async function HW(t){if(t.protocol==="file:")return await(0,mW.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:")try{let e=await(0,IE.xhr)({url:t.toString(),followRedirects:5,headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"}});return new TextDecoder().decode(e.body)}catch(e){throw new Error(e.responseText??(0,IE.getErrorStatusDescription)(e.status)??e.toString())}throw new Error("Unsupported protocol")}function gW(t){return(0,hW.readFileSync)(t,"utf8")}var Mu;function yW(t){if("contents"in t){typeof t.contents=="string"?Mu=JSON.parse(t.contents):Mu=t.contents;return}if("fsPath"in t){let e=gW(t.fsPath),r=JSON.parse(e);Mu=SE(r)?r.contents.bundle:r;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((r,i)=>{let n=HW(e).then(s=>{try{let o=JSON.parse(s);Mu=SE(o)?o.contents.bundle:o}catch(o){i(o)}}).catch(s=>{i(s)});r(n)})}}function bW(...t){let e=t[0],r,i,n;if(typeof e=="string"?(r=e,i=e,t.splice(0,1),n=!t||typeof t[0]!="object"?t:t[0]):(i=e.message,r=i,e.comment&&e.comment.length>0&&(r+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),n=e.args??{}),!Mu)return gp(i,n);let s=Mu[r];return s?typeof s=="string"?gp(s,n):s.comment?gp(s.message,n):gp(i,n):gp(i,n)}var vW=/{([^}]+)}/g;function gp(t,e){return t.replace(vW,(r,i)=>e[i]??r)}function SE(t){var e;return typeof((e=t==null?void 0:t.contents)==null?void 0:e.bundle)=="object"&&typeof(t==null?void 0:t.version)=="string"}});var Pt=v(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.NON_CUSTOM_TAG_KEYS=Pe.PRE_DESTROY=Pe.POST_CONSTRUCT=Pe.DESIGN_PARAM_TYPES=Pe.PARAM_TYPES=Pe.TAGGED_PROP=Pe.TAGGED=Pe.MULTI_INJECT_TAG=Pe.INJECT_TAG=Pe.OPTIONAL_TAG=Pe.UNMANAGED_TAG=Pe.NAME_TAG=Pe.NAMED_TAG=void 0;Pe.NAMED_TAG="named";Pe.NAME_TAG="name";Pe.UNMANAGED_TAG="unmanaged";Pe.OPTIONAL_TAG="optional";Pe.INJECT_TAG="inject";Pe.MULTI_INJECT_TAG="multi_inject";Pe.TAGGED="inversify:tagged";Pe.TAGGED_PROP="inversify:tagged_props";Pe.PARAM_TYPES="inversify:paramtypes";Pe.DESIGN_PARAM_TYPES="design:paramtypes";Pe.POST_CONSTRUCT="post_construct";Pe.PRE_DESTROY="pre_destroy";function SW(){return[Pe.INJECT_TAG,Pe.MULTI_INJECT_TAG,Pe.NAME_TAG,Pe.UNMANAGED_TAG,Pe.NAMED_TAG,Pe.OPTIONAL_TAG]}Pe.NON_CUSTOM_TAG_KEYS=SW()});var Oi=v(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.TargetTypeEnum=Xs.BindingTypeEnum=Xs.BindingScopeEnum=void 0;var EW={Request:"Request",Singleton:"Singleton",Transient:"Transient"};Xs.BindingScopeEnum=EW;var xW={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};Xs.BindingTypeEnum=xW;var LW={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};Xs.TargetTypeEnum=LW});var zs=v(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.id=void 0;var CW=0;function PW(){return CW++}uh.id=PW});var GE=v(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.Binding=void 0;var VE=Oi(),DW=zs(),TW=function(){function t(e,r){this.id=(0,DW.id)(),this.activated=!1,this.serviceIdentifier=e,this.scope=r,this.type=VE.BindingTypeEnum.Invalid,this.constraint=function(i){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===VE.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}();ch.Binding=TW});var ar=v(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.STACK_OVERFLOW=ae.CIRCULAR_DEPENDENCY_IN_FACTORY=ae.ON_DEACTIVATION_ERROR=ae.PRE_DESTROY_ERROR=ae.POST_CONSTRUCT_ERROR=ae.ASYNC_UNBIND_REQUIRED=ae.MULTIPLE_POST_CONSTRUCT_METHODS=ae.MULTIPLE_PRE_DESTROY_METHODS=ae.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=ae.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=ae.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=ae.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=ae.ARGUMENTS_LENGTH_MISMATCH=ae.INVALID_DECORATOR_OPERATION=ae.INVALID_TO_SELF_VALUE=ae.LAZY_IN_SYNC=ae.INVALID_FUNCTION_BINDING=ae.INVALID_MIDDLEWARE_RETURN=ae.NO_MORE_SNAPSHOTS_AVAILABLE=ae.INVALID_BINDING_TYPE=ae.NOT_IMPLEMENTED=ae.CIRCULAR_DEPENDENCY=ae.UNDEFINED_INJECT_ANNOTATION=ae.MISSING_INJECT_ANNOTATION=ae.MISSING_INJECTABLE_ANNOTATION=ae.NOT_REGISTERED=ae.CANNOT_UNBIND=ae.AMBIGUOUS_MATCH=ae.KEY_NOT_FOUND=ae.NULL_ARGUMENT=ae.DUPLICATED_METADATA=ae.DUPLICATED_INJECTABLE_DECORATOR=void 0;ae.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.";ae.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:";ae.NULL_ARGUMENT="NULL argument";ae.KEY_NOT_FOUND="Key Not Found";ae.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:";ae.CANNOT_UNBIND="Could not unbind serviceIdentifier:";ae.NOT_REGISTERED="No matching bindings found for serviceIdentifier:";ae.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:";ae.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";var $W=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to  overcome this limitation."};ae.UNDEFINED_INJECT_ANNOTATION=$W;ae.CIRCULAR_DEPENDENCY="Circular dependency found:";ae.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.";ae.INVALID_BINDING_TYPE="Invalid binding type:";ae.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.";ae.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!";ae.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!";var MW=function(t){return"You are attempting to construct '"+t+`' in a synchronous way
 but it has asynchronous dependencies.`};ae.LAZY_IN_SYNC=MW;ae.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier";ae.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 kW=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+(t[0]+" must be >= than the number of constructor arguments of its base class.")};ae.ARGUMENTS_LENGTH_MISMATCH=kW;ae.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.";ae.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').";ae.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean";ae.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean";ae.MULTIPLE_PRE_DESTROY_METHODS="Cannot apply @preDestroy decorator multiple times in the same class";ae.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";ae.ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)";var RW=function(t,e){return"@postConstruct error in class "+t+": "+e};ae.POST_CONSTRUCT_ERROR=RW;var OW=function(t,e){return"@preDestroy error in class "+t+": "+e};ae.PRE_DESTROY_ERROR=OW;var NW=function(t,e){return"onDeactivation() error in class "+t+": "+e};ae.ON_DEACTIVATION_ERROR=NW;var BW=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+"'.")};ae.CIRCULAR_DEPENDENCY_IN_FACTORY=BW;ae.STACK_OVERFLOW="Maximum call stack size exceeded"});var Ub=v(ln=>{"use strict";var FW=ln&&ln.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),UW=ln&&ln.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jW=ln&&ln.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&FW(e,t,r);return UW(e,t),e};Object.defineProperty(ln,"__esModule",{value:!0});ln.MetadataReader=void 0;var Fb=jW(Pt()),qW=function(){function t(){}return t.prototype.getConstructorMetadata=function(e){var r=Reflect.getMetadata(Fb.PARAM_TYPES,e),i=Reflect.getMetadata(Fb.TAGGED,e);return{compilerGeneratedMetadata:r,userGeneratedMetadata:i||{}}},t.prototype.getPropertiesMetadata=function(e){var r=Reflect.getMetadata(Fb.TAGGED_PROP,e)||[];return r},t}();ln.MetadataReader=qW});var KE=v(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.BindingCount=void 0;var WW={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};lh.BindingCount=WW});var jb=v(li=>{"use strict";var VW=li&&li.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),GW=li&&li.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KW=li&&li.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&VW(e,t,r);return GW(e,t),e};Object.defineProperty(li,"__esModule",{value:!0});li.tryAndThrowErrorIfStackOverflow=li.isStackOverflowExeption=void 0;var XW=KW(ar());function XE(t){return t instanceof RangeError||t.message===XW.STACK_OVERFLOW}li.isStackOverflowExeption=XE;var zW=function(t,e){try{return t()}catch(r){throw XE(r)&&(r=e()),r}};li.tryAndThrowErrorIfStackOverflow=zW});var Fu=v(Dt=>{"use strict";var JW=Dt&&Dt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),YW=Dt&&Dt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QW=Dt&&Dt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&JW(e,t,r);return YW(e,t),e};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.getSymbolDescription=Dt.circularDependencyToException=Dt.listMetadataForTarget=Dt.listRegisteredBindingsForServiceIdentifier=Dt.getServiceIdentifierAsString=Dt.getFunctionName=void 0;var ZW=QW(ar());function zE(t){if(typeof t=="function"){var e=t;return e.name}else{if(typeof t=="symbol")return t.toString();var e=t;return e}}Dt.getServiceIdentifierAsString=zE;function eV(t,e,r){var i="",n=r(t,e);return n.length!==0&&(i=`
Registered bindings:`,n.forEach(function(s){var o="Object";s.implementationType!==null&&(o=QE(s.implementationType)),i=i+`
 `+o,s.constraint.metaData&&(i=i+" - "+s.constraint.metaData)})),i}Dt.listRegisteredBindingsForServiceIdentifier=eV;function JE(t,e){return t.parentRequest===null?!1:t.parentRequest.serviceIdentifier===e?!0:JE(t.parentRequest,e)}function tV(t){function e(i,n){n===void 0&&(n=[]);var s=zE(i.serviceIdentifier);return n.push(s),i.parentRequest!==null?e(i.parentRequest,n):n}var r=e(t);return r.reverse().join(" --> ")}function YE(t){t.childRequests.forEach(function(e){if(JE(e,e.serviceIdentifier)){var r=tV(e);throw new Error(ZW.CIRCULAR_DEPENDENCY+" "+r)}else YE(e)})}Dt.circularDependencyToException=YE;function rV(t,e){if(e.isTagged()||e.isNamed()){var r="",i=e.getNamedTag(),n=e.getCustomTags();return i!==null&&(r+=i.toString()+`
`),n!==null&&n.forEach(function(s){r+=s.toString()+`
`})," "+t+`
 `+t+" - "+r}else return" "+t}Dt.listMetadataForTarget=rV;function QE(t){if(t.name)return t.name;var e=t.toString(),r=e.match(/^function\s*([^\s(]+)/);return r?r[1]:"Anonymous function: "+e}Dt.getFunctionName=QE;function iV(t){return t.toString().slice(7,-1)}Dt.getSymbolDescription=iV});var ZE=v(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.Context=void 0;var nV=zs(),sV=function(){function t(e){this.id=(0,nV.id)(),this.container=e}return t.prototype.addPlan=function(e){this.plan=e},t.prototype.setCurrentRequest=function(e){this.currentRequest=e},t}();ph.Context=sV});var Ni=v(pn=>{"use strict";var oV=pn&&pn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),aV=pn&&pn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uV=pn&&pn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oV(e,t,r);return aV(e,t),e};Object.defineProperty(pn,"__esModule",{value:!0});pn.Metadata=void 0;var cV=uV(Pt()),lV=function(){function t(e,r){this.key=e,this.value=r}return t.prototype.toString=function(){return this.key===cV.NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},t}();pn.Metadata=lV});var ex=v(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.Plan=void 0;var pV=function(){function t(e,r){this.parentContext=e,this.rootRequest=r}return t}();fh.Plan=pV});var qb=v(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.LazyServiceIdentifer=void 0;var fV=function(){function t(e){this._cb=e}return t.prototype.unwrap=function(){return this._cb()},t}();dh.LazyServiceIdentifer=fV});var tx=v(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});hh.QueryableString=void 0;var dV=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 r="",i=e.split("").reverse().join("");return r=this.str.split("").reverse().join(""),this.startsWith.call({str:r},i)},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}();hh.QueryableString=dV});var Wb=v(fn=>{"use strict";var hV=fn&&fn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),mV=fn&&fn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HV=fn&&fn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&hV(e,t,r);return mV(e,t),e};Object.defineProperty(fn,"__esModule",{value:!0});fn.Target=void 0;var us=HV(Pt()),gV=zs(),yV=Fu(),rx=Ni(),bV=tx(),vV=function(){function t(e,r,i,n){this.id=(0,gV.id)(),this.type=e,this.serviceIdentifier=i;var s=typeof r=="symbol"?(0,yV.getSymbolDescription)(r):r;this.name=new bV.QueryableString(s||""),this.identifier=r,this.metadata=new Array;var o=null;typeof n=="string"?o=new rx.Metadata(us.NAMED_TAG,n):n instanceof rx.Metadata&&(o=n),o!==null&&this.metadata.push(o)}return t.prototype.hasTag=function(e){for(var r=0,i=this.metadata;r<i.length;r++){var n=i[r];if(n.key===e)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(us.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(e){return this.matchesTag(us.MULTI_INJECT_TAG)(e)},t.prototype.isNamed=function(){return this.hasTag(us.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some(function(e){return us.NON_CUSTOM_TAG_KEYS.every(function(r){return e.key!==r})})},t.prototype.isOptional=function(){return this.matchesTag(us.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(e){return e.key===us.NAMED_TAG})[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(e){return us.NON_CUSTOM_TAG_KEYS.every(function(r){return e.key!==r})}):null},t.prototype.matchesNamedTag=function(e){return this.matchesTag(us.NAMED_TAG)(e)},t.prototype.matchesTag=function(e){var r=this;return function(i){for(var n=0,s=r.metadata;n<s.length;n++){var o=s[n];if(o.key===e&&o.value===i)return!0}return!1}},t}();fn.Target=vV});var lx=v(ur=>{"use strict";var _V=ur&&ur.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),wV=ur&&ur.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ix=ur&&ur.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&_V(e,t,r);return wV(e,t),e},mh=ur&&ur.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(ur,"__esModule",{value:!0});ur.getFunctionName=ur.getBaseClassDependencyCount=ur.getDependencies=void 0;var AV=qb(),Vb=ix(ar()),nx=Oi(),vp=ix(Pt()),Gb=Fu();Object.defineProperty(ur,"getFunctionName",{enumerable:!0,get:function(){return Gb.getFunctionName}});var sx=Wb();function IV(t,e){var r=(0,Gb.getFunctionName)(e);return ox(t,r,e,!1)}ur.getDependencies=IV;function ox(t,e,r,i){var n=t.getConstructorMetadata(r),s=n.compilerGeneratedMetadata;if(s===void 0){var o=Vb.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(o)}var a=n.userGeneratedMetadata,u=Object.keys(a),c=r.length===0&&u.length>0,l=u.length>r.length,p=c||l?u.length:r.length,f=EV(i,e,s,a,p),H=ax(t,r,e),m=mh(mh([],f,!0),H,!0);return m}function SV(t,e,r,i,n){var s=n[t.toString()]||[],o=cx(s),a=o.unmanaged!==!0,u=i[t],c=o.inject||o.multiInject;if(u=c||u,u instanceof AV.LazyServiceIdentifer&&(u=u.unwrap()),a){var l=u===Object,p=u===Function,f=u===void 0,H=l||p||f;if(!e&&H){var m=Vb.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+r+".";throw new Error(m)}var y=new sx.Target(nx.TargetTypeEnum.ConstructorArgument,o.targetName,u);return y.metadata=s,y}return null}function EV(t,e,r,i,n){for(var s=[],o=0;o<n;o++){var a=o,u=SV(a,t,e,r,i);u!==null&&s.push(u)}return s}function xV(t,e,r,i){var n=t||e;if(n===void 0){var s=Vb.MISSING_INJECTABLE_ANNOTATION+" for property "+String(r)+" in class "+i+".";throw new Error(s)}return n}function ax(t,e,r){for(var i=t.getPropertiesMetadata(e),n=[],s=Object.getOwnPropertySymbols(i),o=Object.keys(i),a=o.concat(s),u=0,c=a;u<c.length;u++){var l=c[u],p=i[l],f=cx(p),H=f.targetName||l,m=xV(f.inject,f.multiInject,l,r),y=new sx.Target(nx.TargetTypeEnum.ClassProperty,H,m);y.metadata=p,n.push(y)}var b=Object.getPrototypeOf(e.prototype).constructor;if(b!==Object){var A=ax(t,b,r);n=mh(mh([],n,!0),A,!0)}return n}function ux(t,e){var r=Object.getPrototypeOf(e.prototype).constructor;if(r!==Object){var i=(0,Gb.getFunctionName)(r),n=ox(t,i,r,!0),s=n.map(function(u){return u.metadata.filter(function(c){return c.key===vp.UNMANAGED_TAG})}),o=[].concat.apply([],s).length,a=n.length-o;return a>0?a:ux(t,r)}else return 0}ur.getBaseClassDependencyCount=ux;function cx(t){var e={};return t.forEach(function(r){e[r.key.toString()]=r.value}),{inject:e[vp.INJECT_TAG],multiInject:e[vp.MULTI_INJECT_TAG],targetName:e[vp.NAME_TAG],unmanaged:e[vp.UNMANAGED_TAG]}}});var px=v(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});Hh.Request=void 0;var LV=zs(),CV=function(){function t(e,r,i,n,s){this.id=(0,LV.id)(),this.serviceIdentifier=e,this.parentContext=r,this.parentRequest=i,this.target=s,this.childRequests=[],this.bindings=Array.isArray(n)?n:[n],this.requestScope=i===null?new Map:null}return t.prototype.addChildRequest=function(e,r,i){var n=new t(e,this.parentContext,this,r,i);return this.childRequests.push(n),n},t}();Hh.Request=CV});var Yb=v(Mr=>{"use strict";var PV=Mr&&Mr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),DV=Mr&&Mr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hx=Mr&&Mr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&PV(e,t,r);return DV(e,t),e};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.getBindingDictionary=Mr.createMockRequest=Mr.plan=void 0;var gh=KE(),Xb=hx(ar()),mx=Oi(),fx=hx(Pt()),TV=jb(),Uu=Fu(),Hx=ZE(),zb=Ni(),$V=ex(),Kb=lx(),Jb=px(),gx=Wb();function yx(t){return t._bindingDictionary}Mr.getBindingDictionary=yx;function MV(t,e,r,i,n,s){var o=t?fx.MULTI_INJECT_TAG:fx.INJECT_TAG,a=new zb.Metadata(o,r),u=new gx.Target(e,i,r,a);if(n!==void 0){var c=new zb.Metadata(n,s);u.metadata.push(c)}return u}function dx(t,e,r,i,n){var s=_p(r.container,n.serviceIdentifier),o=[];return s.length===gh.BindingCount.NoBindingsAvailable&&r.container.options.autoBindInjectable&&typeof n.serviceIdentifier=="function"&&t.getConstructorMetadata(n.serviceIdentifier).compilerGeneratedMetadata&&(r.container.bind(n.serviceIdentifier).toSelf(),s=_p(r.container,n.serviceIdentifier)),e?o=s:o=s.filter(function(a){var u=new Jb.Request(a.serviceIdentifier,r,i,a,n);return a.constraint(u)}),kV(n.serviceIdentifier,o,n,r.container),o}function kV(t,e,r,i){switch(e.length){case gh.BindingCount.NoBindingsAvailable:if(r.isOptional())return e;var n=(0,Uu.getServiceIdentifierAsString)(t),s=Xb.NOT_REGISTERED;throw s+=(0,Uu.listMetadataForTarget)(n,r),s+=(0,Uu.listRegisteredBindingsForServiceIdentifier)(i,n,_p),new Error(s);case gh.BindingCount.OnlyOneBindingAvailable:return e;case gh.BindingCount.MultipleBindingsAvailable:default:if(r.isArray())return e;var n=(0,Uu.getServiceIdentifierAsString)(t),s=Xb.AMBIGUOUS_MATCH+" "+n;throw s+=(0,Uu.listRegisteredBindingsForServiceIdentifier)(i,n,_p),new Error(s)}}function bx(t,e,r,i,n,s){var o,a;if(n===null){o=dx(t,e,i,null,s),a=new Jb.Request(r,i,null,o,s);var u=new $V.Plan(i,a);i.addPlan(u)}else o=dx(t,e,i,n,s),a=n.addChildRequest(s.serviceIdentifier,o,s);o.forEach(function(c){var l=null;if(s.isArray())l=a.addChildRequest(c.serviceIdentifier,c,s);else{if(c.cache)return;l=a}if(c.type===mx.BindingTypeEnum.Instance&&c.implementationType!==null){var p=(0,Kb.getDependencies)(t,c.implementationType);if(!i.container.options.skipBaseClassChecks){var f=(0,Kb.getBaseClassDependencyCount)(t,c.implementationType);if(p.length<f){var H=Xb.ARGUMENTS_LENGTH_MISMATCH((0,Kb.getFunctionName)(c.implementationType));throw new Error(H)}}p.forEach(function(m){bx(t,!1,m.serviceIdentifier,i,l,m)})}})}function _p(t,e){var r=[],i=yx(t);return i.hasKey(e)?r=i.get(e):t.parent!==null&&(r=_p(t.parent,e)),r}function RV(t,e,r,i,n,s,o,a){a===void 0&&(a=!1);var u=new Hx.Context(e),c=MV(r,i,n,"",s,o);try{return bx(t,a,n,u,null,c),u}catch(l){throw(0,TV.isStackOverflowExeption)(l)&&(0,Uu.circularDependencyToException)(u.plan.rootRequest),l}}Mr.plan=RV;function OV(t,e,r,i){var n=new gx.Target(mx.TargetTypeEnum.Variable,"",e,new zb.Metadata(r,i)),s=new Hx.Context(t),o=new Jb.Request(e,s,null,[],n);return o}Mr.createMockRequest=OV});var wp=v(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.isPromiseOrContainsPromise=ju.isPromise=void 0;function Qb(t){var e=typeof t=="object"&&t!==null||typeof t=="function";return e&&typeof t.then=="function"}ju.isPromise=Qb;function NV(t){return Qb(t)?!0:Array.isArray(t)&&t.some(Qb)}ju.isPromiseOrContainsPromise=NV});var vx=v(dn=>{"use strict";var BV=dn&&dn.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},FV=dn&&dn.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(dn,"__esModule",{value:!0});dn.saveToScope=dn.tryGetFromScope=void 0;var yh=ue(),UV=wp(),jV=function(t,e){return e.scope===yh.BindingScopeEnum.Singleton&&e.activated?e.cache:e.scope===yh.BindingScopeEnum.Request&&t.has(e.id)?t.get(e.id):null};dn.tryGetFromScope=jV;var qV=function(t,e,r){e.scope===yh.BindingScopeEnum.Singleton&&VV(e,r),e.scope===yh.BindingScopeEnum.Request&&WV(t,e,r)};dn.saveToScope=qV;var WV=function(t,e,r){t.has(e.id)||t.set(e.id,r)},VV=function(t,e){t.cache=e,t.activated=!0,(0,UV.isPromise)(e)&&GV(t,e)},GV=function(t,e){return BV(void 0,void 0,void 0,function(){var r,i;return FV(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e];case 1:return r=n.sent(),t.cache=r,[3,3];case 2:throw i=n.sent(),t.cache=null,t.activated=!1,i;case 3:return[2]}})})}});var _x=v(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.FactoryType=void 0;var KV;(function(t){t.DynamicValue="toDynamicValue",t.Factory="toFactory",t.Provider="toProvider"})(KV=Ap.FactoryType||(Ap.FactoryType={}))});var ev=v(kr=>{"use strict";var XV=kr&&kr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),zV=kr&&kr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JV=kr&&kr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&XV(e,t,r);return zV(e,t),e};Object.defineProperty(kr,"__esModule",{value:!0});kr.getFactoryDetails=kr.ensureFullyBound=kr.multiBindToService=void 0;var YV=ue(),QV=JV(ar()),hn=Oi(),Zb=_x(),ZV=function(t){return function(e){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.forEach(function(n){return t.bind(n).toService(e)})}}};kr.multiBindToService=ZV;var e4=function(t){var e=null;switch(t.type){case hn.BindingTypeEnum.ConstantValue:case hn.BindingTypeEnum.Function:e=t.cache;break;case hn.BindingTypeEnum.Constructor:case hn.BindingTypeEnum.Instance:e=t.implementationType;break;case hn.BindingTypeEnum.DynamicValue:e=t.dynamicValue;break;case hn.BindingTypeEnum.Provider:e=t.provider;break;case hn.BindingTypeEnum.Factory:e=t.factory;break}if(e===null){var r=(0,YV.getServiceIdentifierAsString)(t.serviceIdentifier);throw new Error(QV.INVALID_BINDING_TYPE+" "+r)}};kr.ensureFullyBound=e4;var t4=function(t){switch(t.type){case hn.BindingTypeEnum.Factory:return{factory:t.factory,factoryType:Zb.FactoryType.Factory};case hn.BindingTypeEnum.Provider:return{factory:t.provider,factoryType:Zb.FactoryType.Provider};case hn.BindingTypeEnum.DynamicValue:return{factory:t.dynamicValue,factoryType:Zb.FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+t.type)}};kr.getFactoryDetails=t4});var xx=v(Kt=>{"use strict";var qu=Kt&&Kt.__assign||function(){return qu=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},qu.apply(this,arguments)},r4=Kt&&Kt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),i4=Kt&&Kt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n4=Kt&&Kt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&r4(e,t,r);return i4(e,t),e},Ix=Kt&&Kt.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},Sx=Kt&&Kt.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},s4=Kt&&Kt.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.resolveInstance=void 0;var tv=ar(),iv=Oi(),rv=n4(Pt()),nv=wp();function o4(t,e){return t.reduce(function(r,i){var n=e(i),s=i.target.type;return s===iv.TargetTypeEnum.ConstructorArgument?r.constructorInjections.push(n):(r.propertyRequests.push(i),r.propertyInjections.push(n)),r.isAsync||(r.isAsync=(0,nv.isPromiseOrContainsPromise)(n)),r},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function a4(t,e,r){var i;if(e.length>0){var n=o4(e,r),s=qu(qu({},n),{constr:t});n.isAsync?i=u4(s):i=Ex(s)}else i=new t;return i}function Ex(t){var e,r=new((e=t.constr).bind.apply(e,s4([void 0],t.constructorInjections,!1)));return t.propertyRequests.forEach(function(i,n){var s=i.target.identifier,o=t.propertyInjections[n];r[s]=o}),r}function u4(t){return Ix(this,void 0,void 0,function(){var e,r;return Sx(this,function(i){switch(i.label){case 0:return[4,wx(t.constructorInjections)];case 1:return e=i.sent(),[4,wx(t.propertyInjections)];case 2:return r=i.sent(),[2,Ex(qu(qu({},t),{constructorInjections:e,propertyInjections:r}))]}})})}function wx(t){return Ix(this,void 0,void 0,function(){var e,r,i,n;return Sx(this,function(s){for(e=[],r=0,i=t;r<i.length;r++)n=i[r],Array.isArray(n)?e.push(Promise.all(n)):e.push(n);return[2,Promise.all(e)]})})}function Ax(t,e){var r=c4(t,e);return(0,nv.isPromise)(r)?r.then(function(){return e}):e}function c4(t,e){var r,i;if(Reflect.hasMetadata(rv.POST_CONSTRUCT,t)){var n=Reflect.getMetadata(rv.POST_CONSTRUCT,t);try{return(i=(r=e)[n.value])===null||i===void 0?void 0:i.call(r)}catch(s){throw new Error((0,tv.POST_CONSTRUCT_ERROR)(t.name,s.message))}}}function l4(t,e){t.scope!==iv.BindingScopeEnum.Singleton&&p4(t,e)}function p4(t,e){var r="Class cannot be instantiated in "+(t.scope===iv.BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof t.onDeactivation=="function")throw new Error((0,tv.ON_DEACTIVATION_ERROR)(e.name,r));if(Reflect.hasMetadata(rv.PRE_DESTROY,e))throw new Error((0,tv.PRE_DESTROY_ERROR)(e.name,r))}function f4(t,e,r,i){l4(t,e);var n=a4(e,r,i);return(0,nv.isPromise)(n)?n.then(function(s){return Ax(e,s)}):Ax(e,n)}Kt.resolveInstance=f4});var Tx=v(Rr=>{"use strict";var d4=Rr&&Rr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),h4=Rr&&Rr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),m4=Rr&&Rr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&d4(e,t,r);return h4(e,t),e},H4=Rr&&Rr.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},g4=Rr&&Rr.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.resolve=void 0;var y4=m4(ar()),bh=Oi(),b4=Yb(),Lx=vx(),sv=wp(),Px=ev(),v4=jb(),_4=xx(),ov=function(t){return function(e){e.parentContext.setCurrentRequest(e);var r=e.bindings,i=e.childRequests,n=e.target&&e.target.isArray(),s=!e.parentRequest||!e.parentRequest.target||!e.target||!e.parentRequest.target.matchesArray(e.target.serviceIdentifier);if(n&&s)return i.map(function(a){var u=ov(t);return u(a)});if(e.target.isOptional()&&r.length===0)return;var o=r[0];return S4(t,e,o)}},w4=function(t,e){var r=(0,Px.getFactoryDetails)(t);return(0,v4.tryAndThrowErrorIfStackOverflow)(function(){return r.factory.bind(t)(e)},function(){return new Error(y4.CIRCULAR_DEPENDENCY_IN_FACTORY(r.factoryType,e.currentRequest.serviceIdentifier.toString()))})},A4=function(t,e,r){var i,n=e.childRequests;switch((0,Px.ensureFullyBound)(r),r.type){case bh.BindingTypeEnum.ConstantValue:case bh.BindingTypeEnum.Function:i=r.cache;break;case bh.BindingTypeEnum.Constructor:i=r.implementationType;break;case bh.BindingTypeEnum.Instance:i=(0,_4.resolveInstance)(r,r.implementationType,n,ov(t));break;default:i=w4(r,e.parentContext)}return i},I4=function(t,e,r){var i=(0,Lx.tryGetFromScope)(t,e);return i!==null||(i=r(),(0,Lx.saveToScope)(t,e,i)),i},S4=function(t,e,r){return I4(t,r,function(){var i=A4(t,e,r);return(0,sv.isPromise)(i)?i=i.then(function(n){return Cx(e,r,n)}):i=Cx(e,r,i),i})};function Cx(t,e,r){var i=E4(t.parentContext,e,r),n=C4(t.parentContext.container),s,o=n.next();do{s=o.value;var a=t.parentContext,u=t.serviceIdentifier,c=L4(s,u);(0,sv.isPromise)(i)?i=Dx(c,a,i):i=x4(c,a,i),o=n.next()}while(o.done!==!0&&!(0,b4.getBindingDictionary)(s).hasKey(t.serviceIdentifier));return i}var E4=function(t,e,r){var i;return typeof e.onActivation=="function"?i=e.onActivation(t,r):i=r,i},x4=function(t,e,r){for(var i=t.next();!i.done;){if(r=i.value(e,r),(0,sv.isPromise)(r))return Dx(t,e,r);i=t.next()}return r},Dx=function(t,e,r){return H4(void 0,void 0,void 0,function(){var i,n;return g4(this,function(s){switch(s.label){case 0:return[4,r];case 1:i=s.sent(),n=t.next(),s.label=2;case 2:return n.done?[3,4]:[4,n.value(e,i)];case 3:return i=s.sent(),n=t.next(),[3,2];case 4:return[2,i]}})})},L4=function(t,e){var r=t._activations;return r.hasKey(e)?r.get(e).values():[].values()},C4=function(t){for(var e=[t],r=t.parent;r!==null;)e.push(r),r=r.parent;var i=function(){var s=e.pop();return s!==void 0?{done:!1,value:s}:{done:!0,value:void 0}},n={next:i};return n};function P4(t){var e=ov(t.plan.rootRequest.requestScope);return e(t.plan.rootRequest)}Rr.resolve=P4});var av=v(cr=>{"use strict";var D4=cr&&cr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),T4=cr&&cr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$4=cr&&cr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&D4(e,t,r);return T4(e,t),e};Object.defineProperty(cr,"__esModule",{value:!0});cr.typeConstraint=cr.namedConstraint=cr.taggedConstraint=cr.traverseAncerstors=void 0;var M4=$4(Pt()),k4=Ni(),$x=function(t,e){var r=t.parentRequest;return r!==null?e(r)?!0:$x(r,e):!1};cr.traverseAncerstors=$x;var Mx=function(t){return function(e){var r=function(i){return i!==null&&i.target!==null&&i.target.matchesTag(t)(e)};return r.metaData=new k4.Metadata(t,e),r}};cr.taggedConstraint=Mx;var R4=Mx(M4.NAMED_TAG);cr.namedConstraint=R4;var O4=function(t){return function(e){var r=null;if(e!==null)if(r=e.bindings[0],typeof t=="string"){var i=r.serviceIdentifier;return i===t}else{var n=e.bindings[0].implementationType;return t===n}return!1}};cr.typeConstraint=O4});var _h=v(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});vh.BindingWhenSyntax=void 0;var br=wh(),Ot=av(),N4=function(){function t(e){this._binding=e}return t.prototype.when=function(e){return this._binding.constraint=e,new br.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(e){return this._binding.constraint=(0,Ot.namedConstraint)(e),new br.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){if(e===null)return!1;var r=e.target!==null&&!e.target.isNamed()&&!e.target.isTagged();return r},new br.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(e,r){return this._binding.constraint=(0,Ot.taggedConstraint)(e)(r),new br.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(r){return r!==null&&(0,Ot.typeConstraint)(e)(r.parentRequest)},new br.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(e){return this._binding.constraint=function(r){return r!==null&&(0,Ot.namedConstraint)(e)(r.parentRequest)},new br.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&(0,Ot.taggedConstraint)(e)(r)(i.parentRequest)},new br.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(r){return r!==null&&(0,Ot.traverseAncerstors)(r,(0,Ot.typeConstraint)(e))},new br.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,Ot.traverseAncerstors)(r,(0,Ot.typeConstraint)(e))},new br.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(r){return r!==null&&(0,Ot.traverseAncerstors)(r,(0,Ot.namedConstraint)(e))},new br.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,Ot.traverseAncerstors)(r,(0,Ot.namedConstraint)(e))},new br.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&(0,Ot.traverseAncerstors)(i,(0,Ot.taggedConstraint)(e)(r))},new br.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&!(0,Ot.traverseAncerstors)(i,(0,Ot.taggedConstraint)(e)(r))},new br.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(r){return r!==null&&(0,Ot.traverseAncerstors)(r,e)},new br.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,Ot.traverseAncerstors)(r,e)},new br.BindingOnSyntax(this._binding)},t}();vh.BindingWhenSyntax=N4});var wh=v(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});Ah.BindingOnSyntax=void 0;var kx=_h(),B4=function(){function t(e){this._binding=e}return t.prototype.onActivation=function(e){return this._binding.onActivation=e,new kx.BindingWhenSyntax(this._binding)},t.prototype.onDeactivation=function(e){return this._binding.onDeactivation=e,new kx.BindingWhenSyntax(this._binding)},t}();Ah.BindingOnSyntax=B4});var uv=v(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});Ih.BindingWhenOnSyntax=void 0;var F4=wh(),U4=_h(),j4=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new U4.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new F4.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,r){return this._bindingWhenSyntax.whenTargetTagged(e,r)},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,r){return this._bindingWhenSyntax.whenParentTagged(e,r)},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,r){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,r)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,r){return this._bindingWhenSyntax.whenNoAncestorTagged(e,r)},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}();Ih.BindingWhenOnSyntax=j4});var Rx=v(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.BindingInSyntax=void 0;var cv=Oi(),lv=uv(),q4=function(){function t(e){this._binding=e}return t.prototype.inRequestScope=function(){return this._binding.scope=cv.BindingScopeEnum.Request,new lv.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=cv.BindingScopeEnum.Singleton,new lv.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=cv.BindingScopeEnum.Transient,new lv.BindingWhenOnSyntax(this._binding)},t}();Sh.BindingInSyntax=q4});var Ox=v(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});Eh.BindingInWhenOnSyntax=void 0;var W4=Rx(),V4=wh(),G4=_h(),K4=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new G4.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new V4.BindingOnSyntax(this._binding),this._bindingInSyntax=new W4.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,r){return this._bindingWhenSyntax.whenTargetTagged(e,r)},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,r){return this._bindingWhenSyntax.whenParentTagged(e,r)},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,r){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,r)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,r){return this._bindingWhenSyntax.whenNoAncestorTagged(e,r)},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}();Eh.BindingInWhenOnSyntax=K4});var Fx=v(mn=>{"use strict";var X4=mn&&mn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),z4=mn&&mn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),J4=mn&&mn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&X4(e,t,r);return z4(e,t),e};Object.defineProperty(mn,"__esModule",{value:!0});mn.BindingToSyntax=void 0;var Nx=J4(ar()),vr=Oi(),Bx=Ox(),Wu=uv(),Y4=function(){function t(e){this._binding=e}return t.prototype.to=function(e){return this._binding.type=vr.BindingTypeEnum.Instance,this._binding.implementationType=e,new Bx.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+Nx.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},t.prototype.toConstantValue=function(e){return this._binding.type=vr.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=vr.BindingScopeEnum.Singleton,new Wu.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(e){return this._binding.type=vr.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new Bx.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(e){return this._binding.type=vr.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=vr.BindingScopeEnum.Singleton,new Wu.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(e){return this._binding.type=vr.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=vr.BindingScopeEnum.Singleton,new Wu.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(e){if(typeof e!="function")throw new Error(Nx.INVALID_FUNCTION_BINDING);var r=this.toConstantValue(e);return this._binding.type=vr.BindingTypeEnum.Function,this._binding.scope=vr.BindingScopeEnum.Singleton,r},t.prototype.toAutoFactory=function(e){return this._binding.type=vr.BindingTypeEnum.Factory,this._binding.factory=function(r){var i=function(){return r.container.get(e)};return i},this._binding.scope=vr.BindingScopeEnum.Singleton,new Wu.BindingWhenOnSyntax(this._binding)},t.prototype.toAutoNamedFactory=function(e){return this._binding.type=vr.BindingTypeEnum.Factory,this._binding.factory=function(r){return function(i){return r.container.getNamed(e,i)}},new Wu.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(e){return this._binding.type=vr.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=vr.BindingScopeEnum.Singleton,new Wu.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(e){this.toDynamicValue(function(r){return r.container.get(e)})},t}();mn.BindingToSyntax=Y4});var Ux=v(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});xh.ContainerSnapshot=void 0;var Q4=function(){function t(){}return t.of=function(e,r,i,n,s){var o=new t;return o.bindings=e,o.middleware=r,o.deactivations=n,o.activations=i,o.moduleActivationStore=s,o},t}();xh.ContainerSnapshot=Q4});var jx=v(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});Lh.isClonable=void 0;function Z4(t){return typeof t=="object"&&t!==null&&"clone"in t&&typeof t.clone=="function"}Lh.isClonable=Z4});var pv=v(Hn=>{"use strict";var e5=Hn&&Hn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),t5=Hn&&Hn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r5=Hn&&Hn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&e5(e,t,r);return t5(e,t),e};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Lookup=void 0;var Aa=r5(ar()),i5=jx(),n5=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(e,r){if(e==null)throw new Error(Aa.NULL_ARGUMENT);if(r==null)throw new Error(Aa.NULL_ARGUMENT);var i=this._map.get(e);i!==void 0?i.push(r):this._map.set(e,[r])},t.prototype.get=function(e){if(e==null)throw new Error(Aa.NULL_ARGUMENT);var r=this._map.get(e);if(r!==void 0)return r;throw new Error(Aa.KEY_NOT_FOUND)},t.prototype.remove=function(e){if(e==null)throw new Error(Aa.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Aa.KEY_NOT_FOUND)},t.prototype.removeIntersection=function(e){var r=this;this.traverse(function(i,n){var s=e.hasKey(i)?e.get(i):void 0;if(s!==void 0){var o=n.filter(function(a){return!s.some(function(u){return a===u})});r._setValue(i,o)}})},t.prototype.removeByCondition=function(e){var r=this,i=[];return this._map.forEach(function(n,s){for(var o=[],a=0,u=n;a<u.length;a++){var c=u[a],l=e(c);l?i.push(c):o.push(c)}r._setValue(s,o)}),i},t.prototype.hasKey=function(e){if(e==null)throw new Error(Aa.NULL_ARGUMENT);return this._map.has(e)},t.prototype.clone=function(){var e=new t;return this._map.forEach(function(r,i){r.forEach(function(n){return e.add(i,(0,i5.isClonable)(n)?n.clone():n)})}),e},t.prototype.traverse=function(e){this._map.forEach(function(r,i){e(i,r)})},t.prototype._setValue=function(e,r){r.length>0?this._map.set(e,r):this._map.delete(e)},t}();Hn.Lookup=n5});var Wx=v(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});Ch.ModuleActivationStore=void 0;var qx=pv(),s5=function(){function t(){this._map=new Map}return t.prototype.remove=function(e){if(this._map.has(e)){var r=this._map.get(e);return this._map.delete(e),r}return this._getEmptyHandlersStore()},t.prototype.addDeactivation=function(e,r,i){this._getModuleActivationHandlers(e).onDeactivations.add(r,i)},t.prototype.addActivation=function(e,r,i){this._getModuleActivationHandlers(e).onActivations.add(r,i)},t.prototype.clone=function(){var e=new t;return this._map.forEach(function(r,i){e._map.set(i,{onActivations:r.onActivations.clone(),onDeactivations:r.onDeactivations.clone()})}),e},t.prototype._getModuleActivationHandlers=function(e){var r=this._map.get(e);return r===void 0&&(r=this._getEmptyHandlersStore(),this._map.set(e,r)),r},t.prototype._getEmptyHandlersStore=function(){var e={onActivations:new qx.Lookup,onDeactivations:new qx.Lookup};return e},t}();Ch.ModuleActivationStore=s5});var Gx=v(Xt=>{"use strict";var Dh=Xt&&Xt.__assign||function(){return Dh=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},Dh.apply(this,arguments)},o5=Xt&&Xt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),a5=Xt&&Xt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Vx=Xt&&Xt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&o5(e,t,r);return a5(e,t),e},pi=Xt&&Xt.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},fi=Xt&&Xt.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},u5=Xt&&Xt.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.Container=void 0;var c5=GE(),Bi=Vx(ar()),Vu=Oi(),Ia=Vx(Pt()),l5=Ub(),Ph=Yb(),p5=Tx(),f5=Fx(),Sa=wp(),d5=zs(),h5=Fu(),m5=Ux(),Ip=pv(),H5=Wx(),g5=function(){function t(e){var r=e||{};if(typeof r!="object")throw new Error(""+Bi.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(r.defaultScope===void 0)r.defaultScope=Vu.BindingScopeEnum.Transient;else if(r.defaultScope!==Vu.BindingScopeEnum.Singleton&&r.defaultScope!==Vu.BindingScopeEnum.Transient&&r.defaultScope!==Vu.BindingScopeEnum.Request)throw new Error(""+Bi.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(r.autoBindInjectable===void 0)r.autoBindInjectable=!1;else if(typeof r.autoBindInjectable!="boolean")throw new Error(""+Bi.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(r.skipBaseClassChecks===void 0)r.skipBaseClassChecks=!1;else if(typeof r.skipBaseClassChecks!="boolean")throw new Error(""+Bi.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:r.autoBindInjectable,defaultScope:r.defaultScope,skipBaseClassChecks:r.skipBaseClassChecks},this.id=(0,d5.id)(),this._bindingDictionary=new Ip.Lookup,this._snapshots=[],this._middleware=null,this._activations=new Ip.Lookup,this._deactivations=new Ip.Lookup,this.parent=null,this._metadataReader=new l5.MetadataReader,this._moduleActivationStore=new H5.ModuleActivationStore}return t.merge=function(e,r){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=new t,o=u5([e,r],i,!0).map(function(c){return(0,Ph.getBindingDictionary)(c)}),a=(0,Ph.getBindingDictionary)(s);function u(c,l){c.traverse(function(p,f){f.forEach(function(H){l.add(H.serviceIdentifier,H.clone())})})}return o.forEach(function(c){u(c,a)}),s},t.prototype.load=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var i=this._getContainerModuleHelpersFactory(),n=0,s=e;n<s.length;n++){var o=s[n],a=i(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction,a.unbindAsyncFunction,a.onActivationFunction,a.onDeactivationFunction)}},t.prototype.loadAsync=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return pi(this,void 0,void 0,function(){var i,n,s,o,a;return fi(this,function(u){switch(u.label){case 0:i=this._getContainerModuleHelpersFactory(),n=0,s=e,u.label=1;case 1:return n<s.length?(o=s[n],a=i(o.id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction,a.unbindAsyncFunction,a.onActivationFunction,a.onDeactivationFunction)]):[3,4];case 2:u.sent(),u.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},t.prototype.unload=function(){for(var e=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(n){var s=e._removeModuleBindings(n.id);e._deactivateSingletons(s),e._removeModuleHandlers(n.id)})},t.prototype.unloadAsync=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return pi(this,void 0,void 0,function(){var i,n,s,o;return fi(this,function(a){switch(a.label){case 0:i=0,n=e,a.label=1;case 1:return i<n.length?(s=n[i],o=this._removeModuleBindings(s.id),[4,this._deactivateSingletonsAsync(o)]):[3,4];case 2:a.sent(),this._removeModuleHandlers(s.id),a.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.bind=function(e){var r=this.options.defaultScope||Vu.BindingScopeEnum.Transient,i=new c5.Binding(e,r);return this._bindingDictionary.add(e,i),new f5.BindingToSyntax(i)},t.prototype.rebind=function(e){return this.unbind(e),this.bind(e)},t.prototype.rebindAsync=function(e){return pi(this,void 0,void 0,function(){return fi(this,function(r){switch(r.label){case 0:return[4,this.unbindAsync(e)];case 1:return r.sent(),[2,this.bind(e)]}})})},t.prototype.unbind=function(e){if(this._bindingDictionary.hasKey(e)){var r=this._bindingDictionary.get(e);this._deactivateSingletons(r)}this._removeServiceFromDictionary(e)},t.prototype.unbindAsync=function(e){return pi(this,void 0,void 0,function(){var r;return fi(this,function(i){switch(i.label){case 0:return this._bindingDictionary.hasKey(e)?(r=this._bindingDictionary.get(e),[4,this._deactivateSingletonsAsync(r)]):[3,2];case 1:i.sent(),i.label=2;case 2:return this._removeServiceFromDictionary(e),[2]}})})},t.prototype.unbindAll=function(){var e=this;this._bindingDictionary.traverse(function(r,i){e._deactivateSingletons(i)}),this._bindingDictionary=new Ip.Lookup},t.prototype.unbindAllAsync=function(){return pi(this,void 0,void 0,function(){var e,r=this;return fi(this,function(i){switch(i.label){case 0:return e=[],this._bindingDictionary.traverse(function(n,s){e.push(r._deactivateSingletonsAsync(s))}),[4,Promise.all(e)];case 1:return i.sent(),this._bindingDictionary=new Ip.Lookup,[2]}})})},t.prototype.onActivation=function(e,r){this._activations.add(e,r)},t.prototype.onDeactivation=function(e,r){this._deactivations.add(e,r)},t.prototype.isBound=function(e){var r=this._bindingDictionary.hasKey(e);return!r&&this.parent&&(r=this.parent.isBound(e)),r},t.prototype.isCurrentBound=function(e){return this._bindingDictionary.hasKey(e)},t.prototype.isBoundNamed=function(e,r){return this.isBoundTagged(e,Ia.NAMED_TAG,r)},t.prototype.isBoundTagged=function(e,r,i){var n=!1;if(this._bindingDictionary.hasKey(e)){var s=this._bindingDictionary.get(e),o=(0,Ph.createMockRequest)(this,e,r,i);n=s.some(function(a){return a.constraint(o)})}return!n&&this.parent&&(n=this.parent.isBoundTagged(e,r,i)),n},t.prototype.snapshot=function(){this._snapshots.push(m5.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},t.prototype.restore=function(){var e=this._snapshots.pop();if(e===void 0)throw new Error(Bi.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=e.bindings,this._activations=e.activations,this._deactivations=e.deactivations,this._middleware=e.middleware,this._moduleActivationStore=e.moduleActivationStore},t.prototype.createChild=function(e){var r=new t(e||this.options);return r.parent=this,r},t.prototype.applyMiddleware=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=this._middleware?this._middleware:this._planAndResolve();this._middleware=e.reduce(function(n,s){return s(n)},i)},t.prototype.applyCustomMetadataReader=function(e){this._metadataReader=e},t.prototype.get=function(e){var r=this._getNotAllArgs(e,!1);return this._getButThrowIfAsync(r)},t.prototype.getAsync=function(e){return pi(this,void 0,void 0,function(){var r;return fi(this,function(i){return r=this._getNotAllArgs(e,!1),[2,this._get(r)]})})},t.prototype.getTagged=function(e,r,i){var n=this._getNotAllArgs(e,!1,r,i);return this._getButThrowIfAsync(n)},t.prototype.getTaggedAsync=function(e,r,i){return pi(this,void 0,void 0,function(){var n;return fi(this,function(s){return n=this._getNotAllArgs(e,!1,r,i),[2,this._get(n)]})})},t.prototype.getNamed=function(e,r){return this.getTagged(e,Ia.NAMED_TAG,r)},t.prototype.getNamedAsync=function(e,r){return this.getTaggedAsync(e,Ia.NAMED_TAG,r)},t.prototype.getAll=function(e){var r=this._getAllArgs(e);return this._getButThrowIfAsync(r)},t.prototype.getAllAsync=function(e){var r=this._getAllArgs(e);return this._getAll(r)},t.prototype.getAllTagged=function(e,r,i){var n=this._getNotAllArgs(e,!0,r,i);return this._getButThrowIfAsync(n)},t.prototype.getAllTaggedAsync=function(e,r,i){var n=this._getNotAllArgs(e,!0,r,i);return this._getAll(n)},t.prototype.getAllNamed=function(e,r){return this.getAllTagged(e,Ia.NAMED_TAG,r)},t.prototype.getAllNamedAsync=function(e,r){return this.getAllTaggedAsync(e,Ia.NAMED_TAG,r)},t.prototype.resolve=function(e){var r=this.isBound(e);r||this.bind(e).toSelf();var i=this.get(e);return r||this.unbind(e),i},t.prototype._preDestroy=function(e,r){if(Reflect.hasMetadata(Ia.PRE_DESTROY,e)){var i=Reflect.getMetadata(Ia.PRE_DESTROY,e);return r[i.value]()}},t.prototype._removeModuleHandlers=function(e){var r=this._moduleActivationStore.remove(e);this._activations.removeIntersection(r.onActivations),this._deactivations.removeIntersection(r.onDeactivations)},t.prototype._removeModuleBindings=function(e){return this._bindingDictionary.removeByCondition(function(r){return r.moduleId===e})},t.prototype._deactivate=function(e,r){var i=this,n=Object.getPrototypeOf(r).constructor;try{if(this._deactivations.hasKey(e.serviceIdentifier)){var s=this._deactivateContainer(r,this._deactivations.get(e.serviceIdentifier).values());if((0,Sa.isPromise)(s))return this._handleDeactivationError(s.then(function(){return i._propagateContainerDeactivationThenBindingAndPreDestroyAsync(e,r,n)}),n)}var o=this._propagateContainerDeactivationThenBindingAndPreDestroy(e,r,n);if((0,Sa.isPromise)(o))return this._handleDeactivationError(o,n)}catch(a){throw new Error(Bi.ON_DEACTIVATION_ERROR(n.name,a.message))}},t.prototype._handleDeactivationError=function(e,r){return pi(this,void 0,void 0,function(){var i;return fi(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e];case 1:return n.sent(),[3,3];case 2:throw i=n.sent(),new Error(Bi.ON_DEACTIVATION_ERROR(r.name,i.message));case 3:return[2]}})})},t.prototype._deactivateContainer=function(e,r){for(var i=this,n=r.next();n.value;){var s=n.value(e);if((0,Sa.isPromise)(s))return s.then(function(){return i._deactivateContainerAsync(e,r)});n=r.next()}},t.prototype._deactivateContainerAsync=function(e,r){return pi(this,void 0,void 0,function(){var i;return fi(this,function(n){switch(n.label){case 0:i=r.next(),n.label=1;case 1:return i.value?[4,i.value(e)]:[3,3];case 2:return n.sent(),i=r.next(),[3,1];case 3:return[2]}})})},t.prototype._getContainerModuleHelpersFactory=function(){var e=this,r=function(l,p){l._binding.moduleId=p},i=function(l){return function(p){var f=e.bind(p);return r(f,l),f}},n=function(){return function(l){return e.unbind(l)}},s=function(){return function(l){return e.unbindAsync(l)}},o=function(){return function(l){return e.isBound(l)}},a=function(l){return function(p){var f=e.rebind(p);return r(f,l),f}},u=function(l){return function(p,f){e._moduleActivationStore.addActivation(l,p,f),e.onActivation(p,f)}},c=function(l){return function(p,f){e._moduleActivationStore.addDeactivation(l,p,f),e.onDeactivation(p,f)}};return function(l){return{bindFunction:i(l),isboundFunction:o(),onActivationFunction:u(l),onDeactivationFunction:c(l),rebindFunction:a(l),unbindFunction:n(),unbindAsyncFunction:s()}}},t.prototype._getAll=function(e){return Promise.all(this._get(e))},t.prototype._get=function(e){var r=Dh(Dh({},e),{contextInterceptor:function(n){return n},targetType:Vu.TargetTypeEnum.Variable});if(this._middleware){var i=this._middleware(r);if(i==null)throw new Error(Bi.INVALID_MIDDLEWARE_RETURN);return i}return this._planAndResolve()(r)},t.prototype._getButThrowIfAsync=function(e){var r=this._get(e);if((0,Sa.isPromiseOrContainsPromise)(r))throw new Error(Bi.LAZY_IN_SYNC(e.serviceIdentifier));return r},t.prototype._getAllArgs=function(e){var r={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:e};return r},t.prototype._getNotAllArgs=function(e,r,i,n){var s={avoidConstraints:!1,isMultiInject:r,serviceIdentifier:e,key:i,value:n};return s},t.prototype._planAndResolve=function(){var e=this;return function(r){var i=(0,Ph.plan)(e._metadataReader,e,r.isMultiInject,r.targetType,r.serviceIdentifier,r.key,r.value,r.avoidConstraints);i=r.contextInterceptor(i);var n=(0,p5.resolve)(i);return n}},t.prototype._deactivateIfSingleton=function(e){var r=this;if(e.activated)return(0,Sa.isPromise)(e.cache)?e.cache.then(function(i){return r._deactivate(e,i)}):this._deactivate(e,e.cache)},t.prototype._deactivateSingletons=function(e){for(var r=0,i=e;r<i.length;r++){var n=i[r],s=this._deactivateIfSingleton(n);if((0,Sa.isPromise)(s))throw new Error(Bi.ASYNC_UNBIND_REQUIRED)}},t.prototype._deactivateSingletonsAsync=function(e){return pi(this,void 0,void 0,function(){var r=this;return fi(this,function(i){switch(i.label){case 0:return[4,Promise.all(e.map(function(n){return r._deactivateIfSingleton(n)}))];case 1:return i.sent(),[2]}})})},t.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(e,r,i){return this.parent?this._deactivate.bind(this.parent)(e,r):this._bindingDeactivationAndPreDestroy(e,r,i)},t.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(e,r,i){return pi(this,void 0,void 0,function(){return fi(this,function(n){switch(n.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(e,r)]:[3,2];case 1:return n.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(e,r,i)];case 3:n.sent(),n.label=4;case 4:return[2]}})})},t.prototype._removeServiceFromDictionary=function(e){try{this._bindingDictionary.remove(e)}catch{throw new Error(Bi.CANNOT_UNBIND+" "+(0,h5.getServiceIdentifierAsString)(e))}},t.prototype._bindingDeactivationAndPreDestroy=function(e,r,i){var n=this;if(typeof e.onDeactivation=="function"){var s=e.onDeactivation(r);if((0,Sa.isPromise)(s))return s.then(function(){return n._preDestroy(i,r)})}return this._preDestroy(i,r)},t.prototype._bindingDeactivationAndPreDestroyAsync=function(e,r,i){return pi(this,void 0,void 0,function(){return fi(this,function(n){switch(n.label){case 0:return typeof e.onDeactivation!="function"?[3,2]:[4,e.onDeactivation(r)];case 1:n.sent(),n.label=2;case 2:return[4,this._preDestroy(i,r)];case 3:return n.sent(),[2]}})})},t}();Xt.Container=g5});var Xx=v(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.AsyncContainerModule=Gu.ContainerModule=void 0;var Kx=zs(),y5=function(){function t(e){this.id=(0,Kx.id)(),this.registry=e}return t}();Gu.ContainerModule=y5;var b5=function(){function t(e){this.id=(0,Kx.id)(),this.registry=e}return t}();Gu.AsyncContainerModule=b5});var zx=v(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.getFirstArrayDuplicate=void 0;function v5(t){for(var e=new Set,r=0,i=t;r<i.length;r++){var n=i[r];if(e.has(n))return n;e.add(n)}}Th.getFirstArrayDuplicate=v5});var cs=v(lr=>{"use strict";var _5=lr&&lr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),w5=lr&&lr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Yx=lr&&lr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&_5(e,t,r);return w5(e,t),e};Object.defineProperty(lr,"__esModule",{value:!0});lr.createTaggedDecorator=lr.tagProperty=lr.tagParameter=lr.decorate=void 0;var $h=Yx(ar()),Qx=Yx(Pt()),A5=zx();function I5(t){return t.prototype!==void 0}function S5(t){if(t!==void 0)throw new Error($h.INVALID_DECORATOR_OPERATION)}function Zx(t,e,r,i){S5(e),tL(Qx.TAGGED,t,r.toString(),i)}lr.tagParameter=Zx;function eL(t,e,r){if(I5(t))throw new Error($h.INVALID_DECORATOR_OPERATION);tL(Qx.TAGGED_PROP,t.constructor,e,r)}lr.tagProperty=eL;function E5(t){var e=[];if(Array.isArray(t)){e=t;var r=(0,A5.getFirstArrayDuplicate)(e.map(function(i){return i.key}));if(r!==void 0)throw new Error($h.DUPLICATED_METADATA+" "+r.toString())}else e=[t];return e}function tL(t,e,r,i){var n=E5(i),s={};Reflect.hasOwnMetadata(t,e)&&(s=Reflect.getMetadata(t,e));var o=s[r];if(o===void 0)o=[];else for(var a=function(p){if(n.some(function(f){return f.key===p.key}))throw new Error($h.DUPLICATED_METADATA+" "+p.key.toString())},u=0,c=o;u<c.length;u++){var l=c[u];a(l)}o.push.apply(o,n),s[r]=o,Reflect.defineMetadata(t,s,e)}function x5(t){return function(e,r,i){typeof i=="number"?Zx(e,r,i,t):eL(e,r,t)}}lr.createTaggedDecorator=x5;function Jx(t,e){Reflect.decorate(t,e)}function L5(t,e){return function(r,i){e(r,i,t)}}function C5(t,e,r){typeof r=="number"?Jx([L5(r,t)],e):typeof r=="string"?Reflect.decorate([t],e,r):Jx([t],e)}lr.decorate=C5});var iL=v(gn=>{"use strict";var P5=gn&&gn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),D5=gn&&gn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rL=gn&&gn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&P5(e,t,r);return D5(e,t),e};Object.defineProperty(gn,"__esModule",{value:!0});gn.injectable=void 0;var T5=rL(ar()),fv=rL(Pt());function $5(){return function(t){if(Reflect.hasOwnMetadata(fv.PARAM_TYPES,t))throw new Error(T5.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(fv.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(fv.PARAM_TYPES,e,t),t}}gn.injectable=$5});var nL=v(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});Mh.tagged=void 0;var M5=Ni(),k5=cs();function R5(t,e){return(0,k5.createTaggedDecorator)(new M5.Metadata(t,e))}Mh.tagged=R5});var sL=v(yn=>{"use strict";var O5=yn&&yn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),N5=yn&&yn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),B5=yn&&yn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&O5(e,t,r);return N5(e,t),e};Object.defineProperty(yn,"__esModule",{value:!0});yn.named=void 0;var F5=B5(Pt()),U5=Ni(),j5=cs();function q5(t){return(0,j5.createTaggedDecorator)(new U5.Metadata(F5.NAMED_TAG,t))}yn.named=q5});var dv=v(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});kh.injectBase=void 0;var W5=ar(),V5=Ni(),G5=cs();function K5(t){return function(e){return function(r,i,n){if(e===void 0){var s=typeof r=="function"?r.name:r.constructor.name;throw new Error((0,W5.UNDEFINED_INJECT_ANNOTATION)(s))}return(0,G5.createTaggedDecorator)(new V5.Metadata(t,e))(r,i,n)}}}kh.injectBase=K5});var oL=v(bn=>{"use strict";var X5=bn&&bn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),z5=bn&&bn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),J5=bn&&bn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&X5(e,t,r);return z5(e,t),e};Object.defineProperty(bn,"__esModule",{value:!0});bn.inject=void 0;var Y5=J5(Pt()),Q5=dv(),Z5=(0,Q5.injectBase)(Y5.INJECT_TAG);bn.inject=Z5});var aL=v(vn=>{"use strict";var eG=vn&&vn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),tG=vn&&vn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rG=vn&&vn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&eG(e,t,r);return tG(e,t),e};Object.defineProperty(vn,"__esModule",{value:!0});vn.optional=void 0;var iG=rG(Pt()),nG=Ni(),sG=cs();function oG(){return(0,sG.createTaggedDecorator)(new nG.Metadata(iG.OPTIONAL_TAG,!0))}vn.optional=oG});var uL=v(_n=>{"use strict";var aG=_n&&_n.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),uG=_n&&_n.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cG=_n&&_n.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&aG(e,t,r);return uG(e,t),e};Object.defineProperty(_n,"__esModule",{value:!0});_n.unmanaged=void 0;var lG=cG(Pt()),pG=Ni(),fG=cs();function dG(){return function(t,e,r){var i=new pG.Metadata(lG.UNMANAGED_TAG,!0);(0,fG.tagParameter)(t,e,r,i)}}_n.unmanaged=dG});var cL=v(wn=>{"use strict";var hG=wn&&wn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),mG=wn&&wn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HG=wn&&wn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&hG(e,t,r);return mG(e,t),e};Object.defineProperty(wn,"__esModule",{value:!0});wn.multiInject=void 0;var gG=HG(Pt()),yG=dv(),bG=(0,yG.injectBase)(gG.MULTI_INJECT_TAG);wn.multiInject=bG});var lL=v(An=>{"use strict";var vG=An&&An.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),_G=An&&An.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wG=An&&An.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&vG(e,t,r);return _G(e,t),e};Object.defineProperty(An,"__esModule",{value:!0});An.targetName=void 0;var AG=wG(Pt()),IG=Ni(),SG=cs();function EG(t){return function(e,r,i){var n=new IG.Metadata(AG.NAME_TAG,t);(0,SG.tagParameter)(e,r,i,n)}}An.targetName=EG});var hv=v(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});Rh.propertyEventDecorator=void 0;var xG=Ni();function LG(t,e){return function(){return function(r,i){var n=new xG.Metadata(t,i);if(Reflect.hasOwnMetadata(t,r.constructor))throw new Error(e);Reflect.defineMetadata(t,n,r.constructor)}}}Rh.propertyEventDecorator=LG});var fL=v(In=>{"use strict";var CG=In&&In.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),PG=In&&In.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pL=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&CG(e,t,r);return PG(e,t),e};Object.defineProperty(In,"__esModule",{value:!0});In.postConstruct=void 0;var DG=pL(ar()),TG=pL(Pt()),$G=hv(),MG=(0,$G.propertyEventDecorator)(TG.POST_CONSTRUCT,DG.MULTIPLE_POST_CONSTRUCT_METHODS);In.postConstruct=MG});var hL=v(Sn=>{"use strict";var kG=Sn&&Sn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),RG=Sn&&Sn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dL=Sn&&Sn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&kG(e,t,r);return RG(e,t),e};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.preDestroy=void 0;var OG=dL(ar()),NG=dL(Pt()),BG=hv(),FG=(0,BG.propertyEventDecorator)(NG.PRE_DESTROY,OG.MULTIPLE_PRE_DESTROY_METHODS);Sn.preDestroy=FG});var mL=v(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});Oh.interfaces=void 0;var mv;(function(t){})(mv||(mv={}));Oh.interfaces=mv});var ue=v(ce=>{"use strict";var UG=ce&&ce.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),jG=ce&&ce.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qG=ce&&ce.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&UG(e,t,r);return jG(e,t),e};Object.defineProperty(ce,"__esModule",{value:!0});ce.multiBindToService=ce.getServiceIdentifierAsString=ce.typeConstraint=ce.namedConstraint=ce.taggedConstraint=ce.traverseAncerstors=ce.decorate=ce.interfaces=ce.id=ce.MetadataReader=ce.preDestroy=ce.postConstruct=ce.targetName=ce.multiInject=ce.unmanaged=ce.optional=ce.LazyServiceIdentifer=ce.inject=ce.named=ce.tagged=ce.injectable=ce.createTaggedDecorator=ce.ContainerModule=ce.AsyncContainerModule=ce.TargetTypeEnum=ce.BindingTypeEnum=ce.BindingScopeEnum=ce.Container=ce.METADATA_KEY=void 0;var WG=qG(Pt());ce.METADATA_KEY=WG;var VG=Gx();Object.defineProperty(ce,"Container",{enumerable:!0,get:function(){return VG.Container}});var Hv=Oi();Object.defineProperty(ce,"BindingScopeEnum",{enumerable:!0,get:function(){return Hv.BindingScopeEnum}});Object.defineProperty(ce,"BindingTypeEnum",{enumerable:!0,get:function(){return Hv.BindingTypeEnum}});Object.defineProperty(ce,"TargetTypeEnum",{enumerable:!0,get:function(){return Hv.TargetTypeEnum}});var HL=Xx();Object.defineProperty(ce,"AsyncContainerModule",{enumerable:!0,get:function(){return HL.AsyncContainerModule}});Object.defineProperty(ce,"ContainerModule",{enumerable:!0,get:function(){return HL.ContainerModule}});var GG=cs();Object.defineProperty(ce,"createTaggedDecorator",{enumerable:!0,get:function(){return GG.createTaggedDecorator}});var KG=iL();Object.defineProperty(ce,"injectable",{enumerable:!0,get:function(){return KG.injectable}});var XG=nL();Object.defineProperty(ce,"tagged",{enumerable:!0,get:function(){return XG.tagged}});var zG=sL();Object.defineProperty(ce,"named",{enumerable:!0,get:function(){return zG.named}});var JG=oL();Object.defineProperty(ce,"inject",{enumerable:!0,get:function(){return JG.inject}});var YG=qb();Object.defineProperty(ce,"LazyServiceIdentifer",{enumerable:!0,get:function(){return YG.LazyServiceIdentifer}});var QG=aL();Object.defineProperty(ce,"optional",{enumerable:!0,get:function(){return QG.optional}});var ZG=uL();Object.defineProperty(ce,"unmanaged",{enumerable:!0,get:function(){return ZG.unmanaged}});var e6=cL();Object.defineProperty(ce,"multiInject",{enumerable:!0,get:function(){return e6.multiInject}});var t6=lL();Object.defineProperty(ce,"targetName",{enumerable:!0,get:function(){return t6.targetName}});var r6=fL();Object.defineProperty(ce,"postConstruct",{enumerable:!0,get:function(){return r6.postConstruct}});var i6=hL();Object.defineProperty(ce,"preDestroy",{enumerable:!0,get:function(){return i6.preDestroy}});var n6=Ub();Object.defineProperty(ce,"MetadataReader",{enumerable:!0,get:function(){return n6.MetadataReader}});var s6=zs();Object.defineProperty(ce,"id",{enumerable:!0,get:function(){return s6.id}});var o6=mL();Object.defineProperty(ce,"interfaces",{enumerable:!0,get:function(){return o6.interfaces}});var a6=cs();Object.defineProperty(ce,"decorate",{enumerable:!0,get:function(){return a6.decorate}});var Nh=av();Object.defineProperty(ce,"traverseAncerstors",{enumerable:!0,get:function(){return Nh.traverseAncerstors}});Object.defineProperty(ce,"taggedConstraint",{enumerable:!0,get:function(){return Nh.taggedConstraint}});Object.defineProperty(ce,"namedConstraint",{enumerable:!0,get:function(){return Nh.namedConstraint}});Object.defineProperty(ce,"typeConstraint",{enumerable:!0,get:function(){return Nh.typeConstraint}});var u6=Fu();Object.defineProperty(ce,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return u6.getServiceIdentifierAsString}});var c6=ev();Object.defineProperty(ce,"multiBindToService",{enumerable:!0,get:function(){return c6.multiBindToService}})});var yL=v(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});function l6(t){let e=[],r=new Array(4),i=[0,192,224,240],n=[127,63,63,63],s=[0,128,128,128];for(let o of t){let a=r,u=o.codePointAt(0),c=0-(-(u&4294967168)>>31)-(-(u&4294965248)>>31)-(-(u&4294901760)>>31),l=n[c],p=s[c];a[3]=p|u&l,a[2]=p|u>>>6&l,a[1]=p|u>>>12&l,a[0]=p|u>>>18&l;let f=3-c;a[f]|=i[c],Array.prototype.push.apply(e,a.slice(f))}return new Uint8Array(e)}Js.toUtf8_1=l6;function p6(t){let e=[];for(let r of t){let i=r.codePointAt(0);i<128?e.push(i):i<2048?e.push(192|i>>6&31,128|i&63):i<65536?e.push(224|i>>12&15,128|i>>6&63,128|i&63):e.push(240|i>>18&7,128|i>>12&63,128|i>>6&63,128|i&63)}return new Uint8Array(e)}Js.toUtf8_2=p6;function gL(t){let e=[];for(let r=0,i=t.length;r<i;++r){let n=t.charCodeAt(r);if(n<128)e.push(n);else if(n<2048)e.push(192|n>>6,128|n&63);else if(n<55296||n>=57344)e.push(224|n>>12,128|n>>6&63,128|n&63);else{let s=65536+((n&1023)<<10|t.charCodeAt(++r)&1023);e.push(240|s>>18&7,128|s>>12&63,128|s>>6&63,128|s&63)}}return new Uint8Array(e)}Js.toUtf8_3=gL;Js.toUtf8=gL;Js.default=Js.toUtf8});var _L=v(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});var f6=yL(),Ku=2654435761,Xu=2246822519,Bh=3266489917,bL=668265263,vL=374761393;function d6(t,e=0){t=typeof t=="string"?f6.default(t):t;let r=t,i=e+vL&4294967295,n=0;if(r.length>=16){let o=[e+Ku+Xu&4294967295,e+Xu&4294967295,e+0&4294967295,e-Ku&4294967295],a=t,u=a.length-16,c=0;for(n=0;(n&4294967280)<=u;n+=4){let l=n,p=a[l+0]+(a[l+1]<<8),f=a[l+2]+(a[l+3]<<8),H=p*Xu+(f*Xu<<16),m=o[c]+H&4294967295;m=m<<13|m>>>19;let y=m&65535,b=m>>>16;o[c]=y*Ku+(b*Ku<<16)&4294967295,c=c+1&3}i=(o[0]<<1|o[0]>>>31)+(o[1]<<7|o[1]>>>25)+(o[2]<<12|o[2]>>>20)+(o[3]<<18|o[3]>>>14)&4294967295}i=i+t.length&4294967295;let s=t.length-4;for(;n<=s;n+=4){let o=n,a=r[o+0]+(r[o+1]<<8),u=r[o+2]+(r[o+3]<<8),c=a*Bh+(u*Bh<<16);i=i+c&4294967295,i=i<<17|i>>>15,i=(i&65535)*bL+((i>>>16)*bL<<16)&4294967295}for(;n<r.length;++n){let o=r[n];i=i+o*vL,i=i<<11|i>>>21,i=(i&65535)*Ku+((i>>>16)*Ku<<16)&4294967295}return i=i^i>>>15,i=((i&65535)*Xu&4294967295)+((i>>>16)*Xu<<16),i=i^i>>>13,i=((i&65535)*Bh&4294967295)+((i>>>16)*Bh<<16),i=i^i>>>16,i<0?i+4294967296:i}gv.xxHash32=d6});var yv=v(Fh=>{"use strict";function h6(t){for(var e in t)Fh.hasOwnProperty(e)||(Fh[e]=t[e])}Object.defineProperty(Fh,"__esModule",{value:!0});h6(_L())});var IL=v(AL=>{var wL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");AL.encode=function(t){if(0<=t&&t<wL.length)return wL[t];throw new TypeError("Must be between 0 and 63: "+t)}});var bv=v(xL=>{var m6=IL(),SL=5,EL=1<<SL,H6=EL-1,g6=EL;function y6(t){return t<0?(-t<<1)+1:(t<<1)+0}xL.encode=function(e){let r="",i,n=y6(e);do i=n&H6,n>>>=SL,n>0&&(i|=g6),r+=m6.encode(i);while(n>0);return r}});var CL=v((Wpe,LL)=>{"use strict";LL.exports=typeof URL=="function"?URL:w("url").URL});var xp=v(En=>{var Qs=CL();function b6(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}En.getArg=b6;var DL=function(){return!("__proto__"in Object.create(null))}();function TL(t){return t}function v6(t){return $L(t)?"$"+t:t}En.toSetString=DL?TL:v6;function _6(t){return $L(t)?t.slice(1):t}En.fromSetString=DL?TL:_6;function $L(t){if(!t)return!1;let e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(let r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function PL(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function w6(t,e){let r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=PL(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:PL(t.name,e.name)}En.compareByGeneratedPositionsInflated=w6;function A6(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}En.parseSourceMapInput=A6;var _v="http:",Sp=`${_v}//host`;function wv(t){return e=>{let r=zu(e),i=Av(e),n=new Qs(e,i);t(n);let s=n.toString();return r==="absolute"?s:r==="scheme-relative"?s.slice(_v.length):r==="path-absolute"?s.slice(Sp.length):Iv(i,s)}}function Ys(t,e){return new Qs(t,e).toString()}function I6(t,e){let r=0;do{let i=t+r++;if(e.indexOf(i)===-1)return i}while(!0)}function Av(t){let e=t.split("..").length-1,r=I6("p",t),i=`${Sp}/`;for(let n=0;n<e;n++)i+=`${r}/`;return i}var S6=/^[A-Za-z0-9\+\-\.]+:/;function zu(t){return t[0]==="/"?t[1]==="/"?"scheme-relative":"path-absolute":S6.test(t)?"absolute":"path-relative"}function Iv(t,e){typeof t=="string"&&(t=new Qs(t)),typeof e=="string"&&(e=new Qs(e));let r=e.pathname.split("/"),i=t.pathname.split("/");for(i.length>0&&!i[i.length-1]&&i.pop();r.length>0&&i.length>0&&r[0]===i[0];)r.shift(),i.shift();return i.map(()=>"..").concat(r).join("/")+e.search+e.hash}var E6=wv(t=>{t.pathname=t.pathname.replace(/\/?$/,"/")}),x6=wv(t=>{t.href=new Qs(".",t.toString()).toString()}),Ep=wv(t=>{});En.normalize=Ep;function vv(t,e){let r=zu(e),i=zu(t);if(t=E6(t),r==="absolute")return Ys(e,void 0);if(i==="absolute")return Ys(e,t);if(r==="scheme-relative")return Ep(e);if(i==="scheme-relative")return Ys(e,Ys(t,Sp)).slice(_v.length);if(r==="path-absolute")return Ep(e);if(i==="path-absolute")return Ys(e,Ys(t,Sp)).slice(Sp.length);let n=Av(e+t),s=Ys(e,Ys(t,n));return Iv(n,s)}En.join=vv;function L6(t,e){let r=C6(t,e);return typeof r=="string"?r:Ep(e)}En.relative=L6;function C6(t,e){if(zu(t)!==zu(e))return null;let i=Av(t+e),n=new Qs(t,i),s=new Qs(e,i);try{new Qs("",s.toString())}catch{return null}return s.protocol!==n.protocol||s.user!==n.user||s.password!==n.password||s.hostname!==n.hostname||s.port!==n.port?null:Iv(n,s)}function P6(t,e,r){t&&zu(e)==="path-absolute"&&(e=e.replace(/^\//,""));let i=Ep(e||"");return t&&(i=vv(t,i)),r&&(i=vv(x6(r),i)),i}En.computeSourceURL=P6});var Sv=v(ML=>{var Lp=class{constructor(){this._array=[],this._set=new Map}static fromArray(e,r){let i=new Lp;for(let n=0,s=e.length;n<s;n++)i.add(e[n],r);return i}size(){return this._set.size}add(e,r){let i=this.has(e),n=this._array.length;(!i||r)&&this._array.push(e),i||this._set.set(e,n)}has(e){return this._set.has(e)}indexOf(e){let r=this._set.get(e);if(r>=0)return r;throw new Error('"'+e+'" is not in the set.')}at(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)}toArray(){return this._array.slice()}};ML.ArraySet=Lp});var OL=v(RL=>{var kL=xp();function D6(t,e){let r=t.generatedLine,i=e.generatedLine,n=t.generatedColumn,s=e.generatedColumn;return i>r||i==r&&s>=n||kL.compareByGeneratedPositionsInflated(t,e)<=0}var Ev=class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,r){this._array.forEach(e,r)}add(e){D6(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))}toArray(){return this._sorted||(this._array.sort(kL.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}};RL.MappingList=Ev});var xv=v(NL=>{var Cp=bv(),Tt=xp(),Uh=Sv().ArraySet,T6=OL().MappingList,Ju=class{constructor(e){e||(e={}),this._file=Tt.getArg(e,"file",null),this._sourceRoot=Tt.getArg(e,"sourceRoot",null),this._skipValidation=Tt.getArg(e,"skipValidation",!1),this._sources=new Uh,this._names=new Uh,this._mappings=new T6,this._sourcesContents=null}static fromSourceMap(e){let r=e.sourceRoot,i=new Ju({file:e.file,sourceRoot:r});return e.eachMapping(function(n){let s={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(s.source=n.source,r!=null&&(s.source=Tt.relative(r,s.source)),s.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(s.name=n.name)),i.addMapping(s)}),e.sources.forEach(function(n){let s=n;r!==null&&(s=Tt.relative(r,n)),i._sources.has(s)||i._sources.add(s);let o=e.sourceContentFor(n);o!=null&&i.setSourceContent(n,o)}),i}addMapping(e){let r=Tt.getArg(e,"generated"),i=Tt.getArg(e,"original",null),n=Tt.getArg(e,"source",null),s=Tt.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,i,n,s),n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:n,name:s})}setSourceContent(e,r){let i=e;this._sourceRoot!=null&&(i=Tt.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Tt.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[Tt.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))}applySourceMap(e,r,i){let n=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=e.file}let s=this._sourceRoot;s!=null&&(n=Tt.relative(s,n));let o=this._mappings.toArray().length>0?new Uh:this._sources,a=new Uh;this._mappings.unsortedForEach(function(u){if(u.source===n&&u.originalLine!=null){let p=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});p.source!=null&&(u.source=p.source,i!=null&&(u.source=Tt.join(i,u.source)),s!=null&&(u.source=Tt.relative(s,u.source)),u.originalLine=p.line,u.originalColumn=p.column,p.name!=null&&(u.name=p.name))}let c=u.source;c!=null&&!o.has(c)&&o.add(c);let l=u.name;l!=null&&!a.has(l)&&a.add(l)},this),this._sources=o,this._names=a,e.sources.forEach(function(u){let c=e.sourceContentFor(u);c!=null&&(i!=null&&(u=Tt.join(i,u)),s!=null&&(u=Tt.relative(s,u)),this.setSourceContent(u,c))},this)}_validateMapping(e,r,i,n){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!i&&!n)){if(!(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&i))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:i,original:r,name:n}))}}_serializeMappings(){let e=0,r=1,i=0,n=0,s=0,o=0,a="",u,c,l,p,f=this._mappings.toArray();for(let H=0,m=f.length;H<m;H++){if(c=f[H],u="",c.generatedLine!==r)for(e=0;c.generatedLine!==r;)u+=";",r++;else if(H>0){if(!Tt.compareByGeneratedPositionsInflated(c,f[H-1]))continue;u+=","}u+=Cp.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(p=this._sources.indexOf(c.source),u+=Cp.encode(p-o),o=p,u+=Cp.encode(c.originalLine-1-n),n=c.originalLine-1,u+=Cp.encode(c.originalColumn-i),i=c.originalColumn,c.name!=null&&(l=this._names.indexOf(c.name),u+=Cp.encode(l-s),s=l)),a+=u}return a}_generateSourcesContent(e,r){return e.map(function(i){if(!this._sourcesContents)return null;r!=null&&(i=Tt.relative(r,i));let n=Tt.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)}toJSON(){let e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e}toString(){return JSON.stringify(this.toJSON())}};Ju.prototype._version=3;NL.SourceMapGenerator=Ju});var BL=v(Ea=>{Ea.GREATEST_LOWER_BOUND=1;Ea.LEAST_UPPER_BOUND=2;function Lv(t,e,r,i,n,s){let o=Math.floor((e-t)/2)+t,a=n(r,i[o],!0);return a===0?o:a>0?e-o>1?Lv(o,e,r,i,n,s):s==Ea.LEAST_UPPER_BOUND?e<i.length?e:-1:o:o-t>1?Lv(t,o,r,i,n,s):s==Ea.LEAST_UPPER_BOUND?o:t<0?-1:t}Ea.search=function(e,r,i,n){if(r.length===0)return-1;let s=Lv(-1,r.length,e,r,i,n||Ea.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&i(r[s],r[s-1],!0)===0;)--s;return s}});var Pv=v((Jpe,Cv)=>{"use strict";var $6=w("fs"),M6=w("path");Cv.exports=function(){return new Promise((e,r)=>{let i=M6.join(__dirname,"mappings.wasm");$6.readFile(i,null,(n,s)=>{if(n){r(n);return}e(s.buffer)})})};Cv.exports.initialize=t=>{console.debug("SourceMapConsumer.initialize is a no-op when running in node.js")}});var UL=v((Ype,FL)=>{var k6=Pv();function R6(){this.generatedLine=0,this.generatedColumn=0,this.lastGeneratedColumn=null,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Pp=null;FL.exports=function(){if(Pp)return Pp;let e=[];return Pp=k6().then(r=>WebAssembly.instantiate(r,{env:{mapping_callback(i,n,s,o,a,u,c,l,p,f){let H=new R6;H.generatedLine=i+1,H.generatedColumn=n,s&&(H.lastGeneratedColumn=o-1),a&&(H.source=u,H.originalLine=c+1,H.originalColumn=l,p&&(H.name=f)),e[e.length-1](H)},start_all_generated_locations_for(){console.time("all_generated_locations_for")},end_all_generated_locations_for(){console.timeEnd("all_generated_locations_for")},start_compute_column_spans(){console.time("compute_column_spans")},end_compute_column_spans(){console.timeEnd("compute_column_spans")},start_generated_location_for(){console.time("generated_location_for")},end_generated_location_for(){console.timeEnd("generated_location_for")},start_original_location_for(){console.time("original_location_for")},end_original_location_for(){console.timeEnd("original_location_for")},start_parse_mappings(){console.time("parse_mappings")},end_parse_mappings(){console.timeEnd("parse_mappings")},start_sort_by_generated_location(){console.time("sort_by_generated_location")},end_sort_by_generated_location(){console.timeEnd("sort_by_generated_location")},start_sort_by_original_location(){console.time("sort_by_original_location")},end_sort_by_original_location(){console.timeEnd("sort_by_original_location")}}})).then(r=>({exports:r.instance.exports,withMappingCallback:(i,n)=>{e.push(i);try{n()}finally{e.pop()}}})).then(null,r=>{throw Pp=null,r}),Pp}});var jL=v(qh=>{var Ie=xp(),O6=BL(),Dv=Sv().ArraySet,Qpe=bv(),N6=Pv(),B6=UL(),Tv=Symbol("smcInternal"),_t=class{constructor(e,r){return e==Tv?Promise.resolve(this):F6(e,r)}static initialize(e){N6.initialize(e["lib/mappings.wasm"])}static fromSourceMap(e,r){return U6(e,r)}static async with(e,r,i){let n=await new _t(e,r);try{return await i(n)}finally{n.destroy()}}eachMapping(e,r,i){throw new Error("Subclasses must implement eachMapping")}allGeneratedPositionsFor(e){throw new Error("Subclasses must implement allGeneratedPositionsFor")}destroy(){throw new Error("Subclasses must implement destroy")}};_t.prototype._version=3;_t.GENERATED_ORDER=1;_t.ORIGINAL_ORDER=2;_t.GREATEST_LOWER_BOUND=1;_t.LEAST_UPPER_BOUND=2;qh.SourceMapConsumer=_t;var Zs=class extends _t{constructor(e,r){return super(Tv).then(i=>{let n=e;typeof e=="string"&&(n=Ie.parseSourceMapInput(e));let s=Ie.getArg(n,"version"),o=Ie.getArg(n,"sources").map(String),a=Ie.getArg(n,"names",[]),u=Ie.getArg(n,"sourceRoot",null),c=Ie.getArg(n,"sourcesContent",null),l=Ie.getArg(n,"mappings"),p=Ie.getArg(n,"file",null);if(s!=i._version)throw new Error("Unsupported version: "+s);return i._sourceLookupCache=new Map,i._names=Dv.fromArray(a.map(String),!0),i._sources=Dv.fromArray(o,!0),i._absoluteSources=Dv.fromArray(i._sources.toArray().map(function(f){return Ie.computeSourceURL(u,f,r)}),!0),i.sourceRoot=u,i.sourcesContent=c,i._mappings=l,i._sourceMapURL=r,i.file=p,i._computedColumnSpans=!1,i._mappingsPtr=0,i._wasm=null,B6().then(f=>(i._wasm=f,i))})}_findSourceIndex(e){let r=this._sourceLookupCache.get(e);if(typeof r=="number")return r;let i=Ie.computeSourceURL(null,e,this._sourceMapURL);if(this._absoluteSources.has(i)){let s=this._absoluteSources.indexOf(i);return this._sourceLookupCache.set(e,s),s}let n=Ie.computeSourceURL(this.sourceRoot,e,this._sourceMapURL);if(this._absoluteSources.has(n)){let s=this._absoluteSources.indexOf(n);return this._sourceLookupCache.set(e,s),s}return-1}static fromSourceMap(e,r){return new Zs(e.toString())}get sources(){return this._absoluteSources.toArray()}_getMappingsPtr(){return this._mappingsPtr===0&&this._parseMappings(),this._mappingsPtr}_parseMappings(){let e=this._mappings,r=e.length,i=this._wasm.exports.allocate_mappings(r),n=new Uint8Array(this._wasm.exports.memory.buffer,i,r);for(let o=0;o<r;o++)n[o]=e.charCodeAt(o);let s=this._wasm.exports.parse_mappings(i);if(!s){let o=this._wasm.exports.get_last_error(),a=`Error parsing mappings (code ${o}): `;switch(o){case 1:a+="the mappings contained a negative line, column, source index, or name index";break;case 2:a+="the mappings contained a number larger than 2**32";break;case 3:a+="reached EOF while in the middle of parsing a VLQ";break;case 4:a+="invalid base 64 character while parsing a VLQ";break;default:a+="unknown error code";break}throw new Error(a)}this._mappingsPtr=s}eachMapping(e,r,i){let n=r||null,s=i||_t.GENERATED_ORDER;this._wasm.withMappingCallback(o=>{o.source!==null&&(o.source=this._absoluteSources.at(o.source),o.name!==null&&(o.name=this._names.at(o.name))),this._computedColumnSpans&&o.lastGeneratedColumn===null&&(o.lastGeneratedColumn=1/0),e.call(n,o)},()=>{switch(s){case _t.GENERATED_ORDER:this._wasm.exports.by_generated_location(this._getMappingsPtr());break;case _t.ORIGINAL_ORDER:this._wasm.exports.by_original_location(this._getMappingsPtr());break;default:throw new Error("Unknown order of iteration.")}})}allGeneratedPositionsFor(e){let r=Ie.getArg(e,"source"),i=Ie.getArg(e,"line"),n=e.column||0;if(r=this._findSourceIndex(r),r<0)return[];if(i<1)throw new Error("Line numbers must be >= 1");if(n<0)throw new Error("Column numbers must be >= 0");let s=[];return this._wasm.withMappingCallback(o=>{let a=o.lastGeneratedColumn;this._computedColumnSpans&&a===null&&(a=1/0),s.push({line:o.generatedLine,column:o.generatedColumn,lastColumn:a})},()=>{this._wasm.exports.all_generated_locations_for(this._getMappingsPtr(),r,i-1,"column"in e,n)}),s}destroy(){this._mappingsPtr!==0&&(this._wasm.exports.free_mappings(this._mappingsPtr),this._mappingsPtr=0)}computeColumnSpans(){this._computedColumnSpans||(this._wasm.exports.compute_column_spans(this._getMappingsPtr()),this._computedColumnSpans=!0)}originalPositionFor(e){let r={generatedLine:Ie.getArg(e,"line"),generatedColumn:Ie.getArg(e,"column")};if(r.generatedLine<1)throw new Error("Line numbers must be >= 1");if(r.generatedColumn<0)throw new Error("Column numbers must be >= 0");let i=Ie.getArg(e,"bias",_t.GREATEST_LOWER_BOUND);i==null&&(i=_t.GREATEST_LOWER_BOUND);let n;if(this._wasm.withMappingCallback(s=>n=s,()=>{this._wasm.exports.original_location_for(this._getMappingsPtr(),r.generatedLine-1,r.generatedColumn,i)}),n&&n.generatedLine===r.generatedLine){let s=Ie.getArg(n,"source",null);s!==null&&(s=this._absoluteSources.at(s));let o=Ie.getArg(n,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:Ie.getArg(n,"originalLine",null),column:Ie.getArg(n,"originalColumn",null),name:o}}return{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1}sourceContentFor(e,r){if(!this.sourcesContent)return null;let i=this._findSourceIndex(e);if(i>=0)return this.sourcesContent[i];if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')}generatedPositionFor(e){let r=Ie.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};let i={source:r,originalLine:Ie.getArg(e,"line"),originalColumn:Ie.getArg(e,"column")};if(i.originalLine<1)throw new Error("Line numbers must be >= 1");if(i.originalColumn<0)throw new Error("Column numbers must be >= 0");let n=Ie.getArg(e,"bias",_t.GREATEST_LOWER_BOUND);n==null&&(n=_t.GREATEST_LOWER_BOUND);let s;if(this._wasm.withMappingCallback(o=>s=o,()=>{this._wasm.exports.generated_location_for(this._getMappingsPtr(),i.source,i.originalLine-1,i.originalColumn,n)}),s&&s.source===i.source){let o=s.lastGeneratedColumn;return this._computedColumnSpans&&o===null&&(o=1/0),{line:Ie.getArg(s,"generatedLine",null),column:Ie.getArg(s,"generatedColumn",null),lastColumn:o}}return{line:null,column:null,lastColumn:null}}};Zs.prototype.consumer=_t;qh.BasicSourceMapConsumer=Zs;var jh=class extends _t{constructor(e,r){return super(Tv).then(i=>{let n=e;typeof e=="string"&&(n=Ie.parseSourceMapInput(e));let s=Ie.getArg(n,"version"),o=Ie.getArg(n,"sections");if(s!=i._version)throw new Error("Unsupported version: "+s);let a={line:-1,column:0};return Promise.all(o.map(u=>{if(u.url)throw new Error("Support for url field in sections not implemented.");let c=Ie.getArg(u,"offset"),l=Ie.getArg(c,"line"),p=Ie.getArg(c,"column");if(l<a.line||l===a.line&&p<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=c,new _t(Ie.getArg(u,"map"),r).then(H=>({generatedOffset:{generatedLine:l+1,generatedColumn:p+1},consumer:H}))})).then(u=>(i._sections=u,i))})}get sources(){let e=[];for(let r=0;r<this._sections.length;r++)for(let i=0;i<this._sections[r].consumer.sources.length;i++)e.push(this._sections[r].consumer.sources[i]);return e}originalPositionFor(e){let r={generatedLine:Ie.getArg(e,"line"),generatedColumn:Ie.getArg(e,"column")},i=O6.search(r,this._sections,function(s,o){let a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),n=this._sections[i];return n?n.consumer.originalPositionFor({line:r.generatedLine-(n.generatedOffset.generatedLine-1),column:r.generatedColumn-(n.generatedOffset.generatedLine===r.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})}sourceContentFor(e,r){for(let i=0;i<this._sections.length;i++){let s=this._sections[i].consumer.sourceContentFor(e,!0);if(s)return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')}_findSectionIndex(e){for(let r=0;r<this._sections.length;r++){let{consumer:i}=this._sections[r];if(i._findSourceIndex(e)!==-1)return r}return-1}generatedPositionFor(e){let r=this._findSectionIndex(Ie.getArg(e,"source")),i=r>=0?this._sections[r]:null,n=r>=0&&r+1<this._sections.length?this._sections[r+1]:null,s=i&&i.consumer.generatedPositionFor(e);if(s&&s.line!==null){let o=i.generatedOffset.generatedLine-1,a=i.generatedOffset.generatedColumn-1;return s.line===1&&(s.column+=a,typeof s.lastColumn=="number"&&(s.lastColumn+=a)),s.lastColumn===1/0&&n&&s.line===n.generatedOffset.generatedLine&&(s.lastColumn=n.generatedOffset.generatedColumn-2),s.line+=o,s}return{line:null,column:null,lastColumn:null}}allGeneratedPositionsFor(e){let r=this._findSectionIndex(Ie.getArg(e,"source")),i=r>=0?this._sections[r]:null,n=r>=0&&r+1<this._sections.length?this._sections[r+1]:null;return i?i.consumer.allGeneratedPositionsFor(e).map(s=>{let o=i.generatedOffset.generatedLine-1,a=i.generatedOffset.generatedColumn-1;return s.line===1&&(s.column+=a,typeof s.lastColumn=="number"&&(s.lastColumn+=a)),s.lastColumn===1/0&&n&&s.line===n.generatedOffset.generatedLine&&(s.lastColumn=n.generatedOffset.generatedColumn-2),s.line+=o,s}):[]}eachMapping(e,r,i){this._sections.forEach((n,s)=>{let o=s+1<this._sections.length?this._sections[s+1]:null,{generatedOffset:a}=n,u=a.generatedLine-1,c=a.generatedColumn-1;n.consumer.eachMapping(function(l){l.generatedLine===1&&(l.generatedColumn+=c,typeof l.lastGeneratedColumn=="number"&&(l.lastGeneratedColumn+=c)),l.lastGeneratedColumn===1/0&&o&&l.generatedLine===o.generatedOffset.generatedLine&&(l.lastGeneratedColumn=o.generatedOffset.generatedColumn-2),l.generatedLine+=u,e.call(this,l)},r,i)})}computeColumnSpans(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.computeColumnSpans()}destroy(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.destroy()}};qh.IndexedSourceMapConsumer=jh;function F6(t,e){let r=t;typeof t=="string"&&(r=Ie.parseSourceMapInput(t));let i=r.sections!=null?new jh(r,e):new Zs(r,e);return Promise.resolve(i)}function U6(t,e){return Zs.fromSourceMap(t,e)}});var WL=v(qL=>{var j6=xv().SourceMapGenerator,Wh=xp(),q6=/(\r?\n)/,W6=10,Yu="$$$isSourceNode$$$",Qu=class{constructor(e,r,i,n,s){this.children=[],this.sourceContents={},this.line=e??null,this.column=r??null,this.source=i??null,this.name=s??null,this[Yu]=!0,n!=null&&this.add(n)}static fromStringWithSourceMap(e,r,i){let n=new Qu,s=e.split(q6),o=0,a=function(){let H=y(),m=y()||"";return H+m;function y(){return o<s.length?s[o++]:void 0}},u=1,c=0,l=null,p;return r.eachMapping(function(H){if(l!==null)if(u<H.generatedLine)f(l,a()),u++,c=0;else{p=s[o]||"";let m=p.substr(0,H.generatedColumn-c);s[o]=p.substr(H.generatedColumn-c),c=H.generatedColumn,f(l,m),l=H;return}for(;u<H.generatedLine;)n.add(a()),u++;c<H.generatedColumn&&(p=s[o]||"",n.add(p.substr(0,H.generatedColumn)),s[o]=p.substr(H.generatedColumn),c=H.generatedColumn),l=H},this),o<s.length&&(l&&f(l,a()),n.add(s.splice(o).join(""))),r.sources.forEach(function(H){let m=r.sourceContentFor(H);m!=null&&(i!=null&&(H=Wh.join(i,H)),n.setSourceContent(H,m))}),n;function f(H,m){if(H===null||H.source===void 0)n.add(m);else{let y=i?Wh.join(i,H.source):H.source;n.add(new Qu(H.originalLine,H.originalColumn,y,m,H.name))}}}add(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Yu]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this}prepend(e){if(Array.isArray(e))for(let r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Yu]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this}walk(e){let r;for(let i=0,n=this.children.length;i<n;i++)r=this.children[i],r[Yu]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})}join(e){let r,i,n=this.children.length;if(n>0){for(r=[],i=0;i<n-1;i++)r.push(this.children[i]),r.push(e);r.push(this.children[i]),this.children=r}return this}replaceRight(e,r){let i=this.children[this.children.length-1];return i[Yu]?i.replaceRight(e,r):typeof i=="string"?this.children[this.children.length-1]=i.replace(e,r):this.children.push("".replace(e,r)),this}setSourceContent(e,r){this.sourceContents[Wh.toSetString(e)]=r}walkSourceContents(e){for(let i=0,n=this.children.length;i<n;i++)this.children[i][Yu]&&this.children[i].walkSourceContents(e);let r=Object.keys(this.sourceContents);for(let i=0,n=r.length;i<n;i++)e(Wh.fromSetString(r[i]),this.sourceContents[r[i]])}toString(){let e="";return this.walk(function(r){e+=r}),e}toStringWithSourceMap(e){let r={code:"",line:1,column:0},i=new j6(e),n=!1,s=null,o=null,a=null,u=null;return this.walk(function(c,l){r.code+=c,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||u!==l.name)&&i.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,u=l.name,n=!0):n&&(i.addMapping({generated:{line:r.line,column:r.column}}),s=null,n=!1);for(let p=0,f=c.length;p<f;p++)c.charCodeAt(p)===W6?(r.line++,r.column=0,p+1===f?(s=null,n=!1):n&&i.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(c,l){i.setSourceContent(c,l)}),{code:r.code,map:i}}};qL.SourceNode=Qu});var Gh=v(Vh=>{Vh.SourceMapGenerator=xv().SourceMapGenerator;Vh.SourceMapConsumer=jL().SourceMapConsumer;Vh.SourceNode=WL().SourceNode});var XL=v((sfe,Tp)=>{var GL={};GL.__wbindgen_placeholder__=Tp.exports;var Fi,{TextDecoder:V6}=w("util"),KL=new V6("utf-8",{ignoreBOM:!0,fatal:!0});KL.decode();var Xh=null;function Mv(){return(Xh===null||Xh.buffer!==Fi.memory.buffer)&&(Xh=new Uint8Array(Fi.memory.buffer)),Xh}function G6(t,e){return KL.decode(Mv().subarray(t,t+e))}var $v=0;function VL(t,e){let r=e(t.length*1);return Mv().set(t,r/1),$v=t.length,r}var Zu=class{static __wrap(e){let r=Object.create(Zu.prototype);return r.ptr=e,r}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();Fi.__wbg_hasher_free(e)}constructor(){var e=Fi.hasher_new();return Zu.__wrap(e)}update(e){var r=VL(e,Fi.__wbindgen_malloc),i=$v;Fi.hasher_update(this.ptr,r,i)}digest(e){try{var r=VL(e,Fi.__wbindgen_malloc),i=$v;Fi.hasher_digest(this.ptr,r,i)}finally{e.set(Mv().subarray(r/1,r/1+i)),Fi.__wbindgen_free(r,i*1)}}};Tp.exports.Hasher=Zu;Tp.exports.__wbindgen_throw=function(t,e){throw new Error(G6(t,e))};var K6=w("path").join(__dirname,"chromehash_bg.wasm"),X6=w("fs").readFileSync(K6),z6=new WebAssembly.Module(X6),J6=new WebAssembly.Instance(z6,GL);Fi=J6.exports;Tp.exports.__wasm=Fi});var eC=v(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.shaHashFile=Ln.hashFile=Ln.shaHash=Ln.hash=void 0;var YL=XL(),QL=w("fs"),zL=w("string_decoder"),ZL=w("crypto"),Jh=Buffer.alloc(4*5),Y6=t=>{let e=new YL.Hasher;return e.update(t9(t)),e.digest(Jh),e.free(),Jh.toString("hex")};Ln.hash=Y6;var Q6=t=>{let e=(0,ZL.createHash)("sha256");return e.update(r9(t)),e.digest("hex")};Ln.shaHash=Q6;var Z6=async(t,e=4096)=>{e%2===1&&e++;let r=Buffer.alloc(e),i=new YL.Hasher,n;try{n=await QL.promises.open(t,"r");let s=await n.read(r,0,r.length,null),o=r.slice(0,s.bytesRead);if(Qh(o))for(i.update(o.slice(2));s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead));else if(Zh(o))for(i.update(o.slice(2).swap16());s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead).swap16());else if(Yh(o)){let a=new zL.StringDecoder("utf8");for(i.update(Buffer.from(a.write(o.slice(3)),"utf16le"));s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(Buffer.from(a.write(r.slice(0,s.bytesRead)),"utf16le"))}else{let a=new zL.StringDecoder("utf8");for(i.update(Buffer.from(a.write(o),"utf16le"));s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(Buffer.from(a.write(r.slice(0,s.bytesRead)),"utf16le"))}return i.digest(Jh),Jh.toString("hex")}finally{i.free(),n!==void 0&&await n.close()}};Ln.hashFile=Z6;var zh={stream:!0},e9=async(t,e=4096)=>{e%2===1&&e++;let r=Buffer.alloc(e),i=(0,ZL.createHash)("sha256"),n;try{n=await QL.promises.open(t,"r");let s=await n.read(r,0,r.length,null),o=r.slice(0,s.bytesRead);if(Qh(o)){let a=new TextDecoder("utf-16le");for(i.update(a.decode(o.slice(2),zh));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(a.decode(r.slice(0,s.bytesRead),zh))}else if(Zh(o)){let a=new TextDecoder("utf-16be");for(i.update(a.decode(o.slice(2),zh));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(a.decode(r.slice(0,s.bytesRead),zh))}else if(Yh(o))for(i.update(o.slice(3));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead));else for(i.update(o);s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead));return i.digest("hex")}finally{await(n==null?void 0:n.close())}};Ln.shaHashFile=e9;var Yh=t=>t.length>=3&&t[0]===239&&t[1]===187&&t[2]===191,Qh=t=>t.length>=2&&t[0]===255&&t[1]===254,Zh=t=>t.length>=2&&t[0]===254&&t[1]===255,t9=t=>Yh(t)?JL(t.slice(3)):Qh(t)?t.slice(2):Zh(t)?t.slice(2).swap16():JL(t),r9=t=>Yh(t)?t.slice(3):Qh(t)?new TextEncoder().encode(new TextDecoder("utf-16le").decode(t.slice(2))):Zh(t)?new TextEncoder().encode(new TextDecoder("utf-16be").decode(t.slice(2))):t,JL=t=>Buffer.from(t.toString("utf8"),"utf16le")});var fC=v((vfe,pC)=>{pC.exports=lC;lC.sync=h9;var uC=w("fs");function d9(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function cC(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:d9(e,r)}function lC(t,e,r){uC.stat(t,function(i,n){r(i,i?!1:cC(n,t,e))})}function h9(t,e){return cC(uC.statSync(t),t,e)}});var gC=v((_fe,HC)=>{HC.exports=hC;hC.sync=m9;var dC=w("fs");function hC(t,e,r){dC.stat(t,function(i,n){r(i,i?!1:mC(n,e))})}function m9(t,e){return mC(dC.statSync(t),e)}function mC(t,e){return t.isFile()&&H9(t,e)}function H9(t,e){var r=t.mode,i=t.uid,n=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,p=r&c||r&u&&n===o||r&a&&i===s||r&l&&s===0;return p}});var Bv=v((Afe,yC)=>{var wfe=w("fs"),rm;process.platform==="win32"||global.TESTING_WINDOWS?rm=fC():rm=gC();yC.exports=Nv;Nv.sync=g9;function Nv(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){Nv(t,e||{},function(s,o){s?n(s):i(o)})})}rm(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function g9(t,e){try{return rm.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var SC=v((Ife,IC)=>{var tc=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",bC=w("path"),y9=tc?";":":",vC=Bv(),_C=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),wC=(t,e)=>{let r=e.colon||y9,i=t.match(/\//)||tc&&t.match(/\\/)?[""]:[...tc?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=tc?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=tc?n.split(r):[""];return tc&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},AC=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=wC(t,e),o=[],a=c=>new Promise((l,p)=>{if(c===i.length)return e.all&&o.length?l(o):p(_C(t));let f=i[c],H=/^".*"$/.test(f)?f.slice(1,-1):f,m=bC.join(H,t),y=!H&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;l(u(y,c,0))}),u=(c,l,p)=>new Promise((f,H)=>{if(p===n.length)return f(a(l+1));let m=n[p];vC(c+m,{pathExt:s},(y,b)=>{if(!y&&b)if(e.all)o.push(c+m);else return f(c+m);return f(u(c,l,p+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},b9=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=wC(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=bC.join(u,t),l=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;for(let p=0;p<i.length;p++){let f=l+i[p];try{if(vC.sync(f,{pathExt:n}))if(e.all)s.push(f);else return f}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw _C(t)};IC.exports=AC;AC.sync=b9});var xC=v((Sfe,Fv)=>{"use strict";var EC=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Fv.exports=EC;Fv.exports.default=EC});var DC=v((Efe,PC)=>{"use strict";var LC=w("path"),v9=SC(),_9=xC();function CC(t,e){let r=t.options.env||process.env,i=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let o;try{o=v9.sync(t.command,{path:r[_9({env:r})],pathExt:e?LC.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=LC.resolve(n?t.options.cwd:"",o)),o}function w9(t){return CC(t)||CC(t,!0)}PC.exports=w9});var TC=v((xfe,jv)=>{"use strict";var Uv=/([()\][%!^"`<>&|;, *?])/g;function A9(t){return t=t.replace(Uv,"^$1"),t}function I9(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(Uv,"^$1"),e&&(t=t.replace(Uv,"^$1")),t}jv.exports.command=A9;jv.exports.argument=I9});var MC=v((Lfe,$C)=>{"use strict";$C.exports=/^#!(.*)/});var RC=v((Cfe,kC)=>{"use strict";var S9=MC();kC.exports=(t="")=>{let e=t.match(S9);if(!e)return null;let[r,i]=e[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var NC=v((Pfe,OC)=>{"use strict";var qv=w("fs"),E9=RC();function x9(t){let r=Buffer.alloc(150),i;try{i=qv.openSync(t,"r"),qv.readSync(i,r,0,150,0),qv.closeSync(i)}catch{}return E9(r.toString())}OC.exports=x9});var jC=v((Dfe,UC)=>{"use strict";var L9=w("path"),BC=DC(),FC=TC(),C9=NC(),P9=process.platform==="win32",D9=/\.(?:com|exe)$/i,T9=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function $9(t){t.file=BC(t);let e=t.file&&C9(t.file);return e?(t.args.unshift(t.file),t.command=e,BC(t)):t.file}function M9(t){if(!P9)return t;let e=$9(t),r=!D9.test(e);if(t.options.forceShell||r){let i=T9.test(e);t.command=L9.normalize(t.command),t.command=FC.command(t.command),t.args=t.args.map(s=>FC.argument(s,i));let n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function k9(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let i={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?i:M9(i)}UC.exports=k9});var VC=v((Tfe,WC)=>{"use strict";var Wv=process.platform==="win32";function Vv(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 R9(t,e){if(!Wv)return;let r=t.emit;t.emit=function(i,n){if(i==="exit"){let s=qC(n,e,"spawn");if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function qC(t,e){return Wv&&t===1&&!e.file?Vv(e.original,"spawn"):null}function O9(t,e){return Wv&&t===1&&!e.file?Vv(e.original,"spawnSync"):null}WC.exports={hookChildProcess:R9,verifyENOENT:qC,verifyENOENTSync:O9,notFoundError:Vv}});var XC=v(($fe,rc)=>{"use strict";var GC=w("child_process"),Gv=jC(),Kv=VC();function KC(t,e,r){let i=Gv(t,e,r),n=GC.spawn(i.command,i.args,i.options);return Kv.hookChildProcess(n,i),n}function N9(t,e,r){let i=Gv(t,e,r),n=GC.spawnSync(i.command,i.args,i.options);return n.error=n.error||Kv.verifyENOENTSync(n.status,i),n}rc.exports=KC;rc.exports.spawn=KC;rc.exports.sync=N9;rc.exports._parse=Gv;rc.exports._enoent=Kv});var JC=v((Mfe,zC)=>{"use strict";zC.exports=t=>{let e=typeof t=="string"?`
`:`
`.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===r&&(t=t.slice(0,t.length-1)),t}});var QC=v((kfe,Xv)=>{"use strict";var YC=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Xv.exports=YC;Xv.exports.default=YC});var tP=v((Rfe,Mp)=>{"use strict";var $p=w("path"),ZC=QC(),eP=t=>{t={cwd:process.cwd(),path:process.env[ZC()],execPath:process.execPath,...t};let e,r=$p.resolve(t.cwd),i=[];for(;e!==r;)i.push($p.join(r,"node_modules/.bin")),e=r,r=$p.resolve(r,"..");let n=$p.resolve(t.cwd,t.execPath,"..");return i.push(n),i.concat(t.path).join($p.delimiter)};Mp.exports=eP;Mp.exports.default=eP;Mp.exports.env=t=>{t={env:process.env,...t};let e={...t.env},r=ZC({env:e});return t.path=e[r],e[r]=Mp.exports(t),e}});var iP=v((Ofe,zv)=>{"use strict";var rP=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};zv.exports=rP;zv.exports.default=rP});var sP=v((Nfe,nm)=>{"use strict";var B9=iP(),im=new WeakMap,nP=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0,n=t.displayName||t.name||"<anonymous>",s=function(...o){if(im.set(s,++i),i===1)r=t.apply(this,o),t=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return B9(s,t),im.set(s,i),s};nm.exports=nP;nm.exports.default=nP;nm.exports.callCount=t=>{if(!im.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return im.get(t)}});var oP=v(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.SIGNALS=void 0;var F9=[{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"}];sm.SIGNALS=F9});var Jv=v(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});ic.SIGRTMAX=ic.getRealtimeSignals=void 0;var U9=function(){let t=uP-aP+1;return Array.from({length:t},j9)};ic.getRealtimeSignals=U9;var j9=function(t,e){return{name:`SIGRT${e+1}`,number:aP+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},aP=34,uP=64;ic.SIGRTMAX=uP});var cP=v(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.getSignals=void 0;var q9=w("os"),W9=oP(),V9=Jv(),G9=function(){let t=(0,V9.getRealtimeSignals)();return[...W9.SIGNALS,...t].map(K9)};om.getSignals=G9;var K9=function({name:t,number:e,description:r,action:i,forced:n=!1,standard:s}){let{signals:{[t]:o}}=q9.constants,a=o!==void 0;return{name:t,number:a?o:e,description:r,supported:a,action:i,forced:n,standard:s}}});var pP=v(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.signalsByNumber=nc.signalsByName=void 0;var X9=w("os"),lP=cP(),z9=Jv(),J9=function(){return(0,lP.getSignals)().reduce(Y9,{})},Y9=function(t,{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}){return{...t,[e]:{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}}},Q9=J9();nc.signalsByName=Q9;var Z9=function(){let t=(0,lP.getSignals)(),e=z9.SIGRTMAX+1,r=Array.from({length:e},(i,n)=>eK(n,t));return Object.assign({},...r)},eK=function(t,e){let r=tK(t,e);if(r===void 0)return{};let{name:i,description:n,supported:s,action:o,forced:a,standard:u}=r;return{[t]:{name:i,number:t,description:n,supported:s,action:o,forced:a,standard:u}}},tK=function(t,e){let r=e.find(({name:i})=>X9.constants.signals[i]===t);return r!==void 0?r:e.find(i=>i.number===t)},rK=Z9();nc.signalsByNumber=rK});var dP=v((qfe,fP)=>{"use strict";var{signalsByName:iK}=pP(),nK=({timedOut:t,timeout:e,errorCode:r,signal:i,signalDescription:n,exitCode:s,isCanceled:o})=>t?`timed out after ${e} milliseconds`:o?"was canceled":r!==void 0?`failed with ${r}`:i!==void 0?`was killed with ${i} (${n})`:s!==void 0?`failed with exit code ${s}`:"failed",sK=({stdout:t,stderr:e,all:r,error:i,signal:n,exitCode:s,command:o,escapedCommand:a,timedOut:u,isCanceled:c,killed:l,parsed:{options:{timeout:p}}})=>{s=s===null?void 0:s,n=n===null?void 0:n;let f=n===void 0?void 0:iK[n].description,H=i&&i.code,y=`Command ${nK({timedOut:u,timeout:p,errorCode:H,signal:n,signalDescription:f,exitCode:s,isCanceled:c})}: ${o}`,b=Object.prototype.toString.call(i)==="[object Error]",A=b?`${y}
${i.message}`:y,B=[A,e,t].filter(Boolean).join(`
`);return b?(i.originalMessage=i.message,i.message=B):i=new Error(B),i.shortMessage=A,i.command=o,i.escapedCommand=a,i.exitCode=s,i.signal=n,i.signalDescription=f,i.stdout=t,i.stderr=e,r!==void 0&&(i.all=r),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=Boolean(u),i.isCanceled=c,i.killed=l&&!u,i};fP.exports=sK});var mP=v((Wfe,Yv)=>{"use strict";var am=["stdin","stdout","stderr"],oK=t=>am.some(e=>t[e]!==void 0),hP=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return am.map(i=>t[i]);if(oK(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${am.map(i=>`\`${i}\``).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 r=Math.max(e.length,am.length);return Array.from({length:r},(i,n)=>e[n])};Yv.exports=hP;Yv.exports.node=t=>{let e=hP(t);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var HP=v((Vfe,um)=>{um.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&um.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&um.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var bP=v((Gfe,Op)=>{var aK=w("assert"),kp=HP(),uK=/^win/i.test(process.platform),cm=w("events");typeof cm!="function"&&(cm=cm.EventEmitter);var Zt;process.__signal_exit_emitter__?Zt=process.__signal_exit_emitter__:(Zt=process.__signal_exit_emitter__=new cm,Zt.count=0,Zt.emitted={});Zt.infinite||(Zt.setMaxListeners(1/0),Zt.infinite=!0);Op.exports=function(t,e){aK.equal(typeof t,"function","a callback must be provided for exit handler"),Rp===!1&&gP();var r="exit";e&&e.alwaysLast&&(r="afterexit");var i=function(){Zt.removeListener(r,t),Zt.listeners("exit").length===0&&Zt.listeners("afterexit").length===0&&Zv()};return Zt.on(r,t),i};Op.exports.unload=Zv;function Zv(){Rp&&(Rp=!1,kp.forEach(function(t){try{process.removeListener(t,e_[t])}catch{}}),process.emit=Qv,process.reallyExit=yP,Zt.count-=1)}function sc(t,e,r){Zt.emitted[t]||(Zt.emitted[t]=!0,Zt.emit(t,e,r))}var e_={};kp.forEach(function(t){e_[t]=function(){var r=process.listeners(t);r.length===Zt.count&&(Zv(),sc("exit",null,t),sc("afterexit",null,t),uK&&t==="SIGHUP"&&(t="SIGINT"),process.kill(process.pid,t))}});Op.exports.signals=function(){return kp};Op.exports.load=gP;var Rp=!1;function gP(){Rp||(Rp=!0,Zt.count+=1,kp=kp.filter(function(t){try{return process.on(t,e_[t]),!0}catch{return!1}}),process.emit=lK,process.reallyExit=cK)}var yP=process.reallyExit;function cK(t){process.exitCode=t||0,sc("exit",process.exitCode,null),sc("afterexit",process.exitCode,null),yP.call(process,process.exitCode)}var Qv=process.emit;function lK(t,e){if(t==="exit"){e!==void 0&&(process.exitCode=e);var r=Qv.apply(this,arguments);return sc("exit",process.exitCode,null),sc("afterexit",process.exitCode,null),r}else return Qv.apply(this,arguments)}});var _P=v((Kfe,vP)=>{"use strict";var pK=w("os"),fK=bP(),dK=1e3*5,hK=(t,e="SIGTERM",r={})=>{let i=t(e);return mK(t,e,r,i),i},mK=(t,e,r,i)=>{if(!HK(e,r,i))return;let n=yK(r),s=setTimeout(()=>{t("SIGKILL")},n);s.unref&&s.unref()},HK=(t,{forceKillAfterTimeout:e},r)=>gK(t)&&e!==!1&&r,gK=t=>t===pK.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",yK=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return dK;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},bK=(t,e)=>{t.kill()&&(e.isCanceled=!0)},vK=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},_K=(t,{timeout:e,killSignal:r="SIGTERM"},i)=>{if(e===0||e===void 0)return i;let n,s=new Promise((a,u)=>{n=setTimeout(()=>{vK(t,r,u)},e)}),o=i.finally(()=>{clearTimeout(n)});return Promise.race([s,o])},wK=({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})`)},AK=async(t,{cleanup:e,detached:r},i)=>{if(!e||r)return i;let n=fK(()=>{t.kill()});return i.finally(()=>{n()})};vP.exports={spawnedKill:hK,spawnedCancel:bK,setupTimeout:_K,validateTimeout:wK,setExitHandler:AK}});var AP=v((Xfe,wP)=>{"use strict";var Pn=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Pn.writable=t=>Pn(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Pn.readable=t=>Pn(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Pn.duplex=t=>Pn.writable(t)&&Pn.readable(t);Pn.transform=t=>Pn.duplex(t)&&typeof t._transform=="function"&&typeof t._transformState=="object";wP.exports=Pn});var SP=v((zfe,IP)=>{"use strict";var{PassThrough:IK}=w("stream");IP.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let s=new IK({objectMode:n});r&&s.setEncoding(r);let o=0,a=[];return s.on("data",u=>{a.push(u),n?o=a.length:o+=u.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var EP=v((Jfe,Np)=>{"use strict";var{constants:SK}=w("buffer"),EK=w("stream"),{promisify:xK}=w("util"),LK=SP(),CK=xK(EK.pipeline),lm=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function t_(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=LK(e);return await new Promise((n,s)=>{let o=a=>{a&&i.getBufferedLength()<=SK.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};(async()=>{try{await CK(t,i),n()}catch(a){o(a)}})(),i.on("data",()=>{i.getBufferedLength()>r&&o(new lm)})}),i.getBufferedValue()}Np.exports=t_;Np.exports.buffer=(t,e)=>t_(t,{...e,encoding:"buffer"});Np.exports.array=(t,e)=>t_(t,{...e,array:!0});Np.exports.MaxBufferError=lm});var LP=v((Yfe,xP)=>{"use strict";var{PassThrough:PK}=w("stream");xP.exports=function(){var t=[],e=new PK({objectMode:!0});return e.setMaxListeners(0),e.add=r,e.isEmpty=i,e.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(r),e;function r(s){return Array.isArray(s)?(s.forEach(r),this):(t.push(s),s.once("end",n.bind(null,s)),s.once("error",e.emit.bind(e,"error")),s.pipe(e,{end:!1}),this)}function i(){return t.length==0}function n(s){t=t.filter(function(o){return o!==s}),!t.length&&e.readable&&e.end()}}});var TP=v((Qfe,DP)=>{"use strict";var PP=AP(),CP=EP(),DK=LP(),TK=(t,e)=>{e===void 0||t.stdin===void 0||(PP(e)?e.pipe(t.stdin):t.stdin.end(e))},$K=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let r=DK();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},r_=async(t,e)=>{if(t){t.destroy();try{return await e}catch(r){return r.bufferedData}}},i_=(t,{encoding:e,buffer:r,maxBuffer:i})=>{if(!(!t||!r))return e?CP(t,{encoding:e,maxBuffer:i}):CP.buffer(t,{maxBuffer:i})},MK=async({stdout:t,stderr:e,all:r},{encoding:i,buffer:n,maxBuffer:s},o)=>{let a=i_(t,{encoding:i,buffer:n,maxBuffer:s}),u=i_(e,{encoding:i,buffer:n,maxBuffer:s}),c=i_(r,{encoding:i,buffer:n,maxBuffer:s*2});try{return await Promise.all([o,a,u,c])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},r_(t,a),r_(e,u),r_(r,c)])}},kK=({input:t})=>{if(PP(t))throw new TypeError("The `input` option cannot be a stream in sync mode")};DP.exports={handleInput:TK,makeAllStream:$K,getSpawnedResult:MK,validateInputSync:kK}});var MP=v((Zfe,$P)=>{"use strict";var RK=(async()=>{})().constructor.prototype,OK=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(RK,t)]),NK=(t,e)=>{for(let[r,i]of OK){let n=typeof e=="function"?(...s)=>Reflect.apply(i.value,e(),s):i.value.bind(e);Reflect.defineProperty(t,r,{...i,value:n})}return t},BK=t=>new Promise((e,r)=>{t.on("exit",(i,n)=>{e({exitCode:i,signal:n})}),t.on("error",i=>{r(i)}),t.stdin&&t.stdin.on("error",i=>{r(i)})});$P.exports={mergePromise:NK,getSpawnedPromise:BK}});var OP=v((ede,RP)=>{"use strict";var kP=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],FK=/^[\w.-]+$/,UK=/"/g,jK=t=>typeof t!="string"||FK.test(t)?t:`"${t.replace(UK,'\\"')}"`,qK=(t,e)=>kP(t,e).join(" "),WK=(t,e)=>kP(t,e).map(r=>jK(r)).join(" "),VK=/ +/g,GK=t=>{let e=[];for(let r of t.trim().split(VK)){let i=e[e.length-1];i&&i.endsWith("\\")?e[e.length-1]=`${i.slice(0,-1)} ${r}`:e.push(r)}return e};RP.exports={joinCommand:qK,getEscapedCommand:WK,parseCommand:GK}});var s_=v((tde,oc)=>{"use strict";var KK=w("path"),n_=w("child_process"),XK=XC(),zK=JC(),JK=tP(),YK=sP(),pm=dP(),BP=mP(),{spawnedKill:QK,spawnedCancel:ZK,setupTimeout:eX,validateTimeout:tX,setExitHandler:rX}=_P(),{handleInput:iX,getSpawnedResult:nX,makeAllStream:sX,validateInputSync:oX}=TP(),{mergePromise:NP,getSpawnedPromise:aX}=MP(),{joinCommand:FP,parseCommand:UP,getEscapedCommand:jP}=OP(),uX=1e3*1e3*100,cX=({env:t,extendEnv:e,preferLocal:r,localDir:i,execPath:n})=>{let s=e?{...process.env,...t}:t;return r?JK.env({env:s,cwd:i,execPath:n}):s},qP=(t,e,r={})=>{let i=XK._parse(t,e,r);return t=i.command,e=i.args,r=i.options,r={maxBuffer:uX,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=cX(r),r.stdio=BP(r),process.platform==="win32"&&KK.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:i}},Bp=(t,e,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?zK(e):e,fm=(t,e,r)=>{let i=qP(t,e,r),n=FP(t,e),s=jP(t,e);tX(i.options);let o;try{o=n_.spawn(i.file,i.args,i.options)}catch(H){let m=new n_.ChildProcess,y=Promise.reject(pm({error:H,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}));return NP(m,y)}let a=aX(o),u=eX(o,i.options,a),c=rX(o,i.options,u),l={isCanceled:!1};o.kill=QK.bind(null,o.kill.bind(o)),o.cancel=ZK.bind(null,o,l);let f=YK(async()=>{let[{error:H,exitCode:m,signal:y,timedOut:b},A,B,q]=await nX(o,i.options,c),L=Bp(i.options,A),D=Bp(i.options,B),G=Bp(i.options,q);if(H||m!==0||y!==null){let W=pm({error:H,exitCode:m,signal:y,stdout:L,stderr:D,all:G,command:n,escapedCommand:s,parsed:i,timedOut:b,isCanceled:l.isCanceled,killed:o.killed});if(!i.options.reject)return W;throw W}return{command:n,escapedCommand:s,exitCode:0,stdout:L,stderr:D,all:G,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return iX(o,i.options.input),o.all=sX(o,i.options),NP(o,f)};oc.exports=fm;oc.exports.sync=(t,e,r)=>{let i=qP(t,e,r),n=FP(t,e),s=jP(t,e);oX(i.options);let o;try{o=n_.spawnSync(i.file,i.args,i.options)}catch(c){throw pm({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1})}let a=Bp(i.options,o.stdout,o.error),u=Bp(i.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){let c=pm({stdout:a,stderr:u,error:o.error,signal:o.signal,exitCode:o.status,command:n,escapedCommand:s,parsed:i,timedOut:o.error&&o.error.code==="ETIMEDOUT",isCanceled:!1,killed:o.signal!==null});if(!i.options.reject)return c;throw c}return{command:n,escapedCommand:s,exitCode:0,stdout:a,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};oc.exports.command=(t,e)=>{let[r,...i]=UP(t);return fm(r,i,e)};oc.exports.commandSync=(t,e)=>{let[r,...i]=UP(t);return fm.sync(r,i,e)};oc.exports.node=(t,e,r={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(r=e,e=[]);let i=BP.node(r),n=process.execArgv.filter(a=>!a.startsWith("--inspect")),{nodePath:s=process.execPath,nodeOptions:o=n}=r;return fm(s,[...o,t,...Array.isArray(e)?e:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:i,shell:!1})}});var Dm=v(uT=>{(function t(e){"use strict";var r,i,n,s,o,a;function u(L){var D={},G,W;for(G in L)L.hasOwnProperty(G)&&(W=L[G],typeof W=="object"&&W!==null?D[G]=u(W):D[G]=W);return D}function c(L,D){var G,W,N,M;for(W=L.length,N=0;W;)G=W>>>1,M=N+G,D(L[M])?W=G:(N=M+1,W-=G+1);return N}r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},n={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s={},o={},a={},i={Break:s,Skip:o,Remove:a};function l(L,D){this.parent=L,this.key=D}l.prototype.replace=function(D){this.parent[this.key]=D},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function p(L,D,G,W){this.node=L,this.path=D,this.wrap=G,this.ref=W}function f(){}f.prototype.path=function(){var D,G,W,N,M,R;function S($,O){if(Array.isArray(O))for(W=0,N=O.length;W<N;++W)$.push(O[W]);else $.push(O)}if(!this.__current.path)return null;for(M=[],D=2,G=this.__leavelist.length;D<G;++D)R=this.__leavelist[D],S(M,R.path);return S(M,this.__current.path),M},f.prototype.type=function(){var L=this.current();return L.type||this.__current.wrap},f.prototype.parents=function(){var D,G,W;for(W=[],D=1,G=this.__leavelist.length;D<G;++D)W.push(this.__leavelist[D].node);return W},f.prototype.current=function(){return this.__current.node},f.prototype.__execute=function(D,G){var W,N;return N=void 0,W=this.__current,this.__current=G,this.__state=null,D&&(N=D.call(this,G.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=W,N},f.prototype.notify=function(D){this.__state=D},f.prototype.skip=function(){this.notify(o)},f.prototype.break=function(){this.notify(s)},f.prototype.remove=function(){this.notify(a)},f.prototype.__initialize=function(L,D){this.visitor=D,this.root=L,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,D.fallback==="iteration"?this.__fallback=Object.keys:typeof D.fallback=="function"&&(this.__fallback=D.fallback),this.__keys=n,D.keys&&(this.__keys=Object.assign(Object.create(this.__keys),D.keys))};function H(L){return L==null?!1:typeof L=="object"&&typeof L.type=="string"}function m(L,D){return(L===r.ObjectExpression||L===r.ObjectPattern)&&D==="properties"}function y(L,D){for(var G=L.length-1;G>=0;--G)if(L[G].node===D)return!0;return!1}f.prototype.traverse=function(D,G){var W,N,M,R,S,$,O,z,C,P,ee,te;for(this.__initialize(D,G),te={},W=this.__worklist,N=this.__leavelist,W.push(new p(D,null,null,null)),N.push(new p(null,null,null,null));W.length;){if(M=W.pop(),M===te){if(M=N.pop(),$=this.__execute(G.leave,M),this.__state===s||$===s)return;continue}if(M.node){if($=this.__execute(G.enter,M),this.__state===s||$===s)return;if(W.push(te),N.push(M),this.__state===o||$===o)continue;if(R=M.node,S=R.type||M.wrap,P=this.__keys[S],!P)if(this.__fallback)P=this.__fallback(R);else throw new Error("Unknown node type "+S+".");for(z=P.length;(z-=1)>=0;)if(O=P[z],ee=R[O],!!ee){if(Array.isArray(ee)){for(C=ee.length;(C-=1)>=0;)if(ee[C]&&!y(N,ee[C])){if(m(S,P[z]))M=new p(ee[C],[O,C],"Property",null);else if(H(ee[C]))M=new p(ee[C],[O,C],null,null);else continue;W.push(M)}}else if(H(ee)){if(y(N,ee))continue;W.push(new p(ee,O,null,null))}}}}},f.prototype.replace=function(D,G){var W,N,M,R,S,$,O,z,C,P,ee,te,se;function oe(ie){var de,we,He,Lt;if(ie.ref.remove()){for(we=ie.ref.key,Lt=ie.ref.parent,de=W.length;de--;)if(He=W[de],He.ref&&He.ref.parent===Lt){if(He.ref.key<we)break;--He.ref.key}}}for(this.__initialize(D,G),ee={},W=this.__worklist,N=this.__leavelist,te={root:D},$=new p(D,null,null,new l(te,"root")),W.push($),N.push($);W.length;){if($=W.pop(),$===ee){if($=N.pop(),S=this.__execute(G.leave,$),S!==void 0&&S!==s&&S!==o&&S!==a&&$.ref.replace(S),(this.__state===a||S===a)&&oe($),this.__state===s||S===s)return te.root;continue}if(S=this.__execute(G.enter,$),S!==void 0&&S!==s&&S!==o&&S!==a&&($.ref.replace(S),$.node=S),(this.__state===a||S===a)&&(oe($),$.node=null),this.__state===s||S===s)return te.root;if(M=$.node,!!M&&(W.push(ee),N.push($),!(this.__state===o||S===o))){if(R=M.type||$.wrap,C=this.__keys[R],!C)if(this.__fallback)C=this.__fallback(M);else throw new Error("Unknown node type "+R+".");for(O=C.length;(O-=1)>=0;)if(se=C[O],P=M[se],!!P)if(Array.isArray(P)){for(z=P.length;(z-=1)>=0;)if(P[z]){if(m(R,C[O]))$=new p(P[z],[se,z],"Property",new l(P,z));else if(H(P[z]))$=new p(P[z],[se,z],null,new l(P,z));else continue;W.push($)}}else H(P)&&W.push(new p(P,se,null,new l(M,se)))}}return te.root};function b(L,D){var G=new f;return G.traverse(L,D)}function A(L,D){var G=new f;return G.replace(L,D)}function B(L,D){var G;return G=c(D,function(N){return N.range[0]>L.range[0]}),L.extendedRange=[L.range[0],L.range[1]],G!==D.length&&(L.extendedRange[1]=D[G].range[0]),G-=1,G>=0&&(L.extendedRange[0]=D[G].range[1]),L}function q(L,D,G){var W=[],N,M,R,S;if(!L.range)throw new Error("attachComments needs range information");if(!G.length){if(D.length){for(R=0,M=D.length;R<M;R+=1)N=u(D[R]),N.extendedRange=[0,L.range[0]],W.push(N);L.leadingComments=W}return L}for(R=0,M=D.length;R<M;R+=1)W.push(B(u(D[R]),G));return S=0,b(L,{enter:function($){for(var O;S<W.length&&(O=W[S],!(O.extendedRange[1]>$.range[0]));)O.extendedRange[1]===$.range[0]?($.leadingComments||($.leadingComments=[]),$.leadingComments.push(O),W.splice(S,1)):S+=1;if(S===W.length)return i.Break;if(W[S].extendedRange[0]>$.range[1])return i.Skip}}),S=0,b(L,{leave:function($){for(var O;S<W.length&&(O=W[S],!($.range[1]<O.extendedRange[0]));)$.range[1]===O.extendedRange[0]?($.trailingComments||($.trailingComments=[]),$.trailingComments.push(O),W.splice(S,1)):S+=1;if(S===W.length)return i.Break;if(W[S].extendedRange[0]>$.range[1])return i.Skip}}),L}return e.Syntax=r,e.traverse=b,e.replace=A,e.attachComments=q,e.VisitorKeys=n,e.VisitorOption=i,e.Controller=f,e.cloneEnvironment=function(){return t({})},e})(uT)});var aH=v(bi=>{"use strict";bi.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;bi.find=(t,e)=>t.nodes.find(r=>r.type===e);bi.exceedsLimit=(t,e,r=1,i)=>i===!1||!bi.isInteger(t)||!bi.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;bi.escapeNode=(t,e=0,r)=>{let i=t.nodes[e];i&&(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};bi.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);bi.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;bi.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;bi.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);bi.flatten=(...t)=>{let e=[],r=i=>{for(let n=0;n<i.length;n++){let s=i[n];Array.isArray(s)?r(s,e):s!==void 0&&e.push(s)}return e};return r(t),e}});var uH=v((tge,p$)=>{"use strict";var l$=aH();p$.exports=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&l$.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&l$.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let u of i.nodes)a+=r(u);return a};return r(t)}});var d$=v((rge,f$)=>{"use strict";f$.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var w$=v((ige,_$)=>{"use strict";var h$=d$(),ja=(t,e,r)=>{if(h$(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(h$(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),u=t+":"+e+"="+n+s+o+a;if(ja.cache.hasOwnProperty(u))return ja.cache[u].result;let c=Math.min(t,e),l=Math.max(t,e);if(Math.abs(c-l)===1){let y=t+"|"+e;return i.capture?`(${y})`:i.wrap===!1?y:`(?:${y})`}let p=v$(t)||v$(e),f={min:t,max:e,a:c,b:l},H=[],m=[];if(p&&(f.isPadded=p,f.maxLen=String(f.max).length),c<0){let y=l<0?Math.abs(l):1;m=m$(y,Math.abs(c),f,i),c=f.a=0}return l>=0&&(H=m$(c,l,f,i)),f.negatives=m,f.positives=H,f.result=Oz(m,H,i),i.capture===!0?f.result=`(${f.result})`:i.wrap!==!1&&H.length+m.length>1&&(f.result=`(?:${f.result})`),ja.cache[u]=f,f.result};function Oz(t,e,r){let i=Y_(t,e,"-",!1,r)||[],n=Y_(e,t,"",!1,r)||[],s=Y_(t,e,"-?",!0,r)||[];return i.concat(s).concat(n).join("|")}function Nz(t,e){let r=1,i=1,n=g$(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=g$(t,r);for(n=y$(e+1,i)-1;t<n&&n<=e;)s.add(n),i+=1,n=y$(e+1,i)-1;return s=[...s],s.sort(Uz),s}function Bz(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let i=Fz(t,e),n=i.length,s="",o=0;for(let a=0;a<n;a++){let[u,c]=i[a];u===c?s+=u:u!=="0"||c!=="9"?s+=jz(u,c,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:n}}function m$(t,e,r,i){let n=Nz(t,e),s=[],o=t,a;for(let u=0;u<n.length;u++){let c=n[u],l=Bz(String(o),String(c),i),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+b$(a.count),o=c+1;continue}r.isPadded&&(p=qz(c,r,i)),l.string=p+l.pattern+b$(l.count),s.push(l),o=c+1,a=l}return s}function Y_(t,e,r,i,n){let s=[];for(let o of t){let{string:a}=o;!i&&!H$(e,"string",a)&&s.push(r+a),i&&H$(e,"string",a)&&s.push(r+a)}return s}function Fz(t,e){let r=[];for(let i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}function Uz(t,e){return t>e?1:e>t?-1:0}function H$(t,e,r){return t.some(i=>i[e]===r)}function g$(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function y$(t,e){return t-t%Math.pow(10,e)}function b$(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function jz(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function v$(t){return/^-?(0+)\d/.test(t)}function qz(t,e,r){if(!e.isPadded)return t;let i=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}ja.cache={};ja.clearCache=()=>ja.cache={};_$.exports=ja});var e0=v((nge,P$)=>{"use strict";var Wz=w("util"),S$=w$(),A$=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Vz=t=>e=>t===!0?Number(e):String(e),Q_=t=>typeof t=="number"||typeof t=="string"&&t!=="",hf=t=>Number.isInteger(+t),Z_=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Gz=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Kz=(t,e,r)=>{if(e>0){let i=t[0]==="-"?"-":"";i&&(t=t.slice(1)),t=i+t.padStart(i?e-1:e,"0")}return r===!1?String(t):t},I$=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},Xz=(t,e)=>{t.negatives.sort((o,a)=>o<a?-1:o>a?1:0),t.positives.sort((o,a)=>o<a?-1:o>a?1:0);let r=e.capture?"":"?:",i="",n="",s;return t.positives.length&&(i=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${r}${s})`:s},E$=(t,e,r,i)=>{if(r)return S$(t,e,{wrap:!1,...i});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},x$=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return S$(t,e,r)},L$=(...t)=>new RangeError("Invalid range arguments: "+Wz.inspect(...t)),C$=(t,e,r)=>{if(r.strictRanges===!0)throw L$([t,e]);return[]},zz=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},Jz=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw L$([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let o=n>s,a=String(t),u=String(e),c=String(r);r=Math.max(Math.abs(r),1);let l=Z_(a)||Z_(u)||Z_(c),p=l?Math.max(a.length,u.length,c.length):0,f=l===!1&&Gz(t,e,i)===!1,H=i.transform||Vz(f);if(i.toRegex&&r===1)return E$(I$(t,p),I$(e,p),!0,i);let m={negatives:[],positives:[]},y=B=>m[B<0?"negatives":"positives"].push(Math.abs(B)),b=[],A=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&r>1?y(n):b.push(Kz(H(n,A),p,f)),n=o?n-r:n+r,A++;return i.toRegex===!0?r>1?Xz(m,i):x$(b,null,{wrap:!1,...i}):b},Yz=(t,e,r=1,i={})=>{if(!hf(t)&&t.length>1||!hf(e)&&e.length>1)return C$(t,e,i);let n=i.transform||(f=>String.fromCharCode(f)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,u=Math.min(s,o),c=Math.max(s,o);if(i.toRegex&&r===1)return E$(u,c,!1,i);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(n(s,p)),s=a?s-r:s+r,p++;return i.toRegex===!0?x$(l,null,{wrap:!1,options:i}):l},cH=(t,e,r,i={})=>{if(e==null&&Q_(t))return[t];if(!Q_(t)||!Q_(e))return C$(t,e,i);if(typeof r=="function")return cH(t,e,1,{transform:r});if(A$(r))return cH(t,e,0,r);let n={...i};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,hf(r)?hf(t)&&hf(e)?Jz(t,e,r,n):Yz(t,e,Math.max(Math.abs(r),1),n):r!=null&&!A$(r)?zz(r,n):cH(t,e,1,r)};P$.exports=cH});var $$=v((sge,T$)=>{"use strict";var Qz=e0(),D$=aH(),Zz=(t,e={})=>{let r=(i,n={})=>{let s=D$.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,u=e.escapeInvalid===!0?"\\":"",c="";if(i.isOpen===!0||i.isClose===!0)return u+i.value;if(i.type==="open")return a?u+i.value:"(";if(i.type==="close")return a?u+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":a?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let l=D$.reduce(i.nodes),p=Qz(...l,{...e,wrap:!1,toRegex:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(i.nodes)for(let l of i.nodes)c+=r(l,i);return c};return r(t)};T$.exports=Zz});var R$=v((oge,k$)=>{"use strict";var e7=e0(),M$=uH(),Oc=aH(),qa=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Oc.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(qa(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?qa(n,s,r):n+s);return Oc.flatten(i)},t7=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(n.invalid||n.dollar){a.push(qa(a.pop(),M$(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(qa(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let p=Oc.reduce(n.nodes);if(Oc.exceedsLimit(...p,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=e7(...p,e);f.length===0&&(f=M$(n,e)),a.push(qa(a.pop(),f)),n.nodes=[];return}let u=Oc.encloseBrace(n),c=n.queue,l=n;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let p=0;p<n.nodes.length;p++){let f=n.nodes[p];if(f.type==="comma"&&n.type==="brace"){p===1&&c.push(""),c.push("");continue}if(f.type==="close"){a.push(qa(a.pop(),c,u));continue}if(f.value&&f.type!=="open"){c.push(qa(c.pop(),f.value));continue}f.nodes&&i(f,n)}return c};return Oc.flatten(i(t))};k$.exports=t7});var N$=v((age,O$)=>{"use strict";O$.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"	",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var q$=v((uge,j$)=>{"use strict";var r7=uH(),{MAX_LENGTH:B$,CHAR_BACKSLASH:t0,CHAR_BACKTICK:i7,CHAR_COMMA:n7,CHAR_DOT:s7,CHAR_LEFT_PARENTHESES:o7,CHAR_RIGHT_PARENTHESES:a7,CHAR_LEFT_CURLY_BRACE:u7,CHAR_RIGHT_CURLY_BRACE:c7,CHAR_LEFT_SQUARE_BRACKET:F$,CHAR_RIGHT_SQUARE_BRACKET:U$,CHAR_DOUBLE_QUOTE:l7,CHAR_SINGLE_QUOTE:p7,CHAR_NO_BREAK_SPACE:f7,CHAR_ZERO_WIDTH_NOBREAK_SPACE:d7}=N$(),h7=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(B$,r.maxLength):B$;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],o=n,a=n,u=0,c=t.length,l=0,p=0,f,H={},m=()=>t[l++],y=b=>{if(b.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&b.type==="text"){a.value+=b.value;return}return o.nodes.push(b),b.parent=o,b.prev=a,a=b,b};for(y({type:"bos"});l<c;)if(o=s[s.length-1],f=m(),!(f===d7||f===f7)){if(f===t0){y({type:"text",value:(e.keepEscaping?f:"")+m()});continue}if(f===U$){y({type:"text",value:"\\"+f});continue}if(f===F$){u++;let b=!0,A;for(;l<c&&(A=m());){if(f+=A,A===F$){u++;continue}if(A===t0){f+=m();continue}if(A===U$&&(u--,u===0))break}y({type:"text",value:f});continue}if(f===o7){o=y({type:"paren",nodes:[]}),s.push(o),y({type:"text",value:f});continue}if(f===a7){if(o.type!=="paren"){y({type:"text",value:f});continue}o=s.pop(),y({type:"text",value:f}),o=s[s.length-1];continue}if(f===l7||f===p7||f===i7){let b=f,A;for(e.keepQuotes!==!0&&(f="");l<c&&(A=m());){if(A===t0){f+=A+m();continue}if(A===b){e.keepQuotes===!0&&(f+=A);break}f+=A}y({type:"text",value:f});continue}if(f===u7){p++;let A={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=y(A),s.push(o),y({type:"open",value:f});continue}if(f===c7){if(o.type!=="brace"){y({type:"text",value:f});continue}let b="close";o=s.pop(),o.close=!0,y({type:b,value:f}),p--,o=s[s.length-1];continue}if(f===n7&&p>0){if(o.ranges>0){o.ranges=0;let b=o.nodes.shift();o.nodes=[b,{type:"text",value:r7(o)}]}y({type:"comma",value:f}),o.commas++;continue}if(f===s7&&p>0&&o.commas===0){let b=o.nodes;if(p===0||b.length===0){y({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){b.pop();let A=b[b.length-1];A.value+=a.value+f,a=A,o.ranges--;continue}y({type:"dot",value:f});continue}y({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(B=>{B.nodes||(B.type==="open"&&(B.isOpen=!0),B.type==="close"&&(B.isClose=!0),B.nodes||(B.type="text"),B.invalid=!0)});let b=s[s.length-1],A=b.nodes.indexOf(o);b.nodes.splice(A,1,...o.nodes)}while(s.length>0);return y({type:"eos"}),n};j$.exports=h7});var G$=v((cge,V$)=>{"use strict";var W$=uH(),m7=$$(),H7=R$(),g7=q$(),Qr=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=Qr.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Qr.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Qr.parse=(t,e={})=>g7(t,e);Qr.stringify=(t,e={})=>W$(typeof t=="string"?Qr.parse(t,e):t,e);Qr.compile=(t,e={})=>(typeof t=="string"&&(t=Qr.parse(t,e)),m7(t,e));Qr.expand=(t,e={})=>{typeof t=="string"&&(t=Qr.parse(t,e));let r=H7(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Qr.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Qr.compile(t,e):Qr.expand(t,e);V$.exports=Qr});var mf=v((lge,Y$)=>{"use strict";var y7=w("path"),Nn="\\\\/",K$=`[^${Nn}]`,ys="\\.",b7="\\+",v7="\\?",lH="\\/",_7="(?=.)",X$="[^/]",r0=`(?:${lH}|$)`,z$=`(?:^|${lH})`,i0=`${ys}{1,2}${r0}`,w7=`(?!${ys})`,A7=`(?!${z$}${i0})`,I7=`(?!${ys}{0,1}${r0})`,S7=`(?!${i0})`,E7=`[^.${lH}]`,x7=`${X$}*?`,J$={DOT_LITERAL:ys,PLUS_LITERAL:b7,QMARK_LITERAL:v7,SLASH_LITERAL:lH,ONE_CHAR:_7,QMARK:X$,END_ANCHOR:r0,DOTS_SLASH:i0,NO_DOT:w7,NO_DOTS:A7,NO_DOT_SLASH:I7,NO_DOTS_SLASH:S7,QMARK_NO_DOT:E7,STAR:x7,START_ANCHOR:z$},L7={...J$,SLASH_LITERAL:`[${Nn}]`,QMARK:K$,STAR:`${K$}*?`,DOTS_SLASH:`${ys}{1,2}(?:[${Nn}]|$)`,NO_DOT:`(?!${ys})`,NO_DOTS:`(?!(?:^|[${Nn}])${ys}{1,2}(?:[${Nn}]|$))`,NO_DOT_SLASH:`(?!${ys}{0,1}(?:[${Nn}]|$))`,NO_DOTS_SLASH:`(?!${ys}{1,2}(?:[${Nn}]|$))`,QMARK_NO_DOT:`[^.${Nn}]`,START_ANCHOR:`(?:^|[${Nn}])`,END_ANCHOR:`(?:[${Nn}]|$)`},C7={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Y$.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:C7,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:y7.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?L7:J$}}});var Hf=v(Ur=>{"use strict";var P7=w("path"),D7=process.platform==="win32",{REGEX_BACKSLASH:T7,REGEX_REMOVE_BACKSLASH:$7,REGEX_SPECIAL_CHARS:M7,REGEX_SPECIAL_CHARS_GLOBAL:k7}=mf();Ur.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Ur.hasRegexChars=t=>M7.test(t);Ur.isRegexChar=t=>t.length===1&&Ur.hasRegexChars(t);Ur.escapeRegex=t=>t.replace(k7,"\\$1");Ur.toPosixSlashes=t=>t.replace(T7,"/");Ur.removeBackslashes=t=>t.replace($7,e=>e==="\\"?"":e);Ur.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Ur.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:D7===!0||P7.sep==="\\";Ur.escapeLast=(t,e,r)=>{let i=t.lastIndexOf(e,r);return i===-1?t:t[i-1]==="\\"?Ur.escapeLast(t,e,i-1):`${t.slice(0,i)}\\${t.slice(i)}`};Ur.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Ur.wrapOutput=(t,e={},r={})=>{let i=r.contains?"":"^",n=r.contains?"":"$",s=`${i}(?:${t})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var s1=v((fge,n1)=>{"use strict";var Q$=Hf(),{CHAR_ASTERISK:n0,CHAR_AT:R7,CHAR_BACKWARD_SLASH:gf,CHAR_COMMA:O7,CHAR_DOT:s0,CHAR_EXCLAMATION_MARK:o0,CHAR_FORWARD_SLASH:i1,CHAR_LEFT_CURLY_BRACE:a0,CHAR_LEFT_PARENTHESES:u0,CHAR_LEFT_SQUARE_BRACKET:N7,CHAR_PLUS:B7,CHAR_QUESTION_MARK:Z$,CHAR_RIGHT_CURLY_BRACE:F7,CHAR_RIGHT_PARENTHESES:e1,CHAR_RIGHT_SQUARE_BRACKET:U7}=mf(),t1=t=>t===i1||t===gf,r1=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},j7=(t,e)=>{let r=e||{},i=t.length-1,n=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=t,c=-1,l=0,p=0,f=!1,H=!1,m=!1,y=!1,b=!1,A=!1,B=!1,q=!1,L=!1,D=!1,G=0,W,N,M={value:"",depth:0,isGlob:!1},R=()=>c>=i,S=()=>u.charCodeAt(c+1),$=()=>(W=N,u.charCodeAt(++c));for(;c<i;){N=$();let ee;if(N===gf){B=M.backslashes=!0,N=$(),N===a0&&(A=!0);continue}if(A===!0||N===a0){for(G++;R()!==!0&&(N=$());){if(N===gf){B=M.backslashes=!0,$();continue}if(N===a0){G++;continue}if(A!==!0&&N===s0&&(N=$())===s0){if(f=M.isBrace=!0,m=M.isGlob=!0,D=!0,n===!0)continue;break}if(A!==!0&&N===O7){if(f=M.isBrace=!0,m=M.isGlob=!0,D=!0,n===!0)continue;break}if(N===F7&&(G--,G===0)){A=!1,f=M.isBrace=!0,D=!0;break}}if(n===!0)continue;break}if(N===i1){if(s.push(c),o.push(M),M={value:"",depth:0,isGlob:!1},D===!0)continue;if(W===s0&&c===l+1){l+=2;continue}p=c+1;continue}if(r.noext!==!0&&(N===B7||N===R7||N===n0||N===Z$||N===o0)===!0&&S()===u0){if(m=M.isGlob=!0,y=M.isExtglob=!0,D=!0,N===o0&&c===l&&(L=!0),n===!0){for(;R()!==!0&&(N=$());){if(N===gf){B=M.backslashes=!0,N=$();continue}if(N===e1){m=M.isGlob=!0,D=!0;break}}continue}break}if(N===n0){if(W===n0&&(b=M.isGlobstar=!0),m=M.isGlob=!0,D=!0,n===!0)continue;break}if(N===Z$){if(m=M.isGlob=!0,D=!0,n===!0)continue;break}if(N===N7){for(;R()!==!0&&(ee=$());){if(ee===gf){B=M.backslashes=!0,$();continue}if(ee===U7){H=M.isBracket=!0,m=M.isGlob=!0,D=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&N===o0&&c===l){q=M.negated=!0,l++;continue}if(r.noparen!==!0&&N===u0){if(m=M.isGlob=!0,n===!0){for(;R()!==!0&&(N=$());){if(N===u0){B=M.backslashes=!0,N=$();continue}if(N===e1){D=!0;break}}continue}break}if(m===!0){if(D=!0,n===!0)continue;break}}r.noext===!0&&(y=!1,m=!1);let O=u,z="",C="";l>0&&(z=u.slice(0,l),u=u.slice(l),p-=l),O&&m===!0&&p>0?(O=u.slice(0,p),C=u.slice(p)):m===!0?(O="",C=u):O=u,O&&O!==""&&O!=="/"&&O!==u&&t1(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),r.unescape===!0&&(C&&(C=Q$.removeBackslashes(C)),O&&B===!0&&(O=Q$.removeBackslashes(O)));let P={prefix:z,input:t,start:l,base:O,glob:C,isBrace:f,isBracket:H,isGlob:m,isExtglob:y,isGlobstar:b,negated:q,negatedExtglob:L};if(r.tokens===!0&&(P.maxDepth=0,t1(N)||o.push(M),P.tokens=o),r.parts===!0||r.tokens===!0){let ee;for(let te=0;te<s.length;te++){let se=ee?ee+1:l,oe=s[te],ie=t.slice(se,oe);r.tokens&&(te===0&&l!==0?(o[te].isPrefix=!0,o[te].value=z):o[te].value=ie,r1(o[te]),P.maxDepth+=o[te].depth),(te!==0||ie!=="")&&a.push(ie),ee=oe}if(ee&&ee+1<t.length){let te=t.slice(ee+1);a.push(te),r.tokens&&(o[o.length-1].value=te,r1(o[o.length-1]),P.maxDepth+=o[o.length-1].depth)}P.slashes=s,P.parts=a}return P};n1.exports=j7});var u1=v((dge,a1)=>{"use strict";var pH=mf(),Zr=Hf(),{MAX_LENGTH:fH,POSIX_REGEX_SOURCE:q7,REGEX_NON_SPECIAL_CHARS:W7,REGEX_SPECIAL_CHARS_BACKREF:V7,REPLACEMENTS:o1}=pH,G7=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(n=>Zr.escapeRegex(n)).join("..")}return r},Nc=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,c0=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=o1[t]||t;let r={...e},i=typeof r.maxLength=="number"?Math.min(fH,r.maxLength):fH,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",u=Zr.isWindows(e),c=pH.globChars(u),l=pH.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:f,SLASH_LITERAL:H,ONE_CHAR:m,DOTS_SLASH:y,NO_DOT:b,NO_DOT_SLASH:A,NO_DOTS_SLASH:B,QMARK:q,QMARK_NO_DOT:L,STAR:D,START_ANCHOR:G}=c,W=Q=>`(${a}(?:(?!${G}${Q.dot?y:p}).)*?)`,N=r.dot?"":b,M=r.dot?q:L,R=r.bash===!0?W(r):D;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let S={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Zr.removePrefix(t,S),n=t.length;let $=[],O=[],z=[],C=s,P,ee=()=>S.index===n-1,te=S.peek=(Q=1)=>t[S.index+Q],se=S.advance=()=>t[++S.index]||"",oe=()=>t.slice(S.index+1),ie=(Q="",Ce=0)=>{S.consumed+=Q,S.index+=Ce},de=Q=>{S.output+=Q.output!=null?Q.output:Q.value,ie(Q.value)},we=()=>{let Q=1;for(;te()==="!"&&(te(2)!=="("||te(3)==="?");)se(),S.start++,Q++;return Q%2===0?!1:(S.negated=!0,S.start++,!0)},He=Q=>{S[Q]++,z.push(Q)},Lt=Q=>{S[Q]--,z.pop()},be=Q=>{if(C.type==="globstar"){let Ce=S.braces>0&&(Q.type==="comma"||Q.type==="brace"),Y=Q.extglob===!0||$.length&&(Q.type==="pipe"||Q.type==="paren");Q.type!=="slash"&&Q.type!=="paren"&&!Ce&&!Y&&(S.output=S.output.slice(0,-C.output.length),C.type="star",C.value="*",C.output=R,S.output+=C.output)}if($.length&&Q.type!=="paren"&&($[$.length-1].inner+=Q.value),(Q.value||Q.output)&&de(Q),C&&C.type==="text"&&Q.type==="text"){C.value+=Q.value,C.output=(C.output||"")+Q.value;return}Q.prev=C,o.push(Q),C=Q},yr=(Q,Ce)=>{let Y={...l[Ce],conditions:1,inner:""};Y.prev=C,Y.parens=S.parens,Y.output=S.output;let ge=(r.capture?"(":"")+Y.open;He("parens"),be({type:Q,value:Ce,output:S.output?"":m}),be({type:"paren",extglob:!0,value:se(),output:ge}),$.push(Y)},Vr=Q=>{let Ce=Q.close+(r.capture?")":""),Y;if(Q.type==="negate"){let ge=R;if(Q.inner&&Q.inner.length>1&&Q.inner.includes("/")&&(ge=W(r)),(ge!==R||ee()||/^\)+$/.test(oe()))&&(Ce=Q.close=`)$))${ge}`),Q.inner.includes("*")&&(Y=oe())&&/^\.[^\\/.]+$/.test(Y)){let Ne=c0(Y,{...e,fastpaths:!1}).output;Ce=Q.close=`)${Ne})${ge})`}Q.prev.type==="bos"&&(S.negatedExtglob=!0)}be({type:"paren",extglob:!0,value:P,output:Ce}),Lt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let Q=!1,Ce=t.replace(V7,(Y,ge,Ne,lt,mt,Gs)=>lt==="\\"?(Q=!0,Y):lt==="?"?ge?ge+lt+(mt?q.repeat(mt.length):""):Gs===0?M+(mt?q.repeat(mt.length):""):q.repeat(Ne.length):lt==="."?p.repeat(Ne.length):lt==="*"?ge?ge+lt+(mt?R:""):R:ge?Y:`\\${Y}`);return Q===!0&&(r.unescape===!0?Ce=Ce.replace(/\\/g,""):Ce=Ce.replace(/\\+/g,Y=>Y.length%2===0?"\\\\":Y?"\\":"")),Ce===t&&r.contains===!0?(S.output=t,S):(S.output=Zr.wrapOutput(Ce,S,e),S)}for(;!ee();){if(P=se(),P==="\0")continue;if(P==="\\"){let Y=te();if(Y==="/"&&r.bash!==!0||Y==="."||Y===";")continue;if(!Y){P+="\\",be({type:"text",value:P});continue}let ge=/^\\+/.exec(oe()),Ne=0;if(ge&&ge[0].length>2&&(Ne=ge[0].length,S.index+=Ne,Ne%2!==0&&(P+="\\")),r.unescape===!0?P=se():P+=se(),S.brackets===0){be({type:"text",value:P});continue}}if(S.brackets>0&&(P!=="]"||C.value==="["||C.value==="[^")){if(r.posix!==!1&&P===":"){let Y=C.value.slice(1);if(Y.includes("[")&&(C.posix=!0,Y.includes(":"))){let ge=C.value.lastIndexOf("["),Ne=C.value.slice(0,ge),lt=C.value.slice(ge+2),mt=q7[lt];if(mt){C.value=Ne+mt,S.backtrack=!0,se(),!s.output&&o.indexOf(C)===1&&(s.output=m);continue}}}(P==="["&&te()!==":"||P==="-"&&te()==="]")&&(P=`\\${P}`),P==="]"&&(C.value==="["||C.value==="[^")&&(P=`\\${P}`),r.posix===!0&&P==="!"&&C.value==="["&&(P="^"),C.value+=P,de({value:P});continue}if(S.quotes===1&&P!=='"'){P=Zr.escapeRegex(P),C.value+=P,de({value:P});continue}if(P==='"'){S.quotes=S.quotes===1?0:1,r.keepQuotes===!0&&be({type:"text",value:P});continue}if(P==="("){He("parens"),be({type:"paren",value:P});continue}if(P===")"){if(S.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Nc("opening","("));let Y=$[$.length-1];if(Y&&S.parens===Y.parens+1){Vr($.pop());continue}be({type:"paren",value:P,output:S.parens?")":"\\)"}),Lt("parens");continue}if(P==="["){if(r.nobracket===!0||!oe().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Nc("closing","]"));P=`\\${P}`}else He("brackets");be({type:"bracket",value:P});continue}if(P==="]"){if(r.nobracket===!0||C&&C.type==="bracket"&&C.value.length===1){be({type:"text",value:P,output:`\\${P}`});continue}if(S.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Nc("opening","["));be({type:"text",value:P,output:`\\${P}`});continue}Lt("brackets");let Y=C.value.slice(1);if(C.posix!==!0&&Y[0]==="^"&&!Y.includes("/")&&(P=`/${P}`),C.value+=P,de({value:P}),r.literalBrackets===!1||Zr.hasRegexChars(Y))continue;let ge=Zr.escapeRegex(C.value);if(S.output=S.output.slice(0,-C.value.length),r.literalBrackets===!0){S.output+=ge,C.value=ge;continue}C.value=`(${a}${ge}|${C.value})`,S.output+=C.value;continue}if(P==="{"&&r.nobrace!==!0){He("braces");let Y={type:"brace",value:P,output:"(",outputIndex:S.output.length,tokensIndex:S.tokens.length};O.push(Y),be(Y);continue}if(P==="}"){let Y=O[O.length-1];if(r.nobrace===!0||!Y){be({type:"text",value:P,output:P});continue}let ge=")";if(Y.dots===!0){let Ne=o.slice(),lt=[];for(let mt=Ne.length-1;mt>=0&&(o.pop(),Ne[mt].type!=="brace");mt--)Ne[mt].type!=="dots"&&lt.unshift(Ne[mt].value);ge=G7(lt,r),S.backtrack=!0}if(Y.comma!==!0&&Y.dots!==!0){let Ne=S.output.slice(0,Y.outputIndex),lt=S.tokens.slice(Y.tokensIndex);Y.value=Y.output="\\{",P=ge="\\}",S.output=Ne;for(let mt of lt)S.output+=mt.output||mt.value}be({type:"brace",value:P,output:ge}),Lt("braces"),O.pop();continue}if(P==="|"){$.length>0&&$[$.length-1].conditions++,be({type:"text",value:P});continue}if(P===","){let Y=P,ge=O[O.length-1];ge&&z[z.length-1]==="braces"&&(ge.comma=!0,Y="|"),be({type:"comma",value:P,output:Y});continue}if(P==="/"){if(C.type==="dot"&&S.index===S.start+1){S.start=S.index+1,S.consumed="",S.output="",o.pop(),C=s;continue}be({type:"slash",value:P,output:H});continue}if(P==="."){if(S.braces>0&&C.type==="dot"){C.value==="."&&(C.output=p);let Y=O[O.length-1];C.type="dots",C.output+=P,C.value+=P,Y.dots=!0;continue}if(S.braces+S.parens===0&&C.type!=="bos"&&C.type!=="slash"){be({type:"text",value:P,output:p});continue}be({type:"dot",value:P,output:p});continue}if(P==="?"){if(!(C&&C.value==="(")&&r.noextglob!==!0&&te()==="("&&te(2)!=="?"){yr("qmark",P);continue}if(C&&C.type==="paren"){let ge=te(),Ne=P;if(ge==="<"&&!Zr.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(ge)||ge==="<"&&!/<([!=]|\w+>)/.test(oe()))&&(Ne=`\\${P}`),be({type:"text",value:P,output:Ne});continue}if(r.dot!==!0&&(C.type==="slash"||C.type==="bos")){be({type:"qmark",value:P,output:L});continue}be({type:"qmark",value:P,output:q});continue}if(P==="!"){if(r.noextglob!==!0&&te()==="("&&(te(2)!=="?"||!/[!=<:]/.test(te(3)))){yr("negate",P);continue}if(r.nonegate!==!0&&S.index===0){we();continue}}if(P==="+"){if(r.noextglob!==!0&&te()==="("&&te(2)!=="?"){yr("plus",P);continue}if(C&&C.value==="("||r.regex===!1){be({type:"plus",value:P,output:f});continue}if(C&&(C.type==="bracket"||C.type==="paren"||C.type==="brace")||S.parens>0){be({type:"plus",value:P});continue}be({type:"plus",value:f});continue}if(P==="@"){if(r.noextglob!==!0&&te()==="("&&te(2)!=="?"){be({type:"at",extglob:!0,value:P,output:""});continue}be({type:"text",value:P});continue}if(P!=="*"){(P==="$"||P==="^")&&(P=`\\${P}`);let Y=W7.exec(oe());Y&&(P+=Y[0],S.index+=Y[0].length),be({type:"text",value:P});continue}if(C&&(C.type==="globstar"||C.star===!0)){C.type="star",C.star=!0,C.value+=P,C.output=R,S.backtrack=!0,S.globstar=!0,ie(P);continue}let Q=oe();if(r.noextglob!==!0&&/^\([^?]/.test(Q)){yr("star",P);continue}if(C.type==="star"){if(r.noglobstar===!0){ie(P);continue}let Y=C.prev,ge=Y.prev,Ne=Y.type==="slash"||Y.type==="bos",lt=ge&&(ge.type==="star"||ge.type==="globstar");if(r.bash===!0&&(!Ne||Q[0]&&Q[0]!=="/")){be({type:"star",value:P,output:""});continue}let mt=S.braces>0&&(Y.type==="comma"||Y.type==="brace"),Gs=$.length&&(Y.type==="pipe"||Y.type==="paren");if(!Ne&&Y.type!=="paren"&&!mt&&!Gs){be({type:"star",value:P,output:""});continue}for(;Q.slice(0,3)==="/**";){let Ks=t[S.index+4];if(Ks&&Ks!=="/")break;Q=Q.slice(3),ie("/**",3)}if(Y.type==="bos"&&ee()){C.type="globstar",C.value+=P,C.output=W(r),S.output=C.output,S.globstar=!0,ie(P);continue}if(Y.type==="slash"&&Y.prev.type!=="bos"&&!lt&&ee()){S.output=S.output.slice(0,-(Y.output+C.output).length),Y.output=`(?:${Y.output}`,C.type="globstar",C.output=W(r)+(r.strictSlashes?")":"|$)"),C.value+=P,S.globstar=!0,S.output+=Y.output+C.output,ie(P);continue}if(Y.type==="slash"&&Y.prev.type!=="bos"&&Q[0]==="/"){let Ks=Q[1]!==void 0?"|$":"";S.output=S.output.slice(0,-(Y.output+C.output).length),Y.output=`(?:${Y.output}`,C.type="globstar",C.output=`${W(r)}${H}|${H}${Ks})`,C.value+=P,S.output+=Y.output+C.output,S.globstar=!0,ie(P+se()),be({type:"slash",value:"/",output:""});continue}if(Y.type==="bos"&&Q[0]==="/"){C.type="globstar",C.value+=P,C.output=`(?:^|${H}|${W(r)}${H})`,S.output=C.output,S.globstar=!0,ie(P+se()),be({type:"slash",value:"/",output:""});continue}S.output=S.output.slice(0,-C.output.length),C.type="globstar",C.output=W(r),C.value+=P,S.output+=C.output,S.globstar=!0,ie(P);continue}let Ce={type:"star",value:P,output:R};if(r.bash===!0){Ce.output=".*?",(C.type==="bos"||C.type==="slash")&&(Ce.output=N+Ce.output),be(Ce);continue}if(C&&(C.type==="bracket"||C.type==="paren")&&r.regex===!0){Ce.output=P,be(Ce);continue}(S.index===S.start||C.type==="slash"||C.type==="dot")&&(C.type==="dot"?(S.output+=A,C.output+=A):r.dot===!0?(S.output+=B,C.output+=B):(S.output+=N,C.output+=N),te()!=="*"&&(S.output+=m,C.output+=m)),be(Ce)}for(;S.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Nc("closing","]"));S.output=Zr.escapeLast(S.output,"["),Lt("brackets")}for(;S.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Nc("closing",")"));S.output=Zr.escapeLast(S.output,"("),Lt("parens")}for(;S.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Nc("closing","}"));S.output=Zr.escapeLast(S.output,"{"),Lt("braces")}if(r.strictSlashes!==!0&&(C.type==="star"||C.type==="bracket")&&be({type:"maybe_slash",value:"",output:`${H}?`}),S.backtrack===!0){S.output="";for(let Q of S.tokens)S.output+=Q.output!=null?Q.output:Q.value,Q.suffix&&(S.output+=Q.suffix)}return S};c0.fastpaths=(t,e)=>{let r={...e},i=typeof r.maxLength=="number"?Math.min(fH,r.maxLength):fH,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=o1[t]||t;let s=Zr.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:f,STAR:H,START_ANCHOR:m}=pH.globChars(s),y=r.dot?p:l,b=r.dot?f:l,A=r.capture?"":"?:",B={negated:!1,prefix:""},q=r.bash===!0?".*?":H;r.capture&&(q=`(${q})`);let L=N=>N.noglobstar===!0?q:`(${A}(?:(?!${m}${N.dot?c:o}).)*?)`,D=N=>{switch(N){case"*":return`${y}${u}${q}`;case".*":return`${o}${u}${q}`;case"*.*":return`${y}${q}${o}${u}${q}`;case"*/*":return`${y}${q}${a}${u}${b}${q}`;case"**":return y+L(r);case"**/*":return`(?:${y}${L(r)}${a})?${b}${u}${q}`;case"**/*.*":return`(?:${y}${L(r)}${a})?${b}${q}${o}${u}${q}`;case"**/.*":return`(?:${y}${L(r)}${a})?${o}${u}${q}`;default:{let M=/^(.*?)\.(\w+)$/.exec(N);if(!M)return;let R=D(M[1]);return R?R+o+M[2]:void 0}}},G=Zr.removePrefix(t,B),W=D(G);return W&&r.strictSlashes!==!0&&(W+=`${a}?`),W};a1.exports=c0});var l1=v((hge,c1)=>{"use strict";var K7=w("path"),X7=s1(),l0=u1(),p0=Hf(),z7=mf(),J7=t=>t&&typeof t=="object"&&!Array.isArray(t),At=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(f=>At(f,e,r));return f=>{for(let H of l){let m=H(f);if(m)return m}return!1}}let i=J7(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=p0.isWindows(e),o=i?At.compileRe(t,e):At.makeRe(t,e,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(n.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};u=At(n.ignore,l,r)}let c=(l,p=!1)=>{let{isMatch:f,match:H,output:m}=At.test(l,o,e,{glob:t,posix:s}),y={glob:t,state:a,regex:o,posix:s,input:l,output:m,match:H,isMatch:f};return typeof n.onResult=="function"&&n.onResult(y),f===!1?(y.isMatch=!1,p?y:!1):u(l)?(typeof n.onIgnore=="function"&&n.onIgnore(y),y.isMatch=!1,p?y:!1):(typeof n.onMatch=="function"&&n.onMatch(y),p?y:!0)};return r&&(c.state=a),c};At.test=(t,e,r,{glob:i,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(n?p0.toPosixSlashes:null),a=t===i,u=a&&o?o(t):t;return a===!1&&(u=o?o(t):t,a=u===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=At.matchBase(t,e,r,n):a=e.exec(u)),{isMatch:Boolean(a),match:a,output:u}};At.matchBase=(t,e,r,i=p0.isWindows(r))=>(e instanceof RegExp?e:At.makeRe(e,r)).test(K7.basename(t));At.isMatch=(t,e,r)=>At(e,r)(t);At.parse=(t,e)=>Array.isArray(t)?t.map(r=>At.parse(r,e)):l0(t,{...e,fastpaths:!1});At.scan=(t,e)=>X7(t,e);At.compileRe=(t,e,r=!1,i=!1)=>{if(r===!0)return t.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let u=At.toRegex(a,e);return i===!0&&(u.state=t),u};At.makeRe=(t,e={},r=!1,i=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=l0.fastpaths(t,e)),n.output||(n=l0(t,e)),At.compileRe(n,e,r,i)};At.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};At.constants=z7;c1.exports=At});var f1=v((mge,p1)=>{"use strict";p1.exports=l1()});var yf=v((Hge,H1)=>{"use strict";var h1=w("util"),m1=G$(),Bn=f1(),f0=Hf(),d1=t=>t===""||t==="./",dt=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let i=new Set,n=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<e.length;l++){let p=Bn(String(e[l]),{...r,onResult:a},!0),f=p.state.negated||p.state.negatedExtglob;f&&o++;for(let H of t){let m=p(H,!0);(f?!m.isMatch:m.isMatch)&&(f?i.add(m.output):(i.delete(m.output),n.add(m.output)))}}let c=(o===e.length?[...s]:[...n]).filter(l=>!i.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return c};dt.match=dt;dt.matcher=(t,e)=>Bn(t,e);dt.isMatch=(t,e,r)=>Bn(e,r)(t);dt.any=dt.isMatch;dt.not=(t,e,r={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=a=>{r.onResult&&r.onResult(a),n.push(a.output)},o=new Set(dt(t,e,{...r,onResult:s}));for(let a of n)o.has(a)||i.add(a);return[...i]};dt.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${h1.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>dt.contains(t,i,r));if(typeof e=="string"){if(d1(t)||d1(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return dt.isMatch(t,e,{...r,contains:!0})};dt.matchKeys=(t,e,r)=>{if(!f0.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=dt(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n};dt.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=Bn(String(n),r);if(i.some(o=>s(o)))return!0}return!1};dt.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=Bn(String(n),r);if(!i.every(o=>s(o)))return!1}return!0};dt.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${h1.inspect(t)}"`);return[].concat(e).every(i=>Bn(i,r)(t))};dt.capture=(t,e,r)=>{let i=f0.isWindows(r),s=Bn.makeRe(String(t),{...r,capture:!0}).exec(i?f0.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};dt.makeRe=(...t)=>Bn.makeRe(...t);dt.scan=(...t)=>Bn.scan(...t);dt.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of m1(String(i),e))r.push(Bn.parse(n,e));return r};dt.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:m1(t,e)};dt.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return dt.braces(t,{...e,expand:!0})};H1.exports=dt});var x1=v((oye,E1)=>{"use strict";var{Duplex:rJ}=w("stream");function I1(t){t.emit("close")}function iJ(){!this.destroyed&&this._writableState.finished&&this.destroy()}function S1(t){this.removeListener("error",S1),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function nJ(t,e){let r=!0,i=new rJ({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(s,o){let a=!o&&i._readableState.objectMode?s.toString():s;i.push(a)||t.pause()}),t.once("error",function(s){i.destroyed||(r=!1,i.destroy(s))}),t.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,s){if(t.readyState===t.CLOSED){s(n),process.nextTick(I1,i);return}let o=!1;t.once("error",function(u){o=!0,s(u)}),t.once("close",function(){o||s(n),process.nextTick(I1,i)}),r&&t.terminate()},i._final=function(n){if(t.readyState===t.CONNECTING){t.once("open",function(){i._final(n)});return}t._socket!==null&&(t._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(t._socket.once("finish",function(){n()}),t.close()))},i._read=function(){t.isPaused&&t.resume()},i._write=function(n,s,o){if(t.readyState===t.CONNECTING){t.once("open",function(){i._write(n,s,o)});return}t.send(n,o)},i.on("end",iJ),i.on("error",S1),i}E1.exports=nJ});var Ao=v((aye,L1)=>{"use strict";L1.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 _f=v((uye,d0)=>{"use strict";var{EMPTY_BUFFER:sJ}=Ao();function C1(t,e){if(t.length===0)return sJ;if(t.length===1)return t[0];let r=Buffer.allocUnsafe(e),i=0;for(let n=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return i<e?r.slice(0,i):r}function P1(t,e,r,i,n){for(let s=0;s<n;s++)r[i+s]=t[s]^e[s&3]}function D1(t,e){for(let r=0;r<t.length;r++)t[r]^=e[r&3]}function T1(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}function hH(t){if(hH.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=Buffer.from(t):ArrayBuffer.isView(t)?e=Buffer.from(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),hH.readOnly=!1),e}try{let t=w("bufferutil");d0.exports={concat:C1,mask(e,r,i,n,s){s<48?P1(e,r,i,n,s):t.mask(e,r,i,n,s)},toArrayBuffer:T1,toBuffer:hH,unmask(e,r){e.length<32?D1(e,r):t.unmask(e,r)}}}catch{d0.exports={concat:C1,mask:P1,toArrayBuffer:T1,toBuffer:hH,unmask:D1}}});var k1=v((cye,M1)=>{"use strict";var $1=Symbol("kDone"),h0=Symbol("kRun"),m0=class{constructor(e){this[$1]=()=>{this.pending--,this[h0]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[h0]()}[h0](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[$1])}}};M1.exports=m0});var If=v((lye,B1)=>{"use strict";var wf=w("zlib"),R1=_f(),oJ=k1(),{kStatusCode:O1}=Ao(),aJ=Buffer.from([0,0,255,255]),gH=Symbol("permessage-deflate"),bs=Symbol("total-length"),Af=Symbol("callback"),Io=Symbol("buffers"),HH=Symbol("error"),mH,H0=class{constructor(e,r,i){if(this._maxPayload=i|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!mH){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;mH=new oJ(n)}}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[Af];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let r=this._options,i=e.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(i.server_no_context_takeover=!0),r.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(i.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?i.client_max_window_bits=r.clientMaxWindowBits:(i.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let r=e[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(e){return e.forEach(r=>{Object.keys(r).forEach(i=>{let n=r[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=s}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);r[i]=n})}),e}decompress(e,r,i){mH.add(n=>{this._decompress(e,r,(s,o)=>{n(),i(s,o)})})}compress(e,r,i){mH.add(n=>{this._compress(e,r,(s,o)=>{n(),i(s,o)})})}_decompress(e,r,i){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?wf.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=wf.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[gH]=this,this._inflate[bs]=0,this._inflate[Io]=[],this._inflate.on("error",cJ),this._inflate.on("data",N1)}this._inflate[Af]=i,this._inflate.write(e),r&&this._inflate.write(aJ),this._inflate.flush(()=>{let s=this._inflate[HH];if(s){this._inflate.close(),this._inflate=null,i(s);return}let o=R1.concat(this._inflate[Io],this._inflate[bs]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[bs]=0,this._inflate[Io]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,o)})}_compress(e,r,i){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?wf.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=wf.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[bs]=0,this._deflate[Io]=[],this._deflate.on("data",uJ)}this._deflate[Af]=i,this._deflate.write(e),this._deflate.flush(wf.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=R1.concat(this._deflate[Io],this._deflate[bs]);r&&(s=s.slice(0,s.length-4)),this._deflate[Af]=null,this._deflate[bs]=0,this._deflate[Io]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,s)})}};B1.exports=H0;function uJ(t){this[Io].push(t),this[bs]+=t.length}function N1(t){if(this[bs]+=t.length,this[gH]._maxPayload<1||this[bs]<=this[gH]._maxPayload){this[Io].push(t);return}this[HH]=new RangeError("Max payload size exceeded"),this[HH].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[HH][O1]=1009,this.removeListener("data",N1),this.reset()}function cJ(t){this[gH]._inflate=null,t[O1]=1007,this[Af](t)}});var Sf=v((pye,g0)=>{"use strict";var F1=[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 U1(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function j1(t){let e=t.length,r=0;for(;r<e;)if(!(t[r]&128))r++;else if((t[r]&224)===192){if(r+1===e||(t[r+1]&192)!==128||(t[r]&254)===192)return!1;r+=2}else if((t[r]&240)===224){if(r+2>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||t[r]===224&&(t[r+1]&224)===128||t[r]===237&&(t[r+1]&224)===160)return!1;r+=3}else if((t[r]&248)===240){if(r+3>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||(t[r+3]&192)!==128||t[r]===240&&(t[r+1]&240)===128||t[r]===244&&t[r+1]>143||t[r]>244)return!1;r+=4}else return!1;return!0}try{let t=w("utf-8-validate");g0.exports={isValidStatusCode:U1,isValidUTF8(e){return e.length<150?j1(e):t(e)},tokenChars:F1}}catch{g0.exports={isValidStatusCode:U1,isValidUTF8:j1,tokenChars:F1}}});var _0=v((fye,z1)=>{"use strict";var{Writable:lJ}=w("stream"),q1=If(),{BINARY_TYPES:pJ,EMPTY_BUFFER:W1,kStatusCode:fJ,kWebSocket:dJ}=Ao(),{concat:y0,toArrayBuffer:hJ,unmask:mJ}=_f(),{isValidStatusCode:HJ,isValidUTF8:V1}=Sf(),Ef=0,G1=1,K1=2,X1=3,b0=4,gJ=5,v0=class extends lJ{constructor(e={}){super(),this._binaryType=e.binaryType||pJ[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[dJ]=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._state=Ef,this._loop=!1}_write(e,r,i){if(this._opcode===8&&this._state==Ef)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=i.slice(e),i.slice(0,e)}let r=Buffer.allocUnsafe(e);do{let i=this._buffers[0],n=r.length-e;e>=i.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(i.buffer,i.byteOffset,e),n),this._buffers[0]=i.slice(e)),e-=i.length}while(e>0);return r}startLoop(e){let r;this._loop=!0;do switch(this._state){case Ef:r=this.getInfo();break;case G1:r=this.getPayloadLength16();break;case K1:r=this.getPayloadLength64();break;case X1:this.getMask();break;case b0:r=this.getData(e);break;default:this._loop=!1;return}while(this._loop);e(r)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let e=this.consume(2);if(e[0]&48)return this._loop=!1,Ft(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");let r=(e[0]&64)===64;if(r&&!this._extensions[q1.extensionName])return this._loop=!1,Ft(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=(e[0]&128)===128,this._opcode=e[0]&15,this._payloadLength=e[1]&127,this._opcode===0){if(r)return this._loop=!1,Ft(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Ft(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,Ft(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,Ft(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(r)return this._loop=!1,Ft(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,Ft(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,Ft(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(e[1]&128)===128,this._isServer){if(!this._masked)return this._loop=!1,Ft(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Ft(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=G1;else if(this._payloadLength===127)this._state=K1;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let e=this.consume(8),r=e.readUInt32BE(0);return r>Math.pow(2,53-32)-1?(this._loop=!1,Ft(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=r*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Ft(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=X1:this._state=b0}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=b0}getData(e){let r=W1;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&mJ(r,this._mask)}if(this._opcode>7)return this.controlMessage(r);if(this._compressed){this._state=gJ,this.decompress(r,e);return}return r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage()}decompress(e,r){this._extensions[q1.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return r(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return r(Ft(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(s)}let o=this.dataMessage();if(o)return r(o);this.startLoop(r)})}dataMessage(){if(this._fin){let e=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=y0(r,e):this._binaryType==="arraybuffer"?i=hJ(y0(r,e)):i=r,this.emit("message",i,!0)}else{let i=y0(r,e);if(!this._skipUTF8Validation&&!V1(i))return this._loop=!1,Ft(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",i,!1)}}this._state=Ef}controlMessage(e){if(this._opcode===8)if(this._loop=!1,e.length===0)this.emit("conclude",1005,W1),this.end();else{if(e.length===1)return Ft(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{let r=e.readUInt16BE(0);if(!HJ(r))return Ft(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let i=e.slice(2);if(!this._skipUTF8Validation&&!V1(i))return Ft(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",r,i),this.end()}}else this._opcode===9?this.emit("ping",e):this.emit("pong",e);this._state=Ef}};z1.exports=v0;function Ft(t,e,r,i,n){let s=new t(r?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(s,Ft),s.code=n,s[fJ]=i,s}});var w0=v((mye,Q1)=>{"use strict";var dye=w("net"),hye=w("tls"),{randomFillSync:yJ}=w("crypto"),J1=If(),{EMPTY_BUFFER:bJ}=Ao(),{isValidStatusCode:vJ}=Sf(),{mask:Y1,toBuffer:jc}=_f(),Ji=Symbol("kByteLength"),_J=Buffer.alloc(4),qn=class{constructor(e,r,i){this._extensions=r||{},i&&(this._generateMask=i,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,r){let i,n=!1,s=2,o=!1;r.mask&&(i=r.maskBuffer||_J,r.generateMask?r.generateMask(i):yJ(i,0,4),o=(i[0]|i[1]|i[2]|i[3])===0,s=6);let a;typeof e=="string"?(!r.mask||o)&&r[Ji]!==void 0?a=r[Ji]:(e=Buffer.from(e),a=e.length):(a=e.length,n=r.mask&&r.readOnly&&!o);let u=a;a>=65536?(s+=8,u=127):a>125&&(s+=2,u=126);let c=Buffer.allocUnsafe(n?a+s:s);return c[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(c[0]|=64),c[1]=u,u===126?c.writeUInt16BE(a,2):u===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),r.mask?(c[1]|=128,c[s-4]=i[0],c[s-3]=i[1],c[s-2]=i[2],c[s-1]=i[3],o?[c,e]:n?(Y1(e,i,c,s,a),[c]):(Y1(e,i,e,0,a),[c,e])):[c,e]}close(e,r,i,n){let s;if(e===void 0)s=bJ;else{if(typeof e!="number"||!vJ(e))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(r);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof r=="string"?s.write(r,2):s.set(r,2)}}let o={[Ji]:s.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,n]):this.sendFrame(qn.frame(s,o),n)}ping(e,r,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=jc(e),n=e.length,s=jc.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ji]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(qn.frame(e,o),i)}pong(e,r,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=jc(e),n=e.length,s=jc.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ji]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(qn.frame(e,o),i)}send(e,r,i){let n=this._extensions[J1.extensionName],s=r.binary?2:1,o=r.compress,a,u;if(typeof e=="string"?(a=Buffer.byteLength(e),u=!1):(e=jc(e),a=e.length,u=jc.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=n._threshold),this._compress=o):(o=!1,s=0),r.fin&&(this._firstFragment=!0),n){let c={[Ji]:a,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:u,rsv1:o};this._deflating?this.enqueue([this.dispatch,e,this._compress,c,i]):this.dispatch(e,this._compress,c,i)}else this.sendFrame(qn.frame(e,{[Ji]:a,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:u,rsv1:!1}),i)}dispatch(e,r,i,n){if(!r){this.sendFrame(qn.frame(e,i),n);return}let s=this._extensions[J1.extensionName];this._bufferedBytes+=i[Ji],this._deflating=!0,s.compress(e,i.fin,(o,a)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(u);for(let c=0;c<this._queue.length;c++){let l=this._queue[c],p=l[l.length-1];typeof p=="function"&&p(u)}return}this._bufferedBytes-=i[Ji],this._deflating=!1,i.readOnly=!1,this.sendFrame(qn.frame(a,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][Ji],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Ji],this._queue.push(e)}sendFrame(e,r){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],r),this._socket.uncork()):this._socket.write(e[0],r)}};Q1.exports=qn});var uM=v((Hye,aM)=>{"use strict";var{kForOnEventAttribute:A0,kListener:Z1}=Ao(),eM=Symbol("kCode"),tM=Symbol("kData"),rM=Symbol("kError"),iM=Symbol("kMessage"),nM=Symbol("kReason"),qc=Symbol("kTarget"),sM=Symbol("kType"),oM=Symbol("kWasClean"),vs=class{constructor(e){this[qc]=null,this[sM]=e}get target(){return this[qc]}get type(){return this[sM]}};Object.defineProperty(vs.prototype,"target",{enumerable:!0});Object.defineProperty(vs.prototype,"type",{enumerable:!0});var Wa=class extends vs{constructor(e,r={}){super(e),this[eM]=r.code===void 0?0:r.code,this[nM]=r.reason===void 0?"":r.reason,this[oM]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[eM]}get reason(){return this[nM]}get wasClean(){return this[oM]}};Object.defineProperty(Wa.prototype,"code",{enumerable:!0});Object.defineProperty(Wa.prototype,"reason",{enumerable:!0});Object.defineProperty(Wa.prototype,"wasClean",{enumerable:!0});var Wc=class extends vs{constructor(e,r={}){super(e),this[rM]=r.error===void 0?null:r.error,this[iM]=r.message===void 0?"":r.message}get error(){return this[rM]}get message(){return this[iM]}};Object.defineProperty(Wc.prototype,"error",{enumerable:!0});Object.defineProperty(Wc.prototype,"message",{enumerable:!0});var xf=class extends vs{constructor(e,r={}){super(e),this[tM]=r.data===void 0?null:r.data}get data(){return this[tM]}};Object.defineProperty(xf.prototype,"data",{enumerable:!0});var wJ={addEventListener(t,e,r={}){let i;if(t==="message")i=function(s,o){let a=new xf("message",{data:o?s:s.toString()});a[qc]=this,e.call(this,a)};else if(t==="close")i=function(s,o){let a=new Wa("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[qc]=this,e.call(this,a)};else if(t==="error")i=function(s){let o=new Wc("error",{error:s,message:s.message});o[qc]=this,e.call(this,o)};else if(t==="open")i=function(){let s=new vs("open");s[qc]=this,e.call(this,s)};else return;i[A0]=!!r[A0],i[Z1]=e,r.once?this.once(t,i):this.on(t,i)},removeEventListener(t,e){for(let r of this.listeners(t))if(r[Z1]===e&&!r[A0]){this.removeListener(t,r);break}}};aM.exports={CloseEvent:Wa,ErrorEvent:Wc,Event:vs,EventTarget:wJ,MessageEvent:xf}});var I0=v((gye,cM)=>{"use strict";var{tokenChars:Lf}=Sf();function Wn(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function AJ(t){let e=Object.create(null),r=Object.create(null),i=!1,n=!1,s=!1,o,a,u=-1,c=-1,l=-1,p=0;for(;p<t.length;p++)if(c=t.charCodeAt(p),o===void 0)if(l===-1&&Lf[c]===1)u===-1&&(u=p);else if(p!==0&&(c===32||c===9))l===-1&&u!==-1&&(l=p);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p);let H=t.slice(u,l);c===44?(Wn(e,H,r),r=Object.create(null)):o=H,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(a===void 0)if(l===-1&&Lf[c]===1)u===-1&&(u=p);else if(c===32||c===9)l===-1&&u!==-1&&(l=p);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p),Wn(r,t.slice(u,l),!0),c===44&&(Wn(e,o,r),r=Object.create(null),o=void 0),u=l=-1}else if(c===61&&u!==-1&&l===-1)a=t.slice(u,p),u=l=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(n){if(Lf[c]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:i||(i=!0),n=!1}else if(s)if(Lf[c]===1)u===-1&&(u=p);else if(c===34&&u!==-1)s=!1,l=p;else if(c===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(c===34&&t.charCodeAt(p-1)===61)s=!0;else if(l===-1&&Lf[c]===1)u===-1&&(u=p);else if(u!==-1&&(c===32||c===9))l===-1&&(l=p);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p);let H=t.slice(u,l);i&&(H=H.replace(/\\/g,""),i=!1),Wn(r,a,H),c===44&&(Wn(e,o,r),r=Object.create(null),o=void 0),a=void 0,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||c===32||c===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=p);let f=t.slice(u,l);return o===void 0?Wn(e,f,r):(a===void 0?Wn(r,f,!0):i?Wn(r,a,f.replace(/\\/g,"")):Wn(r,a,f),Wn(e,o,r)),e}function IJ(t){return Object.keys(t).map(e=>{let r=t[e];return Array.isArray(r)||(r=[r]),r.map(i=>[e].concat(Object.keys(i).map(n=>{let s=i[n];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}cM.exports={format:IJ,parse:AJ}});var P0=v((bye,bM)=>{"use strict";var SJ=w("events"),EJ=w("https"),xJ=w("http"),fM=w("net"),LJ=w("tls"),{randomBytes:CJ,createHash:PJ}=w("crypto"),{Readable:yye}=w("stream"),{URL:S0}=w("url"),So=If(),DJ=_0(),TJ=w0(),{BINARY_TYPES:lM,EMPTY_BUFFER:yH,GUID:$J,kForOnEventAttribute:E0,kListener:MJ,kStatusCode:kJ,kWebSocket:hr,NOOP:dM}=Ao(),{EventTarget:{addEventListener:RJ,removeEventListener:OJ}}=uM(),{format:NJ,parse:BJ}=I0(),{toBuffer:FJ}=_f(),_s=["CONNECTING","OPEN","CLOSING","CLOSED"],UJ=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,x0=[8,13],jJ=30*1e3,_e=class extends SJ{constructor(e,r,i){super(),this._binaryType=lM[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=yH,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=_e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(i=r,r=[]):r=[r]),hM(this,e,r,i)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){lM.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,r,i){let n=new DJ({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new TJ(e,this._extensions,i.generateMask),this._receiver=n,this._socket=e,n[hr]=this,e[hr]=this,n.on("conclude",VJ),n.on("drain",GJ),n.on("error",KJ),n.on("message",XJ),n.on("ping",zJ),n.on("pong",JJ),e.setTimeout(0),e.setNoDelay(),r.length>0&&e.unshift(r),e.on("close",HM),e.on("data",bH),e.on("end",gM),e.on("error",yM),this._readyState=_e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=_e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[So.extensionName]&&this._extensions[So.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=_e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,r){if(this.readyState!==_e.CLOSED){if(this.readyState===_e.CONNECTING){let i="WebSocket was closed before the connection was established";return _i(this,this._req,i)}if(this.readyState===_e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=_e.CLOSING,this._sender.close(e,r,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),jJ)}}pause(){this.readyState===_e.CONNECTING||this.readyState===_e.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,r,i){if(this.readyState===_e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==_e.OPEN){C0(this,e,i);return}r===void 0&&(r=!this._isServer),this._sender.ping(e||yH,r,i)}pong(e,r,i){if(this.readyState===_e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==_e.OPEN){C0(this,e,i);return}r===void 0&&(r=!this._isServer),this._sender.pong(e||yH,r,i)}resume(){this.readyState===_e.CONNECTING||this.readyState===_e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,r,i){if(this.readyState===_e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(i=r,r={}),typeof e=="number"&&(e=e.toString()),this.readyState!==_e.OPEN){C0(this,e,i);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[So.extensionName]||(n.compress=!1),this._sender.send(e||yH,n,i)}terminate(){if(this.readyState!==_e.CLOSED){if(this.readyState===_e.CONNECTING){let e="WebSocket was closed before the connection was established";return _i(this,this._req,e)}this._socket&&(this._readyState=_e.CLOSING,this._socket.destroy())}}};Object.defineProperty(_e,"CONNECTING",{enumerable:!0,value:_s.indexOf("CONNECTING")});Object.defineProperty(_e.prototype,"CONNECTING",{enumerable:!0,value:_s.indexOf("CONNECTING")});Object.defineProperty(_e,"OPEN",{enumerable:!0,value:_s.indexOf("OPEN")});Object.defineProperty(_e.prototype,"OPEN",{enumerable:!0,value:_s.indexOf("OPEN")});Object.defineProperty(_e,"CLOSING",{enumerable:!0,value:_s.indexOf("CLOSING")});Object.defineProperty(_e.prototype,"CLOSING",{enumerable:!0,value:_s.indexOf("CLOSING")});Object.defineProperty(_e,"CLOSED",{enumerable:!0,value:_s.indexOf("CLOSED")});Object.defineProperty(_e.prototype,"CLOSED",{enumerable:!0,value:_s.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(_e.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(_e.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[E0])return e[MJ];return null},set(e){for(let r of this.listeners(t))if(r[E0]){this.removeListener(t,r);break}typeof e=="function"&&this.addEventListener(t,e,{[E0]:!0})}})});_e.prototype.addEventListener=RJ;_e.prototype.removeEventListener=OJ;bM.exports=_e;function hM(t,e,r,i){let n={protocolVersion:x0[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!x0.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${x0.join(", ")})`);let s;if(e instanceof S0)s=e,t._url=e.href;else{try{s=new S0(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}t._url=e}let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",u;if(s.protocol!=="ws:"&&!o&&!a?u=`The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"`:a&&!s.pathname?u="The URL's pathname is empty":s.hash&&(u="The URL contains a fragment identifier"),u){let y=new SyntaxError(u);if(t._redirects===0)throw y;L0(t,y);return}let c=o?443:80,l=CJ(16).toString("base64"),p=o?EJ.get:xJ.get,f=new Set,H;if(n.createConnection=o?WJ:qJ,n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket",...n.headers},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(H=new So(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=NJ({[So.extensionName]:H.offer()})),r.length){for(let y of r){if(typeof y!="string"||!UJ.test(y)||f.has(y))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(y)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),a){let y=n.path.split(":");n.socketPath=y[0],n.path=y[1]}if(n.followRedirects){if(t._redirects===0){t._originalHost=s.host;let y=i&&i.headers;if(i={...i,headers:{}},y)for(let[b,A]of Object.entries(y))i.headers[b.toLowerCase()]=A}else s.host!==t._originalHost&&(delete n.headers.authorization,delete n.headers.cookie,delete n.headers.host,n.auth=void 0);n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64"))}let m=t._req=p(n);n.timeout&&m.on("timeout",()=>{_i(t,m,"Opening handshake has timed out")}),m.on("error",y=>{m===null||m.aborted||(m=t._req=null,L0(t,y))}),m.on("response",y=>{let b=y.headers.location,A=y.statusCode;if(b&&n.followRedirects&&A>=300&&A<400){if(++t._redirects>n.maxRedirects){_i(t,m,"Maximum redirects exceeded");return}m.abort();let B;try{B=new S0(b,e)}catch{let L=new SyntaxError(`Invalid URL: ${b}`);L0(t,L);return}hM(t,B,r,i)}else t.emit("unexpected-response",m,y)||_i(t,m,`Unexpected server response: ${y.statusCode}`)}),m.on("upgrade",(y,b,A)=>{if(t.emit("upgrade",y),t.readyState!==_e.CONNECTING)return;m=t._req=null;let B=PJ("sha1").update(l+$J).digest("base64");if(y.headers["sec-websocket-accept"]!==B){_i(t,b,"Invalid Sec-WebSocket-Accept header");return}let q=y.headers["sec-websocket-protocol"],L;if(q!==void 0?f.size?f.has(q)||(L="Server sent an invalid subprotocol"):L="Server sent a subprotocol but none was requested":f.size&&(L="Server sent no subprotocol"),L){_i(t,b,L);return}q&&(t._protocol=q);let D=y.headers["sec-websocket-extensions"];if(D!==void 0){if(!H){_i(t,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let G;try{G=BJ(D)}catch{_i(t,b,"Invalid Sec-WebSocket-Extensions header");return}let W=Object.keys(G);if(W.length!==1||W[0]!==So.extensionName){_i(t,b,"Server indicated an extension that was not requested");return}try{H.accept(G[So.extensionName])}catch{_i(t,b,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[So.extensionName]=H}t.setSocket(b,A,{generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})})}function L0(t,e){t._readyState=_e.CLOSING,t.emit("error",e),t.emitClose()}function qJ(t){return t.path=t.socketPath,fM.connect(t)}function WJ(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=fM.isIP(t.host)?"":t.host),LJ.connect(t)}function _i(t,e,r){t._readyState=_e.CLOSING;let i=new Error(r);Error.captureStackTrace(i,_i),e.setHeader?(e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),e.once("abort",t.emitClose.bind(t)),t.emit("error",i)):(e.destroy(i),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function C0(t,e,r){if(e){let i=FJ(e).length;t._socket?t._sender._bufferedBytes+=i:t._bufferedAmount+=i}if(r){let i=new Error(`WebSocket is not open: readyState ${t.readyState} (${_s[t.readyState]})`);r(i)}}function VJ(t,e){let r=this[hr];r._closeFrameReceived=!0,r._closeMessage=e,r._closeCode=t,r._socket[hr]!==void 0&&(r._socket.removeListener("data",bH),process.nextTick(mM,r._socket),t===1005?r.close():r.close(t,e))}function GJ(){let t=this[hr];t.isPaused||t._socket.resume()}function KJ(t){let e=this[hr];e._socket[hr]!==void 0&&(e._socket.removeListener("data",bH),process.nextTick(mM,e._socket),e.close(t[kJ])),e.emit("error",t)}function pM(){this[hr].emitClose()}function XJ(t,e){this[hr].emit("message",t,e)}function zJ(t){let e=this[hr];e.pong(t,!e._isServer,dM),e.emit("ping",t)}function JJ(t){this[hr].emit("pong",t)}function mM(t){t.resume()}function HM(){let t=this[hr];this.removeListener("close",HM),this.removeListener("data",bH),this.removeListener("end",gM),t._readyState=_e.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[hr]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",pM),t._receiver.on("finish",pM))}function bH(t){this[hr]._receiver.write(t)||this.pause()}function gM(){let t=this[hr];t._readyState=_e.CLOSING,t._receiver.end(),this.end()}function yM(){let t=this[hr];this.removeListener("error",yM),this.on("error",dM),t&&(t._readyState=_e.CLOSING,this.destroy())}});var _M=v((vye,vM)=>{"use strict";var{tokenChars:YJ}=Sf();function QJ(t){let e=new Set,r=-1,i=-1,n=0;for(n;n<t.length;n++){let o=t.charCodeAt(n);if(i===-1&&YJ[o]===1)r===-1&&(r=n);else if(n!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=n);else if(o===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let a=t.slice(r,i);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),r=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let s=t.slice(r,n);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}vM.exports={parse:QJ}});var xM=v((Iye,EM)=>{"use strict";var ZJ=w("events"),vH=w("http"),_ye=w("https"),wye=w("net"),Aye=w("tls"),{createHash:eY}=w("crypto"),wM=I0(),Va=If(),tY=_M(),rY=P0(),{GUID:iY,kWebSocket:nY}=Ao(),sY=/^[+/0-9A-Za-z]{22}==$/,AM=0,IM=1,SM=2,D0=class extends ZJ{constructor(e,r){if(super(),e={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:rY,...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=vH.createServer((i,n)=>{let s=vH.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,r)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=oY(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,o)=>{this.handleUpgrade(n,s,o,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=AM}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===SM){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Cf,this);return}if(e&&this.once("close",e),this._state!==IM)if(this._state=IM,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(Cf,this):process.nextTick(Cf,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{Cf(this)})}}shouldHandle(e){if(this.options.path){let r=e.url.indexOf("?");if((r!==-1?e.url.slice(0,r):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,r,i,n){r.on("error",T0);let s=e.headers["sec-websocket-key"]!==void 0?e.headers["sec-websocket-key"]:!1,o=+e.headers["sec-websocket-version"];if(e.method!=="GET"||e.headers.upgrade.toLowerCase()!=="websocket"||!s||!sY.test(s)||o!==8&&o!==13||!this.shouldHandle(e))return Vc(r,400);let a=e.headers["sec-websocket-protocol"],u=new Set;if(a!==void 0)try{u=tY.parse(a)}catch{return Vc(r,400)}let c=e.headers["sec-websocket-extensions"],l={};if(this.options.perMessageDeflate&&c!==void 0){let p=new Va(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let f=wM.parse(c);f[Va.extensionName]&&(p.accept(f[Va.extensionName]),l[Va.extensionName]=p)}catch{return Vc(r,400)}}if(this.options.verifyClient){let p={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(p,(f,H,m,y)=>{if(!f)return Vc(r,H||401,m,y);this.completeUpgrade(l,s,u,e,r,i,n)});return}if(!this.options.verifyClient(p))return Vc(r,401)}this.completeUpgrade(l,s,u,e,r,i,n)}completeUpgrade(e,r,i,n,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[nY])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>AM)return Vc(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${eY("sha1").update(r+iY).digest("base64")}`],l=new this.options.WebSocket(null);if(i.size){let p=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;p&&(c.push(`Sec-WebSocket-Protocol: ${p}`),l._protocol=p)}if(e[Va.extensionName]){let p=e[Va.extensionName].params,f=wM.format({[Va.extensionName]:[p]});c.push(`Sec-WebSocket-Extensions: ${f}`),l._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r
`).join(`\r
`)),s.removeListener("error",T0),l.setSocket(s,o,{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(Cf,this)})),a(l,n)}};EM.exports=D0;function oY(t,e){for(let r of Object.keys(e))t.on(r,e[r]);return function(){for(let i of Object.keys(e))t.removeListener(i,e[i])}}function Cf(t){t._state=SM,t.emit("close")}function T0(){this.destroy()}function Vc(t,e,r,i){t.writable&&(r=r||vH.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...i},t.write(`HTTP/1.1 ${e} ${vH.STATUS_CODES[e]}\r
`+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
`)+`\r
\r
`+r)),t.removeListener("error",T0),t.destroy()}});var BM=v((obe,NM)=>{"use strict";NM.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var UM=v((abe,FM)=>{FM.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var WM=v((ube,qM)=>{"use strict";var mY=UM(),HY=Array.prototype.concat,gY=Array.prototype.slice,jM=qM.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];mY(s)?r=HY.call(r,gY.call(s)):r.push(s)}return r};jM.wrap=function(t){return function(){return t(jM(arguments))}}});var XM=v((cbe,KM)=>{var Df=BM(),Tf=WM(),VM=Object.hasOwnProperty,GM={};for(EH in Df)VM.call(Df,EH)&&(GM[Df[EH]]=EH);var EH,ei=KM.exports={to:{},get:{}};ei.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=ei.get.hsl(t),i="hsl";break;case"hwb":r=ei.get.hwb(t),i="hwb";break;default:r=ei.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};ei.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,u,c;if(a=t.match(r)){for(c=a[2],a=a[1],u=0;u<3;u++){var l=u*2;o[u]=parseInt(a.slice(l,l+2),16)}c&&(o[3]=parseInt(c,16)/255)}else if(a=t.match(e)){for(a=a[1],c=a[3],u=0;u<3;u++)o[u]=parseInt(a[u]+a[u],16);c&&(o[3]=parseInt(c+c,16)/255)}else if(a=t.match(i)){for(u=0;u<3;u++)o[u]=parseInt(a[u+1],0);a[4]&&(a[5]?o[3]=parseFloat(a[4])*.01:o[3]=parseFloat(a[4]))}else if(a=t.match(n)){for(u=0;u<3;u++)o[u]=Math.round(parseFloat(a[u+1])*2.55);a[4]&&(a[5]?o[3]=parseFloat(a[4])*.01:o[3]=parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:VM.call(Df,a[1])?(o=Df[a[1]],o[3]=1,o):null:null;for(u=0;u<3;u++)o[u]=Eo(o[u],0,255);return o[3]=Eo(o[3],0,1),o};ei.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Eo(parseFloat(r[2]),0,100),o=Eo(parseFloat(r[3]),0,100),a=Eo(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ei.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Eo(parseFloat(r[2]),0,100),o=Eo(parseFloat(r[3]),0,100),a=Eo(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ei.to.hex=function(){var t=Tf(arguments);return"#"+xH(t[0])+xH(t[1])+xH(t[2])+(t[3]<1?xH(Math.round(t[3]*255)):"")};ei.to.rgb=function(){var t=Tf(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};ei.to.rgb.percent=function(){var t=Tf(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};ei.to.hsl=function(){var t=Tf(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};ei.to.hwb=function(){var t=Tf(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};ei.to.keyword=function(t){return GM[t.slice(0,3)]};function Eo(t,e,r){return Math.min(Math.max(e,t),r)}function xH(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var JM=v((lbe,zM)=>{"use strict";zM.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var O0=v((pbe,QM)=>{var $f=JM(),YM={};for(let t of Object.keys($f))YM[$f[t]]=t;var fe={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};QM.exports=fe;for(let t of Object.keys(fe)){if(!("channels"in fe[t]))throw new Error("missing channels property: "+t);if(!("labels"in fe[t]))throw new Error("missing channel labels property: "+t);if(fe[t].labels.length!==fe[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=fe[t];delete fe[t].channels,delete fe[t].labels,Object.defineProperty(fe[t],"channels",{value:e}),Object.defineProperty(fe[t],"labels",{value:r})}fe.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),o=s-n,a,u;s===n?a=0:e===s?a=(r-i)/o:r===s?a=2+(i-e)/o:i===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let c=(n+s)/2;return s===n?u=0:c<=.5?u=o/(s+n):u=o/(2-s-n),[a,u*100,c*100]};fe.rgb.hsv=function(t){let e,r,i,n,s,o=t[0]/255,a=t[1]/255,u=t[2]/255,c=Math.max(o,a,u),l=c-Math.min(o,a,u),p=function(f){return(c-f)/6/l+1/2};return l===0?(n=0,s=0):(s=l/c,e=p(o),r=p(a),i=p(u),o===c?n=i-r:a===c?n=1/3+e-i:u===c&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,c*100]};fe.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=fe.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};fe.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(1-e,1-r,1-i),s=(1-e-n)/(1-n)||0,o=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function yY(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}fe.rgb.keyword=function(t){let e=YM[t];if(e)return e;let r=1/0,i;for(let n of Object.keys($f)){let s=$f[n],o=yY(t,s);o<r&&(r=o,i=n)}return i};fe.keyword.rgb=function(t){return $f[t]};fe.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,o=e*.0193+r*.1192+i*.9505;return[n*100,s*100,o*100]};fe.rgb.lab=function(t){let e=fe.rgb.xyz(t),r=e[0],i=e[1],n=e[2];r/=95.047,i/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(r-i),a=200*(i-n);return[s,o,a]};fe.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,o;if(r===0)return o=i*255,[o,o,o];i<.5?n=i*(1+r):n=i+r-i*r;let a=2*i-n,u=[0,0,0];for(let c=0;c<3;c++)s=e+1/3*-(c-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(n-a)*6*s:2*s<1?o=n:3*s<2?o=a+(n-a)*(2/3-s)*6:o=a,u[c]=o*255;return u};fe.hsl.hsv=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r);return[e,a*100,o*100]};fe.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-r),a=255*i*(1-r*s),u=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,u,o];case 1:return[a,i,o];case 2:return[o,i,u];case 3:return[o,a,i];case 4:return[u,o,i];case 5:return[i,o,a]}};fe.hsv.hsl=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,o;o=(2-r)*i;let a=(2-r)*n;return s=r*n,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};fe.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s;n>1&&(r/=n,i/=n);let o=Math.floor(6*e),a=1-i;s=6*e-o,o&1&&(s=1-s);let u=r+s*(a-r),c,l,p;switch(o){default:case 6:case 0:c=a,l=u,p=r;break;case 1:c=u,l=a,p=r;break;case 2:c=r,l=a,p=u;break;case 3:c=r,l=u,p=a;break;case 4:c=u,l=r,p=a;break;case 5:c=a,l=r,p=u;break}return[c*255,l*255,p*255]};fe.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s=1-Math.min(1,e*(1-n)+n),o=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};fe.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,o;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,o=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[n*255,s*255,o*255]};fe.xyz.lab=function(t){let e=t[0],r=t[1],i=t[2];e/=95.047,r/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let n=116*r-16,s=500*(e-r),o=200*(r-i);return[n,s,o]};fe.lab.xyz=function(t){let e=t[0],r=t[1],i=t[2],n,s,o;s=(e+16)/116,n=r/500+s,o=s-i/200;let a=s**3,u=n**3,c=o**3;return s=a>.008856?a:(s-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};fe.lab.lch=function(t){let e=t[0],r=t[1],i=t[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(r*r+i*i);return[e,o,n]};fe.lch.lab=function(t){let e=t[0],r=t[1],n=t[2]/360*2*Math.PI,s=r*Math.cos(n),o=r*Math.sin(n);return[e,s,o]};fe.rgb.ansi16=function(t,e=null){let[r,i,n]=t,s=e===null?fe.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};fe.hsv.ansi16=function(t){return fe.rgb.ansi16(fe.hsv.rgb(t),t[2])};fe.rgb.ansi256=function(t){let e=t[0],r=t[1],i=t[2];return e===r&&r===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};fe.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};fe.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return[r,i,n]};fe.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};fe.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let i=parseInt(r,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};fe.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),o=n-s,a,u;return o<1?a=s/(1-o):a=0,o<=0?u=0:n===e?u=(r-i)/o%6:n===r?u=2+(i-e)/o:u=4+(e-r)/o,u/=6,u%=1,[u*360,o*100,a*100]};fe.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=r<.5?2*e*r:2*e*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};fe.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};fe.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];let n=[0,0,0],s=e%1*6,o=s%1,a=1-o,u=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=o,n[2]=0;break;case 1:n[0]=a,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=o;break;case 3:n[0]=0,n[1]=a,n[2]=1;break;case 4:n[0]=o,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=a}return u=(1-r)*i,[(r*n[0]+u)*255,(r*n[1]+u)*255,(r*n[2]+u)*255]};fe.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};fe.hcg.hsl=function(t){let e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};fe.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};fe.hwb.hcg=function(t){let e=t[1]/100,i=1-t[2]/100,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};fe.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};fe.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};fe.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};fe.gray.hsl=function(t){return[0,0,t[0]]};fe.gray.hsv=fe.gray.hsl;fe.gray.hwb=function(t){return[0,100,t[0]]};fe.gray.cmyk=function(t){return[0,0,0,t[0]]};fe.gray.lab=function(t){return[t[0],0,0]};fe.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i};fe.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var ek=v((fbe,ZM)=>{var LH=O0();function bY(){let t={},e=Object.keys(LH);for(let r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function vY(t){let e=bY(),r=[t];for(e[t].distance=0;r.length;){let i=r.pop(),n=Object.keys(LH[i]);for(let s=n.length,o=0;o<s;o++){let a=n[o],u=e[a];u.distance===-1&&(u.distance=e[i].distance+1,u.parent=i,r.unshift(a))}}return e}function _Y(t,e){return function(r){return e(t(r))}}function wY(t,e){let r=[e[t].parent,t],i=LH[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),i=_Y(LH[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}ZM.exports=function(t){let e=vY(t),r={},i=Object.keys(e);for(let n=i.length,s=0;s<n;s++){let o=i[s];e[o].parent!==null&&(r[o]=wY(o,e))}return r}});var rk=v((dbe,tk)=>{var N0=O0(),AY=ek(),Yc={},IY=Object.keys(N0);function SY(t){let e=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function EY(t){let e=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=t(r);if(typeof n=="object")for(let s=n.length,o=0;o<s;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}IY.forEach(t=>{Yc[t]={},Object.defineProperty(Yc[t],"channels",{value:N0[t].channels}),Object.defineProperty(Yc[t],"labels",{value:N0[t].labels});let e=AY(t);Object.keys(e).forEach(i=>{let n=e[i];Yc[t][i]=EY(n),Yc[t][i].raw=SY(n)})});tk.exports=Yc});var sk=v((hbe,nk)=>{var Qc=XM(),ti=rk(),U0=[].slice,ik=["keyword","gray","hex"],B0={};for(let t of Object.keys(ti))B0[U0.call(ti[t].labels).sort().join("")]=t;var CH={};function Yt(t,e){if(!(this instanceof Yt))return new Yt(t,e);if(e&&e in ik&&(e=null),e&&!(e in ti))throw new Error("Unknown model: "+e);let r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof Yt)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){let n=Qc.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=ti[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length>0){this.model=e||"rgb",i=ti[this.model].channels;let n=U0.call(t,0,i);this.color=F0(n,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(t);"alpha"in t&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=n.sort().join("");if(!(s in B0))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=B0[s];let o=ti[this.model].labels,a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=F0(a)}if(CH[this.model])for(i=ti[this.model].channels,r=0;r<i;r++){let n=CH[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Yt.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in Qc.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:e.color.concat(this.valpha);return Qc.to[e.model](r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return Qc.to.rgb.percent(r)},array(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object(){let t={},e=ti[this.model].channels,r=ti[this.model].labels;for(let i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new Yt(this.color.map(LY(t)).concat(this.valpha),this.model)},alpha(t){return arguments.length>0?new Yt(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:yt("rgb",0,Ut(255)),green:yt("rgb",1,Ut(255)),blue:yt("rgb",2,Ut(255)),hue:yt(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:yt("hsl",1,Ut(100)),lightness:yt("hsl",2,Ut(100)),saturationv:yt("hsv",1,Ut(100)),value:yt("hsv",2,Ut(100)),chroma:yt("hcg",1,Ut(100)),gray:yt("hcg",2,Ut(100)),white:yt("hwb",1,Ut(100)),wblack:yt("hwb",2,Ut(100)),cyan:yt("cmyk",0,Ut(100)),magenta:yt("cmyk",1,Ut(100)),yellow:yt("cmyk",2,Ut(100)),black:yt("cmyk",3,Ut(100)),x:yt("xyz",0,Ut(100)),y:yt("xyz",1,Ut(100)),z:yt("xyz",2,Ut(100)),l:yt("lab",0,Ut(100)),a:yt("lab",1),b:yt("lab",2),keyword(t){return arguments.length>0?new Yt(t):ti[this.model].keyword(this.color)},hex(t){return arguments.length>0?new Yt(t):Qc.to.hex(this.rgb().round().color)},hexa(t){if(arguments.length>0)return new Yt(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Qc.to.hex(e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,i]of t.entries()){let n=i/255;e[r]=n<=.03928?n/12.92:((n+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*299+t[1]*587+t[2]*114)/1e3<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return Yt.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,o=r.alpha()-i.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-a;return Yt.rgb(a*r.red()+u*i.red(),a*r.green()+u*i.green(),a*r.blue()+u*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let t of Object.keys(ti)){if(ik.includes(t))continue;let e=ti[t].channels;Yt.prototype[t]=function(){if(this.model===t)return new Yt(this);if(arguments.length>0)return new Yt(arguments,t);let r=typeof arguments[e]=="number"?e:this.valpha;return new Yt(CY(ti[this.model][t].raw(this.color)).concat(r),t)},Yt[t]=function(r){return typeof r=="number"&&(r=F0(U0.call(arguments),e)),new Yt(r,t)}}function xY(t,e){return Number(t.toFixed(e))}function LY(t){return function(e){return xY(e,t)}}function yt(t,e,r){t=Array.isArray(t)?t:[t];for(let i of t)(CH[i]||(CH[i]=[]))[e]=r;return t=t[0],function(i){let n;return arguments.length>0?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function Ut(t){return function(e){return Math.max(0,Math.min(t,e))}}function CY(t){return Array.isArray(t)?t:[t]}function F0(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}nk.exports=Yt});var iu=v(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.findWindowsCandidates=qr.sort=qr.preferredEdgePath=qr.preferredChromePath=qr.escapeRegexSpecialChars=qr.canAccess=void 0;var sQ=w("path");async function rg({access:t},e){if(!e)return!1;try{return await t(e),!0}catch{return!1}}qr.canAccess=rg;var oQ="/\\.?*()^${}|[]+";function aQ(t,e){let r=oQ.split("").filter(n=>!e||e.indexOf(n)<0).join("").replace(/[\\\]]/g,"\\$&"),i=new RegExp(`[${r}]`,"g");return t.replace(i,"\\$&")}qr.escapeRegexSpecialChars=aQ;async function uQ(t,e){if(await rg(t,e.CHROME_PATH))return e.CHROME_PATH}qr.preferredChromePath=uQ;async function cQ(t,e){if(await rg(t,e.EDGE_PATH))return e.EDGE_PATH}qr.preferredEdgePath=cQ;function lQ(t,e){return[...t].filter(i=>!!i).map(i=>{let n=e.find(s=>s.regex.test(i));return n?{path:i,weight:n.weight,quality:n.quality}:{path:i,weight:10,quality:"dev"}}).sort((i,n)=>n.weight-i.weight).map(i=>({path:i.path,quality:i.quality}))}qr.sort=lQ;async function pQ(t,e,r){let i=[t.LOCALAPPDATA,t.PROGRAMFILES,t["PROGRAMFILES(X86)"]].filter(s=>!!s),n=[];for(let s of i)for(let o of r){let a=sQ.win32.join(s,o.name);n.push(rg(e,a).then(u=>u?{path:a,quality:o.type}:void 0))}return(await Promise.all(n)).filter(s=>!!s)}qr.findWindowsCandidates=pQ});var _w=v(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});ig.DarwinFinderBase=void 0;var fQ=w("path"),bw=iu(),eR=/( \(0x[a-f0-9]+\))/,vw=class{constructor(e,r,i){this.env=e,this.fs=r,this.execa=i,this.lsRegisterCommand="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump",this.wellKnownPaths=[]}async findWhere(e){for(let r of this.wellKnownPaths)if(e(r)&&await(0,bw.canAccess)(this.fs,r.path))return r;return(await this.findAll()).find(e)}findAll(){var e;return(e=this.foundAll)!==null&&e!==void 0||(this.foundAll=this.findAllInner()),this.foundAll}async findLaunchRegisteredApps(e,r,i){let{stdout:n}=await this.execa.command(`${this.lsRegisterCommand} | awk 'tolower($0) ~ /${e.toLowerCase()}${eR.source}?$/ { $1=""; print $0 }'`,{shell:!0,stdio:"pipe"}),s=[...r,...n.split(`
`).map(u=>u.trim().replace(eR,""))].filter(u=>!!u),o=this.getPreferredPath();o&&s.push(o);let a=new Set;for(let u of s)for(let c of i){let l=fQ.posix.join(u.trim(),c);try{await this.fs.access(l),a.add(l)}catch{}}return a}createPriorities(e){let r=this.env.HOME&&(0,bw.escapeRegexSpecialChars)(this.env.HOME),i=this.getPreferredPath(),n=e.reduce((s,o)=>[...s,{regex:new RegExp(`^/Applications/.*${o.name}`),weight:o.weight+100,quality:o.quality},{regex:new RegExp(`^${r}/Applications/.*${o.name}`),weight:o.weight,quality:o.quality},{regex:new RegExp(`^/Volumes/.*${o.name}`),weight:o.weight-100,quality:o.quality}],[]);return i&&n.unshift({regex:new RegExp((0,bw.escapeRegexSpecialChars)(i)),weight:151,quality:"custom"}),n}};ig.DarwinFinderBase=vw});var tR=v(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});ng.DarwinChromeBrowserFinder=void 0;var dQ=iu(),hQ=_w(),ww=class extends hQ.DarwinFinderBase{constructor(){super(...arguments),this.wellKnownPaths=[{path:"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",quality:"stable"},{path:"/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",quality:"canary"},{path:"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta",quality:"beta"},{path:"/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev",quality:"dev"}]}async findAllInner(){let e=["/Contents/MacOS/Google Chrome Canary","/Contents/MacOS/Google Chrome Beta","/Contents/MacOS/Google Chrome Dev","/Contents/MacOS/Google Chrome"],r=["/Applications/Google Chrome.app","/Applications/Google Chrome Canary.app"],i=await this.findLaunchRegisteredApps("google chrome[A-Za-z() ]*.app",r,e);return(0,dQ.sort)(i,this.createPriorities([{name:"Chrome.app",weight:0,quality:"stable"},{name:"Chrome Canary.app",weight:1,quality:"canary"},{name:"Chrome Beta.app",weight:2,quality:"beta"},{name:"Chrome Dev.app",weight:3,quality:"dev"}]))}getPreferredPath(){return this.env.CHROME_PATH}};ng.DarwinChromeBrowserFinder=ww});var rR=v(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});sg.DarwinEdgeBrowserFinder=void 0;var mQ=iu(),HQ=_w(),Aw=class extends HQ.DarwinFinderBase{constructor(){super(...arguments),this.wellKnownPaths=[{path:"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",quality:"stable"},{path:"/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary",quality:"canary"},{path:"/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta",quality:"beta"},{path:"/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev",quality:"dev"}]}async findAllInner(){let e=["/Contents/MacOS/Microsoft Edge Canary","/Contents/MacOS/Microsoft Edge Beta","/Contents/MacOS/Microsoft Edge Dev","/Contents/MacOS/Microsoft Edge"],r=["/Applications/Microsoft Edge.app"],i=await this.findLaunchRegisteredApps("Microsoft Edge[A-Za-z ]*.app",r,e);return(0,mQ.sort)(i,this.createPriorities([{name:"Microsoft Edge.app",weight:0,quality:"stable"},{name:"Microsoft Edge Canary.app",weight:1,quality:"canary"},{name:"Microsoft Edge Beta.app",weight:2,quality:"beta"},{name:"Microsoft Edge Dev.app",weight:3,quality:"dev"}]))}getPreferredPath(){return this.env.EDGE_PATH}};sg.DarwinEdgeBrowserFinder=Aw});var Ew=v(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});og.LinuxChromeBrowserFinder=void 0;var gQ=w("path"),ol=iu(),Iw=w("child_process"),yQ=w("os"),iR=/\r?\n/,Sw=class{constructor(e,r){this.env=e,this.fs=r,this.pathEnvironmentVar="CHROME_PATH",this.priorities=[{regex:/chrome-wrapper$/,weight:54,quality:"custom"},{regex:/google-chrome-dev$/,weight:53,quality:"dev"},{regex:/google-chrome-canary$/,weight:52,quality:"canary"},{regex:/google-chrome-unstable$/,weight:51,quality:"canary"},{regex:/google-chrome-canary$/,weight:51,quality:"canary"},{regex:/google-chrome-stable$/,weight:50,quality:"stable"},{regex:/google-chrome$/,weight:49,quality:"stable"},{regex:/chromium-browser$/,weight:48,quality:"custom"},{regex:/chromium$/,weight:47,quality:"custom"}],this.executablesOnPath=["google-chrome-unstable","google-chrome-dev","google-chrome-beta","google-chrome-canary","google-chrome-stable","google-chrome","chromium-browser","chromium"]}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=new Set,r=this.env[this.pathEnvironmentVar];r&&await(0,ol.canAccess)(this.fs,r)&&e.add(r),[gQ.posix.join((0,yQ.homedir)(),".local/share/applications/"),"/usr/share/applications/","/usr/bin"].forEach(o=>{for(let a in this.findChromeExecutables(o))e.add(a)}),await Promise.all(this.executablesOnPath.map(async o=>{try{let a=(0,Iw.execFileSync)("which",[o],{stdio:"pipe"}).toString().split(iR)[0];await(0,ol.canAccess)(this.fs,a)&&e.add(a)}catch{}}));let s=r?[{regex:new RegExp((0,ol.escapeRegexSpecialChars)(r)),weight:101,quality:"custom"}].concat(this.priorities):this.priorities;return(0,ol.sort)(e,s)}async findChromeExecutables(e){let r=/(^[^ ]+).*/,i=`^Exec=/.*/(${this.executablesOnPath.join("|")})-.*`,n=[];if(await(0,ol.canAccess)(this.fs,e)){let s;try{s=(0,Iw.execSync)(`grep -ER "${i}" ${e} | awk -F '=' '{print $2}'`)}catch{s=(0,Iw.execSync)(`grep -Er "${i}" ${e} | awk -F '=' '{print $2}'`)}let o=s.toString().split(iR).map(a=>a.replace(r,"$1"));await Promise.all(o.map(async a=>{await(0,ol.canAccess)(this.fs,a)&&n.push(a)}))}return n}};og.LinuxChromeBrowserFinder=Sw});var nR=v(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});ag.LinuxEdgeBrowserFinder=void 0;var bQ=Ew(),xw=class extends bQ.LinuxChromeBrowserFinder{constructor(){super(...arguments),this.pathEnvironmentVar="EDGE_PATH",this.executablesOnPath=["microsoft-edge-dev","microsoft-edge-beta","microsoft-edge-stable","microsoft-edge"],this.priorities=[{regex:/microsoft-edge\-wrapper$/,weight:52,quality:"custom"},{regex:/microsoft-edge\-dev$/,weight:51,quality:"dev"},{regex:/microsoft-edge\-beta$/,weight:51,quality:"beta"},{regex:/microsoft-edge\-stable$/,weight:50,quality:"stable"},{regex:/microsoft-edge$/,weight:49,quality:"stable"}]}};ag.LinuxEdgeBrowserFinder=xw});var oR=v(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});ug.WindowsChromeBrowserFinder=void 0;var vQ=w("path"),sR=iu(),Lw=class{constructor(e,r){this.env=e,this.fs=r}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=vQ.win32.sep,r=[{name:`${e}Google${e}Chrome Dev${e}Application${e}chrome.exe`,type:"dev"},{name:`${e}Google${e}Chrome SxS${e}Application${e}chrome.exe`,type:"canary"},{name:`${e}Google${e}Chrome Beta${e}Application${e}chrome.exe`,type:"beta"},{name:`${e}Google${e}Chrome${e}Application${e}chrome.exe`,type:"stable"}],i=await(0,sR.findWindowsCandidates)(this.env,this.fs,r),n=await(0,sR.preferredChromePath)(this.fs,this.env);return n&&i.unshift({path:n,quality:"custom"}),i}};ug.WindowsChromeBrowserFinder=Lw});var uR=v(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});cg.WindowsEdgeBrowserFinder=void 0;var mr=w("path"),aR=iu(),Cw=class{constructor(e,r){this.env=e,this.fs=r}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=[{name:`${mr.sep}Microsoft${mr.sep}Edge SxS${mr.sep}Application${mr.sep}msedge.exe`,type:"canary"},{name:`${mr.sep}Microsoft${mr.sep}Edge Dev${mr.sep}Application${mr.sep}msedge.exe`,type:"dev"},{name:`${mr.sep}Microsoft${mr.sep}Edge Beta${mr.sep}Application${mr.sep}msedge.exe`,type:"beta"},{name:`${mr.sep}Microsoft${mr.sep}Edge${mr.sep}Application${mr.sep}msedge.exe`,type:"stable"}],r=await(0,aR.findWindowsCandidates)(this.env,this.fs,e),i=await(0,aR.preferredEdgePath)(this.fs,this.env);return i&&r.unshift({path:i,quality:"custom"}),r}};cg.WindowsEdgeBrowserFinder=Cw});var Pw=v(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.EdgeBrowserFinder=Yi.ChromeBrowserFinder=Yi.isQuality=Yi.allQualities=void 0;var _Q=tR(),wQ=rR(),AQ=Ew(),IQ=nR(),SQ=oR(),EQ=uR(),xQ={canary:null,stable:null,beta:null,dev:null,custom:null};Yi.allQualities=new Set(Object.keys(xQ));var LQ=t=>Yi.allQualities.has(t);Yi.isQuality=LQ;Yi.ChromeBrowserFinder=process.platform==="win32"?SQ.WindowsChromeBrowserFinder:process.platform==="darwin"?_Q.DarwinChromeBrowserFinder:AQ.LinuxChromeBrowserFinder;Yi.EdgeBrowserFinder=process.platform==="win32"?EQ.WindowsEdgeBrowserFinder:process.platform==="darwin"?wQ.DarwinEdgeBrowserFinder:IQ.LinuxEdgeBrowserFinder});var mR=v((gAe,hR)=>{"use strict";function PQ(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),i="",n=!1,s=r[0]||"text/plain",o=s;for(let l=1;l<r.length;l++)r[l]==="base64"?n=!0:(o+=`;${r[l]}`,r[l].indexOf("charset=")===0&&(i=r[l].substring(8)));!r[0]&&!i.length&&(o+=";charset=US-ASCII",i="US-ASCII");let a=n?"base64":"ascii",u=unescape(t.substring(e+1)),c=Buffer.from(u,a);return c.type=s,c.typeFull=o,c.charset=i,c}hR.exports=PQ});var Ss=v((Is,fg)=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var HR=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function DQ(t){return HR.includes(t)}var TQ=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...HR];function $Q(t){return TQ.includes(t)}var MQ=["null","undefined","string","number","bigint","boolean","symbol"];function kQ(t){return MQ.includes(t)}function ul(t){return e=>typeof e===t}var{toString:gR}=Object.prototype,jf=t=>{let e=gR.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&E.domElement(t))return"HTMLElement";if($Q(e))return e},it=t=>e=>jf(e)===t;function E(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(E.observable(t))return"Observable";if(E.array(t))return"Array";if(E.buffer(t))return"Buffer";let e=jf(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}E.undefined=ul("undefined");E.string=ul("string");var RQ=ul("number");E.number=t=>RQ(t)&&!E.nan(t);E.bigint=ul("bigint");E.function_=ul("function");E.null_=t=>t===null;E.class_=t=>E.function_(t)&&t.toString().startsWith("class ");E.boolean=t=>t===!0||t===!1;E.symbol=ul("symbol");E.numericString=t=>E.string(t)&&!E.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));E.array=(t,e)=>Array.isArray(t)?E.function_(e)?t.every(e):!0:!1;E.buffer=t=>{var e,r,i,n;return(n=(i=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||i===void 0?void 0:i.call(r,t))!==null&&n!==void 0?n:!1};E.blob=t=>it("Blob")(t);E.nullOrUndefined=t=>E.null_(t)||E.undefined(t);E.object=t=>!E.null_(t)&&(typeof t=="object"||E.function_(t));E.iterable=t=>{var e;return E.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};E.asyncIterable=t=>{var e;return E.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};E.generator=t=>{var e,r;return E.iterable(t)&&E.function_((e=t)===null||e===void 0?void 0:e.next)&&E.function_((r=t)===null||r===void 0?void 0:r.throw)};E.asyncGenerator=t=>E.asyncIterable(t)&&E.function_(t.next)&&E.function_(t.throw);E.nativePromise=t=>it("Promise")(t);var OQ=t=>{var e,r;return E.function_((e=t)===null||e===void 0?void 0:e.then)&&E.function_((r=t)===null||r===void 0?void 0:r.catch)};E.promise=t=>E.nativePromise(t)||OQ(t);E.generatorFunction=it("GeneratorFunction");E.asyncGeneratorFunction=t=>jf(t)==="AsyncGeneratorFunction";E.asyncFunction=t=>jf(t)==="AsyncFunction";E.boundFunction=t=>E.function_(t)&&!t.hasOwnProperty("prototype");E.regExp=it("RegExp");E.date=it("Date");E.error=it("Error");E.map=t=>it("Map")(t);E.set=t=>it("Set")(t);E.weakMap=t=>it("WeakMap")(t);E.weakSet=t=>it("WeakSet")(t);E.int8Array=it("Int8Array");E.uint8Array=it("Uint8Array");E.uint8ClampedArray=it("Uint8ClampedArray");E.int16Array=it("Int16Array");E.uint16Array=it("Uint16Array");E.int32Array=it("Int32Array");E.uint32Array=it("Uint32Array");E.float32Array=it("Float32Array");E.float64Array=it("Float64Array");E.bigInt64Array=it("BigInt64Array");E.bigUint64Array=it("BigUint64Array");E.arrayBuffer=it("ArrayBuffer");E.sharedArrayBuffer=it("SharedArrayBuffer");E.dataView=it("DataView");E.enumCase=(t,e)=>Object.values(e).includes(t);E.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;E.urlInstance=t=>it("URL")(t);E.urlString=t=>{if(!E.string(t))return!1;try{return new URL(t),!0}catch{return!1}};E.truthy=t=>Boolean(t);E.falsy=t=>!t;E.nan=t=>Number.isNaN(t);E.primitive=t=>E.null_(t)||kQ(typeof t);E.integer=t=>Number.isInteger(t);E.safeInteger=t=>Number.isSafeInteger(t);E.plainObject=t=>{if(gR.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};E.typedArray=t=>DQ(jf(t));var NQ=t=>E.safeInteger(t)&&t>=0;E.arrayLike=t=>!E.nullOrUndefined(t)&&!E.function_(t)&&NQ(t.length);E.inRange=(t,e)=>{if(E.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(E.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var BQ=1,FQ=["innerHTML","ownerDocument","style","attributes","nodeValue"];E.domElement=t=>E.object(t)&&t.nodeType===BQ&&E.string(t.nodeName)&&!E.plainObject(t)&&FQ.every(e=>e in t);E.observable=t=>{var e,r,i,n;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((n=(i=t)["@@observable"])===null||n===void 0?void 0:n.call(i)):!1};E.nodeStream=t=>E.object(t)&&E.function_(t.pipe)&&!E.observable(t);E.infinite=t=>t===1/0||t===-1/0;var yR=t=>e=>E.integer(e)&&Math.abs(e%2)===t;E.evenInteger=yR(0);E.oddInteger=yR(1);E.emptyArray=t=>E.array(t)&&t.length===0;E.nonEmptyArray=t=>E.array(t)&&t.length>0;E.emptyString=t=>E.string(t)&&t.length===0;var UQ=t=>E.string(t)&&!/\S/.test(t);E.emptyStringOrWhitespace=t=>E.emptyString(t)||UQ(t);E.nonEmptyString=t=>E.string(t)&&t.length>0;E.nonEmptyStringAndNotWhitespace=t=>E.string(t)&&!E.emptyStringOrWhitespace(t);E.emptyObject=t=>E.object(t)&&!E.map(t)&&!E.set(t)&&Object.keys(t).length===0;E.nonEmptyObject=t=>E.object(t)&&!E.map(t)&&!E.set(t)&&Object.keys(t).length>0;E.emptySet=t=>E.set(t)&&t.size===0;E.nonEmptySet=t=>E.set(t)&&t.size>0;E.emptyMap=t=>E.map(t)&&t.size===0;E.nonEmptyMap=t=>E.map(t)&&t.size>0;E.propertyKey=t=>E.any([E.string,E.number,E.symbol],t);E.formData=t=>it("FormData")(t);E.urlSearchParams=t=>it("URLSearchParams")(t);var bR=(t,e,r)=>{if(!E.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};E.any=(t,...e)=>(E.array(t)?t:[t]).some(i=>bR(Array.prototype.some,i,e));E.all=(t,...e)=>bR(Array.prototype.every,t,e);var Z=(t,e,r,i={})=>{if(!t){let{multipleValues:n}=i,s=n?`received values of types ${[...new Set(r.map(o=>`\`${E(o)}\``))].join(", ")}`:`received value of type \`${E(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${s}.`)}};Is.assert={undefined:t=>Z(E.undefined(t),"undefined",t),string:t=>Z(E.string(t),"string",t),number:t=>Z(E.number(t),"number",t),bigint:t=>Z(E.bigint(t),"bigint",t),function_:t=>Z(E.function_(t),"Function",t),null_:t=>Z(E.null_(t),"null",t),class_:t=>Z(E.class_(t),"Class",t),boolean:t=>Z(E.boolean(t),"boolean",t),symbol:t=>Z(E.symbol(t),"symbol",t),numericString:t=>Z(E.numericString(t),"string with a number",t),array:(t,e)=>{Z(E.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>Z(E.buffer(t),"Buffer",t),blob:t=>Z(E.blob(t),"Blob",t),nullOrUndefined:t=>Z(E.nullOrUndefined(t),"null or undefined",t),object:t=>Z(E.object(t),"Object",t),iterable:t=>Z(E.iterable(t),"Iterable",t),asyncIterable:t=>Z(E.asyncIterable(t),"AsyncIterable",t),generator:t=>Z(E.generator(t),"Generator",t),asyncGenerator:t=>Z(E.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>Z(E.nativePromise(t),"native Promise",t),promise:t=>Z(E.promise(t),"Promise",t),generatorFunction:t=>Z(E.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>Z(E.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>Z(E.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>Z(E.boundFunction(t),"Function",t),regExp:t=>Z(E.regExp(t),"RegExp",t),date:t=>Z(E.date(t),"Date",t),error:t=>Z(E.error(t),"Error",t),map:t=>Z(E.map(t),"Map",t),set:t=>Z(E.set(t),"Set",t),weakMap:t=>Z(E.weakMap(t),"WeakMap",t),weakSet:t=>Z(E.weakSet(t),"WeakSet",t),int8Array:t=>Z(E.int8Array(t),"Int8Array",t),uint8Array:t=>Z(E.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>Z(E.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>Z(E.int16Array(t),"Int16Array",t),uint16Array:t=>Z(E.uint16Array(t),"Uint16Array",t),int32Array:t=>Z(E.int32Array(t),"Int32Array",t),uint32Array:t=>Z(E.uint32Array(t),"Uint32Array",t),float32Array:t=>Z(E.float32Array(t),"Float32Array",t),float64Array:t=>Z(E.float64Array(t),"Float64Array",t),bigInt64Array:t=>Z(E.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>Z(E.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>Z(E.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>Z(E.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>Z(E.dataView(t),"DataView",t),enumCase:(t,e)=>Z(E.enumCase(t,e),"EnumCase",t),urlInstance:t=>Z(E.urlInstance(t),"URL",t),urlString:t=>Z(E.urlString(t),"string with a URL",t),truthy:t=>Z(E.truthy(t),"truthy",t),falsy:t=>Z(E.falsy(t),"falsy",t),nan:t=>Z(E.nan(t),"NaN",t),primitive:t=>Z(E.primitive(t),"primitive",t),integer:t=>Z(E.integer(t),"integer",t),safeInteger:t=>Z(E.safeInteger(t),"integer",t),plainObject:t=>Z(E.plainObject(t),"plain object",t),typedArray:t=>Z(E.typedArray(t),"TypedArray",t),arrayLike:t=>Z(E.arrayLike(t),"array-like",t),domElement:t=>Z(E.domElement(t),"HTMLElement",t),observable:t=>Z(E.observable(t),"Observable",t),nodeStream:t=>Z(E.nodeStream(t),"Node.js Stream",t),infinite:t=>Z(E.infinite(t),"infinite number",t),emptyArray:t=>Z(E.emptyArray(t),"empty array",t),nonEmptyArray:t=>Z(E.nonEmptyArray(t),"non-empty array",t),emptyString:t=>Z(E.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>Z(E.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>Z(E.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>Z(E.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>Z(E.emptyObject(t),"empty object",t),nonEmptyObject:t=>Z(E.nonEmptyObject(t),"non-empty object",t),emptySet:t=>Z(E.emptySet(t),"empty set",t),nonEmptySet:t=>Z(E.nonEmptySet(t),"non-empty set",t),emptyMap:t=>Z(E.emptyMap(t),"empty map",t),nonEmptyMap:t=>Z(E.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>Z(E.propertyKey(t),"PropertyKey",t),formData:t=>Z(E.formData(t),"FormData",t),urlSearchParams:t=>Z(E.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>Z(E.evenInteger(t),"even integer",t),oddInteger:t=>Z(E.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>Z(E.directInstanceOf(t,e),"T",t),inRange:(t,e)=>Z(E.inRange(t,e),"in range",t),any:(t,...e)=>Z(E.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>Z(E.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(E,{class:{value:E.class_},function:{value:E.function_},null:{value:E.null_}});Object.defineProperties(Is.assert,{class:{value:Is.assert.class_},function:{value:Is.assert.function_},null:{value:Is.assert.null_}});Is.default=E;fg.exports=E;fg.exports.default=E;fg.exports.assert=Is.assert});var vR=v((yAe,Tw)=>{"use strict";var dg=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},cl=class{static fn(e){return(...r)=>new cl((i,n,s)=>{r.push(s),e(...r).then(i,n)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,i)=>{this._reject=i;let n=a=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(a))},s=a=>{this._isPending=!1,i(a)},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};return Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(n,s,o)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new dg(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(cl.prototype,Promise.prototype);Tw.exports=cl;Tw.exports.CancelError=dg});var _R=v((Mw,kw)=>{"use strict";Object.defineProperty(Mw,"__esModule",{value:!0});function jQ(t){return t.encrypted}var $w=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let i=typeof r.connect=="function",n=typeof r.secureConnect=="function",s=typeof r.close=="function",o=()=>{i&&r.connect(),jQ(t)&&n&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),s&&t.once("close",r.close)};t.writable&&!t.connecting?o():t.connecting?t.once("connect",o):t.destroyed&&s&&r.close(t._hadError)};Mw.default=$w;kw.exports=$w;kw.exports.default=$w});var wR=v((Ow,Nw)=>{"use strict";Object.defineProperty(Ow,"__esModule",{value:!0});var qQ=_R(),WQ=w("util"),VQ=Number(process.versions.node.split(".")[0]),Rw=t=>{if(t.timings)return t.timings;let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=a=>{let u=a.emit.bind(a);a.emit=(c,...l)=>(c==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,a.emit=u),u(c,...l))};r(t);let i=()=>{e.abort=Date.now(),(!e.response||VQ>=13)&&(e.phases.total=Date.now()-e.start)};t.prependOnceListener("abort",i);let n=a=>{if(e.socket=Date.now(),e.phases.wait=e.socket-e.start,WQ.types.isProxy(a))return;let u=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};a.prependOnceListener("lookup",u),qQ.default(a,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(a.removeListener("lookup",u),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?n(t.socket):t.prependOnceListener("socket",n);let s=()=>{var a;e.upload=Date.now(),e.phases.request=e.upload-((a=e.secureConnect)!==null&&a!==void 0?a:e.connect)};return(()=>typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))()?s():t.prependOnceListener("finish",s),t.prependOnceListener("response",a=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,a.timings=e,r(a),a.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start}),a.prependOnceListener("aborted",i)}),e};Ow.default=Rw;Nw.exports=Rw;Nw.exports.default=Rw});var CR=v((bAe,Uw)=>{"use strict";var{V4MAPPED:GQ,ADDRCONFIG:KQ,ALL:LR,promises:{Resolver:AR},lookup:XQ}=w("dns"),{promisify:Bw}=w("util"),zQ=w("os"),ll=Symbol("cacheableLookupCreateConnection"),Fw=Symbol("cacheableLookupInstance"),IR=Symbol("expires"),JQ=typeof LR=="number",SR=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},YQ=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},ER=()=>{let t=!1,e=!1;for(let r of Object.values(zQ.networkInterfaces()))for(let i of r)if(!i.internal&&(i.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},QQ=t=>Symbol.iterator in t,xR={ttl:!0},ZQ={all:!0},hg=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:i=3600,errorTtl:n=.15,resolver:s=new AR,lookup:o=XQ}={}){if(this.maxTtl=r,this.errorTtl=n,this._cache=e,this._resolver=s,this._dnsLookup=Bw(o),this._resolver instanceof AR?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=Bw(this._resolver.resolve4.bind(this._resolver)),this._resolve6=Bw(this._resolver.resolve6.bind(this._resolver))),this._iface=ER(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,i<1)this._fallback=!1;else{this._fallback=!0;let a=setInterval(()=>{this._hostnamesToFallback.clear()},i*1e3);a.unref&&a.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,i){if(typeof r=="function"?(i=r,r={}):typeof r=="number"&&(r={family:r}),!i)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(n=>{r.all?i(null,n):i(null,n.address,n.family,n.expires,n.ttl)},i)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let i=await this.query(e);if(r.family===6){let n=i.filter(s=>s.family===6);r.hints&GQ&&(JQ&&r.hints&LR||n.length===0)?YQ(i):i=n}else r.family===4&&(i=i.filter(n=>n.family===4));if(r.hints&KQ){let{_iface:n}=this;i=i.filter(s=>s.family===6?n.has6:n.has4)}if(i.length===0){let n=new Error(`cacheableLookup ENOTFOUND ${e}`);throw n.code="ENOTFOUND",n.hostname=e,n}return r.all?i:i[0]}async query(e){let r=await this._cache.get(e);if(!r){let i=this._pending[e];if(i)r=await i;else{let n=this.queryAndCache(e);this._pending[e]=n;try{r=await n}finally{delete this._pending[e]}}}return r=r.map(i=>({...i})),r}async _resolve(e){let r=async c=>{try{return await c}catch(l){if(l.code==="ENODATA"||l.code==="ENOTFOUND")return[];throw l}},[i,n]=await Promise.all([this._resolve4(e,xR),this._resolve6(e,xR)].map(c=>r(c))),s=0,o=0,a=0,u=Date.now();for(let c of i)c.family=4,c.expires=u+c.ttl*1e3,s=Math.max(s,c.ttl);for(let c of n)c.family=6,c.expires=u+c.ttl*1e3,o=Math.max(o,c.ttl);return i.length>0?n.length>0?a=Math.min(s,o):a=s:a=o,{entries:[...i,...n],cacheTtl:a}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,i){if(this.maxTtl>0&&i>0){i=Math.min(i,this.maxTtl)*1e3,r[IR]=Date.now()+i;try{await this._cache.set(e,r,i)}catch(n){this.lookupAsync=async()=>{let s=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw s.cause=n,s}}QQ(this._cache)&&this._tick(i)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,ZQ);let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let i=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,i),r.entries}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let i=1/0,n=Date.now();for(let[s,o]of this._cache){let a=o[IR];n>=a?this._cache.delete(s):a<i&&(i=a)}i!==1/0&&this._tick(i-n)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(SR(e),ll in e)throw new Error("CacheableLookup has been already installed");e[ll]=e.createConnection,e[Fw]=this,e.createConnection=(r,i)=>("lookup"in r||(r.lookup=this.lookup),e[ll](r,i))}uninstall(e){if(SR(e),e[ll]){if(e[Fw]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[ll],delete e[ll],delete e[Fw]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=ER(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};Uw.exports=hg;Uw.exports.default=hg});var TR=v((vAe,DR)=>{"use strict";var eZ="text/plain",tZ="us-ascii",PR=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),rZ=(t,{stripHash:e})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:i,data:n,hash:s}=r.groups,o=i.split(";");s=e?"":s;let a=!1;o[o.length-1]==="base64"&&(o.pop(),a=!0);let u=(o.shift()||"").toLowerCase(),l=[...o.map(p=>{let[f,H=""]=p.split("=").map(m=>m.trim());return f==="charset"&&(H=H.toLowerCase(),H===tZ)?"":`${f}${H?`=${H}`:""}`}).filter(Boolean)];return a&&l.push("base64"),(l.length!==0||u&&u!==eZ)&&l.unshift(u),`data:${l.join(";")},${a?n.trim():n}${s?`#${s}`:""}`},iZ=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return rZ(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let n=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripAuthentication&&(n.username="",n.password=""),e.stripHash?n.hash="":e.stripTextFragment&&(n.hash=n.hash.replace(/#?:~:text.*?$/i,"")),n.pathname&&(n.pathname=n.pathname.replace(/(?<!\b(?:[a-z][a-z\d+\-.]{1,50}:))\/{2,}/g,"/")),n.pathname)try{n.pathname=decodeURI(n.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let o=n.pathname.split("/"),a=o[o.length-1];PR(a,e.removeDirectoryIndex)&&(o=o.slice(0,o.length-1),n.pathname=o.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let o of[...n.searchParams.keys()])PR(o,e.removeQueryParameters)&&n.searchParams.delete(o);e.removeQueryParameters===!0&&(n.search=""),e.sortQueryParameters&&n.searchParams.sort(),e.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,""));let s=t;return t=n.toString(),!e.removeSingleSlash&&n.pathname==="/"&&!s.endsWith("/")&&n.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};DR.exports=iZ});var jw=v((_Ae,MR)=>{MR.exports=$R;function $R(t,e){if(t&&e)return $R(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(i){r[i]=t[i]}),r;function r(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];var s=t.apply(this,i),o=i[i.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(a){s[a]=o[a]}),s}}});var pl=v((wAe,qw)=>{var kR=jw();qw.exports=kR(mg);qw.exports.strict=kR(RR);mg.proto=mg(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return mg(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return RR(this)},configurable:!0})});function mg(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function RR(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var Hg=v((AAe,NR)=>{var nZ=pl(),sZ=function(){},oZ=function(t){return t.setHeader&&typeof t.abort=="function"},aZ=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},OR=function(t,e,r){if(typeof e=="function")return OR(t,null,e);e||(e={}),r=nZ(r||sZ);var i=t._writableState,n=t._readableState,s=e.readable||e.readable!==!1&&t.readable,o=e.writable||e.writable!==!1&&t.writable,a=!1,u=function(){t.writable||c()},c=function(){o=!1,s||r.call(t)},l=function(){s=!1,o||r.call(t)},p=function(b){r.call(t,b?new Error("exited with error code: "+b):null)},f=function(b){r.call(t,b)},H=function(){process.nextTick(m)},m=function(){if(!a){if(s&&!(n&&n.ended&&!n.destroyed))return r.call(t,new Error("premature close"));if(o&&!(i&&i.ended&&!i.destroyed))return r.call(t,new Error("premature close"))}},y=function(){t.req.on("finish",c)};return oZ(t)?(t.on("complete",c),t.on("abort",H),t.req?y():t.on("request",y)):o&&!i&&(t.on("end",u),t.on("close",u)),aZ(t)&&t.on("exit",p),t.on("end",l),t.on("finish",c),e.error!==!1&&t.on("error",f),t.on("close",H),function(){a=!0,t.removeListener("complete",c),t.removeListener("abort",H),t.removeListener("request",y),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("exit",p),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",H)}};NR.exports=OR});var UR=v((IAe,FR)=>{var uZ=pl(),cZ=Hg(),Ww=w("fs"),qf=function(){},lZ=/^v?\.0/.test(process.version),gg=function(t){return typeof t=="function"},pZ=function(t){return!lZ||!Ww?!1:(t instanceof(Ww.ReadStream||qf)||t instanceof(Ww.WriteStream||qf))&&gg(t.close)},fZ=function(t){return t.setHeader&&gg(t.abort)},dZ=function(t,e,r,i){i=uZ(i);var n=!1;t.on("close",function(){n=!0}),cZ(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,pZ(t))return t.close(qf);if(fZ(t))return t.abort();if(gg(t.destroy))return t.destroy();i(o||new Error("stream was destroyed"))}}},BR=function(t){t()},hZ=function(t,e){return t.pipe(e)},mZ=function(){var t=Array.prototype.slice.call(arguments),e=gg(t[t.length-1]||qf)&&t.pop()||qf;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,i=t.map(function(n,s){var o=s<t.length-1,a=s>0;return dZ(n,o,a,function(u){r||(r=u),u&&i.forEach(BR),!o&&(i.forEach(BR),e(r))})});return t.reduce(hZ)};FR.exports=mZ});var qR=v((SAe,jR)=>{"use strict";var{PassThrough:HZ}=w("stream");jR.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let s=new HZ({objectMode:n});r&&s.setEncoding(r);let o=0,a=[];return s.on("data",u=>{a.push(u),n?o=a.length:o+=u.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var WR=v((EAe,fl)=>{"use strict";var{constants:gZ}=w("buffer"),yZ=UR(),bZ=qR(),yg=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function bg(t,e){if(!t)return Promise.reject(new Error("Expected a stream"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i;return await new Promise((n,s)=>{let o=a=>{a&&i.getBufferedLength()<=gZ.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};i=yZ(t,bZ(e),a=>{if(a){o(a);return}n()}),i.on("data",()=>{i.getBufferedLength()>r&&o(new yg)})}),i.getBufferedValue()}fl.exports=bg;fl.exports.default=bg;fl.exports.buffer=(t,e)=>bg(t,{...e,encoding:"buffer"});fl.exports.array=(t,e)=>bg(t,{...e,array:!0});fl.exports.MaxBufferError=yg});var GR=v((LAe,VR)=>{"use strict";var vZ=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),_Z=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),wZ=new Set([500,502,503,504]),AZ={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},IZ={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function nu(t){let e=parseInt(t,10);return isFinite(e)?e:0}function SZ(t){return t?wZ.has(t.status):!0}function Vw(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let i of r){let[n,s]=i.split(/=/,2);e[n.trim()]=s===void 0?!0:s.trim().replace(/^"|"$/g,"")}return e}function EZ(t){let e=[];for(let r in t){let i=t[r];e.push(i===!0?r:r+"="+i)}if(e.length)return e.join(", ")}VR.exports=class{constructor(e,r,{shared:i,cacheHeuristic:n,immutableMinTimeToLive:s,ignoreCargoCult:o,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=i!==!1,this._cacheHeuristic=n!==void 0?n:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=Vw(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=Vw(e.headers["cache-control"]),o&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":EZ(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&_Z.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||vZ.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=Vw(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let i of r)if(e.headers[i]!==this._reqHeaders[i])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let i in e)AZ[i]||(r[i]=e[i]);if(e.connection){let i=e.connection.trim().split(/\s*,\s*/);for(let n of i)delete r[n]}if(r.warning){let i=r.warning.split(/,/).filter(n=>!/^\s*1[0-9][0-9]/.test(n));i.length?r.warning=i.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return nu(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return nu(this._rescc["s-maxage"])}if(this._rescc["max-age"])return nu(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||i<r?0:Math.max(e,(i-r)/1e3)}if(this._resHeaders["last-modified"]){let i=Date.parse(this._resHeaders["last-modified"]);if(isFinite(i)&&r>i)return Math.max(e,(r-i)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+nu(this._rescc["stale-if-error"]),i=e+nu(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,i)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+nu(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+nu(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let n=r["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));n.length?r["if-none-match"]=n.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&SZ(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let i=!1;if(r.status!==void 0&&r.status!=304?i=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(i=!0),!i)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let n={};for(let o in this._resHeaders)n[o]=o in r.headers&&!IZ[o]?r.headers[o]:this._resHeaders[o];let s=Object.assign({},r,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var vg=v((CAe,KR)=>{"use strict";KR.exports=t=>{let e={};for(let[r,i]of Object.entries(t))e[r.toLowerCase()]=i;return e}});var zR=v((PAe,XR)=>{"use strict";var xZ=w("stream").Readable,LZ=vg(),Gw=class extends xZ{constructor(e,r,i,n){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(i instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof n!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=LZ(r),this.body=i,this.url=n}_read(){this.push(this.body),this.push(null)}};XR.exports=Gw});var YR=v((DAe,JR)=>{"use strict";var CZ=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];JR.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(CZ));for(let i of r)i in e||(e[i]=typeof t[i]=="function"?t[i].bind(t):t[i])}});var ZR=v((TAe,QR)=>{"use strict";var PZ=w("stream").PassThrough,DZ=YR(),TZ=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new PZ;return DZ(t,e),t.pipe(e)};QR.exports=TZ});var eO=v(Kw=>{Kw.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",i=Array.isArray(e);r=i?"[":"{";var n=!0;for(var s in e){var o=typeof e[s]=="function"||!i&&typeof e[s]>"u";Object.hasOwnProperty.call(e,s)&&!o&&(n||(r+=","),n=!1,i?e[s]==null?r+="null":r+=t(e[s]):e[s]!==void 0&&(r+=t(s)+":"+t(e[s])))}return r+=i?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};Kw.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var nO=v((MAe,iO)=>{"use strict";var $Z=w("events"),tO=eO(),MZ=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(w(e[r]))(t)}return new Map},rO=["sqlite","postgres","mysql","mongo","redis","tiered"],Xw=class extends $Z{constructor(e,{emitErrors:r=!0,...i}={}){if(super(),this.opts={namespace:"keyv",serialize:tO.stringify,deserialize:tO.parse,...typeof e=="string"?{uri:e}:e,...i},!this.opts.store){let s={...this.opts};this.opts.store=MZ(s)}if(this.opts.compression){let s=this.opts.compression;this.opts.serialize=s.serialize.bind(s),this.opts.deserialize=s.deserialize.bind(s)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",s=>this.emit("error",s)),this.opts.store.namespace=this.opts.namespace;let n=s=>async function*(){for await(let[o,a]of typeof s=="function"?s(this.opts.store.namespace):s){let u=this.opts.deserialize(a);if(!(this.opts.store.namespace&&!o.includes(this.opts.store.namespace))){if(typeof u.expires=="number"&&Date.now()>u.expires){this.delete(o);continue}yield[this._getKeyUnprefix(o),u.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=n(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=n(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return rO.includes(this.opts.store.opts.dialect)||rO.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:i}=this.opts,n=Array.isArray(e),s=n?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(n&&i.getMany===void 0){let o=[];for(let a of s)o.push(Promise.resolve().then(()=>i.get(a)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return typeof u.expires=="number"&&Date.now()>u.expires?this.delete(a).then(()=>{}):r&&r.raw?u:u.value}));return Promise.allSettled(o).then(a=>{let u=[];for(let c of a)u.push(c.value);return u})}return Promise.resolve().then(()=>n?i.getMany(s):i.get(s)).then(o=>typeof o=="string"?this.opts.deserialize(o):this.opts.compression?this.opts.deserialize(o):o).then(o=>{if(o!=null){if(n){let a=[];for(let u of o){if(typeof u=="string"&&(u=this.opts.deserialize(u)),u==null){a.push(void 0);continue}typeof u.expires=="number"&&Date.now()>u.expires?(this.delete(e).then(()=>{}),a.push(void 0)):a.push(r&&r.raw?u:u.value)}return a}return typeof o.expires=="number"&&Date.now()>o.expires?this.delete(e).then(()=>{}):r&&r.raw?o:o.value}})}set(e,r,i){let n=this._getKeyPrefix(e);typeof i>"u"&&(i=this.opts.ttl),i===0&&(i=void 0);let{store:s}=this.opts;return Promise.resolve().then(()=>{let o=typeof i=="number"?Date.now()+i:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:o},this.opts.serialize(r)}).then(o=>s.set(n,o,i)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let n=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let s=[];for(let o of n)s.push(r.delete(o));return Promise.allSettled(s).then(o=>o.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(n))}let i=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(i))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:i}=this.opts;return Promise.resolve().then(async()=>typeof i.has=="function"?i.has(r):await i.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};iO.exports=Xw});var aO=v((RAe,oO)=>{"use strict";var kZ=w("events"),_g=w("url"),RZ=TR(),OZ=WR(),zw=GR(),sO=zR(),NZ=vg(),BZ=ZR(),FZ=nO(),Qi=class{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new FZ({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,i)=>{let n;if(typeof r=="string")n=Jw(_g.parse(r)),r={};else if(r instanceof _g.URL)n=Jw(_g.parse(r.toString())),r={};else{let[p,...f]=(r.path||"").split("?"),H=f.length>0?`?${f.join("?")}`:"";n=Jw({...r,pathname:p,search:H})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...UZ(n)},r.headers=NZ(r.headers);let s=new kZ,o=RZ(_g.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${r.method}:${o}`,u=!1,c=!1,l=p=>{c=!0;let f=!1,H,m=new Promise(b=>{H=()=>{f||(f=!0,b())}}),y=b=>{if(u&&!p.forceRefresh){b.status=b.statusCode;let B=zw.fromObject(u.cachePolicy).revalidatedPolicy(p,b);if(!B.modified){let q=B.policy.responseHeaders();b=new sO(u.statusCode,q,u.body,u.url),b.cachePolicy=B.policy,b.fromCache=!0}}b.fromCache||(b.cachePolicy=new zw(p,b,p),b.fromCache=!1);let A;p.cache&&b.cachePolicy.storable()?(A=BZ(b),(async()=>{try{let B=OZ.buffer(b);if(await Promise.race([m,new Promise(G=>b.once("end",G))]),f)return;let q=await B,L={cachePolicy:b.cachePolicy.toObject(),url:b.url,statusCode:b.fromCache?u.statusCode:b.statusCode,body:q},D=p.strictTtl?b.cachePolicy.timeToLive():void 0;p.maxTtl&&(D=D?Math.min(D,p.maxTtl):p.maxTtl),await this.cache.set(a,L,D)}catch(B){s.emit("error",new Qi.CacheError(B))}})()):p.cache&&u&&(async()=>{try{await this.cache.delete(a)}catch(B){s.emit("error",new Qi.CacheError(B))}})(),s.emit("response",A||b),typeof i=="function"&&i(A||b)};try{let b=e(p,y);b.once("error",H),b.once("abort",H),s.emit("request",b)}catch(b){s.emit("error",new Qi.RequestError(b))}};return(async()=>{let p=async H=>{await Promise.resolve();let m=H.cache?await this.cache.get(a):void 0;if(typeof m>"u")return l(H);let y=zw.fromObject(m.cachePolicy);if(y.satisfiesWithoutRevalidation(H)&&!H.forceRefresh){let b=y.responseHeaders(),A=new sO(m.statusCode,b,m.body,m.url);A.cachePolicy=y,A.fromCache=!0,s.emit("response",A),typeof i=="function"&&i(A)}else u=m,H.headers=y.revalidationHeaders(H),l(H)},f=H=>s.emit("error",new Qi.CacheError(H));this.cache.once("error",f),s.on("response",()=>this.cache.removeListener("error",f));try{await p(r)}catch(H){r.automaticFailover&&!c&&l(r),s.emit("error",new Qi.CacheError(H))}})(),s}}};function UZ(t){let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function Jw(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}Qi.RequestError=class extends Error{constructor(t){super(t.message),this.name="RequestError",Object.assign(this,t)}};Qi.CacheError=class extends Error{constructor(t){super(t.message),this.name="CacheError",Object.assign(this,t)}};oO.exports=Qi});var cO=v((BAe,uO)=>{"use strict";var jZ=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];uO.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(jZ)),i={};for(let n of r)n in e||(i[n]={get(){let s=t[n];return typeof s=="function"?s.bind(t):s},set(s){t[n]=s},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var pO=v((FAe,lO)=>{"use strict";var{Transform:qZ,PassThrough:WZ}=w("stream"),Yw=w("zlib"),VZ=cO();lO.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof Yw.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let i=!0,n=new qZ({transform(a,u,c){i=!1,c(null,a)},flush(a){a()}}),s=new WZ({autoDestroy:!1,destroy(a,u){t.destroy(),u(a)}}),o=r?Yw.createBrotliDecompress():Yw.createUnzip();return o.once("error",a=>{if(i&&!t.readable){s.end();return}s.destroy(a)}),VZ(t,s),t.pipe(n).pipe(o).pipe(s),s}});var Zw=v((UAe,fO)=>{"use strict";var Qw=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[i,n]of this.oldCache.entries())this.onEviction(i,n);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};fO.exports=Qw});var tA=v((jAe,HO)=>{"use strict";var GZ=w("events"),KZ=w("tls"),XZ=w("http2"),zZ=Zw(),Pr=Symbol("currentStreamsCount"),dO=Symbol("request"),Si=Symbol("cachedOriginSet"),dl=Symbol("gracefullyClosing"),JZ=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],YZ=(t,e,r)=>{let i=0,n=t.length;for(;i<n;){let s=i+n>>>1;r(t[s],e)?i=s+1:n=s}return i},QZ=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,eA=(t,e)=>{for(let r of t)r[Si].length<e[Si].length&&r[Si].every(i=>e[Si].includes(i))&&r[Pr]+e[Pr]<=e.remoteSettings.maxConcurrentStreams&&mO(r)},ZZ=(t,e)=>{for(let r of t)e[Si].length<r[Si].length&&e[Si].every(i=>r[Si].includes(i))&&e[Pr]+r[Pr]<=r.remoteSettings.maxConcurrentStreams&&mO(e)},hO=({agent:t,isFree:e})=>{let r={};for(let i in t.sessions){let s=t.sessions[i].filter(o=>{let a=o[Gn.kCurrentStreamsCount]<o.remoteSettings.maxConcurrentStreams;return e?a:!a});s.length!==0&&(r[i]=s)}return r},mO=t=>{t[dl]=!0,t[Pr]===0&&t.close()},Gn=class extends GZ{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:i=10,maxCachedTlsSessions:n=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=i,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new zZ({maxSize:n})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(let i of JZ)e[i]&&(r+=`:${e[i]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let i=this.queue[e][r];this._sessionsCount<this.maxSessions&&!i.completed&&(i.completed=!0,i())}getSession(e,r,i){return new Promise((n,s)=>{Array.isArray(i)?(i=[...i],n()):i=[{resolve:n,reject:s}];let o=this.normalizeOptions(r),a=Gn.normalizeOrigin(e,r&&r.servername);if(a===void 0){for(let{reject:l}of i)l(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(o in this.sessions){let l=this.sessions[o],p=-1,f=-1,H;for(let m of l){let y=m.remoteSettings.maxConcurrentStreams;if(y<p)break;if(m[Si].includes(a)){let b=m[Pr];if(b>=y||m[dl]||m.destroyed)continue;H||(p=y),b>f&&(H=m,f=b)}}if(H){if(i.length!==1){for(let{reject:m}of i){let y=new Error(`Expected the length of listeners to be 1, got ${i.length}.
Please report this to https://github.com/szmarczak/http2-wrapper/`);m(y)}return}i[0].resolve(H);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i),this._tryToCreateNewSession(o,a);return}}else this.queue[o]={};let u=()=>{o in this.queue&&this.queue[o][a]===c&&(delete this.queue[o][a],Object.keys(this.queue[o]).length===0&&delete this.queue[o])},c=()=>{let l=`${a}:${o}`,p=!1;try{let f=XZ.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(l),...r});f[Pr]=0,f[dl]=!1;let H=()=>f[Pr]<f.remoteSettings.maxConcurrentStreams,m=!0;f.socket.once("session",b=>{this.tlsSessionCache.set(l,b)}),f.once("error",b=>{for(let{reject:A}of i)A(b);this.tlsSessionCache.delete(l)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(p){m&&this._freeSessionsCount--,this._sessionsCount--;let b=this.sessions[o];b.splice(b.indexOf(f),1),b.length===0&&delete this.sessions[o]}else{let b=new Error("Session closed without receiving a SETTINGS frame");b.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:A}of i)A(b);u()}this._tryToCreateNewSession(o,a)});let y=()=>{if(!(!(o in this.queue)||!H())){for(let b of f[Si])if(b in this.queue[o]){let{listeners:A}=this.queue[o][b];for(;A.length!==0&&H();)A.shift().resolve(f);let B=this.queue[o];if(B[b].listeners.length===0&&(delete B[b],Object.keys(B).length===0)){delete this.queue[o];break}if(!H())break}}};f.on("origin",()=>{f[Si]=f.originSet,H()&&(y(),eA(this.sessions[o],f))}),f.once("remoteSettings",()=>{if(f.ref(),f.unref(),this._sessionsCount++,c.destroyed){let b=new Error("Agent has been destroyed");for(let A of i)A.reject(b);f.destroy();return}f[Si]=f.originSet;{let b=this.sessions;if(o in b){let A=b[o];A.splice(YZ(A,f,QZ),0,f)}else b[o]=[f]}this._freeSessionsCount+=1,p=!0,this.emit("session",f),y(),u(),f[Pr]===0&&this._freeSessionsCount>this.maxFreeSessions&&f.close(),i.length!==0&&(this.getSession(a,r,i),i.length=0),f.on("remoteSettings",()=>{y(),eA(this.sessions[o],f)})}),f[dO]=f.request,f.request=(b,A)=>{if(f[dl])throw new Error("The session is gracefully closing. No new streams are allowed.");let B=f[dO](b,A);return f.ref(),++f[Pr],f[Pr]===f.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,B.once("close",()=>{if(m=H(),--f[Pr],!f.destroyed&&!f.closed&&(ZZ(this.sessions[o],f),H()&&!f.closed)){m||(this._freeSessionsCount++,m=!0);let q=f[Pr]===0;q&&f.unref(),q&&(this._freeSessionsCount>this.maxFreeSessions||f[dl])?f.close():(eA(this.sessions[o],f),y())}}),B}}catch(f){for(let H of i)H.reject(f);u()}};c.listeners=i,c.completed=!1,c.destroyed=!1,this.queue[o][a]=c,this._tryToCreateNewSession(o,a)})}request(e,r,i,n){return new Promise((s,o)=>{this.getSession(e,r,[{reject:o,resolve:a=>{try{s(a.request(i,n))}catch(u){o(u)}}}])})}createConnection(e,r){return Gn.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let i=e.port||443,n=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=n),KZ.connect(i,n,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Pr]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let i of r)i.destroy(e);for(let r of Object.values(this.queue))for(let i of Object.values(r))i.destroyed=!0;this.queue={}}get freeSessions(){return hO({agent:this,isFree:!0})}get busySessions(){return hO({agent:this,isFree:!1})}};Gn.kCurrentStreamsCount=Pr;Gn.kGracefullyClosing=dl;HO.exports={Agent:Gn,globalAgent:new Gn}});var iA=v((qAe,gO)=>{"use strict";var{Readable:eee}=w("stream"),rA=class extends eee{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};gO.exports=rA});var nA=v((WAe,yO)=>{"use strict";yO.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var vO=v((VAe,bO)=>{"use strict";bO.exports=(t,e,r)=>{for(let i of r)t.on(i,(...n)=>e.emit(i,...n))}});var wO=v((GAe,_O)=>{"use strict";_O.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var IO=v((XAe,AO)=>{"use strict";var hl=(t,e,r)=>{AO.exports[e]=class extends t{constructor(...n){super(typeof r=="string"?r:r(n)),this.name=`${super.name} [${e}]`,this.code=e}}};hl(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],i=Array.isArray(r);return i&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${i?"one of":"of"} type ${r}. Received ${typeof t[2]}`});hl(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);hl(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);hl(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);hl(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);hl(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var cA=v((zAe,DO)=>{"use strict";var tee=w("http2"),{Writable:ree}=w("stream"),{Agent:SO,globalAgent:iee}=tA(),nee=iA(),see=nA(),oee=vO(),aee=wO(),{ERR_INVALID_ARG_TYPE:sA,ERR_INVALID_PROTOCOL:uee,ERR_HTTP_HEADERS_SENT:EO,ERR_INVALID_HTTP_TOKEN:cee,ERR_HTTP_INVALID_HEADER_VALUE:lee,ERR_INVALID_CHAR:pee}=IO(),{HTTP2_HEADER_STATUS:xO,HTTP2_HEADER_METHOD:LO,HTTP2_HEADER_PATH:CO,HTTP2_METHOD_CONNECT:fee}=tee.constants,Hr=Symbol("headers"),oA=Symbol("origin"),aA=Symbol("session"),PO=Symbol("options"),wg=Symbol("flushedHeaders"),Wf=Symbol("jobs"),dee=/^[\^`\-\w!#$%&*+.|~]+$/,hee=/[^\t\u0020-\u007E\u0080-\u00FF]/,uA=class extends ree{constructor(e,r,i){super({autoDestroy:!1});let n=typeof e=="string"||e instanceof URL;if(n&&(e=see(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(i=r,r=n?e:{...e}):r={...e,...r},r.h2session)this[aA]=r.h2session;else if(r.agent===!1)this.agent=new SO({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new SO({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=iee;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new sA("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new uee(r.protocol,"https:");let s=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,o=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:a}=r;if(r.timeout=void 0,this[Hr]=Object.create(null),this[Wf]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[u,c]of Object.entries(r.headers))this.setHeader(u,c);r.auth&&!("authorization"in this[Hr])&&(this[Hr].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[PO]=r,s===443?(this[oA]=`https://${o}`,":authority"in this[Hr]||(this[Hr][":authority"]=o)):(this[oA]=`https://${o}:${s}`,":authority"in this[Hr]||(this[Hr][":authority"]=`${o}:${s}`)),a&&this.setTimeout(a),i&&this.once("response",i),this[wg]=!1}get method(){return this[Hr][LO]}set method(e){e&&(this[Hr][LO]=e.toUpperCase())}get path(){return this[Hr][CO]}set path(e){e&&(this[Hr][CO]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,i){if(this._mustNotHaveABody){i(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let n=()=>this._request.write(e,r,i);this._request?n():this[Wf].push(n)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[Wf].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[wg]||this.destroyed)return;this[wg]=!0;let e=this.method===fee,r=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||oee(i,this,["timeout","continue","close","error"]);let n=o=>(...a)=>{!this.writable&&!this.destroyed?o(...a):this.once("finish",()=>{o(...a)})};i.once("response",n((o,a,u)=>{let c=new nee(this.socket,i.readableHighWaterMark);this.res=c,c.req=this,c.statusCode=o[xO],c.headers=o,c.rawHeaders=u,c.once("end",()=>{this.aborted?(c.aborted=!0,c.emit("aborted")):(c.complete=!0,c.socket=null,c.connection=null)}),e?(c.upgrade=!0,this.emit("connect",c,i,Buffer.alloc(0))?this.emit("close"):i.destroy()):(i.on("data",l=>{!c._dumped&&!c.push(l)&&i.pause()}),i.once("end",()=>{c.push(null)}),this.emit("response",c)||c._dump())})),i.once("headers",n(o=>this.emit("information",{statusCode:o[xO]}))),i.once("trailers",n((o,a,u)=>{let{res:c}=this;c.trailers=o,c.rawTrailers=u}));let{socket:s}=i.session;this.socket=s,this.connection=s;for(let o of this[Wf])o();this.emit("socket",this.socket)};if(this[aA])try{r(this[aA].request(this[Hr]))}catch(i){this.emit("error",i)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[oA],this[PO],this[Hr]))}catch(i){this.emit("error",i)}}}getHeader(e){if(typeof e!="string")throw new sA("name","string",e);return this[Hr][e.toLowerCase()]}get headersSent(){return this[wg]}removeHeader(e){if(typeof e!="string")throw new sA("name","string",e);if(this.headersSent)throw new EO("remove");delete this[Hr][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new EO("set");if(typeof e!="string"||!dee.test(e)&&!aee(e))throw new cee("Header name",e);if(typeof r>"u")throw new lee(r,e);if(hee.test(r))throw new pee("header content",e);this[Hr][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let i=()=>this._request.setTimeout(e,r);return this._request?i():this[Wf].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};DO.exports=uA});var $O=v((JAe,TO)=>{"use strict";var mee=w("tls");TO.exports=(t={},e=mee.connect)=>new Promise((r,i)=>{let n=!1,s,o=async()=>{await u,s.off("timeout",a),s.off("error",i),t.resolveSocket?(r({alpnProtocol:s.alpnProtocol,socket:s,timeout:n}),n&&(await Promise.resolve(),s.emit("timeout"))):(s.destroy(),r({alpnProtocol:s.alpnProtocol,timeout:n}))},a=async()=>{n=!0,o()},u=(async()=>{try{s=await e(t,o),s.on("error",i),s.once("timeout",a)}catch(c){i(c)}})()})});var kO=v((YAe,MO)=>{"use strict";var Hee=w("net");MO.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),Hee.isIP(e)?"":e}});var NO=v((QAe,pA)=>{"use strict";var RO=w("http"),lA=w("https"),gee=$O(),yee=Zw(),bee=cA(),vee=kO(),_ee=nA(),Ag=new yee({maxSize:100}),Vf=new Map,OO=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let i=()=>{t.emit("free",e,r)};e.on("free",i);let n=()=>{t.removeSocket(e,r)};e.on("close",n);let s=()=>{t.removeSocket(e,r),e.off("close",n),e.off("free",i),e.off("agentRemove",s)};e.on("agentRemove",s),t.emit("free",e,r)},wee=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!Ag.has(e)){if(Vf.has(e))return(await Vf.get(e)).alpnProtocol;let{path:r,agent:i}=t;t.path=t.socketPath;let n=gee(t);Vf.set(e,n);try{let{socket:s,alpnProtocol:o}=await n;if(Ag.set(e,o),t.path=r,o==="h2")s.destroy();else{let{globalAgent:a}=lA,u=lA.Agent.prototype.createConnection;i?i.createConnection===u?OO(i,s,t):s.destroy():a.createConnection===u?OO(a,s,t):s.destroy()}return Vf.delete(e),o}catch(s){throw Vf.delete(e),s}}return Ag.get(e)};pA.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=_ee(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let i=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||vee(e),e.port=e.port||(i?443:80),e._defaultAgent=i?lA.globalAgent:RO.globalAgent;let n=e.agent;if(n){if(n.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=n[i?"https":"http"]}return i&&await wee(e)==="h2"?(n&&(e.agent=n.http2),new bee(e,r)):RO.request(e,r)};pA.exports.protocolCache=Ag});var FO=v((ZAe,BO)=>{"use strict";var Aee=w("http2"),Iee=tA(),fA=cA(),See=iA(),Eee=NO(),xee=(t,e,r)=>new fA(t,e,r),Lee=(t,e,r)=>{let i=new fA(t,e,r);return i.end(),i};BO.exports={...Aee,ClientRequest:fA,IncomingMessage:See,...Iee,request:xee,get:Lee,auto:Eee}});var hA=v(dA=>{"use strict";Object.defineProperty(dA,"__esModule",{value:!0});var UO=Ss();dA.default=t=>UO.default.nodeStream(t)&&UO.default.function_(t.getBoundary)});var VO=v(mA=>{"use strict";Object.defineProperty(mA,"__esModule",{value:!0});var qO=w("fs"),WO=w("util"),jO=Ss(),Cee=hA(),Pee=WO.promisify(qO.stat);mA.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(jO.default.string(t))return Buffer.byteLength(t);if(jO.default.buffer(t))return t.length;if(Cee.default(t))return WO.promisify(t.getLength.bind(t))();if(t instanceof qO.ReadStream){let{size:r}=await Pee(t.path);return r===0?void 0:r}}});var gA=v(HA=>{"use strict";Object.defineProperty(HA,"__esModule",{value:!0});function Dee(t,e,r){let i={};for(let n of r)i[n]=(...s)=>{e.emit(n,...s)},t.on(n,i[n]);return()=>{for(let n of r)t.off(n,i[n])}}HA.default=Dee});var GO=v(yA=>{"use strict";Object.defineProperty(yA,"__esModule",{value:!0});yA.default=()=>{let t=[];return{once(e,r,i){e.once(r,i),t.push({origin:e,event:r,fn:i})},unhandleAll(){for(let e of t){let{origin:r,event:i,fn:n}=e;r.removeListener(i,n)}t.length=0}}}});var XO=v(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.TimeoutError=void 0;var Tee=w("net"),$ee=GO(),KO=Symbol("reentry"),Mee=()=>{},Ig=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};Gf.TimeoutError=Ig;Gf.default=(t,e,r)=>{if(KO in t)return Mee;t[KO]=!0;let i=[],{once:n,unhandleAll:s}=$ee.default(),o=(p,f,H)=>{var m;let y=setTimeout(f,p,p,H);(m=y.unref)===null||m===void 0||m.call(y);let b=()=>{clearTimeout(y)};return i.push(b),b},{host:a,hostname:u}=r,c=(p,f)=>{t.destroy(new Ig(p,f))},l=()=>{for(let p of i)p();s()};if(t.once("error",p=>{if(l(),t.listenerCount("error")===0)throw p}),t.once("close",l),n(t,"response",p=>{n(p,"end",l)}),typeof e.request<"u"&&o(e.request,c,"request"),typeof e.socket<"u"){let p=()=>{c(e.socket,"socket")};t.setTimeout(e.socket,p),i.push(()=>{t.removeListener("timeout",p)})}return n(t,"socket",p=>{var f;let{socketPath:H}=t;if(p.connecting){let m=Boolean(H??Tee.isIP((f=u??a)!==null&&f!==void 0?f:"")!==0);if(typeof e.lookup<"u"&&!m&&typeof p.address().address>"u"){let y=o(e.lookup,c,"lookup");n(p,"lookup",y)}if(typeof e.connect<"u"){let y=()=>o(e.connect,c,"connect");m?n(p,"connect",y()):n(p,"lookup",b=>{b===null&&n(p,"connect",y())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&n(p,"connect",()=>{let y=o(e.secureConnect,c,"secureConnect");n(p,"secureConnect",y)})}if(typeof e.send<"u"){let m=()=>o(e.send,c,"send");p.connecting?n(p,"connect",()=>{n(t,"upload-complete",m())}):n(t,"upload-complete",m())}}),typeof e.response<"u"&&n(t,"upload-complete",()=>{let p=o(e.response,c,"response");n(t,"response",p)}),l}});var JO=v(bA=>{"use strict";Object.defineProperty(bA,"__esModule",{value:!0});var zO=Ss();bA.default=t=>{t=t;let e={protocol:t.protocol,hostname:zO.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return zO.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var YO=v(vA=>{"use strict";Object.defineProperty(vA,"__esModule",{value:!0});var kee=w("url"),Ree=["protocol","host","hostname","port","pathname","search"];vA.default=(t,e)=>{var r,i;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(i=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&i!==void 0?i:""}`}let n=new kee.URL(t);if(e.path){let s=e.path.indexOf("?");s===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,s),e.search=e.path.slice(s+1)),delete e.path}for(let s of Ree)e[s]&&(n[s]=e[s].toString());return n}});var QO=v(wA=>{"use strict";Object.defineProperty(wA,"__esModule",{value:!0});var _A=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};wA.default=_A});var IA=v(AA=>{"use strict";Object.defineProperty(AA,"__esModule",{value:!0});var Oee=async t=>{let e=[],r=0;for await(let i of t)e.push(i),r+=Buffer.byteLength(i);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};AA.default=Oee});var eN=v(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.dnsLookupIpVersionToFamily=su.isDnsLookupIpVersion=void 0;var ZO={auto:0,ipv4:4,ipv6:6};su.isDnsLookupIpVersion=t=>t in ZO;su.dnsLookupIpVersionToFamily=t=>{if(su.isDnsLookupIpVersion(t))return ZO[t];throw new Error("Invalid DNS lookup IP version")}});var SA=v(Sg=>{"use strict";Object.defineProperty(Sg,"__esModule",{value:!0});Sg.isResponseOk=void 0;Sg.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var rN=v(EA=>{"use strict";Object.defineProperty(EA,"__esModule",{value:!0});var tN=new Set;EA.default=t=>{tN.has(t)||(tN.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var iN=v(xA=>{"use strict";Object.defineProperty(xA,"__esModule",{value:!0});var ot=Ss(),Nee=(t,e)=>{if(ot.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");ot.assert.any([ot.default.string,ot.default.undefined],t.encoding),ot.assert.any([ot.default.boolean,ot.default.undefined],t.resolveBodyOnly),ot.assert.any([ot.default.boolean,ot.default.undefined],t.methodRewriting),ot.assert.any([ot.default.boolean,ot.default.undefined],t.isStream),ot.assert.any([ot.default.string,ot.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:i=>i.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},ot.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(i=>i.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):ot.default.number(r)&&(t.retry.limit=r),ot.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(ot.default.number))),ot.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:i}=t;if(!ot.default.function_(i.transform))throw new Error("`options.pagination.transform` must be implemented");if(!ot.default.function_(i.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!ot.default.function_(i.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!ot.default.function_(i.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};xA.default=Nee});var nN=v(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.retryAfterStatusCodes=void 0;Kf.retryAfterStatusCodes=new Set([413,429,503]);var Bee=({attemptCount:t,retryOptions:e,error:r,retryAfter:i})=>{if(t>e.limit)return 0;let n=e.methods.includes(r.options.method),s=e.errorCodes.includes(r.code),o=r.response&&e.statusCodes.includes(r.response.statusCode);if(!n||!s&&!o)return 0;if(r.response){if(i)return e.maxRetryAfter===void 0||i>e.maxRetryAfter?0:i;if(r.response.statusCode===413)return 0}let a=Math.random()*100;return 2**(t-1)*1e3+a};Kf.default=Bee});var Jf=v(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.UnsupportedProtocolError=Oe.ReadError=Oe.TimeoutError=Oe.UploadError=Oe.CacheError=Oe.HTTPError=Oe.MaxRedirectsError=Oe.RequestError=Oe.setNonEnumerableProperties=Oe.knownHookEvents=Oe.withoutBody=Oe.kIsNormalizedAlready=void 0;var sN=w("util"),oN=w("stream"),Fee=w("fs"),Bo=w("url"),aN=w("http"),LA=w("http"),Uee=w("https"),jee=wR(),qee=CR(),uN=aO(),Wee=pO(),Vee=FO(),Gee=vg(),K=Ss(),Kee=VO(),cN=hA(),Xee=gA(),lN=XO(),zee=JO(),pN=YO(),Jee=QO(),Yee=IA(),fN=eN(),Qee=SA(),Fo=rN(),Zee=iN(),ete=nN(),CA,rr=Symbol("request"),Lg=Symbol("response"),ml=Symbol("responseSize"),Hl=Symbol("downloadedSize"),gl=Symbol("bodySize"),yl=Symbol("uploadedSize"),Eg=Symbol("serverResponsesPiped"),dN=Symbol("unproxyEvents"),hN=Symbol("isFromCache"),PA=Symbol("cancelTimeouts"),mN=Symbol("startedReading"),bl=Symbol("stopReading"),xg=Symbol("triggerRead"),Uo=Symbol("body"),Xf=Symbol("jobs"),HN=Symbol("originalResponse"),gN=Symbol("retryTimeout");Oe.kIsNormalizedAlready=Symbol("isNormalizedAlready");var tte=K.default.string(process.versions.brotli);Oe.withoutBody=new Set(["GET","HEAD"]);Oe.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function rte(t){for(let e in t){let r=t[e];if(!K.default.string(r)&&!K.default.number(r)&&!K.default.boolean(r)&&!K.default.null_(r)&&!K.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function ite(t){return K.default.object(t)&&!("statusCode"in t)}var DA=new Jee.default,nte=async t=>new Promise((e,r)=>{let i=n=>{r(n)};t.pending||e(),t.once("error",i),t.once("ready",()=>{t.off("error",i),e()})}),ste=new Set([300,301,302,303,304,307,308]),ote=["context","body","json","form"];Oe.setNonEnumerableProperties=(t,e)=>{let r={};for(let i of t)if(i)for(let n of ote)n in i&&(r[n]={writable:!0,configurable:!0,enumerable:!1,value:i[n]});Object.defineProperties(e,r)};var Et=class extends Error{constructor(e,r,i){var n,s;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(n=r.code)!==null&&n!==void 0?n:"ERR_GOT_REQUEST_ERROR",i instanceof kg?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i[Lg]}),Object.defineProperty(this,"options",{enumerable:!1,value:i.options})):Object.defineProperty(this,"options",{enumerable:!1,value:i}),this.timings=(s=this.request)===null||s===void 0?void 0:s.timings,K.default.string(r.stack)&&K.default.string(this.stack)){let o=this.stack.indexOf(this.message)+this.message.length,a=this.stack.slice(o).split(`
`).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
`).reverse();for(;u.length!==0&&u[0]===a[0];)a.shift();this.stack=`${this.stack.slice(0,o)}${a.reverse().join(`
`)}${u.reverse().join(`
`)}`}}};Oe.RequestError=Et;var Cg=class extends Et{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}};Oe.MaxRedirectsError=Cg;var Pg=class extends Et{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}};Oe.HTTPError=Pg;var Dg=class extends Et{constructor(e,r){super(e.message,e,r),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}};Oe.CacheError=Dg;var Tg=class extends Et{constructor(e,r){super(e.message,e,r),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}};Oe.UploadError=Tg;var $g=class extends Et{constructor(e,r,i){super(e.message,e,i),this.name="TimeoutError",this.event=e.event,this.timings=r}};Oe.TimeoutError=$g;var zf=class extends Et{constructor(e,r){super(e.message,e,r),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}};Oe.ReadError=zf;var Mg=class extends Et{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}};Oe.UnsupportedProtocolError=Mg;var ate=["socket","connect","continue","information","upgrade","timeout"],kg=class extends oN.Duplex{constructor(e,r={},i){super({autoDestroy:!1,highWaterMark:0}),this[Hl]=0,this[yl]=0,this.requestInitialized=!1,this[Eg]=new Set,this.redirects=[],this[bl]=!1,this[xg]=!1,this[Xf]=[],this.retryCount=0,this._progressCallbacks=[];let n=()=>this._unlockWrite(),s=()=>this._lockWrite();this.on("pipe",c=>{c.prependListener("data",n),c.on("data",s),c.prependListener("end",n),c.on("end",s)}),this.on("unpipe",c=>{c.off("data",n),c.off("data",s),c.off("end",n),c.off("end",s)}),this.on("pipe",c=>{c instanceof LA.IncomingMessage&&(this.options.headers={...c.headers,...this.options.headers})});let{json:o,body:a,form:u}=r;if((o||a||u)&&this._lockWrite(),Oe.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,i)}catch(c){K.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(c);return}(async()=>{var c;try{this.options.body instanceof Fee.ReadStream&&await nte(this.options.body);let{url:l}=this.options;if(!l)throw new TypeError("Missing `url` property");if(this.requestUrl=l.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(c=this[rr])===null||c===void 0||c.destroy();return}for(let p of this[Xf])p();this[Xf].length=0,this.requestInitialized=!0}catch(l){if(l instanceof Et){this._beforeError(l);return}this.destroyed||this.destroy(l)}})()}static normalizeArguments(e,r,i){var n,s,o,a,u;let c=r;if(K.default.object(e)&&!K.default.urlInstance(e))r={...i,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...i,...r},e!==void 0&&(r.url=e),K.default.urlInstance(r.url)&&(r.url=new Bo.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),K.assert.any([K.default.string,K.default.undefined],r.method),K.assert.any([K.default.object,K.default.undefined],r.headers),K.assert.any([K.default.string,K.default.urlInstance,K.default.undefined],r.prefixUrl),K.assert.any([K.default.object,K.default.undefined],r.cookieJar),K.assert.any([K.default.object,K.default.string,K.default.undefined],r.searchParams),K.assert.any([K.default.object,K.default.string,K.default.undefined],r.cache),K.assert.any([K.default.object,K.default.number,K.default.undefined],r.timeout),K.assert.any([K.default.object,K.default.undefined],r.context),K.assert.any([K.default.object,K.default.undefined],r.hooks),K.assert.any([K.default.boolean,K.default.undefined],r.decompress),K.assert.any([K.default.boolean,K.default.undefined],r.ignoreInvalidCookies),K.assert.any([K.default.boolean,K.default.undefined],r.followRedirect),K.assert.any([K.default.number,K.default.undefined],r.maxRedirects),K.assert.any([K.default.boolean,K.default.undefined],r.throwHttpErrors),K.assert.any([K.default.boolean,K.default.undefined],r.http2),K.assert.any([K.default.boolean,K.default.undefined],r.allowGetBody),K.assert.any([K.default.string,K.default.undefined],r.localAddress),K.assert.any([fN.isDnsLookupIpVersion,K.default.undefined],r.dnsLookupIpVersion),K.assert.any([K.default.object,K.default.undefined],r.https),K.assert.any([K.default.boolean,K.default.undefined],r.rejectUnauthorized),r.https&&(K.assert.any([K.default.boolean,K.default.undefined],r.https.rejectUnauthorized),K.assert.any([K.default.function_,K.default.undefined],r.https.checkServerIdentity),K.assert.any([K.default.string,K.default.object,K.default.array,K.default.undefined],r.https.certificateAuthority),K.assert.any([K.default.string,K.default.object,K.default.array,K.default.undefined],r.https.key),K.assert.any([K.default.string,K.default.object,K.default.array,K.default.undefined],r.https.certificate),K.assert.any([K.default.string,K.default.undefined],r.https.passphrase),K.assert.any([K.default.string,K.default.buffer,K.default.array,K.default.undefined],r.https.pfx)),K.assert.any([K.default.object,K.default.undefined],r.cacheOptions),K.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===(i==null?void 0:i.headers)?r.headers={...r.headers}:r.headers=Gee({...i==null?void 0:i.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==(i==null?void 0:i.searchParams)){let H;if(K.default.string(r.searchParams)||r.searchParams instanceof Bo.URLSearchParams)H=new Bo.URLSearchParams(r.searchParams);else{rte(r.searchParams),H=new Bo.URLSearchParams;for(let m in r.searchParams){let y=r.searchParams[m];y===null?H.append(m,""):y!==void 0&&H.append(m,y)}}(n=i==null?void 0:i.searchParams)===null||n===void 0||n.forEach((m,y)=>{H.has(y)||H.append(y,m)}),r.searchParams=H}if(r.username=(s=r.username)!==null&&s!==void 0?s:"",r.password=(o=r.password)!==null&&o!==void 0?o:"",K.default.undefined(r.prefixUrl)?r.prefixUrl=(a=i==null?void 0:i.prefixUrl)!==null&&a!==void 0?a:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),K.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=pN.default(r.prefixUrl+r.url,r)}else(K.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=pN.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:H}=r;Object.defineProperty(r,"prefixUrl",{set:y=>{let b=r.url;if(!b.href.startsWith(y))throw new Error(`Cannot change \`prefixUrl\` from ${H} to ${y}: ${b.href}`);r.url=new Bo.URL(y+b.href.slice(H.length)),H=y},get:()=>H});let{protocol:m}=r.url;if(m==="unix:"&&(m="http:",r.url=new Bo.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),m!=="http:"&&m!=="https:")throw new Mg(r);r.username===""?r.username=r.url.username:r.url.username=r.username,r.password===""?r.password=r.url.password:r.url.password=r.password}let{cookieJar:l}=r;if(l){let{setCookie:H,getCookieString:m}=l;K.assert.function_(H),K.assert.function_(m),H.length===4&&m.length===0&&(H=sN.promisify(H.bind(r.cookieJar)),m=sN.promisify(m.bind(r.cookieJar)),r.cookieJar={setCookie:H,getCookieString:m})}let{cache:p}=r;if(p&&(DA.has(p)||DA.set(p,new uN((H,m)=>{let y=H[rr](H,m);return K.default.promise(y)&&(y.once=(b,A)=>{if(b==="error")y.catch(A);else if(b==="abort")(async()=>{try{(await y).once("abort",A)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${b}`);return y}),y},p))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)CA||(CA=new qee.default),r.dnsCache=CA;else if(!K.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${K.default(r.dnsCache)}`);K.default.number(r.timeout)?r.timeout={request:r.timeout}:i&&r.timeout!==i.timeout?r.timeout={...i.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let f=r.hooks===(i==null?void 0:i.hooks);r.hooks={...r.hooks};for(let H of Oe.knownHookEvents)if(H in r.hooks)if(K.default.array(r.hooks[H]))r.hooks[H]=[...r.hooks[H]];else throw new TypeError(`Parameter \`${H}\` must be an Array, got ${K.default(r.hooks[H])}`);else r.hooks[H]=[];if(i&&!f)for(let H of Oe.knownHookEvents)i.hooks[H].length>0&&(r.hooks[H]=[...i.hooks[H],...r.hooks[H]]);if("family"in r&&Fo.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),i!=null&&i.https&&(r.https={...i.https,...r.https}),"rejectUnauthorized"in r&&Fo.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&Fo.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&Fo.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&Fo.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&Fo.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&Fo.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&Fo.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent){for(let H in r.agent)if(H!=="http"&&H!=="https"&&H!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${H}\``)}return r.maxRedirects=(u=r.maxRedirects)!==null&&u!==void 0?u:0,Oe.setNonEnumerableProperties([i,c],r),Zee.default(r,i)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,i=!K.default.undefined(e.form),n=!K.default.undefined(e.json),s=!K.default.undefined(e.body),o=i||n||s,a=Oe.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=a,o){if(a)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([s,i,n].filter(u=>u).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(s&&!(e.body instanceof oN.Readable)&&!K.default.string(e.body)&&!K.default.buffer(e.body)&&!cN.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(i&&!K.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let u=!K.default.string(r["content-type"]);s?(cN.default(e.body)&&u&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[Uo]=e.body):i?(u&&(r["content-type"]="application/x-www-form-urlencoded"),this[Uo]=new Bo.URLSearchParams(e.form).toString()):(u&&(r["content-type"]="application/json"),this[Uo]=e.stringifyJson(e.json));let c=await Kee.default(this[Uo],e.headers);K.default.undefined(r["content-length"])&&K.default.undefined(r["transfer-encoding"])&&!a&&!K.default.undefined(c)&&(r["content-length"]=String(c))}}else a?this._lockWrite():this._unlockWrite();this[gl]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:i}=r;this[HN]=e,r.decompress&&(e=Wee(e));let n=e.statusCode,s=e;s.statusMessage=s.statusMessage?s.statusMessage:aN.STATUS_CODES[n],s.url=r.url.toString(),s.requestUrl=this.requestUrl,s.redirectUrls=this.redirects,s.request=this,s.isFromCache=e.fromCache||!1,s.ip=this.ip,s.retryCount=this.retryCount,this[hN]=s.isFromCache,this[ml]=Number(e.headers["content-length"])||void 0,this[Lg]=e,e.once("end",()=>{this[ml]=this[Hl],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{e.destroy(),this._beforeError(new zf(a,this))}),e.once("aborted",()=>{this._beforeError(new zf({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let o=e.headers["set-cookie"];if(K.default.object(r.cookieJar)&&o){let a=o.map(async u=>r.cookieJar.setCookie(u,i.toString()));r.ignoreInvalidCookies&&(a=a.map(async u=>u.catch(()=>{})));try{await Promise.all(a)}catch(u){this._beforeError(u);return}}if(r.followRedirect&&e.headers.location&&ste.has(n)){if(e.resume(),this[rr]&&(this[PA](),delete this[rr],this[dN]()),(n===303&&r.method!=="GET"&&r.method!=="HEAD"||!r.methodRewriting)&&(r.method="GET","body"in r&&delete r.body,"json"in r&&delete r.json,"form"in r&&delete r.form,this[Uo]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new Cg(this));return}try{let p=function(f){return f.protocol==="unix:"||f.hostname==="unix"},u=Buffer.from(e.headers.location,"binary").toString(),c=new Bo.URL(u,i),l=c.toString();if(decodeURI(l),!p(i)&&p(c)){this._beforeError(new Et("Cannot redirect to UNIX socket",{},this));return}c.hostname!==i.hostname||c.port!==i.port?("host"in r.headers&&delete r.headers.host,"cookie"in r.headers&&delete r.headers.cookie,"authorization"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username="",r.password="")):(c.username=r.username,c.password=r.password),this.redirects.push(l),r.url=c;for(let f of r.hooks.beforeRedirect)await f(r,s);this.emit("redirect",s,r),await this._makeRequest()}catch(u){this._beforeError(u);return}return}if(r.isStream&&r.throwHttpErrors&&!Qee.isResponseOk(s)){this._beforeError(new Pg(s));return}e.on("readable",()=>{this[xg]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let a of this[Eg])if(!a.headersSent){for(let u in e.headers){let c=r.decompress?u!=="content-encoding":!0,l=e.headers[u];c&&a.setHeader(u,l)}a.statusCode=n}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:i,url:n}=r;jee.default(e),this[PA]=lN.default(e,i,n);let s=r.cache?"cacheableResponse":"response";e.once(s,u=>{this._onResponse(u)}),e.once("error",u=>{var c;e.destroy(),(c=e.res)===null||c===void 0||c.removeAllListeners("end"),u=u instanceof lN.TimeoutError?new $g(u,this.timings,this):new Et(u.message,u,this),this._beforeError(u)}),this[dN]=Xee.default(e,this,ate),this[rr]=e,this.emit("uploadProgress",this.uploadProgress);let o=this[Uo],a=this.redirects.length===0?this:e;K.default.nodeStream(o)?(o.pipe(a),o.once("error",u=>{this._beforeError(new Tg(u,this))})):(this._unlockWrite(),K.default.undefined(o)?(this._cannotHaveBody||this._noPipe)&&(a.end(),this._lockWrite()):(this._writeRequest(o,void 0,()=>{}),a.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,r){return new Promise((i,n)=>{Object.assign(r,zee.default(e)),delete r.url;let s,o=DA.get(r.cache)(r,async a=>{a._readableState.autoDestroy=!1,s&&(await s).emit("cacheableResponse",a),i(a)});r.url=e,o.once("error",n),o.once("request",async a=>{s=a,i(s)})})}async _makeRequest(){var e,r,i,n,s;let{options:o}=this,{headers:a}=o;for(let A in a)if(K.default.undefined(a[A]))delete a[A];else if(K.default.null_(a[A]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${A}\` header`);if(o.decompress&&K.default.undefined(a["accept-encoding"])&&(a["accept-encoding"]=tte?"gzip, deflate, br":"gzip, deflate"),o.cookieJar){let A=await o.cookieJar.getCookieString(o.url.toString());K.default.nonEmptyString(A)&&(o.headers.cookie=A)}for(let A of o.hooks.beforeRequest){let B=await A(o);if(!K.default.undefined(B)){o.request=()=>B;break}}o.body&&this[Uo]!==o.body&&(this[Uo]=o.body);let{agent:u,request:c,timeout:l,url:p}=o;if(o.dnsCache&&!("lookup"in o)&&(o.lookup=o.dnsCache.lookup),p.hostname==="unix"){let A=/(?<socketPath>.+?):(?<path>.+)/.exec(`${p.pathname}${p.search}`);if(A!=null&&A.groups){let{socketPath:B,path:q}=A.groups;Object.assign(o,{socketPath:B,path:q,host:""})}}let f=p.protocol==="https:",H;o.http2?H=Vee.auto:H=f?Uee.request:aN.request;let m=(e=o.request)!==null&&e!==void 0?e:H,y=o.cache?this._createCacheableRequest:m;u&&!o.http2&&(o.agent=u[f?"https":"http"]),o[rr]=m,delete o.request,delete o.timeout;let b=o;if(b.shared=(r=o.cacheOptions)===null||r===void 0?void 0:r.shared,b.cacheHeuristic=(i=o.cacheOptions)===null||i===void 0?void 0:i.cacheHeuristic,b.immutableMinTimeToLive=(n=o.cacheOptions)===null||n===void 0?void 0:n.immutableMinTimeToLive,b.ignoreCargoCult=(s=o.cacheOptions)===null||s===void 0?void 0:s.ignoreCargoCult,o.dnsLookupIpVersion!==void 0)try{b.family=fN.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}o.https&&("rejectUnauthorized"in o.https&&(b.rejectUnauthorized=o.https.rejectUnauthorized),o.https.checkServerIdentity&&(b.checkServerIdentity=o.https.checkServerIdentity),o.https.certificateAuthority&&(b.ca=o.https.certificateAuthority),o.https.certificate&&(b.cert=o.https.certificate),o.https.key&&(b.key=o.https.key),o.https.passphrase&&(b.passphrase=o.https.passphrase),o.https.pfx&&(b.pfx=o.https.pfx));try{let A=await y(p,b);K.default.undefined(A)&&(A=H(p,b)),o.request=c,o.timeout=l,o.agent=u,o.https&&("rejectUnauthorized"in o.https&&delete b.rejectUnauthorized,o.https.checkServerIdentity&&delete b.checkServerIdentity,o.https.certificateAuthority&&delete b.ca,o.https.certificate&&delete b.cert,o.https.key&&delete b.key,o.https.passphrase&&delete b.passphrase,o.https.pfx&&delete b.pfx),ite(A)?this._onRequest(A):this.writable?(this.once("finish",()=>{this._onResponse(A)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(A)}catch(A){throw A instanceof uN.CacheError?new Dg(A,this):new Et(A.message,A,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new Et(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[bl])return;let{options:r}=this,i=this.retryCount+1;this[bl]=!0,e instanceof Et||(e=new Et(e.message,e,this));let n=e,{response:s}=n;(async()=>{if(s&&!s.body){s.setEncoding(this._readableState.encoding);try{s.rawBody=await Yee.default(s),s.body=s.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let o;try{let a;s&&"retry-after"in s.headers&&(a=Number(s.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(s.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3),o=await r.retry.calculateDelay({attemptCount:i,retryOptions:r.retry,error:n,retryAfter:a,computedValue:ete.default({attemptCount:i,retryOptions:r.retry,error:n,retryAfter:a,computedValue:0})})}catch(a){this._error(new Et(a.message,a,this));return}if(o){let a=async()=>{try{for(let u of this.options.hooks.beforeRetry)await u(this.options,n,i)}catch(u){this._error(new Et(u.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",i,e))};this[gN]=setTimeout(a,o);return}}this._error(n)})()}_read(){this[xg]=!0;let e=this[Lg];if(e&&!this[bl]){e.readableLength&&(this[xg]=!1);let r;for(;(r=e.read())!==null;){this[Hl]+=r.length,this[mN]=!0;let i=this.downloadProgress;i.percent<1&&this.emit("downloadProgress",i),this.push(r)}}}_write(e,r,i){let n=()=>{this._writeRequest(e,r,i)};this.requestInitialized?n():this[Xf].push(n)}_writeRequest(e,r,i){this[rr].destroyed||(this._progressCallbacks.push(()=>{this[yl]+=Buffer.byteLength(e,r);let n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}),this[rr].write(e,r,n=>{!n&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),i(n)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(rr in this)){e();return}if(this[rr].destroyed){e();return}this[rr].end(i=>{i||(this[gl]=this[yl],this.emit("uploadProgress",this.uploadProgress),this[rr].emit("upload-complete")),e(i)})};this.requestInitialized?r():this[Xf].push(r)}_destroy(e,r){var i;this[bl]=!0,clearTimeout(this[gN]),rr in this&&(this[PA](),!((i=this[Lg])===null||i===void 0)&&i.complete||this[rr].destroy()),e!==null&&!K.default.undefined(e)&&!(e instanceof Et)&&(e=new Et(e.message,e,this)),r(e)}get _isAboutToError(){return this[bl]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,i;return((r=(e=this[rr])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((i=this[HN])===null||i===void 0)&&i.complete)}get socket(){var e,r;return(r=(e=this[rr])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[ml]?e=this[Hl]/this[ml]:this[ml]===this[Hl]?e=1:e=0,{percent:e,transferred:this[Hl],total:this[ml]}}get uploadProgress(){let e;return this[gl]?e=this[yl]/this[gl]:this[gl]===this[yl]?e=1:e=0,{percent:e,transferred:this[yl],total:this[gl]}}get timings(){var e;return(e=this[rr])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[hN]}pipe(e,r){if(this[mN])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof LA.ServerResponse&&this[Eg].add(e),super.pipe(e,r)}unpipe(e){return e instanceof LA.ServerResponse&&this[Eg].delete(e),super.unpipe(e),this}};Oe.default=kg});var Yf=v(Zi=>{"use strict";var ute=Zi&&Zi.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),cte=Zi&&Zi.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ute(e,t,r)};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.CancelError=Zi.ParseError=void 0;var yN=Jf(),TA=class extends yN.RequestError{constructor(e,r){let{options:i}=r.request;super(`${e.message} in "${i.url.toString()}"`,e,r.request),this.name="ParseError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}};Zi.ParseError=TA;var $A=class extends yN.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};Zi.CancelError=$A;cte(Jf(),Zi)});var vN=v(MA=>{"use strict";Object.defineProperty(MA,"__esModule",{value:!0});var bN=Yf(),lte=(t,e,r,i)=>{let{rawBody:n}=t;try{if(e==="text")return n.toString(i);if(e==="json")return n.length===0?"":r(n.toString());if(e==="buffer")return n;throw new bN.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(s){throw new bN.ParseError(s,t)}};MA.default=lte});var kA=v(jo=>{"use strict";var pte=jo&&jo.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),fte=jo&&jo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pte(e,t,r)};Object.defineProperty(jo,"__esModule",{value:!0});var dte=w("events"),hte=Ss(),mte=vR(),Rg=Yf(),_N=vN(),wN=Jf(),Hte=gA(),gte=IA(),AN=SA(),yte=["request","response","redirect","uploadProgress","downloadProgress"];function IN(t){let e,r,i=new dte.EventEmitter,n=new mte((o,a,u)=>{let c=l=>{let p=new wN.default(void 0,t);p.retryCount=l,p._noPipe=!0,u(()=>p.destroy()),u.shouldReject=!1,u(()=>a(new Rg.CancelError(p))),e=p,p.once("response",async m=>{var y;if(m.retryCount=l,m.request.aborted)return;let b;try{b=await gte.default(p),m.rawBody=b}catch{return}if(p._isAboutToError)return;let A=((y=m.headers["content-encoding"])!==null&&y!==void 0?y:"").toLowerCase(),B=["gzip","deflate","br"].includes(A),{options:q}=p;if(B&&!q.decompress)m.body=b;else try{m.body=_N.default(m,q.responseType,q.parseJson,q.encoding)}catch(L){if(m.body=b.toString(),AN.isResponseOk(m)){p._beforeError(L);return}}try{for(let[L,D]of q.hooks.afterResponse.entries())m=await D(m,async G=>{let W=wN.default.normalizeArguments(void 0,{...G,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},q);W.hooks.afterResponse=W.hooks.afterResponse.slice(0,L);for(let M of W.hooks.beforeRetry)await M(W);let N=IN(W);return u(()=>{N.catch(()=>{}),N.cancel()}),N})}catch(L){p._beforeError(new Rg.RequestError(L.message,L,p));return}if(r=m,!AN.isResponseOk(m)){p._beforeError(new Rg.HTTPError(m));return}p.destroy(),o(p.options.resolveBodyOnly?m.body:m)});let f=m=>{if(n.isCanceled)return;let{options:y}=p;if(m instanceof Rg.HTTPError&&!y.throwHttpErrors){let{response:b}=m;o(p.options.resolveBodyOnly?b.body:b);return}a(m)};p.once("error",f);let H=p.options.body;p.once("retry",(m,y)=>{var b,A;if(H===((b=y.request)===null||b===void 0?void 0:b.options.body)&&hte.default.nodeStream((A=y.request)===null||A===void 0?void 0:A.options.body)){f(y);return}c(m)}),Hte.default(p,i,yte)};c(0)});n.on=(o,a)=>(i.on(o,a),n);let s=o=>{let a=(async()=>{await n;let{options:u}=r.request;return _N.default(r,o,u.parseJson,u.encoding)})();return Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)),a};return n.json=()=>{let{headers:o}=e.options;return!e.writableFinished&&o.accept===void 0&&(o.accept="application/json"),s("json")},n.buffer=()=>s("buffer"),n.text=()=>s("text"),n}jo.default=IN;fte(Yf(),jo)});var SN=v(RA=>{"use strict";Object.defineProperty(RA,"__esModule",{value:!0});var bte=Yf();function vte(t,...e){let r=(async()=>{if(t instanceof bte.RequestError)try{for(let n of e)if(n)for(let s of n)t=await s(t)}catch(n){t=n}throw t})(),i=()=>r;return r.json=i,r.text=i,r.buffer=i,r.on=i,r}RA.default=vte});var LN=v(OA=>{"use strict";Object.defineProperty(OA,"__esModule",{value:!0});var EN=Ss();function xN(t){for(let e of Object.values(t))(EN.default.plainObject(e)||EN.default.array(e))&&xN(e);return Object.freeze(t)}OA.default=xN});var PN=v(CN=>{"use strict";Object.defineProperty(CN,"__esModule",{value:!0})});var NA=v(xi=>{"use strict";var _te=xi&&xi.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),wte=xi&&xi.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_te(e,t,r)};Object.defineProperty(xi,"__esModule",{value:!0});xi.defaultHandler=void 0;var DN=Ss(),Ei=kA(),Ate=SN(),Ng=Jf(),Ite=LN(),Ste={RequestError:Ei.RequestError,CacheError:Ei.CacheError,ReadError:Ei.ReadError,HTTPError:Ei.HTTPError,MaxRedirectsError:Ei.MaxRedirectsError,TimeoutError:Ei.TimeoutError,ParseError:Ei.ParseError,CancelError:Ei.CancelError,UnsupportedProtocolError:Ei.UnsupportedProtocolError,UploadError:Ei.UploadError},Ete=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:Og}=Ng.default,TN=(...t)=>{let e;for(let r of t)e=Og(void 0,r,e);return e},xte=t=>t.isStream?new Ng.default(void 0,t):Ei.default(t),Lte=t=>"defaults"in t&&"options"in t.defaults,Cte=["get","post","put","patch","head","delete"];xi.defaultHandler=(t,e)=>e(t);var $N=(t,e)=>{if(t)for(let r of t)r(e)},MN=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(i=>(n,s)=>{let o,a=i(n,u=>(o=s(u),o));if(a!==o&&!n.isStream&&o){let u=a,{then:c,catch:l,finally:p}=u;Object.setPrototypeOf(u,Object.getPrototypeOf(o)),Object.defineProperties(u,Object.getOwnPropertyDescriptors(o)),u.then=c,u.catch=l,u.finally=p}return a});let e=(i,n={},s)=>{var o,a;let u=0,c=l=>t.handlers[u++](l,u===t.handlers.length?xte:c);if(DN.default.plainObject(i)){let l={...i,...n};Ng.setNonEnumerableProperties([i,n],l),n=l,i=void 0}try{let l;try{$N(t.options.hooks.init,n),$N((o=n.hooks)===null||o===void 0?void 0:o.init,n)}catch(f){l=f}let p=Og(i,n,s??t.options);if(p[Ng.kIsNormalizedAlready]=!0,l)throw new Ei.RequestError(l.message,l,p);return c(p)}catch(l){if(n.isStream)throw l;return Ate.default(l,t.options.hooks.beforeError,(a=n.hooks)===null||a===void 0?void 0:a.beforeError)}};e.extend=(...i)=>{let n=[t.options],s=[...t._rawHandlers],o;for(let a of i)Lte(a)?(n.push(a.defaults.options),s.push(...a.defaults._rawHandlers),o=a.defaults.mutableDefaults):(n.push(a),"handlers"in a&&s.push(...a.handlers),o=a.mutableDefaults);return s=s.filter(a=>a!==xi.defaultHandler),s.length===0&&s.push(xi.defaultHandler),MN({options:TN(...n),handlers:s,mutableDefaults:Boolean(o)})};let r=async function*(i,n){let s=Og(i,n,t.options);s.resolveBodyOnly=!1;let o=s.pagination;if(!DN.default.object(o))throw new TypeError("`options.pagination` must be implemented");let a=[],{countLimit:u}=o,c=0;for(;c<o.requestLimit;){c!==0&&await Ete(o.backoff);let l=await e(void 0,void 0,s),p=await o.transform(l),f=[];for(let m of p)if(o.filter(m,a,f)&&(!o.shouldContinue(m,a,f)||(yield m,o.stackAllItems&&a.push(m),f.push(m),--u<=0)))return;let H=o.paginate(l,a,f);if(H===!1)return;H===l.request.options?s=l.request.options:H!==void 0&&(s=Og(void 0,H,s)),c++}};e.paginate=r,e.paginate.all=async(i,n)=>{let s=[];for await(let o of r(i,n))s.push(o);return s},e.paginate.each=r,e.stream=(i,n)=>e(i,{...n,isStream:!0});for(let i of Cte)e[i]=(n,s)=>e(n,{...s,method:i}),e.stream[i]=(n,s)=>e(n,{...s,method:i,isStream:!0});return Object.assign(e,Ste),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:Ite.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=TN,e};xi.default=MN;wte(PN(),xi)});var ON=v((Es,Bg)=>{"use strict";var Pte=Es&&Es.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),kN=Es&&Es.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Pte(e,t,r)};Object.defineProperty(Es,"__esModule",{value:!0});var Dte=w("url"),RN=NA(),Tte={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType==="json"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,"link"))return!1;let e=t.headers.link.split(","),r;for(let i of e){let n=i.split(";");if(n[1].includes("next")){r=n[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new Dte.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[RN.defaultHandler],mutableDefaults:!1},BA=RN.default(Tte);Es.default=BA;Bg.exports=BA;Bg.exports.default=BA;Bg.exports.__esModule=!0;kN(NA(),Es);kN(kA(),Es)});var GN=v((SSe,jg)=>{var jt=function(t){"use strict";var e=1e7,r=7,i=9007199254740992,n=f(i),s="0123456789abcdefghijklmnopqrstuvwxyz",o=typeof BigInt=="function";function a(d,g,_,I){return typeof d>"u"?a[0]:typeof g<"u"?+g==10&&!_?ve(d):mt(d,g,_,I):ve(d)}function u(d,g){this.value=d,this.sign=g,this.isSmall=!1}u.prototype=Object.create(a.prototype);function c(d){this.value=d,this.sign=d<0,this.isSmall=!0}c.prototype=Object.create(a.prototype);function l(d){this.value=d}l.prototype=Object.create(a.prototype);function p(d){return-i<d&&d<i}function f(d){return d<1e7?[d]:d<1e14?[d%1e7,Math.floor(d/1e7)]:[d%1e7,Math.floor(d/1e7)%1e7,Math.floor(d/1e14)]}function H(d){m(d);var g=d.length;if(g<4&&te(d,n)<0)switch(g){case 0:return 0;case 1:return d[0];case 2:return d[0]+d[1]*e;default:return d[0]+(d[1]+d[2]*e)*e}return d}function m(d){for(var g=d.length;d[--g]===0;);d.length=g+1}function y(d){for(var g=new Array(d),_=-1;++_<d;)g[_]=0;return g}function b(d){return d>0?Math.floor(d):Math.ceil(d)}function A(d,g){var _=d.length,I=g.length,T=new Array(_),k=0,j=e,V,U;for(U=0;U<I;U++)V=d[U]+g[U]+k,k=V>=j?1:0,T[U]=V-k*j;for(;U<_;)V=d[U]+k,k=V===j?1:0,T[U++]=V-k*j;return k>0&&T.push(k),T}function B(d,g){return d.length>=g.length?A(d,g):A(g,d)}function q(d,g){var _=d.length,I=new Array(_),T=e,k,j;for(j=0;j<_;j++)k=d[j]-T+g,g=Math.floor(k/T),I[j]=k-g*T,g+=1;for(;g>0;)I[j++]=g%T,g=Math.floor(g/T);return I}u.prototype.add=function(d){var g=ve(d);if(this.sign!==g.sign)return this.subtract(g.negate());var _=this.value,I=g.value;return g.isSmall?new u(q(_,Math.abs(I)),this.sign):new u(B(_,I),this.sign)},u.prototype.plus=u.prototype.add,c.prototype.add=function(d){var g=ve(d),_=this.value;if(_<0!==g.sign)return this.subtract(g.negate());var I=g.value;if(g.isSmall){if(p(_+I))return new c(_+I);I=f(Math.abs(I))}return new u(q(I,Math.abs(_)),_<0)},c.prototype.plus=c.prototype.add,l.prototype.add=function(d){return new l(this.value+ve(d).value)},l.prototype.plus=l.prototype.add;function L(d,g){var _=d.length,I=g.length,T=new Array(_),k=0,j=e,V,U;for(V=0;V<I;V++)U=d[V]-k-g[V],U<0?(U+=j,k=1):k=0,T[V]=U;for(V=I;V<_;V++){if(U=d[V]-k,U<0)U+=j;else{T[V++]=U;break}T[V]=U}for(;V<_;V++)T[V]=d[V];return m(T),T}function D(d,g,_){var I;return te(d,g)>=0?I=L(d,g):(I=L(g,d),_=!_),I=H(I),typeof I=="number"?(_&&(I=-I),new c(I)):new u(I,_)}function G(d,g,_){var I=d.length,T=new Array(I),k=-g,j=e,V,U;for(V=0;V<I;V++)U=d[V]+k,k=Math.floor(U/j),U%=j,T[V]=U<0?U+j:U;return T=H(T),typeof T=="number"?(_&&(T=-T),new c(T)):new u(T,_)}u.prototype.subtract=function(d){var g=ve(d);if(this.sign!==g.sign)return this.add(g.negate());var _=this.value,I=g.value;return g.isSmall?G(_,Math.abs(I),this.sign):D(_,I,this.sign)},u.prototype.minus=u.prototype.subtract,c.prototype.subtract=function(d){var g=ve(d),_=this.value;if(_<0!==g.sign)return this.add(g.negate());var I=g.value;return g.isSmall?new c(_-I):G(I,Math.abs(_),_>=0)},c.prototype.minus=c.prototype.subtract,l.prototype.subtract=function(d){return new l(this.value-ve(d).value)},l.prototype.minus=l.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},c.prototype.negate=function(){var d=this.sign,g=new c(-this.value);return g.sign=!d,g},l.prototype.negate=function(){return new l(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},c.prototype.abs=function(){return new c(Math.abs(this.value))},l.prototype.abs=function(){return new l(this.value>=0?this.value:-this.value)};function W(d,g){var _=d.length,I=g.length,T=_+I,k=y(T),j=e,V,U,ne,le,me;for(ne=0;ne<_;++ne){le=d[ne];for(var De=0;De<I;++De)me=g[De],V=le*me+k[ne+De],U=Math.floor(V/j),k[ne+De]=V-U*j,k[ne+De+1]+=U}return m(k),k}function N(d,g){var _=d.length,I=new Array(_),T=e,k=0,j,V;for(V=0;V<_;V++)j=d[V]*g+k,k=Math.floor(j/T),I[V]=j-k*T;for(;k>0;)I[V++]=k%T,k=Math.floor(k/T);return I}function M(d,g){for(var _=[];g-- >0;)_.push(0);return _.concat(d)}function R(d,g){var _=Math.max(d.length,g.length);if(_<=30)return W(d,g);_=Math.ceil(_/2);var I=d.slice(_),T=d.slice(0,_),k=g.slice(_),j=g.slice(0,_),V=R(T,j),U=R(I,k),ne=R(B(T,I),B(j,k)),le=B(B(V,M(L(L(ne,V),U),_)),M(U,2*_));return m(le),le}function S(d,g){return-.012*d-.012*g+15e-6*d*g>0}u.prototype.multiply=function(d){var g=ve(d),_=this.value,I=g.value,T=this.sign!==g.sign,k;if(g.isSmall){if(I===0)return a[0];if(I===1)return this;if(I===-1)return this.negate();if(k=Math.abs(I),k<e)return new u(N(_,k),T);I=f(k)}return S(_.length,I.length)?new u(R(_,I),T):new u(W(_,I),T)},u.prototype.times=u.prototype.multiply;function $(d,g,_){return d<e?new u(N(g,d),_):new u(W(g,f(d)),_)}c.prototype._multiplyBySmall=function(d){return p(d.value*this.value)?new c(d.value*this.value):$(Math.abs(d.value),f(Math.abs(this.value)),this.sign!==d.sign)},u.prototype._multiplyBySmall=function(d){return d.value===0?a[0]:d.value===1?this:d.value===-1?this.negate():$(Math.abs(d.value),this.value,this.sign!==d.sign)},c.prototype.multiply=function(d){return ve(d)._multiplyBySmall(this)},c.prototype.times=c.prototype.multiply,l.prototype.multiply=function(d){return new l(this.value*ve(d).value)},l.prototype.times=l.prototype.multiply;function O(d){var g=d.length,_=y(g+g),I=e,T,k,j,V,U;for(j=0;j<g;j++){V=d[j],k=0-V*V;for(var ne=j;ne<g;ne++)U=d[ne],T=2*(V*U)+_[j+ne]+k,k=Math.floor(T/I),_[j+ne]=T-k*I;_[j+g]=k}return m(_),_}u.prototype.square=function(){return new u(O(this.value),!1)},c.prototype.square=function(){var d=this.value*this.value;return p(d)?new c(d):new u(O(f(Math.abs(this.value))),!1)},l.prototype.square=function(d){return new l(this.value*this.value)};function z(d,g){var _=d.length,I=g.length,T=e,k=y(g.length),j=g[I-1],V=Math.ceil(T/(2*j)),U=N(d,V),ne=N(g,V),le,me,De,Gr,$r,Rb,Ob;for(U.length<=_&&U.push(0),ne.push(0),j=ne[I-1],me=_-I;me>=0;me--){for(le=T-1,U[me+I]!==j&&(le=Math.floor((U[me+I]*T+U[me+I-1])/j)),De=0,Gr=0,Rb=ne.length,$r=0;$r<Rb;$r++)De+=le*ne[$r],Ob=Math.floor(De/T),Gr+=U[me+$r]-(De-Ob*T),De=Ob,Gr<0?(U[me+$r]=Gr+T,Gr=-1):(U[me+$r]=Gr,Gr=0);for(;Gr!==0;){for(le-=1,De=0,$r=0;$r<Rb;$r++)De+=U[me+$r]-T+ne[$r],De<0?(U[me+$r]=De+T,De=0):(U[me+$r]=De,De=1);Gr+=De}k[me]=le}return U=P(U,V)[0],[H(k),H(U)]}function C(d,g){for(var _=d.length,I=g.length,T=[],k=[],j=e,V,U,ne,le,me;_;){if(k.unshift(d[--_]),m(k),te(k,g)<0){T.push(0);continue}U=k.length,ne=k[U-1]*j+k[U-2],le=g[I-1]*j+g[I-2],U>I&&(ne=(ne+1)*j),V=Math.ceil(ne/le);do{if(me=N(g,V),te(me,k)<=0)break;V--}while(V);T.push(V),k=L(k,me)}return T.reverse(),[H(T),H(k)]}function P(d,g){var _=d.length,I=y(_),T=e,k,j,V,U;for(V=0,k=_-1;k>=0;--k)U=V*T+d[k],j=b(U/g),V=U-j*g,I[k]=j|0;return[I,V|0]}function ee(d,g){var _,I=ve(g);if(o)return[new l(d.value/I.value),new l(d.value%I.value)];var T=d.value,k=I.value,j;if(k===0)throw new Error("Cannot divide by zero");if(d.isSmall)return I.isSmall?[new c(b(T/k)),new c(T%k)]:[a[0],d];if(I.isSmall){if(k===1)return[d,a[0]];if(k==-1)return[d.negate(),a[0]];var V=Math.abs(k);if(V<e){_=P(T,V),j=H(_[0]);var U=_[1];return d.sign&&(U=-U),typeof j=="number"?(d.sign!==I.sign&&(j=-j),[new c(j),new c(U)]):[new u(j,d.sign!==I.sign),new c(U)]}k=f(V)}var ne=te(T,k);if(ne===-1)return[a[0],d];if(ne===0)return[a[d.sign===I.sign?1:-1],a[0]];T.length+k.length<=200?_=z(T,k):_=C(T,k),j=_[0];var le=d.sign!==I.sign,me=_[1],De=d.sign;return typeof j=="number"?(le&&(j=-j),j=new c(j)):j=new u(j,le),typeof me=="number"?(De&&(me=-me),me=new c(me)):me=new u(me,De),[j,me]}u.prototype.divmod=function(d){var g=ee(this,d);return{quotient:g[0],remainder:g[1]}},l.prototype.divmod=c.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(d){return ee(this,d)[0]},l.prototype.over=l.prototype.divide=function(d){return new l(this.value/ve(d).value)},c.prototype.over=c.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(d){return ee(this,d)[1]},l.prototype.mod=l.prototype.remainder=function(d){return new l(this.value%ve(d).value)},c.prototype.remainder=c.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(d){var g=ve(d),_=this.value,I=g.value,T,k,j;if(I===0)return a[1];if(_===0)return a[0];if(_===1)return a[1];if(_===-1)return g.isEven()?a[1]:a[-1];if(g.sign)return a[0];if(!g.isSmall)throw new Error("The exponent "+g.toString()+" is too large.");if(this.isSmall&&p(T=Math.pow(_,I)))return new c(b(T));for(k=this,j=a[1];I&!0&&(j=j.times(k),--I),I!==0;)I/=2,k=k.square();return j},c.prototype.pow=u.prototype.pow,l.prototype.pow=function(d){var g=ve(d),_=this.value,I=g.value,T=BigInt(0),k=BigInt(1),j=BigInt(2);if(I===T)return a[1];if(_===T)return a[0];if(_===k)return a[1];if(_===BigInt(-1))return g.isEven()?a[1]:a[-1];if(g.isNegative())return new l(T);for(var V=this,U=a[1];(I&k)===k&&(U=U.times(V),--I),I!==T;)I/=j,V=V.square();return U},u.prototype.modPow=function(d,g){if(d=ve(d),g=ve(g),g.isZero())throw new Error("Cannot take modPow with modulus 0");var _=a[1],I=this.mod(g);for(d.isNegative()&&(d=d.multiply(a[-1]),I=I.modInv(g));d.isPositive();){if(I.isZero())return a[0];d.isOdd()&&(_=_.multiply(I).mod(g)),d=d.divide(2),I=I.square().mod(g)}return _},l.prototype.modPow=c.prototype.modPow=u.prototype.modPow;function te(d,g){if(d.length!==g.length)return d.length>g.length?1:-1;for(var _=d.length-1;_>=0;_--)if(d[_]!==g[_])return d[_]>g[_]?1:-1;return 0}u.prototype.compareAbs=function(d){var g=ve(d),_=this.value,I=g.value;return g.isSmall?1:te(_,I)},c.prototype.compareAbs=function(d){var g=ve(d),_=Math.abs(this.value),I=g.value;return g.isSmall?(I=Math.abs(I),_===I?0:_>I?1:-1):-1},l.prototype.compareAbs=function(d){var g=this.value,_=ve(d).value;return g=g>=0?g:-g,_=_>=0?_:-_,g===_?0:g>_?1:-1},u.prototype.compare=function(d){if(d===1/0)return-1;if(d===-1/0)return 1;var g=ve(d),_=this.value,I=g.value;return this.sign!==g.sign?g.sign?1:-1:g.isSmall?this.sign?-1:1:te(_,I)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,c.prototype.compare=function(d){if(d===1/0)return-1;if(d===-1/0)return 1;var g=ve(d),_=this.value,I=g.value;return g.isSmall?_==I?0:_>I?1:-1:_<0!==g.sign?_<0?-1:1:_<0?1:-1},c.prototype.compareTo=c.prototype.compare,l.prototype.compare=function(d){if(d===1/0)return-1;if(d===-1/0)return 1;var g=this.value,_=ve(d).value;return g===_?0:g>_?1:-1},l.prototype.compareTo=l.prototype.compare,u.prototype.equals=function(d){return this.compare(d)===0},l.prototype.eq=l.prototype.equals=c.prototype.eq=c.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(d){return this.compare(d)!==0},l.prototype.neq=l.prototype.notEquals=c.prototype.neq=c.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(d){return this.compare(d)>0},l.prototype.gt=l.prototype.greater=c.prototype.gt=c.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(d){return this.compare(d)<0},l.prototype.lt=l.prototype.lesser=c.prototype.lt=c.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(d){return this.compare(d)>=0},l.prototype.geq=l.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(d){return this.compare(d)<=0},l.prototype.leq=l.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return(this.value[0]&1)===0},c.prototype.isEven=function(){return(this.value&1)===0},l.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return(this.value[0]&1)===1},c.prototype.isOdd=function(){return(this.value&1)===1},l.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},c.prototype.isPositive=function(){return this.value>0},l.prototype.isPositive=c.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},c.prototype.isNegative=function(){return this.value<0},l.prototype.isNegative=c.prototype.isNegative,u.prototype.isUnit=function(){return!1},c.prototype.isUnit=function(){return Math.abs(this.value)===1},l.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},c.prototype.isZero=function(){return this.value===0},l.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(d){var g=ve(d);return g.isZero()?!1:g.isUnit()?!0:g.compareAbs(2)===0?this.isEven():this.mod(g).isZero()},l.prototype.isDivisibleBy=c.prototype.isDivisibleBy=u.prototype.isDivisibleBy;function se(d){var g=d.abs();if(g.isUnit())return!1;if(g.equals(2)||g.equals(3)||g.equals(5))return!0;if(g.isEven()||g.isDivisibleBy(3)||g.isDivisibleBy(5))return!1;if(g.lesser(49))return!0}function oe(d,g){for(var _=d.prev(),I=_,T=0,k,j,V,U;I.isEven();)I=I.divide(2),T++;e:for(V=0;V<g.length;V++)if(!d.lesser(g[V])&&(U=jt(g[V]).modPow(I,d),!(U.isUnit()||U.equals(_)))){for(k=T-1;k!=0;k--){if(U=U.square().mod(d),U.isUnit())return!1;if(U.equals(_))continue e}return!1}return!0}u.prototype.isPrime=function(d){var g=se(this);if(g!==t)return g;var _=this.abs(),I=_.bitLength();if(I<=64)return oe(_,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var T=Math.log(2)*I.toJSNumber(),k=Math.ceil(d===!0?2*Math.pow(T,2):T),j=[],V=0;V<k;V++)j.push(jt(V+2));return oe(_,j)},l.prototype.isPrime=c.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(d,g){var _=se(this);if(_!==t)return _;for(var I=this.abs(),T=d===t?5:d,k=[],j=0;j<T;j++)k.push(jt.randBetween(2,I.minus(2),g));return oe(I,k)},l.prototype.isProbablePrime=c.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(d){for(var g=jt.zero,_=jt.one,I=ve(d),T=this.abs(),k,j,V;!T.isZero();)k=I.divide(T),j=g,V=I,g=_,I=T,_=j.subtract(k.multiply(_)),T=V.subtract(k.multiply(T));if(!I.isUnit())throw new Error(this.toString()+" and "+d.toString()+" are not co-prime");return g.compare(0)===-1&&(g=g.add(d)),this.isNegative()?g.negate():g},l.prototype.modInv=c.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var d=this.value;return this.sign?G(d,1,this.sign):new u(q(d,1),this.sign)},c.prototype.next=function(){var d=this.value;return d+1<i?new c(d+1):new u(n,!1)},l.prototype.next=function(){return new l(this.value+BigInt(1))},u.prototype.prev=function(){var d=this.value;return this.sign?new u(q(d,1),!0):G(d,1,this.sign)},c.prototype.prev=function(){var d=this.value;return d-1>-i?new c(d-1):new u(n,!0)},l.prototype.prev=function(){return new l(this.value-BigInt(1))};for(var ie=[1];2*ie[ie.length-1]<=e;)ie.push(2*ie[ie.length-1]);var de=ie.length,we=ie[de-1];function He(d){return Math.abs(d)<=e}u.prototype.shiftLeft=function(d){var g=ve(d).toJSNumber();if(!He(g))throw new Error(String(g)+" is too large for shifting.");if(g<0)return this.shiftRight(-g);var _=this;if(_.isZero())return _;for(;g>=de;)_=_.multiply(we),g-=de-1;return _.multiply(ie[g])},l.prototype.shiftLeft=c.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(d){var g,_=ve(d).toJSNumber();if(!He(_))throw new Error(String(_)+" is too large for shifting.");if(_<0)return this.shiftLeft(-_);for(var I=this;_>=de;){if(I.isZero()||I.isNegative()&&I.isUnit())return I;g=ee(I,we),I=g[1].isNegative()?g[0].prev():g[0],_-=de-1}return g=ee(I,ie[_]),g[1].isNegative()?g[0].prev():g[0]},l.prototype.shiftRight=c.prototype.shiftRight=u.prototype.shiftRight;function Lt(d,g,_){g=ve(g);for(var I=d.isNegative(),T=g.isNegative(),k=I?d.not():d,j=T?g.not():g,V=0,U=0,ne=null,le=null,me=[];!k.isZero()||!j.isZero();)ne=ee(k,we),V=ne[1].toJSNumber(),I&&(V=we-1-V),le=ee(j,we),U=le[1].toJSNumber(),T&&(U=we-1-U),k=ne[0],j=le[0],me.push(_(V,U));for(var De=_(I?1:0,T?1:0)!==0?jt(-1):jt(0),Gr=me.length-1;Gr>=0;Gr-=1)De=De.multiply(we).add(jt(me[Gr]));return De}u.prototype.not=function(){return this.negate().prev()},l.prototype.not=c.prototype.not=u.prototype.not,u.prototype.and=function(d){return Lt(this,d,function(g,_){return g&_})},l.prototype.and=c.prototype.and=u.prototype.and,u.prototype.or=function(d){return Lt(this,d,function(g,_){return g|_})},l.prototype.or=c.prototype.or=u.prototype.or,u.prototype.xor=function(d){return Lt(this,d,function(g,_){return g^_})},l.prototype.xor=c.prototype.xor=u.prototype.xor;var be=1<<30,yr=(e&-e)*(e&-e)|be;function Vr(d){var g=d.value,_=typeof g=="number"?g|be:typeof g=="bigint"?g|BigInt(be):g[0]+g[1]*e|yr;return _&-_}function Q(d,g){if(g.compareTo(d)<=0){var _=Q(d,g.square(g)),I=_.p,T=_.e,k=I.multiply(g);return k.compareTo(d)<=0?{p:k,e:T*2+1}:{p:I,e:T*2}}return{p:jt(1),e:0}}u.prototype.bitLength=function(){var d=this;return d.compareTo(jt(0))<0&&(d=d.negate().subtract(jt(1))),d.compareTo(jt(0))===0?jt(0):jt(Q(d,jt(2)).e).add(jt(1))},l.prototype.bitLength=c.prototype.bitLength=u.prototype.bitLength;function Ce(d,g){return d=ve(d),g=ve(g),d.greater(g)?d:g}function Y(d,g){return d=ve(d),g=ve(g),d.lesser(g)?d:g}function ge(d,g){if(d=ve(d).abs(),g=ve(g).abs(),d.equals(g))return d;if(d.isZero())return g;if(g.isZero())return d;for(var _=a[1],I,T;d.isEven()&&g.isEven();)I=Y(Vr(d),Vr(g)),d=d.divide(I),g=g.divide(I),_=_.multiply(I);for(;d.isEven();)d=d.divide(Vr(d));do{for(;g.isEven();)g=g.divide(Vr(g));d.greater(g)&&(T=g,g=d,d=T),g=g.subtract(d)}while(!g.isZero());return _.isUnit()?d:d.multiply(_)}function Ne(d,g){return d=ve(d).abs(),g=ve(g).abs(),d.divide(ge(d,g)).multiply(g)}function lt(d,g,_){d=ve(d),g=ve(g);var I=_||Math.random,T=Y(d,g),k=Ce(d,g),j=k.subtract(T).add(1);if(j.isSmall)return T.add(Math.floor(I()*j));for(var V=va(j,e).value,U=[],ne=!0,le=0;le<V.length;le++){var me=ne?V[le]:e,De=b(I()*me);U.push(De),De<me&&(ne=!1)}return T.add(a.fromArray(U,e,!1))}var mt=function(d,g,_,I){_=_||s,d=String(d),I||(d=d.toLowerCase(),_=_.toLowerCase());var T=d.length,k,j=Math.abs(g),V={};for(k=0;k<_.length;k++)V[_[k]]=k;for(k=0;k<T;k++){var U=d[k];if(U!=="-"&&U in V&&V[U]>=j){if(U==="1"&&j===1)continue;throw new Error(U+" is not a valid digit in base "+g+".")}}g=ve(g);var ne=[],le=d[0]==="-";for(k=le?1:0;k<d.length;k++){var U=d[k];if(U in V)ne.push(ve(V[U]));else if(U==="<"){var me=k;do k++;while(d[k]!==">"&&k<d.length);ne.push(ve(d.slice(me+1,k)))}else throw new Error(U+" is not a valid character")}return Gs(ne,g,le)};function Gs(d,g,_){var I=a[0],T=a[1],k;for(k=d.length-1;k>=0;k--)I=I.add(d[k].times(T)),T=T.times(g);return _?I.negate():I}function Ks(d,g){return g=g||s,d<g.length?g[d]:"<"+d+">"}function va(d,g){if(g=jt(g),g.isZero()){if(d.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(g.equals(-1)){if(d.isZero())return{value:[0],isNegative:!1};if(d.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-d.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var _=Array.apply(null,Array(d.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return _.unshift([1]),{value:[].concat.apply([],_),isNegative:!1}}var I=!1;if(d.isNegative()&&g.isPositive()&&(I=!0,d=d.abs()),g.isUnit())return d.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(d.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:I};for(var T=[],k=d,j;k.isNegative()||k.compareAbs(g)>=0;){j=k.divmod(g),k=j.quotient;var V=j.remainder;V.isNegative()&&(V=g.minus(V).abs(),k=k.next()),T.push(V.toJSNumber())}return T.push(k.toJSNumber()),{value:T.reverse(),isNegative:I}}function $u(d,g,_){var I=va(d,g);return(I.isNegative?"-":"")+I.value.map(function(T){return Ks(T,_)}).join("")}u.prototype.toArray=function(d){return va(this,d)},c.prototype.toArray=function(d){return va(this,d)},l.prototype.toArray=function(d){return va(this,d)},u.prototype.toString=function(d,g){if(d===t&&(d=10),d!==10)return $u(this,d,g);for(var _=this.value,I=_.length,T=String(_[--I]),k="0000000",j;--I>=0;)j=String(_[I]),T+=k.slice(j.length)+j;var V=this.sign?"-":"";return V+T},c.prototype.toString=function(d,g){return d===t&&(d=10),d!=10?$u(this,d,g):String(this.value)},l.prototype.toString=c.prototype.toString,l.prototype.toJSON=u.prototype.toJSON=c.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,c.prototype.valueOf=function(){return this.value},c.prototype.toJSNumber=c.prototype.valueOf,l.prototype.valueOf=l.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function th(d){if(p(+d)){var g=+d;if(g===b(g))return o?new l(BigInt(g)):new c(g);throw new Error("Invalid integer: "+d)}var _=d[0]==="-";_&&(d=d.slice(1));var I=d.split(/e/i);if(I.length>2)throw new Error("Invalid integer: "+I.join("e"));if(I.length===2){var T=I[1];if(T[0]==="+"&&(T=T.slice(1)),T=+T,T!==b(T)||!p(T))throw new Error("Invalid integer: "+T+" is not a valid exponent.");var k=I[0],j=k.indexOf(".");if(j>=0&&(T-=k.length-j-1,k=k.slice(0,j)+k.slice(j+1)),T<0)throw new Error("Cannot include negative exponent part for integers");k+=new Array(T+1).join("0"),d=k}var V=/^([0-9][0-9]*)$/.test(d);if(!V)throw new Error("Invalid integer: "+d);if(o)return new l(BigInt(_?"-"+d:d));for(var U=[],ne=d.length,le=r,me=ne-le;ne>0;)U.push(+d.slice(me,ne)),me-=le,me<0&&(me=0),ne-=le;return m(U),new u(U,_)}function kb(d){if(o)return new l(BigInt(d));if(p(d)){if(d!==b(d))throw new Error(d+" is not an integer.");return new c(d)}return th(d.toString())}function ve(d){return typeof d=="number"?kb(d):typeof d=="string"?th(d):typeof d=="bigint"?new l(d):d}for(var Ri=0;Ri<1e3;Ri++)a[Ri]=ve(Ri),Ri>0&&(a[-Ri]=ve(-Ri));return a.one=a[1],a.zero=a[0],a.minusOne=a[-1],a.max=Ce,a.min=Y,a.gcd=ge,a.lcm=Ne,a.isInstance=function(d){return d instanceof u||d instanceof c||d instanceof l},a.randBetween=lt,a.fromArray=function(d,g,_){return Gs(d.map(ve),ve(g||10),_)},a}();typeof jg<"u"&&jg.hasOwnProperty("exports")&&(jg.exports=jt);typeof define=="function"&&define.amd&&define(function(){return jt})});var KN=v(qt=>{"use strict";var Rte=w("fs"),Ote=GN(),Go=!1;qt.maxObjectSize=100*1e3*1e3;qt.maxObjectCount=32768;var Nte=9783072e5,Bte=qt.UID=function(t){this.UID=t},ESe=qt.parseFile=function(t,e){function r(i){var n=null,s;try{s=Fte(i)}catch(o){n=o}e(n,s)}if(Buffer.isBuffer(t))return r(t);Rte.readFile(t,function(i,n){if(i)return e(i);r(n)})},Fte=qt.parseBuffer=function(t){var e={},r=t.slice(0,6).toString("utf8");if(r!=="bplist")throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.");var i=t.slice(t.length-32,t.length),n=i.readUInt8(6);Go&&console.log("offsetSize: "+n);var s=i.readUInt8(7);Go&&console.log("objectRefSize: "+s);var o=FA(i,8);Go&&console.log("numObjects: "+o);var a=FA(i,16);Go&&console.log("topObject: "+a);var u=FA(i,24);if(Go&&console.log("offsetTableOffset: "+u),o>qt.maxObjectCount)throw new Error("maxObjectCount exceeded");for(var c=[],l=0;l<o;l++){var p=t.slice(u+l*n,u+(l+1)*n);c[l]=Wr(p,0),Go&&console.log("Offset for Object #"+l+" is "+c[l]+" ["+c[l].toString(16)+"]")}function f(H){var m=c[H],y=t[m],b=(y&240)>>4,A=y&15;switch(b){case 0:return B();case 1:return L();case 8:return D();case 2:return G();case 3:return W();case 4:return N();case 5:return M();case 6:return M(!0);case 10:return R();case 13:return S();default:throw new Error("Unhandled type 0x"+b.toString(16))}function B(){switch(A){case 0:return null;case 8:return!1;case 9:return!0;case 15:return null;default:throw new Error("Unhandled simple type 0x"+b.toString(16))}}function q($){var O="",z;for(z=0;z<$.length&&$[z]==0;z++);for(;z<$.length;z++){var C="00"+$[z].toString(16);O+=C.substr(C.length-2)}return O}function L(){var $=Math.pow(2,A);if($>4){var O=t.slice(m+1,m+1+$),z=q(O);return Ote(z,16)}if($<qt.maxObjectSize)return Wr(t.slice(m+1,m+1+$));throw new Error("To little heap space available! Wanted to read "+$+" bytes, but only "+qt.maxObjectSize+" are available.")}function D(){var $=A+1;if($<qt.maxObjectSize)return new Bte(Wr(t.slice(m+1,m+1+$)));throw new Error("To little heap space available! Wanted to read "+$+" bytes, but only "+qt.maxObjectSize+" are available.")}function G(){var $=Math.pow(2,A);if($<qt.maxObjectSize){var O=t.slice(m+1,m+1+$);if($===4)return O.readFloatBE(0);if($===8)return O.readDoubleBE(0)}else throw new Error("To little heap space available! Wanted to read "+$+" bytes, but only "+qt.maxObjectSize+" are available.")}function W(){A!=3&&console.error("Unknown date type :"+A+". Parsing anyway...");var $=t.slice(m+1,m+9);return new Date(Nte+1e3*$.readDoubleBE(0))}function N(){var $=1,O=A;if(A==15){var z=t[m+1],C=(z&240)/16;C!=1&&console.error("0x4: UNEXPECTED LENGTH-INT TYPE! "+C);var P=z&15,ee=Math.pow(2,P);$=2+ee,ee<3,O=Wr(t.slice(m+2,m+2+ee))}if(O<qt.maxObjectSize)return t.slice(m+$,m+$+O);throw new Error("To little heap space available! Wanted to read "+O+" bytes, but only "+qt.maxObjectSize+" are available.")}function M($){$=$||0;var O="utf8",z=A,C=1;if(A==15){var P=t[m+1],ee=(P&240)/16;ee!=1&&console.err("UNEXPECTED LENGTH-INT TYPE! "+ee);var te=P&15,se=Math.pow(2,te),C=2+se;se<3,z=Wr(t.slice(m+2,m+2+se))}if(z*=$+1,z<qt.maxObjectSize){var oe=new Buffer(t.slice(m+C,m+C+z));return $&&(oe=Ute(oe),O="ucs2"),oe.toString(O)}else throw new Error("To little heap space available! Wanted to read "+z+" bytes, but only "+qt.maxObjectSize+" are available.")}function R(){var $=A,O=1;if(A==15){var z=t[m+1],C=(z&240)/16;C!=1&&console.error("0xa: UNEXPECTED LENGTH-INT TYPE! "+C);var P=z&15,ee=Math.pow(2,P);O=2+ee,ee<3,$=Wr(t.slice(m+2,m+2+ee))}if($*s>qt.maxObjectSize)throw new Error("To little heap space available!");for(var te=[],se=0;se<$;se++){var oe=Wr(t.slice(m+O+se*s,m+O+(se+1)*s));te[se]=f(oe)}return te}function S(){var $=A,O=1;if(A==15){var z=t[m+1],C=(z&240)/16;C!=1&&console.error("0xD: UNEXPECTED LENGTH-INT TYPE! "+C);var P=z&15,ee=Math.pow(2,P);O=2+ee,ee<3,$=Wr(t.slice(m+2,m+2+ee))}if($*2*s>qt.maxObjectSize)throw new Error("To little heap space available!");Go&&console.log("Parsing dictionary #"+H);for(var te={},se=0;se<$;se++){var oe=Wr(t.slice(m+O+se*s,m+O+(se+1)*s)),ie=Wr(t.slice(m+O+$*s+se*s,m+O+$*s+(se+1)*s)),de=f(oe),we=f(ie);Go&&console.log("  DICT #"+H+": Mapped "+de+" to "+we),te[de]=we}return te}}return[f(a)]};function Wr(t,e){e=e||0;for(var r=0,i=e;i<t.length;i++)r<<=8,r|=t[i]&255;return r}function FA(t,e){var r=t.slice(e,e+8);return r.readUInt32BE(4,8)}function Ute(t){for(var e=t.length,r=0;r<e;r+=2){var i=t[r];t[r]=t[r+1],t[r+1]=i}return t}});var JN=v((LSe,zN)=>{"use strict";var XN=w("os");function jte(){var t=process.env,e=t.HOME,r=t.LOGNAME||t.USER||t.LNAME||t.USERNAME;return process.platform==="win32"?t.USERPROFILE||t.HOMEDRIVE+t.HOMEPATH||e||null:process.platform==="darwin"?e||(r?"/Users/"+r:null):process.platform==="linux"?e||(process.getuid()===0?"/root":r?"/home/"+r:null):e||null}zN.exports=typeof XN.homedir=="function"?XN.homedir:jte});var ZN=v((CSe,QN)=>{"use strict";var qte=JN(),YN=qte();QN.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return YN?t.replace(/^~($|\/|\\)/,YN+"$1"):t}});var UA=v((PSe,rB)=>{"use strict";var eB=function(t,e,r){return function(){for(var i=this,n=new Array(arguments.length),s=0;s<arguments.length;s++)n[s]=arguments[s];return new e(function(o,a){n.push(function(u,c){if(u)a(u);else if(r.multiArgs){for(var l=new Array(arguments.length-1),p=1;p<arguments.length;p++)l[p-1]=arguments[p];o(l)}else o(c)}),t.apply(i,n)})}},tB=rB.exports=function(t,e,r){typeof e!="function"&&(r=e,e=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var i=function(s){var o=function(a){return typeof a=="string"?s===a:a.test(s)};return r.include?r.include.some(o):!r.exclude.some(o)},n=typeof t=="function"?function(){return r.excludeMain?t.apply(this,arguments):eB(t,e,r).apply(this,arguments)}:{};return Object.keys(t).reduce(function(s,o){var a=t[o];return s[o]=typeof a=="function"&&i(o)?eB(a,e,r):a,s},n)};tB.all=tB});var nB=v((DSe,iB)=>{"use strict";var Wte=w("os"),Vte=KN(),Gte=ZN(),Kte=UA(),Xte=Number(Wte.release().split(".")[0]),zte=Gte(Xte>=14?"~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist":"~/Library/Preferences/com.apple.LaunchServices.plist");iB.exports=()=>{if(process.platform!=="darwin")return Promise.reject(new Error("Only OS X is supported"));let t="com.apple.Safari";return Kte(Vte.parseFile)(zte).then(e=>{let r=e&&e[0].LSHandlers;if(!r||r.length===0)return t;for(let i of r)if(i.LSHandlerURLScheme==="http"&&i.LSHandlerRoleAll){t=i.LSHandlerRoleAll;break}return t})}});var fB=v((TSe,pB)=>{"use strict";var qA="pending",sB="settled",qg="fulfilled",Wg="rejected",Jte=function(){},oB=typeof global<"u"&&typeof global.process<"u"&&typeof global.process.emit=="function",Yte=typeof setImmediate>"u"?setTimeout:setImmediate,Zf=[],jA;function Qte(){for(var t=0;t<Zf.length;t++)Zf[t][0](Zf[t][1]);Zf=[],jA=!1}function Vg(t,e){Zf.push([t,e]),jA||(jA=!0,Yte(Qte,0))}function Zte(t,e){function r(n){WA(e,n)}function i(n){ed(e,n)}try{t(r,i)}catch(n){i(n)}}function aB(t){var e=t.owner,r=e._state,i=e._data,n=t[r],s=t.then;if(typeof n=="function"){r=qg;try{i=n(i)}catch(o){ed(s,o)}}uB(s,i)||(r===qg&&WA(s,i),r===Wg&&ed(s,i))}function uB(t,e){var r;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&(typeof e=="function"||typeof e=="object")){var i=e.then;if(typeof i=="function")return i.call(e,function(n){r||(r=!0,e===n?cB(t,n):WA(t,n))},function(n){r||(r=!0,ed(t,n))}),!0}}catch(n){return r||ed(t,n),!0}return!1}function WA(t,e){(t===e||!uB(t,e))&&cB(t,e)}function cB(t,e){t._state===qA&&(t._state=sB,t._data=e,Vg(ere,t))}function ed(t,e){t._state===qA&&(t._state=sB,t._data=e,Vg(tre,t))}function lB(t){t._then=t._then.forEach(aB)}function ere(t){t._state=qg,lB(t)}function tre(t){t._state=Wg,lB(t),!t._handled&&oB&&global.process.emit("unhandledRejection",t._data,t)}function rre(t){global.process.emit("rejectionHandled",t)}function si(t){if(typeof t!="function")throw new TypeError("Promise resolver "+t+" is not a function");if(!(this instanceof si))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],Zte(t,this)}si.prototype={constructor:si,_state:qA,_then:null,_data:void 0,_handled:!1,then:function(t,e){var r={owner:this,then:new this.constructor(Jte),fulfilled:t,rejected:e};return(e||t)&&!this._handled&&(this._handled=!0,this._state===Wg&&oB&&Vg(rre,this)),this._state===qg||this._state===Wg?Vg(aB,r):this._then.push(r),r.then},catch:function(t){return this.then(null,t)}};si.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new si(function(e,r){var i=[],n=0;function s(u){return n++,function(c){i[u]=c,--n||e(i)}}for(var o=0,a;o<t.length;o++)a=t[o],a&&typeof a.then=="function"?a.then(s(o),r):i[o]=a;n||e(i)})};si.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new si(function(e,r){for(var i=0,n;i<t.length;i++)n=t[i],n&&typeof n.then=="function"?n.then(e,r):e(n)})};si.resolve=function(t){return t&&typeof t=="object"&&t.constructor===si?t:new si(function(e){e(t)})};si.reject=function(t){return new si(function(e,r){r(t)})};pB.exports=si});var hB=v(($Se,dB)=>{"use strict";dB.exports=typeof Promise=="function"?Promise:fB()});var gB=v((MSe,HB)=>{"use strict";var ire=w("child_process").execFile,mB=hB(),nre=UA();HB.exports=function(t){return process.platform!=="darwin"?mB.reject(new Error("Only OS X systems are supported")):nre(ire,mB)("osascript",["-e",t]).then(function(e){return e.trim()})}});var bB=v((kSe,yB)=>{"use strict";var sre=gB();yB.exports=t=>sre(`tell application "Finder" to set app_path to application file id "${t}" as string
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)});var AB=v((RSe,wB)=>{var vB=Object.prototype.hasOwnProperty;wB.exports=oi;function oi(t){if(!(this instanceof oi))throw new TypeError("Constructor PseudoMap requires 'new'");if(this.clear(),t)if(t instanceof oi||typeof Map=="function"&&t instanceof Map)t.forEach(function(e,r){this.set(r,e)},this);else if(Array.isArray(t))t.forEach(function(e){this.set(e[0],e[1])},this);else throw new TypeError("invalid argument")}oi.prototype.forEach=function(t,e){e=e||this,Object.keys(this._data).forEach(function(r){r!=="size"&&t.call(e,this._data[r].value,this._data[r].key)},this)};oi.prototype.has=function(t){return!!VA(this._data,t)};oi.prototype.get=function(t){var e=VA(this._data,t);return e&&e.value};oi.prototype.set=function(t,e){are(this._data,t,e)};oi.prototype.delete=function(t){var e=VA(this._data,t);e&&(delete this._data[e._index],this._data.size--)};oi.prototype.clear=function(){var t=Object.create(null);t.size=0,Object.defineProperty(this,"_data",{value:t,enumerable:!1,configurable:!0,writable:!1})};Object.defineProperty(oi.prototype,"size",{get:function(){return this._data.size},set:function(t){},enumerable:!0,configurable:!0});oi.prototype.values=oi.prototype.keys=oi.prototype.entries=function(){throw new Error("iterators are not implemented in this version")};function _B(t,e){return t===e||t!==t&&e!==e}function ore(t,e,r){this.key=t,this.value=e,this._index=r}function VA(t,e){for(var r=0,i="_"+e,n=i;vB.call(t,n);n=i+r++)if(_B(t[n].key,e))return t[n]}function are(t,e,r){for(var i=0,n="_"+e,s=n;vB.call(t,s);s=n+i++)if(_B(t[s].key,e)){t[s].value=r;return}t.size++,t[s]=new ore(e,r,s)}});var IB=v((OSe,GA)=>{process.env.npm_package_name==="pseudomap"&&process.env.npm_lifecycle_script==="test"&&(process.env.TEST_PSEUDOMAP="true");typeof Map=="function"&&!process.env.TEST_PSEUDOMAP?GA.exports=Map:GA.exports=AB()});var EB=v((NSe,SB)=>{SB.exports=Ve;Ve.Node=td;Ve.create=Ve;function Ve(t){var e=this;if(e instanceof Ve||(e=new Ve),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}Ve.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null};Ve.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Ve.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Ve.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)ure(this,arguments[t]);return this.length};Ve.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)cre(this,arguments[t]);return this.length};Ve.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Ve.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Ve.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};Ve.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};Ve.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Ve.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Ve.prototype.map=function(t,e){e=e||this;for(var r=new Ve,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};Ve.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Ve,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};Ve.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)r=t(r,i.value,n),i=i.next;return r};Ve.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)r=t(r,i.value,n),i=i.prev;return r};Ve.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Ve.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Ve.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Ve;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(;n!==null&&i<e;i++,n=n.next)r.push(n.value);return r};Ve.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Ve;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>t;i--,n=n.prev)r.push(n.value);return r};Ve.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function ure(t,e){t.tail=new td(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function cre(t,e){t.head=new td(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function td(t,e,r,i){if(!(this instanceof td))return new td(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}});var XA=v((BSe,CB)=>{"use strict";CB.exports=at;var lre=IB(),rd=w("util"),pre=EB(),fre=typeof Symbol=="function"&&process.env._nodeLRUCacheForceNoSymbol!=="1",tn;fre?tn=function(t){return Symbol(t)}:tn=function(t){return"_"+t};var Ls=tn("max"),Jn=tn("length"),uu=tn("lengthCalculator"),wl=tn("allowStale"),Ko=tn("maxAge"),xs=tn("dispose"),xB=tn("noDisposeOnSet"),Wt=tn("lruList"),en=tn("cache");function id(){return 1}function at(t){if(!(this instanceof at))return new at(t);typeof t=="number"&&(t={max:t}),t||(t={});var e=this[Ls]=t.max;(!e||typeof e!="number"||e<=0)&&(this[Ls]=1/0);var r=t.length||id;typeof r!="function"&&(r=id),this[uu]=r,this[wl]=t.stale||!1,this[Ko]=t.maxAge||0,this[xs]=t.dispose,this[xB]=t.noDisposeOnSet||!1,this.reset()}Object.defineProperty(at.prototype,"max",{set:function(t){(!t||typeof t!="number"||t<=0)&&(t=1/0),this[Ls]=t,nd(this)},get:function(){return this[Ls]},enumerable:!0});Object.defineProperty(at.prototype,"allowStale",{set:function(t){this[wl]=!!t},get:function(){return this[wl]},enumerable:!0});Object.defineProperty(at.prototype,"maxAge",{set:function(t){(!t||typeof t!="number"||t<0)&&(t=0),this[Ko]=t,nd(this)},get:function(){return this[Ko]},enumerable:!0});Object.defineProperty(at.prototype,"lengthCalculator",{set:function(t){typeof t!="function"&&(t=id),t!==this[uu]&&(this[uu]=t,this[Jn]=0,this[Wt].forEach(function(e){e.length=this[uu](e.value,e.key),this[Jn]+=e.length},this)),nd(this)},get:function(){return this[uu]},enumerable:!0});Object.defineProperty(at.prototype,"length",{get:function(){return this[Jn]},enumerable:!0});Object.defineProperty(at.prototype,"itemCount",{get:function(){return this[Wt].length},enumerable:!0});at.prototype.rforEach=function(t,e){e=e||this;for(var r=this[Wt].tail;r!==null;){var i=r.prev;LB(this,t,r,e),r=i}};function LB(t,e,r,i){var n=r.value;sd(t,n)&&(Al(t,r),t[wl]||(n=void 0)),n&&e.call(i,n.value,n.key,t)}at.prototype.forEach=function(t,e){e=e||this;for(var r=this[Wt].head;r!==null;){var i=r.next;LB(this,t,r,e),r=i}};at.prototype.keys=function(){return this[Wt].toArray().map(function(t){return t.key},this)};at.prototype.values=function(){return this[Wt].toArray().map(function(t){return t.value},this)};at.prototype.reset=function(){this[xs]&&this[Wt]&&this[Wt].length&&this[Wt].forEach(function(t){this[xs](t.key,t.value)},this),this[en]=new lre,this[Wt]=new pre,this[Jn]=0};at.prototype.dump=function(){return this[Wt].map(function(t){if(!sd(this,t))return{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}},this).toArray().filter(function(t){return t})};at.prototype.dumpLru=function(){return this[Wt]};at.prototype.inspect=function(t,e){var r="LRUCache {",i=!1,n=this[wl];n&&(r+=`
  allowStale: true`,i=!0);var s=this[Ls];s&&s!==1/0&&(i&&(r+=","),r+=`
  max: `+rd.inspect(s,e),i=!0);var o=this[Ko];o&&(i&&(r+=","),r+=`
  maxAge: `+rd.inspect(o,e),i=!0);var a=this[uu];a&&a!==id&&(i&&(r+=","),r+=`
  length: `+rd.inspect(this[Jn],e),i=!0);var u=!1;return this[Wt].forEach(function(c){u?r+=`,
  `:(i&&(r+=`,
`),u=!0,r+=`
  `);var l=rd.inspect(c.key).split(`
`).join(`
  `),p={value:c.value};c.maxAge!==o&&(p.maxAge=c.maxAge),a!==id&&(p.length=c.length),sd(this,c)&&(p.stale=!0),p=rd.inspect(p,e).split(`
`).join(`
  `),r+=l+" => "+p}),(u||i)&&(r+=`
`),r+="}",r};at.prototype.set=function(t,e,r){r=r||this[Ko];var i=r?Date.now():0,n=this[uu](e,t);if(this[en].has(t)){if(n>this[Ls])return Al(this,this[en].get(t)),!1;var s=this[en].get(t),o=s.value;return this[xs]&&(this[xB]||this[xs](t,o.value)),o.now=i,o.maxAge=r,o.value=e,this[Jn]+=n-o.length,o.length=n,this.get(t),nd(this),!0}var a=new dre(t,e,n,i,r);return a.length>this[Ls]?(this[xs]&&this[xs](t,e),!1):(this[Jn]+=a.length,this[Wt].unshift(a),this[en].set(t,this[Wt].head),nd(this),!0)};at.prototype.has=function(t){if(!this[en].has(t))return!1;var e=this[en].get(t).value;return!sd(this,e)};at.prototype.get=function(t){return KA(this,t,!0)};at.prototype.peek=function(t){return KA(this,t,!1)};at.prototype.pop=function(){var t=this[Wt].tail;return t?(Al(this,t),t.value):null};at.prototype.del=function(t){Al(this,this[en].get(t))};at.prototype.load=function(t){this.reset();for(var e=Date.now(),r=t.length-1;r>=0;r--){var i=t[r],n=i.e||0;if(n===0)this.set(i.k,i.v);else{var s=n-e;s>0&&this.set(i.k,i.v,s)}}};at.prototype.prune=function(){var t=this;this[en].forEach(function(e,r){KA(t,r,!1)})};function KA(t,e,r){var i=t[en].get(e);if(i){var n=i.value;sd(t,n)?(Al(t,i),t[wl]||(n=void 0)):r&&t[Wt].unshiftNode(i),n&&(n=n.value)}return n}function sd(t,e){if(!e||!e.maxAge&&!t[Ko])return!1;var r=!1,i=Date.now()-e.now;return e.maxAge?r=i>e.maxAge:r=t[Ko]&&i>t[Ko],r}function nd(t){if(t[Jn]>t[Ls])for(var e=t[Wt].tail;t[Jn]>t[Ls]&&e!==null;){var r=e.prev;Al(t,e),e=r}}function Al(t,e){if(e){var r=e.value;t[xs]&&t[xs](r.key,r.value),t[Jn]-=r.length,t[en].delete(r.key),t[Wt].removeNode(e)}}function dre(t,e,r,i,n){this.key=t,this.value=e,this.length=r,this.now=i,this.maxAge=n||0}});var RB=v((FSe,kB)=>{kB.exports=MB;MB.sync=mre;var zA=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",PB=w("path"),hre=zA?";":":",DB=Bv();function TB(t){var e=new Error("not found: "+t);return e.code="ENOENT",e}function $B(t,e){var r=e.colon||hre,i=e.path||process.env.PATH||"",n=[""];i=i.split(r);var s="";return zA&&(i.unshift(process.cwd()),s=e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM",n=s.split(r),t.indexOf(".")!==-1&&n[0]!==""&&n.unshift("")),(t.match(/\//)||zA&&t.match(/\\/))&&(i=[""]),{env:i,ext:n,extExe:s}}function MB(t,e,r){typeof e=="function"&&(r=e,e={});var i=$B(t,e),n=i.env,s=i.ext,o=i.extExe,a=[];(function u(c,l){if(c===l)return e.all&&a.length?r(null,a):r(TB(t));var p=n[c];p.charAt(0)==='"'&&p.slice(-1)==='"'&&(p=p.slice(1,-1));var f=PB.join(p,t);!p&&/^\.[\\\/]/.test(t)&&(f=t.slice(0,2)+f),function H(m,y){if(m===y)return u(c+1,l);var b=s[m];DB(f+b,{pathExt:o},function(A,B){if(!A&&B)if(e.all)a.push(f+b);else return r(null,f+b);return H(m+1,y)})}(0,s.length)})(0,n.length)}function mre(t,e){e=e||{};for(var r=$B(t,e),i=r.env,n=r.ext,s=r.extExe,o=[],a=0,u=i.length;a<u;a++){var c=i[a];c.charAt(0)==='"'&&c.slice(-1)==='"'&&(c=c.slice(1,-1));var l=PB.join(c,t);!c&&/^\.[\\\/]/.test(t)&&(l=t.slice(0,2)+l);for(var p=0,f=n.length;p<f;p++){var H=l+n[p],m;try{if(m=DB.sync(H,{pathExt:s}),m)if(e.all)o.push(H);else return H}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw TB(t)}});var FB=v((USe,BB)=>{"use strict";var OB=w("path"),NB=RB(),Hre=XA(),Gg=new Hre({max:50,maxAge:30*1e3}),gre=new RegExp(process.platform==="win32"?/[\/\\]/:/\//);function yre(t,e){var r;if(gre.test(t)&&(t=OB.resolve(t)),e=!!e,r=Gg.get(t+"!"+e),Gg.has(t))return Gg.get(t);try{r=e?NB.sync(t,{pathExt:OB.delimiter+(process.env.PATHEXT||"")}):NB.sync(t)}catch{}return Gg.set(t+"!"+e,r),r}BB.exports=yre});var WB=v((jSe,qB)=>{"use strict";var JA=w("fs"),bre=XA(),UB=FB(),vre=process.platform==="win32",YA=new bre({max:50,maxAge:30*1e3});function _re(t){var e,r,i,n;if(YA.has(t))return YA.get(t);e=new Buffer(150);try{r=JA.openSync(t,"r"),JA.readSync(r,e,0,150,0),JA.closeSync(r)}catch{}return i=e.toString().trim().match(/#!(.+)/i),i&&(n=i[1].replace(/\/usr\/bin\/env\s+/i,"")),YA.set(t,n),n}function jB(t,e){return t=""+t,e?(t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t='"'+t+'"'):t=t.replace(/([\(\)%!\^<>&|;,"'\s])/g,"^$1"),t}function wre(t){return/^[a-z0-9_-]+$/i.test(t)?t:jB(t,!0)}function Are(t,e,r){var i,n,s,o;return e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=r||{},o=t,vre&&(s=UB(t),s=s||UB(t,!0),i=s&&_re(s),i&&(e.unshift(s),t=i),n=t!=="echo",t=wre(t),e=e.map(function(a){return jB(a,n)}),e=["/s","/c",'"'+t+(e.length?" "+e.join(" "):"")+'"'],t=process.env.comspec||"cmd.exe",r.windowsVerbatimArguments=!0),{command:t,args:e,options:r,file:s,original:o}}qB.exports=Are});var XB=v((qSe,Kg)=>{"use strict";var VB=process.platform==="win32";function GB(t,e){var r;return r=new Error(e+" "+t+" ENOENT"),r.code=r.errno="ENOENT",r.syscall=e+" "+t,r}function Ire(t,e){var r;VB&&(r=t.emit,t.emit=function(i,n){var s;return i==="exit"&&(s=KB(n,e,"spawn"),s)?r.call(t,"error",s):r.apply(t,arguments)})}function KB(t,e,r){return VB&&t===1&&!e.file?GB(e.original,r):null}Kg.exports.hookChildProcess=Ire;Kg.exports.verifyENOENT=KB;Kg.exports.notFoundError=GB});var QB=v((WSe,od)=>{"use strict";var Sre=w("child_process"),zB=WB(),JB=XB();function YB(t,e,r){var i,n;return i=zB(t,e,r),n=Sre.spawn(i.command,i.args,i.options),JB.hookChildProcess(n,i),n}od.exports=YB;od.exports.spawn=YB;od.exports._parse=zB;od.exports._enoent=JB});var eF=v((VSe,ZB)=>{"use strict";ZB.exports=function(t){var e=typeof t=="string"?`
`:`
`.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===r&&(t=t.slice(0,t.length-1)),t}});var iF=v((GSe,rF)=>{"use strict";var tF=Object.getOwnPropertySymbols,Ere=Object.prototype.hasOwnProperty,xre=Object.prototype.propertyIsEnumerable;function Lre(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Cre(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(e).map(function(s){return e[s]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(s){n[s]=s}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}rF.exports=Cre()?Object.assign:function(t,e){for(var r,i=Lre(t),n,s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var o in r)Ere.call(r,o)&&(i[o]=r[o]);if(tF){n=tF(r);for(var a=0;a<n.length;a++)xre.call(r,n[a])&&(i[n[a]]=r[n[a]])}}return i}});var QA=v((KSe,nF)=>{"use strict";nF.exports=function(t){t=t||{};var e=t.env||process.env,r=t.platform||process.platform;return r!=="win32"?"PATH":Object.keys(e).filter(function(i){return i.toUpperCase()==="PATH"})[0]||"Path"}});var oF=v((XSe,sF)=>{"use strict";var ad=w("path"),Pre=QA();sF.exports=function(t){t=t||{};for(var e,r=ad.resolve(t.cwd||"."),i=[];e!==r;)i.push(ad.join(r,"node_modules/.bin")),e=r,r=ad.resolve(r,"..");return i.push(ad.dirname(process.execPath)),i.concat(t.path||process.env[Pre()]).join(ad.delimiter)}});var uF=v((zSe,ud)=>{"use strict";var Dre=w("child_process"),ZA=QB(),Tre=eF(),eI=iF(),$re=oF(),aF=QA()(),Mre=1024*1024*10;ud.exports=function(t,e,r){return new Promise(function(i,n){var s=ZA._parse(t,e,r);r=eI({maxBuffer:Mre,stripEof:!0,preferLocal:!0},s.options);var o=function(u){return r.stripEof&&(u=Tre(u)),u};r.preferLocal&&(r.env=eI({},r.env||process.env),r.env[aF]=$re({cwd:r.cwd,path:r.env[aF]}));var a=Dre.execFile(s.command,s.args,r,function(u,c,l){if(u){u.stdout=c,u.stderr=l,n(u);return}i({stdout:o(c),stderr:o(l)})});ZA._enoent.hookChildProcess(a,s)})};ud.exports.shell=function(t,e){var r,i;return e=eI({},e),process.platform==="win32"?(r=process.env.comspec||"cmd.exe",i=["/s","/c",'"'+t+'"'],e.windowsVerbatimArguments=!0):(r="/bin/sh",i=["-c",t]),e.shell&&(r=e.shell),ud.exports(r,i,e)};ud.exports.spawn=ZA});var lF=v((JSe,cF)=>{"use strict";cF.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.toLowerCase().replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()})}});var fF=v((YSe,pF)=>{"use strict";var kre=uF(),Rre=lF();pF.exports=function(){return process.platform!=="linux"?Promise.reject(new Error("Only Linux systems are supported")):kre("xdg-mime",["query","default","x-scheme-handler/http"]).then(t=>{let e=t.stdout.trim();return{name:Rre(e.replace(/.desktop$/,"").replace("-"," ")),id:e}})}});var hF=v((QSe,dF)=>{"use strict";var Ore=nB(),Nre=bB();dF.exports=()=>process.platform==="linux"?fF()():process.platform==="darwin"?Ore().then(t=>Nre(t).then(e=>({name:e,id:t}))):Promise.reject(new Error("Only macOS and Linux are supported"))});var Ps=v((bEe,rI)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?rI.exports={nextTick:Ure}:rI.exports=process;function Ure(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,s,o;switch(n){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,i)});default:for(s=new Array(n-1),o=0;o<s.length;)s[o++]=arguments[o];return process.nextTick(function(){t.apply(null,s)})}}});var iI=v((vEe,_F)=>{var jre={}.toString;_F.exports=Array.isArray||function(t){return jre.call(t)=="[object Array]"}});var nI=v((_Ee,wF)=>{wF.exports=w("stream")});var Ts=v((sI,IF)=>{var Qg=w("buffer"),Ds=Qg.Buffer;function AF(t,e){for(var r in t)e[r]=t[r]}Ds.from&&Ds.alloc&&Ds.allocUnsafe&&Ds.allocUnsafeSlow?IF.exports=Qg:(AF(Qg,sI),sI.Buffer=Sl);function Sl(t,e,r){return Ds(t,e,r)}AF(Ds,Sl);Sl.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ds(t,e,r)};Sl.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ds(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Sl.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ds(t)};Sl.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qg.SlowBuffer(t)}});var rn=v(gr=>{function qre(t){return Array.isArray?Array.isArray(t):Zg(t)==="[object Array]"}gr.isArray=qre;function Wre(t){return typeof t=="boolean"}gr.isBoolean=Wre;function Vre(t){return t===null}gr.isNull=Vre;function Gre(t){return t==null}gr.isNullOrUndefined=Gre;function Kre(t){return typeof t=="number"}gr.isNumber=Kre;function Xre(t){return typeof t=="string"}gr.isString=Xre;function zre(t){return typeof t=="symbol"}gr.isSymbol=zre;function Jre(t){return t===void 0}gr.isUndefined=Jre;function Yre(t){return Zg(t)==="[object RegExp]"}gr.isRegExp=Yre;function Qre(t){return typeof t=="object"&&t!==null}gr.isObject=Qre;function Zre(t){return Zg(t)==="[object Date]"}gr.isDate=Zre;function eie(t){return Zg(t)==="[object Error]"||t instanceof Error}gr.isError=eie;function tie(t){return typeof t=="function"}gr.isFunction=tie;function rie(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}gr.isPrimitive=rie;gr.isBuffer=Buffer.isBuffer;function Zg(t){return Object.prototype.toString.call(t)}});var SF=v((AEe,oI)=>{typeof Object.create=="function"?oI.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:oI.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Vt=v((IEe,uI)=>{try{if(aI=w("util"),typeof aI.inherits!="function")throw"";uI.exports=aI.inherits}catch{uI.exports=SF()}var aI});var xF=v((SEe,cI)=>{"use strict";function iie(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var EF=Ts().Buffer,cd=w("util");function nie(t,e,r){t.copy(e,r)}cI.exports=function(){function t(){iie(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return EF.alloc(0);if(this.length===1)return this.head.data;for(var i=EF.allocUnsafe(r>>>0),n=this.head,s=0;n;)nie(n.data,i,s),s+=n.data.length,n=n.next;return i},t}();cd&&cd.inspect&&cd.inspect.custom&&(cI.exports.prototype[cd.inspect.custom]=function(){var t=cd.inspect({length:this.length});return this.constructor.name+" "+t})});var lI=v((EEe,PF)=>{"use strict";var LF=Ps();function sie(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(!this._writableState||!this._writableState.errorEmitted)&&LF.nextTick(CF,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?(LF.nextTick(CF,r,s),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(s)}),this)}function oie(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function CF(t,e){t.emit("error",e)}PF.exports={destroy:sie,undestroy:oie}});var ey=v((xEe,DF)=>{DF.exports=w("util").deprecate});var fI=v((LEe,BF)=>{"use strict";var cu=Ps();BF.exports=kt;function $F(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Iie(e,t)}}var aie=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:cu.nextTick,El;kt.WritableState=pd;var MF=Object.create(rn());MF.inherits=Vt();var uie={deprecate:ey()},kF=nI(),ry=Ts().Buffer,cie=global.Uint8Array||function(){};function lie(t){return ry.from(t)}function pie(t){return ry.isBuffer(t)||t instanceof cie}var RF=lI();MF.inherits(kt,kF);function fie(){}function pd(t,e){El=El||lu(),t=t||{};var r=e instanceof El;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){bie(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new $F(this)}pd.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(pd.prototype,"buffer",{get:uie.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ty;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ty=Function.prototype[Symbol.hasInstance],Object.defineProperty(kt,Symbol.hasInstance,{value:function(t){return ty.call(this,t)?!0:this!==kt?!1:t&&t._writableState instanceof pd}})):ty=function(t){return t instanceof this};function kt(t){if(El=El||lu(),!ty.call(kt,this)&&!(this instanceof El))return new kt(t);this._writableState=new pd(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),kF.call(this)}kt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function die(t,e){var r=new Error("write after end");t.emit("error",r),cu.nextTick(e,r)}function hie(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),cu.nextTick(i,s),n=!1),n}kt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&pie(t);return s&&!ry.isBuffer(t)&&(t=lie(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=fie),i.ended?die(this,r):(s||hie(this,i,t,r))&&(i.pendingcb++,n=Hie(this,i,s,t,e,r)),n};kt.prototype.cork=function(){var t=this._writableState;t.corked++};kt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&OF(this,t))};kt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function mie(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ry.from(e,r)),e}Object.defineProperty(kt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Hie(t,e,r,i,n,s){if(!r){var o=mie(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else pI(t,e,!1,a,i,n,s);return u}function pI(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function gie(t,e,r,i,n){--e.pendingcb,r?(cu.nextTick(n,i),cu.nextTick(ld,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),ld(t,e))}function yie(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function bie(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(yie(r),e)gie(t,r,i,e,n);else{var s=NF(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&OF(t,r),i?aie(TF,t,r,s,n):TF(t,r,s,n)}}function TF(t,e,r,i){r||vie(t,e),e.pendingcb--,i(),ld(t,e)}function vie(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function OF(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,pI(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new $F(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(pI(t,e,!1,p,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}kt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};kt.prototype._writev=null;kt.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),!i.ending&&!i.finished&&Aie(this,i,r)};function NF(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function _ie(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),ld(t,e)})}function wie(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,cu.nextTick(_ie,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ld(t,e){var r=NF(e);return r&&(wie(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function Aie(t,e,r){e.ending=!0,ld(t,e),r&&(e.finished?cu.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Iie(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}Object.defineProperty(kt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});kt.prototype.destroy=RF.destroy;kt.prototype._undestroy=RF.undestroy;kt.prototype._destroy=function(t,e){this.end(),e(t)}});var lu=v((CEe,qF)=>{"use strict";var FF=Ps(),Sie=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};qF.exports=$s;var UF=Object.create(rn());UF.inherits=Vt();var jF=mI(),hI=fI();UF.inherits($s,jF);for(dI=Sie(hI.prototype),iy=0;iy<dI.length;iy++)ny=dI[iy],$s.prototype[ny]||($s.prototype[ny]=hI.prototype[ny]);var dI,ny,iy;function $s(t){if(!(this instanceof $s))return new $s(t);jF.call(this,t),hI.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Eie)}Object.defineProperty($s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Eie(){this.allowHalfOpen||this._writableState.ended||FF.nextTick(xie,this)}function xie(t){t.end()}Object.defineProperty($s.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});$s.prototype._destroy=function(t,e){this.push(null),this.end(),FF.nextTick(e,t)}});var yI=v(VF=>{"use strict";var gI=Ts().Buffer,WF=gI.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Lie(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Cie(t){var e=Lie(t);if(typeof e!="string"&&(gI.isEncoding===WF||!WF(t)))throw new Error("Unknown encoding: "+t);return e||t}VF.StringDecoder=fd;function fd(t){this.encoding=Cie(t);var e;switch(this.encoding){case"utf16le":this.text=kie,this.end=Rie,e=4;break;case"utf8":this.fillLast=Tie,e=4;break;case"base64":this.text=Oie,this.end=Nie,e=3;break;default:this.write=Bie,this.end=Fie;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=gI.allocUnsafe(e)}fd.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};fd.prototype.end=Mie;fd.prototype.text=$ie;fd.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function HI(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Pie(t,e,r){var i=e.length-1;if(i<r)return 0;var n=HI(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=HI(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=HI(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Die(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Tie(t){var e=this.lastTotal-this.lastNeed,r=Die(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function $ie(t,e){var r=Pie(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Mie(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function kie(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Rie(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Oie(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Nie(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Bie(t){return t.toString(this.encoding)}function Fie(t){return t&&t.length?this.write(t):""}});var mI=v((TEe,i2)=>{"use strict";var Ll=Ps();i2.exports=ut;var Uie=iI(),dd;ut.ReadableState=QF;var DEe=w("events").EventEmitter,zF=function(t,e){return t.listeners(e).length},AI=nI(),hd=Ts().Buffer,jie=global.Uint8Array||function(){};function qie(t){return hd.from(t)}function Wie(t){return hd.isBuffer(t)||t instanceof jie}var JF=Object.create(rn());JF.inherits=Vt();var bI=w("util"),Ue=void 0;bI&&bI.debuglog?Ue=bI.debuglog("stream"):Ue=function(){};var Vie=xF(),YF=lI(),xl;JF.inherits(ut,AI);var vI=["error","close","destroy","pause","resume"];function Gie(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Uie(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function QF(t,e){dd=dd||lu(),t=t||{};var r=e instanceof dd;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Vie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(xl||(xl=yI().StringDecoder),this.decoder=new xl(t.encoding),this.encoding=t.encoding)}function ut(t){if(dd=dd||lu(),!(this instanceof ut))return new ut(t);this._readableState=new QF(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),AI.call(this)}Object.defineProperty(ut.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ut.prototype.destroy=YF.destroy;ut.prototype._undestroy=YF.undestroy;ut.prototype._destroy=function(t,e){this.push(null),e(t)};ut.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=hd.from(t,e),e=""),i=!0),ZF(this,t,e,!1,i)};ut.prototype.unshift=function(t){return ZF(this,t,null,!0,!1)};function ZF(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,Jie(t,s);else{var o;n||(o=Kie(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==hd.prototype&&(e=qie(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_I(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?_I(t,s,e,!1):e2(t,s)):_I(t,s,e,!1))):i||(s.reading=!1)}return Xie(s)}function _I(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&sy(t)),e2(t,e)}function Kie(t,e){var r;return!Wie(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Xie(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ut.prototype.isPaused=function(){return this._readableState.flowing===!1};ut.prototype.setEncoding=function(t){return xl||(xl=yI().StringDecoder),this._readableState.decoder=new xl(t),this._readableState.encoding=t,this};var GF=8388608;function zie(t){return t>=GF?t=GF:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function KF(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=zie(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ut.prototype.read=function(t){Ue("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ue("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?wI(this):sy(this),null;if(t=KF(t,e),t===0&&e.ended)return e.length===0&&wI(this),null;var i=e.needReadable;Ue("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ue("length less than watermark",i)),e.ended||e.reading?(i=!1,Ue("reading or ended",i)):i&&(Ue("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=KF(r,e)));var n;return t>0?n=t2(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&wI(this)),n!==null&&this.emit("data",n),n};function Jie(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,sy(t)}}function sy(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ue("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Ll.nextTick(XF,t):XF(t))}function XF(t){Ue("emit readable"),t.emit("readable"),II(t)}function e2(t,e){e.readingMore||(e.readingMore=!0,Ll.nextTick(Yie,t,e))}function Yie(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ue("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ut.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ut.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ue("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:b;i.endEmitted?Ll.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(A,B){Ue("onunpipe"),A===r&&B&&B.hasUnpiped===!1&&(B.hasUnpiped=!0,l())}function a(){Ue("onend"),t.end()}var u=Qie(r);t.on("drain",u);var c=!1;function l(){Ue("cleanup"),t.removeListener("close",m),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",H),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),c=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var p=!1;r.on("data",f);function f(A){Ue("ondata"),p=!1;var B=t.write(A);B===!1&&!p&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&r2(i.pipes,t)!==-1)&&!c&&(Ue("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function H(A){Ue("onerror",A),b(),t.removeListener("error",H),zF(t,"error")===0&&t.emit("error",A)}Gie(t,"error",H);function m(){t.removeListener("finish",y),b()}t.once("close",m);function y(){Ue("onfinish"),t.removeListener("close",m),b()}t.once("finish",y);function b(){Ue("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ue("pipe resume"),r.resume()),t};function Qie(t){return function(){var e=t._readableState;Ue("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&zF(t,"data")&&(e.flowing=!0,II(t))}}ut.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,r);return this}var o=r2(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ut.prototype.on=function(t,e){var r=AI.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&sy(this):Ll.nextTick(Zie,this))}return r};ut.prototype.addListener=ut.prototype.on;function Zie(t){Ue("readable nexttick read 0"),t.read(0)}ut.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ue("resume"),t.flowing=!0,ene(this,t)),this};function ene(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Ll.nextTick(tne,t,e))}function tne(t,e){e.reading||(Ue("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),II(t),e.flowing&&!e.reading&&t.read(0)}ut.prototype.pause=function(){return Ue("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ue("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function II(t){var e=t._readableState;for(Ue("flow",e.flowing);e.flowing&&t.read()!==null;);}ut.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ue("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(Ue("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<vI.length;s++)t.on(vI[s],this.emit.bind(this,vI[s]));return this._read=function(o){Ue("wrapped _read",o),i&&(i=!1,t.resume())},this};Object.defineProperty(ut.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ut._fromList=t2;function t2(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=rne(t,e.buffer,e.decoder),r}function rne(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?ine(t,e):nne(t,e),i}function ine(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),t-=o,t===0){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}function nne(t,e){var r=hd.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),t-=o,t===0){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}function wI(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Ll.nextTick(sne,e,t))}function sne(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function r2(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var SI=v(($Ee,o2)=>{"use strict";o2.exports=Ms;var oy=lu(),s2=Object.create(rn());s2.inherits=Vt();s2.inherits(Ms,oy);function one(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Ms(t){if(!(this instanceof Ms))return new Ms(t);oy.call(this,t),this._transformState={afterTransform:one.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",ane)}function ane(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){n2(t,e,r)}):n2(this,null,null)}Ms.prototype.push=function(t,e){return this._transformState.needTransform=!1,oy.prototype.push.call(this,t,e)};Ms.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Ms.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Ms.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Ms.prototype._destroy=function(t,e){var r=this;oy.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function n2(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var l2=v((MEe,c2)=>{"use strict";c2.exports=md;var a2=SI(),u2=Object.create(rn());u2.inherits=Vt();u2.inherits(md,a2);function md(t){if(!(this instanceof md))return new md(t);a2.call(this,t)}md.prototype._transform=function(t,e,r){r(null,t)}});var p2=v((ir,ay)=>{var Yn=w("stream");process.env.READABLE_STREAM==="disable"&&Yn?(ay.exports=Yn,ir=ay.exports=Yn.Readable,ir.Readable=Yn.Readable,ir.Writable=Yn.Writable,ir.Duplex=Yn.Duplex,ir.Transform=Yn.Transform,ir.PassThrough=Yn.PassThrough,ir.Stream=Yn):(ir=ay.exports=mI(),ir.Stream=Yn||ir,ir.Readable=ir,ir.Writable=fI(),ir.Duplex=lu(),ir.Transform=SI(),ir.PassThrough=l2())});var h2=v((kEe,d2)=>{var f2=p2(),une=w("util");function cne(t){return!(typeof t.pipe!="function"||!t.readable||typeof t._read!="function"||!t._readableState)}function lne(t,e){if(!cne(e))throw new Error("All input streams must be readable");var r=this;e._buffer=[],e.on("readable",function(){for(var i=e.read();i;)this===t[0]?r.push(i):this._buffer.push(i),i=e.read()}),e.on("end",function(){for(var i=t[0];i&&i._readableState.ended;i=t[0]){for(;i._buffer.length;)r.push(i._buffer.shift());t.shift()}t.length||r.push(null)}),e.on("error",this.emit.bind(this,"error")),t.push(e)}function Hd(t,e){if(!(this instanceof Hd))return new Hd(t,e);if(t=t||[],e=e||{},e.objectMode=!0,f2.call(this,e),Array.isArray(t)||(t=[t]),!t.length)return this.push(null);var r=lne.bind(this,[]);t.forEach(function(i){Array.isArray(i)?i.forEach(r):r(i)})}une.inherits(Hd,f2);Hd.prototype._read=function(){};d2.exports=Hd});var EI=v((REe,m2)=>{m2.exports=w("stream")});var g2=v((OEe,xI)=>{"use strict";function pne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var H2=Ts().Buffer,gd=w("util");function fne(t,e,r){t.copy(e,r)}xI.exports=function(){function t(){pne(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return H2.alloc(0);if(this.length===1)return this.head.data;for(var i=H2.allocUnsafe(r>>>0),n=this.head,s=0;n;)fne(n.data,i,s),s+=n.data.length,n=n.next;return i},t}();gd&&gd.inspect&&gd.inspect.custom&&(xI.exports.prototype[gd.inspect.custom]=function(){var t=gd.inspect({length:this.length});return this.constructor.name+" "+t})});var LI=v((NEe,v2)=>{"use strict";var y2=Ps();function dne(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(!this._writableState||!this._writableState.errorEmitted)&&y2.nextTick(b2,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?(y2.nextTick(b2,r,s),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(s)}),this)}function hne(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function b2(t,e){t.emit("error",e)}v2.exports={destroy:dne,undestroy:hne}});var PI=v((BEe,L2)=>{"use strict";var pu=Ps();L2.exports=Rt;function w2(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Tne(e,t)}}var mne=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pu.nextTick,Cl;Rt.WritableState=bd;var A2=rn();A2.inherits=Vt();var Hne={deprecate:ey()},I2=EI(),cy=Ts().Buffer,gne=global.Uint8Array||function(){};function yne(t){return cy.from(t)}function bne(t){return cy.isBuffer(t)||t instanceof gne}var S2=LI();A2.inherits(Rt,I2);function vne(){}function bd(t,e){Cl=Cl||fu(),t=t||{};var r=e instanceof Cl;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){xne(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w2(this)}bd.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(bd.prototype,"buffer",{get:Hne.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var uy;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(uy=Function.prototype[Symbol.hasInstance],Object.defineProperty(Rt,Symbol.hasInstance,{value:function(t){return uy.call(this,t)?!0:this!==Rt?!1:t&&t._writableState instanceof bd}})):uy=function(t){return t instanceof this};function Rt(t){if(Cl=Cl||fu(),!uy.call(Rt,this)&&!(this instanceof Cl))return new Rt(t);this._writableState=new bd(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),I2.call(this)}Rt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function _ne(t,e){var r=new Error("write after end");t.emit("error",r),pu.nextTick(e,r)}function wne(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),pu.nextTick(i,s),n=!1),n}Rt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&bne(t);return s&&!cy.isBuffer(t)&&(t=yne(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=vne),i.ended?_ne(this,r):(s||wne(this,i,t,r))&&(i.pendingcb++,n=Ine(this,i,s,t,e,r)),n};Rt.prototype.cork=function(){var t=this._writableState;t.corked++};Rt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&E2(this,t))};Rt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function Ane(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=cy.from(e,r)),e}Object.defineProperty(Rt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ine(t,e,r,i,n,s){if(!r){var o=Ane(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else CI(t,e,!1,a,i,n,s);return u}function CI(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function Sne(t,e,r,i,n){--e.pendingcb,r?(pu.nextTick(n,i),pu.nextTick(yd,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),yd(t,e))}function Ene(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function xne(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(Ene(r),e)Sne(t,r,i,e,n);else{var s=x2(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&E2(t,r),i?mne(_2,t,r,s,n):_2(t,r,s,n)}}function _2(t,e,r,i){r||Lne(t,e),e.pendingcb--,i(),yd(t,e)}function Lne(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function E2(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,CI(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new w2(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(CI(t,e,!1,p,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Rt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Rt.prototype._writev=null;Rt.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),!i.ending&&!i.finished&&Dne(this,i,r)};function x2(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Cne(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),yd(t,e)})}function Pne(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,pu.nextTick(Cne,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function yd(t,e){var r=x2(e);return r&&(Pne(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function Dne(t,e,r){e.ending=!0,yd(t,e),r&&(e.finished?pu.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Tne(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}Object.defineProperty(Rt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Rt.prototype.destroy=S2.destroy;Rt.prototype._undestroy=S2.undestroy;Rt.prototype._destroy=function(t,e){this.end(),e(t)}});var fu=v((FEe,T2)=>{"use strict";var C2=Ps(),$ne=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};T2.exports=ks;var P2=rn();P2.inherits=Vt();var D2=$I(),TI=PI();P2.inherits(ks,D2);for(DI=$ne(TI.prototype),ly=0;ly<DI.length;ly++)py=DI[ly],ks.prototype[py]||(ks.prototype[py]=TI.prototype[py]);var DI,py,ly;function ks(t){if(!(this instanceof ks))return new ks(t);D2.call(this,t),TI.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Mne)}Object.defineProperty(ks.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Mne(){this.allowHalfOpen||this._writableState.ended||C2.nextTick(kne,this)}function kne(t){t.end()}Object.defineProperty(ks.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});ks.prototype._destroy=function(t,e){this.push(null),this.end(),C2.nextTick(e,t)}});var RI=v(M2=>{"use strict";var kI=Ts().Buffer,$2=kI.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Rne(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function One(t){var e=Rne(t);if(typeof e!="string"&&(kI.isEncoding===$2||!$2(t)))throw new Error("Unknown encoding: "+t);return e||t}M2.StringDecoder=vd;function vd(t){this.encoding=One(t);var e;switch(this.encoding){case"utf16le":this.text=qne,this.end=Wne,e=4;break;case"utf8":this.fillLast=Fne,e=4;break;case"base64":this.text=Vne,this.end=Gne,e=3;break;default:this.write=Kne,this.end=Xne;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kI.allocUnsafe(e)}vd.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};vd.prototype.end=jne;vd.prototype.text=Une;vd.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function MI(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Nne(t,e,r){var i=e.length-1;if(i<r)return 0;var n=MI(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=MI(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=MI(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Bne(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Fne(t){var e=this.lastTotal-this.lastNeed,r=Bne(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Une(t,e){var r=Nne(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function jne(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function qne(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Wne(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Vne(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Gne(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Kne(t){return t.toString(this.encoding)}function Xne(t){return t&&t.length?this.write(t):""}});var $I=v((qEe,G2)=>{"use strict";var Dl=Ps();G2.exports=ct;var zne=iI(),_d;ct.ReadableState=U2;var jEe=w("events").EventEmitter,N2=function(t,e){return t.listeners(e).length},UI=EI(),wd=Ts().Buffer,Jne=global.Uint8Array||function(){};function Yne(t){return wd.from(t)}function Qne(t){return wd.isBuffer(t)||t instanceof Jne}var B2=rn();B2.inherits=Vt();var OI=w("util"),je=void 0;OI&&OI.debuglog?je=OI.debuglog("stream"):je=function(){};var Zne=g2(),F2=LI(),Pl;B2.inherits(ct,UI);var NI=["error","close","destroy","pause","resume"];function ese(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):zne(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function U2(t,e){_d=_d||fu(),t=t||{};var r=e instanceof _d;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Zne,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Pl||(Pl=RI().StringDecoder),this.decoder=new Pl(t.encoding),this.encoding=t.encoding)}function ct(t){if(_d=_d||fu(),!(this instanceof ct))return new ct(t);this._readableState=new U2(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),UI.call(this)}Object.defineProperty(ct.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ct.prototype.destroy=F2.destroy;ct.prototype._undestroy=F2.undestroy;ct.prototype._destroy=function(t,e){this.push(null),e(t)};ct.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=wd.from(t,e),e=""),i=!0),j2(this,t,e,!1,i)};ct.prototype.unshift=function(t){return j2(this,t,null,!0,!1)};function j2(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,nse(t,s);else{var o;n||(o=tse(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==wd.prototype&&(e=Yne(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):BI(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?BI(t,s,e,!1):q2(t,s)):BI(t,s,e,!1))):i||(s.reading=!1)}return rse(s)}function BI(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&fy(t)),q2(t,e)}function tse(t,e){var r;return!Qne(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function rse(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ct.prototype.isPaused=function(){return this._readableState.flowing===!1};ct.prototype.setEncoding=function(t){return Pl||(Pl=RI().StringDecoder),this._readableState.decoder=new Pl(t),this._readableState.encoding=t,this};var k2=8388608;function ise(t){return t>=k2?t=k2:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function R2(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=ise(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ct.prototype.read=function(t){je("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return je("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?FI(this):fy(this),null;if(t=R2(t,e),t===0&&e.ended)return e.length===0&&FI(this),null;var i=e.needReadable;je("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,je("length less than watermark",i)),e.ended||e.reading?(i=!1,je("reading or ended",i)):i&&(je("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R2(r,e)));var n;return t>0?n=W2(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&FI(this)),n!==null&&this.emit("data",n),n};function nse(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,fy(t)}}function fy(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(je("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Dl.nextTick(O2,t):O2(t))}function O2(t){je("emit readable"),t.emit("readable"),jI(t)}function q2(t,e){e.readingMore||(e.readingMore=!0,Dl.nextTick(sse,t,e))}function sse(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(je("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ct.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ct.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,je("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:b;i.endEmitted?Dl.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(A,B){je("onunpipe"),A===r&&B&&B.hasUnpiped===!1&&(B.hasUnpiped=!0,l())}function a(){je("onend"),t.end()}var u=ose(r);t.on("drain",u);var c=!1;function l(){je("cleanup"),t.removeListener("close",m),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",H),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),c=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var p=!1;r.on("data",f);function f(A){je("ondata"),p=!1;var B=t.write(A);B===!1&&!p&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&V2(i.pipes,t)!==-1)&&!c&&(je("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function H(A){je("onerror",A),b(),t.removeListener("error",H),N2(t,"error")===0&&t.emit("error",A)}ese(t,"error",H);function m(){t.removeListener("finish",y),b()}t.once("close",m);function y(){je("onfinish"),t.removeListener("close",m),b()}t.once("finish",y);function b(){je("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(je("pipe resume"),r.resume()),t};function ose(t){return function(){var e=t._readableState;je("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&N2(t,"data")&&(e.flowing=!0,jI(t))}}ct.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,r);return this}var o=V2(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ct.prototype.on=function(t,e){var r=UI.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&fy(this):Dl.nextTick(ase,this))}return r};ct.prototype.addListener=ct.prototype.on;function ase(t){je("readable nexttick read 0"),t.read(0)}ct.prototype.resume=function(){var t=this._readableState;return t.flowing||(je("resume"),t.flowing=!0,use(this,t)),this};function use(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Dl.nextTick(cse,t,e))}function cse(t,e){e.reading||(je("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),jI(t),e.flowing&&!e.reading&&t.read(0)}ct.prototype.pause=function(){return je("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(je("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function jI(t){var e=t._readableState;for(je("flow",e.flowing);e.flowing&&t.read()!==null;);}ct.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(je("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(je("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<NI.length;s++)t.on(NI[s],this.emit.bind(this,NI[s]));return this._read=function(o){je("wrapped _read",o),i&&(i=!1,t.resume())},this};Object.defineProperty(ct.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ct._fromList=W2;function W2(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=lse(t,e.buffer,e.decoder),r}function lse(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?pse(t,e):fse(t,e),i}function pse(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),t-=o,t===0){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}function fse(t,e){var r=wd.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),t-=o,t===0){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}function FI(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Dl.nextTick(dse,e,t))}function dse(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function V2(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var qI=v((WEe,z2)=>{"use strict";z2.exports=Rs;var dy=fu(),X2=rn();X2.inherits=Vt();X2.inherits(Rs,dy);function hse(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Rs(t){if(!(this instanceof Rs))return new Rs(t);dy.call(this,t),this._transformState={afterTransform:hse.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",mse)}function mse(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){K2(t,e,r)}):K2(this,null,null)}Rs.prototype.push=function(t,e){return this._transformState.needTransform=!1,dy.prototype.push.call(this,t,e)};Rs.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Rs.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Rs.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Rs.prototype._destroy=function(t,e){var r=this;dy.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function K2(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Z2=v((VEe,Q2)=>{"use strict";Q2.exports=Ad;var J2=qI(),Y2=rn();Y2.inherits=Vt();Y2.inherits(Ad,J2);function Ad(t){if(!(this instanceof Ad))return new Ad(t);J2.call(this,t)}Ad.prototype._transform=function(t,e,r){r(null,t)}});var e3=v((nr,hy)=>{var Qn=w("stream");process.env.READABLE_STREAM==="disable"&&Qn?(hy.exports=Qn,nr=hy.exports=Qn.Readable,nr.Readable=Qn.Readable,nr.Writable=Qn.Writable,nr.Duplex=Qn.Duplex,nr.Transform=Qn.Transform,nr.PassThrough=Qn.PassThrough,nr.Stream=Qn):(nr=hy.exports=$I(),nr.Stream=Qn||nr,nr.Readable=nr,nr.Writable=PI(),nr.Duplex=fu(),nr.Transform=qI(),nr.PassThrough=Z2())});var WI=v((GEe,t3)=>{t3.exports=gse;var Hse=Object.prototype.hasOwnProperty;function gse(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)Hse.call(r,i)&&(t[i]=r[i])}return t}});var s3=v((KEe,my)=>{var r3=e3().Transform,i3=w("util").inherits,n3=WI();function Tl(t){r3.call(this,t),this._destroyed=!1}i3(Tl,r3);Tl.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var e=this;process.nextTick(function(){t&&e.emit("error",t),e.emit("close")})}};function yse(t,e,r){r(null,t)}function VI(t){return function(e,r,i){return typeof e=="function"&&(i=r,r=e,e={}),typeof r!="function"&&(r=yse),typeof i!="function"&&(i=null),t(e,r,i)}}my.exports=VI(function(t,e,r){var i=new Tl(t);return i._transform=e,r&&(i._flush=r),i});my.exports.ctor=VI(function(t,e,r){function i(n){if(!(this instanceof i))return new i(n);this.options=n3(t,n),Tl.call(this,this.options)}return i3(i,Tl),i.prototype._transform=e,r&&(i.prototype._flush=r),i});my.exports.obj=VI(function(t,e,r){var i=new Tl(n3({objectMode:!0,highWaterMark:16},t));return i._transform=e,r&&(i._flush=r),i})});var u3=v((XEe,Id)=>{"use strict";Id.exports=a3;Id.exports.ctor=GI;Id.exports.objCtor=vse;Id.exports.obj=_se;var bse=s3(),o3=WI();function GI(t,e){typeof t=="function"&&(e=t,t={});var r=bse.ctor(t,function(i,n,s){this.options.wantStrings&&(i=i.toString());try{return e.call(this,i,this._index++)&&this.push(i),s()}catch(o){return s(o)}});return r.prototype._index=0,r}function vse(t,e){return typeof t=="function"&&(e=t,t={}),t=o3({objectMode:!0,highWaterMark:16},t),GI(t,e)}function a3(t,e){return GI(t,e)()}function _se(t,e){return typeof t=="function"&&(e=t,t={}),t=o3({objectMode:!0,highWaterMark:16},t),a3(t,e)}});var l3=v((zEe,c3)=>{c3.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=e.space||"";typeof r=="number"&&(r=Array(r+1).join(" "));var i=typeof e.cycles=="boolean"?e.cycles:!1,n=e.replacer||function(a,u){return u},s=e.cmp&&function(a){return function(u){return function(c,l){var p={key:c,value:u[c]},f={key:l,value:u[l]};return a(p,f)}}}(e.cmp),o=[];return function a(u,c,l,p){var f=r?`
`+new Array(p+1).join(r):"",H=r?": ":":";if(l&&l.toJSON&&typeof l.toJSON=="function"&&(l=l.toJSON()),l=n.call(u,c,l),l!==void 0){if(typeof l!="object"||l===null)return JSON.stringify(l);if(wse(l)){for(var m=[],y=0;y<l.length;y++){var b=a(l,y,l[y],p+1)||JSON.stringify(null);m.push(f+r+b)}return"["+m.join(",")+f+"]"}else{if(o.indexOf(l)!==-1){if(i)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}else o.push(l);for(var A=Ase(l).sort(s&&s(l)),m=[],y=0;y<A.length;y++){var c=A[y],B=a(l,c,l[c],p+1);if(B){var q=JSON.stringify(c)+H+B;m.push(f+r+q)}}return o.splice(o.indexOf(l),1),"{"+m.join(",")+f+"}"}}}({"":t},"",t,0)};var wse=Array.isArray||function(t){return{}.toString.call(t)==="[object Array]"},Ase=Object.keys||function(t){var e=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var i in t)e.call(t,i)&&r.push(i);return r}});var f3=v((JEe,p3)=>{"use strict";var Ise=u3().obj,Sse=l3(),KI;typeof global.Set=="function"?KI=global.Set:KI=function(){this.keys=[],this.has=function(t){return this.keys.indexOf(t)!==-1},this.add=function(t){this.keys.push(t)}};function Ese(t){return function(e){return e[t]}}p3.exports=xse;function xse(t,e){e=e||new KI;var r=Sse;return typeof t=="string"?r=Ese(t):typeof t=="function"&&(r=t),Ise(function(i){var n=r(i);return e.has(n)?!1:(e.add(n),!0)})}});var m3=v((YEe,h3)=>{var Lse=pl(),Cse=Hg(),XI=w("fs"),Sd=function(){},Pse=/^v?\.0/.test(process.version),Hy=function(t){return typeof t=="function"},Dse=function(t){return!Pse||!XI?!1:(t instanceof(XI.ReadStream||Sd)||t instanceof(XI.WriteStream||Sd))&&Hy(t.close)},Tse=function(t){return t.setHeader&&Hy(t.abort)},$se=function(t,e,r,i){i=Lse(i);var n=!1;t.on("close",function(){n=!0}),Cse(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,Dse(t))return t.close(Sd);if(Tse(t))return t.abort();if(Hy(t.destroy))return t.destroy();i(o||new Error("stream was destroyed"))}}},d3=function(t){t()},Mse=function(t,e){return t.pipe(e)},kse=function(){var t=Array.prototype.slice.call(arguments),e=Hy(t[t.length-1]||Sd)&&t.pop()||Sd;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,i=t.map(function(n,s){var o=s<t.length-1,a=s>0;return $se(n,o,a,function(u){r||(r=u),u&&i.forEach(d3),!o&&(i.forEach(d3),e(r))})});return t.reduce(Mse)};h3.exports=kse});var zI=v((QEe,H3)=>{H3.exports=w("stream")});var v3=v((ZEe,b3)=>{"use strict";function g3(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Rse(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?g3(Object(r),!0).forEach(function(i){Ose(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g3(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Ose(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nse(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y3(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Bse(t,e,r){return e&&y3(t.prototype,e),r&&y3(t,r),t}var Fse=w("buffer"),gy=Fse.Buffer,Use=w("util"),JI=Use.inspect,jse=JI&&JI.custom||"inspect";function qse(t,e,r){gy.prototype.copy.call(t,e,r)}b3.exports=function(){function t(){Nse(this,t),this.head=null,this.tail=null,this.length=0}return Bse(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return gy.alloc(0);for(var i=gy.allocUnsafe(r>>>0),n=this.head,s=0;n;)qse(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=gy.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:jse,value:function(r,i){return JI(this,Rse({},i,{depth:0,customInspect:!1}))}}]),t}()});var QI=v((exe,w3)=>{"use strict";function Wse(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(YI,this,t)):process.nextTick(YI,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(yy,r):(r._writableState.errorEmitted=!0,process.nextTick(_3,r,s)):process.nextTick(_3,r,s):e?(process.nextTick(yy,r),e(s)):process.nextTick(yy,r)}),this)}function _3(t,e){YI(t,e),yy(t)}function yy(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Vse(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function YI(t,e){t.emit("error",e)}function Gse(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}w3.exports={destroy:Wse,undestroy:Vse,errorOrDestroy:Gse}});var Xo=v((txe,S3)=>{"use strict";var I3={};function Ci(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,u){super(i(o,a,u))}}n.prototype.name=r.name,n.prototype.code=t,I3[t]=n}function A3(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Kse(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Xse(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function zse(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ci("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ci("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Kse(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Xse(t," argument"))n=`The ${t} ${i} ${A3(e,"type")}`;else{let s=zse(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${A3(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ci("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ci("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ci("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ci("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ci("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ci("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ci("ERR_STREAM_WRITE_AFTER_END","write after end");Ci("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ci("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ci("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");S3.exports.codes=I3});var ZI=v((rxe,E3)=>{"use strict";var Jse=Xo().codes.ERR_INVALID_OPT_VALUE;function Yse(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Qse(t,e,r,i){var n=Yse(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Jse(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}E3.exports={getHighWaterMark:Qse}});var rS=v((ixe,T3)=>{"use strict";T3.exports=bt;function L3(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Soe(e,t)}}var $l;bt.WritableState=xd;var Zse={deprecate:ey()},C3=zI(),vy=w("buffer").Buffer,eoe=global.Uint8Array||function(){};function toe(t){return vy.from(t)}function roe(t){return vy.isBuffer(t)||t instanceof eoe}var tS=QI(),ioe=ZI(),noe=ioe.getHighWaterMark,zo=Xo().codes,soe=zo.ERR_INVALID_ARG_TYPE,ooe=zo.ERR_METHOD_NOT_IMPLEMENTED,aoe=zo.ERR_MULTIPLE_CALLBACK,uoe=zo.ERR_STREAM_CANNOT_PIPE,coe=zo.ERR_STREAM_DESTROYED,loe=zo.ERR_STREAM_NULL_VALUES,poe=zo.ERR_STREAM_WRITE_AFTER_END,foe=zo.ERR_UNKNOWN_ENCODING,Ml=tS.errorOrDestroy;Vt()(bt,C3);function doe(){}function xd(t,e,r){$l=$l||du(),t=t||{},typeof r!="boolean"&&(r=e instanceof $l),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=noe(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){voe(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new L3(this)}xd.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(xd.prototype,"buffer",{get:Zse.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var by;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(by=Function.prototype[Symbol.hasInstance],Object.defineProperty(bt,Symbol.hasInstance,{value:function(e){return by.call(this,e)?!0:this!==bt?!1:e&&e._writableState instanceof xd}})):by=function(e){return e instanceof this};function bt(t){$l=$l||du();var e=this instanceof $l;if(!e&&!by.call(bt,this))return new bt(t);this._writableState=new xd(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),C3.call(this)}bt.prototype.pipe=function(){Ml(this,new uoe)};function hoe(t,e){var r=new poe;Ml(t,r),process.nextTick(e,r)}function moe(t,e,r,i){var n;return r===null?n=new loe:typeof r!="string"&&!e.objectMode&&(n=new soe("chunk",["string","Buffer"],r)),n?(Ml(t,n),process.nextTick(i,n),!1):!0}bt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&roe(t);return s&&!vy.isBuffer(t)&&(t=toe(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=doe),i.ending?hoe(this,r):(s||moe(this,i,t,r))&&(i.pendingcb++,n=goe(this,i,s,t,e,r)),n};bt.prototype.cork=function(){this._writableState.corked++};bt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&P3(this,t))};bt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new foe(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(bt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Hoe(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=vy.from(e,r)),e}Object.defineProperty(bt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function goe(t,e,r,i,n,s){if(!r){var o=Hoe(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else eS(t,e,!1,a,i,n,s);return u}function eS(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new coe("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function yoe(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Ed,t,e),t._writableState.errorEmitted=!0,Ml(t,i)):(n(i),t._writableState.errorEmitted=!0,Ml(t,i),Ed(t,e))}function boe(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function voe(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new aoe;if(boe(r),e)yoe(t,r,i,e,n);else{var s=D3(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&P3(t,r),i?process.nextTick(x3,t,r,s,n):x3(t,r,s,n)}}function x3(t,e,r,i){r||_oe(t,e),e.pendingcb--,i(),Ed(t,e)}function _oe(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function P3(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,eS(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new L3(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(eS(t,e,!1,p,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}bt.prototype._write=function(t,e,r){r(new ooe("_write()"))};bt.prototype._writev=null;bt.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||Ioe(this,i,r),this};Object.defineProperty(bt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D3(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function woe(t,e){t._final(function(r){e.pendingcb--,r&&Ml(t,r),e.prefinished=!0,t.emit("prefinish"),Ed(t,e)})}function Aoe(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(woe,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Ed(t,e){var r=D3(e);if(r&&(Aoe(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function Ioe(t,e,r){e.ending=!0,Ed(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Soe(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(bt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});bt.prototype.destroy=tS.destroy;bt.prototype._undestroy=tS.undestroy;bt.prototype._destroy=function(t,e){e(t)}});var du=v((nxe,M3)=>{"use strict";var Eoe=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};M3.exports=Zn;var $3=sS(),nS=rS();Vt()(Zn,$3);for(iS=Eoe(nS.prototype),_y=0;_y<iS.length;_y++)wy=iS[_y],Zn.prototype[wy]||(Zn.prototype[wy]=nS.prototype[wy]);var iS,wy,_y;function Zn(t){if(!(this instanceof Zn))return new Zn(t);$3.call(this,t),nS.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",xoe)))}Object.defineProperty(Zn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Zn.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Zn.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function xoe(){this._writableState.ended||process.nextTick(Loe,this)}function Loe(t){t.end()}Object.defineProperty(Zn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var O3=v((oS,R3)=>{var Ay=w("buffer"),es=Ay.Buffer;function k3(t,e){for(var r in t)e[r]=t[r]}es.from&&es.alloc&&es.allocUnsafe&&es.allocUnsafeSlow?R3.exports=Ay:(k3(Ay,oS),oS.Buffer=hu);function hu(t,e,r){return es(t,e,r)}hu.prototype=Object.create(es.prototype);k3(es,hu);hu.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return es(t,e,r)};hu.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=es(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};hu.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return es(t)};hu.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ay.SlowBuffer(t)}});var cS=v(B3=>{"use strict";var uS=O3().Buffer,N3=uS.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Coe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Poe(t){var e=Coe(t);if(typeof e!="string"&&(uS.isEncoding===N3||!N3(t)))throw new Error("Unknown encoding: "+t);return e||t}B3.StringDecoder=Ld;function Ld(t){this.encoding=Poe(t);var e;switch(this.encoding){case"utf16le":this.text=Roe,this.end=Ooe,e=4;break;case"utf8":this.fillLast=$oe,e=4;break;case"base64":this.text=Noe,this.end=Boe,e=3;break;default:this.write=Foe,this.end=Uoe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=uS.allocUnsafe(e)}Ld.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Ld.prototype.end=koe;Ld.prototype.text=Moe;Ld.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function aS(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Doe(t,e,r){var i=e.length-1;if(i<r)return 0;var n=aS(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=aS(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=aS(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Toe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function $oe(t){var e=this.lastTotal-this.lastNeed,r=Toe(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Moe(t,e){var r=Doe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function koe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Roe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Ooe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Noe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Boe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Foe(t){return t.toString(this.encoding)}function Uoe(t){return t&&t.length?this.write(t):""}});var Iy=v((oxe,j3)=>{"use strict";var F3=Xo().codes.ERR_STREAM_PREMATURE_CLOSE;function joe(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function qoe(){}function Woe(t){return t.setHeader&&typeof t.abort=="function"}function U3(t,e,r){if(typeof e=="function")return U3(t,null,e);e||(e={}),r=joe(r||qoe);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},u=t._readableState&&t._readableState.endEmitted,c=function(){i=!1,u=!0,n||r.call(t)},l=function(m){r.call(t,m)},p=function(){var m;if(i&&!u)return(!t._readableState||!t._readableState.ended)&&(m=new F3),r.call(t,m);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(m=new F3),r.call(t,m)},f=function(){t.req.on("finish",a)};return Woe(t)?(t.on("complete",a),t.on("abort",p),t.req?f():t.on("request",f)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",c),t.on("finish",a),e.error!==!1&&t.on("error",l),t.on("close",p),function(){t.removeListener("complete",a),t.removeListener("abort",p),t.removeListener("request",f),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",c),t.removeListener("error",l),t.removeListener("close",p)}}j3.exports=U3});var W3=v((axe,q3)=>{"use strict";var Sy;function Jo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Voe=Iy(),Yo=Symbol("lastResolve"),mu=Symbol("lastReject"),Cd=Symbol("error"),Ey=Symbol("ended"),Hu=Symbol("lastPromise"),lS=Symbol("handlePromise"),gu=Symbol("stream");function Qo(t,e){return{value:t,done:e}}function Goe(t){var e=t[Yo];if(e!==null){var r=t[gu].read();r!==null&&(t[Hu]=null,t[Yo]=null,t[mu]=null,e(Qo(r,!1)))}}function Koe(t){process.nextTick(Goe,t)}function Xoe(t,e){return function(r,i){t.then(function(){if(e[Ey]){r(Qo(void 0,!0));return}e[lS](r,i)},i)}}var zoe=Object.getPrototypeOf(function(){}),Joe=Object.setPrototypeOf((Sy={get stream(){return this[gu]},next:function(){var e=this,r=this[Cd];if(r!==null)return Promise.reject(r);if(this[Ey])return Promise.resolve(Qo(void 0,!0));if(this[gu].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Cd]?a(e[Cd]):o(Qo(void 0,!0))})});var i=this[Hu],n;if(i)n=new Promise(Xoe(i,this));else{var s=this[gu].read();if(s!==null)return Promise.resolve(Qo(s,!1));n=new Promise(this[lS])}return this[Hu]=n,n}},Jo(Sy,Symbol.asyncIterator,function(){return this}),Jo(Sy,"return",function(){var e=this;return new Promise(function(r,i){e[gu].destroy(null,function(n){if(n){i(n);return}r(Qo(void 0,!0))})})}),Sy),zoe),Yoe=function(e){var r,i=Object.create(Joe,(r={},Jo(r,gu,{value:e,writable:!0}),Jo(r,Yo,{value:null,writable:!0}),Jo(r,mu,{value:null,writable:!0}),Jo(r,Cd,{value:null,writable:!0}),Jo(r,Ey,{value:e._readableState.endEmitted,writable:!0}),Jo(r,lS,{value:function(s,o){var a=i[gu].read();a?(i[Hu]=null,i[Yo]=null,i[mu]=null,s(Qo(a,!1))):(i[Yo]=s,i[mu]=o)},writable:!0}),r));return i[Hu]=null,Voe(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[mu];s!==null&&(i[Hu]=null,i[Yo]=null,i[mu]=null,s(n)),i[Cd]=n;return}var o=i[Yo];o!==null&&(i[Hu]=null,i[Yo]=null,i[mu]=null,o(Qo(void 0,!0))),i[Ey]=!0}),e.on("readable",Koe.bind(null,i)),i};q3.exports=Yoe});var X3=v((uxe,K3)=>{"use strict";function V3(t,e,r,i,n,s,o){try{var a=t[s](o),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(i,n)}function Qoe(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(u){V3(s,i,n,o,a,"next",u)}function a(u){V3(s,i,n,o,a,"throw",u)}o(void 0)})}}function G3(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Zoe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?G3(Object(r),!0).forEach(function(i){eae(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):G3(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function eae(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tae=Xo().codes.ERR_INVALID_ARG_TYPE;function rae(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new tae("iterable",["Iterable"],e);var n=new t(Zoe({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=Qoe(function*(){try{var u=yield i.next(),c=u.value,l=u.done;l?n.push(null):n.push(yield c)?o():s=!1}catch(p){n.destroy(p)}}),a.apply(this,arguments)}return n}K3.exports=rae});var sS=v((lxe,nU)=>{"use strict";nU.exports=$e;var kl;$e.ReadableState=Q3;var cxe=w("events").EventEmitter,Y3=function(e,r){return e.listeners(r).length},Dd=zI(),xy=w("buffer").Buffer,iae=global.Uint8Array||function(){};function nae(t){return xy.from(t)}function sae(t){return xy.isBuffer(t)||t instanceof iae}var pS=w("util"),Se;pS&&pS.debuglog?Se=pS.debuglog("stream"):Se=function(){};var oae=v3(),yS=QI(),aae=ZI(),uae=aae.getHighWaterMark,Ly=Xo().codes,cae=Ly.ERR_INVALID_ARG_TYPE,lae=Ly.ERR_STREAM_PUSH_AFTER_EOF,pae=Ly.ERR_METHOD_NOT_IMPLEMENTED,fae=Ly.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Rl,fS,dS;Vt()($e,Dd);var Pd=yS.errorOrDestroy,hS=["error","close","destroy","pause","resume"];function dae(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Q3(t,e,r){kl=kl||du(),t=t||{},typeof r!="boolean"&&(r=e instanceof kl),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=uae(this,t,"readableHighWaterMark",r),this.buffer=new oae,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Rl||(Rl=cS().StringDecoder),this.decoder=new Rl(t.encoding),this.encoding=t.encoding)}function $e(t){if(kl=kl||du(),!(this instanceof $e))return new $e(t);var e=this instanceof kl;this._readableState=new Q3(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Dd.call(this)}Object.defineProperty($e.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});$e.prototype.destroy=yS.destroy;$e.prototype._undestroy=yS.undestroy;$e.prototype._destroy=function(t,e){e(t)};$e.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=xy.from(t,e),e=""),i=!0),Z3(this,t,e,!1,i)};$e.prototype.unshift=function(t){return Z3(this,t,null,!0,!1)};function Z3(t,e,r,i,n){Se("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Hae(t,s);else{var o;if(n||(o=hae(s,e)),o)Pd(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==xy.prototype&&(e=nae(e)),i)s.endEmitted?Pd(t,new fae):mS(t,s,e,!0);else if(s.ended)Pd(t,new lae);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?mS(t,s,e,!1):gS(t,s)):mS(t,s,e,!1)}else i||(s.reading=!1,gS(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function mS(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Cy(t)),gS(t,e)}function hae(t,e){var r;return!sae(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new cae("chunk",["string","Buffer","Uint8Array"],e)),r}$e.prototype.isPaused=function(){return this._readableState.flowing===!1};$e.prototype.setEncoding=function(t){Rl||(Rl=cS().StringDecoder);var e=new Rl(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var z3=1073741824;function mae(t){return t>=z3?t=z3:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function J3(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=mae(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}$e.prototype.read=function(t){Se("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Se("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?HS(this):Cy(this),null;if(t=J3(t,e),t===0&&e.ended)return e.length===0&&HS(this),null;var i=e.needReadable;Se("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Se("length less than watermark",i)),e.ended||e.reading?(i=!1,Se("reading or ended",i)):i&&(Se("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=J3(r,e)));var n;return t>0?n=rU(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&HS(this)),n!==null&&this.emit("data",n),n};function Hae(t,e){if(Se("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Cy(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,eU(t)))}}function Cy(t){var e=t._readableState;Se("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Se("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(eU,t))}function eU(t){var e=t._readableState;Se("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,bS(t)}function gS(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(gae,t,e))}function gae(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Se("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}$e.prototype._read=function(t){Pd(this,new pae("_read()"))};$e.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Se("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:y;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(b,A){Se("onunpipe"),b===r&&A&&A.hasUnpiped===!1&&(A.hasUnpiped=!0,l())}function a(){Se("onend"),t.end()}var u=yae(r);t.on("drain",u);var c=!1;function l(){Se("cleanup"),t.removeListener("close",H),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",f),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",y),r.removeListener("data",p),c=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",p);function p(b){Se("ondata");var A=t.write(b);Se("dest.write",A),A===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&iU(i.pipes,t)!==-1)&&!c&&(Se("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function f(b){Se("onerror",b),y(),t.removeListener("error",f),Y3(t,"error")===0&&Pd(t,b)}dae(t,"error",f);function H(){t.removeListener("finish",m),y()}t.once("close",H);function m(){Se("onfinish"),t.removeListener("close",H),y()}t.once("finish",m);function y(){Se("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Se("pipe resume"),r.resume()),t};function yae(t){return function(){var r=t._readableState;Se("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Y3(t,"data")&&(r.flowing=!0,bS(t))}}$e.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=iU(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};$e.prototype.on=function(t,e){var r=Dd.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Se("on readable",i.length,i.reading),i.length?Cy(this):i.reading||process.nextTick(bae,this)),r};$e.prototype.addListener=$e.prototype.on;$e.prototype.removeListener=function(t,e){var r=Dd.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(tU,this),r};$e.prototype.removeAllListeners=function(t){var e=Dd.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(tU,this),e};function tU(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function bae(t){Se("readable nexttick read 0"),t.read(0)}$e.prototype.resume=function(){var t=this._readableState;return t.flowing||(Se("resume"),t.flowing=!t.readableListening,vae(this,t)),t.paused=!1,this};function vae(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(_ae,t,e))}function _ae(t,e){Se("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),bS(t),e.flowing&&!e.reading&&t.read(0)}$e.prototype.pause=function(){return Se("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Se("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function bS(t){var e=t._readableState;for(Se("flow",e.flowing);e.flowing&&t.read()!==null;);}$e.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Se("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(Se("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(a){return function(){return t[a].apply(t,arguments)}}(n));for(var s=0;s<hS.length;s++)t.on(hS[s],this.emit.bind(this,hS[s]));return this._read=function(o){Se("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&($e.prototype[Symbol.asyncIterator]=function(){return fS===void 0&&(fS=W3()),fS(this)});Object.defineProperty($e.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty($e.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty($e.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});$e._fromList=rU;Object.defineProperty($e.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function rU(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function HS(t){var e=t._readableState;Se("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(wae,e,t))}function wae(t,e){if(Se("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&($e.from=function(t,e){return dS===void 0&&(dS=X3()),dS($e,t,e)});function iU(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var vS=v((pxe,oU)=>{"use strict";oU.exports=Os;var Py=Xo().codes,Aae=Py.ERR_METHOD_NOT_IMPLEMENTED,Iae=Py.ERR_MULTIPLE_CALLBACK,Sae=Py.ERR_TRANSFORM_ALREADY_TRANSFORMING,Eae=Py.ERR_TRANSFORM_WITH_LENGTH_0,Dy=du();Vt()(Os,Dy);function xae(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Iae);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Os(t){if(!(this instanceof Os))return new Os(t);Dy.call(this,t),this._transformState={afterTransform:xae.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Lae)}function Lae(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){sU(t,e,r)}):sU(this,null,null)}Os.prototype.push=function(t,e){return this._transformState.needTransform=!1,Dy.prototype.push.call(this,t,e)};Os.prototype._transform=function(t,e,r){r(new Aae("_transform()"))};Os.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Os.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Os.prototype._destroy=function(t,e){Dy.prototype._destroy.call(this,t,function(r){e(r)})};function sU(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Eae;if(t._transformState.transforming)throw new Sae;return t.push(null)}});var cU=v((fxe,uU)=>{"use strict";uU.exports=Td;var aU=vS();Vt()(Td,aU);function Td(t){if(!(this instanceof Td))return new Td(t);aU.call(this,t)}Td.prototype._transform=function(t,e,r){r(null,t)}});var hU=v((dxe,dU)=>{"use strict";var _S;function Cae(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var fU=Xo().codes,Pae=fU.ERR_MISSING_ARGS,Dae=fU.ERR_STREAM_DESTROYED;function lU(t){if(t)throw t}function Tae(t){return t.setHeader&&typeof t.abort=="function"}function $ae(t,e,r,i){i=Cae(i);var n=!1;t.on("close",function(){n=!0}),_S===void 0&&(_S=Iy()),_S(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,Tae(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new Dae("pipe"))}}}function pU(t){t()}function Mae(t,e){return t.pipe(e)}function kae(t){return!t.length||typeof t[t.length-1]!="function"?lU:t.pop()}function Rae(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=kae(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Pae("streams");var n,s=e.map(function(o,a){var u=a<e.length-1,c=a>0;return $ae(o,u,c,function(l){n||(n=l),l&&s.forEach(pU),!u&&(s.forEach(pU),i(n))})});return e.reduce(Mae)}dU.exports=Rae});var wS=v((Pi,Md)=>{var $d=w("stream");process.env.READABLE_STREAM==="disable"&&$d?(Md.exports=$d.Readable,Object.assign(Md.exports,$d),Md.exports.Stream=$d):(Pi=Md.exports=sS(),Pi.Stream=$d||Pi,Pi.Readable=Pi,Pi.Writable=rS(),Pi.Duplex=du(),Pi.Transform=vS(),Pi.PassThrough=cU(),Pi.finished=Iy(),Pi.pipeline=hU())});var HU=v((hxe,mU)=>{mU.exports=Oae;function Oae(t){var e=t._readableState;return e?e.objectMode?t.read():t.read(Nae(e)):null}function Nae(t){return t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length}});var _U=v((mxe,vU)=>{var Ty=wS(),gU=Hg(),Bae=Vt(),Fae=HU(),yU=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),AS=function(t,e){t._corked?t.once("uncork",e):e()},Uae=function(t,e){t._autoDestroy&&t.destroy(e)},bU=function(t,e){return function(r){r?Uae(t,r.message==="premature close"?null:r):e&&!t._ended&&t.end()}},jae=function(t,e){if(!t||t._writableState&&t._writableState.finished)return e();if(t._writableState)return t.end(e);t.end(),e()},qae=function(){},Wae=function(t){return new Ty.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},sr=function(t,e,r){if(!(this instanceof sr))return new sr(t,e,r);Ty.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,t&&this.setWritable(t),e&&this.setReadable(e)};Bae(sr,Ty.Duplex);sr.obj=function(t,e,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new sr(t,e,r)};sr.prototype.cork=function(){++this._corked===1&&this.emit("cork")};sr.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};sr.prototype.setWritable=function(t){if(this._unwrite&&this._unwrite(),this.destroyed){t&&t.destroy&&t.destroy();return}if(t===null||t===!1){this.end();return}var e=this,r=gU(t,{writable:!0,readable:!1},bU(this,this._forwardEnd)),i=function(){var s=e._ondrain;e._ondrain=null,s&&s()},n=function(){e._writable.removeListener("drain",i),r()};this._unwrite&&process.nextTick(i),this._writable=t,this._writable.on("drain",i),this._unwrite=n,this.uncork()};sr.prototype.setReadable=function(t){if(this._unread&&this._unread(),this.destroyed){t&&t.destroy&&t.destroy();return}if(t===null||t===!1){this.push(null),this.resume();return}var e=this,r=gU(t,{writable:!1,readable:!0},bU(this)),i=function(){e._forward()},n=function(){e.push(null)},s=function(){e._readable2.removeListener("readable",i),e._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=t,this._readable2=t._readableState?t:Wae(t),this._readable2.on("readable",i),this._readable2.on("end",n),this._unread=s,this._forward()};sr.prototype._read=function(){this._drained=!0,this._forward()};sr.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var t;this._drained&&(t=Fae(this._readable2))!==null;)this.destroyed||(this._drained=this.push(t));this._forwarding=!1}};sr.prototype.destroy=function(t,e){if(e||(e=qae),this.destroyed)return e(null);this.destroyed=!0;var r=this;process.nextTick(function(){r._destroy(t),e(null)})};sr.prototype._destroy=function(t){if(t){var e=this._ondrain;this._ondrain=null,e?e(t):this.emit("error",t)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};sr.prototype._write=function(t,e,r){if(!this.destroyed){if(this._corked)return AS(this,this._write.bind(this,t,e,r));if(t===yU)return this._finish(r);if(!this._writable)return r();this._writable.write(t)===!1?this._ondrain=r:this.destroyed||r()}};sr.prototype._finish=function(t){var e=this;this.emit("preend"),AS(this,function(){jae(e._forwardEnd&&e._writable,function(){e._writableState.prefinished===!1&&(e._writableState.prefinished=!0),e.emit("prefinish"),AS(e,t)})})};sr.prototype.end=function(t,e,r){return typeof t=="function"?this.end(null,null,t):typeof e=="function"?this.end(t,null,e):(this._ended=!0,t&&this.write(t),!this._writableState.ending&&!this._writableState.destroyed&&this.write(yU),Ty.Writable.prototype.end.call(this,r))};vU.exports=sr});var IU=v((Hxe,$y)=>{var Vae=m3(),Gae=Vt(),wU=_U(),AU=function(t){return t.length?Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t):[]},IS=function(t){var e=function(){var r=AU(arguments);if(!(this instanceof e))return new e(r);wU.call(this,null,null,t),r.length&&this.setPipeline(r)};return Gae(e,wU),e.prototype.setPipeline=function(){var r=AU(arguments),i=this,n=!1,s=r[0],o=r[r.length-1];o=o.readable?o:null,s=s.writable?s:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||i.cork()}),Vae(r,function(u){if(i.removeListener("close",a),u)return i.destroy(u.message==="premature close"?null:u);n=!0,i._autoDestroy===!1&&(i._autoDestroy=!0),i.uncork()}),this.destroyed)return a();this.setWritable(s),this.setReadable(o)},e};$y.exports=IS({autoDestroy:!1,destroy:!1});$y.exports.obj=IS({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});$y.exports.ctor=IS});var SS=v((gxe,SU)=>{"use strict";SU.exports=function(t){if(typeof t!="string")throw new TypeError("expected a string");var e={negated:!1,pattern:t,original:t};return t.charAt(0)==="!"&&t.charAt(1)!=="("&&(e.negated=!0,e.pattern=t.slice(1)),e}});var ES=v((yxe,$U)=>{"use strict";var My=Object.prototype.hasOwnProperty,TU=Object.prototype.toString,EU=Object.defineProperty,xU=Object.getOwnPropertyDescriptor,LU=function(e){return typeof Array.isArray=="function"?Array.isArray(e):TU.call(e)==="[object Array]"},CU=function(e){if(!e||TU.call(e)!=="[object Object]")return!1;var r=My.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&My.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;var n;for(n in e);return typeof n>"u"||My.call(e,n)},PU=function(e,r){EU&&r.name==="__proto__"?EU(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},DU=function(e,r){if(r==="__proto__")if(My.call(e,r)){if(xU)return xU(e,r).value}else return;return e[r]};$U.exports=function t(){var e,r,i,n,s,o,a=arguments[0],u=1,c=arguments.length,l=!1;for(typeof a=="boolean"&&(l=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<c;++u)if(e=arguments[u],e!=null)for(r in e)i=DU(a,r),n=DU(e,r),a!==n&&(l&&n&&(CU(n)||(s=LU(n)))?(s?(s=!1,o=i&&LU(i)?i:[]):o=i&&CU(i)?i:{},PU(a,{name:r,newValue:t(l,o,n)})):typeof n<"u"&&PU(a,{name:r,newValue:n}));return a}});var MU=v(xS=>{var yu=w("path"),ea=process.platform==="win32",Zo=w("fs"),Kae=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function Xae(){var t;if(Kae){var e=new Error;t=r}else t=i;return t;function r(n){n&&(e.message=n.message,n=e,i(n))}function i(n){if(n){if(process.throwDeprecation)throw n;if(!process.noDeprecation){var s="fs: missing callback "+(n.stack||n.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function zae(t){return typeof t=="function"?t:Xae()}var bxe=yu.normalize;ea?Ns=/(.*?)(?:[\/\\]+|$)/g:Ns=/(.*?)(?:[\/]+|$)/g;var Ns;ea?kd=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:kd=/^[\/]*/;var kd;xS.realpathSync=function(e,r){if(e=yu.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];var i=e,n={},s={},o,a,u,c;l();function l(){var b=kd.exec(e);o=b[0].length,a=b[0],u=b[0],c="",ea&&!s[u]&&(Zo.lstatSync(u),s[u]=!0)}for(;o<e.length;){Ns.lastIndex=o;var p=Ns.exec(e);if(c=a,a+=p[0],u=c+p[1],o=Ns.lastIndex,!(s[u]||r&&r[u]===u)){var f;if(r&&Object.prototype.hasOwnProperty.call(r,u))f=r[u];else{var H=Zo.lstatSync(u);if(!H.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var m=null;if(!ea){var y=H.dev.toString(32)+":"+H.ino.toString(32);n.hasOwnProperty(y)&&(m=n[y])}m===null&&(Zo.statSync(u),m=Zo.readlinkSync(u)),f=yu.resolve(c,m),r&&(r[u]=f),ea||(n[y]=m)}e=yu.resolve(f,e.slice(o)),l()}}return r&&(r[i]=e),e};xS.realpath=function(e,r,i){if(typeof i!="function"&&(i=zae(r),r=null),e=yu.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return process.nextTick(i.bind(null,null,r[e]));var n=e,s={},o={},a,u,c,l;p();function p(){var b=kd.exec(e);a=b[0].length,u=b[0],c=b[0],l="",ea&&!o[c]?Zo.lstat(c,function(A){if(A)return i(A);o[c]=!0,f()}):process.nextTick(f)}function f(){if(a>=e.length)return r&&(r[n]=e),i(null,e);Ns.lastIndex=a;var b=Ns.exec(e);return l=u,u+=b[0],c=l+b[1],a=Ns.lastIndex,o[c]||r&&r[c]===c?process.nextTick(f):r&&Object.prototype.hasOwnProperty.call(r,c)?y(r[c]):Zo.lstat(c,H)}function H(b,A){if(b)return i(b);if(!A.isSymbolicLink())return o[c]=!0,r&&(r[c]=c),process.nextTick(f);if(!ea){var B=A.dev.toString(32)+":"+A.ino.toString(32);if(s.hasOwnProperty(B))return m(null,s[B],c)}Zo.stat(c,function(q){if(q)return i(q);Zo.readlink(c,function(L,D){ea||(s[B]=D),m(L,D)})})}function m(b,A,B){if(b)return i(b);var q=yu.resolve(l,A);r&&(r[B]=q),y(q)}function y(b){e=yu.resolve(b,e.slice(a)),p()}}});var DS=v((_xe,NU)=>{NU.exports=ta;ta.realpath=ta;ta.sync=PS;ta.realpathSync=PS;ta.monkeypatch=Yae;ta.unmonkeypatch=Qae;var Ol=w("fs"),LS=Ol.realpath,CS=Ol.realpathSync,Jae=process.version,kU=/^v[0-5]\./.test(Jae),RU=MU();function OU(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function ta(t,e,r){if(kU)return LS(t,e,r);typeof e=="function"&&(r=e,e=null),LS(t,e,function(i,n){OU(i)?RU.realpath(t,e,r):r(i,n)})}function PS(t,e){if(kU)return CS(t,e);try{return CS(t,e)}catch(r){if(OU(r))return RU.realpathSync(t,e);throw r}}function Yae(){Ol.realpath=ta,Ol.realpathSync=PS}function Qae(){Ol.realpath=LS,Ol.realpathSync=CS}});var FU=v((wxe,BU)=>{BU.exports=function(t,e){for(var r=[],i=0;i<t.length;i++){var n=e(t[i],i);Zae(n)?r.push.apply(r,n):r.push(n)}return r};var Zae=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}});var VU=v((Axe,WU)=>{"use strict";WU.exports=jU;function jU(t,e,r){t instanceof RegExp&&(t=UU(t,r)),e instanceof RegExp&&(e=UU(e,r));var i=qU(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function UU(t,e){var r=e.match(t);return r?r[0]:null}jU.range=qU;function qU(t,e,r){var i,n,s,o,a,u=r.indexOf(t),c=r.indexOf(e,u+1),l=u;if(u>=0&&c>0){for(i=[],s=r.length;l>=0&&!a;)l==u?(i.push(l),u=r.indexOf(t,l+1)):i.length==1?a=[i.pop(),c]:(n=i.pop(),n<s&&(s=n,o=c),c=r.indexOf(e,l+1)),l=u<c&&u>=0?u:c;i.length&&(a=[s,o])}return a}});var ZU=v((Ixe,QU)=>{var eue=FU(),GU=VU();QU.exports=iue;var KU="\0SLASH"+Math.random()+"\0",XU="\0OPEN"+Math.random()+"\0",$S="\0CLOSE"+Math.random()+"\0",zU="\0COMMA"+Math.random()+"\0",JU="\0PERIOD"+Math.random()+"\0";function TS(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function tue(t){return t.split("\\\\").join(KU).split("\\{").join(XU).split("\\}").join($S).split("\\,").join(zU).split("\\.").join(JU)}function rue(t){return t.split(KU).join("\\").split(XU).join("{").split($S).join("}").split(zU).join(",").split(JU).join(".")}function YU(t){if(!t)return[""];var e=[],r=GU("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,o=i.split(",");o[o.length-1]+="{"+n+"}";var a=YU(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function iue(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Nl(tue(t),!0).map(rue)):[]}function nue(t){return"{"+t+"}"}function sue(t){return/^-?0\d/.test(t)}function oue(t,e){return t<=e}function aue(t,e){return t>=e}function Nl(t,e){var r=[],i=GU("{","}",t);if(!i||/\$$/.test(i.pre))return[t];var n=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),o=n||s,a=i.body.indexOf(",")>=0;if(!o&&!a)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+$S+i.post,Nl(t)):[t];var u;if(o)u=i.body.split(/\.\./);else if(u=YU(i.body),u.length===1&&(u=Nl(u[0],!1).map(nue),u.length===1)){var l=i.post.length?Nl(i.post,!1):[""];return l.map(function(S){return i.pre+u[0]+S})}var c=i.pre,l=i.post.length?Nl(i.post,!1):[""],p;if(o){var f=TS(u[0]),H=TS(u[1]),m=Math.max(u[0].length,u[1].length),y=u.length==3?Math.abs(TS(u[2])):1,b=oue,A=H<f;A&&(y*=-1,b=aue);var B=u.some(sue);p=[];for(var q=f;b(q,H);q+=y){var L;if(s)L=String.fromCharCode(q),L==="\\"&&(L="");else if(L=String(q),B){var D=m-L.length;if(D>0){var G=new Array(D+1).join("0");q<0?L="-"+G+L.slice(1):L=G+L}}p.push(L)}}else p=eue(u,function(R){return Nl(R,!1)});for(var W=0;W<p.length;W++)for(var N=0;N<l.length;N++){var M=c+p[W]+l[N];(!e||o||M)&&r.push(M)}return r}});var Oy=v((Sxe,nj)=>{nj.exports=ai;ai.Minimatch=or;var Rd=function(){try{return w("path")}catch{}}()||{sep:"/"};ai.sep=Rd.sep;var RS=ai.GLOBSTAR=or.GLOBSTAR={},uue=ZU(),ej={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},MS="[^/]",kS=MS+"*?",cue="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",lue="(?:(?!(?:\\/|^)\\.).)*?",tj=pue("().*{}+?[]^$\\!");function pue(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}var rj=/\/+/;ai.filter=fue;function fue(t,e){return e=e||{},function(r,i,n){return ai(r,t,e)}}function ra(t,e){e=e||{};var r={};return Object.keys(t).forEach(function(i){r[i]=t[i]}),Object.keys(e).forEach(function(i){r[i]=e[i]}),r}ai.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return ai;var e=ai,r=function(n,s,o){return e(n,s,ra(t,o))};return r.Minimatch=function(n,s){return new e.Minimatch(n,ra(t,s))},r.Minimatch.defaults=function(n){return e.defaults(ra(t,n)).Minimatch},r.filter=function(n,s){return e.filter(n,ra(t,s))},r.defaults=function(n){return e.defaults(ra(t,n))},r.makeRe=function(n,s){return e.makeRe(n,ra(t,s))},r.braceExpand=function(n,s){return e.braceExpand(n,ra(t,s))},r.match=function(i,n,s){return e.match(i,n,ra(t,s))},r};or.defaults=function(t){return ai.defaults(t).Minimatch};function ai(t,e,r){return Ry(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new or(e,r).match(t)}function or(t,e){if(!(this instanceof or))return new or(t,e);Ry(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&Rd.sep!=="/"&&(t=t.split(Rd.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}or.prototype.debug=function(){};or.prototype.make=due;function due(){var t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(i){return i.split(rj)}),this.debug(this.pattern,r),r=r.map(function(i,n,s){return i.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}or.prototype.parseNegate=hue;function hue(){var t=this.pattern,e=!1,r=this.options,i=0;if(!r.nonegate){for(var n=0,s=t.length;n<s&&t.charAt(n)==="!";n++)e=!e,i++;i&&(this.pattern=t.substr(i)),this.negate=e}}ai.braceExpand=function(t,e){return ij(t,e)};or.prototype.braceExpand=ij;function ij(t,e){return e||(this instanceof or?e=this.options:e={}),t=typeof t>"u"?this.pattern:t,Ry(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:uue(t)}var mue=1024*64,Ry=function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>mue)throw new TypeError("pattern is too long")};or.prototype.parse=Hue;var ky={};function Hue(t,e){Ry(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return RS;if(t==="")return"";var i="",n=!!r.nocase,s=!1,o=[],a=[],u,c=!1,l=-1,p=-1,f=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",H=this;function m(){if(u){switch(u){case"*":i+=kS,n=!0;break;case"?":i+=MS,n=!0;break;default:i+="\\"+u;break}H.debug("clearStateChar %j %j",u,i),u=!1}}for(var y=0,b=t.length,A;y<b&&(A=t.charAt(y));y++){if(this.debug("%s	%s %s %j",t,y,i,A),s&&tj[A]){i+="\\"+A,s=!1;continue}switch(A){case"/":return!1;case"\\":m(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s	%s %s %j <-- stateChar",t,y,i,A),c){this.debug("  in class"),A==="!"&&y===p+1&&(A="^"),i+=A;continue}H.debug("call clearStateChar %j",u),m(),u=A,r.noext&&m();continue;case"(":if(c){i+="(";continue}if(!u){i+="\\(";continue}o.push({type:u,start:y-1,reStart:i.length,open:ej[u].open,close:ej[u].close}),i+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,i),u=!1;continue;case")":if(c||!o.length){i+="\\)";continue}m(),n=!0;var B=o.pop();i+=B.close,B.type==="!"&&a.push(B),B.reEnd=i.length;continue;case"|":if(c||!o.length||s){i+="\\|",s=!1;continue}m(),i+="|";continue;case"[":if(m(),c){i+="\\"+A;continue}c=!0,p=y,l=i.length,i+=A;continue;case"]":if(y===p+1||!c){i+="\\"+A,s=!1;continue}var q=t.substring(p+1,y);try{RegExp("["+q+"]")}catch{var L=this.parse(q,ky);i=i.substr(0,l)+"\\["+L[0]+"\\]",n=n||L[1],c=!1;continue}n=!0,c=!1,i+=A;continue;default:m(),s?s=!1:tj[A]&&!(A==="^"&&c)&&(i+="\\"),i+=A}}for(c&&(q=t.substr(p+1),L=this.parse(q,ky),i=i.substr(0,l)+"\\["+L[0],n=n||L[1]),B=o.pop();B;B=o.pop()){var D=i.slice(B.reStart+B.open.length);this.debug("setting tail",i,B),D=D.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(oe,ie,de){return de||(de="\\"),ie+ie+de+"|"}),this.debug(`tail=%j
   %s`,D,D,B,i);var G=B.type==="*"?kS:B.type==="?"?MS:"\\"+B.type;n=!0,i=i.slice(0,B.reStart)+G+"\\("+D}m(),s&&(i+="\\\\");var W=!1;switch(i.charAt(0)){case"[":case".":case"(":W=!0}for(var N=a.length-1;N>-1;N--){var M=a[N],R=i.slice(0,M.reStart),S=i.slice(M.reStart,M.reEnd-8),$=i.slice(M.reEnd-8,M.reEnd),O=i.slice(M.reEnd);$+=O;var z=R.split("(").length-1,C=O;for(y=0;y<z;y++)C=C.replace(/\)[+*?]?/,"");O=C;var P="";O===""&&e!==ky&&(P="$");var ee=R+S+O+P+$;i=ee}if(i!==""&&n&&(i="(?=.)"+i),W&&(i=f+i),e===ky)return[i,n];if(!n)return yue(t);var te=r.nocase?"i":"";try{var se=new RegExp("^"+i+"$",te)}catch{return new RegExp("$.")}return se._glob=t,se._src=i,se}ai.makeRe=function(t,e){return new or(t,e||{}).makeRe()};or.prototype.makeRe=gue;function gue(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?kS:e.dot?cue:lue,i=e.nocase?"i":"",n=t.map(function(s){return s.map(function(o){return o===RS?r:typeof o=="string"?bue(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,i)}catch{this.regexp=!1}return this.regexp}ai.match=function(t,e,r){r=r||{};var i=new or(e,r);return t=t.filter(function(n){return i.match(n)}),i.options.nonull&&!t.length&&t.push(e),t};or.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var i=this.options;Rd.sep!=="/"&&(e=e.split(Rd.sep).join("/")),e=e.split(rj),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],u=e;i.matchBase&&a.length===1&&(u=[s]);var c=this.matchOne(u,a,r);if(c)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate};or.prototype.matchOne=function(t,e,r){var i=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,s=0,o=t.length,a=e.length;n<o&&s<a;n++,s++){this.debug("matchOne loop");var u=e[s],c=t[n];if(this.debug(e,u,c),u===!1)return!1;if(u===RS){this.debug("GLOBSTAR",[e,u,c]);var l=n,p=s+1;if(p===a){for(this.debug("** at the end");n<o;n++)if(t[n]==="."||t[n]===".."||!i.dot&&t[n].charAt(0)===".")return!1;return!0}for(;l<o;){var f=t[l];if(this.debug(`
globstar while`,t,l,e,p,f),this.matchOne(t.slice(l),e.slice(p),r))return this.debug("globstar found match!",l,o,f),!0;if(f==="."||f===".."||!i.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,l,e,p);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(r&&(this.debug(`
>>> no match, partial?`,t,l,e,p),l===o))}var H;if(typeof u=="string"?(H=c===u,this.debug("string match",u,c,H)):(H=c.match(u),this.debug("pattern match",u,c,H)),!H)return!1}if(n===o&&s===a)return!0;if(n===o)return r;if(s===a)return n===o-1&&t[n]==="";throw new Error("wtf?")};function yue(t){return t.replace(/\\(.)/g,"$1")}function bue(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var By=v((Exe,Ny)=>{"use strict";function sj(t){return t.charAt(0)==="/"}function oj(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=e.exec(t),i=r[1]||"",n=Boolean(i&&i.charAt(1)!==":");return Boolean(r[2]||n)}Ny.exports=process.platform==="win32"?oj:sj;Ny.exports.posix=sj;Ny.exports.win32=oj});var NS=v(ia=>{ia.setopts=Sue;ia.ownProp=aj;ia.makeAbs=Od;ia.finish=Eue;ia.mark=xue;ia.isIgnored=cj;ia.childrenIgnored=Lue;function aj(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var vue=w("fs"),Bl=w("path"),_ue=Oy(),uj=By(),OS=_ue.Minimatch;function wue(t,e){return t.localeCompare(e,"en")}function Aue(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(Iue))}function Iue(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new OS(r,{dot:!0})}return{matcher:new OS(t,{dot:!0}),gmatcher:e}}function Sue(t,e,r){if(r||(r={}),r.matchBase&&e.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=r.strict!==!1,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||vue,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),Aue(t,r),t.changedCwd=!1;var i=process.cwd();aj(r,"cwd")?(t.cwd=Bl.resolve(r.cwd),t.changedCwd=t.cwd!==i):t.cwd=i,t.root=r.root||Bl.resolve(t.cwd,"/"),t.root=Bl.resolve(t.root),process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/")),t.cwdAbs=uj(t.cwd)?t.cwd:Od(t,t.cwd),process.platform==="win32"&&(t.cwdAbs=t.cwdAbs.replace(/\\/g,"/")),t.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,t.minimatch=new OS(e,r),t.options=t.minimatch.options}function Eue(t){for(var e=t.nounique,r=e?[]:Object.create(null),i=0,n=t.matches.length;i<n;i++){var s=t.matches[i];if(!s||Object.keys(s).length===0){if(t.nonull){var o=t.minimatch.globSet[i];e?r.push(o):r[o]=!0}}else{var a=Object.keys(s);e?r.push.apply(r,a):a.forEach(function(u){r[u]=!0})}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(wue)),t.mark){for(var i=0;i<r.length;i++)r[i]=t._mark(r[i]);t.nodir&&(r=r.filter(function(u){var c=!/\/$/.test(u),l=t.cache[u]||t.cache[Od(t,u)];return c&&l&&(c=l!=="DIR"&&!Array.isArray(l)),c}))}t.ignore.length&&(r=r.filter(function(u){return!cj(t,u)})),t.found=r}function xue(t,e){var r=Od(t,e),i=t.cache[r],n=e;if(i){var s=i==="DIR"||Array.isArray(i),o=e.slice(-1)==="/";if(s&&!o?n+="/":!s&&o&&(n=n.slice(0,-1)),n!==e){var a=Od(t,n);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return n}function Od(t,e){var r=e;return e.charAt(0)==="/"?r=Bl.join(t.root,e):uj(e)||e===""?r=e:t.changedCwd?r=Bl.resolve(t.cwd,e):r=Bl.resolve(e),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function cj(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function Lue(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var hj=v((Dxe,dj)=>{dj.exports=fj;fj.GlobSync=Gt;var Cue=DS(),lj=Oy(),Lxe=lj.Minimatch,Cxe=US().Glob,Pxe=w("util"),BS=w("path"),pj=w("assert"),Fy=By(),bu=NS(),Pue=bu.setopts,FS=bu.ownProp,Due=bu.childrenIgnored,Tue=bu.isIgnored;function fj(t,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);return new Gt(t,e).found}function Gt(t,e){if(!t)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof Gt))return new Gt(t,e);if(Pue(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;i<r;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}Gt.prototype._finish=function(){if(pj(this instanceof Gt),this.realpath){var t=this;this.matches.forEach(function(e,r){var i=t.matches[r]=Object.create(null);for(var n in e)try{n=t._makeAbs(n);var s=Cue.realpathSync(n,t.realpathCache);i[s]=!0}catch(o){if(o.syscall==="stat")i[t._makeAbs(n)]=!0;else throw o}})}bu.finish(this)};Gt.prototype._process=function(t,e,r){pj(this instanceof Gt);for(var i=0;typeof t[i]=="string";)i++;var n;switch(i){case t.length:this._processSimple(t.join("/"),e);return;case 0:n=null;break;default:n=t.slice(0,i).join("/");break}var s=t.slice(i),o;n===null?o=".":((Fy(n)||Fy(t.join("/")))&&(!n||!Fy(n))&&(n="/"+n),o=n);var a=this._makeAbs(o);if(!Due(this,o)){var u=s[0]===lj.GLOBSTAR;u?this._processGlobStar(n,o,a,s,e,r):this._processReaddir(n,o,a,s,e,r)}};Gt.prototype._processReaddir=function(t,e,r,i,n,s){var o=this._readdir(r,s);if(o){for(var a=i[0],u=!!this.minimatch.negate,c=a._glob,l=this.dot||c.charAt(0)===".",p=[],f=0;f<o.length;f++){var H=o[f];if(H.charAt(0)!=="."||l){var m;u&&!t?m=!H.match(a):m=H.match(a),m&&p.push(H)}}var y=p.length;if(y!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var f=0;f<y;f++){var H=p[f];t&&(t.slice(-1)!=="/"?H=t+"/"+H:H=t+H),H.charAt(0)==="/"&&!this.nomount&&(H=BS.join(this.root,H)),this._emitMatch(n,H)}return}i.shift();for(var f=0;f<y;f++){var H=p[f],b;t?b=[t,H]:b=[H],this._process(b.concat(i),n,s)}}}};Gt.prototype._emitMatch=function(t,e){if(!Tue(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};Gt.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r,i;try{r=this.fs.lstatSync(t)}catch(s){if(s.code==="ENOENT")return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,!n&&r&&!r.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};Gt.prototype._readdir=function(t,e){var r;if(e&&!FS(this.symlinks,t))return this._readdirInGlobStar(t);if(FS(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(n){return this._readdirError(t,n),null}};Gt.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var i=e[r];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,e};Gt.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=e.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};Gt.prototype._processGlobStar=function(t,e,r,i,n,s){var o=this._readdir(r,s);if(o){var a=i.slice(1),u=t?[t]:[],c=u.concat(a);this._process(c,n,!1);var l=o.length,p=this.symlinks[r];if(!(p&&s))for(var f=0;f<l;f++){var H=o[f];if(!(H.charAt(0)==="."&&!this.dot)){var m=u.concat(o[f],a);this._process(m,n,!0);var y=u.concat(o[f],i);this._process(y,n,!0)}}}};Gt.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&Fy(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=BS.join(this.root,t):(t=BS.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};Gt.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&FS(this.cache,e)){var o=this.cache[e];if(Array.isArray(o)&&(o="DIR"),!r||o==="DIR")return o;if(r&&o==="FILE")return!1}var i,n=this.statCache[e];if(!n){var s;try{s=this.fs.lstatSync(e)}catch(a){if(a&&(a.code==="ENOENT"||a.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(e)}catch{n=s}else n=s}this.statCache[e]=n;var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,r&&o==="FILE"?!1:o};Gt.prototype._mark=function(t){return bu.mark(this,t)};Gt.prototype._makeAbs=function(t){return bu.makeAbs(this,t)}});var Hj=v((Txe,mj)=>{var $ue=jw(),Nd=Object.create(null),Mue=pl();mj.exports=$ue(kue);function kue(t,e){return Nd[t]?(Nd[t].push(e),null):(Nd[t]=[e],Rue(t))}function Rue(t){return Mue(function e(){var r=Nd[t],i=r.length,n=Oue(arguments);try{for(var s=0;s<i;s++)r[s].apply(null,n)}finally{r.length>i?(r.splice(0,i),process.nextTick(function(){e.apply(null,n)})):delete Nd[t]}})}function Oue(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i]=t[i];return r}});var US=v((kxe,yj)=>{yj.exports=vu;var Nue=DS(),gj=Oy(),$xe=gj.Minimatch,Bue=Vt(),Fue=w("events").EventEmitter,jS=w("path"),qS=w("assert"),Bd=By(),VS=hj(),_u=NS(),Uue=_u.setopts,WS=_u.ownProp,GS=Hj(),Mxe=w("util"),jue=_u.childrenIgnored,que=_u.isIgnored,Wue=pl();function vu(t,e,r){if(typeof e=="function"&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return VS(t,e)}return new Ge(t,e,r)}vu.sync=VS;var Vue=vu.GlobSync=VS.GlobSync;vu.glob=vu;function Gue(t,e){if(e===null||typeof e!="object")return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}vu.hasMagic=function(t,e){var r=Gue({},e);r.noprocess=!0;var i=new Ge(t,r),n=i.minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var s=0;s<n[0].length;s++)if(typeof n[0][s]!="string")return!0;return!1};vu.Glob=Ge;Bue(Ge,Fue);function Ge(t,e,r){if(typeof e=="function"&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new Vue(t,e)}if(!(this instanceof Ge))return new Ge(t,e,r);Uue(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=Wue(r),this.on("error",r),this.on("end",function(u){r(null,u)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return a();for(var s=!0,o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,a);s=!1;function a(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}}Ge.prototype._finish=function(){if(qS(this instanceof Ge),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();_u.finish(this),this.emit("end",this.found)}};Ge.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,i);function i(){--t===0&&e._finish()}};Ge.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),n=this,s=i.length;if(s===0)return e();var o=this.matches[t]=Object.create(null);i.forEach(function(a,u){a=n._makeAbs(a),Nue.realpath(a,n.realpathCache,function(c,l){c?c.syscall==="stat"?o[a]=!0:n.emit("error",c):o[l]=!0,--s===0&&(n.matches[t]=o,e())})})};Ge.prototype._mark=function(t){return _u.mark(this,t)};Ge.prototype._makeAbs=function(t){return _u.makeAbs(this,t)};Ge.prototype.abort=function(){this.aborted=!0,this.emit("abort")};Ge.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};Ge.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<i.length;e++){var n=i[e];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};Ge.prototype._process=function(t,e,r,i){if(qS(this instanceof Ge),qS(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,r,i]);return}for(var n=0;typeof t[n]=="string";)n++;var s;switch(n){case t.length:this._processSimple(t.join("/"),e,i);return;case 0:s=null;break;default:s=t.slice(0,n).join("/");break}var o=t.slice(n),a;s===null?a=".":((Bd(s)||Bd(t.join("/")))&&(!s||!Bd(s))&&(s="/"+s),a=s);var u=this._makeAbs(a);if(jue(this,a))return i();var c=o[0]===gj.GLOBSTAR;c?this._processGlobStar(s,a,u,o,e,r,i):this._processReaddir(s,a,u,o,e,r,i)}};Ge.prototype._processReaddir=function(t,e,r,i,n,s,o){var a=this;this._readdir(r,s,function(u,c){return a._processReaddir2(t,e,r,i,n,s,c,o)})};Ge.prototype._processReaddir2=function(t,e,r,i,n,s,o,a){if(!o)return a();for(var u=i[0],c=!!this.minimatch.negate,l=u._glob,p=this.dot||l.charAt(0)===".",f=[],H=0;H<o.length;H++){var m=o[H];if(m.charAt(0)!=="."||p){var y;c&&!t?y=!m.match(u):y=m.match(u),y&&f.push(m)}}var b=f.length;if(b===0)return a();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var H=0;H<b;H++){var m=f[H];t&&(t!=="/"?m=t+"/"+m:m=t+m),m.charAt(0)==="/"&&!this.nomount&&(m=jS.join(this.root,m)),this._emitMatch(n,m)}return a()}i.shift();for(var H=0;H<b;H++){var m=f[H],A;t&&(t!=="/"?m=t+"/"+m:m=t+m),this._process([m].concat(i),n,s,a)}a()};Ge.prototype._emitMatch=function(t,e){if(!this.aborted&&!que(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=Bd(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0;var n=this.statCache[r];n&&this.emit("stat",e,n),this.emit("match",e)}}};Ge.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var r="lstat\0"+t,i=this,n=GS(r,s);n&&i.fs.lstat(t,n);function s(o,a){if(o&&o.code==="ENOENT")return e();var u=a&&a.isSymbolicLink();i.symlinks[t]=u,!u&&a&&!a.isDirectory()?(i.cache[t]="FILE",e()):i._readdir(t,!1,e)}};Ge.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=GS("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!WS(this.symlinks,t))return this._readdirInGlobStar(t,r);if(WS(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return r();if(Array.isArray(i))return r(null,i)}var n=this;n.fs.readdir(t,Kue(this,t,r))}};function Kue(t,e,r){return function(i,n){i?t._readdirError(e,i,r):t._readdirEntries(e,n,r)}}Ge.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var n=e[i];t==="/"?n=t+n:n=t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,r(null,e)}};Ge.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=e.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return r()}};Ge.prototype._processGlobStar=function(t,e,r,i,n,s,o){var a=this;this._readdir(r,s,function(u,c){a._processGlobStar2(t,e,r,i,n,s,c,o)})};Ge.prototype._processGlobStar2=function(t,e,r,i,n,s,o,a){if(!o)return a();var u=i.slice(1),c=t?[t]:[],l=c.concat(u);this._process(l,n,!1,a);var p=this.symlinks[r],f=o.length;if(p&&s)return a();for(var H=0;H<f;H++){var m=o[H];if(!(m.charAt(0)==="."&&!this.dot)){var y=c.concat(o[H],u);this._process(y,n,!0,a);var b=c.concat(o[H],i);this._process(b,n,!0,a)}}a()};Ge.prototype._processSimple=function(t,e,r){var i=this;this._stat(t,function(n,s){i._processSimple2(t,e,n,s,r)})};Ge.prototype._processSimple2=function(t,e,r,i,n){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return n();if(t&&Bd(t)&&!this.nomount){var s=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=jS.join(this.root,t):(t=jS.resolve(this.root,t),s&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),n()};Ge.prototype._stat=function(t,e){var r=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&WS(this.cache,r)){var n=this.cache[r];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return e(null,n);if(i&&n==="FILE")return e()}var s,o=this.statCache[r];if(o!==void 0){if(o===!1)return e(null,o);var a=o.isDirectory()?"DIR":"FILE";return i&&a==="FILE"?e():e(null,a,o)}var u=this,c=GS("stat\0"+r,l);c&&u.fs.lstat(r,c);function l(p,f){if(f&&f.isSymbolicLink())return u.fs.stat(r,function(H,m){H?u._stat2(t,r,null,f,e):u._stat2(t,r,H,m,e)});u._stat2(t,r,p,f,e)}};Ge.prototype._stat2=function(t,e,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[e]=!1,n();var s=t.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var o=!0;return i&&(o=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,s&&o==="FILE"?n():n(null,o,i)}});var vj=v((Rxe,bj)=>{bj.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var Aj=v((Oxe,wj)=>{var Xue=vj(),_j={"{":"}","(":")","[":"]"},zue=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,i=-2,n=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||i!==-1&&t[e]==="["&&t[e+1]!=="]"&&(i<e&&(i=t.indexOf("]",e)),i>e&&(o===-1||o>i||(o=t.indexOf("\\",e),o===-1||o>i)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var u=_j[a];if(u){var c=t.indexOf(u,e);c!==-1&&(e=c+1)}if(t[e]==="!")return!0}else e++}return!1},Jue=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var i=_j[r];if(i){var n=t.indexOf(i,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1};wj.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(Xue(e))return!0;var i=zue;return r&&r.strict===!1&&(i=Jue),i(e)}});var Sj=v((Nxe,Ij)=>{"use strict";var Yue=Aj(),Que=w("path").posix.dirname,Zue=w("os").platform()==="win32",Uy="/",ece=/\\/g,tce=/\\([!*?|[\](){}])/g;Ij.exports=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&Zue&&e.indexOf(Uy)<0&&(e=e.replace(ece,Uy)),rce(e)&&(e+=Uy),e+="a";do e=Que(e);while(ice(e));return e.replace(tce,"$1")};function rce(t){var e=t.slice(-1),r;switch(e){case"}":r="{";break;case"]":r="[";break;default:return!1}var i=t.indexOf(r);return i<0?!1:t.slice(i+1,-1).includes(Uy)}function ice(t){return/\([^()]+$/.test(t)||t[0]==="{"||t[0]==="["||/[^\\][{[]/.test(t)?!0:Yue(t)}});var xj=v((Bxe,Ej)=>{"use strict";Ej.exports=function(){return/^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/}});var Cj=v((Fxe,Lj)=>{"use strict";var nce=xj()();Lj.exports=function(t){if(typeof t!="string")throw new TypeError("expected a string");return nce.test(t)}});var Dj=v((Uxe,Pj)=>{"use strict";var sce=Cj();Pj.exports=function(e){if(typeof e!="string")throw new TypeError("expected filepath to be a string");return!sce(e)&&!/^([a-z]:)?[\\\/]/i.test(e)}});var Tj=v((KS,XS)=>{(function(t){KS&&typeof KS=="object"&&typeof XS<"u"?XS.exports=t():typeof define=="function"&&define.amd?define([],t):typeof window<"u"?window.isWindows=t():typeof global<"u"?global.isWindows=t():typeof self<"u"?self.isWindows=t():this.isWindows=t()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var Mj=v((jxe,$j)=>{"use strict";var oce=Dj(),ace=Tj();$j.exports=Fd;function Fd(t){if(typeof t!="string")throw new TypeError("isAbsolute expects a string.");return ace()?Fd.win32(t):Fd.posix(t)}Fd.posix=function(e){return e.charAt(0)==="/"};Fd.win32=function(e){return/[a-z]/i.test(e.charAt(0))&&e.charAt(1)===":"&&e.charAt(2)==="\\"||e.slice(0,2)==="\\\\"?!0:!oce(e)}});var JS=v((qxe,Nj)=>{"use strict";var kj=w("path"),uce=SS(),Rj=Mj();Nj.exports=function(t,e){var r=e||{},i=kj.resolve(r.cwd?r.cwd:process.cwd());i=zS(i);var n=r.root;n&&(n=zS(n),(process.platform==="win32"||!Rj(n))&&(n=zS(kj.resolve(n)))),t.slice(0,2)==="./"&&(t=t.slice(2)),t.length===1&&t==="."&&(t="");var s=t.slice(-1),o=uce(t);return t=o.pattern,n&&t.charAt(0)==="/"?t=Oj(n,t):(!Rj(t)||t.slice(0,1)==="\\")&&(t=Oj(i,t)),s==="/"&&t.slice(-1)!=="/"&&(t+="/"),o.negated?"!"+t:t};function zS(t){return t.replace(/\\/g,"/")}function Oj(t,e){return t.charAt(t.length-1)==="/"&&(t=t.slice(0,-1)),e.charAt(0)==="/"&&(e=e.slice(1)),e?t+"/"+e:t}});var Fj=v((Wxe,Bj)=>{var cce=process.platform==="win32";Bj.exports=function(t){var e=t.length-1;if(e<2)return t;for(;lce(t,e);)e--;return t.substr(0,e+1)};function lce(t,e){var r=t[e];return e>0&&(r==="/"||cce&&r==="\\")}});var qj=v((Vxe,jj)=>{"use strict";var pce=w("util").inherits,fce=US(),dce=ES(),Uj=wS().Readable,hce=Sj(),YS=JS(),mce=Fj(),Hce="File not found with singular glob: ",gce=" (if this was purposeful, use `allowEmpty` option)";function yce(t,e){return hce(YS(t,e))}function bce(t){var e=t.minimatch.set;return e.length!==1?!1:e[0].every(function(i){return typeof i=="string"})}function Fl(t,e,r){if(!(this instanceof Fl))return new Fl(t,e,r);var i=dce({},r);Uj.call(this,{objectMode:!0,highWaterMark:i.highWaterMark||16}),delete i.highWaterMark;var n=this;function s(H){return YS(H,i)}var o=e.map(s);i.ignore=o;var a=i.cwd,u=i.allowEmpty||!1,c=i.base||yce(t,i);t=YS(t,i),delete i.root;var l=new fce.Glob(t,i);this._globber=l;var p=!1;l.on("match",function(H){p=!0;var m={cwd:a,base:c,path:mce(H)};n.push(m)||l.pause()}),l.once("end",function(){if(u!==!0&&!p&&bce(l)){var H=new Error(Hce+t+gce);return n.destroy(H)}n.push(null)});function f(H){n.destroy(H)}l.once("error",f)}pce(Fl,Uj);Fl.prototype._read=function(){this._globber.resume()};Fl.prototype.destroy=function(t){var e=this;this._globber.abort(),process.nextTick(function(){t&&e.emit("error",t),e.emit("close")})};jj.exports=Fl});var Vj=v((Gxe,Wj)=>{"use strict";var vce=h2(),_ce=f3(),wce=IU(),Ace=SS(),Ice=ES(),Sce=qj();function Ece(t,e){e||(e={});var r=Ice({},e),i=r.ignore;r.cwd=typeof r.cwd=="string"?r.cwd:process.cwd(),r.dot=typeof r.dot=="boolean"?r.dot:!1,r.silent=typeof r.silent=="boolean"?r.silent:!0,r.cwdbase=typeof r.cwdbase=="boolean"?r.cwdbase:!1,r.uniqueBy=typeof r.uniqueBy=="string"||typeof r.uniqueBy=="function"?r.uniqueBy:"path",r.cwdbase&&(r.base=r.cwd),typeof i=="string"&&(i=[i]),Array.isArray(i)||(i=[]),Array.isArray(t)||(t=[t]);var n=[],s=[];t.forEach(o);function o(p,f){if(typeof p!="string")throw new Error("Invalid glob at index "+f);var H=Ace(p),m=H.negated?s:n;m.push({index:f,glob:H.pattern})}if(n.length===0)throw new Error("Missing positive glob");var a=n.map(l),u=new vce(a),c=_ce(r.uniqueBy);return wce.obj(u,c);function l(p){var f=s.filter(xce(p.index)).map(Lce).concat(i);return new Sce(p.glob,f,r)}}function xce(t){return function(e){return e.index>t}}function Lce(t){return t.glob}Wj.exports=Ece});var zy=v((tCe,nq)=>{"use strict";var{Transform:$ce}=w("stream"),{StringDecoder:Mce}=w("string_decoder"),ua=Symbol("last"),Xy=Symbol("decoder");function kce(t,e,r){let i;if(this.overflow){if(i=this[Xy].write(t).split(this.matcher),i.length===1)return r();i.shift(),this.overflow=!1}else this[ua]+=this[Xy].write(t),i=this[ua].split(this.matcher);this[ua]=i.pop();for(let n=0;n<i.length;n++)try{iq(this,this.mapper(i[n]))}catch(s){return r(s)}if(this.overflow=this[ua].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function Rce(t){if(this[ua]+=this[Xy].end(),this[ua])try{iq(this,this.mapper(this[ua]))}catch(e){return t(e)}t()}function iq(t,e){e!==void 0&&t.push(e)}function rq(t){return t}function Oce(t,e,r){switch(t=t||/\r?\n/,e=e||rq,r=r||{},arguments.length){case 1:typeof t=="function"?(e=t,t=/\r?\n/):typeof t=="object"&&!(t instanceof RegExp)&&(r=t,t=/\r?\n/);break;case 2:typeof t=="function"?(r=e,e=t,t=/\r?\n/):typeof e=="object"&&(r=e,e=rq)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=kce,r.flush=Rce,r.readableObjectMode=!0;let i=new $ce(r);return i[ua]="",i[Xy]=new Mce("utf8"),i.matcher=t,i.mapper=e,i.maxLength=r.maxLength,i.skipOverflow=r.skipOverflow||!1,i.overflow=!1,i._destroy=function(n,s){this._writableState.errorEmitted=!1,s(n)},i}nq.exports=Oce});var Eq,Sq=iW(()=>{Eq="./w32appcontainertokens-XTRA77NA.node"});var Lq=v((EDe,xq)=>{Sq();try{xq.exports=w(Eq)}catch{}});var Pq=v(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0});rb.getAppContainerProcessTokens=void 0;var qce=w("path"),Cq,Wce=()=>{if(process.platform==="win32")return Cq??=Lq(),Cq},Vce=t=>{var e;return(e=Wce())==null?void 0:e.getAppContainerProcessTokens().map(r=>(0,qce.join)(r,t))};rb.getAppContainerProcessTokens=Vce});var zq=v((S$e,hb)=>{var Zce=w("fs"),Xq=w("path"),ele=w("os"),tle=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function rle(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,`
`);let i;for(;(i=tle.exec(r))!=null;){let n=i[1],s=i[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function fE(t){console.log(`[dotenv][DEBUG] ${t}`)}function ile(t){return t[0]==="~"?Xq.join(ele.homedir(),t.slice(1)):t}function nle(t){let e=Xq.resolve(process.cwd(),".env"),r="utf8",i=Boolean(t&&t.debug),n=Boolean(t&&t.override);t&&(t.path!=null&&(e=ile(t.path)),t.encoding!=null&&(r=t.encoding));try{let s=db.parse(Zce.readFileSync(e,{encoding:r}));return Object.keys(s).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?(n===!0&&(process.env[o]=s[o]),i&&fE(n===!0?`"${o}" is already defined in \`process.env\` and WAS overwritten`:`"${o}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[o]=s[o]}),{parsed:s}}catch(s){return i&&fE(`Failed to load ${e} ${s.message}`),{error:s}}}var db={config:nle,parse:rle};hb.exports.config=db.config;hb.exports.parse=db.parse;hb.exports=db});var $b=F(Ct()),J8=F(w("fs")),Y8=F(w("net")),Q8=F(w("os")),Mb=F(w("path"));var PE;(function(t){(function(e){var r=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),i=n(t);typeof r.Reflect>"u"?r.Reflect=t:i=n(r.Reflect,i),e(i);function n(s,o){return function(a,u){typeof s[a]!="function"&&Object.defineProperty(s,a,{configurable:!0,writable:!0,value:u}),o&&o(a,u)}}})(function(e){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",n=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",a={__proto__:[]}instanceof Array,u=!o&&!a,c={create:o?function(){return Ri(Object.create(null))}:a?function(){return Ri({__proto__:null})}:function(){return Ri({})},has:u?function(d,g){return r.call(d,g)}:function(d,g){return g in d},get:u?function(d,g){return r.call(d,g)?d[g]:void 0}:function(d,g){return d[g]}},l=Object.getPrototypeOf(Function),p=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",f=!p&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:th(),H=!p&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:kb(),m=!p&&typeof WeakMap=="function"?WeakMap:ve(),y=new m;function b(d,g,_,I){if(ie(_)){if(!Ce(d))throw new TypeError;if(!ge(g))throw new TypeError;return R(d,g)}else{if(!Ce(d))throw new TypeError;if(!He(g))throw new TypeError;if(!He(I)&&!ie(I)&&!de(I))throw new TypeError;return de(I)&&(I=void 0),_=Q(_),S(d,g,_,I)}}e("decorate",b);function A(d,g){function _(I,T){if(!He(I))throw new TypeError;if(!ie(T)&&!Ne(T))throw new TypeError;ee(d,g,I,T)}return _}e("metadata",A);function B(d,g,_,I){if(!He(_))throw new TypeError;return ie(I)||(I=Q(I)),ee(d,g,_,I)}e("defineMetadata",B);function q(d,g,_){if(!He(g))throw new TypeError;return ie(_)||(_=Q(_)),O(d,g,_)}e("hasMetadata",q);function L(d,g,_){if(!He(g))throw new TypeError;return ie(_)||(_=Q(_)),z(d,g,_)}e("hasOwnMetadata",L);function D(d,g,_){if(!He(g))throw new TypeError;return ie(_)||(_=Q(_)),C(d,g,_)}e("getMetadata",D);function G(d,g,_){if(!He(g))throw new TypeError;return ie(_)||(_=Q(_)),P(d,g,_)}e("getOwnMetadata",G);function W(d,g){if(!He(d))throw new TypeError;return ie(g)||(g=Q(g)),te(d,g)}e("getMetadataKeys",W);function N(d,g){if(!He(d))throw new TypeError;return ie(g)||(g=Q(g)),se(d,g)}e("getOwnMetadataKeys",N);function M(d,g,_){if(!He(g))throw new TypeError;ie(_)||(_=Q(_));var I=$(g,_,!1);if(ie(I)||!I.delete(d))return!1;if(I.size>0)return!0;var T=y.get(g);return T.delete(_),T.size>0||y.delete(g),!0}e("deleteMetadata",M);function R(d,g){for(var _=d.length-1;_>=0;--_){var I=d[_],T=I(g);if(!ie(T)&&!de(T)){if(!ge(T))throw new TypeError;g=T}}return g}function S(d,g,_,I){for(var T=d.length-1;T>=0;--T){var k=d[T],j=k(g,_,I);if(!ie(j)&&!de(j)){if(!He(j))throw new TypeError;I=j}}return I}function $(d,g,_){var I=y.get(d);if(ie(I)){if(!_)return;I=new f,y.set(d,I)}var T=I.get(g);if(ie(T)){if(!_)return;T=new f,I.set(g,T)}return T}function O(d,g,_){var I=z(d,g,_);if(I)return!0;var T=$u(g);return de(T)?!1:O(d,T,_)}function z(d,g,_){var I=$(g,_,!1);return ie(I)?!1:yr(I.has(d))}function C(d,g,_){var I=z(d,g,_);if(I)return P(d,g,_);var T=$u(g);if(!de(T))return C(d,T,_)}function P(d,g,_){var I=$(g,_,!1);if(!ie(I))return I.get(d)}function ee(d,g,_,I){var T=$(_,I,!0);T.set(d,g)}function te(d,g){var _=se(d,g),I=$u(d);if(I===null)return _;var T=te(I,g);if(T.length<=0)return _;if(_.length<=0)return T;for(var k=new H,j=[],V=0,U=_;V<U.length;V++){var ne=U[V],le=k.has(ne);le||(k.add(ne),j.push(ne))}for(var me=0,De=T;me<De.length;me++){var ne=De[me],le=k.has(ne);le||(k.add(ne),j.push(ne))}return j}function se(d,g){var _=[],I=$(d,g,!1);if(ie(I))return _;for(var T=I.keys(),k=mt(T),j=0;;){var V=Ks(k);if(!V)return _.length=j,_;var U=Gs(V);try{_[j]=U}catch(ne){try{va(k)}finally{throw ne}}j++}}function oe(d){if(d===null)return 1;switch(typeof d){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return d===null?1:6;default:return 6}}function ie(d){return d===void 0}function de(d){return d===null}function we(d){return typeof d=="symbol"}function He(d){return typeof d=="object"?d!==null:typeof d=="function"}function Lt(d,g){switch(oe(d)){case 0:return d;case 1:return d;case 2:return d;case 3:return d;case 4:return d;case 5:return d}var _=g===3?"string":g===5?"number":"default",I=lt(d,n);if(I!==void 0){var T=I.call(d,_);if(He(T))throw new TypeError;return T}return be(d,_==="default"?"number":_)}function be(d,g){if(g==="string"){var _=d.toString;if(Y(_)){var I=_.call(d);if(!He(I))return I}var T=d.valueOf;if(Y(T)){var I=T.call(d);if(!He(I))return I}}else{var T=d.valueOf;if(Y(T)){var I=T.call(d);if(!He(I))return I}var k=d.toString;if(Y(k)){var I=k.call(d);if(!He(I))return I}}throw new TypeError}function yr(d){return!!d}function Vr(d){return""+d}function Q(d){var g=Lt(d,3);return we(g)?g:Vr(g)}function Ce(d){return Array.isArray?Array.isArray(d):d instanceof Object?d instanceof Array:Object.prototype.toString.call(d)==="[object Array]"}function Y(d){return typeof d=="function"}function ge(d){return typeof d=="function"}function Ne(d){switch(oe(d)){case 3:return!0;case 4:return!0;default:return!1}}function lt(d,g){var _=d[g];if(_!=null){if(!Y(_))throw new TypeError;return _}}function mt(d){var g=lt(d,s);if(!Y(g))throw new TypeError;var _=g.call(d);if(!He(_))throw new TypeError;return _}function Gs(d){return d.value}function Ks(d){var g=d.next();return g.done?!1:g}function va(d){var g=d.return;g&&g.call(d)}function $u(d){var g=Object.getPrototypeOf(d);if(typeof d!="function"||d===l||g!==l)return g;var _=d.prototype,I=_&&Object.getPrototypeOf(_);if(I==null||I===Object.prototype)return g;var T=I.constructor;return typeof T!="function"||T===d?g:T}function th(){var d={},g=[],_=function(){function j(V,U,ne){this._index=0,this._keys=V,this._values=U,this._selector=ne}return j.prototype["@@iterator"]=function(){return this},j.prototype[s]=function(){return this},j.prototype.next=function(){var V=this._index;if(V>=0&&V<this._keys.length){var U=this._selector(this._keys[V],this._values[V]);return V+1>=this._keys.length?(this._index=-1,this._keys=g,this._values=g):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},j.prototype.throw=function(V){throw this._index>=0&&(this._index=-1,this._keys=g,this._values=g),V},j.prototype.return=function(V){return this._index>=0&&(this._index=-1,this._keys=g,this._values=g),{value:V,done:!0}},j}();return function(){function j(){this._keys=[],this._values=[],this._cacheKey=d,this._cacheIndex=-2}return Object.defineProperty(j.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),j.prototype.has=function(V){return this._find(V,!1)>=0},j.prototype.get=function(V){var U=this._find(V,!1);return U>=0?this._values[U]:void 0},j.prototype.set=function(V,U){var ne=this._find(V,!0);return this._values[ne]=U,this},j.prototype.delete=function(V){var U=this._find(V,!1);if(U>=0){for(var ne=this._keys.length,le=U+1;le<ne;le++)this._keys[le-1]=this._keys[le],this._values[le-1]=this._values[le];return this._keys.length--,this._values.length--,V===this._cacheKey&&(this._cacheKey=d,this._cacheIndex=-2),!0}return!1},j.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=d,this._cacheIndex=-2},j.prototype.keys=function(){return new _(this._keys,this._values,I)},j.prototype.values=function(){return new _(this._keys,this._values,T)},j.prototype.entries=function(){return new _(this._keys,this._values,k)},j.prototype["@@iterator"]=function(){return this.entries()},j.prototype[s]=function(){return this.entries()},j.prototype._find=function(V,U){return this._cacheKey!==V&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=V)),this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(V),this._values.push(void 0)),this._cacheIndex},j}();function I(j,V){return j}function T(j,V){return V}function k(j,V){return[j,V]}}function kb(){return function(){function d(){this._map=new f}return Object.defineProperty(d.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),d.prototype.has=function(g){return this._map.has(g)},d.prototype.add=function(g){return this._map.set(g,g),this},d.prototype.delete=function(g){return this._map.delete(g)},d.prototype.clear=function(){this._map.clear()},d.prototype.keys=function(){return this._map.keys()},d.prototype.values=function(){return this._map.values()},d.prototype.entries=function(){return this._map.entries()},d.prototype["@@iterator"]=function(){return this.keys()},d.prototype[s]=function(){return this.keys()},d}()}function ve(){var d=16,g=c.create(),_=I();return function(){function U(){this._key=I()}return U.prototype.has=function(ne){var le=T(ne,!1);return le!==void 0?c.has(le,this._key):!1},U.prototype.get=function(ne){var le=T(ne,!1);return le!==void 0?c.get(le,this._key):void 0},U.prototype.set=function(ne,le){var me=T(ne,!0);return me[this._key]=le,this},U.prototype.delete=function(ne){var le=T(ne,!1);return le!==void 0?delete le[this._key]:!1},U.prototype.clear=function(){this._key=I()},U}();function I(){var U;do U="@@WeakMap@@"+V();while(c.has(g,U));return g[U]=!0,U}function T(U,ne){if(!r.call(U,_)){if(!ne)return;Object.defineProperty(U,_,{value:c.create()})}return U[_]}function k(U,ne){for(var le=0;le<ne;++le)U[le]=Math.random()*255|0;return U}function j(U){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(U)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(U)):k(new Uint8Array(U),U):k(new Array(U),U)}function V(){var U=j(d);U[6]=U[6]&79|64,U[8]=U[8]&191|128;for(var ne="",le=0;le<d;++le){var me=U[le];(le===4||le===6||le===8)&&(ne+="-"),me<16&&(ne+="0"),ne+=me.toString(16).toLowerCase()}return ne}}function Ri(d){return d.__=void 0,delete d.__,d}})})(PE||(PE={}));var Ii=F(Ct());var vt=t=>!!t,ku=t=>nh(t,e=>e!==null),DE=t=>nh(t,e=>e!==void 0),_a=t=>e=>e instanceof t,ih=(t,e)=>{debugger;throw new Error(e.replace("{value}",JSON.stringify(t)))};function nh(t,e){let r={};for(let i of Object.keys(t)){let n=t[i];e(n,i)&&(r[i]=n)}return r}function as(t,e){let r={};for(let i of Object.keys(t)){let n=t[i];r[i]=e(n,i)}return r}function TE(t,e){let r={};for(let i of Object.keys(t))e(i,t[i])&&(r[i]=t[i]);return r}function $E(...t){if(t.length===0)return{};let e={},r=Object.create(null);for(let i of t)if(i)for(let n of Object.keys(i)){let s=n.toLowerCase();r[s]?e[r[s]]=i[n]:(r[s]=n,e[n]=i[n])}return e}function ME(t,e){if(t.hasOwnProperty(e))return t[e];let r=e.toLowerCase();for(let i of Object.keys(t))if(i.toLowerCase()===r)return t[i]}var Bb=Symbol("unset");function Be(t){let e=Bb,r=(...i)=>(e===Bb&&(r.value=e=t(...i)),e);return r.forget=()=>{e=Bb,r.value=void 0},r.value=void 0,r}function wa(t){let e=new Map,r=i=>{if(e.has(i))return e.get(i);let n=t(i);return e.set(i,n),n};return r.clear=()=>e.clear(),r}function kE(t){let e,r=i=>((e==null?void 0:e.arg)===i||(e={arg:i,val:t(i)}),e.val);return r.clear=()=>e=void 0,r}function RE(t,e){let r,i=()=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e()},t)};return i.clear=()=>{r&&(clearTimeout(r),r=void 0)},i}function OE(t,e){let r,i=()=>{r===void 0&&(r=setTimeout(()=>{r=void 0,e()},t))};return i.queued=()=>!!r,i.clear=()=>{r&&(clearTimeout(r),r=void 0)},i}function NE(t,e){let r=[],i=[];for(let n of t)e(n)?r.push(n):i.push(n);return[r,i]}function yp(t){let e=[];for(let r of t)e=e.concat(r);return e}var _W=2**31-1,sh=()=>{let t=0;return()=>t++&_W};var Ru={dispose:()=>{}},Je=class{constructor(e){this.disposed=!1;this.items=[];e&&(this.items=e.slice())}get isDisposed(){return this.disposed}callback(...e){for(let r of e)this.push({dispose:r})}push(...e){return this.disposed?(e.forEach(r=>r.dispose()),e[0]):(this.items.push(...e),e[0])}disposeObject(e){this.items=this.items.filter(r=>r!==e),e.dispose()}dispose(){let e=Promise.all(this.items.map(r=>r.dispose()));return this.items=[],this.disposed=!0,e}};var FE=w("crypto"),UE=w("os"),jE=F(w("path"));var bp=w("fs"),BE=w("path"),ah=w("zlib"),wW=(t,e)=>e instanceof Error?{message:e.message,stack:e.stack}:typeof e=="bigint"?e.toString():e,oh=class{constructor(e,r){this.file=e;this.dap=r;try{(0,bp.mkdirSync)((0,BE.dirname)(e),{recursive:!0})}catch{}e.endsWith(".gz")?(this.stream=(0,ah.createGzip)(),this.stream.pipe((0,bp.createWriteStream)(e))):this.stream=(0,bp.createWriteStream)(e)}async setup(){var e;(e=this.dap)==null||e.output({category:"console",output:`Verbose logs are written to:
${this.file}
`})}dispose(){this.stream&&(this.stream.end(),this.stream=void 0)}write(e){var r,i;this.stream&&(this.stream.write(JSON.stringify(e,wW)+`
`),(i=(r=this.stream).flush)==null||i.call(r,ah.constants.Z_SYNC_FLUSH))}};var AW={["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},Rle=Object.keys(AW),pe=Symbol("ILogger");function IW(t,e=(0,UE.tmpdir)()){if(t===!1)return{stdio:!1,logFile:null};let r={stdio:!0,logFile:jE.join(e,`vscode-debugadapter-${(0,FE.randomBytes)(4).toString("hex")}.json.gz`)};return t===!0?r:{...r,...t}}function qE(t,e){let r=IW(e),i={sinks:[]};return r.logFile&&i.sinks.push(new oh(r.logFile,t)),i}var Ou=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return this}get base1(){return new Kr(this.lineNumber+1,this.columnNumber+1)}get base01(){return new Nu(this.lineNumber,this.columnNumber+1)}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}},Kr=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return new Ou(this.lineNumber-1,this.columnNumber-1)}get base1(){return this}get base01(){return new Nu(this.lineNumber-1,this.columnNumber)}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}},Nu=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return new Ou(this.lineNumber-1,this.columnNumber)}get base1(){return new Kr(this.lineNumber,this.columnNumber+1)}get base01(){return this}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}};var Me=t=>isFinite(t)?new Promise(e=>setTimeout(e,t)):new Promise(()=>{}),WE=(t,e)=>{let r=setTimeout(t,e);return{dispose:()=>clearTimeout(r)}};function Bu(t){return new Promise((e,r)=>{let i=t.length;for(let n of t)n.then(s=>{s?(e(s),i=-1):--i===0&&e(void 0)}).catch(r)})}function Xe(){let t=null,e=null,r=!1,i,n=new Promise((s,o)=>{t=a=>{r=!0,i=a,s(a)},e=a=>{r=!0,o(a)}});return{resolve:t,reject:e,promise:n,get settledValue(){return i},hasSettled:()=>r}}var lf=F(ue());var KT=F(Ct()),Ki=F(ue()),XT=F(yv()),zT=w("path"),K_=F(Gh()),JT=w("url");var Kh=class{constructor(e,r){this.key=e;this.value=r}toString(){return`${this.key}: ${this.value}`}},xn=class{constructor(e,r){this.projection=e;this.initialContents=r;let i=Array.from(r||[]).map(n=>[this.projection(n[0]),new Kh(n[0],n[1])]);this.projectionToKeyAndValue=new Map(i)}clear(){this.projectionToKeyAndValue.clear()}delete(e){let r=this.projection(e);return this.projectionToKeyAndValue.delete(r)}forEach(e,r){this.projectionToKeyAndValue.forEach(i=>{e.call(r,i.value,i.key,this)},r)}get(e){let r=this.projection(e),i=this.projectionToKeyAndValue.get(r);return i?i.value:void 0}has(e){return this.projectionToKeyAndValue.has(this.projection(e))}set(e,r){return this.projectionToKeyAndValue.set(this.projection(e),new Kh(e,r)),this}get size(){return this.projectionToKeyAndValue.size}*entries(){for(let e of this.projectionToKeyAndValue.values())yield[e.key,e.value]}*keys(){for(let e of this.projectionToKeyAndValue.values())yield e.key}*values(){for(let e of this.projectionToKeyAndValue.values())yield e.value}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return JSON.stringify(Array.from(this.entries()))}toString(){return`MapUsingProjection<${JSON.stringify([...this.entries()])}>`}};var J=class{constructor(){this._listeners=new Set;this.event=(e,r,i)=>{let n={listener:e,thisArg:r};this._listeners.add(n);let s={dispose:()=>{s.dispose=()=>{},this._listeners.delete(n)}};return i&&i.push(s),s}}get size(){return this._listeners.size}fire(e){let r=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(let i of this._listeners)this._deliveryQueue.push({data:i,event:e});if(r){for(let i=0;i<this._deliveryQueue.length;i++){let{data:n,event:s}=this._deliveryQueue[i];n.listener.call(n.thisArg,s)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}},Dp=class{constructor(){this.map=new Map;this.listeners=this.map}listen(e,r){let i=this.map.get(e);i||(i=new J,this.map.set(e,i));let n=i.event(r);return{dispose:Be(()=>{n.dispose(),(i==null?void 0:i.size)===0&&this.map.delete(e)})}}emit(e,r){var i;(i=this.listeners.get(e))==null||i.fire(r)}};var iC=w("path"),nC=w("worker_threads");var xa=F(eC()),kv=w("fs"),Rv=w("worker_threads");var i9=Buffer.from("(function (exports, require, module, __filename, __dirname) { "),n9=Buffer.from(`
});`),s9=Buffer.from("(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { "),o9=Buffer.from(`
}.call(this, exports, require, module, __filename, __dirname); });`),a9=Buffer.from("#!"),u9=Buffer.from("\r")[0],c9=Buffer.from(`
`)[0],l9=(t,e)=>t.slice(0,e.length).equals(e),tC=(t,e,r)=>{let i=e.length===64?xa.shaHash:xa.hash;if(i(t)===e)return!0;if(r){if(l9(t,a9)){let n=t.indexOf(c9);return t[n-1]===u9&&n--,i(t.slice(n))===e}if(i(Buffer.concat([i9,t,n9]))===e)return!0}return i(Buffer.concat([s9,t,o9]))===e},rC=t=>t instanceof Buffer?t:Buffer.from(t,"utf-8");async function p9(t){switch(t.type){case 0:try{let e=await kv.promises.readFile(t.file);return{id:t.id,hash:t.mode===0?(0,xa.hash)(e):(0,xa.shaHash)(e)}}catch{return{id:t.id}}case 1:try{return{id:t.id,hash:(0,xa.hash)(rC(t.data))}}catch{return{id:t.id}}case 2:try{let e=await kv.promises.readFile(t.file);return{id:t.id,matches:tC(e,t.expected,t.checkNode)}}catch{return{id:t.id,matches:!1}}case 3:try{return{id:t.id,matches:tC(rC(t.data),t.expected,t.checkNode)}}catch{return{id:t.id,matches:!1}}}}function f9(t){t.on("message",e=>{p9(e).then(r=>t.postMessage(r))})}Rv.parentPort&&f9(Rv.parentPort);var em=class{constructor(e=3,r=(0,iC.join)(__dirname,"hash.js")){this.maxFailures=e;this.hasherScriptPath=r;this.idCounter=0;this.failureCount=0;this.deferredMap=new Map;this.deferCleanup=RE(3e4,()=>this.cleanup())}async hashBytes(e,r){return(await this.send({type:1,data:r,mode:e,id:this.idCounter++})).hash}async hashFile(e,r){return(await this.send({type:0,file:r,mode:e,id:this.idCounter++})).hash}async verifyBytes(e,r,i){return(await this.send({type:3,data:e,id:this.idCounter++,expected:r,checkNode:i})).matches}async verifyFile(e,r,i){return(await this.send({type:2,file:e,id:this.idCounter++,expected:r,checkNode:i})).matches}dispose(){this.cleanup(),this.deferCleanup.clear()}send(e){let r=this.getProcess();if(!r)throw new Error("hash.js process unexpectedly exited");this.deferCleanup();let i=Xe();return this.deferredMap.set(e.id,{deferred:i,request:e}),r.postMessage(e),i.promise}cleanup(){this.instance&&(this.instance.removeAllListeners("exit"),this.instance.terminate(),this.instance=void 0,this.failureCount=0)}getProcess(){if(this.instance)return this.instance;if(this.failureCount>this.maxFailures)return;let e=this.instance=new nC.Worker(this.hasherScriptPath);return e.setMaxListeners(1/0),e.on("message",r=>{let i=r,n=this.deferredMap.get(i.id);n&&(n.deferred.resolve(i),this.deferredMap.delete(i.id))}),e.on("exit",()=>{this.instance=void 0,this.failureCount++;let r=this.getProcess();if(r){this.deferCleanup();for(let{request:i}of this.deferredMap.values())r.postMessage(i)}else{for(let{deferred:i}of this.deferredMap.values())i.reject(new Error("hash.js process unexpectedly exited"));this.deferredMap.clear(),this.deferCleanup.clear()}}),e}};var Cn=F(w("fs")),sC=F(w("util"));async function ec({access:t},e){if(!e)return!1;try{return await t(e),!0}catch{return!1}}async function eo({stat:t},e){if(e)try{return await t(e)}catch{return}}function oC(t){return new Promise(e=>{Cn.stat(t,(r,i)=>e(r?void 0:i))})}function aC(t){return new Promise(e=>{Cn.readFile(t,"utf8",async(r,i)=>{e(r?"":i)})})}var yfe=sC.promisify(Cn.writeFile);var Or=Symbol("FsUtils"),Ui=class{constructor(e){this.fs=e}realPath(e){return this.fs.realpath(e)}async exists(e){try{return await this.fs.access(e,Cn.constants.F_OK),!0}catch{return!1}}readFile(e){return this.fs.readFile(e)}},Ov=class{constructor(e){this.dap=e}async realPath(){throw new Error("not implemented")}async exists(e){try{let{doesExists:r}=await this.dap.remoteFileExistsRequest({localFilePath:e});return r}catch{return!1}}readFile(){throw new Error("not implemented")}},tm=class{constructor(e,r,i){this.remoteFilePrefix=e;this.localFsUtils=r;this.remoteFsUtils=i}static create(e,r,i){let n=new Ui(r);return e!==void 0?new this(e.toLowerCase(),n,new Ov(i)):n}async exists(e){return this.selectFs(e).exists(e)}async readFile(e){return this.selectFs(e).readFile(e)}async realPath(e){return this.selectFs(e).realPath(e)}selectFs(e){return e.toLowerCase().startsWith(this.remoteFilePrefix)?this.remoteFsUtils:this.localFsUtils}};var WP=w("crypto"),VP=F(s_()),GP=w("os"),ke=F(w("path"));var lX=process.platform==="win32"?"\\\\.\\pipe\\":(0,GP.tmpdir)(),pX=0,KP=()=>ke.join(lX,`node-cdp.${process.pid}-${(0,WP.randomBytes)(4).toString("hex")}-${pX++}.sock`);async function dm(t,e,r){let i;if(process.platform==="win32"){let n=r.WINDIR||"C:\\Windows";i=ke.join(n,"System32","where.exe")}else i="/usr/bin/which";try{if(await eo(t,i)){let s=(await(0,VP.default)(i,[e],{env:ku(r)})).stdout.split(/\r?\n/);if(process.platform==="win32"){let o=String(r.PATHEXT||".exe").toUpperCase().split(";");for(let a of s){let u=ke.extname(a).toUpperCase();if(u&&o.includes(u))return a}}else if(s.length>0)return s[0];return}return e}catch{}}async function XP(t,e,r){if(e){if(process.platform==="win32"&&!ke.extname(e)){let i=r.lookup("PATHEXT");if(i){let n=i.split(";");for(let s of n){let o=e+s;if(await eo(t,o))return o}}}if(await eo(t,e))return e}}var zP=t=>t.includes(`.asar${ke.sep}`);function to(...t){return ke.posix.isAbsolute(t[0])?Ye(ke.posix.join(...t)):ke.win32.isAbsolute(t[0])?ke.win32.join(...t):ke.join(...t)}function Xr(...t){return ke.posix.isAbsolute(t[0])?ke.posix.resolve(...t):ke.win32.isAbsolute(t[0])?ke.win32.resolve(...t):ke.resolve(...t)}function Fp(t,e){return ke.posix.isAbsolute(t)?ke.posix.relative(t,e):ke.win32.isAbsolute(t)?ke.win32.relative(t,e):ke.relative(t,e)}var fX=/\/|\\/,o_=t=>t.split(fX);function a_(t,e=!1){return t&&(t.match(/file:\/\/\/[A-Za-z]:/)?t="file:///"+t[8].toLowerCase()+t.substr(8+1):hm(t)&&(t=(e?t[0].toUpperCase():t[0].toLowerCase())+t.substr(1)),t)}function wt(t,e=!1){return t&&(t=a_(t,e),t.match(/file:\/\/\/[A-Za-z]:/)?t=t.substr(0,8+1)+t.substr(8+1).replace(/\//g,"\\"):hm(t)&&(t=t.replace(/\//g,"\\")),t)}function Ye(t){return t.replace(/\\\//g,"/").replace(/\\/g,"/")}var JP=(t,e)=>{let r=ke.relative(t,e);return r.length&&!ke.isAbsolute(r)&&!r.startsWith("..")},YP=(t,e)=>{let r=ke.relative(t,e);return!ke.isAbsolute(r)&&!r.startsWith("..")},u_=t=>t.startsWith("\\\\"),hm=t=>/^[A-Za-z]:/.test(t)||u_(t);var ZP=w("fs"),QP=new em;async function eD(t,e,r){return!t||zP(t)?void 0:e?(typeof r=="string"?await QP.verifyBytes(r,e,!0):await QP.verifyFile(t,e,!0))?t:void 0:await new Ui(ZP.promises).exists(t)?t:void 0}var fo=F(ue()),TT=F(Gh());var mm=class extends Error{constructor(r,i,n){super(`Unexpected ${r} response from ${i}: ${n??"<empty body>"}`);this.statusCode=r;this.url=i;this.body=n}},La=Symbol("IResourceProvider");var pt=F(Ct());var re=class extends Error{constructor(r){super("__errorMarker"in r?r.error.format:r.format);this._cause="__errorMarker"in r?r.error:r}get cause(){return this._cause}};function tD(t,e){t.output({category:"console",output:e+`
`})}function Qe(t,e=9222){return{__errorMarker:!0,error:{id:e,format:t,showUser:!1}}}function Ze(t,e=9223){return{__errorMarker:!0,error:{id:e,format:t,showUser:!0}}}var c_=()=>Ze(pt.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvs' or 'nvm' to be installed."),9224),rD=()=>Ze(pt.t("Attribute 'runtimeVersion' with a flavor/architecture requires 'nvs' to be installed."),9225),iD=()=>Ze(pt.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvm-windows' or 'nvs'."),9226),l_=(t,e)=>Ze(pt.t("Node.js version '{0}' not installed using version manager {1}.",t,e),9226),nD=t=>Ze(pt.t("Cannot launch debug target in terminal ({0}).",t),9227),sD=t=>Ze(pt.t("Can't load environment variables from file ({0}).",t),9228),oD=t=>Ze(pt.t("The configured `cwd` {0} does not exist.",t),9245),p_=(t,e)=>Ze(pt.t(`Can't find Node.js binary "{0}": {1}. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json`,t,e),9229),aD=(t,e)=>Ze(pt.t('The Node version in "{0}" is outdated (version {1}), we require at least Node 8.x.',e,t),9230),uD=t=>Ze(pt.t('Invalid hit condition "{0}". Expected an expression like "> 42" or "== 2".',t),9231),ac=()=>Ze(pt.t("An error occurred taking a profile from the target."),9235),cD=()=>Ze(pt.t("Please stop the running profile before starting a new one."),9236),lD=t=>Qe(t,9238),Hm=(t,e,r)=>Ze(e==="*"&&!r.length?pt.t('Unable to find an installation of the browser on your system. Try installing it, or providing an absolute path to the browser in the "runtimeExecutable" in your launch.json.'):pt.t('Unable to find {0} version {1}. Available auto-discovered versions are: {2}. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable.',t,e,JSON.stringify([...new Set(r)])),9233),pD=t=>Ze(pt.t('Unable to launch browser: "{0}"',t.message),9240),Up=t=>Ze(t??pt.t("Unable to attach to browser"),9242),gm=()=>Ze(pt.t('Target page not found. You may need to update your "urlFilter" to match the page you want to debug.'),9241);var fD=()=>Qe(pt.t("Variables not available in async stacks"),9234),ro=(t,e)=>Ze(pt.t("Syntax error setting breakpoint with condition {0} on line {1}: {2}",JSON.stringify(t.condition),t.line,e),9237),f_=()=>Qe(pt.t("Thread not found"),9244),ym=(t,e)=>Ze(pt.t("Could not read source map for {0}: {1}",t,e)),dD=()=>Ze(pt.t("UWP webview debugging is not available on your platform.")),hD=()=>Ze(pt.t("Could not connect to any UWP Webview pipe. Make sure your webview is hosted in debug mode, and that the `pipeName` in your `launch.json` is correct.")),mD=t=>typeof t=="object"&&!!t&&"__errorMarker"in t,HD=(t,e)=>t instanceof re&&t.cause.id===e;var gD=new WeakSet;var hX="Request",mX=t=>t.endsWith("Request"),di=Symbol("IDapApi"),uc=Symbol("IRootDapApi"),jp=class{constructor(e,r){this.transport=e;this.logger=r;this._pendingRequests=new Map;this._requestHandlers=new Map;this._eventListeners=new Map;this.disposables=[];this._initialized=Xe();this.closed=!1;this._sequence=1,this.disposables.push(this.transport.messageReceived(i=>this._onMessage(i.message,i.receivedTime))),this._dap=this._createApi()}get initializedBlocker(){return this._initialized.promise}attachTelemetry(e){this.telemetryReporter=e,e.attachDap(this._dap)}dap(){return this._dap}_createApi(){return new Proxy({},{get:(e,r)=>{if(r!=="then")return r==="on"?(i,n)=>(this._requestHandlers.set(i,n),()=>this._requestHandlers.delete(i)):r==="off"?i=>this._requestHandlers.delete(i):i=>{if(mX(r))return this.enqueueRequest(r.slice(0,-hX.length),i);this._send({seq:0,type:"event",event:r,body:i})}}})}createTestApi(){let e=(n,s)=>{let o=this._eventListeners.get(n);o||(o=new Set,this._eventListeners.set(n,o)),o.add(s)},r=(n,s)=>{let o=this._eventListeners.get(n);o&&o.delete(s)},i=(n,s)=>new Promise(o=>{let a=u=>{s&&!s(u)||(r(n,a),o(u))};e(n,a)});return new Proxy({},{get:(n,s)=>s==="on"?e:s==="off"?r:s==="once"?i:o=>this.enqueueRequest(s,o)})}enqueueRequest(e,r){return new Promise(i=>{let n={seq:0,type:"request",command:e,arguments:r||{}};this._send(n),this._pendingRequests.set(n.seq,i)})}stop(){this.closed=!0,this.transport.close()}_send(e,r){if(this.closed)this.logger.warn("dap.send","Not sending message because the connection has ended",e),r==null||r();else{e.seq=this._sequence++;let i=e.type!=="event"||!gD.has(e.body);this.transport.send(e,i,r)}}async _onMessage(e,r){var i,n,s,o;if(e.type==="request"){let a={seq:0,type:"response",request_seq:e.seq,command:e.command,success:!0};try{let u=this._requestHandlers.get(e.command);if(!u)console.error(`Unknown request: ${e.command}`);else{let c=await u(e.arguments);if(mD(c))this._send({...a,success:!1,message:c.error.format,body:{error:c.error}});else{let l={...a,body:c};a.command==="initialize"?(this._send(l),this._initialized.resolve(this)):a.command==="disconnect"?this._send({...a,body:c},()=>{this.stop()}):this._send(l)}}(i=this.telemetryReporter)==null||i.reportOperation("dapOperation",e.command,r.elapsed().ms)}catch(u){u instanceof re?this._send({...a,success:!1,body:{error:u.cause}}):(console.error(u),this._send({...a,success:!1,body:{error:{id:9221,format:`Error processing ${e.command}: ${u.stack||u.message}`,showUser:!1,sendTelemetry:!1}}})),(n=this.telemetryReporter)==null||n.reportOperation("dapOperation",e.command,r.elapsed().ms,u)}}if(e.type==="event"){let a=this._eventListeners.get(e.event)||new Set;for(let u of a)u(e.body)}if(e.type==="response"){let a=this._pendingRequests.get(e.request_seq);if(!this.logger.assert(a,`Expected callback for request sequence ID ${e.request_seq}`))return;if(this._pendingRequests.delete(e.request_seq),e.success)a(e.body);else{let u=(o=(s=e.body)==null?void 0:s.error)==null?void 0:o.format;a(u||e.message||"Unknown error")}}}};var et=Symbol("ISourcePathResolver");var LT=w("dns"),Yr=F(w("path")),hs=w("url");var wT=w("url");var h_={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},m_="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",HX={5:m_,"5module":m_+" export import",6:m_+" const class extends export import super"},gX=/^in(stanceof)?$/,b_="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",wD="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",yX=new RegExp("["+b_+"]"),bX=new RegExp("["+b_+wD+"]");b_=wD=null;var AD=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],vX=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function g_(t,e){for(var r=65536,i=0;i<e.length;i+=2){if(r+=e[i],r>t)return!1;if(r+=e[i+1],r>=t)return!0}}function ps(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&yX.test(String.fromCharCode(t)):e===!1?!1:g_(t,AD)}function cc(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&bX.test(String.fromCharCode(t)):e===!1?!1:g_(t,AD)||g_(t,vX)}var Te=function(e,r){r===void 0&&(r={}),this.label=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function hi(t,e){return new Te(t,{beforeExpr:!0,binop:e})}var mi={beforeExpr:!0},Nr={startsExpr:!0},v_={};function Le(t,e){return e===void 0&&(e={}),e.keyword=t,v_[t]=new Te(t,e)}var h={num:new Te("num",Nr),regexp:new Te("regexp",Nr),string:new Te("string",Nr),name:new Te("name",Nr),privateId:new Te("privateId",Nr),eof:new Te("eof"),bracketL:new Te("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Te("]"),braceL:new Te("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Te("}"),parenL:new Te("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Te(")"),comma:new Te(",",mi),semi:new Te(";",mi),colon:new Te(":",mi),dot:new Te("."),question:new Te("?",mi),questionDot:new Te("?."),arrow:new Te("=>",mi),template:new Te("template"),invalidTemplate:new Te("invalidTemplate"),ellipsis:new Te("...",mi),backQuote:new Te("`",Nr),dollarBraceL:new Te("${",{beforeExpr:!0,startsExpr:!0}),eq:new Te("=",{beforeExpr:!0,isAssign:!0}),assign:new Te("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Te("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Te("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:hi("||",1),logicalAND:hi("&&",2),bitwiseOR:hi("|",3),bitwiseXOR:hi("^",4),bitwiseAND:hi("&",5),equality:hi("==/!=/===/!==",6),relational:hi("</>/<=/>=",7),bitShift:hi("<</>>/>>>",8),plusMin:new Te("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:hi("%",10),star:hi("*",10),slash:hi("/",10),starstar:new Te("**",{beforeExpr:!0}),coalesce:hi("??",1),_break:Le("break"),_case:Le("case",mi),_catch:Le("catch"),_continue:Le("continue"),_debugger:Le("debugger"),_default:Le("default",mi),_do:Le("do",{isLoop:!0,beforeExpr:!0}),_else:Le("else",mi),_finally:Le("finally"),_for:Le("for",{isLoop:!0}),_function:Le("function",Nr),_if:Le("if"),_return:Le("return",mi),_switch:Le("switch"),_throw:Le("throw",mi),_try:Le("try"),_var:Le("var"),_const:Le("const"),_while:Le("while",{isLoop:!0}),_with:Le("with"),_new:Le("new",{beforeExpr:!0,startsExpr:!0}),_this:Le("this",Nr),_super:Le("super",Nr),_class:Le("class",Nr),_extends:Le("extends",mi),_export:Le("export"),_import:Le("import",Nr),_null:Le("null",Nr),_true:Le("true",Nr),_false:Le("false",Nr),_in:Le("in",{beforeExpr:!0,binop:7}),_instanceof:Le("instanceof",{beforeExpr:!0,binop:7}),_typeof:Le("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Le("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Le("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Br=/\r\n?|\n|\u2028|\u2029/,Im=new RegExp(Br.source,"g");function Dn(t){return t===10||t===13||t===8232||t===8233}function ID(t,e,r){r===void 0&&(r=t.length);for(var i=e;i<r;i++){var n=t.charCodeAt(i);if(Dn(n))return i<r-1&&n===13&&t.charCodeAt(i+1)===10?i+2:i+1}return-1}var SD=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Hi=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ED=Object.prototype,_X=ED.hasOwnProperty,wX=ED.toString,Kp=Object.hasOwn||function(t,e){return _X.call(t,e)},yD=Array.isArray||function(t){return wX.call(t)==="[object Array]"};function Ca(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}var AX=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Wp=function(e,r){this.line=e,this.column=r};Wp.prototype.offset=function(e){return new Wp(this.line,this.column+e)};var Pa=function(e,r,i){this.start=r,this.end=i,e.sourceFile!==null&&(this.source=e.sourceFile)};function lc(t,e){for(var r=1,i=0;;){var n=ID(t,i,e);if(n<0)return new Wp(r,e-i);++r,i=n}}var Vp={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},bD=!1;function IX(t){var e={};for(var r in Vp)e[r]=t&&Kp(t,r)?t[r]:Vp[r];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!bD&&typeof console=="object"&&console.warn&&(bD=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),yD(e.onToken)){var i=e.onToken;e.onToken=function(n){return i.push(n)}}return yD(e.onComment)&&(e.onComment=SX(e,e.onComment)),e}function SX(t,e){return function(r,i,n,s,o,a){var u={type:r?"Block":"Line",value:i,start:n,end:s};t.locations&&(u.loc=new Pa(this,o,a)),t.ranges&&(u.range=[n,s]),e.push(u)}}var Gp=1,pc=2,__=4,xD=8,LD=16,CD=32,w_=64,PD=128,Xp=256,A_=Gp|pc|Xp;function I_(t,e){return pc|(t?__:0)|(e?xD:0)}var vm=0,S_=1,ls=2,DD=3,TD=4,$D=5,ft=function(e,r,i){this.options=e=IX(e),this.sourceFile=e.sourceFile,this.keywords=Ca(HX[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var n="";e.allowReserved!==!0&&(n=h_[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(n+=" await")),this.reservedWords=Ca(n);var s=(n?n+" ":"")+h_.strict;this.reservedWordsStrict=Ca(s),this.reservedWordsStrictBind=Ca(s+" "+h_.strictBind),this.input=String(r),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf(`
`,i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Br).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=h.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Gp),this.regexpState=null,this.privateNameStack=[]},Tn={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};ft.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};Tn.inFunction.get=function(){return(this.currentVarScope().flags&pc)>0};Tn.inGenerator.get=function(){return(this.currentVarScope().flags&xD)>0&&!this.currentVarScope().inClassFieldInit};Tn.inAsync.get=function(){return(this.currentVarScope().flags&__)>0&&!this.currentVarScope().inClassFieldInit};Tn.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t];if(e.inClassFieldInit||e.flags&Xp)return!1;if(e.flags&pc)return(e.flags&__)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Tn.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags,r=t.inClassFieldInit;return(e&w_)>0||r||this.options.allowSuperOutsideMethod};Tn.allowDirectSuper.get=function(){return(this.currentThisScope().flags&PD)>0};Tn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Tn.allowNewDotTarget.get=function(){var t=this.currentThisScope(),e=t.flags,r=t.inClassFieldInit;return(e&(pc|Xp))>0||r};Tn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Xp)>0};ft.extend=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];for(var i=this,n=0;n<e.length;n++)i=e[n](i);return i};ft.parse=function(e,r){return new this(r,e).parse()};ft.parseExpressionAt=function(e,r,i){var n=new this(i,e,r);return n.nextToken(),n.parseExpression()};ft.tokenizer=function(e,r){return new this(r,e)};Object.defineProperties(ft.prototype,Tn);var _r=ft.prototype,EX=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;_r.strictDirective=function(t){for(;;){Hi.lastIndex=t,t+=Hi.exec(this.input)[0].length;var e=EX.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){Hi.lastIndex=t+e[0].length;var r=Hi.exec(this.input),i=r.index+r[0].length,n=this.input.charAt(i);return n===";"||n==="}"||Br.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(i+1)==="=")}t+=e[0].length,Hi.lastIndex=t,t+=Hi.exec(this.input)[0].length,this.input[t]===";"&&t++}};_r.eat=function(t){return this.type===t?(this.next(),!0):!1};_r.isContextual=function(t){return this.type===h.name&&this.value===t&&!this.containsEsc};_r.eatContextual=function(t){return this.isContextual(t)?(this.next(),!0):!1};_r.expectContextual=function(t){this.eatContextual(t)||this.unexpected()};_r.canInsertSemicolon=function(){return this.type===h.eof||this.type===h.braceR||Br.test(this.input.slice(this.lastTokEnd,this.start))};_r.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};_r.semicolon=function(){!this.eat(h.semi)&&!this.insertSemicolon()&&this.unexpected()};_r.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0};_r.expect=function(t){this.eat(t)||this.unexpected()};_r.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};function Sm(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}_r.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var r=e?t.parenthesizedAssign:t.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}};_r.checkExpressionErrors=function(t,e){if(!t)return!1;var r=t.shorthandAssign,i=t.doubleProto;if(!e)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};_r.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};_r.isSimpleAssignTarget=function(t){return t.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(t.expression):t.type==="Identifier"||t.type==="MemberExpression"};var ye=ft.prototype;ye.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==h.eof;){var r=this.parseStatement(null,!0,e);t.body.push(r)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var s=n[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var E_={kind:"loop"},xX={kind:"switch"};ye.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Hi.lastIndex=this.pos;var e=Hi.exec(this.input),r=this.pos+e[0].length,i=this.input.charCodeAt(r);if(i===91||i===92||i>55295&&i<56320)return!0;if(t)return!1;if(i===123)return!0;if(ps(i,!0)){for(var n=r+1;cc(i=this.input.charCodeAt(n),!0);)++n;if(i===92||i>55295&&i<56320)return!0;var s=this.input.slice(r,n);if(!gX.test(s))return!0}return!1};ye.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Hi.lastIndex=this.pos;var t=Hi.exec(this.input),e=this.pos+t[0].length,r;return!Br.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!(cc(r=this.input.charCodeAt(e+8))||r>55295&&r<56320))};ye.parseStatement=function(t,e,r){var i=this.type,n=this.startNode(),s;switch(this.isLet(t)&&(i=h._var,s="let"),i){case h._break:case h._continue:return this.parseBreakContinueStatement(n,i.keyword);case h._debugger:return this.parseDebuggerStatement(n);case h._do:return this.parseDoStatement(n);case h._for:return this.parseForStatement(n);case h._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!t);case h._class:return t&&this.unexpected(),this.parseClass(n,!0);case h._if:return this.parseIfStatement(n);case h._return:return this.parseReturnStatement(n);case h._switch:return this.parseSwitchStatement(n);case h._throw:return this.parseThrowStatement(n);case h._try:return this.parseTryStatement(n);case h._const:case h._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(n,s);case h._while:return this.parseWhileStatement(n);case h._with:return this.parseWithStatement(n);case h.braceL:return this.parseBlock(!0,n);case h.semi:return this.parseEmptyStatement(n);case h._export:case h._import:if(this.options.ecmaVersion>10&&i===h._import){Hi.lastIndex=this.pos;var o=Hi.exec(this.input),a=this.pos+o[0].length,u=this.input.charCodeAt(a);if(u===40||u===46)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===h._import?this.parseImport(n):this.parseExport(n,r);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!t);var c=this.value,l=this.parseExpression();return i===h.name&&l.type==="Identifier"&&this.eat(h.colon)?this.parseLabeledStatement(n,c,l,t):this.parseExpressionStatement(n,l)}};ye.parseBreakContinueStatement=function(t,e){var r=e==="break";this.next(),this.eat(h.semi)||this.insertSemicolon()?t.label=null:this.type!==h.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var n=this.labels[i];if((t.label==null||n.name===t.label.name)&&(n.kind!=null&&(r||n.kind==="loop")||t.label&&r))break}return i===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,r?"BreakStatement":"ContinueStatement")};ye.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};ye.parseDoStatement=function(t){return this.next(),this.labels.push(E_),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(h._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(h.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")};ye.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(E_),this.enterScope(0),this.expect(h.parenL),this.type===h.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var r=this.isLet();if(this.type===h._var||this.type===h._const||r){var i=this.startNode(),n=r?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===h._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,i)):(e>-1&&this.unexpected(e),this.parseFor(t,i))}var s=this.isContextual("let"),o=!1,a=new Sm,u=this.parseExpression(e>-1?"await":!0,a);return this.type===h._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===h._in?e>-1&&this.unexpected(e):t.await=e>-1),s&&o&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,a),this.checkLValPattern(u),this.parseForIn(t,u)):(this.checkExpressionErrors(a,!0),e>-1&&this.unexpected(e),this.parseFor(t,u))};ye.parseFunctionStatement=function(t,e,r){return this.next(),this.parseFunction(t,qp|(r?0:y_),!1,e)};ye.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(h._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};ye.parseReturnStatement=function(t){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(h.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")};ye.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(h.braceL),this.labels.push(xX),this.enterScope(0);for(var e,r=!1;this.type!==h.braceR;)if(this.type===h._case||this.type===h._default){var i=this.type===h._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),i?e.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,e.test=null),this.expect(h.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};ye.parseThrowStatement=function(t){return this.next(),Br.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var LX=[];ye.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===h._catch){var e=this.startNode();if(this.next(),this.eat(h.parenL)){e.param=this.parseBindingAtom();var r=e.param.type==="Identifier";this.enterScope(r?CD:0),this.checkLValPattern(e.param,r?TD:ls),this.expect(h.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(h._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")};ye.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")};ye.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(E_),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};ye.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};ye.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};ye.parseLabeledStatement=function(t,e,r,i){for(var n=0,s=this.labels;n<s.length;n+=1){var o=s[n];o.name===e&&this.raise(r.start,"Label '"+e+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===h._switch?"switch":null,u=this.labels.length-1;u>=0;u--){var c=this.labels[u];if(c.statementStart===t.start)c.statementStart=this.start,c.kind=a;else break}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),t.label=r,this.finishNode(t,"LabeledStatement")};ye.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};ye.parseBlock=function(t,e,r){for(t===void 0&&(t=!0),e===void 0&&(e=this.startNode()),e.body=[],this.expect(h.braceL),t&&this.enterScope(0);this.type!==h.braceR;){var i=this.parseStatement(null);e.body.push(i)}return r&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")};ye.parseFor=function(t,e){return t.init=e,this.expect(h.semi),t.test=this.type===h.semi?null:this.parseExpression(),this.expect(h.semi),t.update=this.type===h.parenR?null:this.parseExpression(),this.expect(h.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};ye.parseForIn=function(t,e){var r=this.type===h._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(h.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")};ye.parseVar=function(t,e,r){for(t.declarations=[],t.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(h.eq)?i.init=this.parseMaybeAssign(e):r==="const"&&!(this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():i.id.type!=="Identifier"&&!(e&&(this.type===h._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,t.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(h.comma))break}return t};ye.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?S_:ls,!1)};var qp=1,y_=2,MD=4;ye.parseFunction=function(t,e,r,i,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===h.star&&e&y_&&this.unexpected(),t.generator=this.eat(h.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&qp&&(t.id=e&MD&&this.type!==h.name?null:this.parseIdent(),t.id&&!(e&y_)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?S_:ls:DD));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(I_(t.async,t.generator)),e&qp||(t.id=this.type===h.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,r,!1,n),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&qp?"FunctionDeclaration":"FunctionExpression")};ye.parseFunctionParams=function(t){this.expect(h.parenL),t.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};ye.parseClass=function(t,e){this.next();var r=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var i=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(h.braceL);this.type!==h.braceR;){var o=this.parseClassElement(t.superClass!==null);o&&(n.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raise(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&CX(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};ye.parseClassElement=function(t){if(this.eat(h.semi))return null;var e=this.options.ecmaVersion,r=this.startNode(),i="",n=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(h.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===h.star?a=!0:i="static"}if(r.static=a,!i&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===h.star)&&!this.canInsertSemicolon()?s=!0:i="async"),!i&&(e>=9||!s)&&this.eat(h.star)&&(n=!0),!i&&!s&&!n){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:i=u)}if(i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),e<13||this.type===h.parenL||o!=="method"||n||s){var c=!r.static&&_m(r,"constructor"),l=c&&t;c&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=c?"constructor":o,this.parseClassMethod(r,n,s,l)}else this.parseClassField(r);return r};ye.isClassElementNameStart=function(){return this.type===h.name||this.type===h.privateId||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword};ye.parseClassElementName=function(t){this.type===h.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};ye.parseClassMethod=function(t,e,r,i){var n=t.key;t.kind==="constructor"?(e&&this.raise(n.start,"Constructor can't be a generator"),r&&this.raise(n.start,"Constructor can't be an async method")):t.static&&_m(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,r,i);return t.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),t.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),t.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")};ye.parseClassField=function(t){if(_m(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&_m(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(h.eq)){var e=this.currentThisScope(),r=e.inClassFieldInit;e.inClassFieldInit=!0,t.value=this.parseMaybeAssign(),e.inClassFieldInit=r}else t.value=null;return this.semicolon(),this.finishNode(t,"PropertyDefinition")};ye.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(Xp|w_);this.type!==h.braceR;){var r=this.parseStatement(null);t.body.push(r)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")};ye.parseClassId=function(t,e){this.type===h.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,ls,!1)):(e===!0&&this.unexpected(),t.id=null)};ye.parseClassSuper=function(t){t.superClass=this.eat(h._extends)?this.parseExprSubscripts(!1):null};ye.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};ye.exitClassBody=function(){for(var t=this.privateNameStack.pop(),e=t.declared,r=t.used,i=this.privateNameStack.length,n=i===0?null:this.privateNameStack[i-1],s=0;s<r.length;++s){var o=r[s];Kp(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function CX(t,e){var r=e.key.name,i=t[r],n="true";return e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set")&&(n=(e.static?"s":"i")+e.kind),i==="iget"&&n==="iset"||i==="iset"&&n==="iget"||i==="sget"&&n==="sset"||i==="sset"&&n==="sget"?(t[r]="true",!1):i?!0:(t[r]=n,!1)}function _m(t,e){var r=t.computed,i=t.key;return!r&&(i.type==="Identifier"&&i.name===e||i.type==="Literal"&&i.value===e)}ye.parseExport=function(t,e){if(this.next(),this.eat(h.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported.name,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==h.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(h._default)){this.checkExport(e,"default",this.lastTokStart);var r;if(this.type===h._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),t.declaration=this.parseFunction(i,qp|MD,!1,r)}else if(this.type===h._class){var n=this.startNode();t.declaration=this.parseClass(n,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==h.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var s=0,o=t.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local),a.local.type==="Literal"&&this.raise(a.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};ye.checkExport=function(t,e,r){t&&(Kp(t,e)&&this.raiseRecoverable(r,"Duplicate export '"+e+"'"),t[e]=!0)};ye.checkPatternExport=function(t,e){var r=e.type;if(r==="Identifier")this.checkExport(t,e.name,e.start);else if(r==="ObjectPattern")for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];this.checkPatternExport(t,s)}else if(r==="ArrayPattern")for(var o=0,a=e.elements;o<a.length;o+=1){var u=a[o];u&&this.checkPatternExport(t,u)}else r==="Property"?this.checkPatternExport(t,e.value):r==="AssignmentPattern"?this.checkPatternExport(t,e.left):r==="RestElement"?this.checkPatternExport(t,e.argument):r==="ParenthesizedExpression"&&this.checkPatternExport(t,e.expression)};ye.checkVariableExport=function(t,e){if(t)for(var r=0,i=e;r<i.length;r+=1){var n=i[r];this.checkPatternExport(t,n.id)}};ye.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};ye.parseExportSpecifiers=function(t){var e=[],r=!0;for(this.expect(h.braceL);!this.eat(h.braceR);){if(r)r=!1;else if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break;var i=this.startNode();i.local=this.parseModuleExportName(),i.exported=this.eatContextual("as")?this.parseModuleExportName():i.local,this.checkExport(t,i.exported[i.exported.type==="Identifier"?"name":"value"],i.exported.start),e.push(this.finishNode(i,"ExportSpecifier"))}return e};ye.parseImport=function(t){return this.next(),this.type===h.string?(t.specifiers=LX,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===h.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")};ye.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===h.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLValSimple(r.local,ls),t.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(h.comma))return t}if(this.type===h.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,ls),t.push(this.finishNode(i,"ImportNamespaceSpecifier")),t}for(this.expect(h.braceL);!this.eat(h.braceR);){if(e)e=!1;else if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break;var n=this.startNode();n.imported=this.parseModuleExportName(),this.eatContextual("as")?n.local=this.parseIdent():(this.checkUnreserved(n.imported),n.local=n.imported),this.checkLValSimple(n.local,ls),t.push(this.finishNode(n,"ImportSpecifier"))}return t};ye.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===h.string){var t=this.parseLiteral(this.value);return AX.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)};ye.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)};ye.isDirectiveCandidate=function(t){return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var qi=ft.prototype;qi.toAssignable=function(t,e,r){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,n=t.properties;i<n.length;i+=1){var s=n[i];this.toAssignable(s,e),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,r);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return t};qi.toAssignableList=function(t,e){for(var r=t.length,i=0;i<r;i++){var n=t[i];n&&this.toAssignable(n,e)}if(r){var s=t[r-1];this.options.ecmaVersion===6&&e&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return t};qi.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};qi.parseRestBinding=function(){var t=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==h.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")};qi.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case h.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(h.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case h.braceL:return this.parseObj(!0)}return this.parseIdent()};qi.parseBindingList=function(t,e,r){for(var i=[],n=!0;!this.eat(t);)if(n?n=!1:this.expect(h.comma),e&&this.type===h.comma)i.push(null);else{if(r&&this.afterTrailingComma(t))break;if(this.type===h.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===h.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}else{var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),i.push(o)}}return i};qi.parseBindingListItem=function(t){return t};qi.parseMaybeDefault=function(t,e,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(h.eq))return r;var i=this.startNodeAt(t,e);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};qi.checkLValSimple=function(t,e,r){e===void 0&&(e=vm);var i=e!==vm;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(i?"Binding ":"Assigning to ")+t.name+" in strict mode"),i&&(e===ls&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),r&&(Kp(r,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),r[t.name]=!0),e!==$D&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,r);default:this.raise(t.start,(i?"Binding":"Assigning to")+" rvalue")}};qi.checkLValPattern=function(t,e,r){switch(e===void 0&&(e=vm),t.type){case"ObjectPattern":for(var i=0,n=t.properties;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,e,r)}break;case"ArrayPattern":for(var o=0,a=t.elements;o<a.length;o+=1){var u=a[o];u&&this.checkLValInnerPattern(u,e,r)}break;default:this.checkLValSimple(t,e,r)}};qi.checkLValInnerPattern=function(t,e,r){switch(e===void 0&&(e=vm),t.type){case"Property":this.checkLValInnerPattern(t.value,e,r);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,r);break;case"RestElement":this.checkLValPattern(t.argument,e,r);break;default:this.checkLValPattern(t,e,r)}};var ji=function(e,r,i,n,s){this.token=e,this.isExpr=!!r,this.preserveSpace=!!i,this.override=n,this.generator=!!s},tt={b_stat:new ji("{",!1),b_expr:new ji("{",!0),b_tmpl:new ji("${",!1),p_stat:new ji("(",!1),p_expr:new ji("(",!0),q_tmpl:new ji("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new ji("function",!1),f_expr:new ji("function",!0),f_expr_gen:new ji("function",!0,!1,null,!0),f_gen:new ji("function",!1,!1,null,!0)},fc=ft.prototype;fc.initialContext=function(){return[tt.b_stat]};fc.curContext=function(){return this.context[this.context.length-1]};fc.braceIsBlock=function(t){var e=this.curContext();return e===tt.f_expr||e===tt.f_stat?!0:t===h.colon&&(e===tt.b_stat||e===tt.b_expr)?!e.isExpr:t===h._return||t===h.name&&this.exprAllowed?Br.test(this.input.slice(this.lastTokEnd,this.start)):t===h._else||t===h.semi||t===h.eof||t===h.parenR||t===h.arrow?!0:t===h.braceL?e===tt.b_stat:t===h._var||t===h._const||t===h.name?!1:!this.exprAllowed};fc.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1};fc.updateContext=function(t){var e,r=this.type;r.keyword&&t===h.dot?this.exprAllowed=!1:(e=r.updateContext)?e.call(this,t):this.exprAllowed=r.beforeExpr};fc.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)};h.parenR.updateContext=h.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var t=this.context.pop();t===tt.b_stat&&this.curContext().token==="function"&&(t=this.context.pop()),this.exprAllowed=!t.isExpr};h.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?tt.b_stat:tt.b_expr),this.exprAllowed=!0};h.dollarBraceL.updateContext=function(){this.context.push(tt.b_tmpl),this.exprAllowed=!0};h.parenL.updateContext=function(t){var e=t===h._if||t===h._for||t===h._with||t===h._while;this.context.push(e?tt.p_stat:tt.p_expr),this.exprAllowed=!0};h.incDec.updateContext=function(){};h._function.updateContext=h._class.updateContext=function(t){t.beforeExpr&&t!==h._else&&!(t===h.semi&&this.curContext()!==tt.p_stat)&&!(t===h._return&&Br.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===h.colon||t===h.braceL)&&this.curContext()===tt.b_stat)?this.context.push(tt.f_expr):this.context.push(tt.f_stat),this.exprAllowed=!1};h.backQuote.updateContext=function(){this.curContext()===tt.q_tmpl?this.context.pop():this.context.push(tt.q_tmpl),this.exprAllowed=!1};h.star.updateContext=function(t){if(t===h._function){var e=this.context.length-1;this.context[e]===tt.f_expr?this.context[e]=tt.f_expr_gen:this.context[e]=tt.f_gen}this.exprAllowed=!0};h.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==h.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var Ae=ft.prototype;Ae.checkPropClash=function(t,e,r){if(!(this.options.ecmaVersion>=9&&t.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var i=t.key,n;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6){n==="__proto__"&&s==="init"&&(e.proto&&(r?r.doubleProto<0&&(r.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),e.proto=!0);return}n="$"+n;var o=e[n];if(o){var a;s==="init"?a=this.strict&&o.init||o.get||o.set:a=o.init||o[s],a&&this.raiseRecoverable(i.start,"Redefinition of property")}else o=e[n]={init:!1,get:!1,set:!1};o[s]=!0}};Ae.parseExpression=function(t,e){var r=this.start,i=this.startLoc,n=this.parseMaybeAssign(t,e);if(this.type===h.comma){var s=this.startNodeAt(r,i);for(s.expressions=[n];this.eat(h.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(s,"SequenceExpression")}return n};Ae.parseMaybeAssign=function(t,e,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var i=!1,n=-1,s=-1,o=-1;e?(n=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new Sm,i=!0);var a=this.start,u=this.startLoc;(this.type===h.parenL||this.type===h.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");var c=this.parseMaybeConditional(t,e);if(r&&(c=r.call(this,c,a,u)),this.type.isAssign){var l=this.startNodeAt(a,u);return l.operator=this.value,this.type===h.eq&&(c=this.toAssignable(c,!1,e)),i||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=c.start&&(e.shorthandAssign=-1),this.type===h.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(l,"AssignmentExpression")}else i&&this.checkExpressionErrors(e,!0);return n>-1&&(e.parenthesizedAssign=n),s>-1&&(e.trailingComma=s),c};Ae.parseMaybeConditional=function(t,e){var r=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.eat(h.question)){var s=this.startNodeAt(r,i);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(h.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n};Ae.parseExprOps=function(t,e){var r=this.start,i=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===r&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,r,i,-1,t)};Ae.parseExprOp=function(t,e,r,i,n){var s=this.type.binop;if(s!=null&&(!n||this.type!==h._in)&&s>i){var o=this.type===h.logicalOR||this.type===h.logicalAND,a=this.type===h.coalesce;a&&(s=h.logicalAND.binop);var u=this.value;this.next();var c=this.start,l=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),c,l,s,n),f=this.buildBinary(e,r,t,p,u,o||a);return(o&&this.type===h.coalesce||a&&(this.type===h.logicalOR||this.type===h.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,e,r,i,n)}return t};Ae.buildBinary=function(t,e,r,i,n,s){i.type==="PrivateIdentifier"&&this.raise(i.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=r,o.operator=n,o.right=i,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")};Ae.parseMaybeUnary=function(t,e,r,i){var n=this.start,s=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(i),e=!0;else if(this.type.prefix){var a=this.startNode(),u=this.type===h.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,i),this.checkExpressionErrors(t,!0),u?this.checkLValSimple(a.argument):this.strict&&a.operator==="delete"&&a.argument.type==="Identifier"?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):a.operator==="delete"&&kD(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,o=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else if(!e&&this.type===h.privateId)(i||this.privateNameStack.length===0)&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==h._in&&this.unexpected();else{if(o=this.parseExprSubscripts(t,i),this.checkExpressionErrors(t))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(n,s);c.operator=this.value,c.prefix=!1,c.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(c,"UpdateExpression")}}if(!r&&this.eat(h.starstar))if(e)this.unexpected(this.lastTokStart);else return this.buildBinary(n,s,o,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return o};function kD(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&kD(t.expression)}Ae.parseExprSubscripts=function(t,e){var r=this.start,i=this.startLoc,n=this.parseExprAtom(t,e);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return n;var s=this.parseSubscripts(n,r,i,!1,e);return t&&s.type==="MemberExpression"&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s};Ae.parseSubscripts=function(t,e,r,i,n){for(var s=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,o=!1;;){var a=this.parseSubscript(t,e,r,i,s,o,n);if(a.optional&&(o=!0),a===t||a.type==="ArrowFunctionExpression"){if(o){var u=this.startNodeAt(e,r);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}t=a}};Ae.parseSubscript=function(t,e,r,i,n,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(h.questionDot);i&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(h.bracketL);if(c||u&&this.type!==h.parenL&&this.type!==h.backQuote||this.eat(h.dot)){var l=this.startNodeAt(e,r);l.object=t,c?(l.property=this.parseExpression(),this.expect(h.bracketR)):this.type===h.privateId&&t.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!c,a&&(l.optional=u),t=this.finishNode(l,"MemberExpression")}else if(!i&&this.eat(h.parenL)){var p=new Sm,f=this.yieldPos,H=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var y=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1,p);if(n&&!u&&!this.canInsertSemicolon()&&this.eat(h.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=f,this.awaitPos=H,this.awaitIdentPos=m,this.parseArrowExpression(this.startNodeAt(e,r),y,!0,o);this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=H||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var b=this.startNodeAt(e,r);b.callee=t,b.arguments=y,a&&(b.optional=u),t=this.finishNode(b,"CallExpression")}else if(this.type===h.backQuote){(u||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var A=this.startNodeAt(e,r);A.tag=t,A.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(A,"TaggedTemplateExpression")}return t};Ae.parseExprAtom=function(t,e){this.type===h.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case h._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===h.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==h.dot&&this.type!==h.bracketL&&this.type!==h.parenL&&this.unexpected(),this.finishNode(r,"Super");case h._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case h.name:var n=this.start,s=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&a.name==="async"&&!this.canInsertSemicolon()&&this.eat(h._function))return this.overrideContext(tt.f_expr),this.parseFunction(this.startNodeAt(n,s),0,!1,!0,e);if(i&&!this.canInsertSemicolon()){if(this.eat(h.arrow))return this.parseArrowExpression(this.startNodeAt(n,s),[a],!1,e);if(this.options.ecmaVersion>=8&&a.name==="async"&&this.type===h.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return a=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(h.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,s),[a],!0,e)}return a;case h.regexp:var u=this.value;return r=this.parseLiteral(u.value),r.regex={pattern:u.pattern,flags:u.flags},r;case h.num:case h.string:return this.parseLiteral(this.value);case h._null:case h._true:case h._false:return r=this.startNode(),r.value=this.type===h._null?null:this.type===h._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case h.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(i,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),l;case h.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(h.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case h.braceL:return this.overrideContext(tt.b_expr),this.parseObj(!1,t);case h._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case h._class:return this.parseClass(this.startNode(),!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate();case h._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}};Ae.parseExprImport=function(){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var e=this.parseIdent(!0);switch(this.type){case h.parenL:return this.parseDynamicImport(t);case h.dot:return t.meta=e,this.parseImportMeta(t);default:this.unexpected()}};Ae.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(h.parenR)){var e=this.start;this.eat(h.comma)&&this.eat(h.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")};Ae.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")};Ae.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")};Ae.parseParenExpression=function(){this.expect(h.parenL);var t=this.parseExpression();return this.expect(h.parenR),t};Ae.parseParenAndDistinguishExpression=function(t,e){var r=this.start,i=this.startLoc,n,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,u=[],c=!0,l=!1,p=new Sm,f=this.yieldPos,H=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==h.parenR;)if(c?c=!1:this.expect(h.comma),s&&this.afterTrailingComma(h.parenR,!0)){l=!0;break}else if(this.type===h.ellipsis){m=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===h.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,p,this.parseParenItem));var y=this.lastTokEnd,b=this.lastTokEndLoc;if(this.expect(h.parenR),t&&!this.canInsertSemicolon()&&this.eat(h.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=H,this.parseParenArrowList(r,i,u,e);(!u.length||l)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=H||this.awaitPos,u.length>1?(n=this.startNodeAt(o,a),n.expressions=u,this.finishNodeAt(n,"SequenceExpression",y,b)):n=u[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var A=this.startNodeAt(r,i);return A.expression=n,this.finishNode(A,"ParenthesizedExpression")}else return n};Ae.parseParenItem=function(t){return t};Ae.parseParenArrowList=function(t,e,r,i){return this.parseArrowExpression(this.startNodeAt(t,e),r,!1,i)};var PX=[];Ae.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(h.dot)){t.meta=e;var r=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var i=this.start,n=this.startLoc,s=this.type===h._import;return t.callee=this.parseSubscripts(this.parseExprAtom(),i,n,!0,!1),s&&t.callee.type==="ImportExpression"&&this.raise(i,"Cannot use new with import()"),this.eat(h.parenL)?t.arguments=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1):t.arguments=PX,this.finishNode(t,"NewExpression")};Ae.parseTemplateElement=function(t){var e=t.isTagged,r=this.startNode();return this.type===h.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
`),cooked:this.value},this.next(),r.tail=this.type===h.backQuote,this.finishNode(r,"TemplateElement")};Ae.parseTemplate=function(t){t===void 0&&(t={});var e=t.isTagged;e===void 0&&(e=!1);var r=this.startNode();this.next(),r.expressions=[];var i=this.parseTemplateElement({isTagged:e});for(r.quasis=[i];!i.tail;)this.type===h.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(h.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(h.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(r,"TemplateLiteral")};Ae.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===h.name||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===h.star)&&!Br.test(this.input.slice(this.lastTokEnd,this.start))};Ae.parseObj=function(t,e){var r=this.startNode(),i=!0,n={};for(r.properties=[],this.next();!this.eat(h.braceR);){if(i)i=!1;else if(this.expect(h.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(h.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,n,e),r.properties.push(s)}return this.finishNode(r,t?"ObjectPattern":"ObjectExpression")};Ae.parseProperty=function(t,e){var r=this.startNode(),i,n,s,o;if(this.options.ecmaVersion>=9&&this.eat(h.ellipsis))return t?(r.argument=this.parseIdent(!1),this.type===h.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(this.type===h.parenL&&e&&(e.parenthesizedAssign<0&&(e.parenthesizedAssign=this.start),e.parenthesizedBind<0&&(e.parenthesizedBind=this.start)),r.argument=this.parseMaybeAssign(!1,e),this.type===h.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(t||e)&&(s=this.start,o=this.startLoc),t||(i=this.eat(h.star)));var a=this.containsEsc;return this.parsePropertyName(r),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(r)?(n=!0,i=this.options.ecmaVersion>=9&&this.eat(h.star),this.parsePropertyName(r,e)):n=!1,this.parsePropertyValue(r,t,i,n,s,o,e,a),this.finishNode(r,"Property")};Ae.parsePropertyValue=function(t,e,r,i,n,s,o,a){if((r||i)&&this.type===h.colon&&this.unexpected(),this.eat(h.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===h.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(r,i);else if(!e&&!a&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.type!==h.comma&&this.type!==h.braceR&&this.type!==h.eq){(r||i)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);var u=t.kind==="get"?0:1;if(t.value.params.length!==u){var c=t.value.start;t.kind==="get"?this.raiseRecoverable(c,"getter should have no params"):this.raiseRecoverable(c,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((r||i)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=n),t.kind="init",e?t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key)):this.type===h.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.shorthand=!0):this.unexpected()};Ae.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(h.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(h.bracketR),t.key;t.computed=!1}return t.key=this.type===h.num||this.type===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Ae.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};Ae.parseMethod=function(t,e,r){var i=this.startNode(),n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=t),this.options.ecmaVersion>=8&&(i.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(I_(e,i.generator)|w_|(r?PD:0)),this.expect(h.parenL),i.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")};Ae.parseArrowExpression=function(t,e,r,i){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(I_(r,!1)|LD),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,i),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")};Ae.parseFunctionBody=function(t,e,r,i){var n=e&&this.type!==h.braceL,s=this.strict,o=!1;if(n)t.body=this.parseMaybeAssign(i),t.expression=!0,this.checkParams(t,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var u=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(t,!s&&!o&&!e&&!r&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,$D),t.body=this.parseBlock(!1,void 0,o&&!s),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=u}this.exitScope()};Ae.isSimpleParamList=function(t){for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(i.type!=="Identifier")return!1}return!0};Ae.checkParams=function(t,e){for(var r=Object.create(null),i=0,n=t.params;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,S_,e?null:r)}};Ae.parseExprList=function(t,e,r,i){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(h.comma),e&&this.afterTrailingComma(t))break;var o=void 0;r&&this.type===h.comma?o=null:this.type===h.ellipsis?(o=this.parseSpread(i),i&&this.type===h.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):o=this.parseMaybeAssign(!1,i),n.push(o)}return n};Ae.checkUnreserved=function(t){var e=t.start,r=t.end,i=t.name;if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(e,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(e,"Unexpected keyword '"+i+"'"),!(this.options.ecmaVersion<6&&this.input.slice(e,r).indexOf("\\")!==-1)){var n=this.strict?this.reservedWordsStrict:this.reservedWords;n.test(i)&&(!this.inAsync&&i==="await"&&this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+i+"' is reserved"))}};Ae.parseIdent=function(t,e){var r=this.startNode();return this.type===h.name?r.name=this.value:this.type.keyword?(r.name=this.type.keyword,(r.name==="class"||r.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!t),this.finishNode(r,"Identifier"),t||(this.checkUnreserved(r),r.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r.start)),r};Ae.parsePrivateIdent=function(){var t=this.startNode();return this.type===h.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.privateNameStack.length===0?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t),t};Ae.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===h.semi||this.canInsertSemicolon()||this.type!==h.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(h.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")};Ae.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var wm=ft.prototype;wm.raise=function(t,e){var r=lc(this.input,t);e+=" ("+r.line+":"+r.column+")";var i=new SyntaxError(e);throw i.pos=t,i.loc=r,i.raisedAt=this.pos,i};wm.raiseRecoverable=wm.raise;wm.curPosition=function(){if(this.options.locations)return new Wp(this.curLine,this.pos-this.lineStart)};var io=ft.prototype,DX=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};io.enterScope=function(t){this.scopeStack.push(new DX(t))};io.exitScope=function(){this.scopeStack.pop()};io.treatFunctionsAsVarInScope=function(t){return t.flags&pc||!this.inModule&&t.flags&Gp};io.declareName=function(t,e,r){var i=!1;if(e===ls){var n=this.currentScope();i=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&n.flags&Gp&&delete this.undefinedExports[t]}else if(e===TD){var s=this.currentScope();s.lexical.push(t)}else if(e===DD){var o=this.currentScope();this.treatFunctionsAsVar?i=o.lexical.indexOf(t)>-1:i=o.lexical.indexOf(t)>-1||o.var.indexOf(t)>-1,o.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var u=this.scopeStack[a];if(u.lexical.indexOf(t)>-1&&!(u.flags&CD&&u.lexical[0]===t)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(t)>-1){i=!0;break}if(u.var.push(t),this.inModule&&u.flags&Gp&&delete this.undefinedExports[t],u.flags&A_)break}i&&this.raiseRecoverable(r,"Identifier '"+t+"' has already been declared")};io.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)};io.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};io.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&A_)return e}};io.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&A_&&!(e.flags&LD))return e}};var no=function(e,r,i){this.type="",this.start=r,this.end=0,e.options.locations&&(this.loc=new Pa(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[r,0])},zp=ft.prototype;zp.startNode=function(){return new no(this,this.start,this.startLoc)};zp.startNodeAt=function(t,e){return new no(this,t,e)};function RD(t,e,r,i){return t.type=e,t.end=r,this.options.locations&&(t.loc.end=i),this.options.ranges&&(t.range[1]=r),t}zp.finishNode=function(t,e){return RD.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};zp.finishNodeAt=function(t,e,r,i){return RD.call(this,t,e,r,i)};zp.copyNode=function(t){var e=new no(this,t.start,this.startLoc);for(var r in t)e[r]=t[r];return e};var OD="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ND=OD+" Extended_Pictographic",BD=ND,FD=BD+" EBase EComp EMod EPres ExtPict",TX=FD,$X={9:OD,10:ND,11:BD,12:FD,13:TX},vD="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",UD="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jD=UD+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",qD=jD+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",WD=qD+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",MX=WD+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",kX={9:UD,10:jD,11:qD,12:WD,13:MX},VD={};function RX(t){var e=VD[t]={binary:Ca($X[t]+" "+vD),nonBinary:{General_Category:Ca(vD),Script:Ca(kX[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(bm=0,H_=[9,10,11,12,13];bm<H_.length;bm+=1)_D=H_[bm],RX(_D);var _D,bm,H_,he=ft.prototype,fs=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=VD[e.options.ecmaVersion>=13?13:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};fs.prototype.reset=function(e,r,i){var n=i.indexOf("u")!==-1;this.start=e|0,this.source=r+"",this.flags=i,this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchN=n&&this.parser.options.ecmaVersion>=9};fs.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};fs.prototype.at=function(e,r){r===void 0&&(r=!1);var i=this.source,n=i.length;if(e>=n)return-1;var s=i.charCodeAt(e);if(!(r||this.switchU)||s<=55295||s>=57344||e+1>=n)return s;var o=i.charCodeAt(e+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};fs.prototype.nextIndex=function(e,r){r===void 0&&(r=!1);var i=this.source,n=i.length;if(e>=n)return n;var s=i.charCodeAt(e),o;return!(r||this.switchU)||s<=55295||s>=57344||e+1>=n||(o=i.charCodeAt(e+1))<56320||o>57343?e+1:e+2};fs.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};fs.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};fs.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};fs.prototype.eat=function(e,r){return r===void 0&&(r=!1),this.current(r)===e?(this.advance(r),!0):!1};function Am(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}he.validateRegExpFlags=function(t){for(var e=t.validFlags,r=t.flags,i=0;i<r.length;i++){var n=r.charAt(i);e.indexOf(n)===-1&&this.raise(t.start,"Invalid regular expression flag"),r.indexOf(n,i+1)>-1&&this.raise(t.start,"Duplicate regular expression flag")}};he.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&t.groupNames.length>0&&(t.switchN=!0,this.regexp_pattern(t))};he.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames.length=0,t.backReferenceNames.length=0,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,r=t.backReferenceNames;e<r.length;e+=1){var i=r[e];t.groupNames.indexOf(i)===-1&&t.raise("Invalid named capture referenced")}};he.regexp_disjunction=function(t){for(this.regexp_alternative(t);t.eat(124);)this.regexp_alternative(t);this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")};he.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););};he.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))?(this.regexp_eatQuantifier(t),!0):!1};he.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!r,!0}return t.pos=e,!1};he.regexp_eatQuantifier=function(t,e){return e===void 0&&(e=!1),this.regexp_eatQuantifierPrefix(t,e)?(t.eat(63),!0):!1};he.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)};he.regexp_eatBracedQuantifier=function(t,e){var r=t.pos;if(t.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(i=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return n!==-1&&n<i&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=r}return!1};he.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)};he.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1};he.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)&&t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}t.pos=e}return!1};he.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1};he.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)};he.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1};he.regexp_eatSyntaxCharacter=function(t){var e=t.current();return GD(e)?(t.lastIntValue=e,t.advance(),!0):!1};function GD(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}he.regexp_eatPatternCharacters=function(t){for(var e=t.pos,r=0;(r=t.current())!==-1&&!GD(r);)t.advance();return t.pos!==e};he.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return e!==-1&&e!==36&&!(e>=40&&e<=43)&&e!==46&&e!==63&&e!==91&&e!==94&&e!==124?(t.advance(),!0):!1};he.regexp_groupSpecifier=function(t){if(t.eat(63)){if(this.regexp_eatGroupName(t)){t.groupNames.indexOf(t.lastStringValue)!==-1&&t.raise("Duplicate capture group name"),t.groupNames.push(t.lastStringValue);return}t.raise("Invalid group")}};he.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1};he.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=Am(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=Am(t.lastIntValue);return!0}return!1};he.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,r=this.options.ecmaVersion>=11,i=t.current(r);return t.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,r)&&(i=t.lastIntValue),OX(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function OX(t){return ps(t,!0)||t===36||t===95}he.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,r=this.options.ecmaVersion>=11,i=t.current(r);return t.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,r)&&(i=t.lastIntValue),NX(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function NX(t){return cc(t,!0)||t===36||t===95||t===8204||t===8205}he.regexp_eatAtomEscape=function(t){return this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t)?!0:(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)};he.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var r=t.lastIntValue;if(t.switchU)return r>t.maxBackReference&&(t.maxBackReference=r),!0;if(r<=t.numCapturingParens)return!0;t.pos=e}return!1};he.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1};he.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)};he.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1};he.regexp_eatZero=function(t){return t.current()===48&&!Em(t.lookahead())?(t.lastIntValue=0,t.advance(),!0):!1};he.regexp_eatControlEscape=function(t){var e=t.current();return e===116?(t.lastIntValue=9,t.advance(),!0):e===110?(t.lastIntValue=10,t.advance(),!0):e===118?(t.lastIntValue=11,t.advance(),!0):e===102?(t.lastIntValue=12,t.advance(),!0):e===114?(t.lastIntValue=13,t.advance(),!0):!1};he.regexp_eatControlLetter=function(t){var e=t.current();return KD(e)?(t.lastIntValue=e%32,t.advance(),!0):!1};function KD(t){return t>=65&&t<=90||t>=97&&t<=122}he.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){e===void 0&&(e=!1);var r=t.pos,i=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var n=t.lastIntValue;if(i&&n>=55296&&n<=56319){var s=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=(n-55296)*1024+(o-56320)+65536,!0}t.pos=s,t.lastIntValue=n}return!0}if(i&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&BX(t.lastIntValue))return!0;i&&t.raise("Invalid unicode escape"),t.pos=r}return!1};function BX(t){return t>=0&&t<=1114111}he.regexp_eatIdentityEscape=function(t){if(t.switchU)return this.regexp_eatSyntaxCharacter(t)?!0:t.eat(47)?(t.lastIntValue=47,!0):!1;var e=t.current();return e!==99&&(!t.switchN||e!==107)?(t.lastIntValue=e,t.advance(),!0):!1};he.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();while((e=t.current())>=48&&e<=57);return!0}return!1};he.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(FX(e))return t.lastIntValue=-1,t.advance(),!0;if(t.switchU&&this.options.ecmaVersion>=9&&(e===80||e===112)){if(t.lastIntValue=-1,t.advance(),t.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(t)&&t.eat(125))return!0;t.raise("Invalid property name")}return!1};function FX(t){return t===100||t===68||t===115||t===83||t===119||t===87}he.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var r=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var i=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,r,i),!0}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var n=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,n),!0}return!1};he.regexp_validateUnicodePropertyNameAndValue=function(t,e,r){Kp(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(r)||t.raise("Invalid property value")};he.regexp_validateUnicodePropertyNameOrValue=function(t,e){t.unicodeProperties.binary.test(e)||t.raise("Invalid property name")};he.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";XD(e=t.current());)t.lastStringValue+=Am(e),t.advance();return t.lastStringValue!==""};function XD(t){return KD(t)||t===95}he.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";UX(e=t.current());)t.lastStringValue+=Am(e),t.advance();return t.lastStringValue!==""};function UX(t){return XD(t)||Em(t)}he.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)};he.regexp_eatCharacterClass=function(t){if(t.eat(91)){if(t.eat(94),this.regexp_classRanges(t),t.eat(93))return!0;t.raise("Unterminated character class")}return!1};he.regexp_classRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var r=t.lastIntValue;t.switchU&&(e===-1||r===-1)&&t.raise("Invalid character class"),e!==-1&&r!==-1&&e>r&&t.raise("Range out of order in character class")}}};he.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var r=t.current();(r===99||YD(r))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var i=t.current();return i!==93?(t.lastIntValue=i,t.advance(),!0):!1};he.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)};he.regexp_eatClassControlLetter=function(t){var e=t.current();return Em(e)||e===95?(t.lastIntValue=e%32,t.advance(),!0):!1};he.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1};he.regexp_eatDecimalDigits=function(t){var e=t.pos,r=0;for(t.lastIntValue=0;Em(r=t.current());)t.lastIntValue=10*t.lastIntValue+(r-48),t.advance();return t.pos!==e};function Em(t){return t>=48&&t<=57}he.regexp_eatHexDigits=function(t){var e=t.pos,r=0;for(t.lastIntValue=0;zD(r=t.current());)t.lastIntValue=16*t.lastIntValue+JD(r),t.advance();return t.pos!==e};function zD(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function JD(t){return t>=65&&t<=70?10+(t-65):t>=97&&t<=102?10+(t-97):t-48}he.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var r=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=e*64+r*8+t.lastIntValue:t.lastIntValue=e*8+r}else t.lastIntValue=e;return!0}return!1};he.regexp_eatOctalDigit=function(t){var e=t.current();return YD(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)};function YD(t){return t>=48&&t<=55}he.regexp_eatFixedHexDigits=function(t,e){var r=t.pos;t.lastIntValue=0;for(var i=0;i<e;++i){var n=t.current();if(!zD(n))return t.pos=r,!1;t.lastIntValue=16*t.lastIntValue+JD(n),t.advance()}return!0};var Jp=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Pa(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},xe=ft.prototype;xe.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Jp(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};xe.getToken=function(){return this.next(),new Jp(this)};typeof Symbol<"u"&&(xe[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===h.eof,value:e}}}});xe.nextToken=function(){var t=this.curContext();if((!t||!t.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(h.eof);if(t.override)return t.override(this);this.readToken(this.fullCharCodeAtPos())};xe.readToken=function(t){return ps(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)};xe.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=56320)return t;var e=this.input.charCodeAt(this.pos+1);return e<=56319||e>=57344?t:(t<<10)+e-56613888};xe.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var i=void 0,n=e;(i=ID(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,r),e,this.pos,t,this.curPosition())};xe.skipLineComment=function(t){for(var e=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!Dn(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,r,this.curPosition())};xe.skipSpace=function(){e:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(t>8&&t<14||t>=5760&&SD.test(String.fromCharCode(t)))++this.pos;else break e}}};xe.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=t,this.value=e,this.updateContext(r)};xe.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&e===46?(this.pos+=3,this.finishToken(h.ellipsis)):(++this.pos,this.finishToken(h.dot))};xe.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(h.assign,2):this.finishOp(h.slash,1)};xe.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),r=1,i=t===42?h.star:h.modulo;return this.options.ecmaVersion>=7&&t===42&&e===42&&(++r,i=h.starstar,e=this.input.charCodeAt(this.pos+2)),e===61?this.finishOp(h.assign,r+1):this.finishOp(i,r)};xe.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(h.assign,3)}return this.finishOp(t===124?h.logicalOR:h.logicalAND,2)}return e===61?this.finishOp(h.assign,2):this.finishOp(t===124?h.bitwiseOR:h.bitwiseAND,1)};xe.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(h.assign,2):this.finishOp(h.bitwiseXOR,1)};xe.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Br.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(h.incDec,2):e===61?this.finishOp(h.assign,2):this.finishOp(h.plusMin,1)};xe.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),r=1;return e===t?(r=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(h.assign,r+1):this.finishOp(h.bitShift,r)):e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(e===61&&(r=2),this.finishOp(h.relational,r))};xe.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(h.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&e===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(h.arrow)):this.finishOp(t===61?h.eq:h.prefix,1)};xe.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(h.questionDot,2)}if(e===63){if(t>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(h.assign,3)}return this.finishOp(h.coalesce,2)}}return this.finishOp(h.question,1)};xe.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13&&(++this.pos,e=this.fullCharCodeAtPos(),ps(e,!0)||e===92))return this.finishToken(h.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+xm(e)+"'")};xe.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(h.parenL);case 41:return++this.pos,this.finishToken(h.parenR);case 59:return++this.pos,this.finishToken(h.semi);case 44:return++this.pos,this.finishToken(h.comma);case 91:return++this.pos,this.finishToken(h.bracketL);case 93:return++this.pos,this.finishToken(h.bracketR);case 123:return++this.pos,this.finishToken(h.braceL);case 125:return++this.pos,this.finishToken(h.braceR);case 58:return++this.pos,this.finishToken(h.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(h.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(h.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+xm(t)+"'")};xe.finishOp=function(t,e){var r=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,r)};xe.readRegexp=function(){for(var t,e,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(Br.test(i)&&this.raise(r,"Unterminated regular expression"),t)t=!1;else{if(i==="[")e=!0;else if(i==="]"&&e)e=!1;else if(i==="/"&&!e)break;t=i==="\\"}++this.pos}var n=this.input.slice(r,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new fs(this));a.reset(r,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(n,o)}catch{}return this.finishToken(h.regexp,{pattern:n,flags:o,value:u})};xe.readInt=function(t,e,r){for(var i=this.options.ecmaVersion>=12&&e===void 0,n=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,o=0,a=0,u=0,c=e??1/0;u<c;++u,++this.pos){var l=this.input.charCodeAt(this.pos),p=void 0;if(i&&l===95){n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),a===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),u===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=l;continue}if(l>=97?p=l-97+10:l>=65?p=l-65+10:l>=48&&l<=57?p=l-48:p=1/0,p>=t)break;a=l,o=o*t+p}return i&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||e!=null&&this.pos-s!==e?null:o};function jX(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function QD(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}xe.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var r=this.readInt(t);return r==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=QD(this.input.slice(e,this.pos)),++this.pos):ps(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(h.num,r)};xe.readNumber=function(t){var e=this.pos;!t&&this.readInt(10,void 0,!0)===null&&this.raise(e,"Invalid number");var r=this.pos-e>=2&&this.input.charCodeAt(e)===48;r&&this.strict&&this.raise(e,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!t&&this.options.ecmaVersion>=11&&i===110){var n=QD(this.input.slice(e,this.pos));return++this.pos,ps(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(h.num,n)}r&&/[89]/.test(this.input.slice(e,this.pos))&&(r=!1),i===46&&!r&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!r&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(e,"Invalid number")),ps(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=jX(this.input.slice(e,this.pos),r);return this.finishToken(h.num,s)};xe.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else e=this.readHexChar(4);return e};function xm(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}xe.readString=function(t){for(var e="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===t)break;i===92?(e+=this.input.slice(r,this.pos),e+=this.readEscapedChar(!1),r=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Dn(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(r,this.pos++),this.finishToken(h.string,e)};var ZD={};xe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===ZD)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};xe.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ZD;this.raise(t,e)};xe.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===h.template||this.type===h.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(h.dollarBraceL)):(++this.pos,this.finishToken(h.backQuote)):(t+=this.input.slice(e,this.pos),this.finishToken(h.template,t));if(r===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(Dn(r)){switch(t+=this.input.slice(e,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=`
`;break;default:t+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}};xe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(h.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};xe.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return xm(this.readCodePoint());case 116:return"	";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var r=this.pos-1;return this.invalidStringToken(r,"Invalid escape sequence in template string"),null}default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),(i!=="0"||e===56||e===57)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return Dn(e)?"":String.fromCharCode(e)}};xe.readHexChar=function(t){var e=this.pos,r=this.readInt(16,t);return r===null&&this.invalidStringToken(e,"Bad character escape sequence"),r};xe.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(cc(n,i))this.pos+=n<=65535?1:2;else if(n===92){this.containsEsc=!0,t+=this.input.slice(r,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?ps:cc)(o,i)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=xm(o),r=this.pos}else break;e=!1}return t+this.input.slice(r,this.pos)};xe.readWord=function(){var t=this.readWord1(),e=h.name;return this.keywords.test(t)&&(e=v_[t]),this.finishToken(e,t)};var qX="8.7.0";ft.acorn={Parser:ft,version:qX,defaultOptions:Vp,Position:Wp,SourceLocation:Pa,getLineInfo:lc,Node:no,TokenType:Te,tokTypes:h,keywordTypes:v_,TokContext:ji,tokContexts:tt,isIdentifierChar:cc,isIdentifierStart:ps,Token:Jp,isNewLine:Dn,lineBreak:Br,lineBreakG:Im,nonASCIIwhitespace:SD};function eT(t,e){return ft.parse(t,e)}function Lm(t,e,r){return ft.parseExpressionAt(t,e,r)}var vT=w("crypto");var{stringify:WX}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");var Cm={"||":3,"&&":4,"|":5,"??":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Wi=17,VX={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Wi,ClassExpression:Wi,FunctionExpression:Wi,ObjectExpression:Wi,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function dc(t,e){let{generator:r}=t;if(t.write("("),e!=null&&e.length>0){r[e[0].type](e[0],t);let{length:i}=e;for(let n=1;n<i;n++){let s=e[n];t.write(", "),r[s.type](s,t)}}t.write(")")}function aT(t,e,r,i){let n=t.expressionsPrecedence[e.type];if(n===Wi)return!0;let s=t.expressionsPrecedence[r.type];return n!==s?!i&&n===15&&s===14&&r.operator==="**"||n<s:n!==13&&n!==14?!1:e.operator==="**"&&r.operator==="**"?!i:i?Cm[e.operator]<=Cm[r.operator]:Cm[e.operator]<Cm[r.operator]}function Pm(t,e,r,i){let{generator:n}=t;aT(t,e,r,i)?(t.write("("),n[e.type](e,t),t.write(")")):n[e.type](e,t)}function GX(t,e,r,i){let n=e.split(`
`),s=n.length-1;if(t.write(n[0].trim()),s>0){t.write(i);for(let o=1;o<s;o++)t.write(r+n[o].trim()+i);t.write(r+n[s].trim())}}function wr(t,e,r,i){let{length:n}=e;for(let s=0;s<n;s++){let o=e[s];t.write(r),o.type[0]==="L"?t.write("// "+o.value.trim()+`
`,o):(t.write("/*"),GX(t,o.value,r,i),t.write("*/"+i))}}function KX(t){let e=t;for(;e!=null;){let{type:r}=e;if(r[0]==="C"&&r[1]==="a")return!0;if(r[0]==="M"&&r[1]==="e"&&r[2]==="m")e=e.object;else return!1}}function x_(t,e){let{generator:r}=t,{declarations:i}=e;t.write(e.kind+" ");let{length:n}=i;if(n>0){r.VariableDeclarator(i[0],t);for(let s=1;s<n;s++)t.write(", "),r.VariableDeclarator(i[s],t)}}var tT,rT,iT,nT,sT,oT,XX={Program(t,e){let r=e.indent.repeat(e.indentLevel),{lineEnd:i,writeComments:n}=e;n&&t.comments!=null&&wr(e,t.comments,r,i);let s=t.body,{length:o}=s;for(let a=0;a<o;a++){let u=s[a];n&&u.comments!=null&&wr(e,u.comments,r,i),e.write(r),this[u.type](u,e),e.write(i)}n&&t.trailingComments!=null&&wr(e,t.trailingComments,r,i)},BlockStatement:oT=function(t,e){let r=e.indent.repeat(e.indentLevel++),{lineEnd:i,writeComments:n}=e,s=r+e.indent;e.write("{");let o=t.body;if(o!=null&&o.length>0){e.write(i),n&&t.comments!=null&&wr(e,t.comments,s,i);let{length:a}=o;for(let u=0;u<a;u++){let c=o[u];n&&c.comments!=null&&wr(e,c.comments,s,i),e.write(s),this[c.type](c,e),e.write(i)}e.write(r)}else n&&t.comments!=null&&(e.write(i),wr(e,t.comments,s,i),e.write(r));n&&t.trailingComments!=null&&wr(e,t.trailingComments,s,i),e.write("}"),e.indentLevel--},ClassBody:oT,StaticBlock(t,e){e.write("static "),this.BlockStatement(t,e)},EmptyStatement(t,e){e.write(";")},ExpressionStatement(t,e){let r=e.expressionsPrecedence[t.expression.type];r===Wi||r===3&&t.expression.left.type[0]==="O"?(e.write("("),this[t.expression.type](t.expression,e),e.write(")")):this[t.expression.type](t.expression,e),e.write(";")},IfStatement(t,e){e.write("if ("),this[t.test.type](t.test,e),e.write(") "),this[t.consequent.type](t.consequent,e),t.alternate!=null&&(e.write(" else "),this[t.alternate.type](t.alternate,e))},LabeledStatement(t,e){this[t.label.type](t.label,e),e.write(": "),this[t.body.type](t.body,e)},BreakStatement(t,e){e.write("break"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},ContinueStatement(t,e){e.write("continue"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},WithStatement(t,e){e.write("with ("),this[t.object.type](t.object,e),e.write(") "),this[t.body.type](t.body,e)},SwitchStatement(t,e){let r=e.indent.repeat(e.indentLevel++),{lineEnd:i,writeComments:n}=e;e.indentLevel++;let s=r+e.indent,o=s+e.indent;e.write("switch ("),this[t.discriminant.type](t.discriminant,e),e.write(") {"+i);let{cases:a}=t,{length:u}=a;for(let c=0;c<u;c++){let l=a[c];n&&l.comments!=null&&wr(e,l.comments,s,i),l.test?(e.write(s+"case "),this[l.test.type](l.test,e),e.write(":"+i)):e.write(s+"default:"+i);let{consequent:p}=l,{length:f}=p;for(let H=0;H<f;H++){let m=p[H];n&&m.comments!=null&&wr(e,m.comments,o,i),e.write(o),this[m.type](m,e),e.write(i)}}e.indentLevel-=2,e.write(r+"}")},ReturnStatement(t,e){e.write("return"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e)),e.write(";")},ThrowStatement(t,e){e.write("throw "),this[t.argument.type](t.argument,e),e.write(";")},TryStatement(t,e){if(e.write("try "),this[t.block.type](t.block,e),t.handler){let{handler:r}=t;r.param==null?e.write(" catch "):(e.write(" catch ("),this[r.param.type](r.param,e),e.write(") ")),this[r.body.type](r.body,e)}t.finalizer&&(e.write(" finally "),this[t.finalizer.type](t.finalizer,e))},WhileStatement(t,e){e.write("while ("),this[t.test.type](t.test,e),e.write(") "),this[t.body.type](t.body,e)},DoWhileStatement(t,e){e.write("do "),this[t.body.type](t.body,e),e.write(" while ("),this[t.test.type](t.test,e),e.write(");")},ForStatement(t,e){if(e.write("for ("),t.init!=null){let{init:r}=t;r.type[0]==="V"?x_(e,r):this[r.type](r,e)}e.write("; "),t.test&&this[t.test.type](t.test,e),e.write("; "),t.update&&this[t.update.type](t.update,e),e.write(") "),this[t.body.type](t.body,e)},ForInStatement:tT=function(t,e){e.write(`for ${t.await?"await ":""}(`);let{left:r}=t;r.type[0]==="V"?x_(e,r):this[r.type](r,e),e.write(t.type[3]==="I"?" in ":" of "),this[t.right.type](t.right,e),e.write(") "),this[t.body.type](t.body,e)},ForOfStatement:tT,DebuggerStatement(t,e){e.write("debugger;",t)},FunctionDeclaration:rT=function(t,e){e.write((t.async?"async ":"")+(t.generator?"function* ":"function ")+(t.id?t.id.name:""),t),dc(e,t.params),e.write(" "),this[t.body.type](t.body,e)},FunctionExpression:rT,VariableDeclaration(t,e){x_(e,t),e.write(";")},VariableDeclarator(t,e){this[t.id.type](t.id,e),t.init!=null&&(e.write(" = "),this[t.init.type](t.init,e))},ClassDeclaration(t,e){if(e.write("class "+(t.id?`${t.id.name} `:""),t),t.superClass){e.write("extends ");let{superClass:r}=t,{type:i}=r,n=e.expressionsPrecedence[i];(i[0]!=="C"||i[1]!=="l"||i[5]!=="E")&&(n===Wi||n<e.expressionsPrecedence.ClassExpression)?(e.write("("),this[t.superClass.type](r,e),e.write(")")):this[r.type](r,e),e.write(" ")}this.ClassBody(t.body,e)},ImportDeclaration(t,e){e.write("import ");let{specifiers:r}=t,{length:i}=r,n=0;if(i>0){for(;n<i;){n>0&&e.write(", ");let s=r[n],o=s.type[6];if(o==="D")e.write(s.local.name,s),n++;else if(o==="N")e.write("* as "+s.local.name,s),n++;else break}if(n<i){for(e.write("{");;){let s=r[n],{name:o}=s.imported;if(e.write(o,s),o!==s.local.name&&e.write(" as "+s.local.name),++n<i)e.write(", ");else break}e.write("}")}e.write(" from ")}this.Literal(t.source,e),e.write(";")},ImportExpression(t,e){e.write("import("),this[t.source.type](t.source,e),e.write(")")},ExportDefaultDeclaration(t,e){e.write("export default "),this[t.declaration.type](t.declaration,e),e.expressionsPrecedence[t.declaration.type]!=null&&t.declaration.type[0]!=="F"&&e.write(";")},ExportNamedDeclaration(t,e){if(e.write("export "),t.declaration)this[t.declaration.type](t.declaration,e);else{e.write("{");let{specifiers:r}=t,{length:i}=r;if(i>0)for(let n=0;;){let s=r[n],{name:o}=s.local;if(e.write(o,s),o!==s.exported.name&&e.write(" as "+s.exported.name),++n<i)e.write(", ");else break}e.write("}"),t.source&&(e.write(" from "),this.Literal(t.source,e)),e.write(";")}},ExportAllDeclaration(t,e){t.exported!=null?e.write("export * as "+t.exported.name+" from "):e.write("export * from "),this.Literal(t.source,e),e.write(";")},MethodDefinition(t,e){t.static&&e.write("static ");let r=t.kind[0];(r==="g"||r==="s")&&e.write(t.kind+" "),t.value.async&&e.write("async "),t.value.generator&&e.write("*"),t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),dc(e,t.value.params),e.write(" "),this[t.value.body.type](t.value.body,e)},ClassExpression(t,e){this.ClassDeclaration(t,e)},ArrowFunctionExpression(t,e){e.write(t.async?"async ":"",t);let{params:r}=t;r!=null&&(r.length===1&&r[0].type[0]==="I"?e.write(r[0].name,r[0]):dc(e,t.params)),e.write(" => "),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:iT=function(t,e){e.write("..."),this[t.argument.type](t.argument,e)},SpreadElement:iT,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),Pm(e,t.argument,t)},TemplateLiteral(t,e){let{quasis:r,expressions:i}=t;e.write("`");let{length:n}=i;for(let o=0;o<n;o++){let a=i[o],u=r[o];e.write(u.value.raw,u),e.write("${"),this[a.type](a,e),e.write("}")}let s=r[r.length-1];e.write(s.value.raw,s),e.write("`")},TemplateElement(t,e){e.write(t.value.raw,t)},TaggedTemplateExpression(t,e){Pm(e,t.tag,t),this[t.quasi.type](t.quasi,e)},ArrayExpression:sT=function(t,e){if(e.write("["),t.elements.length>0){let{elements:r}=t,{length:i}=r;for(let n=0;;){let s=r[n];if(s!=null&&this[s.type](s,e),++n<i)e.write(", ");else{s==null&&e.write(", ");break}}}e.write("]")},ArrayPattern:sT,ObjectExpression(t,e){let r=e.indent.repeat(e.indentLevel++),{lineEnd:i,writeComments:n}=e,s=r+e.indent;if(e.write("{"),t.properties.length>0){e.write(i),n&&t.comments!=null&&wr(e,t.comments,s,i);let o=","+i,{properties:a}=t,{length:u}=a;for(let c=0;;){let l=a[c];if(n&&l.comments!=null&&wr(e,l.comments,s,i),e.write(s),this[l.type](l,e),++c<u)e.write(o);else break}e.write(i),n&&t.trailingComments!=null&&wr(e,t.trailingComments,s,i),e.write(r+"}")}else n?t.comments!=null?(e.write(i),wr(e,t.comments,s,i),t.trailingComments!=null&&wr(e,t.trailingComments,s,i),e.write(r+"}")):t.trailingComments!=null?(e.write(i),wr(e,t.trailingComments,s,i),e.write(r+"}")):e.write("}"):e.write("}");e.indentLevel--},Property(t,e){t.method||t.kind[0]!=="i"?this.MethodDefinition(t,e):(t.shorthand||(t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),e.write(": ")),this[t.value.type](t.value,e))},PropertyDefinition(t,e){t.static&&e.write("static "),this[t.key.type](t.key,e),e.write(" = "),this[t.value.type](t.value,e)},ObjectPattern(t,e){if(e.write("{"),t.properties.length>0){let{properties:r}=t,{length:i}=r;for(let n=0;this[r[n].type](r[n],e),++n<i;)e.write(", ")}e.write("}")},SequenceExpression(t,e){dc(e,t.expressions)},UnaryExpression(t,e){if(t.prefix){let{operator:r,argument:i,argument:{type:n}}=t;e.write(r);let s=aT(e,i,t);!s&&(r.length>1||n[0]==="U"&&(n[1]==="n"||n[1]==="p")&&i.prefix&&i.operator[0]===r&&(r==="+"||r==="-"))&&e.write(" "),s?(e.write(r.length>1?" (":"("),this[n](i,e),e.write(")")):this[n](i,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:nT=function(t,e){let r=t.operator==="in";r&&e.write("("),Pm(e,t.left,t,!1),e.write(" "+t.operator+" "),Pm(e,t.right,t,!0),r&&e.write(")")},LogicalExpression:nT,ConditionalExpression(t,e){let{test:r}=t,i=e.expressionsPrecedence[r.type];i===Wi||i<=e.expressionsPrecedence.ConditionalExpression?(e.write("("),this[r.type](r,e),e.write(")")):this[r.type](r,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 r=e.expressionsPrecedence[t.callee.type];r===Wi||r<e.expressionsPrecedence.CallExpression||KX(t.callee)?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),dc(e,t.arguments)},CallExpression(t,e){let r=e.expressionsPrecedence[t.callee.type];r===Wi||r<e.expressionsPrecedence.CallExpression?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),t.optional&&e.write("?."),dc(e,t.arguments)},ChainExpression(t,e){this[t.expression.type](t.expression,e)},MemberExpression(t,e){let r=e.expressionsPrecedence[t.object.type];r===Wi||r<e.expressionsPrecedence.MemberExpression?(e.write("("),this[t.object.type](t.object,e),e.write(")")):this[t.object.type](t.object,e),t.computed?(t.optional&&e.write("?."),e.write("["),this[t.property.type](t.property,e),e.write("]")):(t.optional?e.write("?."):e.write("."),this[t.property.type](t.property,e))},MetaProperty(t,e){e.write(t.meta.name+"."+t.property.name,t)},Identifier(t,e){e.write(t.name,t)},PrivateIdentifier(t,e){e.write(`#${t.name}`,t)},Literal(t,e){t.raw!=null?e.write(t.raw,t):t.regex!=null?this.RegExpLiteral(t,e):t.bigint!=null?e.write(t.bigint+"n",t):e.write(WX(t.value),t)},RegExpLiteral(t,e){let{regex:r}=t;e.write(`/${r.pattern}/${r.flags}`,t)}},zX={};var L_=class{constructor(e){let r=e??zX;this.output="",r.output!=null?(this.output=r.output,this.write=this.writeToStream):this.output="",this.generator=r.generator!=null?r.generator:XX,this.expressionsPrecedence=r.expressionsPrecedence!=null?r.expressionsPrecedence:VX,this.indent=r.indent!=null?r.indent:"  ",this.lineEnd=r.lineEnd!=null?r.lineEnd:`
`,this.indentLevel=r.startingIndentLevel!=null?r.startingIndentLevel:0,this.writeComments=r.comments?r.comments:!1,r.sourceMap!=null&&(this.write=r.output==null?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=r.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split(`
`).length-1,this.mapping={original:null,generated:this,name:void 0,source:r.sourceMap.file||r.sourceMap._file})}write(e){this.output+=e}writeToStream(e){this.output.write(e)}writeAndMap(e,r){this.output+=e,this.map(e,r)}writeToStreamAndMap(e,r){this.output.write(e),this.map(e,r)}map(e,r){if(r!=null){let{type:s}=r;if(s[0]==="L"&&s[2]==="n"){this.column=0,this.line++;return}if(r.loc!=null){let{mapping:o}=this;o.original=r.loc.start,o.name=r.name,this.sourceMap.addMapping(o)}if(s[0]==="T"&&s[8]==="E"||s[0]==="L"&&s[1]==="i"&&typeof r.value=="string"){let{length:o}=e,{column:a,line:u}=this;for(let c=0;c<o;c++)e[c]===`
`?(a=0,u++):a++;this.column=a,this.line=u;return}}let{length:i}=e,{lineEnd:n}=this;i>0&&(this.lineEndSize>0&&(n.length===1?e[i-1]===n:e.endsWith(n))?(this.line+=this.lineEndSize,this.column=0):this.column+=i)}toString(){return this.output}};function ds(t,e){let r=new L_(e);return r.generator[t.type](t,r),r.output}var hc=F(Dm()),Yp=F(Gh());var Tm="\u2716";function zr(t){return t.name===Tm}function cT(){}var ze=function(e,r){if(r===void 0&&(r={}),this.toks=this.constructor.BaseParser.tokenizer(e,r),this.options=this.toks.options,this.input=this.toks.input,this.tok=this.last={type:h.eof,start:0,end:0},this.tok.validateRegExpFlags=cT,this.tok.validateRegExpPattern=cT,this.options.locations){var i=this.toks.curPosition();this.tok.loc=new Pa(this.toks,i,i)}this.ahead=[],this.context=[],this.curIndent=0,this.curLineStart=0,this.nextLineStart=this.lineEnd(this.curLineStart)+1,this.inAsync=!1,this.inGenerator=!1,this.inFunction=!1};ze.prototype.startNode=function(){return new no(this.toks,this.tok.start,this.options.locations?this.tok.loc.start:null)};ze.prototype.storeCurrentPos=function(){return this.options.locations?[this.tok.start,this.tok.loc.start]:this.tok.start};ze.prototype.startNodeAt=function(e){return this.options.locations?new no(this.toks,e[0],e[1]):new no(this.toks,e)};ze.prototype.finishNode=function(e,r){return e.type=r,e.end=this.last.end,this.options.locations&&(e.loc.end=this.last.loc.end),this.options.ranges&&(e.range[1]=this.last.end),e};ze.prototype.dummyNode=function(e){var r=this.startNode();return r.type=e,r.end=r.start,this.options.locations&&(r.loc.end=r.loc.start),this.options.ranges&&(r.range[1]=r.start),this.last={type:h.name,start:r.start,end:r.start,loc:r.loc},r};ze.prototype.dummyIdent=function(){var e=this.dummyNode("Identifier");return e.name=Tm,e};ze.prototype.dummyString=function(){var e=this.dummyNode("Literal");return e.value=e.raw=Tm,e};ze.prototype.eat=function(e){return this.tok.type===e?(this.next(),!0):!1};ze.prototype.isContextual=function(e){return this.tok.type===h.name&&this.tok.value===e};ze.prototype.eatContextual=function(e){return this.tok.value===e&&this.eat(h.name)};ze.prototype.canInsertSemicolon=function(){return this.tok.type===h.eof||this.tok.type===h.braceR||Br.test(this.input.slice(this.last.end,this.tok.start))};ze.prototype.semicolon=function(){return this.eat(h.semi)};ze.prototype.expect=function(e){if(this.eat(e))return!0;for(var r=1;r<=2;r++)if(this.lookAhead(r).type===e){for(var i=0;i<r;i++)this.next();return!0}};ze.prototype.pushCx=function(){this.context.push(this.curIndent)};ze.prototype.popCx=function(){this.curIndent=this.context.pop()};ze.prototype.lineEnd=function(e){for(;e<this.input.length&&!Dn(this.input.charCodeAt(e));)++e;return e};ze.prototype.indentationAfter=function(e){for(var r=0;;++e){var i=this.input.charCodeAt(e);if(i===32)++r;else if(i===9)r+=this.options.tabSize;else return r}};ze.prototype.closes=function(e,r,i,n){return this.tok.type===e||this.tok.type===h.eof?!0:i!==this.curLineStart&&this.curIndent<r&&this.tokenStartsLine()&&(!n||this.nextLineStart>=this.input.length||this.indentationAfter(this.nextLineStart)<r)};ze.prototype.tokenStartsLine=function(){for(var e=this.tok.start-1;e>=this.curLineStart;--e){var r=this.input.charCodeAt(e);if(r!==9&&r!==32)return!1}return!0};ze.prototype.extend=function(e,r){this[e]=r(this[e])};ze.prototype.parse=function(){return this.next(),this.parseTopLevel()};ze.extend=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];for(var i=this,n=0;n<e.length;n++)i=e[n](i);return i};ze.parse=function(e,r){return new this(e,r).parse()};ze.BaseParser=ft;var $m=ze.prototype;function JX(t){return t<14&&t>8||t===32||t===160||Dn(t)}$m.next=function(){if(this.last=this.tok,this.ahead.length?this.tok=this.ahead.shift():this.tok=this.readToken(),this.tok.start>=this.nextLineStart){for(;this.tok.start>=this.nextLineStart;)this.curLineStart=this.nextLineStart,this.nextLineStart=this.lineEnd(this.curLineStart)+1;this.curIndent=this.indentationAfter(this.curLineStart)}};$m.readToken=function(){for(;;)try{return this.toks.next(),this.toks.type===h.dot&&this.input.substr(this.toks.end,1)==="."&&this.options.ecmaVersion>=6&&(this.toks.end++,this.toks.type=h.ellipsis),new Jp(this.toks)}catch(s){if(!(s instanceof SyntaxError))throw s;var t=s.message,e=s.raisedAt,r=!0;if(/unterminated/i.test(t))if(e=this.lineEnd(s.pos+1),/string/.test(t))r={start:s.pos,end:e,type:h.string,value:this.input.slice(s.pos+1,e)};else if(/regular expr/i.test(t)){var i=this.input.slice(s.pos,e);try{i=new RegExp(i)}catch{}r={start:s.pos,end:e,type:h.regexp,value:i}}else/template/.test(t)?r={start:s.pos,end:e,type:h.template,value:this.input.slice(s.pos,e)}:r=!1;else if(/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(t))for(;e<this.input.length&&!JX(this.input.charCodeAt(e));)++e;else if(/character escape|expected hexadecimal/i.test(t))for(;e<this.input.length;){var n=this.input.charCodeAt(e++);if(n===34||n===39||Dn(n))break}else if(/unexpected character/i.test(t))e++,r=!1;else if(/regular expression/i.test(t))r=!0;else throw s;if(this.resetTo(e),r===!0&&(r={start:e,end:e,type:h.name,value:Tm}),r)return this.options.locations&&(r.loc=new Pa(this.toks,lc(this.input,r.start),lc(this.input,r.end))),r}};$m.resetTo=function(t){this.toks.pos=t;var e=this.input.charAt(t-1);if(this.toks.exprAllowed=!e||/[[{(,;:?/*=+\-~!|&%^<>]/.test(e)||/[enwfd]/.test(e)&&/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(t-10,t)),this.options.locations){this.toks.curLine=1,this.toks.lineStart=Im.lastIndex=0;for(var r;(r=Im.exec(this.input))&&r.index<t;)++this.toks.curLine,this.toks.lineStart=r.index+r[0].length}};$m.lookAhead=function(t){for(;t>this.ahead.length;)this.ahead.push(this.readToken());return this.ahead[t-1]};var er=ze.prototype;er.parseTopLevel=function(){var t=this.startNodeAt(this.options.locations?[0,lc(this.input,0)]:0);for(t.body=[];this.tok.type!==h.eof;)t.body.push(this.parseStatement());return this.toks.adaptDirectivePrologue(t.body),this.last=this.tok,t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};er.parseStatement=function(){var t=this.tok.type,e=this.startNode(),r;switch(this.toks.isLet()&&(t=h._var,r="let"),t){case h._break:case h._continue:this.next();var i=t===h._break;return this.semicolon()||this.canInsertSemicolon()?e.label=null:(e.label=this.tok.type===h.name?this.parseIdent():null,this.semicolon()),this.finishNode(e,i?"BreakStatement":"ContinueStatement");case h._debugger:return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement");case h._do:return this.next(),e.body=this.parseStatement(),e.test=this.eat(h._while)?this.parseParenExpression():this.dummyIdent(),this.semicolon(),this.finishNode(e,"DoWhileStatement");case h._for:this.next();var n=this.options.ecmaVersion>=9&&this.eatContextual("await");if(this.pushCx(),this.expect(h.parenL),this.tok.type===h.semi)return this.parseFor(e,null);var s=this.toks.isLet();if(s||this.tok.type===h._var||this.tok.type===h._const){var o=this.parseVar(this.startNode(),!0,s?"let":this.tok.value);return o.declarations.length===1&&(this.tok.type===h._in||this.isContextual("of"))?(this.options.ecmaVersion>=9&&this.tok.type!==h._in&&(e.await=n),this.parseForIn(e,o)):this.parseFor(e,o)}var a=this.parseExpression(!0);return this.tok.type===h._in||this.isContextual("of")?(this.options.ecmaVersion>=9&&this.tok.type!==h._in&&(e.await=n),this.parseForIn(e,this.toAssignable(a))):this.parseFor(e,a);case h._function:return this.next(),this.parseFunction(e,!0);case h._if:return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(),e.alternate=this.eat(h._else)?this.parseStatement():null,this.finishNode(e,"IfStatement");case h._return:return this.next(),this.eat(h.semi)||this.canInsertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement");case h._switch:var u=this.curIndent,c=this.curLineStart;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.pushCx(),this.expect(h.braceL);for(var l;!this.closes(h.braceR,u,c,!0);)if(this.tok.type===h._case||this.tok.type===h._default){var p=this.tok.type===h._case;l&&this.finishNode(l,"SwitchCase"),e.cases.push(l=this.startNode()),l.consequent=[],this.next(),p?l.test=this.parseExpression():l.test=null,this.expect(h.colon)}else l||(e.cases.push(l=this.startNode()),l.consequent=[],l.test=null),l.consequent.push(this.parseStatement());return l&&this.finishNode(l,"SwitchCase"),this.popCx(),this.eat(h.braceR),this.finishNode(e,"SwitchStatement");case h._throw:return this.next(),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement");case h._try:if(this.next(),e.block=this.parseBlock(),e.handler=null,this.tok.type===h._catch){var f=this.startNode();this.next(),this.eat(h.parenL)?(f.param=this.toAssignable(this.parseExprAtom(),!0),this.expect(h.parenR)):f.param=null,f.body=this.parseBlock(),e.handler=this.finishNode(f,"CatchClause")}return e.finalizer=this.eat(h._finally)?this.parseBlock():null,!e.handler&&!e.finalizer?e.block:this.finishNode(e,"TryStatement");case h._var:case h._const:return this.parseVar(e,!1,r||this.tok.value);case h._while:return this.next(),e.test=this.parseParenExpression(),e.body=this.parseStatement(),this.finishNode(e,"WhileStatement");case h._with:return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(),this.finishNode(e,"WithStatement");case h.braceL:return this.parseBlock();case h.semi:return this.next(),this.finishNode(e,"EmptyStatement");case h._class:return this.parseClass(!0);case h._import:if(this.options.ecmaVersion>10){var H=this.lookAhead(1).type;if(H===h.parenL||H===h.dot)return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"ExpressionStatement")}return this.parseImport();case h._export:return this.parseExport();default:if(this.toks.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,!0,!0);var m=this.parseExpression();return zr(m)?(this.next(),this.tok.type===h.eof?this.finishNode(e,"EmptyStatement"):this.parseStatement()):t===h.name&&m.type==="Identifier"&&this.eat(h.colon)?(e.body=this.parseStatement(),e.label=m,this.finishNode(e,"LabeledStatement")):(e.expression=m,this.semicolon(),this.finishNode(e,"ExpressionStatement"))}};er.parseBlock=function(){var t=this.startNode();this.pushCx(),this.expect(h.braceL);var e=this.curIndent,r=this.curLineStart;for(t.body=[];!this.closes(h.braceR,e,r,!0);)t.body.push(this.parseStatement());return this.popCx(),this.eat(h.braceR),this.finishNode(t,"BlockStatement")};er.parseFor=function(t,e){return t.init=e,t.test=t.update=null,this.eat(h.semi)&&this.tok.type!==h.semi&&(t.test=this.parseExpression()),this.eat(h.semi)&&this.tok.type!==h.parenR&&(t.update=this.parseExpression()),this.popCx(),this.expect(h.parenR),t.body=this.parseStatement(),this.finishNode(t,"ForStatement")};er.parseForIn=function(t,e){var r=this.tok.type===h._in?"ForInStatement":"ForOfStatement";return this.next(),t.left=e,t.right=this.parseExpression(),this.popCx(),this.expect(h.parenR),t.body=this.parseStatement(),this.finishNode(t,r)};er.parseVar=function(t,e,r){t.kind=r,this.next(),t.declarations=[];do{var i=this.startNode();i.id=this.options.ecmaVersion>=6?this.toAssignable(this.parseExprAtom(),!0):this.parseIdent(),i.init=this.eat(h.eq)?this.parseMaybeAssign(e):null,t.declarations.push(this.finishNode(i,"VariableDeclarator"))}while(this.eat(h.comma));if(!t.declarations.length){var n=this.startNode();n.id=this.dummyIdent(),t.declarations.push(this.finishNode(n,"VariableDeclarator"))}return e||this.semicolon(),this.finishNode(t,"VariableDeclaration")};er.parseClass=function(t){var e=this.startNode();this.next(),this.tok.type===h.name?e.id=this.parseIdent():t===!0?e.id=this.dummyIdent():e.id=null,e.superClass=this.eat(h._extends)?this.parseExpression():null,e.body=this.startNode(),e.body.body=[],this.pushCx();var r=this.curIndent+1,i=this.curLineStart;for(this.eat(h.braceL),this.curIndent+1<r&&(r=this.curIndent,i=this.curLineStart);!this.closes(h.braceR,r,i);){var n=this.parseClassElement();n&&e.body.body.push(n)}return this.popCx(),this.eat(h.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.semicolon(),this.finishNode(e.body,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};er.parseClassElement=function(){if(this.eat(h.semi))return null;var t=this.options,e=t.ecmaVersion,r=t.locations,i=this.curIndent,n=this.curLineStart,s=this.startNode(),o="",a=!1,u=!1,c="method",l=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(h.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.toks.type===h.star?l=!0:o="static"}if(s.static=l,!o&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.toks.type===h.star)&&!this.canInsertSemicolon()?u=!0:o="async"),!o){a=this.eat(h.star);var p=this.toks.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?c=p:o=p)}if(o)s.computed=!1,s.key=this.startNodeAt(r?[this.toks.lastTokStart,this.toks.lastTokStartLoc]:this.toks.lastTokStart),s.key.name=o,this.finishNode(s.key,"Identifier");else if(this.parseClassElementName(s),zr(s.key))return zr(this.parseMaybeAssign())&&this.next(),this.eat(h.comma),null;if(e<13||this.toks.type===h.parenL||c!=="method"||a||u){var f=!s.computed&&!s.static&&!a&&!u&&c==="method"&&(s.key.type==="Identifier"&&s.key.name==="constructor"||s.key.type==="Literal"&&s.key.value==="constructor");s.kind=f?"constructor":c,s.value=this.parseMethod(a,u),this.finishNode(s,"MethodDefinition")}else{if(this.eat(h.eq))if(this.curLineStart!==n&&this.curIndent<=i&&this.tokenStartsLine())s.value=null;else{var H=this.inAsync,m=this.inGenerator;this.inAsync=!1,this.inGenerator=!1,s.value=this.parseMaybeAssign(),this.inAsync=H,this.inGenerator=m}else s.value=null;this.semicolon(),this.finishNode(s,"PropertyDefinition")}return s};er.parseClassStaticBlock=function(t){var e=this.curIndent,r=this.curLineStart;for(t.body=[],this.pushCx();!this.closes(h.braceR,e,r,!0);)t.body.push(this.parseStatement());return this.popCx(),this.eat(h.braceR),this.finishNode(t,"StaticBlock")};er.isClassElementNameStart=function(){return this.toks.isClassElementNameStart()};er.parseClassElementName=function(t){this.toks.type===h.privateId?(t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};er.parseFunction=function(t,e,r){var i=this.inAsync,n=this.inGenerator,s=this.inFunction;return this.initFunction(t),this.options.ecmaVersion>=6&&(t.generator=this.eat(h.star)),this.options.ecmaVersion>=8&&(t.async=!!r),this.tok.type===h.name?t.id=this.parseIdent():e===!0&&(t.id=this.dummyIdent()),this.inAsync=t.async,this.inGenerator=t.generator,this.inFunction=!0,t.params=this.parseFunctionParams(),t.body=this.parseBlock(),this.toks.adaptDirectivePrologue(t.body.body),this.inAsync=i,this.inGenerator=n,this.inFunction=s,this.finishNode(t,e?"FunctionDeclaration":"FunctionExpression")};er.parseExport=function(){var t=this.startNode();if(this.next(),this.eat(h.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?t.exported=this.parseExprAtom():t.exported=null),t.source=this.eatContextual("from")?this.parseExprAtom():this.dummyString(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(h._default)){var e;if(this.tok.type===h._function||(e=this.toks.isAsyncFunction())){var r=this.startNode();this.next(),e&&this.next(),t.declaration=this.parseFunction(r,"nullableID",e)}else this.tok.type===h._class?t.declaration=this.parseClass("nullableID"):(t.declaration=this.parseMaybeAssign(),this.semicolon());return this.finishNode(t,"ExportDefaultDeclaration")}return this.tok.type.keyword||this.toks.isLet()||this.toks.isAsyncFunction()?(t.declaration=this.parseStatement(),t.specifiers=[],t.source=null):(t.declaration=null,t.specifiers=this.parseExportSpecifierList(),t.source=this.eatContextual("from")?this.parseExprAtom():null,this.semicolon()),this.finishNode(t,"ExportNamedDeclaration")};er.parseImport=function(){var t=this.startNode();if(this.next(),this.tok.type===h.string)t.specifiers=[],t.source=this.parseExprAtom();else{var e;this.tok.type===h.name&&this.tok.value!=="from"&&(e=this.startNode(),e.local=this.parseIdent(),this.finishNode(e,"ImportDefaultSpecifier"),this.eat(h.comma)),t.specifiers=this.parseImportSpecifiers(),t.source=this.eatContextual("from")&&this.tok.type===h.string?this.parseExprAtom():this.dummyString(),e&&t.specifiers.unshift(e)}return this.semicolon(),this.finishNode(t,"ImportDeclaration")};er.parseImportSpecifiers=function(){var t=[];if(this.tok.type===h.star){var e=this.startNode();this.next(),e.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),t.push(this.finishNode(e,"ImportNamespaceSpecifier"))}else{var r=this.curIndent,i=this.curLineStart,n=this.nextLineStart;for(this.pushCx(),this.eat(h.braceL),this.curLineStart>n&&(n=this.curLineStart);!this.closes(h.braceR,r+(this.curLineStart<=n?1:0),i);){var s=this.startNode();if(this.eat(h.star))s.local=this.eatContextual("as")?this.parseModuleExportName():this.dummyIdent(),this.finishNode(s,"ImportNamespaceSpecifier");else{if(this.isContextual("from")||(s.imported=this.parseModuleExportName(),zr(s.imported)))break;s.local=this.eatContextual("as")?this.parseModuleExportName():s.imported,this.finishNode(s,"ImportSpecifier")}t.push(s),this.eat(h.comma)}this.eat(h.braceR),this.popCx()}return t};er.parseExportSpecifierList=function(){var t=[],e=this.curIndent,r=this.curLineStart,i=this.nextLineStart;for(this.pushCx(),this.eat(h.braceL),this.curLineStart>i&&(i=this.curLineStart);!this.closes(h.braceR,e+(this.curLineStart<=i?1:0),r)&&!this.isContextual("from");){var n=this.startNode();if(n.local=this.parseModuleExportName(),zr(n.local))break;n.exported=this.eatContextual("as")?this.parseModuleExportName():n.local,this.finishNode(n,"ExportSpecifier"),t.push(n),this.eat(h.comma)}return this.eat(h.braceR),this.popCx(),t};er.parseModuleExportName=function(){return this.options.ecmaVersion>=13&&this.tok.type===h.string?this.parseExprAtom():this.parseIdent()};var qe=ze.prototype;qe.checkLVal=function(t){if(!t)return t;switch(t.type){case"Identifier":case"MemberExpression":return t;case"ParenthesizedExpression":return t.expression=this.checkLVal(t.expression),t;default:return this.dummyIdent()}};qe.parseExpression=function(t){var e=this.storeCurrentPos(),r=this.parseMaybeAssign(t);if(this.tok.type===h.comma){var i=this.startNodeAt(e);for(i.expressions=[r];this.eat(h.comma);)i.expressions.push(this.parseMaybeAssign(t));return this.finishNode(i,"SequenceExpression")}return r};qe.parseParenExpression=function(){this.pushCx(),this.expect(h.parenL);var t=this.parseExpression();return this.popCx(),this.expect(h.parenR),t};qe.parseMaybeAssign=function(t){if(this.inGenerator&&this.toks.isContextual("yield")){var e=this.startNode();return this.next(),this.semicolon()||this.canInsertSemicolon()||this.tok.type!==h.star&&!this.tok.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(h.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")}var r=this.storeCurrentPos(),i=this.parseMaybeConditional(t);if(this.tok.type.isAssign){var n=this.startNodeAt(r);return n.operator=this.tok.value,n.left=this.tok.type===h.eq?this.toAssignable(i):this.checkLVal(i),this.next(),n.right=this.parseMaybeAssign(t),this.finishNode(n,"AssignmentExpression")}return i};qe.parseMaybeConditional=function(t){var e=this.storeCurrentPos(),r=this.parseExprOps(t);if(this.eat(h.question)){var i=this.startNodeAt(e);return i.test=r,i.consequent=this.parseMaybeAssign(),i.alternate=this.expect(h.colon)?this.parseMaybeAssign(t):this.dummyIdent(),this.finishNode(i,"ConditionalExpression")}return r};qe.parseExprOps=function(t){var e=this.storeCurrentPos(),r=this.curIndent,i=this.curLineStart;return this.parseExprOp(this.parseMaybeUnary(!1),e,-1,t,r,i)};qe.parseExprOp=function(t,e,r,i,n,s){if(this.curLineStart!==s&&this.curIndent<n&&this.tokenStartsLine())return t;var o=this.tok.type.binop;if(o!=null&&(!i||this.tok.type!==h._in)&&o>r){var a=this.startNodeAt(e);if(a.left=t,a.operator=this.tok.value,this.next(),this.curLineStart!==s&&this.curIndent<n&&this.tokenStartsLine())a.right=this.dummyIdent();else{var u=this.storeCurrentPos();a.right=this.parseExprOp(this.parseMaybeUnary(!1),u,o,i,n,s)}return this.finishNode(a,/&&|\|\||\?\?/.test(a.operator)?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,e,r,i,n,s)}return t};qe.parseMaybeUnary=function(t){var e=this.storeCurrentPos(),r;if(this.options.ecmaVersion>=8&&this.toks.isContextual("await")&&(this.inAsync||this.toks.inModule&&this.options.ecmaVersion>=13||!this.inFunction&&this.options.allowAwaitOutsideFunction))r=this.parseAwait(),t=!0;else if(this.tok.type.prefix){var i=this.startNode(),n=this.tok.type===h.incDec;n||(t=!0),i.operator=this.tok.value,i.prefix=!0,this.next(),i.argument=this.parseMaybeUnary(!0),n&&(i.argument=this.checkLVal(i.argument)),r=this.finishNode(i,n?"UpdateExpression":"UnaryExpression")}else if(this.tok.type===h.ellipsis){var s=this.startNode();this.next(),s.argument=this.parseMaybeUnary(t),r=this.finishNode(s,"SpreadElement")}else if(!t&&this.tok.type===h.privateId)r=this.parsePrivateIdent();else for(r=this.parseExprSubscripts();this.tok.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(e);o.operator=this.tok.value,o.prefix=!1,o.argument=this.checkLVal(r),this.next(),r=this.finishNode(o,"UpdateExpression")}if(!t&&this.eat(h.starstar)){var a=this.startNodeAt(e);return a.operator="**",a.left=r,a.right=this.parseMaybeUnary(!1),this.finishNode(a,"BinaryExpression")}return r};qe.parseExprSubscripts=function(){var t=this.storeCurrentPos();return this.parseSubscripts(this.parseExprAtom(),t,!1,this.curIndent,this.curLineStart)};qe.parseSubscripts=function(t,e,r,i,n){for(var s=this.options.ecmaVersion>=11,o=!1;;){if(this.curLineStart!==n&&this.curIndent<=i&&this.tokenStartsLine())if(this.tok.type===h.dot&&this.curIndent===i)--i;else break;var a=t.type==="Identifier"&&t.name==="async"&&!this.canInsertSemicolon(),u=s&&this.eat(h.questionDot);if(u&&(o=!0),u&&this.tok.type!==h.parenL&&this.tok.type!==h.bracketL&&this.tok.type!==h.backQuote||this.eat(h.dot)){var c=this.startNodeAt(e);c.object=t,this.curLineStart!==n&&this.curIndent<=i&&this.tokenStartsLine()?c.property=this.dummyIdent():c.property=this.parsePropertyAccessor()||this.dummyIdent(),c.computed=!1,s&&(c.optional=u),t=this.finishNode(c,"MemberExpression")}else if(this.tok.type===h.bracketL){this.pushCx(),this.next();var l=this.startNodeAt(e);l.object=t,l.property=this.parseExpression(),l.computed=!0,s&&(l.optional=u),this.popCx(),this.expect(h.bracketR),t=this.finishNode(l,"MemberExpression")}else if(!r&&this.tok.type===h.parenL){var p=this.parseExprList(h.parenR);if(a&&this.eat(h.arrow))return this.parseArrowExpression(this.startNodeAt(e),p,!0);var f=this.startNodeAt(e);f.callee=t,f.arguments=p,s&&(f.optional=u),t=this.finishNode(f,"CallExpression")}else if(this.tok.type===h.backQuote){var H=this.startNodeAt(e);H.tag=t,H.quasi=this.parseTemplate(),t=this.finishNode(H,"TaggedTemplateExpression")}else break}if(o){var m=this.startNodeAt(e);m.expression=t,t=this.finishNode(m,"ChainExpression")}return t};qe.parseExprAtom=function(){var t;switch(this.tok.type){case h._this:case h._super:var e=this.tok.type===h._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,e);case h.name:var r=this.storeCurrentPos(),i=this.parseIdent(),n=!1;if(i.name==="async"&&!this.canInsertSemicolon()){if(this.eat(h._function))return this.toks.overrideContext(tt.f_expr),this.parseFunction(this.startNodeAt(r),!1,!0);this.tok.type===h.name&&(i=this.parseIdent(),n=!0)}return this.eat(h.arrow)?this.parseArrowExpression(this.startNodeAt(r),[i],n):i;case h.regexp:t=this.startNode();var s=this.tok.value;return t.regex={pattern:s.pattern,flags:s.flags},t.value=s.value,t.raw=this.input.slice(this.tok.start,this.tok.end),this.next(),this.finishNode(t,"Literal");case h.num:case h.string:return t=this.startNode(),t.value=this.tok.value,t.raw=this.input.slice(this.tok.start,this.tok.end),this.tok.type===h.num&&t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal");case h._null:case h._true:case h._false:return t=this.startNode(),t.value=this.tok.type===h._null?null:this.tok.type===h._true,t.raw=this.tok.type.keyword,this.next(),this.finishNode(t,"Literal");case h.parenL:var o=this.storeCurrentPos();this.next();var a=this.parseExpression();if(this.expect(h.parenR),this.eat(h.arrow)){var u=a.expressions||[a];return u.length&&zr(u[u.length-1])&&u.pop(),this.parseArrowExpression(this.startNodeAt(o),u)}if(this.options.preserveParens){var c=this.startNodeAt(o);c.expression=a,a=this.finishNode(c,"ParenthesizedExpression")}return a;case h.bracketL:return t=this.startNode(),t.elements=this.parseExprList(h.bracketR,!0),this.finishNode(t,"ArrayExpression");case h.braceL:return this.toks.overrideContext(tt.b_expr),this.parseObj();case h._class:return this.parseClass(!1);case h._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate();case h._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.dummyIdent();default:return this.dummyIdent()}};qe.parseExprImport=function(){var t=this.startNode(),e=this.parseIdent(!0);switch(this.tok.type){case h.parenL:return this.parseDynamicImport(t);case h.dot:return t.meta=e,this.parseImportMeta(t);default:return t.name="import",this.finishNode(t,"Identifier")}};qe.parseDynamicImport=function(t){return t.source=this.parseExprList(h.parenR)[0]||this.dummyString(),this.finishNode(t,"ImportExpression")};qe.parseImportMeta=function(t){return this.next(),t.property=this.parseIdent(!0),this.finishNode(t,"MetaProperty")};qe.parseNew=function(){var t=this.startNode(),e=this.curIndent,r=this.curLineStart,i=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(h.dot))return t.meta=i,t.property=this.parseIdent(!0),this.finishNode(t,"MetaProperty");var n=this.storeCurrentPos();return t.callee=this.parseSubscripts(this.parseExprAtom(),n,!0,e,r),this.tok.type===h.parenL?t.arguments=this.parseExprList(h.parenR):t.arguments=[],this.finishNode(t,"NewExpression")};qe.parseTemplateElement=function(){var t=this.startNode();return this.tok.type===h.invalidTemplate?t.value={raw:this.tok.value,cooked:null}:t.value={raw:this.input.slice(this.tok.start,this.tok.end).replace(/\r\n?/g,`
`),cooked:this.tok.value},this.next(),t.tail=this.tok.type===h.backQuote,this.finishNode(t,"TemplateElement")};qe.parseTemplate=function(){var t=this.startNode();this.next(),t.expressions=[];var e=this.parseTemplateElement();for(t.quasis=[e];!e.tail;)this.next(),t.expressions.push(this.parseExpression()),this.expect(h.braceR)?e=this.parseTemplateElement():(e=this.startNode(),e.value={cooked:"",raw:""},e.tail=!0,this.finishNode(e,"TemplateElement")),t.quasis.push(e);return this.expect(h.backQuote),this.finishNode(t,"TemplateLiteral")};qe.parseObj=function(){var t=this.startNode();t.properties=[],this.pushCx();var e=this.curIndent+1,r=this.curLineStart;for(this.eat(h.braceL),this.curIndent+1<e&&(e=this.curIndent,r=this.curLineStart);!this.closes(h.braceR,e,r);){var i=this.startNode(),n=void 0,s=void 0,o=void 0;if(this.options.ecmaVersion>=9&&this.eat(h.ellipsis)){i.argument=this.parseMaybeAssign(),t.properties.push(this.finishNode(i,"SpreadElement")),this.eat(h.comma);continue}if(this.options.ecmaVersion>=6&&(o=this.storeCurrentPos(),i.method=!1,i.shorthand=!1,n=this.eat(h.star)),this.parsePropertyName(i),this.toks.isAsyncProp(i)?(s=!0,n=this.options.ecmaVersion>=9&&this.eat(h.star),this.parsePropertyName(i)):s=!1,zr(i.key)){zr(this.parseMaybeAssign())&&this.next(),this.eat(h.comma);continue}if(this.eat(h.colon))i.kind="init",i.value=this.parseMaybeAssign();else if(this.options.ecmaVersion>=6&&(this.tok.type===h.parenL||this.tok.type===h.braceL))i.kind="init",i.method=!0,i.value=this.parseMethod(n,s);else if(this.options.ecmaVersion>=5&&i.key.type==="Identifier"&&!i.computed&&(i.key.name==="get"||i.key.name==="set")&&this.tok.type!==h.comma&&this.tok.type!==h.braceR&&this.tok.type!==h.eq)i.kind=i.key.name,this.parsePropertyName(i),i.value=this.parseMethod(!1);else{if(i.kind="init",this.options.ecmaVersion>=6)if(this.eat(h.eq)){var a=this.startNodeAt(o);a.operator="=",a.left=i.key,a.right=this.parseMaybeAssign(),i.value=this.finishNode(a,"AssignmentExpression")}else i.value=i.key;else i.value=this.dummyIdent();i.shorthand=!0}t.properties.push(this.finishNode(i,"Property")),this.eat(h.comma)}return this.popCx(),this.eat(h.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.finishNode(t,"ObjectExpression")};qe.parsePropertyName=function(t){if(this.options.ecmaVersion>=6)if(this.eat(h.bracketL)){t.computed=!0,t.key=this.parseExpression(),this.expect(h.bracketR);return}else t.computed=!1;var e=this.tok.type===h.num||this.tok.type===h.string?this.parseExprAtom():this.parseIdent();t.key=e||this.dummyIdent()};qe.parsePropertyAccessor=function(){if(this.tok.type===h.name||this.tok.type.keyword)return this.parseIdent();if(this.tok.type===h.privateId)return this.parsePrivateIdent()};qe.parseIdent=function(){var t=this.tok.type===h.name?this.tok.value:this.tok.type.keyword;if(!t)return this.dummyIdent();var e=this.startNode();return this.next(),e.name=t,this.finishNode(e,"Identifier")};qe.parsePrivateIdent=function(){var t=this.startNode();return t.name=this.tok.value,this.next(),this.finishNode(t,"PrivateIdentifier")};qe.initFunction=function(t){t.id=null,t.params=[],this.options.ecmaVersion>=6&&(t.generator=!1,t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};qe.toAssignable=function(t,e){if(!(!t||t.type==="Identifier"||t.type==="MemberExpression"&&!e))if(t.type==="ParenthesizedExpression")this.toAssignable(t.expression,e);else{if(this.options.ecmaVersion<6)return this.dummyIdent();if(t.type==="ObjectExpression"){t.type="ObjectPattern";for(var r=0,i=t.properties;r<i.length;r+=1){var n=i[r];this.toAssignable(n,e)}}else if(t.type==="ArrayExpression")t.type="ArrayPattern",this.toAssignableList(t.elements,e);else if(t.type==="Property")this.toAssignable(t.value,e);else if(t.type==="SpreadElement")t.type="RestElement",this.toAssignable(t.argument,e);else if(t.type==="AssignmentExpression")t.type="AssignmentPattern",delete t.operator;else return this.dummyIdent()}return t};qe.toAssignableList=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r];this.toAssignable(n,e)}return t};qe.parseFunctionParams=function(t){return t=this.parseExprList(h.parenR),this.toAssignableList(t,!0)};qe.parseMethod=function(t,e){var r=this.startNode(),i=this.inAsync,n=this.inGenerator,s=this.inFunction;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=!!t),this.options.ecmaVersion>=8&&(r.async=!!e),this.inAsync=r.async,this.inGenerator=r.generator,this.inFunction=!0,r.params=this.parseFunctionParams(),r.body=this.parseBlock(),this.toks.adaptDirectivePrologue(r.body.body),this.inAsync=i,this.inGenerator=n,this.inFunction=s,this.finishNode(r,"FunctionExpression")};qe.parseArrowExpression=function(t,e,r){var i=this.inAsync,n=this.inGenerator,s=this.inFunction;return this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!r),this.inAsync=t.async,this.inGenerator=!1,this.inFunction=!0,t.params=this.toAssignableList(e,!0),t.expression=this.tok.type!==h.braceL,t.expression?t.body=this.parseMaybeAssign():(t.body=this.parseBlock(),this.toks.adaptDirectivePrologue(t.body.body)),this.inAsync=i,this.inGenerator=n,this.inFunction=s,this.finishNode(t,"ArrowFunctionExpression")};qe.parseExprList=function(t,e){this.pushCx();var r=this.curIndent,i=this.curLineStart,n=[];for(this.next();!this.closes(t,r+1,i);){if(this.eat(h.comma)){n.push(e?null:this.dummyIdent());continue}var s=this.parseMaybeAssign();if(zr(s)){if(this.closes(t,r,i))break;this.next()}else n.push(s);this.eat(h.comma)}return this.popCx(),this.eat(t)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),n};qe.parseAwait=function(){var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")};Vp.tabSize=4;function lT(t,e){return ze.parse(t,e)}var C_={ecmaVersion:"latest",locations:!0,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReserved:!0,allowReturnOutsideFunction:!0},so=t=>t.start,P_=t=>t.end,pT=(t,e)=>t.slice(so(e),P_(e)),oo=(t,e=!1)=>(e?eT:lT)(t,C_),Mm=t=>{let e=oo(t);for(let r of e.body)r.type==="FunctionDeclaration"&&r.id&&zr(r.id)&&(r.id=null);return e.body};function fT(t,e,r){return e.length>1||e[0].type!=="FunctionDeclaration"?mT(t,e,!0,r):dT(t,[{type:"ReturnStatement",argument:{type:"CallExpression",optional:!1,arguments:[{type:"ThisExpression"},...t.map(i=>({type:"Identifier",name:i}))],callee:{type:"MemberExpression",property:{type:"Identifier",name:"call"},computed:!1,optional:!1,object:{type:"FunctionExpression",params:e[0].params,body:e[0].body}}}}],!0,r)}var dT=(t,e,r,i)=>{let n={type:"Identifier",name:"e"},o=i?[{type:"TryStatement",block:{type:"BlockStatement",body:e},handler:{type:"CatchClause",param:n,body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"LogicalExpression",left:{type:"LogicalExpression",left:{type:"MemberExpression",object:n,property:{type:"Identifier",name:"stack"},computed:!1,optional:!1},operator:"||",right:{type:"MemberExpression",object:n,property:{type:"Identifier",name:"message"},computed:!1,optional:!1}},operator:"||",right:{type:"CallExpression",callee:{type:"Identifier",name:"String"},arguments:[n],optional:!1}}}]}}}]:e;return r?{type:"FunctionExpression",id:{type:"Identifier",name:"_generatedCode"},params:t.map(a=>({type:"Identifier",name:a})),body:{type:"BlockStatement",body:o}}:{type:"ArrowFunctionExpression",params:t.map(a=>({type:"Identifier",name:a})),expression:!1,body:{type:"BlockStatement",body:o}}},YX=(t,e)=>({type:"CallExpression",arguments:t.map(r=>({type:"Identifier",name:r})),callee:e,optional:!1}),hT=(t,e,r)=>YX(t,mT(t,e,r,!0));function mT(t,e,r,i){let n=e[e.length-1];if(n.type!=="ReturnStatement"){let s=QX(n);s&&(e=[...e.slice(0,-1),{type:"ReturnStatement",argument:s}])}return dT(t,e,r,i)}function QX(t){switch(t.type){case"ExpressionStatement":return t.expression;case"BlockStatement":return{type:"CallExpression",arguments:[],callee:{type:"ArrowFunctionExpression",params:[],expression:!1,body:t},optional:!1};case"ReturnStatement":return t.argument||void 0;default:return}}var D_=class{constructor(e,r,i,n,s){this.original=e;this.metadata=r;this.actualRoot=i;this.actualSources=n;this.hasNames=s;this.sourceActualToOriginal=new Map;this.sourceOriginalToActual=new Map;this.id=D_.idCounter++;if(n.length!==e.sources.length)throw new Error("Expected actualSources.length === original.source.length");for(let o=0;o<n.length;o++)this.sourceActualToOriginal.set(n[o],e.sources[o]),this.sourceOriginalToActual.set(e.sources[o],n[o])}get sources(){return this.actualSources.slice()}get sourceRoot(){return this.actualRoot}computedSourceUrl(e){return wt(km(tr(this.metadata.sourceMapUrl)?this.metadata.compiledPath:this.metadata.sourceMapUrl,this.sourceRoot+e))}computeColumnSpans(){this.original.computeColumnSpans()}originalPositionFor(e){let r=this.original.originalPositionFor(e);return r.source&&(r.source=this.sourceOriginalToActual.get(r.source)??r.source),r}generatedPositionFor(e){return this.original.generatedPositionFor({...e,source:this.sourceActualToOriginal.get(e.source)??e.source})}allGeneratedPositionsFor(e){return this.original.allGeneratedPositionsFor({...e,source:this.sourceActualToOriginal.get(e.source)??e.source})}hasContentsOfAllSources(){return this.original.hasContentsOfAllSources()}sourceContentFor(e,r){return this.original.sourceContentFor(this.sourceActualToOriginal.get(e)??e,r)}eachMapping(e,r,i){return this.original.eachMapping(e,r,i)}destroy(){this.original.destroy()}},Da=D_;Da.idCounter=0;async function gT(t,e,r,i){let n=ft.parse(e,{locations:!0,ecmaVersion:"latest"}),s=new Yp.SourceMapGenerator({file:t}),o=ds(n,{sourceMap:{setSourceContent:(a,u)=>s.setSourceContent(a,u),applySourceMap:(a,u,c)=>s.applySourceMap(a,u,c),toJSON:()=>s.toJSON(),toString:()=>s.toString(),addMapping:a=>s.addMapping({generated:a.original,original:{column:a.generated.column,line:a.generated.line},source:t,name:a.name})}});return s.setSourceContent(t,o),new Da(await Yp.SourceMapConsumer.fromSourceMap(s),{sourceMapUrl:i,compiledPath:r},"",[t],!1)}function yT(t){let e;try{e=oo(t,!0)}catch{return}let r=(u,c)=>({type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:u,right:c}}),i=!1,n=!1,s=(0,hc.replace)(e,{enter(u,c){switch(u.type){case"ClassDeclaration":return r(u.id||{type:"Identifier",name:"_default"},{...u,type:"ClassExpression"});case"FunctionDeclaration":return this.skip(),r(u.id||{type:"Identifier",name:"_default"},{...u,type:"FunctionExpression"});case"FunctionExpression":case"ArrowFunctionExpression":case"MethodDefinition":return hc.VisitorOption.Skip;case"AwaitExpression":i=!0;return;case"ForOfStatement":u.await&&(i=!0);return;case"ReturnStatement":n=!0;return;case"VariableDeclaration":if(!c||!("body"in c)||!(c.body instanceof Array))return;let l=c.body,p=u.declarations.map(f=>({type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"AssignmentExpression",operator:"=",left:f.id,right:f.init||{type:"Identifier",name:"undefined"}}}}));l.splice(l.indexOf(u),1,...p)}}});if(!i||n)return;let o=s.body[s.body.length-1];o.type==="ExpressionStatement"&&(s.body[s.body.length-1]={type:"ReturnStatement",argument:o.expression});let a={type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"ArrowFunctionExpression",params:[],generator:!1,expression:!1,async:!0,body:{type:"BlockStatement",body:s.body}},arguments:[],optional:!1}};return ds(a)}function Qp(t){try{let e=Lm(t,0,C_);return e.end<t.length||e.type!=="ObjectExpression"?t:`(${t})`}catch{return t}}function mc(t){if(!t)return;let e="sourceMappingURL",r=t.length,i=e.length,n=r,s=0;for(;;){if(n=t.lastIndexOf(e,n),n===-1||n<4)return;if(n-=4,t[n]==="/"&&t[n+1]==="/"&&!(t[n+2]!=="#"&&t[n+2]!=="@")&&!(t[n+3]!==" "&&t[n+3]!=="	")&&(s=n+4+i,!(s<r&&t[s]!=="=")))break}let o=t.substring(s+1),a=o.indexOf(`
`);return a!==-1&&(o=o.substring(0,a)),o.trim()}function Rm(t,e,r){let i=r.generatedPositionFor({source:t,line:e.lineNumber,column:e.columnNumber-1,bias:Yp.SourceMapConsumer.GREATEST_LOWER_BOUND}),n=a=>{if(a.line===null||a.column===null)return 1e11;let u=r.originalPositionFor(a);return u.line!==null?Math.abs(e.lineNumber-u.line):1e11},s=n(i),o=r.allGeneratedPositionsFor({source:t,line:e.lineNumber,column:e.columnNumber-1}).filter(a=>a.line!==null&&a.column!==null).sort((a,u)=>a.line!==u.line?a.line-u.line:a.column-u.column).map(a=>[a,n(a)]);return o.push([i,s]),o.sort(([a,u],[c,l])=>u-l||a.line-c.line||a.column-c.column),o[0][0]}var T_=(t,e)=>!!e&&((e.type==="FunctionExpression"||e.type==="FunctionDeclaration"||e.type==="ArrowFunctionExpression")&&e.params.includes(t)||(e.type==="ForInStatement"||e.type==="ForOfStatement")&&e.left===t||e.type==="VariableDeclarator"&&e.id===t||e.type==="AssignmentPattern"&&e.left===t||e.type==="CatchClause"&&e.param===t||"kind"in e&&e.kind==="init"&&e.value===t||e.type==="RestElement"&&e.argument===t||e.type==="AssignmentPattern"&&e.left===t);function ao(t){try{new Function(t)}catch(e){return e}}function ZX(t,e){let r=oo(t),i,n;return(0,hc.traverse)(r,{enter:s=>{let o=s;e>=o.start&&e<o.end&&(s.type==="CallExpression"||s.type==="NewExpression"?n=s:i=s)}}),n||i}var HT=/^[^()]+/g;function bT(t,e){try{let i=ZX(t,e);if(i&&"callee"in i){let n=i.callee;return{text:`${t.slice(n.start,n.end)}(...)`,start:n.start,end:n.end}}else{let n=i;return{text:t.slice(n.start,n.end),start:n.start,end:n.end}}}catch{}HT.lastIndex=e-1;let r=HT.exec(t);if(r)return{text:r[0],start:e,end:e+r[0].length}}var Ht=()=>`
//# sourceURL=eval-${(0,vT.randomBytes)(4).toString("hex")}${".cdp"}
`;function Ta(t){return ez(""+t)}function ez(t){let e=Lm(t,0,{ecmaVersion:"latest",locations:!0});if(e.type!=="FunctionExpression")throw new Error(`Could not find function declaration for:

${t}`);let r=e.params.map(o=>{if(o.type!=="Identifier")throw new Error("Parameter must be identifier");return o.name}),{start:i,end:n}=e.body,s=o=>`
    ${o.map((a,u)=>`let ${r[u]} = ${a}`).join("; ")};
    ${t.slice(i+1,n-1)}
  `;return{expr:(...o)=>`(()=>{${s(o)}})();
${Ht()}`,decl:(...o)=>`function(){${s(o)};
${Ht()}}`}}var Hc=class extends Error{constructor(r){super(r.text);this.details=r}},Zp=class{constructor(e){this.objectId=e}};function pr(t){let e=(""+t).replace("}",Ht()+"}"),r=async({cdp:i,args:n,...s})=>{let o=await i.Runtime.callFunctionOn({functionDeclaration:e,arguments:n.map(a=>a instanceof Zp?{objectId:a.objectId}:{value:a}),...s});if(!o)throw new Hc({exceptionId:0,text:"No response from CDP",lineNumber:0,columnNumber:0});if(o.exceptionDetails)throw new Hc(o.exceptionDetails);return o.result};return r.source=e,r}var _T=()=>"globalThis.__jsDebugIsReady = true; "+Ht();var ef=new Set(["page","iframe","worker","service_worker"]),R_=new Set(["page","iframe"]),k_=new Set(["page","iframe"]),tz=k_,gc=class{constructor(e,r,i,n,s,o,a,u,c){this._manager=e;this._targetInfo=r;this.launchConfig=o;this.sessionId=a;this.logger=u;this._attached=!1;this._onNameChangedEmitter=new J;this.onNameChanged=this._onNameChangedEmitter.event;this.entryBreakpoint=void 0;this._children=new Map;this.sourcePathResolver=this._manager._sourcePathResolver;this._cdp=i,i.pause(),this.parentTarget=n,this._waitingForDebugger=s,this._updateFromInfo(r),this._ondispose=c}get targetInfo(){return this._targetInfo}get targetId(){return this._targetInfo.targetId}get independentLifeycle(){return k_.has(this.type())}get supplementalConfig(){let e=this.type();return{__browserTargetType:e,__usePerformanceFromParent:e!=="page"}}targetOrigin(){return this._manager._targetOrigin}id(){return this.sessionId}cdp(){return this._cdp}name(){return this._computeName()}fileName(){return this._targetInfo.url}type(){return this._targetInfo.type}afterBind(){return this._cdp.resume(),Promise.resolve()}initialize(){return Promise.resolve()}async runIfWaitingForDebugger(){await Promise.all([this._cdp.Runtime.runIfWaitingForDebugger({}),this._cdp.Runtime.evaluate({expression:_T()})])}parent(){return this.parentTarget&&!ef.has(this.parentTarget.type())?this.parentTarget.parentTarget:this.parentTarget}children(){let e=[];for(let r of this._children.values())ef.has(r.type())?e.push(r):e.push(...r.children());return e}canStop(){return tz.has(this.type())}stop(){if(this._manager.targetList().includes(this))if(this.type()==="service_worker"){if(this._manager.serviceWorkerModel.stopWorker(this.id()),!this.parentTarget)return;this._manager.serviceWorkerModel.stopWorker(this.parentTarget.id())}else this._cdp.Target.closeTarget({targetId:this._targetInfo.targetId})}canRestart(){return k_.has(this.type())}restart(){this._cdp.Page.reload({})}waitingForDebugger(){return this._waitingForDebugger}canAttach(){return!this._attached}async attach(){return this._waitingForDebugger=!1,this._attached=!0,Promise.resolve(this._cdp)}canDetach(){return this._attached}async detach(){this._attached=!1,this._manager._detachedFromTarget(this.sessionId)}executionContextName(e){let r=e.auxData,i=e.name;if(!r)return i;let n=r.frameId,s=n?this._manager.frameModel.frameForId(n):void 0;return s&&r.isDefault&&!s.parentFrame()?"top":s&&r.isDefault?s.displayName():s?`${i}`:i}supportsCustomBreakpoints(){return R_.has(this.type())}scriptUrlToUrl(e){return uo(this._targetInfo.url,e)||e}_updateFromInfo(e){this._targetInfo={...e,type:this._targetInfo.type},this._onNameChangedEmitter.fire()}setComputeNameFn(e){this._customNameComputeFn=e,this._onNameChangedEmitter.fire()}_computeName(){var n;let e=(n=this._customNameComputeFn)==null?void 0:n.call(this,this);if(e)return e;if(this.type()==="service_worker"){let s=this._manager.serviceWorkerModel.version(this.id());if(s)return s.label()+" [Service Worker]"}let r=this._targetInfo.title;if(!(r&&this._manager.targetList().some(s=>s instanceof gc&&s!==this&&s._targetInfo.title===this._targetInfo.title)))return r;try{let s=new wT.URL(this._targetInfo.url);s.protocol==="data:"?r=" <data>":s?r+=` (${this._targetInfo.url.replace(/^[a-z]+:\/\/|\/$/gi,"")})`:r+=` (${this._targetInfo.url})`}catch{r+=` (${this._targetInfo.url})`}return r}async _detached(){await this._manager.serviceWorkerModel.detached(this._cdp),this._ondispose(this)}};function $n(t,e){return t.length<=e?t:t.substr(0,e-1)+"\u2026"}function yc(t,e){if(t.length<=e)return t;let r=e>>1,i=e-r-1,n=t.codePointAt(t.length-i-1);n&&n>=65536&&(--i,++r);let s=t.codePointAt(r-1);return r>0&&s&&s>=65536&&--r,t.substr(0,r)+"\u2026"+t.substr(t.length-i,i)}var AT="/\\.?*()^${}|[]+",IT=t=>AT.includes(t);function Ar(t,e){let r=AT.split("").filter(n=>!e||e.indexOf(n)<0).join("").replace(/[\\\]]/g,"\\$&"),i=new RegExp(`[${r}]`,"g");return t.replace(i,"\\$&")}var co=class{constructor(e){this.source=e;this.lines=[];this.lines.push(0);for(let r=e.indexOf(`
`);r!==-1;r=e.indexOf(`
`,r+1))this.lines.push(r+1)}getLineOffset(e){return e>=this.lines.length?this.source.length:this.lines[e]}convert(e){let r=e.base0;if(r.lineNumber>this.lines.length)return this.source.length;let i=this.lines[r.lineNumber],n=this.lines[r.lineNumber+1]??this.source.length+1;return i+Math.min(n-i-1,r.columnNumber)}};var Nm=process.platform!=="win32";function B_(){return Nm}function Bm(t){return Nm?t:t.toLowerCase()}function Fm(t,e){return Nm?t===e:t.toLowerCase()===e.toLowerCase()}function $a(){return B_()?new Map:new xn(Bm)}var xT,ST=process.platform==="win32"?(xT=process.env.PATHEXT)==null?void 0:xT.toLowerCase().split(";"):void 0,CT=t=>{let e=Bm(Yr.basename(t));if(ST){for(let r of ST)if(e.endsWith(r))return e.slice(0,-r.length)}return e},iz=async(t,e)=>{for(;;){if(await e(t))return t;let r=Yr.dirname(t);if(r===t)return;t=r}},Um=(t,e,r)=>iz(e,i=>t.exists(Yr.join(i,r))),nz=new Set(["localhost","127.0.0.1","::1"]);var ET=t=>nz.has(t.toLowerCase()),sz=t=>{try{return new hs.URL(t).hostname.replace(/^\[|\]$/g,"")}catch{return t}};var bc=wa(async t=>{let e=sz(t);if(ET(e))return!0;try{let r=await LT.promises.lookup(e);return ET(r.address)}catch{return!1}});function uo(t,e){try{return new hs.URL(e,t).href}catch{}}function km(t,e){try{return new hs.URL(e),e}catch{}let r;try{r=new hs.URL(t||"")}catch{return e}let i=r.protocol+"//";return r.username&&(i+=r.username+":"+r.password+"@"),i+=r.host,i+=Yr.dirname(r.pathname),i[i.length-1]!=="/"&&(i+="/"),i+=e,i}function jm(t){try{return new hs.URL(t),!0}catch{return!1}}function PT(t){return t.replace(/\/$/,"").replace(/\\$/,"")}var oz=/^https:\/\/([a-z0-9\-]+)\+\.vscode-resource\.vscode-(?:webview|cdn)\.net\/(.+)/i;function st(t){let e=oz.exec(t);if(e)t=`${e[1]}:///${e[2]}`;else if(t.startsWith("vscode-webview-resource://"))t=new hs.URL(t).pathname.replace(/%2F/gi,"/").replace(/^\/([a-z0-9\-]+)(\/{1,2})/i,(i,n,s)=>s.length===1?`${n}:///`:`${n}://`);else if(!Vi(t))return;return t=t.replace("file:///",""),t=decodeURIComponent(t),t.startsWith("/")&&process.platform==="win32"&&t[1]!=="/"&&(t="/"+t),t[0]!=="/"&&!t.match(/^[A-Za-z]:/)&&(t="/"+t),wt(t)}function DT(t){return Vi(t)&&(t=t.replace("file:///","\\\\"),t=t.replace(/\//g,"\\"),t=decodeURIComponent(t)),t}function We(t){return F_==="win32"?"file:///"+lo(t):"file://"+lo(t)}function qm(t){return t.startsWith("/")?"file://"+lo(t):"file:///"+lo(t)}function fr(t){return Yr.posix.isAbsolute(t)||Yr.win32.isAbsolute(t)}function tr(t){return!!t&&t.startsWith("data:")}var O_=(t,e,r)=>{if(!r||t===":"){e.add(t);return}if(t==="/"){e.add(`\\${t}`);return}IT(t)?e.add(`\\${t}`):e.add(t);let i=encodeURIComponent(t);t!=="\\"&&i!==t&&e.add(i)},az=t=>{switch(t.size){case 0:return"";case 1:return t.values().next().value;default:let e=[...t];return e.some(r=>r.length>1)?`(?:${e.join("|")})`:`[${e.join("")}]`}},tf=new Set,N_=(t,e,r,i)=>{let n="";for(let s of t.slice(e,r))Nm?O_(s,tf,i):(O_(s.toLowerCase(),tf,i),O_(s.toUpperCase(),tf,i)),n+=az(tf),tf.clear();return n};function Fr(t,[e,r]=[0,t.length]){if(r<=e)return t;let i=[],n=N_(t,0,e,!1),s=N_(t,r,t.length,!1),o=t.slice(e,r);for(let a of[decodeURIComponent(o),st(o)]){if(!a)continue;let u=N_(a,0,a.length,!0);i.push(uz(`${n}${u}${s}`).concat("($|\\?)"))}return i.join("|")}var uz=t=>t.replace(/^(file:\\\/\\\/\\\/)?([a-z]):/i,(e,r="",i)=>`${r}[${i.toUpperCase()}${i.toLowerCase()}]:`);function Vi(t){return t.startsWith("file:///")}var F_=process.platform;function lo(t){return t=Gi(t),F_==="win32"?(u_(t)&&(t=t.slice(1)),t.split(/[\\//]/g).map((e,r)=>r>0?encodeURIComponent(e):e).join("/")):t.split("/").map(encodeURIComponent).join("/")}function Gi(t){return t&&F_==="win32"&&t[1]===":"?t[0].toUpperCase()+t.substring(1):t}var po=(t,e=[])=>{let r=t.urlFilter||"file"in t&&t.file||t.url,i=r?lz(r,...e):void 0;return n=>!n.url.startsWith("devtools://")&&(i==null?void 0:i(n.url))!==!1},vc=t=>e=>e.type==="page"&&t(e);function cz(t){return!!t&&!Yr.isAbsolute(t)&&!!(0,hs.parse)(t).protocol}var lz=(...t)=>{let e=n=>{n=n.toLowerCase();let s=st(n);s?n=s:cz(n)&&n.includes("://")&&(n=n.substr(n.indexOf("://")+3)),n.endsWith("/")&&(n=n.substr(0,n.length-1));let o=n.indexOf("#");return o!==-1&&(n=n.slice(0,n[o-1]==="/"?o-1:o)),n},r=t.map(n=>Ar(e(n),"/*").replace(/(\/\*$)|\*/g,".*")),i=new RegExp("^("+r.join("|")+")$","g");return n=>(i.lastIndex=0,i.test(e(n)))};var ms=Symbol("ISourceMapFactory"),rf=class{constructor(e,r,i,n){this.pathResolve=e;this.resourceProvider=r;this.dap=i;this.logger=n;this.hasWarnedAboutMaps=new WeakSet}async load(e){var o,a;let r=await this.parseSourceMap(e.sourceMapUrl),i=r.sourceRoot;r.sourceRoot=void 0;let n=!1,s=[];if("sections"in r){s=[];let u=0;for(let c of r.sections)s.push(...c.map.sources),c.map.sources=c.map.sources.map(()=>`source${u++}.js`),n||=!!((o=c.map.names)!=null&&o.length)}else"sources"in r&&Array.isArray(r.sources)&&(s=r.sources,r.sources=r.sources.map((u,c)=>`source${c}.js`),n=!!((a=r.names)!=null&&a.length));return new Da(await new TT.SourceMapConsumer(r),e,i??"",s,n)}async parseSourceMap(e){let r;try{r=await this.parseSourceMapDirect(e)}catch(i){if(r=await this.parsePathMappedSourceMap(e),!r)throw i}if("sections"in r){let i=await Promise.all(r.sections.map((n,s)=>"url"in n?this.parseSourceMap(n.url).then(o=>({offset:n.offset,map:o})).catch(o=>{this.logger.warn("sourcemap.parsing",`Error parsing nested map ${s}: ${o}`)}):n));r.sections=i.filter(vt)}return r}async parsePathMappedSourceMap(e){if(tr(e))return;let r=await this.pathResolve.urlToAbsolutePath({url:e});if(r)try{return this.parseSourceMapDirect(r)}catch(i){this.logger.info("sourcemap.parsing","Parsing path mapped source map failed.",i)}}guardSourceMapFn(e,r,i){try{return r()}catch(n){if(!/error parsing/i.test(String(n.message)))throw n;if(!this.hasWarnedAboutMaps.has(e)){let s=ym(e.metadata.compiledPath,n.message).error;this.dap.output({output:s.format+`
`,category:"stderr"}),this.hasWarnedAboutMaps.add(e)}return i()}}dispose(){}async parseSourceMapDirect(e){let r=st(e);r&&(r=this.pathResolve.rebaseRemoteToLocal(r));let i=await this.resourceProvider.fetch(r||e);if(!i.ok)throw i.error;let n=i.body;return n.slice(0,3)===")]}"&&(n=n.substring(n.indexOf(`
`))),JSON.parse(n)}};rf=X([(0,fo.injectable)(),x(0,(0,fo.inject)(et)),x(1,(0,fo.inject)(La)),x(2,(0,fo.inject)(uc)),x(3,(0,fo.inject)(pe))],rf);var ho=class extends rf{constructor(){super(...arguments);this.knownMaps=new xn(r=>r.toLowerCase());this.overwrittenSourceMaps=[]}load(r){let i=this.knownMaps.get(r.sourceMapUrl);if(!i)return this.loadNewSourceMap(r);let n=r.cacheKey,s=i.metadata.cacheKey;return i.reloadIfNoMtime?n&&s&&n===s?(i.reloadIfNoMtime=!1,i.prom):(this.overwrittenSourceMaps.push(i.prom),this.loadNewSourceMap(r)):s&&n&&n!==s?(this.overwrittenSourceMaps.push(i.prom),this.loadNewSourceMap(r)):i.prom}loadNewSourceMap(r){let i=super.load(r);return this.knownMaps.set(r.sourceMapUrl,{metadata:r,reloadIfNoMtime:!1,prom:i}),i}dispose(){for(let r of this.knownMaps.values())r.prom.then(i=>i.destroy(),()=>{});for(let r of this.overwrittenSourceMaps)r.then(i=>i.destroy(),()=>{});this.knownMaps.clear()}invalidateCache(){for(let r of this.knownMaps.values())r.reloadIfNoMtime=!0}};ho=X([(0,fo.injectable)()],ho);var pz={["pwa-extensionHost"]:null,["node-terminal"]:null,["pwa-node"]:null,["pwa-chrome"]:null,["pwa-msedge"]:null},fz={["extension.js-debug.addCustomBreakpoints"]: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.removeAllCustomBreakpoints"]:null,["extension.js-debug.removeCustomBreakpoint"]: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},ghe=new Set(Object.keys(fz)),yhe=new Set(Object.keys(pz));var Fe=Symbol("AnyLaunchConfiguration"),$T={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}/**/*.js","!**/node_modules/**"],sourceMapPathOverrides:j_("${workspaceFolder}"),enableContentValidation:!0,cascadeTerminateToConfigurations:[],__workspaceFolder:"",__remoteFilePrefix:void 0,__breakOnConditionalError:!1,customDescriptionGenerator:void 0,customPropertiesGenerator:void 0},sf={...$T,cwd:"${workspaceFolder}",env:{},envFile:null,pauseForSourceMap:!1,sourceMaps:!0,localRoot:null,remoteRoot:null,resolveSourceMapLocations:["**","!**/node_modules/**"],autoAttachChildProcesses:!0,runtimeSourcemapPausePatterns:[],skipFiles:["<node_internals>/**"],enableTurboSourcemaps:!0},MT={...sf,showAsyncStacks:{onceBreakpointResolved:16},type:"node-terminal",request:"launch",name:"JavaScript Debug Terminal"},dz={...sf,type:"node-terminal",request:"attach",name:MT.name,showAsyncStacks:{onceBreakpointResolved:16},delegateId:-1},hz={...sf,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:""},mz={...sf,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"},U_={...$T,type:"pwa-chrome",request:"attach",address:"localhost",port:0,disableNetworkCache:!0,pathMapping:{},url:null,restart:!1,urlFilter:"",sourceMapPathOverrides:j_("${webRoot}"),webRoot:"${workspaceFolder}",server:null,browserAttachLocation:"workspace",targetSelection:"automatic",vueComponentPaths:["${workspaceFolder}/**/*.vue","!**/node_modules/**"],perScriptSourcemaps:"auto"},Hz={...U_,type:"pwa-msedge",useWebView:!1},kT={...U_,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"},gz={...kT,type:"pwa-msedge",useWebView:!1},yz={...sf,type:"pwa-node",attachExistingChildren:!0,address:"localhost",port:9229,restart:!1,request:"attach",continueOnAttach:!1};function j_(t){return{"webpack:///./~/*":`${t}/node_modules/*`,"webpack:////*":"/*","webpack://@?:*/?:*/*":`${t}/*`,"webpack://?:*/*":`${t}/*`,"webpack:///([a-z]):/(.+)":"$1:/$2","meteor://\u{1F4BB}app/*":`${t}/*`}}var RT=t=>{!t.sourceMapPathOverrides&&t.cwd&&(t.sourceMapPathOverrides=j_(t.cwd)),t.resolveSourceMapLocations===void 0&&!t.remoteRoot&&(t.resolveSourceMapLocations=t.outFiles)};function bz({...t}){return RT(t),t.request==="attach"?{...yz,...t}:{...mz,...t}}function vz(t,e){return t.request==="attach"?{...U_,browserAttachLocation:e,...t}:{...kT,browserLaunchLocation:e,...t}}function _z(t,e){return t.request==="attach"?{...Hz,browserAttachLocation:e,...t}:{...gz,browserLaunchLocation:e,...t}}function wz(t){let e={...hz,...t};return e.skipFiles=[...e.skipFiles,"**/node_modules.asar/**","**/bootstrap-fork.js"],e}function Az(t){return RT(t),t.request==="launch"?{...MT,...t}:{...dz,...t}}function _c(t,e){let r,i=e==="remote"?"ui":"workspace";switch(t.type){case"pwa-node":r=bz(t);break;case"pwa-msedge":r=_z(t,i);break;case"pwa-chrome":r=vz(t,i);break;case"pwa-extensionHost":r=wz(t);break;case"node-terminal":r=Az(t);break;default:throw ih(t,"Unknown config: {value}")}return Sz(r)}function Iz(t){var i,n,s;let e="${workspaceFolder}",r={...t,rootPath:void 0,outFiles:t.outFiles.filter(o=>!o.includes(e)),sourceMapPathOverrides:nh(t.sourceMapPathOverrides,o=>!o.includes("${workspaceFolder}"))};return"vueComponentPaths"in r&&(r.vueComponentPaths=r.vueComponentPaths.filter(o=>!o.includes(e))),"resolveSourceMapLocations"in r&&(r.resolveSourceMapLocations=((i=r.resolveSourceMapLocations)==null?void 0:i.filter(o=>!o.includes(e)))??null),"cwd"in r&&((n=r.cwd)!=null&&n.includes(e))&&(r.cwd=void 0),"webRoot"in r&&((s=r.webRoot)!=null&&s.includes(e))&&(r.webRoot="/"),r}function Sz(t){return t.__workspaceFolder||(t=Iz(t)),t=nf(t,"workspaceFolder",t.__workspaceFolder),t=nf(t,"webRoot","webRoot"in t?t.webRoot:t.__workspaceFolder),t}function nf(t,e,r){let i;if(typeof t=="string")i=t.replace(new RegExp(`\\$\\{${e}\\}`,"g"),()=>{if(!r)throw new Error(`Unable to resolve \${${e}} in configuration (${JSON.stringify(e)})`);return r});else if(t instanceof Array)i=t.map(n=>nf(n,e,r));else if(typeof t=="object"&&t){let n={};for(let[s,o]of Object.entries(t))n[nf(s,e,r)]=nf(o,e,r);i=n}else i=t;return i}var Wm="js-debug",of="1.78.0",Ez="ms-vscode",OT=Wm.includes("nightly"),whe=`${Ez}.${Wm}`;var wc=Symbol("IContainer"),Mn=Symbol("StoragePath"),dr=Symbol("IInitializeParams"),mo=Symbol("VSCodeApi"),Ac=Symbol("IsVSCode"),NT=Symbol("ExtensionContext"),W_=Symbol("ProcessEnv"),af=Symbol("execa"),nt=Symbol("FS"),Ma="ExtensionLocation",ka=Symbol("IBrowserFinder"),BT=Symbol("SessionSubStates"),q_=new WeakMap,Nt=(t,e)=>{if(!(typeof e=="object"&&e&&"dispose"in e))return e;let r=e,i=q_.get(t.container);return i?i.push(r):q_.set(t.container,[r]),e},Vm=t=>{var e;(e=q_.get(t))==null||e.forEach(r=>r.dispose())},Ihe=Symbol("IExtensionContribution");var Km=F(ue());var FT=F(w("fs")),Gm=F(w("path")),UT=t=>{let e={};f(e);function r(m,y){return t({category:"telemetry",output:m,data:y})}let i=m=>r("js-debug/dap/operation",{...e,...m}),n=m=>r("js-debug/cdp/operation",{...e,...m}),s=m=>r("js-debug/error",{...e,...m}),o=m=>{e.browser=(m.targetProject||m.targetProject)+"/"+m.targetVersion,r("js-debug/browserVersion",{...e,...m})},a=m=>r("js-debug/breakpointStats",{...e,...m}),u=m=>r("js-debug/statistics",{...e,...m}),c=m=>{e.nodeVersion=m.version,r("js-debug/nodeRuntime",{...e,...m})},l=m=>{r("js-debug/launch",{...e,...m,parameters:JSON.stringify(m.parameters)})},p=m=>{r("js-debug/diagnosticPrompt",{...e,...m})};function f(m){try{let y=Gm.resolve(Gm.dirname(__filename),"..","..",".gitcommit");m.jsDebugCommitId=FT.readFileSync(y,"utf8")}catch{}}return{breakpointStats:a,statistics:u,browserVersion:o,cdpOperation:n,dapOperation:i,error:s,launch:l,nodeRuntime:c,diagnosticPrompt:p,setGlobalMetric:(m,y)=>{e[m]=y}}};var uf=class{constructor(e=!0){this.isVSCode=e;this.measurements=Object.create(null)}add(e,r,i){let n=this.measurements[e];n||(n=this.measurements[e]={times:[],errors:[]}),n.times.push(r),i&&n.errors.push(i)}flush(){let e={errors:[]};for(let r in this.measurements){let{times:i,errors:n}=this.measurements[r],s={operation:r,totalTime:0,max:0,avg:0,stddev:0,count:i.length,failed:n.length};for(let o of i)s.totalTime+=o,s.max=Math.max(s.max,o);s.avg=s.totalTime/s.count;for(let o of i)s.stddev+=(o-s.avg)**2;s.stddev=Math.sqrt(s.stddev/(i.length-1)),e[s.operation]=s,e[`!${s.operation}.errors`]=n,this.isVSCode||(e[`${s.operation}.errors`]=n)}return this.measurements=Object.create(null),e}};var kn=class{constructor(e=!0){this.isVsCode=e;this.target=[];this.flushEmitter=new J;this.loggers=UT(e=>this.pushOutput(e));this.batchFlushTimeout={};this.batchers={dapOperation:new uf(this.isVsCode),cdpOperation:new uf(this.isVsCode)};this.onFlush=this.flushEmitter.event;this.setGlobalMetric=this.loggers.setGlobalMetric}report(e,...r){let i=this.loggers[e];i(...r)}reportOperation(e,r,i,n){this.batchers[e].add(r,i,n),this.batchFlushTimeout[e]===void 0&&(this.batchFlushTimeout[e]=setTimeout(()=>{this.report(e,this.batchers[e].flush()),this.batchFlushTimeout[e]=void 0},kn.batchFlushInterval))}attachDap(e){this.target instanceof Array&&this.target.forEach(r=>e.output(r)),this.target=e}flush(){this.flushEmitter.fire();let e=Object.entries(this.batchFlushTimeout);for(let[r,i]of e){let n=this.batchers[r].flush();n.length&&this.report(r,n),this.batchFlushTimeout[r]=void 0,clearTimeout(i)}}dispose(){for(let e of Object.values(this.batchFlushTimeout))e&&clearTimeout(e)}pushOutput(e){e.data=V_(e.data),this.target instanceof Array?this.target.push(e):this.target.output(e)}};kn.batchFlushInterval=5e3,kn=X([(0,Km.injectable)(),x(0,(0,Km.inject)(Ac))],kn);var V_=t=>typeof t=="number"?Number(t.toFixed(1)):typeof t!="object"||!t?t:t instanceof Error?G_(t):t instanceof Array?t.map(V_):as(t,V_),jT=/(?:[A-z]:)?(?:[\\/][^:]*)+[\\/]([^:]*:)/g;function G_(t){let e=String(t.message),r=String(t.name);jT.lastIndex=0;let i=typeof t.stack=="string"?t.stack.replace(jT,"$1"):void 0;return{error:{message:e,name:r,stack:i}}}var Ho=Symbol("IScriptSkipper");function qT(t){return typeof t.lineNumber=="number"&&typeof t.columnNumber=="number"&&!!t.source}var WT=()=>({source:null,line:null,column:null,name:null,lastColumn:null,isSourceMapLoadFailure:!0}),xz=t=>t.endsWith(".hot-update.js"),Lz={load:0,resolveLocation:2e3,sourceMapMinPause:1e3,output:1e3,sourceMapCumulativePause:1e4},cf=class{constructor(e,r,i,n,s,o,a,u){this.url=r;this.inlineScriptOffset=o;this.runtimeScriptOffset=a;this.contentHash=u;this._scripts=[];this.sourceReference=e.getSourceReference(r),this._contentGetter=Be(n),this._container=e,this.absolutePath=i||"",this._fqname=this._fullyQualifiedName(),this._name=this._humanName(),this.setSourceMapUrl(s),this._existingAbsolutePath=eD(this.absolutePath,o||a?void 0:u,e._fileContentOverridesForTest.get(this.absolutePath))}setSourceMapUrl(e){if(!e){this.sourceMap=void 0;return}this.sourceMap={url:e,sourceByUrl:new Map,metadata:{sourceMapUrl:e,compiledPath:this.absolutePath||this.url}}}addScript(e){this._scripts.push(e)}filterScripts(e){this._scripts=this._scripts.filter(e)}get scripts(){return this._scripts}get getSuggestedMimeType(){if(!/\.[^/]+$/.test(this.url))return"text/javascript"}async content(){var r;let e=await this._contentGetter();return(r=this.inlineScriptOffset)!=null&&r.lineOffset&&(e=`
`.repeat(this.inlineScriptOffset.lineOffset)+e),e}async prettyPrint(){var c,l;if(!this._container)return;if(Sr(this)&&this.sourceMap.url.endsWith("-pretty.map")){let p=(l=this._container._sourceMaps.get((c=this.sourceMap)==null?void 0:c.url))==null?void 0:l.map;return p&&{map:p,source:[...this.sourceMap.sourceByUrl.values()][0]}}let e=await this.content();if(!e)return;let r=this.url||`eval://${this.sourceReference}.js`,i=r+"-pretty.map",s=r.split(/[\/\\]/).pop()+"-pretty.js",o=await gT(s,e,r,i);if(!o)return;this.setSourceMapUrl(i);let a=this,u={compiled:new Set([a]),map:o,loaded:Promise.resolve()};return this._container._sourceMaps.set(i,u),await this._container._addSourceMapSources(a,o),{map:o,source:[...a.sourceMap.sourceByUrl.values()][0]}}async toDap(){return this.toDapShallow()}async toDapShallow(){let e=await this._existingAbsolutePath,r={name:this._name,path:this._fqname,sourceReference:this.sourceReference,presentationHint:this.blackboxed()?"deemphasize":void 0,origin:this.blackboxed()?KT.t("Skipped by skipFiles"):void 0};return e&&(r.sourceReference=0,r.path=e),r}existingAbsolutePath(){return this._existingAbsolutePath}async prettyName(){let e=await this._existingAbsolutePath;return e||this._fqname}_humanName(){if(fr(this._fqname)){for(let e of this._container.rootPaths)if(JP(e,this._fqname))return Ye((0,zT.relative)(e,this._fqname))}return this._fqname}_fullyQualifiedName(){var i;if(!this.url)return"<eval>/VM"+this.sourceReference;if(this.url.endsWith(".repl"))return"repl";if(this.absolutePath.startsWith("<node_internals>"))return this.absolutePath;if(fr(this.url))return this.url;let e=st(this.url);if(e)return e;let r=this.url;try{let n=[],s=new JT.URL(this.url);if(s.protocol==="data:")return"<eval>/VM"+this.sourceReference;s.hostname&&n.push(s.hostname),s.port&&n.push("\uA789"+s.port),s.pathname&&n.push(/^\/[a-z]:/.test(s.pathname)?s.pathname.slice(1):s.pathname);let o=(i=s.searchParams)==null?void 0:i.toString();o&&n.push("?"+o),r=n.join("")}catch{}return r.endsWith("/")&&(r+="(index)"),this.inlineScriptOffset&&(r+=`\uA789${this.inlineScriptOffset.lineOffset+1}:${this.inlineScriptOffset.columnOffset+1}`),r}blackboxed(){return this._container.isSourceSkipped(this.url)}},Bt=class extends cf{constructor(){super(...arguments);this.compiledToSourceUrl=new Map}},Sr=t=>!!t&&t instanceof cf&&!!t.sourceMap,VT=(t,e)=>e instanceof Bt&&e.compiledToSourceUrl.has(t);var GT=2**31-1,zt=class{constructor(e,r,i,n,s,o,a,u){this.sourceMapFactory=r;this.logger=i;this.launchConfig=n;this.initializeConfig=s;this.sourcePathResolver=o;this.scriptSkipper=a;this.resourceProvider=u;this.rootPaths=[];this.scriptsById=new Map;this.onSourceMappedSteppingChangeEmitter=new J;this.onScriptEmitter=new J;this._sourceByOriginalUrl=new xn(e=>e.toLowerCase());this._sourceByReference=new Map;this._sourceMapSourcesByUrl=new Map;this._sourceByAbsolutePath=$a();this._sourceMaps=new Map;this._sourceMapTimeouts=Lz;this._fileContentOverridesForTest=new Map;this._temporarilyDisabledSourceMaps=new Set;this._permanentlyDisabledSourceMaps=new Set;this.onScript=this.onScriptEmitter.event;this._statistics={fallbackSourceMapCount:0};this._doSourceMappedStepping=this.launchConfig.sourceMaps;this.onSourceMappedSteppingChange=this.onSourceMappedSteppingChangeEmitter.event;this._dap=e;let c="webRoot"in n?n.webRoot:n.rootPath;c&&(this.rootPaths=[c,Xr(c,"..","ClientApp")]),a.setSourceContainer(this),this.setSourceMapTimeouts({...this.sourceMapTimeouts(),...n.timeouts})}get sources(){return this._sourceByReference.values()}statistics(){return this._statistics}get doSourceMappedStepping(){return this._doSourceMappedStepping}set doSourceMappedStepping(e){e!==this._doSourceMappedStepping&&(this._doSourceMappedStepping=e,this.onSourceMappedSteppingChangeEmitter.fire(e))}setSourceMapTimeouts(e){this._sourceMapTimeouts=e}sourceMapTimeouts(){return this._sourceMapTimeouts}setFileContentOverrideForTest(e,r){r===void 0?this._fileContentOverridesForTest.delete(e):this._fileContentOverridesForTest.set(e,r)}async loadedSources(){let e=[];for(let r of this._sourceByReference.values())e.push(r.toDap());return await Promise.all(e)}source(e){if(e.sourceReference)return this._sourceByReference.get(e.sourceReference);if(e.path)return this._sourceByAbsolutePath.get(e.path)}isSourceSkipped(e){return this.scriptSkipper.isScriptSkipped(e)}addScriptById(e){this.scriptsById.set(e.scriptId,e),this.onScriptEmitter.fire(e)}getScriptById(e){return this.scriptsById.get(e)}getSourceByOriginalUrl(e){return this._sourceByOriginalUrl.get(e)}getSourceReference(e){let r=(0,XT.xxHash32)(e)&GT;for(let i=0;i<65535;i++){if(!this._sourceByReference.has(r))return r;r===GT&&(r=0),r++}return this.logger.assert(!1,"Max iterations exceeding for source reference assignment"),r}async preferredUiLocation(e){let r=!1,i=4;if(this._doSourceMappedStepping)for(;Sr(e.source);){let n=this._sourceMaps.get(e.source.sourceMap.url);if(!this.logger.assert(n,`Expected to have sourcemap for loaded source ${e.source.sourceMap.url}`))break;if(await Promise.race([n.loaded,Me(this._sourceMapTimeouts.resolveLocation)]),!n.map)return{...e,isMapped:r,unmappedReason:i};let s=this._sourceMappedUiLocation(e,n.map);if(!qT(s)){i=r?void 0:s;break}e=s,r=!0,i=void 0}return{...e,isMapped:r,unmappedReason:i}}currentSiblingUiLocations(e,r){return this._uiLocations(e).filter(i=>!r||i.source===r)}clear(e){this.scriptsById.clear();for(let r of this._sourceByReference.values())this.removeSource(r,e);this._sourceByReference.clear(),this.sourceMapFactory instanceof ho&&this.sourceMapFactory.invalidateCache()}_uiLocations(e){return[...this.getSourceMapUiLocations(e),e,...this.getCompiledLocations(e)]}getSourceMapUiLocations(e){var s;if(!Sr(e.source)||!this._doSourceMappedStepping)return[];let r=(s=this._sourceMaps.get(e.source.sourceMap.url))==null?void 0:s.map;if(!r)return[];let i=this._sourceMappedUiLocation(e,r);if(!qT(i))return[];let n=this.getSourceMapUiLocations(i);return n.push(i),n}_sourceMappedUiLocation(e,r){let i=e.source;if(!Sr(i))return 1;if(this._temporarilyDisabledSourceMaps.has(i)||this._permanentlyDisabledSourceMaps.has(i))return 0;let n=this.getOptiminalOriginalPosition(r,Ra(e,i.inlineScriptOffset));if("isSourceMapLoadFailure"in n)return 2;if(!n.source)return 3;let s=i.sourceMap.sourceByUrl.get(n.source);return s?{lineNumber:n.line||1,columnNumber:n.column?n.column+1:1,source:s}:3}getCompiledLocations(e){if(!(e.source instanceof Bt))return[];let r=[];for(let[i,n]of e.source.compiledToSourceUrl){let s=this._sourceMaps.get(i.sourceMap.url);if(!s||!s.map)continue;let o=this.sourceMapFactory.guardSourceMapFn(s.map,()=>Rm(n,e,s.map),WT);if(!o)continue;let{lineNumber:a,columnNumber:u}=go({lineNumber:o.line||1,columnNumber:(o.column||0)+1},i.inlineScriptOffset),c={lineNumber:a,columnNumber:u,source:i};r=r.concat(c,this.getCompiledLocations(c))}return r}getOptiminalOriginalPosition(e,r){return this.sourceMapFactory.guardSourceMapFn(e,()=>{let i=e.originalPositionFor({line:r.lineNumber,column:r.columnNumber-1,bias:K_.SourceMapConsumer.GREATEST_LOWER_BOUND});return i.line!==null?i:e.originalPositionFor({line:r.lineNumber,column:r.columnNumber-1,bias:K_.SourceMapConsumer.LEAST_UPPER_BOUND})},WT)}async addSource(e,r,i,n,s,o){let a=await this.sourcePathResolver.urlToAbsolutePath({url:e});this.logger.verbose("runtime.sourcecreate","Creating source from url",{inputUrl:e,absolutePath:a});let u=new cf(this,e,a,r,i&&this.sourcePathResolver.shouldResolveSourceMap({sourceMapUrl:i,compiledPath:a||e})?i:void 0,n,s,o);return this._addSource(u),u}async _addSource(e){let r=e.url&&this._sourceByOriginalUrl.get(e.url);r&&!VT(r,e)&&this.removeSource(r,!0),this._sourceByOriginalUrl.set(e.url,e),this._sourceByReference.set(e.sourceReference,e),e instanceof Bt&&this._sourceMapSourcesByUrl.set(e.url,e);let i=this._sourceByAbsolutePath.get(e.absolutePath);if((i===void 0||i.url.length>=e.url.length||VT(i,e))&&this._sourceByAbsolutePath.set(e.absolutePath,e),this.scriptSkipper.initializeSkippingValueForSource(e),e.toDap().then(u=>this._dap.loadedSource({reason:"new",source:u})),!Sr(e))return;let n=this._sourceMaps.get(e.sourceMap.url);if(n){n.compiled.add(e),n.map&&await this._addSourceMapSources(e,n.map);return}let s=Xe(),o={compiled:new Set([e]),loaded:s.promise};this._sourceMaps.set(e.sourceMap.url,o);try{o.map=await this.sourceMapFactory.load(e.sourceMap.metadata)}catch(u){if(this.initializeConfig.clientID==="visualstudio"){let c=e.sourceMap.metadata.sourceMapUrl;try{let l=await this.sourcePathResolver.urlToAbsolutePath({url:c});l&&(e.sourceMap.metadata.sourceMapUrl=We(l)),o.map=await this.sourceMapFactory.load(e.sourceMap.metadata),this._statistics.fallbackSourceMapCount++,this.logger.info("sourcemap.parsing","Failed to process original source-map; falling back to storage source-map",{fallbackSourceMapUrl:e.sourceMap.metadata.sourceMapUrl,originalSourceMapUrl:c,originalSourceMapError:G_(u)})}catch{}}if(!o.map)return this._dap.output({output:ym(e.url,u.message).error.format+`
`,category:"stderr"}),s.resolve()}if(this._sourceMaps.get(e.sourceMap.url)!==o)return s.resolve();this.logger.verbose("sourcemap.parsing","Creating sources from source map",{sourceMapId:o.map.id,metadata:o.map.metadata});let a=[];for(let u of o.compiled)a.push(this._addSourceMapSources(u,o.map));await Promise.all(a),this.scriptSkipper.initializeSkippingValueForSource(e),s.resolve()}removeSource(e,r=!1){let i=this._sourceByReference.get(e.sourceReference);if(i===void 0)return;if(this.logger.assert(e===i,"Expected source to be the same as the existing reference"),this._sourceByReference.delete(e.sourceReference),this._sourceByOriginalUrl.get(e.url)===e&&this._sourceByOriginalUrl.delete(e.url),e instanceof Bt){this._sourceMapSourcesByUrl.delete(e.url);for(let[s,o]of e.compiledToSourceUrl)s.sourceMap.sourceByUrl.delete(o)}if(this._sourceByAbsolutePath.delete(e.absolutePath),Sr(e)&&(this._permanentlyDisabledSourceMaps.delete(e),this._temporarilyDisabledSourceMaps.delete(e)),r||e.toDap().then(s=>this._dap.loadedSource({reason:"removed",source:s})),!Sr(e))return;let n=this._sourceMaps.get(e.sourceMap.url);this.logger.assert(n,`Source map missing for ${e.sourceMap.url} in removeSource()`)&&(this.logger.assert(n.compiled.has(e),`Source map ${e.sourceMap.url} does not contain source ${e.url}`),n.compiled.delete(e),n.compiled.size||(n.map&&n.map.destroy(),this._sourceMaps.delete(e.sourceMap.url)),n.map&&this._removeSourceMapSources(e,n.map,r))}async _addSourceMapSources(e,r){let i=[];for(let n of r.sources){let s=await this.sourcePathResolver.urlToAbsolutePath({url:n,map:r}),o=s?We(s):r.computedSourceUrl(n),a=this._sourceMapSourcesByUrl.get(o);if(e===a)continue;if(a)if(xz(e.url))this.removeSource(a);else{a.compiledToSourceUrl.set(e,n),e.sourceMap.sourceByUrl.set(n,a);continue}this.logger.verbose("runtime.sourcecreate","Creating source from source map",{inputUrl:n,sourceMapId:r.id,absolutePath:s,resolvedUrl:o});let u=s&&We(s),c=this.sourceMapFactory.guardSourceMapFn(r,()=>r.sourceContentFor(n,!0),()=>null),l;if(c){let f=mc(c);if(f&&(!tr(f)&&s?l=uo(s?We(s):n,f):l=f),s&&l){let H={sourceMapUrl:l,compiledPath:s};this.sourcePathResolver.shouldResolveSourceMap(H)||(l=void 0)}}let p=new Bt(this,o,s,c!==null?()=>Promise.resolve(c):u?()=>this.resourceProvider.fetch(u).then(f=>f.body):()=>e.content(),l,void 0,e.runtimeScriptOffset);p.compiledToSourceUrl.set(e,n),e.sourceMap.sourceByUrl.set(n,p),i.push(this._addSource(p))}await Promise.all(i)}_removeSourceMapSources(e,r,i){for(let n of r.sources){let s=e.sourceMap.sourceByUrl.get(n);s&&(e.sourceMap.sourceByUrl.delete(n),s.compiledToSourceUrl.delete(e),!s.compiledToSourceUrl.size&&this.removeSource(s,i))}}async waitForSourceMapSources(e){if(!Sr(e))return[];let r=this._sourceMaps.get(e.sourceMap.url);return this.logger.assert(r,"Unrecognized source map url in waitForSourceMapSources()")?(await r.loaded,[...e.sourceMap.sourceByUrl.values()]):[]}async revealUiLocation(e){this._dap.revealLocationRequested({source:await e.source.toDap(),line:e.lineNumber,column:e.columnNumber})}disableSourceMapForSource(e,r=!1){r?this._permanentlyDisabledSourceMaps.add(e):this._temporarilyDisabledSourceMaps.add(e)}clearDisabledSourceMaps(e){e?this._temporarilyDisabledSourceMaps.delete(e):this._temporarilyDisabledSourceMaps.clear()}};zt=X([(0,Ki.injectable)(),x(0,(0,Ki.inject)(di)),x(1,(0,Ki.inject)(ms)),x(2,(0,Ki.inject)(pe)),x(3,(0,Ki.inject)(Fe)),x(4,(0,Ki.inject)(dr)),x(5,(0,Ki.inject)(et)),x(6,(0,Ki.inject)(Ho)),x(7,(0,Ki.inject)(La))],zt);function go(t,e){if(!e)return t;let{lineNumber:r,columnNumber:i}=t;return e&&(r+=e.lineOffset,r<=1&&(i+=e.columnOffset)),{...t,lineNumber:r,columnNumber:i}}function Ra(t,e){if(!e)return t;let{lineNumber:r,columnNumber:i}=t;return e&&(r=Math.max(1,r-e.lineOffset),r<=1&&(i=Math.max(1,i-e.columnOffset))),{...t,lineNumber:r,columnNumber:i}}var YT=t=>({lineNumber:t.lineNumber+1,columnNumber:t.columnNumber+1}),yo=t=>({lineNumber:t.lineNumber-1,columnNumber:t.columnNumber-1});var QT=/[$a-z_][$0-9A-Z_$]*/iy,bo=Symbol("IRenameProvider"),Ic=class{constructor(e,r){this.sourceMapFactory=e;this.launchConfig=r;this.renames=new Map}provideOnStackframe(e){if(!this.launchConfig.sourceMapRenames)return Xi.None;let r=e.uiLocation();return r===void 0?Xi.None:"then"in r?r.then(i=>this.provideForSource(i==null?void 0:i.source)):this.provideForSource(r==null?void 0:r.source)}provideForSource(e){if(!this.launchConfig.sourceMapRenames||!(e instanceof Bt))return Xi.None;let r=e.compiledToSourceUrl.keys().next().value;if(!r)throw new Error("unreachable");let i=this.renames.get(r.url);if(i)return i;let n=this.sourceMapFactory.load(r.sourceMap.metadata).then(async s=>{if(!(s!=null&&s.hasNames))return Xi.None;let o=await r.content();return o?this.createFromSourceMap(s,o):Xi.None}).catch(()=>Xi.None);return this.renames.set(r.url,n),n}createFromSourceMap(e,r){let i=new co(r),n=[];return e.eachMapping(s=>{if(!s.name)return;let o=new Nu(s.generatedLine,s.generatedColumn),a=i.convert(o);QT.lastIndex=a;let u=QT.exec(r);u&&n.push({compiled:u[0],original:s.name,position:o})}),n.sort((s,o)=>s.position.compare(o.position)),new Xi(n)}};Ic=X([(0,lf.injectable)(),x(0,(0,lf.inject)(ms)),x(1,(0,lf.inject)(Fe))],Ic);var X_=class{constructor(e){this.renames=e}getOriginalName(e,r){var i;return(i=this.getClosestRename(r,n=>n.compiled===e))==null?void 0:i.original}getCompiledName(e,r){var i;return(i=this.getClosestRename(r,n=>n.original===e))==null?void 0:i.compiled}getClosestRename(e,r){let i=e.base01,n;for(let s of this.renames){if(!r(s))continue;if(!(s.position.compare(i)<0)&&n)return n;n=s}return n}},Xi=X_;Xi.None=new X_([]);var Er=Symbol("ITelemetryReporter");var ZT=F(ue());var vo=Symbol("IShutdownParticipants"),Sc=class{constructor(){this.participants=[]}register(e,r){if(this.shutdownStage!==void 0&&this.shutdownStage>=e)return r(),Ru;for(;this.participants.length<=e;)this.participants.push(new Set);return this.participants[e].add(r),{dispose:()=>this.participants[e].delete(r)}}async shutdown(){for(this.shutdownStage=0;this.shutdownStage<this.participants.length;this.shutdownStage++)await Promise.all([...this.participants[this.shutdownStage]].map(e=>e()))}};Sc=X([(0,ZT.injectable)()],Sc);var Fn=F(ue());var Xm=class{constructor(e=!1,r=!1){this.verified=e;this.hit=r}},zm=class{constructor(){this._statisticsById=new Map}registerBreakpoints(e){e.forEach(r=>{r.id!==void 0&&!this._statisticsById.has(r.id)&&this._statisticsById.set(r.id,new Xm(r.verified,!1))})}registerResolvedBreakpoint(e){this.getStatistics(e).verified=!0}registerBreakpointHit(e){this.getStatistics(e).hit=!0}getStatistics(e){let r=this._statisticsById.get(e);if(r!==void 0)return r;{let i=new Xm;return this._statisticsById.set(e,i),i}}statistics(){let e=0,r=0,i=0;for(let n of this._statisticsById.values())e++,n.hit&&i++,n.verified&&r++;return{set:e,verified:r,hit:i}}};var Jm=async(t,e,r,i={})=>{let n=Date.now();try{return await r()}finally{t.verbose("perf.function","",{method:e,duration:Date.now()-n,...i})}};var ff=w("fs"),$t=F(ue()),Qm=F(w("path"));var Oa=F(ue()),pf=F(w("path"));var Ec=class{get empty(){return this.patterns.length===0}constructor({rootPath:e,patterns:r}){!e||!r?(this.rootPath="",this.patterns=[]):(this.rootPath=e,this.patterns=r.map(i=>{let n=i.startsWith("!");return{negated:n,pattern:i.slice(n?1:0)}}))}*explode(){for(let e=0;e<this.patterns.length;e++){let{negated:r,pattern:i}=this.patterns[e];if(r)continue;let n=pf.resolve(this.rootPath,i).split(/[\\/]/g),s=n.findIndex(u=>u.includes("*"));if(s===-1){yield{cwd:n.slice(0,-1).join("/"),pattern:n[n.length-1],negations:[]};continue}let o=n.slice(0,s).join("/"),a=[];for(let u=e+1;u<this.patterns.length;u++){let{negated:c,pattern:l}=this.patterns[u];if(c)if(l.startsWith("**"))a.push(Ye(l));else{let p=pf.relative(o,pf.resolve(this.rootPath,l));p.startsWith("..")||a.push(Ye(p))}}yield{cwd:o,negations:a,pattern:n.slice(s).join("/")}}}};Ec=X([(0,Oa.injectable)()],Ec);var Rn=class extends Ec{constructor({rootPath:e,outFiles:r}){super({rootPath:e,patterns:r})}};Rn=X([(0,Oa.injectable)(),x(0,(0,Oa.inject)(Fe))],Rn);var Hs=class extends Ec{constructor(e){super({rootPath:e.rootPath,patterns:"vueComponentPaths"in e?e.vueComponentPaths:[]})}};Hs=X([(0,Oa.injectable)(),x(0,(0,Oa.inject)(Fe))],Hs);var e$=F(yv());var xc=Symbol("ISearchStrategy"),Ym=Symbol("ISearchStrategyFallback"),Lc=async(t,e)=>{typeof e>"u"&&(e=await aC(t));let r=mc(e);if(!r)return;let i=tr(r);if(i||(r=uo(We(t),r)),!r||!r.startsWith("data:")&&!r.startsWith("file://"))return;let n;if(i)n=(0,e$.xxHash32)(r);else{let s=await oC(st(r)||t);if(!s)return;n=s.mtimeMs}return{compiledPath:t,sourceMapUrl:r,cacheKey:n}};var z_=Symbol("InlineSourceMapUrl"),t$=10*1e3,Na=class{constructor(e){e.__workspaceCachePath&&(this.path=Qm.join(e.__workspaceCachePath,"bp-predict.json"))}async load(){if(this.value||!this.path)return this.value;try{this.value=JSON.parse(await ff.promises.readFile(this.path,"utf-8"))}catch{}return this.value}async store(e){this.value=e,this.path&&(await ff.promises.mkdir(Qm.dirname(this.path),{recursive:!0}),await ff.promises.writeFile(this.path,JSON.stringify(e)))}};Na=X([(0,$t.injectable)(),x(0,(0,$t.inject)(Fe))],Na);var On=class{constructor(e,r,i,n,s,o,a,u){this.outFiles=r;this.logger=s;this.sourceMapFactory=o;this.sourcePathResolver=a;this.state=u;this.repo="enableTurboSourcemaps"in e&&e.enableTurboSourcemaps===!1?n:i}async createMapping(e){if(this.outFiles.empty)return new Map;let r=$a(),i=await this.state.load();try{let{state:n}=await this.repo.streamChildrenWithSourcemaps({files:this.outFiles,processMap:async s=>{let o=[],a=await this.sourceMapFactory.load(s);for(let u of a.sources){let c=this.sourcePathResolver?await this.sourcePathResolver.urlToAbsolutePath({url:u,map:a}):st(u);c&&o.push({...s,sourceMapUrl:tr(s.sourceMapUrl)?{[z_]:s.sourceMapUrl}:s.sourceMapUrl,resolvedPath:c,sourceUrl:u})}return{discovered:o,compiledPath:wt(s.compiledPath)}},onProcessedMap:({discovered:s})=>{for(let o of s){let a=r.get(o.resolvedPath);a||(a=new Set,r.set(o.resolvedPath,a)),a.add(o)}},lastState:i,...e});n&&this.state.store(n).catch(s=>this.logger.warn("runtime.exception","Error saving sourcemap cache",{error:s}))}catch(n){this.logger.warn("runtime.exception","Error reading sourcemaps from disk",{error:n})}return r}};On=X([(0,$t.injectable)(),x(0,(0,$t.inject)(Fe)),x(1,(0,$t.inject)(Rn)),x(2,(0,$t.inject)(xc)),x(3,(0,$t.inject)(Ym)),x(4,(0,$t.inject)(pe)),x(5,(0,$t.inject)(ms)),x(6,(0,$t.inject)(et)),x(7,(0,$t.inject)(Na))],On);var Cc=class extends On{async getMetadataForPaths(r){this.sourcePathToCompiled||(this.sourcePathToCompiled=this.createInitialMapping());let i=await this.sourcePathToCompiled;return r.map(n=>i.get(n))}async createInitialMapping(){return Jm(this.logger,"BreakpointsPredictor.createInitialMapping",()=>this.createMapping())}};Cc=X([(0,$t.injectable)()],Cc);var Pc=class extends On{constructor(){super(...arguments);this.sourcePathToCompiled=new Map}async getMetadataForPaths(r){let i=r.map(o=>this.sourcePathToCompiled.get(o)),n=r.map((o,a)=>a).filter(o=>!i[o]);if(n.length){let o=new Set(n.map(u=>Ye(r[u]))),a=this.createMapping({filter:(u,c)=>!c||c.discovered.some(l=>o.has(Ye(l.resolvedPath)))});for(let u of n)this.sourcePathToCompiled.set(r[u],a),i[u]=a}return await Promise.all(i.map(async(o,a)=>(await o).get(r[a])))}};Pc=X([(0,$t.injectable)()],Pc);var Fa=Symbol("IBreakpointsPredictor"),Ba=class{constructor(e,r,i,n){this.bpSearch=e;this.outFiles=r;this.logger=i;this.sourceMapFactory=n;this.predictedLocations=new Map;this.longParseEmitter=new J;this.targetedMode=!1;this.onLongParse=this.longParseEmitter.event}async predictBreakpoints(e){var n;if(!e.source.path||!((n=e.breakpoints)!=null&&n.length))return;let r=await this.getMetadataForPaths([e.source.path]).then(s=>s[0]);if(!r)return;let i=async(s,o,a)=>{let u=typeof a.sourceMapUrl=="string"?a.sourceMapUrl:a.sourceMapUrl.hasOwnProperty(z_)?a.sourceMapUrl[z_]:await ff.promises.readFile(a.compiledPath,"utf8").then(mc);if(!u)return[];let c=await this.sourceMapFactory.load({...a,sourceMapUrl:u}),l=this.sourceMapFactory.guardSourceMapFn(c,()=>Rm(a.sourceUrl,{lineNumber:s,columnNumber:o||1},c),()=>null);if(!l||l.line===null)return[];let p=await this.getMetadataForPaths([a.compiledPath]).then(f=>f[0]);return p?(await Promise.all([...p].map(H=>i(l.line,l.column,H)))).flat():[{absolutePath:a.compiledPath,lineNumber:l.line||1,columnNumber:l.column?l.column+1:1}]};for(let s of e.breakpoints??[]){let o=`${e.source.path}:${s.line}:${s.column||1}`;if(this.predictedLocations.has(o))return;let a=[];this.predictedLocations.set(o,a);for(let u of r)a.push(...await i(s.line,s.column||0,u))}}async getPredictionForSource(e){return this.getMetadataForPaths([e]).then(r=>r[0])}async getMetadataForPaths(e){let r=setTimeout(()=>{this.longParseEmitter.fire(),this.logger.warn("runtime.sourcemap","Long breakpoint predictor runtime",{longPredictionWarning:t$,patterns:[...this.outFiles.explode()].join(", ")})},t$),i=await this.bpSearch.getMetadataForPaths(e);return clearTimeout(r),i}predictedResolvedLocations(e){let r=`${e.absolutePath}:${e.lineNumber}:${e.columnNumber||1}`;return this.predictedLocations.get(r)??[]}};Ba=X([(0,$t.injectable)(),x(0,(0,$t.inject)(On)),x(1,(0,$t.inject)(Rn)),x(2,(0,$t.inject)(pe)),x(3,(0,$t.inject)(ms))],Ba);var kc=F(ue());var i$=w("crypto"),n$=F(Dm()),df=F(ue());var Cz=0,gt=Symbol("ICdpApi"),Ua=class extends Error{constructor(r){super("<<message>>");this.method=r}setCause(r,i){var n;return this.cause={code:r,message:i},this.message=`CDP error ${r} calling method ${this.method}: ${i}`,this.stack=(n=this.stack)==null?void 0:n.replace("<<message>>",this.message),this}},Mt=class{constructor(e,r,i){this.logger=r;this.telemetryReporter=i;this._connectionId=Cz++;this._lastId=1e3;this._disposedSessions=new Map;this._onDisconnectedEmitter=new J;this.waitWrapper=Dz();this.onDisconnected=this._onDisconnectedEmitter.event;this._transport=e,this._transport.onMessage(([n,s])=>this._onMessage(n,s)),this._transport.onEnd(()=>this._onTransportClose()),this._sessions=new Map,this._closed=!1,this._rootSession=new Zm(this,"",this.logger),this._sessions.set("",this._rootSession)}rootSession(){return this._rootSession.cdp()}_send(e,r={},i){let n=++this._lastId,s={id:n,method:e,params:r};i&&(s.sessionId=i);let o=JSON.stringify(s);return this.logger.verbose("cdp.send",void 0,{connectionId:this._connectionId,message:s}),this._transport.send(o),n}_onMessage(e,r){let i=JSON.parse(e),n=i;i.result&&i.result.scriptSource?n={...i,result:{...i.result,scriptSource:"<script source>"}}:i.method==="Debugger.scriptParsed"&&i.params&&tr(i.params.sourceMapURL)&&(n={...i,params:{...i.params,sourceMapURL:"<data source map url>"}}),this.logger.verbose("cdp.receive",void 0,{connectionId:this._connectionId,message:n});let s=this._sessions.get(i.sessionId||"");if(!s){let u=this._disposedSessions.get(i.sessionId);if(u){let c=(Date.now()-u.getTime())/1e3;this.logger.warn("internal",`Got message for a session disposed ${c} seconds ago`,{sessionId:i.sessionId,disposeOn:u});return}else throw new Error(`Unknown session id: ${i.sessionId} while processing: ${i.method}`)}let o=i.method,a;try{s._onMessage(i)}catch(u){a=u}o&&this.telemetryReporter.reportOperation("cdpOperation",o,r.elapsed().ms,a)}_onTransportClose(){if(!this._closed){this._closed=!0,this._transport.dispose(),this.logger.info("cdp.receive","Connection closed",{connectionId:this._connectionId});for(let e of this._sessions.values())e._onClose();this._sessions.clear(),this._onDisconnectedEmitter.fire()}}close(){this._onTransportClose()}isClosed(){return this._closed}createSession(e){let r=new Zm(this,e,this.logger);return this._sessions.set(e,r),r.cdp()}disposeSession(e){let r=this._sessions.get(e);r&&(r._onClose(),this._disposedSessions.set(r.sessionId(),new Date),this._sessions.delete(r.sessionId()))}},Pz=+process.version.substring(1).split(".")[0]<11,Zm=class{constructor(e,r,i){this.logger=i;this._queue=[];this._prefixListeners=new Dp;this._directListeners=new Dp;this.paused=!1;this._callbacks=new Map,this._connection=e,this._sessionId=r,this._cdp=this._createApi()}pause(){this.paused=!0}resume(){if(!this.paused)return;this.paused=!1;let e=this._queue;this._queue=[],this.logger.verbose("cdp.receive","Dequeue messages",{message:e});for(let r of e)this._processResponse(r)}cdp(){return this._cdp}sessionId(){return this._sessionId}_createApi(){return new Proxy({},{get:(e,r)=>r==="pause"?()=>this.pause():r==="resume"?()=>this.resume():r==="session"?this:new Proxy({},{get:(i,n)=>{if(n!=="then")return n==="on"?(s,o)=>this.on(`${r}.${s}`,o):s=>this.send(`${r}.${n}`,s)}})})}on(e,r){return this._directListeners.listen(e,r)}onPrefix(e,r){return this._prefixListeners.listen(e,r)}send(e,r={}){return this.sendOrDie(e,r).catch(()=>{})}sendOrDie(e,r={}){if(!this._connection)return Promise.reject(new Ua(e).setCause(0,"Connection is closed"));let i=this._connection._send(e,r,this._sessionId);return new Promise((n,s)=>{this._callbacks.set(i,{resolve:n,reject:s,from:new Ua(e),method:e})})}_onMessage(e){if(this.paused&&e.id){this._processResponse(e);return}if(this._queue.length>0){this._queue.push(e);return}if(!Pz&&!this.paused){this._processResponse(e);return}this._queue.push(e),this.paused||this._processQueue()}_processQueue(){var e;(e=this._connection)==null||e.waitWrapper(()=>{if(this.paused)return;let r=this._queue.shift();r&&(this._processResponse(r),this._queue.length&&this._processQueue())})}_processResponse(e){if(e.id===void 0){let i=e;this._directListeners.emit(i.method,i.params);for(let[n,s]of this._prefixListeners.listeners)i.method.startsWith(n)&&s.fire(i);return}let r=this._callbacks.get(e.id);r&&(this._callbacks.delete(e.id),"error"in e?r.reject(r.from.setCause(e.error.code,e.error.message)):"result"in e&&r.resolve(e.result))}async detach(){if(!this._connection)throw new Error("Session already detached. Most likely the target has been closed.");this._connection._send("Target.detachFromTarget",{},this._sessionId)}isClosed(){return!this._connection}_onClose(){for(let e of this._callbacks.values())e.reject(e.from.setCause(0,"Connection is closed"));this._callbacks.clear(),this._connection=void 0}};function Dz(){if(parseInt(process.versions.node,10)>=11)return setImmediate;let t=!1,e=[],r=()=>{let i=e.shift();if(!i){t=!1;return}setImmediate(r),i()};return i=>{e.push(i),t||(t=!0,setImmediate(r))}}var gs="$returnValue",Tz="__js_debug_hoisted_",r$=()=>Tz+(0,i$.randomBytes)(8).toString("hex"),gi=Symbol("IEvaluator"),Dc=class{constructor(e,r){this.cdp=e;this.renameProvider=r}get hasReturnValue(){return!!this.returnValue}setReturnedValue(e){this.returnValue=e}prepare(e,{isInternalScript:r,hoist:i,renames:n}={}){r!==!1&&(e+=Ht());let s=new Map;s.set(gs,r$());for(let u of i??[])s.set(u,r$());let{transformed:o,hoisted:a}=this.replaceVariableInExpression(e,s,n);return a.size?{canEvaluateDirectly:!1,invoke:(u,c={})=>Promise.all([...s].map(([l,p])=>this.hoistValue(l===gs?this.returnValue:c[l],p))).then(()=>this.cdp.Debugger.evaluateOnCallFrame({...u,expression:o}))}:{canEvaluateDirectly:!0,invoke:u=>this.cdp.Debugger.evaluateOnCallFrame({...u,expression:o})}}async evaluate(e,r){if(!("callFrameId"in e))return this.cdp.Runtime.evaluate(e);let i=r;if(r!=null&&r.stackFrame){let n=await this.renameProvider.provideOnStackframe(r.stackFrame);i={...i,renames:{mapping:n,position:r.stackFrame.rawPosition}}}return this.prepare(e.expression,i).invoke(e)}async hoistValue(e,r){let i=e==null?void 0:e.objectId,n=`setTimeout(() => { delete globalThis.${r} }, 0)`;i?await this.cdp.Runtime.callFunctionOn({objectId:i,functionDeclaration:`function() { globalThis.${r} = this; ${n}; ${Ht()} }`}):await this.cdp.Runtime.evaluate({expression:`globalThis.${r} = ${JSON.stringify(e==null?void 0:e.value)};${n};`+Ht()})}replaceVariableInExpression(e,r,i){let n=new Set,s=!1,o=(p,f)=>({type:"ConditionalExpression",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:p}},operator:"!==",right:{type:"Literal",value:"undefined"}},consequent:{type:"Identifier",name:p},alternate:f}),a=[],u=oo(e),c=(0,n$.replace)(u,{enter(p,f){let H=p;if(p.type!=="Identifier"||e[H.start-1]===".")return;let m=r.get(p.name);if(m)return n.add(p.name),s=!0,this.skip(),T_(p,f)?{type:"Identifier",name:m}:o(m,$z);let y=i==null?void 0:i.mapping.getCompiledName(p.name,i.position);if(y)return s=!0,this.skip(),T_(p,f)?{type:"Identifier",name:y}:o(y,p)},leave:()=>{a.pop()}});if(!s)return{hoisted:n,transformed:e};let l=u.body[u.body.length-1].end;return{hoisted:n,transformed:ds(c)+e.slice(l)}}};Dc=X([(0,df.injectable)(),x(0,(0,df.inject)(gt)),x(1,(0,df.inject)(bo))],Dc);var $z={type:"Identifier",name:"undefined"};var Tc=class{static parse(e,r,i,n){i&&(r=J_(r));let s=r&&ao(r);if(s)throw new re(ro(e,s.message));let{canEvaluateDirectly:o,invoke:a}=n.prepare(r);return new Tc(o?r:a)}constructor(e){typeof e=="function"?this.invoke=e:this.breakCondition=e}async shouldStayPaused(e){if(!this.invoke)return Promise.resolve(!0);let r=await this.invoke({callFrameId:e.callFrames[0].callFrameId,returnByValue:!0});return(r==null?void 0:r.result.value)===!0}},J_=t=>`(()=>{try{return ${t};}catch(e){console.error(e);return true}})()`;var Mz=/^(>|>=|={1,3}|<|<=|%)?\s*([0-9]+)$/,_o=class{constructor(e){this.predicate=e;this.hits=0;this.breakCondition=void 0}shouldStayPaused(){return Promise.resolve(this.predicate(++this.hits))}static parse(e){let r=Mz.exec(e);if(!r)throw new re(uD(e));let[,i,n]=r,s=i==="%"?`return (numHits % ${n}) === 0;`:i[0]==="="?`return numHits === ${n};`:`return numHits ${i} ${n};`;return new _o(new Function("numHits",s))}};var s$=w("crypto"),tH=F(ue());var eH=class{constructor(e){this.invoke=e;this.breakCondition=void 0}async shouldStayPaused(e){return await this.invoke({callFrameId:e.callFrames[0].callFrameId}),!1}};var $c=class{constructor(e,r){this.breakCondition=r;let i=r&&ao(r);if(i)throw new re(ro(e,i.message))}shouldStayPaused(){return Promise.resolve(!0)}};var wo=class{constructor(e){this.evaluator=e}compile(e,r){let i=this.logMessageToExpression(r),n=ao(i);if(n)throw new re(ro(e,n.message));let{canEvaluateDirectly:s,invoke:o}=this.evaluator.prepare(i);return s?new $c(e,this.logMessageToExpression(r)):new eH(o)}serializeLogStatements(e){return hT([],e,!1)}logMessageToExpression(e){let r=c=>c.replace(/%/g,"%%"),i=[],n=[],s=0;for(;;){let c=e.indexOf("{",s);if(c===-1){i.push(r(e.slice(s)));break}i.push(r(e.slice(s,c)));let[l]=Mm(e.slice(c));if(s=c+l.end,s-1===c+1||e[s-1]!=="}"){i.push(r(e.slice(c,s)));continue}if(l.type!=="BlockStatement")break;n.push(ds(this.serializeLogStatements(l.body))),i.push("%O")}let a=`console.log(${[JSON.stringify(i.join("")),...n].join(", ")}), false`,u=(0,s$.createHash)("sha1").update(a).digest("hex").slice(0,7);return a+`
//# sourceURL=logpoint-${u}.cdp`}};wo=X([(0,tH.injectable)(),x(0,(0,tH.inject)(gi))],wo);var kz=new $c({line:0},void 0),rH=Symbol("IBreakpointConditionFactory"),Mc=class{constructor(e,r,i){this.logPointCompiler=e;this.evaluator=r;this.breakOnError=i.__breakOnConditionalError}getConditionFor(e){return e.condition?Tc.parse(e,e.condition,this.breakOnError,this.evaluator):e.logMessage?this.logPointCompiler.compile(e,e.logMessage):e.hitCondition?_o.parse(e.hitCondition):kz}};Mc=X([(0,kc.injectable)(),x(0,(0,kc.inject)(wo)),x(1,(0,kc.inject)(gi)),x(2,(0,kc.inject)(Fe))],Mc);var sH=w("path");var iH=(t,e)=>t.lineNumber===e.lineNumber&&t.columnNumber===e.columnNumber;var nH=t=>!("location"in t),o$=t=>"location"in t,a$=(t,e)=>t.url&&e===t.url||t.urlRegex&&new RegExp(t.urlRegex).test(e),Rc=class{constructor(e,r,i){this._manager=e;this._source=r;this._originalPosition=i;this.isEnabled=!1;this.setInCdpScriptIds=new Set;this.cdpScriptIds=this.setInCdpScriptIds;this.cdpBreakpoints=[];this._cdpIds=new Set}get enabled(){return this.isEnabled}get cdpIds(){return this._cdpIds}get source(){return this._source}get originalPosition(){return this._originalPosition}async updateSourceLocation(e,r){this._source=e,this._originalPosition=r,this.updateCdpRefs(i=>i.map(n=>n.state===1?{...n,uiLocations:this._manager._sourceContainer.currentSiblingUiLocations(r)}:n))}async refreshUiLocations(e){await Promise.all(this.cdpBreakpoints.filter(r=>r.state===1).map(r=>this.updateUiLocations(e,r.cdpId,r.locations)))}async enable(e){if(this.isEnabled)return;this.isEnabled=!0;let r=[this._setPredicted(e)],i=this._manager._sourceContainer.source(this.source);if((!i||!(i instanceof Bt))&&r.push(this._setByPath(e,go(this.originalPosition,i==null?void 0:i.runtimeScriptOffset))),await Promise.all(r),i&&this.isEnabled){let n=this._manager._sourceContainer.currentSiblingUiLocations({lineNumber:this.originalPosition.lineNumber,columnNumber:this.originalPosition.columnNumber,source:i});await Promise.all(n.map(s=>this._setByUiLocation(e,go(s,i.runtimeScriptOffset))))}}async updateUiLocations(e,r,i){this.updateExistingCdpRef(r,o=>({...o,locations:i}));let n=(await Promise.all(i.map(o=>e.rawLocationToUiLocation(e.rawLocation(o))))).find(o=>!!o);if(!n)return;let s=this._manager._sourceContainer.source(this.source);s&&this.updateExistingCdpRef(r,o=>{let a=this._manager._sourceContainer.currentSiblingUiLocations(n),u=a.filter(c=>c.source===s);return{...o,locations:i,uiLocations:u.length?u:a}})}compare(e){let r=this.originalPosition,i=e.originalPosition;return r.lineNumber!==i.lineNumber?r.lineNumber-i.lineNumber:r.columnNumber-i.columnNumber}async disable(){if(!this.isEnabled)return;this.isEnabled=!1;let e=this.cdpBreakpoints.map(r=>this.removeCdpBreakpoint(r));await Promise.all(e)}async updateForSourceMap(e,r){let i=this._manager._sourceContainer.source(this.source);if(!i)return[];let n=await r.source,s=this._manager._sourceContainer.currentSiblingUiLocations({lineNumber:this.originalPosition.lineNumber,columnNumber:this.originalPosition.columnNumber,source:i},n);if(!s.length)return[];let o=[];for(let a of s)o.push(this._setByScriptId(e,r,go(a,i.runtimeScriptOffset)));for(let a of this.cdpBreakpoints){if(!nH(a.args)||!this.breakpointIsForSource(a.args,n))continue;let u=a.args;s.some(c=>c.columnNumber-1===u.columnNumber&&c.lineNumber-1===u.lineNumber)||(this._manager.logger.verbose("runtime.sourcemap","Adjusted breakpoint due to overlaid sourcemap",{url:i.url}),o.push(this.removeCdpBreakpoint(a)))}return await Promise.all(o),s}executionContextWasCleared(){this.updateCdpRefs(e=>e.filter(r=>nH(r.args)))}breakpointIsForSource(e,r){if(a$(e,r.url))return!0;let i=this._manager._sourceContainer.sourcePathResolver.rebaseLocalToRemote(r.absolutePath);return!!a$(e,i)}getBreakCondition(){}updateExistingCdpRef(e,r){this.updateCdpRefs(i=>i.map(n=>n.state!==1||n.cdpId!==e?n:r(n)))}updateCdpRefs(e){let r=this;r.cdpBreakpoints=e(this.cdpBreakpoints);let i=new Set;this.setInCdpScriptIds.clear();for(let n of this.cdpBreakpoints)if(n.state===1){i.add(n.cdpId);for(let s of n.locations)this.setInCdpScriptIds.add(s.scriptId)}this._cdpIds=i}async _setPredicted(e){if(!this.source.path||!this._manager._breakpointsPredictor)return;let r=this._manager._breakpointsPredictor.predictedResolvedLocations({absolutePath:this.source.path,lineNumber:this.originalPosition.lineNumber,columnNumber:this.originalPosition.columnNumber}),i=[];for(let n of r){let s=this._manager._sourceContainer.sourcePathResolver.absolutePathToUrlRegexp(n.absolutePath);s!==void 0&&(typeof s=="string"?i.push(this._setByUrlRegexp(e,s,n)):i.push(s.then(o=>o?this._setByUrlRegexp(e,o,n):void 0)))}await Promise.all(i)}async _setByUiLocation(e,r){await Promise.all(r.source.scripts.map(i=>this._setByScriptId(e,i,r)))}async _setByPath(e,r){let i=this._manager._sourceContainer.source({path:this.source.path});if(!(i instanceof Bt&&[...i.compiledToSourceUrl.keys()].some(s=>s.absolutePath===this.source.path)))if(this.source.path){let n=await this._manager._sourceContainer.sourcePathResolver.absolutePathToUrlRegexp(this.source.path);if(!n)return;await this._setByUrlRegexp(e,n,r)}else{let n=this._manager._sourceContainer.source(this.source),s=n==null?void 0:n.url;if(!s)return;await this._setByUrl(e,s,r),this.source.path!==s&&this.source.path!==void 0&&await this._setByUrl(e,We(this.source.path),r)}}hasSetOnLocation(e,r){return this.cdpBreakpoints.find(i=>e.scriptId&&o$(i.args)&&i.args.location.scriptId===e.scriptId&&iH(i.args.location,r)||e.url&&nH(i.args)&&new RegExp(i.args.urlRegex??"").test(e.url)&&iH(i.args,r))}hasSetOnLocationByRegexp(e,r){return this.cdpBreakpoints.find(i=>{if(nH(i.args))return i.args.urlRegex===e&&iH(i.args,r);let n=this._manager._sourceContainer.getScriptById(i.args.location.scriptId);if(n)return iH(i.args.location,r)&&new RegExp(e).test(n.url)})}async _setByUrl(e,r,i){return this._setByUrlRegexp(e,Fr(r),i)}async _setByUrlRegexp(e,r,i){i=yo(i);let n=this.hasSetOnLocationByRegexp(r,i);if(n){n.state===0&&await n.done;return}return this._setAny(e,{urlRegex:r,condition:this.getBreakCondition(),...i})}async _setByScriptId(e,r,i){i=yo(i);let n=this.hasSetOnLocation(r,i);if(n){n.state===0&&await n.done;return}return this._setAny(e,{condition:this.getBreakCondition(),location:{scriptId:r.scriptId,...i}})}async _setAny(e,r){if(!this.isEnabled)return;let i={state:0,args:r,deadletter:!1};i.done=(async()=>{let n=o$(r)?await e.cdp().Debugger.setBreakpoint(r):await e.cdp().Debugger.setBreakpointByUrl(r);if(!n)return;if(i.deadletter){await e.cdp().Debugger.removeBreakpoint({breakpointId:n.breakpointId});return}let s="actualLocation"in n?[n.actualLocation]:n.locations;this._manager._resolvedBreakpoints.set(n.breakpointId,this);let o={state:1,cdpId:n.breakpointId,args:r,locations:s,uiLocations:[]};return this.updateCdpRefs(a=>a.map(u=>u===i?o:u)),await this.updateUiLocations(e,n.breakpointId,s),o})(),this.updateCdpRefs(n=>[...n,i]),await i.done}async removeCdpBreakpoint(e){var r;this.updateCdpRefs(i=>i.filter(n=>n!==e)),e.state===0?(e.deadletter=!0,await e.done):(await((r=this._manager._thread)==null?void 0:r.cdp().Debugger.removeBreakpoint({breakpointId:e.cdpId})),this._manager._resolvedBreakpoints.delete(e.cdpId))}};var zi=class extends Rc{constructor(r,i,n){super(r,i,{lineNumber:1,columnNumber:1});this.mode=n}static getModeKeyForSource(r,i){return r===1?(0,sH.basename)(i,(0,sH.extname)(i)||void 0):i}_setPredicted(){return Promise.resolve()}_setByPath(r,i){if(!this.source.path)return Promise.resolve();let n=zi.getModeKeyForSource(this.mode,this.source.path);return this.mode===1?super._setByUrlRegexp(r,Ar(n),i):super._setByPath(r,i)}};var c$=F(Ct());var yi=class extends Rc{constructor(r,i,n,s,o){super(r,n,{lineNumber:s.line,columnNumber:s.column||1});this.dapId=i;this.dapParams=s;this.condition=o;this.completedSet=Xe()}equivalentTo(r){return r.dapParams.column===this.dapParams.column&&r.dapParams.line===this.dapParams.line&&r.dapParams.hitCondition===this.dapParams.hitCondition&&r.dapParams.condition===this.dapParams.condition&&r.dapParams.logMessage===this.dapParams.logMessage}untilSetCompleted(){return this.completedSet.promise}markSetCompleted(){this.completedSet.resolve()}testHitCondition(r){return this.condition.shouldStayPaused(r)}async toDap(){let r=this.enabled&&this.getResolvedUiLocation();return r?{id:this.dapId,verified:!0,source:await r.source.toDap(),line:r.lineNumber,column:r.columnNumber}:{id:this.dapId,verified:!1,message:c$.t("Unbound breakpoint")}}diagnosticDump(){return{source:this.source,params:this.dapParams,cdp:this.cdpBreakpoints}}getBreakCondition(){return this.condition.breakCondition}updateCdpRefs(r){let i=this.getResolvedUiLocation();super.updateCdpRefs(r),this.getResolvedUiLocation()!==i&&this.notifyResolved()}getResolvedUiLocation(){for(let r of this.cdpBreakpoints)if(r.state===1&&r.uiLocations.length)return r.uiLocations[0]}async notifyResolved(){await this._manager.notifyBreakpointChange(this,this.completedSet.hasSettled())}};var oH=class extends yi{constructor(e,r,i,n){super(e,r,i,n,new _o(()=>!1))}getResolvedUiLocation(){}};var g1=F(yf());var Bc=class extends zi{constructor(r,i){super(r,{path:i},1);this.pattern=i}async enable(r){if(this.isEnabled)return;this.isEnabled=!0;let i=(0,g1.makeRe)(Ye(this.pattern),{contains:!0,lookbehinds:!1});await this._setAny(r,{urlRegex:i.source.replace(/([a-z]):/i,(n,s)=>`[${s.toLowerCase()}${s.toUpperCase()}]:`),lineNumber:0,columnNumber:0})}};var Fc=F(ue());var dH=Symbol("IExperimentationService");var Y7=/\/node_modules\/|^node\:/,Q7=2,y1=5e3,Z7=y1/2,ht=class{constructor(e,r,i){this.telemetry=r;this.experimentation=i;this.disposable=new Je;this.hadBreakpoint=!1;this.didVerifyBreakpoint=!1;this.hadNonModuleSourcemap=!1;this.startedAt=Date.now();this.disposable.push(ht.didVerifyEmitter.event(()=>{this.didVerifyBreakpoint=!0})),ht.consecutiveQualifyingSessions>=Q7&&this.disposable.push(WE(async()=>{this.currentlyQualifying&&await this.experimentation.getTreatment("diagnosticPrompt",!0)&&(r.report("diagnosticPrompt",{event:"suggested"}),ht.didSuggest=!0,e.suggestDiagnosticTool({}))},y1))}get currentlyQualifying(){return this.hadBreakpoint&&!this.didVerifyBreakpoint&&this.hadNonModuleSourcemap}notifyHadBreakpoint(){this.hadBreakpoint=!0}notifyVerifiedBreakpoint(){this.didVerifyBreakpoint||(ht.didVerifyEmitter.fire(),ht.didSuggest&&(ht.didSuggest=!1,this.telemetry.report("diagnosticPrompt",{event:"resolved"})))}attach(e){if(!this.hadNonModuleSourcemap){let r=this.disposable.push(e.Debugger.on("scriptParsed",i=>{i.sourceMapURL&&!Y7.test(i.url)&&(this.hadNonModuleSourcemap=!0,this.disposable.disposeObject(r))}))}}dispose(){this.currentlyQualifying&&Date.now()-Z7>this.startedAt?ht.consecutiveQualifyingSessions++:ht.consecutiveQualifyingSessions=0,this.disposable.dispose()}};ht.consecutiveQualifyingSessions=0,ht.didVerifyEmitter=new J,ht.didSuggest=!1,ht=X([(0,Fc.injectable)(),x(0,(0,Fc.inject)(uc)),x(1,(0,Fc.inject)(Er)),x(2,(0,Fc.inject)(dH))],ht);var b1=t=>t.originalPosition.columnNumber===1&&t.originalPosition.lineNumber===1,v1=500,_1=Symbol("DontCompare");var vi=class{constructor(e,r,i,n,s,o,a){this.logger=i;this.launchConfig=n;this.conditionFactory=s;this.suggester=o;this._breakpointsPredictor=a;this._resolvedBreakpoints=new Map;this._totalBreakpointsCount=0;this._launchBlocker=new Set;this._predictorDisabledForTest=!1;this._breakpointsStatisticsCalculator=new zm;this.entryBreakpointMode=0;this._enabledFilter=()=>!0;this._byDapId=new Map;this._byPath=$a();this._byRef=new Map;this.moduleEntryBreakpoints=$a();this._dap=e,this._sourceContainer=r,a==null||a.onLongParse(()=>e.longPrediction({})),r.onSourceMappedSteppingChange(()=>{if(this._thread)for(let u of this._byDapId.values())u.refreshUiLocations(this._thread)}),this._scriptSourceMapHandler=async(u,c)=>{if(!i.assert(this._thread,"Expected thread to be set for the breakpoint source map handler"))return[];let l=[],p=[c];for(let f=0;f<p.length;f++)for(let H of p[f]){let m=H.absolutePath,y=m?this._byPath.get(m):void 0;for(let A of y||[])l.push(A.updateForSourceMap(this._thread,u));let b=this._byRef.get(H.sourceReference);for(let A of b||[])l.push(A.updateForSourceMap(this._thread,u));H.sourceMap&&p.push(H.sourceMap.sourceByUrl.values())}return yp(await Promise.all(l))}}get appliedByPath(){return this._byPath}get appliedByRef(){return this._byRef}hasAtLocation(e){let r=this._byPath.get(e.source.absolutePath)||[],i=this._byRef.get(e.source.sourceReference)||[];return r.concat(i).some(n=>n.originalPosition.columnNumber===e.columnNumber&&n.originalPosition.lineNumber===e.lineNumber)}moveBreakpoints(e,r,i){let n=c=>NE(c,l=>{let p=this._sourceContainer.getOptiminalOriginalPosition(r,l.originalPosition);return p.column===null||p.line===null||l.updateSourceLocation({path:i.absolutePath,sourceReference:i.sourceReference},{lineNumber:p.line,columnNumber:p.column+1,source:i}),!1}),s=e.absolutePath,o=i.absolutePath,a=s?this._byPath.get(s):void 0;if(a&&o){let[c,l]=n(a);this._byPath.set(s,c),this._byPath.set(o,l)}let u=this._byRef.get(e.sourceReference);if(u){let[c,l]=n(u);this._byRef.set(e.sourceReference,c),this._byRef.set(i.sourceReference,l)}}async updateEntryBreakpointMode(e,r){if(r===this.entryBreakpointMode)return;let i=[...this.moduleEntryBreakpoints.values()];this.moduleEntryBreakpoints.clear(),this.entryBreakpointMode=r,await Promise.all(i.map(n=>this.ensureModuleEntryBreakpoint(e,n.source)))}async applyEnabledFilter(e,r=_1){if(r!==_1&&this._enabledFilter!==r)return;this._enabledFilter=e||(()=>!0);let i=this._thread;i&&await Promise.all([...this._byDapId.values()].map(n=>this._enabledFilter(n)?n.enable(i):n.disable()))}async getBreakpointLocations(e,r,i,n){let s=i.base1,o=this._sourceContainer.currentSiblingUiLocations({source:r,lineNumber:s.lineNumber,columnNumber:s.columnNumber}),a=n.base1,u=this._sourceContainer.currentSiblingUiLocations({source:r,lineNumber:a.lineNumber,columnNumber:a.columnNumber});if(o.length!==u.length)return this.logger.warn("internal","Expected to have the same number of start and end locations"),[];let c=[],l=[];for(let p=0;p<o.length;p++){let f=o[p],H=u[p];if(f.source!==H.source){this.logger.warn("internal","Expected to have the same number of start and end scripts");continue}let m=f.source;if(!m.scripts.length)continue;let{scriptId:y}=m.scripts[m.scripts.length-1];c.push(e.cdp().Debugger.getPossibleBreakpoints({restrictToFunction:!1,start:{scriptId:y,...go(yo(f),m.runtimeScriptOffset)},end:{scriptId:y,...go(yo(H),m.runtimeScriptOffset)}}).then(b=>{if(b)for(let A of b.locations){let{lineNumber:B,columnNumber:q=0}=A,L=this._sourceContainer.currentSiblingUiLocations({source:m,...Ra(YT({lineNumber:B,columnNumber:q}),m.runtimeScriptOffset)});l.push({breakLocation:A,uiLocations:L})}}))}return await Promise.all(c),l}setThread(e){var r;this._thread=e,this._thread.cdp().Debugger.on("breakpointResolved",i=>{let n=this._resolvedBreakpoints.get(i.breakpointId);n&&n.updateUiLocations(e,i.breakpointId,[i.location])}),this._thread.setSourceMapDisabler(i=>{let n=[];for(let s of i){let o=this._resolvedBreakpoints.get(s);if(o){let a=this._sourceContainer.source(o.source);Sr(a)&&n.push(a)}}return n});for(let i of this._byPath.values())i.forEach(n=>this._setBreakpoint(n,e)),this.ensureModuleEntryBreakpoint(e,(r=i[0])==null?void 0:r.source);for(let i of this._byRef.values())i.forEach(n=>this._setBreakpoint(n,e));"runtimeSourcemapPausePatterns"in this.launchConfig&&this.launchConfig.runtimeSourcemapPausePatterns.length&&this.setRuntimeSourcemapPausePatterns(e,this.launchConfig.runtimeSourcemapPausePatterns),this._byDapId.size>0&&this._installSourceMapHandler(this._thread)}async launchBlocker(){Jm(this.logger,"BreakpointManager.launchBlocker",async()=>{this._predictorDisabledForTest||await Promise.all([...this._launchBlocker])})}setRuntimeSourcemapPausePatterns(e,r){return Promise.all(r.map(i=>this._setBreakpoint(new Bc(this,i),e)))}addLaunchBlocker(...e){for(let r of e)this._launchBlocker.add(r),r.finally(()=>this._launchBlocker.delete(r))}setPredictorDisabledForTest(e){this._predictorDisabledForTest=e}_installSourceMapHandler(e){return this.launchConfig.perScriptSourcemaps==="yes"?Promise.all([this.updateEntryBreakpointMode(e,1),e.setScriptSourceMapHandler(!1,this._scriptSourceMapHandler)]).then(()=>!0):this._breakpointsPredictor&&!this.launchConfig.pauseForSourceMap?e.setScriptSourceMapHandler(!1,this._scriptSourceMapHandler):e.setScriptSourceMapHandler(!0,this._scriptSourceMapHandler)}async _uninstallSourceMapHandler(e){e.setScriptSourceMapHandler(!1),this._sourceMapHandlerInstalled=void 0}_setBreakpoint(e,r){this._enabledFilter(e)&&this.addLaunchBlocker(Promise.race([Me(v1),e.enable(r)]))}async setBreakpoints(e,r){var l,p;!this._sourceMapHandlerInstalled&&this._thread&&((l=e.breakpoints)!=null&&l.length)&&(this._sourceMapHandlerInstalled={entryBpSet:this._installSourceMapHandler(this._thread)});let i=await((p=this._sourceMapHandlerInstalled)==null?void 0:p.entryBpSet);e.source.path=Gi(e.source.path);let n=this._sourceContainer.source(e.source);if(e.source.sourceReference&&e.source.path&&!n&&(e.source.sourceReference=void 0),!i&&this._breakpointsPredictor&&!n){let f=this._breakpointsPredictor.predictBreakpoints(e);this.addLaunchBlocker(f),await f}let s=this._thread;if((s==null?void 0:s.debuggerReady.hasSettled())===!1){let f=s.debuggerReady.promise;this.addLaunchBlocker(f),await f}let o=f=>{var m;let H={unbound:f.slice(),new:[],list:[]};if(!e.breakpoints)return H;for(let y=0;y<e.breakpoints.length;y++){let b=e.breakpoints[y],A;try{A=new yi(this,r[y],e.source,b,this.conditionFactory.getConditionFor(b))}catch(L){if(!(L instanceof re))throw L;this._dap.output({category:"stderr",output:L.message}),A=new oH(this,r[y],e.source,b)}let B=H.unbound.findIndex(L=>L.equivalentTo(A)),q=H.unbound[B];(m=q==null?void 0:q.equivalentTo)!=null&&m.call(q,A)?(H.list.push(q),H.unbound.splice(B,1)):(H.new.push(A),H.list.push(A),this._byDapId.set(A.dapId,A))}return H},a=()=>e.source.path?this._byPath.get(e.source.path):e.source.sourceReference?this._byRef.get(e.source.sourceReference):void 0,u=o(a()??[]);if(e.source.path)this._byPath.set(e.source.path,u.list);else if(e.source.sourceReference)this._byRef.set(e.source.sourceReference,u.list);else return{breakpoints:[]};if(this._totalBreakpointsCount-=u.unbound.length,await Promise.all(u.unbound.map(f=>(this._byDapId.delete(f.dapId),f.disable()))),this._totalBreakpointsCount+=u.new.length,this._thread&&this._totalBreakpointsCount===0&&this._sourceMapHandlerInstalled&&this._uninstallSourceMapHandler(this._thread),s&&u.new.length){this.ensureModuleEntryBreakpoint(s,e.source);let f=a(),H=Promise.all(u.new.filter(this._enabledFilter).filter(m=>f==null?void 0:f.includes(m)).map(m=>m.enable(s)));this.addLaunchBlocker(Promise.race([Me(v1),H])),await H}let c=await Promise.all(u.list.map(f=>f.toDap()));return this._breakpointsStatisticsCalculator.registerBreakpoints(c),Me(0).then(()=>u.new.forEach(f=>f.markSetCompleted())),{breakpoints:c}}async notifyBreakpointChange(e,r){if(!this._byDapId.has(e.dapId))return;let i=await e.toDap();i.verified&&(this._breakpointsStatisticsCalculator.registerResolvedBreakpoint(e.dapId),this.suggester.notifyVerifiedBreakpoint()),r&&this._dap.breakpoint({reason:"changed",breakpoint:i})}isEntrypointBreak(e,r){let i=[...this.moduleEntryBreakpoints.values()].filter(n=>n.enabled&&n.cdpScriptIds.has(r));if(i.length){for(let n of i)n instanceof Bc||n.disable();return!0}return e.some(n=>{let s=this._resolvedBreakpoints.get(n);return s&&(s instanceof zi||b1(s))})}async shouldPauseAt(e,r,i,n=!1){if(!r.length)return e.reason!=="instrumentation";let s=0,o=n?1:0;return await Promise.all(r.map(async a=>{if((i==null?void 0:i.cdpId)===a){s++;return}let u=this._resolvedBreakpoints.get(a);if(u instanceof zi){this.entryBreakpointMode===0&&!(u instanceof Bc)&&u.disable(),o++;return}u instanceof yi&&(await u.testHitCondition(e)?s++:o++)})),s>0||o===0}registerBreakpointsHit(e){for(let r of e){let i=this._resolvedBreakpoints.get(r);i instanceof yi&&this._breakpointsStatisticsCalculator.registerBreakpointHit(i.dapId)}}statisticsForTelemetry(){return this._breakpointsStatisticsCalculator.statistics()}ensureModuleEntryBreakpoint(e,r){if(!r.path||(this._byPath.get(r.path)??[]).some(b1))return;let n=zi.getModeKeyForSource(this.entryBreakpointMode,r.path);if(!r.path||this.moduleEntryBreakpoints.has(n))return;let s=new zi(this,r,this.entryBreakpointMode);this.moduleEntryBreakpoints.set(r.path,s),this._setBreakpoint(s,e)}executionContextWasCleared(){for(let e of this._byDapId.values())e.executionContextWasCleared()}async reapply(){let e=[...this._byDapId.values()];if(await Promise.all(e.map(r=>r.disable())),this._thread){let r=this._thread;await Promise.all(e.map(i=>i.enable(r)))}}};vi=X([(0,Fn.injectable)(),x(0,(0,Fn.inject)(di)),x(1,(0,Fn.inject)(zt)),x(2,(0,Fn.inject)(pe)),x(3,(0,Fn.inject)(Fe)),x(4,(0,Fn.inject)(rH)),x(5,(0,Fn.inject)(ht)),x(6,(0,Fn.inject)(Fa))],vi);var RM=w("crypto"),Xc=F(ue());var bf=class{constructor(e){this.element=e,this.next=bf.Undefined,this.prev=bf.Undefined}},rt=bf;rt.Undefined=new bf(void 0);var vf=class{constructor(){this._first=rt.Undefined;this._last=rt.Undefined;this._size=0}get size(){return this._size}isEmpty(){return this._first===rt.Undefined}clear(){let e=this._first;for(;e!==rt.Undefined;){let r=e.next;e.prev=rt.Undefined,e.next=rt.Undefined,e=r}this._first=rt.Undefined,this._last=rt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,r){let i=new rt(e);if(this._first===rt.Undefined)this._first=i,this._last=i;else if(r){let s=this._last;this._last=i,i.prev=s,s.next=i}else{let s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==rt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==rt.Undefined){let e=this._last.element;return this._remove(this._last),e}}applyFilter(e){let r=this._first;for(;r!==rt.Undefined;){let i=r.next;e(r.element)||this._remove(r),r=i}}_remove(e){if(e.prev!==rt.Undefined&&e.next!==rt.Undefined){let r=e.prev;r.next=e.next,e.next.prev=r}else e.prev===rt.Undefined&&e.next===rt.Undefined?(this._first=rt.Undefined,this._last=rt.Undefined):e.next===rt.Undefined?(this._last=this._last.prev,this._last.next=rt.Undefined):e.prev===rt.Undefined&&(this._first=this._first.next,this._first.prev=rt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==rt.Undefined;)yield e.element,e=e.next}};var wH=F(ue());var Un=class extends re{constructor(e){super({id:9243,format:e,showUser:!0}),this._cause={id:9243,format:e,showUser:!0}}};function jn(t,e,r){if(e.isCancellationRequested)return Promise.reject(new Un(r||"Task cancelled"));let i=Xe(),n=e.onCancellationRequested(i.resolve);return Promise.race([i.promise.then(()=>{throw new Un(r||"Task cancelled")}),t.then(s=>(n.dispose(),s)).catch(s=>{throw n.dispose(),s})])}function w1(t,e){let r=new Jt(e),i=t.map(async n=>{try{return await n(r.token)}finally{r.cancel()}});return Promise.race(i)}var A1=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),xr=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),tJ=Object.freeze({isCancellationRequested:!0,onCancellationRequested:A1}),Jt=class{constructor(e){this._token=void 0;this._parentListener=void 0;this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}static withTimeout(e,r){let i=new Jt(r),n=i._token=new Uc,s=setTimeout(()=>n.cancel(),e);return n.onCancellationRequested(()=>clearTimeout(s)),i}get token(){return this._token||(this._token=new Uc),this._token}cancel(){this._token?this._token instanceof Uc&&this._token.cancel():this._token=tJ}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Uc&&this._token.dispose():this._token=xr}},Uc=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?A1:(this._emitter||(this._emitter=new J),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var DM=F(w("net"));var aY=F(x1(),1),uY=F(_0(),1),cY=F(w0(),1),LM=F(P0(),1),$0=F(xM(),1);var CM=LM.default;var PM=(t,e)=>t+Math.floor(Math.random()*(e-t));async function _H({min:t=53e3,max:e=54e3,attempts:r=1e3,tester:i=pY}={},n=xr){let s=PM(t,e);for(let o=Math.min(r,e-t);;o--)try{return await i(s,n)}catch(a){if(o===0||a instanceof Un)throw a;s=s===e-1?t:s+1}}function pY(t,e=xr){let r;return new Promise((i,n)=>{let s=DM.createServer();s.listen(t,"127.0.0.1",()=>{let o=s.address();s.close(()=>i(o.port))}),s.on("error",n),r=e.onCancellationRequested(()=>{s.close(),n(new Un("Port open lookup cancelled"))})}).finally(()=>r==null?void 0:r.dispose())}var TM=t=>(e,r)=>$M(new $0.default({host:"127.0.0.1",...t,port:e}),r),$M=(t,e)=>{let r;return new Promise((i,n)=>{t.on("error",n),t.on("listening",()=>i(t)),r=e.onCancellationRequested(()=>{t.close(),n(new Un("Port open lookup cancelled"))})}).finally(()=>r==null?void 0:r.dispose())};var AH=async(t,e,r)=>{let i=await _H({tester:TM(e)},r),n=t.register(i.address().port);return i.on("close",()=>n.dispose()),i.on("error",()=>n.dispose()),i},wi=Symbol("IPortLeaseTracker"),Gc=class{constructor(e){this.usedPorts=new Set;this.onRegistered=new J;this.isMandated=e==="remote"}register(e){return this.usedPorts.add(e),this.onRegistered.fire(e),{dispose:()=>this.usedPorts.delete(e)}}isRegistered(e,r=2e3){return this.usedPorts.has(e)?Promise.resolve(!0):e<53e3||e>=54e3?Promise.resolve(!1):w1([()=>Me(r).then(()=>!1),i=>new Promise(n=>{let s=this.onRegistered.event(o=>{o===e&&n(!0)});i.onCancellationRequested(()=>s.dispose())})])}};Gc=X([(0,wH.injectable)(),x(0,(0,wH.inject)(Ma))],Gc);var MM="JsDebug",kM="*";var M0=class{constructor(){this.replays=new Map}addReplay(e,r,i){let n=this.replays.get(e);return n||(n=new vf,this.replays.set(e,n)),n.push({event:`${e}.${r}`,params:i})}capture(e,r,i,n){let s=e[r];if(n===0)s.on(i,o=>this.addReplay(r,i,o));else if(n===2){let o;s.on(i,a=>{o==null||o(),o=this.addReplay(r,i,a)})}else{let o=new vf;s.on(i,a=>{var u;o.size===n.cap&&((u=o.shift())==null||u()),o.push(this.addReplay(r,i,a))})}}filter(e,r){let i=this.replays.get(e);i&&i.applyFilter(r)}clearEvent(e,r){let i=`${e}.${r}`;this.filter(e,n=>n.event!==i)}clearDomain(e){this.replays.delete(e)}read(e){return this.replays.get(e)??[]}},IH=Symbol("ICdpProxyProvider"),Kc=class{constructor(e,r,i){this.cdp=e;this.portTracker=r;this.logger=i;this.disposables=new Je;this.replay=new M0;this.jsDebugApi={subscribe:(e,{events:r})=>{for(let i of r)i.endsWith(kM)?e.pushDisposable(this.cdp.session.onPrefix(i.slice(0,-kM.length),n=>e.send({method:n.method,params:n.params}))):e.pushDisposable(this.cdp.session.on(i,n=>e.send({method:i,params:n})));return{}}};this.replay.capture(e,"CSS","styleSheetAdded",0),this.replay.capture(e,"Debugger","paused",2),this.replay.capture(e,"Runtime","executionContextCreated",{cap:50,type:1}),this.replay.capture(e,"Runtime","consoleAPICalled",{cap:50,type:1}),e.Debugger.on("resumed",()=>{this.replay.clearEvent("Debugger","paused")}),e.CSS.on("fontsUpdated",n=>{n.font&&this.replay.addReplay("CSS","fontsUpdated",n)}),e.CSS.on("styleSheetRemoved",n=>this.replay.filter("CSS",s=>s.params.styleSheetId!==n.styleSheetId))}async proxy(){this.server||(this.server=this.createServer());let{server:e,path:r}=await this.server,i=e.address();return{host:i.address,port:i.port,path:r}}async createServer(){let e=`/${(0,RM.randomBytes)(20).toString("hex")}`,r=await AH(this.portTracker,{perMessageDeflate:!0,path:e});return this.logger.info("proxyActivity","activated cdp proxy"),r.on("connection",i=>{let n=new k0(i,this.logger);this.logger.info("proxyActivity","accepted proxy connection",{id:n.id}),i.on("close",()=>{this.logger.verbose("proxyActivity","closed proxy connection",{id:n.id}),this.disposables.disposeObject(n)}),i.on("message",async s=>{let o;try{o=JSON.parse(s.toString())}catch(f){return n.send({id:0,error:{code:-32700,message:f.message}})}this.logger.verbose("proxyActivity","received proxy message",o);let{method:a,params:u,id:c=0}=o,[l,p]=a.split(".");try{let f=l===MM?await this.invokeJsDebugDomainMethod(n,p,u):await this.invokeCdpMethod(n,l,p,u);n.send({id:c,result:f})}catch(f){let H=f instanceof Ua&&f.cause?f.cause:{code:0,message:f.message};n.send({id:c,error:H})}})}),{server:r,path:e}}dispose(){var e;this.disposables.dispose(),(e=this.server)==null||e.then(r=>r.server.close()),this.server=void 0}invokeCdpMethod(e,r,i,n){let s=this.cdp.session.sendOrDie(`${r}.${i}`,n);switch(i){case"enable":for(let o of this.replay.read(r))e.send({method:o.event,params:o.params});break;case"disable":this.replay.clearDomain(r);break;default:}return s}invokeJsDebugDomainMethod(e,r,i){if(!this.jsDebugApi.hasOwnProperty(r))throw new Ua(r).setCause(-32601,`${MM}.${r} not found`);return this.jsDebugApi[r](e,i)}};Kc=X([(0,Xc.injectable)(),x(0,(0,Xc.inject)(gt)),x(1,(0,Xc.inject)(wi)),x(2,(0,Xc.inject)(pe))],Kc);var fY=0,k0=class{constructor(e,r){this.webSocket=e;this.logger=r;this.disposables=new Je;this.id=fY++}pushDisposable(e){this.disposables.push(e)}dispose(){this.disposables.dispose(),this.webSocket.close()}send(e){this.logger.verbose("proxyActivity","send proxy message",e),this.webSocket.send(JSON.stringify(e))}};var Jc=F(Dm()),Pf=F(ue());var R0=pr(function(t,e,r){let i=r?"variable":"property",n=(l,p,f)=>{if(p!=="function")return i;if(l==="constructor")return"class";let H=String(f);return H.startsWith("class ")||H.includes("[native code]")&&/^[A-Z]/.test(l)?"class":r?"function":"method"},s=l=>{switch(typeof l){case"number":case"boolean":return`${l}`;case"object":return l===null?"null":l.constructor.name||"object";case"function":return`fn(${new Array(l.length).fill("?").join(", ")})`;default:return typeof l}},o=[],a=new Set,u="~",c=t===void 0?this:t;for(;c!=null;c=c.__proto__){u+="~";let l=Object.getOwnPropertyNames(c).filter(p=>p.startsWith(e)&&!p.match(/^\d+$/));for(let p of l){if(a.has(p))continue;a.add(p);let f=Object.getOwnPropertyDescriptor(c,p),H=i,m;try{let y=c[p];H=n(p,typeof(f==null?void 0:f.value),y),m=s(y)}catch{}o.push({label:p,sortText:u+p.replace(/^_+/,y=>"{".repeat(y.length)),type:H,detail:m})}r=!1}return{result:o,isArray:this instanceof Array}}),OM=Ta(R0.source);var dY=t=>{var e,r,i;switch(t.type){case"ClassDeclaration":case"ClassExpression":return{type:"class",id:t.id};case"MethodDefinition":return{type:((e=t.key)==null?void 0:e.type)==="Identifier"&&t.key.name==="constructor"?"constructor":"method",id:t.key};case"VariableDeclarator":return{type:((r=t.init)==null?void 0:r.type)==="FunctionExpression"||((i=t.init)==null?void 0:i.type)==="ArrowFunctionExpression"?"function":"variable",id:t.id}}};function hY(t){let e=!1;return(0,Jc.traverse)(t,{enter(r){if(r.type==="CallExpression"||r.type==="NewExpression"||r.type==="UnaryExpression"&&r.operator==="delete"||r.type==="ClassBody")return e=!0,Jc.VisitorOption.Break}}),e}var SH=Symbol("ICompletions"),zc=class{constructor(e,r){this.evaluator=e;this.cdp=r}async completions(e){let r=oo(e.expression),i=new co(e.expression).convert(e.position),n=()=>Promise.resolve([]);return(0,Jc.traverse)(r,{enter:s=>{let o=s;o.start<i&&i<=o.end&&(s.type==="Identifier"?n=()=>this.identifierCompleter(e,r,s,i):s.type==="MemberExpression"&&(n=s.computed?()=>this.elementAccessCompleter(e,s,i):()=>this.propertyAccessCompleter(e,s,i)))}}),n().then(s=>s.sort((o,a)=>o.sortText>a.sortText?1:-1))}async elementAccessCompleter(e,r,i){if(r.property.type!=="Literal"||typeof r.property.value!="string")return[];let n=e.expression.slice(so(r.property)+1,i);return(await this.defaultCompletions(e,n)).filter(o=>o.sortText!=="~~[").map(o=>({...o,text:JSON.stringify(o.text??o.label)+"]",start:so(r.property),length:P_(r.property)-so(r.property)}))}async identifierCompleter(e,r,i,n){let s=[];(0,Jc.traverse)(r,{enter(u){var l;let c=dY(u);((l=c==null?void 0:c.id)==null?void 0:l.type)==="Identifier"&&s.push({label:c.id.name,type:c.type,sortText:c.id.name})}});let o=e.expression.slice(so(i),n),a=[...s,...await this.defaultCompletions(e,o)];return this.evaluator.hasReturnValue&&e.executionContextId!==void 0&&gs.startsWith(o)&&a.push({sortText:`~${gs}`,label:gs,type:"variable"}),a}async propertyAccessCompleter(e,r,i){let{result:n,isArray:s}=await this.completePropertyAccess({executionContextId:e.executionContextId,stackFrame:e.stackFrame,expression:pT(e.expression,r.object),prefix:zr(r.property)?"":e.expression.slice(so(r.property),i),throwOnSideEffect:hY(r)}),o=so(r.property)-1,a=/^[$a-z_][0-9a-z_$]*$/i;for(let u of n)a.test(u.label)||(u.text=`[${JSON.stringify(u.label)}]`,u.start=o,u.length=1);if(s){let u="index";n.unshift({label:`[${u}]`,text:`[${u}]`,type:"property",sortText:"~~[",start:o,selectionStart:1,selectionLength:u.length,length:1})}return n}async completePropertyAccess({executionContextId:e,stackFrame:r,expression:i,prefix:n,isInGlobalScope:s=!1,throwOnSideEffect:o=!1}){let a={expression:`(${i})`,objectGroup:"console",silent:!0,throwOnSideEffect:o},u=r&&r.callFrameId(),c=await this.evaluator.evaluate(u?{...a,callFrameId:u}:{...a,contextId:e},{stackFrame:r});if(!c||c.exceptionDetails)return{result:[],isArray:!1};if(!c.result.objectId){let l={...a,returnByValue:!0,throwOnSideEffect:!1,expression:OM.expr(`(${i})`,JSON.stringify(n),JSON.stringify(s))},p=await this.evaluator.evaluate(u?{...l,callFrameId:u}:{...l,contextId:e});return!p||p.exceptionDetails?{result:[],isArray:!1}:p.result.value}try{return(await R0({cdp:this.cdp,args:[void 0,n,s],objectId:c.result.objectId,returnByValue:!0})).value}catch{return{result:[],isArray:!1}}finally{this.cdp.Runtime.releaseObject({objectId:c.result.objectId})}}async defaultCompletions(e,r=""){for(let i of["self","global","this"]){let{result:n}=await this.completePropertyAccess({executionContextId:e.executionContextId,stackFrame:e.stackFrame,expression:i,prefix:r,isInGlobalScope:!0});if(e.stackFrame){let s=r.toLowerCase(),o=new Set(n.map(a=>a.label));for(let a of await e.stackFrame.completions())o.has(a.label)||!a.label.toLowerCase().includes(s)||(o.add(a.label),n.push(a))}return n.push(...this.syntheticCompletions(e,r)),n}return this.syntheticCompletions(e,r)}syntheticCompletions(e,r){return this.evaluator.hasReturnValue&&gs.startsWith(r)?[{sortText:`~${gs}`,label:gs,type:"variable"}]:[]}};zc=X([(0,Pf.injectable)(),x(0,(0,Pf.inject)(gi)),x(1,(0,Pf.inject)(gt))],zc);var $H=F(Ct());var Vn=class{constructor(e,r){this._tokens=[];this._separator=r||"",this._budget=e-1-this._separator.length}append(e){if(e.length>this.budget()){this.appendEllipsis();return}this._append(e)}_append(e){this._tokens.length&&(this._budget-=this._separator.length),this._tokens.push(e),this._budget-=e.length}appendEllipsis(){this._tokens[this._tokens.length-1]!=="\u2026"&&this._append("\u2026")}checkBudget(){return this._budget<=0&&this.appendEllipsis(),this._budget>0}budget(){return this._budget-(this._tokens.length?this._separator.length:0)}build(){return this._tokens.join(this._separator)}isEmpty(){return!this._tokens.length}};var ak=F(sk());var PY=1e4;function DY(t,e){if(!t.includes("%"))return[{type:"string",value:t}];let r=[];function i(u){if(!u)return;let c=r[r.length-1];(c==null?void 0:c.type)==="string"?c.value+=u:r.push({type:"string",value:u})}function n(u,c,l){r.push({type:"specifier",specifier:u,precision:c,substitutionIndex:l})}let s=0,o=0,a=new RegExp(`%%|%(?:(\\d+)\\$)?(?:\\.(\\d*))?([${e.join("")}])`,"g");for(let u=a.exec(t);u;u=a.exec(t)){let c=u.index;if(c>s&&i(t.substring(s,c)),u[0]==="%%")i("%");else{let[,l,p,f]=u;l&&Number(l)>0&&(o=Number(l)-1);let H=p?Number(p):void 0;n(f,H,o),++o}s=c+u[0].length}return i(t.substring(s)),r}function j0(t,e,r){let i=DY(t,Array.from(r.keys())),n=new Set,s=r.get("");if(!s)throw new Error("Expected to hav a default formatter");let o=new Vn(PY),a=!1;for(let u=0;o.checkBudget()&&u<i.length;++u){let c=i[u];if(c.type==="string"){o.append(c.value);continue}let l=c.substitutionIndex;if(l>=e.length){o.append("%"+(c.precision||"")+c.specifier);continue}n.add(l),c.specifier==="c"&&(a=!0);let p=r.get(c.specifier)||s;o.append(p(e[l],{budget:o.budget(),quoted:!1}))}a&&o.append("\x1B[0m");for(let u=0;o.checkBudget()&&u<e.length;++u)n.has(u)||(n.add(u),(t||u)&&o.append(" "),o.append(s(e[u],{budget:o.budget(),quoted:!1})));return{result:o.build(),usedAllSubs:n.size===e.length}}function ok(t){try{return new ak.default(t).ansi256().object().ansi256}catch{}}function uk(t){let e=/\s*(.*?)\s*:\s*(.*?)\s*(?:;|$)/g,r="\x1B[0m",i=e.exec(t);for(;i!==null;){if(i.length===3)switch(i[1]){case"color":let n=ok(i[2]);n&&(r+=`\x1B[38;5;${n}m`);break;case"background":case"background-color":let s=ok(i[2]);s&&(r+=`\x1B[48;5;${s}m`);break;case"font-weight":i[2]==="bold"&&(r+="\x1B[1m");break;case"font-style":i[2]==="italic"&&(r+="\x1B[3m");break;case"text-decoration":i[2]==="underline"&&(r+="\x1B[4m");break;default:}i=e.exec(t)}return r}var lk=t=>t.replace(/\\/gm,"\\\\").replace(/\n/gm,"\\n").replace(/\r/gm,"\\r").replace(/\t/gm,"\\t"),$Y={budget:1e5,quoted:!0},ck={budget:1e3,quoted:!0,postProcess:lk},MY={budget:1/0,quoted:!1},kY={budget:1e3,quoted:!0,postProcess:lk},RY={budget:1e5,quoted:!0},PH=t=>{switch(t){case"repl":return $Y;case"hover":return ck;case"propertyValue":return ck;case"watch":return kY;case"copy":case"clipboard":return MY;default:return RY}};var OY=30,NY=100,q0=20,BY=1e4,FY=3,pk=120,W0=new Set(["null","regexp","date"]);function Ga(t){return t.type==="function"||t.type==="object"&&!W0.has(t.subtype)}function V0(t){return t.subtype==="array"||t.subtype==="typedarray"}function Ka(t,e,r){var s;let i=PH(e),n=DH(t,i,r);return((s=i.postProcess)==null?void 0:s.call(i,n))??n}function DH(t,e,r){return t.type==="function"?t.description?mk(t.description,e.budget):"<function>":t.type==="object"&&t.subtype==="node"?t.description:"preview"in t&&t.preview?TH(t.preview,e.budget,r):hk(t,e.budget,e.quoted,r)}function TH(t,e,r){return V0(t)?UY(t,e):t.subtype==="internal#entry"?$n(t.description||"",e):t.type==="function"?mk(t.description,e):Ga(t)?jY(t,e,r):WY(t,e,r)}function UY(t,e){let r=new Vn(e),i=t.description,n=i.match(/[^(]*\(([\d]+)\)/);if(!n)return i;let s=parseInt(n[1],10);i.startsWith("Array(")&&(i=i.substring(5)),r.append($n(i,r.budget())),r.append(" ");let o=new Vn(r.budget()-2,", "),a=-1;for(let u of t.properties){if(!o.checkBudget())break;if(isNaN(u.name))continue;let c=parseInt(u.name,10);c>a+1&&o.appendEllipsis(),a=c,o.append(Mf(u,o.budget()))}s>a+1&&o.appendEllipsis();for(let u of t.properties){if(!o.checkBudget())break;isNaN(u.name)&&o.append(Mf(u,o.budget(),u.name))}return t.overflow&&o.appendEllipsis(),r.append("["+o.build()+"]"),r.build()}function jY(t,e,r){let i=new Vn(e," ");t.description!=="Object"&&i.append($n(t.description,i.budget()));let n=new Map,s=t.properties||[];for(let f of s)n.set(f.name,f);let o=n.get("[[PrimitiveValue]]");if(o)return i.append(`(${Mf(o,i.budget()-2)})`),i.build();let a=n.get("[[PromiseStatus]]"),u=n.get("[[PromiseValue]]");if(a&&u)return a.value==="pending"?i.append(`{<${a.value}>}`):i.append(`{${Mf(u,i.budget()-2,`<${a.value}>`)}}`),i.build();let c=n.get("[[GeneratorStatus]]");if(c)return i.append(`{<${c.value}>}`),i.build();let l=new Vn(i.budget()-2,", ");for(let f of s){if(!l.checkBudget())break;l.append(Mf(f,l.budget(),f.name))}for(let f of t.entries||[]){if(!l.checkBudget())break;if(f.key){let H=TH(f.key,Math.min(q0,l.budget()),r),m=TH(f.value,Math.min(q0,l.budget()-H.length-4),r);l.append(Zc(H," => ",m,l.budget()))}else l.append(TH(f.value,Math.min(q0,l.budget()),r))}t.overflow&&l.appendEllipsis();let p=l.build();return p?i.append("{"+p+"}"):i.isEmpty()&&i.append("{}"),i.build()}function fk(t,e){return t.length<=e?t:"\u2026"}function qY(t,e){return t.length>=e?t.slice(0,e-1)+"\u2026":t}function WY(t,e,r){if(t.type==="object"&&t.subtype==="null")return fk("null",e);if(t.type==="undefined")return fk("undefined",e);if(t.type==="string"){let i=t.description??t.value;return r!=null&&r.hex&&(i=Buffer.from(i,"utf8").toString("hex")),yc(i,e)}return t.type==="number"||t.type==="bigint"?kf(t,!1,e,r):qY(t.description||"",e)}function Zc(t,e,r,i){return t===void 0?yc(r,i):t.length+e.length>i?$n(t,i):`${t}${e}${yc(r,i-t.length-e.length)}`}function Mf(t,e,r){return e=Math.min(e,NY),t.type==="function"?Zc(r,": ","\u0192",e):t.type==="object"&&t.value==="Object"?Zc(r,": ","{\u2026}",e):typeof t.value>"u"?Zc(r,": ",`<${t.type}>`,e):t.type==="string"?Zc(r,": ",`'${t.value}'`,e):Zc(r,": ",t.value??"unknown",e)}function hk(t,e,r,i){if(t.type==="string"){let n=t.value||(t.description?t.description:"");i!=null&&i.hex&&(n=Buffer.from(n,"utf8").toString("hex"),r=!1);let s=yc(n,r?e-2:e);return r?`'${s}'`:s}return t.type==="undefined"?"undefined":t.subtype==="null"?"null":t.type==="bigint"||t.type==="number"?kf(t,!1,e,i):t.description?$n(t.description,Math.max(e,1e5)):$n(String("value"in t?t.value:t.description),e)}function mk(t,e){let r=new Vn(e),i=t.replace(/^function [gs]et /,"function ").replace(/^function [gs]et\(/,"function(").replace(/^[gs]et /,""),n=i.match(/^(async\s+function)/),s=i.startsWith("function*"),o=i.startsWith("*"),a=!s&&i.startsWith("function"),u=i.startsWith("class ")||i.startsWith("class{"),c=i.indexOf("=>"),l=!n&&!s&&!a&&!u&&c>0,p;if(u){p=i.substring(5);let m=/^[^{\s]+/.exec(p.trim()),y="";m&&(y=m[0].trim()||""),H("class",p,y)}else if(n)p=i.substring(n[1].length),H("async \u0192",p,f(p));else if(s)p=i.substring(9),H("\u0192*",p,f(p));else if(o)p=i.substring(1),H("\u0192*",p,f(p));else if(a)p=i.substring(8),H("\u0192",p,f(p));else if(l){let m=i;i.length>OY&&(m=i.substring(0,c+2)+" {\u2026}"),H("",i,m)}else H("\u0192",i,f(i));return r.build();function f(m){let y=m.indexOf("("),b=m.match(/\)\s*{/),A=b&&b.index||0;if(y!==-1&&b&&A>y){let B=m.substring(0,y).trim()||"",q=m.substring(y,A+1);return B+q}return"()"}function H(m,y,b){r.checkBudget()&&(m.length&&r.append(m+" "),y=y.trim(),y.endsWith(" { [native code] }")&&(y=y.substring(0,y.length-18)),r.budget()>=y.length?r.append(y):r.append(b.replace(/\n/g," ")))}}function Xa(t){let e=t;if(e.type!=="object"||e.subtype==="null")return{title:hk(e,BY,!1,void 0)};let r=e.description??e.className??"Error",i=/^\s+at\s/m.exec(r);if(!i){let n=r.lastIndexOf(`
`);return n===-1?{title:r}:{title:r.substring(0,n)}}return{title:r.substring(0,i.index-1),stackTrace:r.substring(i.index+2)}}function kf(t,e,r,i){if(t.type==="number"){if("unserializableValue"in t)return t.unserializableValue;let o=t.value||+t.description;return i!=null&&i.hex?o.toString(16):String(o)}if(t.type==="bigint"){let o=t.unserializableValue||t.description;return i!=null&&i.hex?BigInt(o.slice(0,-1)).toString(16):o}let n=t,s=typeof n.value=="number"?n.value:+String(n.description);return $n(String(e?Math.floor(s):s),r)}function VY(t,e){return yc(String(typeof t.value<"u"?t.value:t.description),e)}function Hk(t){var l;let e=[],r=new Set([void 0]),i=new Map;for(let p of t.properties.filter(f=>f.valuePreview)){let f=new Map;f.set(void 0,p.name),i.set(void 0,Math.max(i.get(void 0)||0,p.name.length)),e.push(f),(l=p.valuePreview)==null||l.properties.map(H=>{H.value&&(r.add(H.name),f.set(H.name,H.value),i.set(H.name,Math.max(i.get(H.name)||0,H.value.length)))})}for(let p of r.values())p&&i.set(p,Math.max(i.get(p)||0,p.length));let n=Array.from(i.values()).reduce((p,f)=>p+f,0),s=pk-4-(r.size-1)*3;if(n>s){let p=s/n;for(let f of i.keys()){let H=Math.max(FY,i.get(f)*p|0);i.set(f,H)}}let o=[];for(let p of r.values())o.push("-".repeat(i.get(p)));let a="[-"+o.join("-|-")+"-]",u=[];u.push(a.replace("[","\u256D").replace(/\|/g,"\u252C").replace("]","\u256E").replace(/-/g,"\u2504"));let c=[];for(let p of r.values())c.push(dk(p||"",i.get(p)));u.push("\u250A "+c.join(" \u250A ")+" \u250A"),u.push(a.replace("[","\u251C").replace(/\|/g,"\u253C").replace("]","\u2524").replace(/-/g,"\u2504"));for(let p of e){let f=[];for(let H of r.values())f.push(dk(p.get(H)||"",i.get(H)));u.push("\u250A "+f.join(" \u250A ")+" \u250A")}return u.push(a.replace("[","\u2570").replace(/\|/g,"\u2534").replace("]","\u256F").replace(/-/g,"\u2504")),u.map(p=>$n(p,pk)).join(`
`)}var G0=new Map([["",(t,e)=>DH(t,e)],["s",(t,e)=>VY(t,e.budget)],["i",(t,e)=>kf(t,!0,e.budget,void 0)],["d",(t,e)=>kf(t,!0,e.budget,void 0)],["f",(t,e)=>kf(t,!1,e.budget,void 0)],["c",t=>uk(t.value)],["o",(t,e)=>DH(t,e)],["O",(t,e)=>DH(t,e)]]);function dk(t,e){return t.length===e?t:t.length<e?t+" ".repeat(e-t.length):$n(t,e)}var yk=pr(function(){return this});var MH=class{constructor(e,r){this.protoObj=e;this.cdp=r}async toDap(e){if(!this.protoObj.objectId)return{category:"stderr",output:$H.t("Only objects can be queried")};let r=await this.cdp.Runtime.queryObjects({prototypeObjectId:this.protoObj.objectId,objectGroup:"console"});if(await this.cdp.Runtime.releaseObject({objectId:this.protoObj.objectId}),!r)return{category:"stderr",output:$H.t("Could not query the provided object")};let i;try{i=await yk({cdp:this.cdp,args:[],objectId:r.objects.objectId,objectGroup:"console",generatePreview:!0})}catch(o){return{category:"stderr",output:$H.t(o.message)}}let n="\x1B[32mobjects: "+Ka(i,"repl")+"\x1B[0m";return{category:"stdout",output:"",variablesReference:e.replVariables.createVariableForOutput(n,[i]).id}}};var bk=/^(\W*at .*\()(.*):(\d+):(\d+)(\))$/,vk=/^(\W*at )(.*):(\d+):(\d+)$/,xo=class{constructor(e){this.stack=e}static isStackLike(e){return bk.test(e)||vk.test(e)}*[Symbol.iterator](){for(let e of this.stack.split(`
`)){let r=bk.exec(e)||vk.exec(e);if(!r){yield e+`
`;continue}let[,i,n,s,o,a]=r;i&&(yield i),yield new K0(n,new Kr(Number(s),Number(o))),a&&(yield a),yield`
`}}},K0=class{constructor(e,r){this.path=e;this.position=r}toString(){return`${this.path}:${this.position.lineNumber}:${this.position.columnNumber}`}};var jr=F(Ct());var Nf=F(ue());var Re=F(Ct()),kk=w("crypto");var Lr=class{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 Lr().subtract(this)}subtract(e){let r=this.value[1]-e.value[1],i=this.value[0]-e.value[0];return r<0&&(r+=1e9,i--),new Lr([i,r])}};var el=class{constructor(e,r,i,n,s,o){this.launchConfig=e;this.targetInfo=r;this.parentTarget=i;this.targetOriginValue=n;this.cdp=s;this.logger=o;this.onNameChanged=new J().event;this.attached=!1;this.isWaitingForDebugger=!0;s.pause()}id(){return this.targetInfo.targetId}name(){return this.targetInfo.title}fileName(){return this.targetInfo.url}type(){return"node"}parent(){return this.parentTarget}children(){return[]}canStop(){return!1}stop(){}canRestart(){return!1}restart(){}canAttach(){return!this.attached}async attach(){return await this.cdp.Runtime.enable({}),await this.cdp.Debugger.enable({}),this.attached=!0,this.cdp}canDetach(){return this.attached}async detach(){await this.cdp.Debugger.resume({}),await this.cdp.NodeWorker.detach({sessionId:this.targetInfo.targetId}),this.attached=!1}targetOrigin(){return this.targetOriginValue}afterBind(){return this.cdp.resume(),Promise.resolve()}async runIfWaitingForDebugger(){this.isWaitingForDebugger=!1,await this.cdp.Runtime.runIfWaitingForDebugger({})}initialize(){return Promise.resolve()}waitingForDebugger(){return this.isWaitingForDebugger}supportsCustomBreakpoints(){return!1}scriptUrlToUrl(e){return e[0]==="/"||process.platform==="win32"&&e[1]===":"&&e[2]==="\\"?We(e):e}executionContextName(){return this.targetInfo.title}};var It=F(Ct()),kH=new Map;function X0(){if(kH.size)return kH;function t(s,o){for(let a of o)a.group=s,kH.set(a.id,a)}function e(s,o){let a=o||s;return{id:"instrumentation:"+s,title:a,group:"",details:u=>{if(s==="webglErrorFired"){let c=u.webglErrorName;return c=c.replace(/^.*(0x[0-9a-f]+).*$/i,"$1"),{short:c,long:It.t('Paused on WebGL Error instrumentation breakpoint, error "{0}"',c)}}return s==="scriptBlockedByCSP"&&u.directiveText?{short:It.t('CSP violation "{0}"',u.directiveText),long:It.t('Paused on Content Security Policy violation instrumentation breakpoint, directive "{0}"',u.directiveText)}:{short:a,long:It.t('Paused on instrumentation breakpoint "{0}"',a)}},apply:async(u,c)=>c?!!await u.DOMDebugger.setInstrumentationBreakpoint({eventName:s}):!!await u.DOMDebugger.removeInstrumentationBreakpoint({eventName:s})}}function r(s,o,a){let u=o===void 0?"*":typeof o=="string"?[o]:o;return{id:"listener:"+s,title:a||s,group:"",details:c=>{let l=(c.targetName||"*").toLowerCase();return{short:l+"."+s,long:It.t('Paused on event listener breakpoint "{0}", triggered on "{1}"',s,l)}},apply:async(c,l)=>{let p=!0;for(let f of u)l?p=p&&!!await c.DOMDebugger.setEventListenerBreakpoint({eventName:s,targetName:f}):p=p&&!!await c.DOMDebugger.removeEventListenerBreakpoint({eventName:s,targetName:f});return p}}}t("Animation",[e("requestAnimationFrame",It.t("Request Animation Frame")),e("cancelAnimationFrame",It.t("Cancel Animation Frame")),e("requestAnimationFrame.callback",It.t("Animation Frame Fired"))]),t("Canvas",[e("canvasContextCreated",It.t("Create canvas context")),e("webglErrorFired",It.t("WebGL Error Fired")),e("webglWarningFired",It.t("WebGL Warning Fired"))]),t("Script",[e("scriptFirstStatement",It.t("Script First Statement")),e("scriptBlockedByCSP",It.t("Script Blocked by Content Security Policy"))]),t("Geolocation",[e("Geolocation.getCurrentPosition","getCurrentPosition"),e("Geolocation.watchPosition","watchPosition")]),t("Notification",[e("Notification.requestPermission","requestPermission")]),t("Parse",[e("Element.setInnerHTML",It.t("Set innerHTML")),e("Document.write","document.write")]),t("Timer",[e("setTimeout"),e("clearTimeout"),e("setInterval"),e("clearInterval"),e("setTimeout.callback",It.t("setTimeout fired")),e("setInterval.callback",It.t("setInterval fired"))]),t("Window",[e("DOMWindow.close","window.close")]),t("WebAudio",[e("audioContextCreated",It.t("Create AudioContext")),e("audioContextClosed",It.t("Close AudioContext")),e("audioContextResumed",It.t("Resume AudioContext")),e("audioContextSuspended",It.t("Suspend AudioContext"))]);let i=["audio","video"];t("Media",[r("play",i),r("pause",i),r("playing",i),r("canplay",i),r("canplaythrough",i),r("seeking",i),r("seeked",i),r("timeupdate",i),r("ended",i),r("ratechange",i),r("durationchange",i),r("volumechange",i),r("loadstart",i),r("progress",i),r("suspend",i),r("abort",i),r("error",i),r("emptied",i),r("stalled",i),r("loadedmetadata",i),r("loadeddata",i),r("waiting",i)]),t("Picture-in-Picture",[r("enterpictureinpicture","video"),r("leavepictureinpicture","video"),r("resize","PictureInPictureWindow")]),t("Clipboard",[r("copy"),r("cut"),r("paste"),r("beforecopy"),r("beforecut"),r("beforepaste")]),t("Control",[r("resize"),r("scroll"),r("zoom"),r("focus"),r("blur"),r("select"),r("change"),r("submit"),r("reset")]),t("Device",[r("deviceorientation"),r("devicemotion")]),t("DOM Mutation",[r("DOMActivate"),r("DOMFocusIn"),r("DOMFocusOut"),r("DOMAttrModified"),r("DOMCharacterDataModified"),r("DOMNodeInserted"),r("DOMNodeInsertedIntoDocument"),r("DOMNodeRemoved"),r("DOMNodeRemovedFromDocument"),r("DOMSubtreeModified"),r("DOMContentLoaded")]),t("Drag / drop",[r("drag"),r("dragstart"),r("dragend"),r("dragenter"),r("dragover"),r("dragleave"),r("drop")]),t("Keyboard",[r("keydown"),r("keyup"),r("keypress"),r("input")]),t("Load",[r("load"),r("beforeunload"),r("unload"),r("abort"),r("error"),r("hashchange"),r("popstate")]),t("Mouse",[r("auxclick"),r("click"),r("dblclick"),r("mousedown"),r("mouseup"),r("mouseover"),r("mousemove"),r("mouseout"),r("mouseenter"),r("mouseleave"),r("mousewheel"),r("wheel"),r("contextmenu")]),t("Pointer",[r("pointerover"),r("pointerout"),r("pointerenter"),r("pointerleave"),r("pointerdown"),r("pointerup"),r("pointermove"),r("pointercancel"),r("gotpointercapture"),r("lostpointercapture")]),t("Touch",[r("touchstart"),r("touchmove"),r("touchend"),r("touchcancel")]),t("Worker",[r("message"),r("messageerror")]);let n=["xmlhttprequest","xmlhttprequestupload"];return t("XHR",[r("readystatechange",n),r("load",n),r("loadstart",n),r("loadend",n),r("abort",n),r("error",n),r("progress",n),r("timeout",n)]),kH}var z0=Ta(function(t,e){let r=" ".repeat(e),i=`
`;function n(o){if(o instanceof Uint8Array)return Uint8Array;if(o instanceof Uint8ClampedArray)return Uint8ClampedArray;if(o instanceof Uint16Array)return Uint16Array;if(o instanceof Uint32Array)return Uint32Array;if(o instanceof BigUint64Array)return BigUint64Array;if(o instanceof Int8Array)return Int8Array;if(o instanceof Int32Array)return Int32Array;if(o instanceof BigInt64Array)return BigInt64Array;if(o instanceof Float32Array)return Float32Array;if(o instanceof Float64Array)return Float64Array}function s(o,a=0,u=[]){switch(typeof o){case"bigint":return`${o}n`;case"boolean":return o.toString();case"function":{let p=o.toString().replace(/^[^\s]+\(/,"function(").split(/\r?\n/g),f=/^$/;for(let H of p){let m=/^[ \t]+/.exec(H);if(m){f=new RegExp(`^[ \\t]{0,${m[0].length}}`);break}}return p.map((H,m)=>m===0?H:(H=H.replace(f,""),m===p.length-1?r.repeat(a)+H:r.repeat(a+1)+H)).join(i)}case"number":return`${o}`;case"object":if(o===null)return"null";if(u.includes(o))return"[Circular]";if(o instanceof Date)return`"${o.toISOString()}"`;if(typeof Node<"u"&&t instanceof Node)return t.outerHTML;let c=n(o);if(c)return`new ${c.name}([${o.join(", ")}])`;if(o instanceof ArrayBuffer)return`new Uint8Array([${new Uint8Array(o).join(", ")}]).buffer`;if(o instanceof Array)return["[",...o.map(p=>r.repeat(a+1)+s(p,a+1,[...u,o])+","),r.repeat(a)+"]"].join(i);let l=o;return["{",...Object.keys(l).map(p=>r.repeat(a+1)+(/^[$a-z_][0-9a-z_$]*$/i.test(p)?p:JSON.stringify(p))+": "+s(l[p],a+1,[...u,o])+","),r.repeat(a)+"}"].join(i);case"string":return JSON.stringify(o);case"symbol":return o.toString();case"undefined":return"undefined";default:return String(o)}}try{return s(t)}catch{return""+t}}),_k=pr(`
  function(spaces2) {
    const result = ${z0.expr("this","spaces2")};
    return result;
  }
`);var Co=F(Ct());var za=F(ue());var wk=pr(function(){let t={__proto__:this.__proto__},e=Object.getOwnPropertyNames(this);for(let r=0;r<e.length;++r){let i=e[r],n=i>>>0;if(String(n>>>0)===i&&n>>>0!==4294967295)continue;let s=Object.getOwnPropertyDescriptor(this,i);s&&Object.defineProperty(t,i,s)}return t});var Ak=pr(function(t,e){let r={},i=t===-1?0:t,n=e===-1?this.length:t+e;for(let s=i;s<n&&s<this.length;++s){let o=Object.getOwnPropertyDescriptor(this,s);o&&Object.defineProperty(r,s,o)}return r});var Ik=Ta(function(t,e){let r={},i="<<default preview>>";if(typeof this!="object"||!this)return r;for(let[n,s]of Object.entries(this)){if(e)try{let o=e.call(s,i);if(o!==i){r[n]=String(o);continue}}catch(o){r[n]=`<<indescribable>>${JSON.stringify([String(o),n])}`;continue}if(typeof s=="object"&&s&&!String(s.toString).includes("[native code]")){let o=String(s);if(!o.startsWith("[object ")){r[n]=o.length>=t?o.slice(0,t)+"\u2026":o;continue}}}return r}),Sk=Ta(function(t,e){if(e)try{let r="<<default preview>>",i=e.call(this,r);if(i!==r)return String(i)}catch(r){return`<<indescribable>>${JSON.stringify([String(r),"object"])}`}if(typeof this=="object"&&this&&!String(this.toString).includes("[native code]")){let r=String(this);if(!r.startsWith("[object "))return r.length>=t?r.slice(0,t)+"\u2026":r}});var Ek=pr(function(t){return t.call(this)});var xk=pr(function(t,e){let{buffer:r,byteLength:i,byteOffset:n}=this instanceof ArrayBuffer?new DataView(this):this instanceof WebAssembly.Memory?new DataView(this.buffer):this,s=n+Math.min(t,i),o=Math.max(0,Math.min(e,i-t));return a(new Uint8Array(r,s,o));function a(u){let c="0123456789abcdef",l="";for(let p=0;p<u.length;p++){let f=u[p];l+=c[f>>>4]+c[f&15]}return l}});var Lk=pr(function(t,e){let r=u(e),{buffer:i,byteLength:n,byteOffset:s}=this instanceof ArrayBuffer?new DataView(this):this instanceof WebAssembly.Memory?new DataView(this.buffer):this,o=s+Math.min(t,n),a=Math.max(0,Math.min(r.length,n-t));return new Uint8Array(i,o,a).set(r.subarray(0,a)),a;function u(c){let l=new Uint8Array(c.length>>>1);for(let p=0;p<c.length;p+=2)l[p>>>1]=parseInt(c.slice(p,p+2),16);return l}});var ow=(()=>{let t=0,e=2147483647-1;return()=>t++%e+1})(),aw=t=>{if(typeof t=="string")return{value:t};let e=t;return e.objectId?{objectId:e.objectId}:e.unserializableValue?{unserializableValue:e.unserializableValue}:{value:e.value}},KY=new Set(["typedarray","dataview","arraybuffer","webassemblymemory"]);var Dk=1024,XY=/^[$a-z_][0-9a-z_$]*$/i,zY=/^#[0-9a-z_$]+$/i,JY=t=>t.hasOwnProperty("configurable"),Ck=(t,e,r)=>{let i=fT(t,Mm(e),r);return ds(i)},Pk="<<indescribable>>",Tk=t=>{if(!t.startsWith(Pk))return t;let e,r;try{[e,r]=JSON.parse(t.slice(Pk.length))}catch{return t}return Co.t("{0} (couldn't describe: {1})",e,r)},J0=t=>!!t&&typeof t=="object"&&"readMemory"in t&&"writeMemory"in t,tl=class{constructor(e,r,i,n,s,o,a){this.cdp=e;this.parent=r;this.vars=n;this.locationProvider=s;this.currentRef=o;this.settings=a;this.name=i.name,this.presentationHint=i.presentationHint,this.sortOrder=i.sortOrder||0}get customDescriptionGenerator(){return this.settings.customDescriptionGenerator}createVariable(e,r,...i){var s;let n=new e(new tl(this.cdp,(s=this.currentRef)==null?void 0:s.call(this),r,this.vars,this.locationProvider,()=>n,this.settings),...i);return n.id>0&&this.vars.add(n),n}createVariableByType(e,r,i){return V0(r)?this.createVariable(NH,e,r):r.objectId&&!W0.has(r.subtype)?this.createVariable(OH,e,r,i):this.createVariable(Ai,e,r)}async createObjectPropertyVars(e,r){var c;let i=[];if(this.settings.customPropertiesGenerator){let{result:l,errorDescription:p}=await this.evaluateCodeForObject(e,this.settings.customPropertiesGenerator,[]);l&&l.type!=="undefined"?e=l:i.push([this.createVariable(ew,{name:"",sortOrder:-1},l,(l==null?void 0:l.description)||p||Co.t("Unknown error"))])}if(!e.objectId)return[];r&&this.cdp.DotnetDebugger.setEvaluationOptions({options:r,type:"variable"});let[n,s,o]=await Promise.all([this.cdp.Runtime.getProperties({objectId:e.objectId,accessorPropertiesOnly:!0,ownProperties:!1,generatePreview:!0}),this.cdp.Runtime.getProperties({objectId:e.objectId,ownProperties:!0,generatePreview:!0}),this.cdp.Runtime.callFunctionOn({functionDeclaration:Ik.decl(`${Dk}`,this.settings.customDescriptionGenerator||"null"),objectId:e.objectId,throwOnSideEffect:!0,returnByValue:!0}).then(l=>(l==null?void 0:l.result.value)||{}).catch(()=>({}))]);if(!n||!s)return[];let a=new Map,u=[];for(let l of n.result){if(l.symbol){u.push(l);continue}l.name==="__proto__"&&((c=s.internalProperties)!=null&&c.some(p=>p.name==="[[Prototype]]"))||a.set(l.name,l)}for(let l of s.result)l.get||l.set||(l.symbol?u.push(l):a.set(l.name,l));for(let l of[a.values(),u.values()])for(let p of l)i.push(this.createPropertyVar(p,e,o!=null&&o.hasOwnProperty(p.name)?Tk(o[p.name]):void 0));for(let l of s.privateProperties??[])i.push(this.createPropertyVar(l,e,void 0,{presentationHint:{visibility:"private"},sortOrder:1}));for(let l of s.internalProperties||[]){if(l.name==="[[StableObjectId]]")continue;let p;l.name==="[[FunctionLocation]]"&&l.value&&l.value.subtype==="internal#location"?p=this.createVariable(Z0,{name:l.name,presentationHint:{visibility:"internal",attributes:["readOnly"]},sortOrder:2},l.value):l.value!==void 0&&(p=this.createVariableByType({name:l.name,presentationHint:{visibility:"internal"},sortOrder:2},l.value)),p&&i.push([p])}return yp(await Promise.all(i))}async createPropertyVar(e,r,i,n){let s=[],o=e.get&&e.get.type!=="undefined",a=e.set&&e.set.type!=="undefined",u={name:e.name,presentationHint:{},sortOrder:0,...n};return n||(JY(e)?(e.enumerable===!1&&!o&&(u.presentationHint.visibility="internal",u.sortOrder=1),(e.writable===!1||o&&!a)&&(u.presentationHint.attributes=["readOnly"])):(u.presentationHint.visibility="private",u.sortOrder=1)),"value"in e&&e.value&&s.push(this.createVariableByType(u,e.value,i)),o?s.push(this.createVariable(nw,u,e.get,r)):a&&s.push(this.createVariable(iw,u,e.set)),s}async evaluateCodeForObject(e,r,i){try{let n=await this.cdp.Runtime.callFunctionOn({objectId:e.objectId,functionDeclaration:r,arguments:i.map(aw)});if(n){if(n.exceptionDetails===void 0)return{result:n.result};if(n&&n.result.description)return{errorDescription:n.result.description}}return{errorDescription:Co.t("Unknown error")}}catch(n){return{errorDescription:n.stack||n.message||String(n)}}}},Ai=class{constructor(e,r){this.context=e;this.remoteObject=r;this.id=ow()}get name(){return this.context.name}get sortOrder(){return this.context.sortOrder}get accessor(){let{parent:e,name:r}=this.context;return!e||e instanceof Ja?this.context.name:e instanceof Rf?e.accessor:typeof r=="number"||/^[0-9]+$/.test(r)?`${e.accessor}[${r}]`:XY.test(r)?`${e.accessor}.${r}`:e.accessor==="this"&&zY.test(r)?`${e.accessor}.${r}`:`${e.accessor}[${JSON.stringify(r)}]`}async toDap(e,r){let i=this.context.name;return this.context.parent instanceof Ja&&(i=await this.context.parent.getRename(i)),Promise.resolve({name:i,value:Ka(this.remoteObject,e,r),evaluateName:this.accessor,type:this.remoteObject.type,variablesReference:0,presentationHint:this.context.presentationHint})}async setProperty(e,r){let i=await this.context.cdp.Runtime.callFunctionOn({objectId:this.remoteObject.objectId,functionDeclaration:`function(a) { return this[a] = ${r}; ${Ht()} }`,arguments:[aw(e)],silent:!0});if(!i)throw new re(Qe(Co.t("Unable to set variable value")));if(i.exceptionDetails)throw new re($k(i.exceptionDetails));return this.context.createVariableByType({name:e},i.result)}async getChildren(e){return Promise.resolve([])}},RH=class{constructor(e){this.child=e;this.id=ow()}getChildren(){return Promise.resolve([this.child])}},Y0=class extends Ai{constructor(r,i,n,s){var o;super(r,{type:((o=n[0])==null?void 0:o.type)??"string"});this.value=i;this.args=n;this.stackTrace=s}toDap(){return Promise.resolve({name:this.context.name,value:this.value,variablesReference:this.stackTrace||this.args.some(Ga)?this.id:0})}getChildren(r){let i=[],{args:n,stackTrace:s}=this;for(let o=0;o<n.length;++o)Ga(n[o])&&i.push(this.context.createVariableByType({name:`arg${o}`,sortOrder:o},n[o]));return s&&i.push(this.context.createVariable(Q0,{name:"",sortOrder:Number.MAX_SAFE_INTEGER},this.remoteObject,s)),Promise.resolve(i)}},Q0=class extends Ai{constructor(r,i,n){super(r,i);this.stacktrace=n}async toDap(){return{name:"",value:await this.stacktrace.format(),variablesReference:0}}},Z0=class extends Ai{constructor(r,i){super(r,i);this.location=i.value}async toDap(){return{name:this.context.name,value:await this.context.locationProvider.renderDebuggerLocation(this.location),variablesReference:0,presentationHint:{visibility:"internal"}}}},ew=class extends Ai{constructor(r,i,n){super(r,i);this.message=n}get accessor(){if(!(this.context.parent instanceof Ai))throw new Error("ErrorVariable must have a parent Variable");return this.context.parent.accessor}toDap(){return Promise.resolve({name:this.context.name,value:this.message,variablesReference:0})}},tw=Symbol("NoStringRepr"),OH=class extends Ai{constructor(r,i,n){super(r,i);this.customStringRepr=n}async toDap(r,i){let[n,s]=await Promise.all([await super.toDap(r,i),await this.getValueRepresentation(r)]);return{...n,type:this.remoteObject.className||this.remoteObject.subtype||this.remoteObject.type,variablesReference:this.id,memoryReference:KY.has(this.remoteObject.subtype)?String(this.id):void 0,value:s}}async getValueRepresentation(r){if(typeof this.customStringRepr=="string")return this.customStringRepr;if(!this.context.parent&&this.customStringRepr!==tw)try{let i=await this.context.cdp.Runtime.callFunctionOn({functionDeclaration:Sk.decl(`${Dk}`,this.context.customDescriptionGenerator||"null"),objectId:this.remoteObject.objectId,returnByValue:!0});if(i!=null&&i.result.value)return this.customStringRepr=Tk(i.result.value)}catch{this.customStringRepr=tw}return this.context.name==="__proto__"&&this.remoteObject.description||Ka(this.remoteObject,r)}async readMemory(r,i){let n=await xk({cdp:this.context.cdp,args:[r,i],objectId:this.remoteObject.objectId,returnByValue:!0});return Buffer.from(n.value,"hex")}async writeMemory(r,i){return(await Lk({cdp:this.context.cdp,args:[r,i.toString("hex")],objectId:this.remoteObject.objectId,returnByValue:!0})).value}getChildren(r){return this.context.createObjectPropertyVars(this.remoteObject,r.evaluationOptions)}},NH=class extends OH{constructor(r,i){super(r,i,tw);this.length=0;let n=String(i.description).match(/\(([0-9]+)\)/);this.length=n?+n[1]:0}async toDap(r){return{...await super.toDap(r),indexedVariables:this.length>100?this.length:void 0,namedVariables:this.length>100?1:void 0}}async getChildren(r){switch(r==null?void 0:r.filter){case"indexed":return this.getArraySlots(r);case"named":return this.getArrayProperties();default:return Promise.all([this.getArrayProperties(),this.getArraySlots()]).then(yp)}}async getArrayProperties(){try{let r=await wk({cdp:this.context.cdp,args:[],objectId:this.remoteObject.objectId,generatePreview:!0});return this.context.createObjectPropertyVars(r)}catch{return[]}}async getArraySlots(r){let i=r&&typeof r.start<"u"?r.start:-1,n=r&&typeof r.count<"u"?r.count:-1,s;try{s=await Ak({cdp:this.context.cdp,generatePreview:!1,args:[i,n],objectId:this.remoteObject.objectId})}catch{return[]}let o=await this.context.createObjectPropertyVars(s);return s.objectId&&await this.context.cdp.Runtime.releaseObject({objectId:s.objectId}),o}},rw=class extends NH{async toDap(e){return this.remoteObject.preview?{...await super.toDap(e),name:Hk(this.remoteObject.preview)}:super.toDap(e)}},Rf=class extends Ai{constructor(e,r){super(e,r)}getChildren(e){return this.context.createObjectPropertyVars(this.remoteObject)}},iw=class extends Rf{async toDap(e,r){return{...await super.toDap(e,r),value:"write-only",variablesReference:this.id}}},nw=class extends Rf{constructor(r,i,n){super(r,i);this.parentObject=n}async toDap(r,i){let n=await super.toDap(r,i);return n.variablesReference=this.id,n.presentationHint={...n.presentationHint,lazy:!0},n}async getChildren(r){try{let i=await Ek({cdp:this.context.cdp,objectId:this.parentObject.objectId,args:[new Zp(this.remoteObject.objectId)]});return[this.context.createVariableByType({name:this.name,presentationHint:this.context.presentationHint},i)]}catch(i){if(!(i instanceof Hc))throw i}return super.getChildren(r)}},Ja=class{constructor(e,r,i,n,s){this.remoteObject=e;this.context=r;this.ref=i;this.extraProperties=n;this.renameProvider=s;this.id=ow()}async getChildren(e){let r=await this.context.createObjectPropertyVars(this.remoteObject),i=new Set(r.map(n=>n.name));for(let n of this.extraProperties)i.has(n.name)||r.push(this.context.createVariableByType({name:n.name},n.value));return r}async getRename(e){return(await this.renameProvider.provideOnStackframe(this.ref.stackFrame)).getOriginalName(e,this.ref.stackFrame.rawPosition)||e}async setProperty(e,r){let i=await this.context.cdp.Debugger.evaluateOnCallFrame({expression:`${r} ${Ht()}`,callFrameId:this.ref.callFrameId});if(!i)throw new re(Ze(Co.t("Invalid expression")));if(i.exceptionDetails)throw new re($k(i.exceptionDetails));return await this.context.cdp.Debugger.setVariableValue({callFrameId:this.ref.callFrameId,scopeNumber:this.ref.scopeNumber,variableName:e,newValue:aw(i.result)}),this.context.createVariableByType({name:e},i.result)}},sw=class{constructor(){this.value=new Map}get(e){return this.value.get(e)}add(e){this.value.set(e.id,e)}clear(){this.value.clear()}},Lo=class{constructor(e,r,i,n,s){this.renameProvider=e;this.cdp=r;this.dap=i;this.launchConfig=n;this.locationProvider=s;this.vars=new sw;this.contextSettings={customDescriptionGenerator:n.customDescriptionGenerator&&Ck(["defaultValue"],n.customDescriptionGenerator,!1),customPropertiesGenerator:n.customPropertiesGenerator&&Ck([],n.customPropertiesGenerator,!1)}}createDetached(){return new Lo(this.renameProvider,this.cdp,this.dap,this.launchConfig,this.locationProvider)}clear(){this.vars.clear()}createFloatingVariable(e,r){return this.createFloatingContext().createVariableByType({name:e},r)}createVariableForOutput(e,r,i,n){let s=this.createFloatingContext(),o=r.length===1&&n==="table"?s.createVariable(rw,{name:""},r[0]):r.length===1&&Ga(r[0])&&!i?s.createVariableByType({name:""},r[0]):s.createVariable(Y0,{name:""},e,r,i),a=new RH(o);return this.vars.add(a),a}createScope(e,r,i){let n=new Ja(e,new tl(this.cdp,void 0,{name:""},this.vars,this.locationProvider,()=>n,this.contextSettings),r,i,this.renameProvider);return this.vars.add(n),n}hasVariable(e){return!!this.vars.get(e)}hasMemory(e){return J0(this.vars.get(Number(e)))}async readMemory(e,r,i){let n=this.vars.get(Number(e));return J0(n)?n.readMemory(r,i):void 0}async writeMemory(e,r,i){let n=this.vars.get(Number(e)),s=J0(n)?await n.writeMemory(r,i):0;return s>0&&this.dap.invalidated({areas:["variables"]}),s}async getVariableNames(e){let r=this.vars.get(e.variablesReference);return r?(await r.getChildren(e)).filter(_a(Ai)).map(n=>n.name):[]}async getVariables(e){let r=this.vars.get(e.variablesReference);if(!r)return[];let i=await r.getChildren(e);return(await Promise.all(i.map(s=>s.toDap(r instanceof Ja||r instanceof RH?"repl":"propertyValue",e.format).then(o=>({v:s,dap:o}))))).sort((s,o)=>s.v.sortOrder-o.v.sortOrder||+s.dap.name-+o.dap.name||s.dap.name.localeCompare(o.dap.name)).map(s=>s.dap)}async setVariable(e){let r=this.vars.get(e.variablesReference);if(!e.value)throw new re(Ze(Co.t("Cannot set an empty value")));if(r instanceof Ja||r instanceof Ai)return await(await r.setProperty(e.name,e.value)).toDap("propertyValue",e.format);throw new re(Qe(Co.t("Variable not found")))}createFloatingContext(){return new tl(this.cdp,void 0,{name:"<unnamed>"},this.vars,this.locationProvider,void 0,this.contextSettings)}};Lo=X([(0,za.injectable)(),x(0,(0,za.inject)(bo)),x(1,(0,za.inject)(gt)),x(2,(0,za.inject)(di)),x(3,(0,za.inject)(Fe))],Lo);function $k(t){let e=t.exception&&Xa(t.exception).title||t.text;return Ze(e)}var uw=class{constructor(e){this.description=e;this.sourceMapLoads=new Map;this.scripts=[]}get isDefault(){return this.description.auxData&&this.description.auxData.isDefault}async remove(e){await Promise.all(this.scripts.map(async r=>{let i=await r.source;i.filterScripts(n=>n.executionContextId!==this.description.id),i.scripts.length||e.removeSource(i)}))}},cw=class{constructor(e){this._obj=e;this._dapDeferred=Xe()}resolve(){this._dapDeferred.resolve(this._obj)}with(e){return this._dapDeferred.hasSettled()?e(this._obj):this._dapDeferred.promise.then(r=>e(r))}},QY=50,Mk=(t,e)=>t.sourceReference===e.sourceReference&&Fm(t.path||"",e.path||""),ZY=()=>`
//# sourceURL=eval-${(0,kk.randomBytes)(4).toString("hex")}${".repl"}
`,Po=class{constructor(e,r,i,n,s,o,a,u,c,l,p,f,H,m){this.target=n;this.logger=o;this.evaluator=a;this.completer=u;this.launchConfig=c;this._breakpointManager=l;this.console=p;this.exceptionPause=f;this._smartStepper=H;this.shutdown=m;this._executionContexts=new Map;this._excludedCallers=[];this._onPausedEmitter=new J;this.disposed=!1;this.debuggerReady=Xe();this.onPaused=this._onPausedEmitter.event;this._dap=new cw(i),this._sourceContainer=e,this._cdp=r,this.id=Po._lastThreadId++,this.replVariables=new Lo(s,this._cdp,i,c,this),e.onSourceMappedSteppingChange(()=>this.refreshStackTrace()),this._initialize()}setExcludedCallers(e){this._excludedCallers=e}cdp(){return this._cdp}name(){return this.target.name()}pausedDetails(){return this._pausedDetails}pausedVariables(){return this._pausedVariables}defaultExecutionContext(){for(let e of this._executionContexts.values())if(e.isDefault)return e}async resume(){return this._sourceContainer.clearDisabledSourceMaps(),!await this._cdp.Debugger.resume({})&&this._pausedDetails!==void 0?Qe(Re.t("Unable to resume")):{allThreadsContinued:!1}}async pause(){return this._expectedPauseReason={reason:"pause"},await this._cdp.Debugger.pause({})?{}:Qe(Re.t("Unable to pause"))}async stepOver(){return this._expectedPauseReason={reason:"step",direction:1},await this._cdp.Debugger.stepOver({})?{}:Qe(Re.t("Unable to step next"))}async stepInto(e){var i,n;this._waitingForStepIn={lastDetails:this._pausedDetails},this._expectedPauseReason={reason:"step",direction:0};let r=(n=(i=this._pausedDetails)==null?void 0:i.stepInTargets)==null?void 0:n[e];if(r){let s=await this._cdp.Debugger.setBreakpoint({location:r.breakLocation});if(this._waitingForStepIn.intoTargetBreakpoint=s==null?void 0:s.breakpointId,await this._cdp.Debugger.resume({}))return{}}else if(await this._cdp.Debugger.stepInto({breakOnAsyncCall:!0}))return{};return Qe(Re.t("Unable to step in"))}async stepOut(){return this._expectedPauseReason={reason:"step",direction:2},await this._cdp.Debugger.stepOut({})?{}:Qe(Re.t("Unable to step out"))}_stackFrameNotFoundError(){return Qe(Re.t("Stack frame not found"))}_evaluateOnAsyncFrameError(){return Qe(Re.t("Unable to evaluate on async stack frame"))}async restartFrame(e){var s;let r=(s=this._pausedDetails)==null?void 0:s.stackTrace.frame(e.frameId);if(!r)return this._stackFrameNotFoundError();let i=r.callFrameId();return i?await this._cdp.Debugger.restartFrame({callFrameId:i,mode:"StepInto"})?(this._expectedPauseReason={reason:"frame_entry",description:Re.t("Paused on frame entry")},r.canExplicitlyBeRestarted||await this._cdp.Debugger.stepInto({}),{}):Ze(Re.t("Frame could not be restarted")):Ze(Re.t("Cannot restart asynchronous frame"))}async stackTrace(e){return this._pausedDetails?this._pausedDetails.stackTrace.toDap(e):Qe(Re.t("Thread is not paused"))}async scopes(e){let r=this._pausedDetails?this._pausedDetails.stackTrace.frame(e.frameId):void 0;return r?r.scopes():this._stackFrameNotFoundError()}async exceptionInfo(){let e=this._pausedDetails&&this._pausedDetails.exception;if(!e)return Qe(Re.t("Thread is not paused on exception"));let r=Xa(e);return{exceptionId:r.title,breakMode:"all",details:{stackTrace:r.stackTrace,evaluateName:void 0}}}async revealPage(){return this._cdp.Page.bringToFront({}),{}}async completions(e){let r;if(e.frameId!==void 0){if(r=this._pausedDetails?this._pausedDetails.stackTrace.frame(e.frameId):void 0,!r)return this._stackFrameNotFoundError();if(!r.callFrameId())return this._evaluateOnAsyncFrameError()}if(e.line===1&&e.text.startsWith("cd "))return{targets:this.getExecutionContextCompletions(e)};let i=await this.completer.completions({executionContextId:this._selectedContext?this._selectedContext.description.id:void 0,stackFrame:r,expression:e.text,position:new Kr(e.line||1,e.column)});return{targets:[...this.getExecutionContextCompletions(e),...i]}}getExecutionContextCompletions(e){if(e.line&&e.line>1)return[];let r=e.text.slice(0,e.column).trim();return[...this._executionContexts.values()].map(i=>`cd ${this.target.executionContextName(i.description)}`).filter(i=>i.startsWith(r)).map(i=>({label:i,start:0,length:e.text.length}))}async evaluate(e){let r,i;if(e.frameId!==void 0){if(i=this._pausedDetails?this._pausedDetails.stackTrace.frame(e.frameId):void 0,!i)throw new re(this._stackFrameNotFoundError());if(r=i.callFrameId(),!r)throw new re(this._evaluateOnAsyncFrameError())}if(e.context==="repl"&&e.expression.startsWith("cd ")){let c=e.expression.substring(3).trim();for(let l of this._executionContexts.values())if(this.target.executionContextName(l.description)===c)return this._selectedContext=l,{result:`[${c}]`,variablesReference:0}}let n=e.context==="clipboard"?{expression:z0.expr(e.expression,"2"),includeCommandLineAPI:!0,returnByValue:!0,objectGroup:"console"}:{expression:e.expression,includeCommandLineAPI:!0,objectGroup:"console",generatePreview:!0,timeout:e.context==="hover"?this.getHoverEvalTimeout():void 0};if(e.context==="repl"){if(n.expression=Qp(n.expression),n.expression.indexOf("await")!==-1){let c=yT(n.expression);c&&(n.expression=c,n.awaitPromise=!0)}n.expression+=ZY()}e.evaluationOptions&&this.cdp().DotnetDebugger.setEvaluationOptions({options:e.evaluationOptions,type:"evaluation"});let s=this.evaluator.evaluate(r?{...n,callFrameId:r}:{...n,contextId:this._selectedContext?this._selectedContext.description.id:void 0},{isInternalScript:!1,stackFrame:i});if(e.context==="repl")return await this._evaluateRepl(e,s,e.format);let o=await s;if(!o)throw new re(Qe(Re.t("Unable to evaluate")));if(o.exceptionDetails){let c=o.exceptionDetails.exception?Xa(o.exceptionDetails.exception).title:o.exceptionDetails.text;throw c.startsWith("Uncaught")||(c="Uncaught "+c),new re(Qe(c))}let a=r?this._pausedVariables:this.replVariables;if(!a)throw new re(Qe(Re.t("Unable to evaluate")));let u=await a.createFloatingVariable(n.expression,o.result).toDap(e.context,e.format);return{type:o.result.type,result:u.value,variablesReference:u.variablesReference,namedVariables:u.namedVariables,indexedVariables:u.indexedVariables,memoryReference:u.memoryReference}}getHoverEvalTimeout(){var r;let e=(r=this.launchConfig.timeouts)==null?void 0:r.hoverEvaluation;if(e===void 0)return 500;if(!(e<=0))return e}async _evaluateRepl(e,r,i){let n=await r;if(!n)return{result:"",variablesReference:0};if(n.exceptionDetails){let u=await new Of(n.exceptionDetails).toDap(this);throw new re(lD(u.output))}let s=this._selectedContext&&this.defaultExecutionContext()!==this._selectedContext?`\x1B[33m[${this.target.executionContextName(this._selectedContext.description)}] `:"",o=await this.replVariables.createFloatingVariable(e.expression,n.result).toDap("repl",i),a=PH("repl").budget;return o.variablesReference===0&&o.value.length===a&&setImmediate(()=>this.console.enqueue(this,{toDap:()=>({output:Re.t("Output has been truncated to the first {0} characters. Run `{1}` to copy the full output.",a,`copy(${e.expression.trim()}))`),category:"stdout"})})),{...o,result:`${s}${o.value}`}}_initialize(){this._cdp.Runtime.on("executionContextCreated",e=>{this._executionContextCreated(e.context)}),this._cdp.Runtime.on("executionContextDestroyed",e=>{this._executionContextDestroyed(e.executionContextId)}),this._cdp.Runtime.on("executionContextsCleared",()=>{this.launchConfig.noDebug||this._ensureDebuggerEnabledAndRefreshDebuggerId(),this.replVariables.clear(),this._executionContextsCleared()}),this._cdp.Inspector.on("targetReloadedAfterCrash",()=>{this._breakpointManager.reapply()}),this.launchConfig.outputCapture==="console"&&(this._cdp.Runtime.on("consoleAPICalled",e=>{this.console.dispatch(this,e)}),this._cdp.Runtime.on("exceptionThrown",e=>{this.console.enqueue(this,new Of(e.exceptionDetails))})),this._cdp.Runtime.on("inspectRequested",e=>{e.hints.copyToClipboard?this._copyObjectToClipboard(e.object):e.hints.queryObjects?this.console.enqueue(this,new MH(e.object,this.cdp())):this._revealObject(e.object)}),this._cdp.Debugger.on("paused",async e=>this._onPaused(e)),this._cdp.Debugger.on("resumed",()=>this.onResumed()),this._cdp.Debugger.on("scriptParsed",e=>this._onScriptParsed(e)),this._cdp.Debugger.on("scriptFailedToParse",e=>this._onScriptParsed(e)),this._cdp.Runtime.enable({}),this._cdp.Profiler.enable({}),this.launchConfig.noDebug?this.logger.info("runtime.launch","Running with noDebug, so debug domains are disabled"):this._ensureDebuggerEnabledAndRefreshDebuggerId(),this.target.initialize(),this._dap.with(e=>e.thread({reason:"started",threadId:this.id}))}dapInitialized(){this._dap.resolve()}async getStepInTargets(e){var l,p;let r=this._pausedDetails;if(!r)return[];let i=r.stackTrace.frames.find(f=>f.frameId===e);if(!(i instanceof St))return[];let n=await i.uiLocation();if(!n)return[];let s=r.event.callFrames[0].location,[o,a]=await Promise.all([this._breakpointManager.getBreakpointLocations(this,n.source,new Kr(n.lineNumber,1),new Kr(n.lineNumber+1,1)).then(f=>f.filter(H=>H.breakLocation.lineNumber!==s.lineNumber||H.breakLocation.columnNumber!==s.columnNumber)),n.source.content()]),u=((l=r.stepInTargets)==null?void 0:l.length)||0;r.stepInTargets=((p=r.stepInTargets)==null?void 0:p.concat(o))||o;let c=a&&new co(a);return o.map((f,H)=>{let m=f.uiLocations.find(b=>b.source===n.source);if(!m)return;if(!c)return{id:u+H,label:`Column ${m}`,line:m.lineNumber,column:m.columnNumber};let y=bT(a.slice(c.getLineOffset(m.lineNumber-1),c.getLineOffset(m.lineNumber)),m.columnNumber-1);if(y)return{id:u+H,label:y.text,line:m.lineNumber,column:y.start+1,endLine:m.lineNumber,endColumn:y.end+1}}).filter(vt)}async refreshStackTrace(){this._pausedDetails&&(this._pausedDetails=this._createPausedDetails(this._pausedDetails.event),this._onThreadResumed(),await this._onThreadPaused(this._pausedDetails))}_executionContextCreated(e){let r=new uw(e);this._executionContexts.set(e.id,r)}_executionContextDestroyed(e){let r=this._executionContexts.get(e);r&&(this._executionContexts.delete(e),r.remove(this._sourceContainer))}_executionContextsCleared(){this._removeAllScripts(),this._breakpointManager.executionContextWasCleared(),this._pausedDetails&&this.onResumed(),this._executionContexts.clear()}_ensureDebuggerEnabledAndRefreshDebuggerId(){this._cdp.Debugger.enable({}).then(e=>{this.debuggerReady.resolve(),e&&Po._allThreadsByDebuggerId.set(e.debuggerId,this)}),this.exceptionPause.apply(this._cdp)}async _onPaused(e){var l,p,f,H,m,y,b;let r=(e.hitBreakpoints??[]).filter(A=>A!==this._pauseOnSourceMapBreakpointId),i=e.reason==="Break on start"||e.reason==="debugCommand",n=(l=e.callFrames[0])==null?void 0:l.location,s=((p=e.data)==null?void 0:p.scriptId)||(n==null?void 0:n.scriptId),o=e.reason==="instrumentation"&&((f=e.data)==null?void 0:f.scriptId)||s&&this._breakpointManager.isEntrypointBreak(r,s);if(this.evaluator.setReturnedValue((H=e.callFrames[0])==null?void 0:H.returnValue),o){if(this.launchConfig.perScriptSourcemaps==="auto"&&this._shouldEnablePerScriptSms(e)&&await this._enablePerScriptSourcemaps(),e.data&&!i&&(e.data.__rewriteAs="breakpoint"),!(s&&await this._handleSourceMapPause(s,n))){if(!i){if(await this.isCrossThreadStep(e))e.data={...e.data,__rewriteAs:"step"};else if(!await this._breakpointManager.shouldPauseAt(e,r,this.target.entryBreakpoint,!0))return((m=this._expectedPauseReason)==null?void 0:m.reason)==="step"&&this._expectedPauseReason.direction===1?this._cdp.Debugger.stepOut({}):this.resume()}}}else if(!(e.reason==="exception"||e.reason==="promiseRejection"?await this.exceptionPause.shouldPauseAt(e):await this._breakpointManager.shouldPauseAt(e,r,this.target.entryBreakpoint,!1)))return this.resume();let a=(y=this._waitingForStepIn)==null?void 0:y.intoTargetBreakpoint;if(a){(b=e.hitBreakpoints)!=null&&b.includes(a)?(this._waitingForStepIn.intoTargetBreakpoint=void 0,await this._cdp.Debugger.removeBreakpoint({breakpointId:a}),await this._cdp.Debugger.stepInto({breakOnAsyncCall:!1})):this.resume();return}if(i&&("continueOnAttach"in this.launchConfig&&this.launchConfig.continueOnAttach||this.launchConfig.type==="pwa-extensionHost"||this.target instanceof el)){this.resume();return}let u=this._pausedDetails=this._createPausedDetails(e);if(this._excludedCallers.length&&await this._matchesExcludedCaller(this._pausedDetails.stackTrace)){this.logger.info("runtime","Skipping pause due to excluded caller"),this.resume();return}let c=await this._smartStepper.getSmartStepDirection(u,this._expectedPauseReason);if(this._pausedDetails===u){switch(c){case 0:return this.stepInto();case 2:return this.stepOut();case 1:return this.stepOver();default:}this._waitingForStepIn=void 0,this._pausedVariables=this.replVariables.createDetached(),await this._onThreadPaused(u)}}async _matchesExcludedCaller(e){if(!this._excludedCallers.length)return!1;let r=e.frames[0],i=r instanceof St&&await r.uiLocation();if(!i)return!1;let n,s,o=[];for(let{caller:a,target:u}of this._excludedCallers)if(!(u.line!==i.lineNumber||u.column!==i.columnNumber)&&(n??=await i.source.toDapShallow(),!!Mk(n,u.source))){s||(s=await e.loadFrames(QY).then(l=>Promise.all(l.slice(1).filter(_a(St)).map(p=>p.uiLocation()))));for(let c=0;c<s.length;c++){let l=s[c];if(!l||l.lineNumber!==a.line||l.columnNumber!==a.column)continue;let p=o[c]??=await l.source.toDapShallow();if(Mk(p,a.source))return!0}}return!1}onResumed(){this._pausedDetails=void 0,this._pausedVariables=void 0,this.evaluator.setReturnedValue(void 0),this._onThreadResumed()}async dispose(){this.disposed=!0,await this.shutdown.shutdown();for(let[e,r]of Po._allThreadsByDebuggerId)r===this&&Po._allThreadsByDebuggerId.delete(e);this._removeAllScripts(!0),this._executionContextsCleared(),await this._dap.with(e=>e.thread({reason:"exited",threadId:this.id}))}rawLocation(e){if("location"in e){let r=e;return{lineNumber:Math.max(0,r.location.lineNumber)+1,columnNumber:Math.max(0,r.location.columnNumber||0)+1,scriptId:r.location.scriptId}}return{lineNumber:Math.max(0,e.lineNumber)+1,columnNumber:Math.max(0,e.columnNumber||0)+1,scriptId:e.scriptId}}rawLocationToUiLocation(e){if(!e.scriptId||this.disposed||this.launchConfig.noDebug)return;let r=this._sourceContainer.getScriptById(e.scriptId);return r?r.resolvedSource?this._sourceContainer.preferredUiLocation({...Ra(e,r.resolvedSource.runtimeScriptOffset),source:r.resolvedSource}):r.source.then(i=>this._sourceContainer.preferredUiLocation({...Ra(e,i.runtimeScriptOffset),source:i})):this.rawLocationToUiLocationWithWaiting(e)}async rawLocationToUiLocationWithWaiting(e){let r=e.scriptId?await this.getScriptByIdOrWait(e.scriptId):void 0;if(!r)return;let i=await r.source;return this._sourceContainer.preferredUiLocation({...Ra(e,i.runtimeScriptOffset),source:i})}getScriptById(e){return this._sourceContainer.getScriptById(e)}getScriptByIdOrWait(e,r=500){return this._sourceContainer.getScriptById(e)||this.waitForScriptId(e,r)}waitForScriptId(e,r){return new Promise(i=>{let n=this._sourceContainer.onScript(o=>{o.scriptId===e&&(i(o),n.dispose(),clearTimeout(s))}),s=setTimeout(()=>{i(void 0),n.dispose()},r)})}async renderDebuggerLocation(e){let r=this.rawLocation(e),i=await this.rawLocationToUiLocation(r);return i?`@ ${await i.source.prettyName()}:${i.lineNumber}`:`@ VM${r.scriptId||"XX"}:${r.lineNumber}`}async updateCustomBreakpoint(e,r){if(!this.target.supportsCustomBreakpoints())return;let i=X0().get(e);i&&await i.apply(this._cdp,r)}_createPausedDetails(e){var s,o;let r=e.reason==="assert"||e.reason==="exception"||e.reason==="promiseRejection"||e.reason==="other"||e.reason==="ambiguous";if((!!(e.hitBreakpoints&&e.hitBreakpoints.length)||!r)&&this._sourceContainer.clearDisabledSourceMaps(),e.hitBreakpoints&&this._sourceMapDisabler)for(let a of this._sourceMapDisabler(e.hitBreakpoints))this._sourceContainer.disableSourceMapForSource(a);let n=ri.fromDebugger(this,e.callFrames,e.asyncStackTrace,e.asyncStackTraceId);if(((s=e.data)==null?void 0:s.__rewriteAs)==="breakpoint")return{thread:this,event:e,stackTrace:n,reason:"breakpoint",description:Re.t("Paused on breakpoint")};if(((o=e.data)==null?void 0:o.__rewriteAs)==="step")return{thread:this,event:e,stackTrace:n,reason:"step",description:Re.t("Paused")};switch(e.reason){case"assert":return{thread:this,event:e,stackTrace:n,reason:"exception",description:Re.t("Paused on assert")};case"debugCommand":return{thread:this,event:e,stackTrace:n,reason:"pause",description:Re.t("Paused on debug() call")};case"DOM":return{thread:this,event:e,stackTrace:n,reason:"data breakpoint",description:Re.t("Paused on DOM breakpoint")};case"EventListener":return this._resolveEventListenerBreakpointDetails(n,e);case"exception":return{thread:this,event:e,stackTrace:n,reason:"exception",description:Re.t("Paused on exception"),exception:e.data};case"promiseRejection":return{thread:this,event:e,stackTrace:n,reason:"exception",description:Re.t("Paused on promise rejection"),exception:e.data};case"instrumentation":return e.data&&e.data.scriptId?{thread:this,event:e,stackTrace:n,reason:"step",description:Re.t("Paused")}:{thread:this,event:e,stackTrace:n,reason:"function breakpoint",description:Re.t("Paused on instrumentation breakpoint")};case"XHR":return{thread:this,event:e,stackTrace:n,reason:"data breakpoint",description:Re.t("Paused on XMLHttpRequest or fetch")};case"OOM":return{thread:this,event:e,stackTrace:n,reason:"exception",description:Re.t("Paused before Out Of Memory exception")};default:if(e.hitBreakpoints&&e.hitBreakpoints.length){let a=!1,u=this.target.entryBreakpoint;if(u&&e.hitBreakpoints.includes(u.cdpId)){a=!0;let c=this._sourceContainer.source({path:st(u.path)});c!==void 0&&(a=!this._sourceContainer.currentSiblingUiLocations({lineNumber:e.callFrames[0].location.lineNumber+1,columnNumber:(e.callFrames[0].location.columnNumber||0)+1,source:c}).some(p=>this._breakpointManager.hasAtLocation(p)))}return a||this._breakpointManager.registerBreakpointsHit(e.hitBreakpoints),{thread:this,event:e,stackTrace:n,hitBreakpoints:e.hitBreakpoints,reason:a?"entry":"breakpoint",description:Re.t("Paused on breakpoint")}}return this._expectedPauseReason?{thread:this,event:e,stackTrace:n,description:Re.t("Paused"),...this._expectedPauseReason}:{thread:this,event:e,stackTrace:n,reason:"pause",description:Re.t("Paused on debugger statement")}}}_resolveEventListenerBreakpointDetails(e,r){let i=r.data,n=i&&i.eventName||"",s=X0().get(n);if(s){let o=s.details(i);return{thread:this,event:r,stackTrace:e,reason:"function breakpoint",description:o.short,text:o.long}}return{thread:this,event:r,stackTrace:e,reason:"function breakpoint",description:Re.t("Paused on event listener")}}_clearDebuggerConsole(){return{category:"console",output:"\x1B[2J"}}_removeAllScripts(e=!1){this._sourceContainer.clear(e)}_onScriptParsed(e){if(e.url.endsWith(".cdp")||(fr(e.url)&&(e.url=We(e.url)),this._sourceContainer.getScriptById(e.scriptId)))return;e.url&&(e.url=this.target.scriptUrlToUrl(e.url)),(this.launchConfig.type==="pwa-node"||this.launchConfig.type==="node-terminal")&&e.executionContextId===0&&!this._executionContexts.has(0)&&(e.executionContextId=1);let r=this._executionContexts.get(e.executionContextId);if(!r)return;let i=async()=>{let s=this._sourceContainer.getSourceByOriginalUrl(e.url);if(e.hash&&(s==null?void 0:s.contentHash)===e.hash)return s.addScript({scriptId:e.scriptId,url:e.url,executionContextId:e.executionContextId}),s;let o=async()=>{let p=await this._cdp.Debugger.getScriptSource({scriptId:e.scriptId});return p?p.scriptSource:void 0},a=e.startLine||e.startColumn?{lineOffset:e.startLine,columnOffset:e.startColumn}:void 0,u=e.url.endsWith("#vscode-extension")?{lineOffset:2,columnOffset:0}:void 0,c;e.sourceMapURL&&(c=tr(e.sourceMapURL)?e.sourceMapURL:e.url&&uo(e.url,e.sourceMapURL)||e.url,c||this._dap.with(p=>tD(p,`Could not load source map from ${e.sourceMapURL}`)));let l=await this._sourceContainer.addSource(e.url,o,c,a,u,!e.hasSourceURL&&this.launchConfig.enableContentValidation?e.hash:void 0);return l.addScript({scriptId:e.scriptId,url:e.url,executionContextId:e.executionContextId}),l},n={url:e.url,scriptId:e.scriptId,executionContextId:e.executionContextId,source:i()};n.source.then(s=>n.resolvedSource=s),r.scripts.push(n),this._sourceContainer.addScriptById(n),e.sourceMapURL&&this._getOrStartLoadingSourceMaps(n)}async _handleSourceMapPause(e,r){this._pausedForSourceMapScriptId=e;let i=this._sourceContainer.sourceMapTimeouts().sourceMapMinPause,n=i+this._sourceContainer.sourceMapTimeouts().sourceMapCumulativePause,s=this._sourceContainer.getScriptById(e);if(!s)return this._pausedForSourceMapScriptId=void 0,!1;let o=new Lr,a=await Promise.race([this._getOrStartLoadingSourceMaps(s),Me(n)]),u=o.elapsed().ms,c=this._sourceContainer.sourceMapTimeouts().sourceMapCumulativePause-Math.max(u-i,0);this._sourceContainer.setSourceMapTimeouts({...this._sourceContainer.sourceMapTimeouts(),sourceMapCumulativePause:c}),this.logger.verbose("internal","Blocked execution waiting for source-map",{timeSpentWallClockInMs:u,sourceMapCumulativePause:c}),a||this._dap.with(f=>f.output({category:"stderr",output:Re.t("WARNING: Processing source-maps of {0} took longer than {1} ms so we continued execution without waiting for all the breakpoints for the script to be set.",s.url||s.scriptId,n)})),console.assert(this._pausedForSourceMapScriptId===e),this._pausedForSourceMapScriptId=void 0;let l=(r==null?void 0:r.lineNumber)||0,p=r==null?void 0:r.columnNumber;return!!(a!=null&&a.map(yo).some(f=>f.lineNumber===l&&(p===void 0||p===f.columnNumber)))}_getOrStartLoadingSourceMaps(e){let r=this._executionContexts.get(e.executionContextId);if(!r)return Promise.resolve([]);let i=r.sourceMapLoads.get(e.scriptId);if(i)return i;let n=e.source.then(s=>this._sourceContainer.waitForSourceMapSources(s)).then(s=>s.length&&this._scriptWithSourceMapHandler?this._scriptWithSourceMapHandler(e,s):[]);return r.sourceMapLoads.set(e.scriptId,n),n}async _revealObject(e){if(e.type!=="function"||e.objectId===void 0)return;let r=await this._cdp.Runtime.getProperties({objectId:e.objectId,ownProperties:!0});if(r)for(let i of r.internalProperties||[]){if(i.name!=="[[FunctionLocation]]"||!i.value||i.value.subtype!=="internal#location")continue;let n=await this.rawLocationToUiLocation(this.rawLocation(i.value.value));n&&this._sourceContainer.revealUiLocation(n);break}}async _copyObjectToClipboard(e){if(!e.objectId){this._dap.with(r=>r.copyRequested({text:Ka(e,"copy")}));return}try{let r=await _k({cdp:this.cdp(),objectId:e.objectId,args:[2],silent:!0,returnByValue:!0});this._dap.with(i=>i.copyRequested({text:r.value}))}catch{}finally{this.cdp().Runtime.releaseObject({objectId:e.objectId}).catch(()=>{})}}async _onThreadPaused(e){this._expectedPauseReason=void 0,this._onPausedEmitter.fire(e);let r;e.hitBreakpoints&&(r=await Promise.race([Me(1e3).then(()=>{}),Promise.all(e.hitBreakpoints.map(i=>this._breakpointManager._resolvedBreakpoints.get(i)).filter(_a(yi)).map(i=>i.untilSetCompleted().then(()=>i.dapId)))])),this._dap.with(i=>i.stopped({reason:e.reason,description:e.description,threadId:this.id,text:e.text,hitBreakpointIds:r,allThreadsStopped:!1}))}_onThreadResumed(){this._dap.with(e=>e.continued({threadId:this.id,allThreadsContinued:!1}))}isCrossThreadStep(e){var n;if(!e.asyncStackTraceId||!e.asyncStackTraceId.debuggerId)return!1;let r=Po.threadForDebuggerId(e.asyncStackTraceId.debuggerId);if(!r||!((n=r._waitingForStepIn)!=null&&n.lastDetails))return!1;let i=r._waitingForStepIn.lastDetails.stackTrace;return r._cdp.Debugger.getStackTrace({stackTraceId:e.asyncStackTraceId}).then(s=>!s||!s.stackTrace.callFrames.length||!St.fromRuntime(r,s.stackTrace.callFrames[0],!1).equivalentTo(i.frames[0])?!1:(r._waitingForStepIn=void 0,!0))}async setScriptSourceMapHandler(e,r){this._scriptWithSourceMapHandler=r;let i=e&&this._sourceContainer.sourceMapTimeouts().sourceMapMinPause&&r;if(i&&!this._pauseOnSourceMapBreakpointId){let n=await this._cdp.Debugger.setInstrumentationBreakpoint({instrumentation:"beforeScriptWithSourceMapExecution"});this._pauseOnSourceMapBreakpointId=n?n.breakpointId:void 0}else if(!i&&this._pauseOnSourceMapBreakpointId){let n=this._pauseOnSourceMapBreakpointId;this._pauseOnSourceMapBreakpointId=void 0,await this._cdp.Debugger.removeBreakpoint({breakpointId:n})}return!!this._pauseOnSourceMapBreakpointId}async _enablePerScriptSourcemaps(){await this._breakpointManager.updateEntryBreakpointMode(this,1),await this.setScriptSourceMapHandler(!1,this._scriptWithSourceMapHandler)}_shouldEnablePerScriptSms(e){var r,i,n;return e.reason!=="instrumentation"||!tr((r=e.data)==null?void 0:r.sourceMapURL)?!1:((i=e.data.url)==null?void 0:i.startsWith("webpack"))||((n=e.data.url)==null?void 0:n.startsWith("ng:"))}setSourceMapDisabler(e){this._sourceMapDisabler=e}static threadForDebuggerId(e){return Po._allThreadsByDebuggerId.get(e)}async replacePathsInStackTrace(e){let r=[];for(let n of new xo(e)){if(typeof n=="string"){r.push(n);continue}let s=this._sourceContainer.getSourceByOriginalUrl(We(n.path))||this._sourceContainer.getSourceByOriginalUrl(n.path);if(!s){r.push(n.toString());continue}r.push(this._sourceContainer.preferredUiLocation({columnNumber:n.position.base1.columnNumber,lineNumber:n.position.base1.lineNumber,source:s}).then(({source:o,lineNumber:a,columnNumber:u})=>`${o.absolutePath}:${a}:${u}`))}return(await Promise.all(r)).join("")}},Do=Po;Do._lastThreadId=0,Do._allThreadsByDebuggerId=new Map;async function lw(t){let e=await t.uiLocation();return e?e.source.blackboxed()?2:Sr(e.source)&&!e.isMapped&&e.unmappedReason===3?1:0:0}var eQ=new Set(["breakpoint","exception","entry"]),tQ=16,To=class{constructor(e,r){this.launchConfig=e;this.logger=r;this._smartStepCount=0}resetSmartStepCount(){this._smartStepCount>0&&(this.logger.verbose("internal",`smartStep: skipped ${this._smartStepCount} steps`),this._smartStepCount=0)}async getSmartStepDirection(e,r){if(!this.launchConfig.smartStep||eQ.has(e.reason))return;let i=(await e.stackTrace.loadFrames(1)).find(_a(St));if((i&&await lw(i))===0){this.resetSmartStepCount();return}return this._smartStepCount++>tQ?2:(r==null?void 0:r.reason)==="step"?r.direction:0}};To=X([(0,Nf.injectable)(),x(0,(0,Nf.inject)(Fe)),x(1,(0,Nf.inject)(pe))],To);var ri=class{constructor(e){this.frames=[];this._frameById=new Map;this._lastFrameThread=e}static fromRuntime(e,r){let i=new ri(e);for(let n of r.callFrames)n.url.endsWith(".cdp")||i.frames.push(St.fromRuntime(e,n,!1));return r.parentId?(i._asyncStackTraceId=r.parentId,console.assert(!r.parent)):i._appendStackTrace(e,r.parent),i}static async fromRuntimeWithPredicate(e,r,i,n=1/0){let s=new ri(e);for(let o=0;o<r.callFrames.length&&n>0;o++)if(!r.callFrames[o].url.endsWith(".cdp")){let a=St.fromRuntime(e,r.callFrames[o],!1);await i(a)&&(s.frames.push(),n--)}return r.parentId?(s._asyncStackTraceId=r.parentId,console.assert(!r.parent)):s._appendStackTrace(e,r.parent),s}static fromDebugger(e,r,i,n){let s=new ri(e);for(let o of r)s._appendFrame(St.fromDebugger(e,o));return n?(s._asyncStackTraceId=n,console.assert(!i)):s._appendStackTrace(e,i),s}async loadFrames(e,r){for(;this.frames.length<e&&this._asyncStackTraceId;){if(this._asyncStackTraceId.debuggerId&&(this._lastFrameThread=Do.threadForDebuggerId(this._asyncStackTraceId.debuggerId)),!this._lastFrameThread){this._asyncStackTraceId=void 0;break}r&&this._lastFrameThread.cdp().DotnetDebugger.setEvaluationOptions({options:{noFuncEval:r},type:"stackFrame"});let i=await this._lastFrameThread.cdp().Debugger.getStackTrace({stackTraceId:this._asyncStackTraceId});this._asyncStackTraceId=void 0,i&&this._appendStackTrace(this._lastFrameThread,i.stackTrace)}return this.frames}frame(e){return this._frameById.get(e)}_appendStackTrace(e,r){for(console.assert(!r||!this._asyncStackTraceId);r;){if(r.description==="async function"&&r.callFrames.length&&r.callFrames.shift(),r.callFrames.length){this._appendFrame(new pw(r.description||"async"));for(let i of r.callFrames)this._appendFrame(St.fromRuntime(e,i,!0))}r.parentId&&(this._asyncStackTraceId=r.parentId,console.assert(!r.parent)),r=r.parent}}_appendFrame(e){this.frames.push(e),e instanceof St&&this._frameById.set(e.frameId,e)}async formatAsNative(){return await this.formatWithMapper(e=>e.formatAsNative())}async format(){return await this.formatWithMapper(e=>e.format())}async formatWithMapper(e){let r=await this.loadFrames(50);for(let n=r.length-1;n>=0;n--){let s=r[n];if(s instanceof St&&s.isReplEval){r=r.slice(0,n+1);break}}let i=r.map(e);return(await Promise.all(i)).join(`
`)+`
`}async toDap(e){let r=e.startFrame||0,i=(e.levels||50)+r,n=await this.loadFrames(i,e.noFuncEval);i=Math.min(n.length,e.levels?i:n.length);let s=[];for(let o=r;o<i;o++)s.push(n[o].toDap(e.format));return{stackFrames:await Promise.all(s),totalFrames:this._asyncStackTraceId?1e6:n.length}}},Rk=sh(),pw=class{constructor(e="async"){this.label=e;this.frameId=Rk()}async toDap(){return{name:this.label,id:0,line:0,column:0,presentationHint:"label"}}async formatAsNative(){return`    --- ${this.label} ---`}async format(){return`\u25C0 ${this.label} \u25B6`}},St=class{constructor(e,r,i,n=!1){this.callFrame=r;this.isAsync=n;this.frameId=Rk();this.completions=Be(async()=>{if(!this._scope)return[];let e=this._thread.pausedVariables();if(!e)return[];let r=[];for(let n=0;n<this._scope.chain.length;n++){let s=this._scopeVariable(n,this._scope);s&&r.push(e.getVariableNames({variablesReference:s.id}).then(o=>o.map(a=>({label:a,type:"property"}))))}let i=await Promise.all(r);return[].concat(...i)});this._name=r.functionName||"<anonymous>",this._rawLocation=i,this.uiLocation=Be(()=>e.rawLocationToUiLocation(i)),this._thread=e;let s=i.scriptId?e.getScriptById(i.scriptId):void 0;this.isReplEval=s?s.url.endsWith(".repl"):!1}get rawPosition(){return new Ou(this._rawLocation.lineNumber,this._rawLocation.columnNumber)}static fromRuntime(e,r,i){return new St(e,r,e.rawLocation(r),i)}static fromDebugger(e,r){let i=new St(e,r,e.rawLocation(r));return i._scope={chain:r.scopeChain,thisObject:r.this,returnValue:r.returnValue,variables:new Array(r.scopeChain.length).fill(void 0),callFrameId:r.callFrameId},i}get canExplicitlyBeRestarted(){return!!this.callFrame.canBeRestarted}equivalentTo(e){return e instanceof St&&e._rawLocation.columnNumber===this._rawLocation.columnNumber&&e._rawLocation.lineNumber===this._rawLocation.lineNumber&&e._rawLocation.scriptId===this._rawLocation.scriptId}callFrameId(){return this._scope?this._scope.callFrameId:void 0}async scopes(){let e=this._scope;if(!e)throw new re(fD());return{scopes:(await Promise.all(e.chain.map(async(i,n)=>{let s="",o;switch(i.type){case"global":s=jr.t("Global");break;case"local":s=jr.t("Local"),o="locals";break;case"with":s=jr.t("With Block"),o="locals";break;case"closure":s=jr.t("Closure"),o="arguments";break;case"catch":s=jr.t("Catch Block"),o="locals";break;case"block":s=jr.t("Block"),o="locals";break;case"script":s=jr.t("Script");break;case"eval":s=jr.t("Eval");break;case"module":s=jr.t("Module");break;default:s=i.type.substr(0,1).toUpperCase()+i.type.substr(1);break}i.name&&i.type==="closure"?s=jr.t("Closure ({0})",i.name):i.name&&(s=`${s}: ${i.name}`);let a=this._scopeVariable(n,e);if(!a)return;let u={name:s,presentationHint:o,expensive:i.type==="global",variablesReference:a.id};if(i.startLocation){let c=this._thread.rawLocation(i.startLocation),l=await this._thread.rawLocationToUiLocation(c);if(u.line=(l||c).lineNumber,u.column=(l||c).columnNumber,l&&(u.source=await l.source.toDap()),i.endLocation){let p=this._thread.rawLocation(i.endLocation),f=await this._thread.rawLocationToUiLocation(p);u.endLine=(f||p).lineNumber,u.endColumn=(f||p).columnNumber}}return u}))).filter(vt)}}async toDap(e){let r=await this.uiLocation(),i=r?await r.source.toDap():void 0,n=await lw(this),s=n?"deemphasize":"normal";n&&i&&(i.origin=n===1?jr.t("Skipped by smartStep"):jr.t("Skipped by skipFiles"));let o=(r||this._rawLocation).lineNumber,a=(r||this._rawLocation).columnNumber,u=this._name;return i&&e&&(e.module&&(u+=` [${i.name}]`),e.line&&(u+=` Line ${o}`)),{id:this.frameId,name:u,line:o,column:a,source:i,presentationHint:s,canRestart:this.callFrame.canBeRestarted??!this.isAsync}}async formatAsNative(){let e=await this.uiLocation(),r=await(e==null?void 0:e.source.existingAbsolutePath())||await(e==null?void 0:e.source.prettyName())||this.callFrame.url,{lineNumber:i,columnNumber:n}=e||this._rawLocation;return`    at ${this._name} (${r}:${i}:${n})`}async format(){let e=await this.uiLocation(),r=await(e==null?void 0:e.source.prettyName())||"<unknown>",i=e||this._rawLocation,n=`${this._name} @ ${r}:${i.lineNumber}`;return i.columnNumber>1&&(n+=`:${i.columnNumber}`),n}_scopeVariable(e,r){let i=r.variables[e];if(i)return i;let n={stackFrame:this,callFrameId:r.callFrameId,scopeNumber:e},s=[];e===0&&(r.thisObject&&s.push({name:"this",value:r.thisObject}),r.returnValue&&s.push({name:jr.t("Return value"),value:r.returnValue}));let o=this._thread.pausedVariables();if(!o)return;let a=o.createScope(r.chain[e].object,n,s);return r.variables[e]=a}};var Ok=F(Ct());var Ya=class{constructor(e){this.event=e;this.stackTrace=Be(e=>this.event.stackTrace?ri.fromRuntime(e,this.event.stackTrace):void 0);this.getUiLocation=Be(async e=>{let r=this.stackTrace(e);if(!r)return;let i;for(let n of r.frames){if(!(n instanceof St))continue;let s=await n.uiLocation();if(s&&(i||(i=s),!s.source.blackboxed()))return{source:await s.source.toDap(),line:s.lineNumber,column:s.columnNumber}}if(i)return{source:await i.source.toDap(),line:i.lineNumber,column:i.columnNumber}})}formatDefaultString(e,r,i=!1){let s=r.length>1&&r[0].type==="string"?j0(r[0].value,r.slice(1),G0):j0("",r,G0),o=s.result+`
`;return s.usedAllSubs&&!r.some(Ga)?{output:o}:this.formatComplexStringOutput(e,o,r,i)}async formatComplexStringOutput(e,r,i,n){(i.some(o=>o.subtype==="error")||xo.isStackLike(r))&&(await this.getUiLocation(e),r=await e.replacePathsInStackTrace(r),n=!0);let s=e.replVariables.createVariableForOutput(r,i,n?this.stackTrace(e):void 0);return{output:r,variablesReference:s.id}}},BH=class extends Ya{async toDap(e){var r;return((r=this.event.args[0])==null?void 0:r.value)==="console.assert"&&(this.event.args[0].value=Ok.t("Assertion failed")),{category:"stderr",...await this.formatDefaultString(e,this.event.args,!0),...await this.getUiLocation(e)}}},Qa=class extends Ya{constructor(r,i,n){super(r);this.includeStack=i;this.category=n}async toDap(r){return{category:this.category,...await this.formatDefaultString(r,this.event.args,this.includeStack),...await this.getUiLocation(r)}}},$o=class extends Qa{constructor(e){super(e,!1,"stdout")}},FH=class extends Qa{constructor(e){super(e,!0,"stdout")}},UH=class extends Qa{constructor(e){super(e,!0,"stderr")}},jH=class extends Qa{constructor(e){super(e,!0,"stderr")}},qH=class extends Ya{async toDap(e){return{category:"stdout",group:this.event.type==="startGroupCollapsed"?"startCollapsed":"start",...await this.formatDefaultString(e,this.event.args),...await this.getUiLocation(e)}}},WH=class extends Qa{constructor(e){super(e,!1,"stdout")}async toDap(e){var r;return(r=this.event.args[0])!=null&&r.preview?{category:"stdout",output:"",variablesReference:e.replVariables.createVariableForOutput("",this.event.args,void 0,this.event.type).id,...await this.getUiLocation(e)}:super.toDap(e)}};var Of=class extends Ya{constructor(){super(...arguments);this.stackTrace=Be(r=>{if(this.event.stackTrace)return ri.fromRuntime(r,this.event.stackTrace);if(this.event.scriptId)return ri.fromRuntime(r,{callFrames:[{functionName:"(program)",lineNumber:this.event.lineNumber,columnNumber:this.event.columnNumber,scriptId:this.event.scriptId,url:this.event.url||""}]})})}async toDap(r){var a;let i=this.event.exception?Xa(this.event.exception):{title:""},n=i.title;n.startsWith("Uncaught")||(n=`Uncaught ${((a=this.event.exception)==null?void 0:a.className)??"Error"} `+n);let s=this.stackTrace(r),o=this.event.exception&&!i.stackTrace?[this.event.exception]:[];return xo.isStackLike(n)?n=await r.replacePathsInStackTrace(n):s&&(n+=`
`+await s.formatAsNative()),{category:"stderr",output:n,variablesReference:s||o.length?r.replVariables.createVariableForOutput(n,o,s).id:void 0,...await this.getUiLocation(r)}}};var VH=Symbol("IConsole");var Za=F(ue()),Fk=w("os"),Uk=w("path");var fw=w("path"),Nk=(0,fw.join)(__dirname,"diagnosticTool.js"),Bk=(0,fw.join)(__dirname,"diagnosticTool.css");var Mo=Symbol("ITarget"),Cr=Symbol("ILauncher");var ko=class{constructor(e,r,i,n){this.fs=e;this.sources=r;this.breakpoints=i;this.target=n}async generateObject(){let[e]=await Promise.all([this.dumpSources()]);return{breakpoints:this.dumpBreakpoints(),sources:e,config:this.target.launchConfig}}async generateHtml(e=(0,Uk.join)((0,Fk.tmpdir)(),"js-debug-diagnostics.html")){return await this.fs.writeFile(e,`<!DOCTYPE html>
      <html lang="en">
      <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>${await this.fs.readFile(Bk,"utf-8")}<</style>
      </head>
      <body>
        <script>window.DUMP=${JSON.stringify(await this.generateObject())}</script>
        <script>${await this.fs.readFile(Nk,"utf-8")}</script>
      </body>
      </html>`),e}dumpBreakpoints(){let e=[];for(let r of[this.breakpoints.appliedByPath,this.breakpoints.appliedByRef])for(let i of r.values())for(let n of i){let s=n.diagnosticDump();e.push({source:s.source,params:s.params,cdp:s.cdp.map(o=>o.state===1?{...o,uiLocations:o.uiLocations.map(a=>this.dumpUiLocation(a))}:{...o,done:void 0})})}return e}dumpSources(){let e=[],r=0;for(let i of this.sources.sources)e.push((async()=>({uniqueId:r++,url:i.url,sourceReference:i.sourceReference,absolutePath:i.absolutePath,actualAbsolutePath:await i.existingAbsolutePath(),scriptIds:i.scripts.map(n=>n.scriptId),prettyName:await i.prettyName(),compiledSourceRefToUrl:i instanceof Bt?[...i.compiledToSourceUrl.entries()].map(([n,s])=>[n.sourceReference,s]):void 0,sourceMap:i.sourceMap&&{url:i.sourceMap.url,metadata:i.sourceMap.metadata,sources:as(Object.fromEntries(i.sourceMap.sourceByUrl),n=>n.sourceReference)}}))());return Promise.all(e)}dumpUiLocation(e){return{lineNumber:e.lineNumber,columnNumber:e.columnNumber,sourceReference:e.source.sourceReference}}};ko=X([(0,Za.injectable)(),x(0,(0,Za.inject)(nt)),x(1,(0,Za.inject)(zt)),x(2,(0,Za.inject)(vi)),x(3,(0,Za.inject)(Mo))],ko);var Ro=F(ue());var il=Symbol("IExceptionPauseService");var rl=class{constructor(e,r,i,n,s){this.evaluator=e;this.scriptSkipper=r;this.dap=i;this.sourceContainer=s;this.state={cdp:"none"};this.blocker=Xe();this.noDebug=!!n.noDebug,this.breakOnError=n.__breakOnConditionalError,this.blocker.resolve()}get launchBlocker(){return this.blocker.promise}async setBreakpoints(e){if(!this.noDebug){try{this.state=this.parseBreakpointRequest(e)}catch(r){if(!(r instanceof re))throw r;this.dap.output({category:"stderr",output:r.message});return}this.cdp?await this.sendToCdp(this.cdp):this.state.cdp!=="none"&&this.blocker.hasSettled()&&(this.blocker=Xe())}}async shouldPauseAt(e){var i;if(e.reason!=="exception"&&e.reason!=="promiseRejection"||this.state.cdp==="none"||this.shouldScriptSkip(e))return!1;let r=this.state.condition;if((i=e.data)!=null&&i.uncaught){if(r.uncaught&&!await this.evalCondition(e,r.uncaught))return!1}else if(r.caught&&!await this.evalCondition(e,r.caught))return!1;return!0}async apply(e){this.cdp=e,this.state.cdp!=="none"&&await this.sendToCdp(e)}async sendToCdp(e){await e.Debugger.setPauseOnExceptions({state:this.state.cdp}),this.blocker.resolve()}async evalCondition(e,r){let i=await r({callFrameId:e.callFrames[0].callFrameId},{error:e.data});return!!(i!=null&&i.result.value)}shouldScriptSkip(e){var i;if((i=e.data)!=null&&i.uncaught||!e.callFrames.length)return!1;let r=this.sourceContainer.getScriptById(e.callFrames[0].location.scriptId);return!!r&&this.scriptSkipper.isScriptSkipped(r.url)}parseBreakpointRequest(e){let r=(e.filterOptions??[]).concat(e.filters.map(a=>({filterId:a}))),i="none",n=[],s=[];for(let{filterId:a,condition:u}of r)a==="all"?(i="all",u&&n.push(a)):a==="uncaught"&&(i==="none"&&(i="uncaught"),u&&s.push(a));let o=a=>{if(a.length===0)return;let u="!!("+r.map(p=>p.condition).filter(vt).join(") || !!(")+")",c=ao(u);if(c)throw new re(ro({line:0,condition:u},c.message));let l=this.breakOnError?J_(u):u;return this.evaluator.prepare(l,{hoist:["error"]}).invoke};return i==="none"?{cdp:i}:{cdp:i,condition:{caught:o(n),uncaught:o(s)}}}};rl=X([(0,Ro.injectable)(),x(0,(0,Ro.inject)(gi)),x(1,(0,Ro.inject)(Ho)),x(2,(0,Ro.inject)(di)),x(3,(0,Ro.inject)(Fe)),x(4,(0,Ro.inject)(zt))],rl);var XH=F(ue());var GH=class{constructor(){this.didEnable=new WeakSet}async retrieve(e){this.didEnable.has(e)||(this.didEnable.add(e),await e.Performance.enable({}));let r=await e.Performance.getMetrics({});if(!r)return{error:"Error in CDP"};let i={};for(let n of r.metrics)i[n.name]=n.value;return{metrics:i}}};var KH=class{async retrieve(e){let r=await e.Runtime.evaluate({expression:`({
        memory: process.memoryUsage(),
        cpu: process.cpuUsage(),
        timestamp: Date.now(),
        resourceUsage: process.resourceUsage && process.resourceUsage(),
      })${Ht()}`,returnByValue:!0});return r?r.exceptionDetails?{error:r.exceptionDetails.text}:{metrics:r.result.value}:{error:"No response from CDP"}}};var zH=Symbol("IPerformanceProvider"),eu=class{constructor(e){this.target=e}create(){return this.target.type()==="node"?new KH:new GH}};eu=X([(0,XH.injectable)(),x(0,(0,XH.inject)(Mo))],eu);var yw=F(Ct()),Vk=w("crypto"),Oo=F(ue()),Gk=w("os"),Kk=w("path");var QH=F(ue());var dw=F(Ct()),tu=F(ue()),JH=w("path");var nl=class{constructor(e){this.sources=e;this.locationIdCounter=0;this.locationsByRef=new Map}getLocationIdFor(e){let r=[e.functionName,e.url,e.scriptId,e.lineNumber,e.columnNumber].join(":"),i=this.locationsByRef.get(r);if(i)return i.id;let n=this.locationIdCounter++;return this.locationsByRef.set(r,{id:n,callFrame:e,locations:(async()=>{var o;let s=await((o=this.sources.getScriptById(e.scriptId))==null?void 0:o.source);return s?Promise.all(this.sources.currentSiblingUiLocations({lineNumber:e.lineNumber+1,columnNumber:e.columnNumber+1,source:s}).map(async a=>({...a,source:await a.source.toDapShallow()}))):[]})()}),n}getLocations(){return Promise.all([...this.locationsByRef.values()].sort((e,r)=>e.id-r.id).map(async e=>({callFrame:e.callFrame,locations:await e.locations})))}};var Qt=class{constructor(e,r,i,n){this.cdp=e;this.fs=r;this.sources=i;this.launchConfig=n}static canApplyTo(){return!0}async start(e,r){if(!await this.cdp.Profiler.start({}))throw new re(ac());return new hw(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,r)}async save(e,r){let i=await jk(e,this.sources,this.launchConfig.__workspaceFolder);(0,JH.isAbsolute)(r)||(r=(0,JH.join)(this.launchConfig.__workspaceFolder,r)),await this.fs.writeFile(r,JSON.stringify(i))}};Qt.type="cpu",Qt.extension=".cpuprofile",Qt.label=dw.t("CPU Profile"),Qt.description=dw.t("Generates a .cpuprofile file you can open in the Chrome devtools"),Qt.editable=!0,Qt=X([(0,tu.injectable)(),x(0,(0,tu.inject)(gt)),x(1,(0,tu.inject)(nt)),x(2,(0,tu.inject)(zt)),x(3,(0,tu.inject)(Fe))],Qt);var hw=class{constructor(e,r,i,n,s){this.cdp=e;this.fs=r;this.sources=i;this.workspaceFolder=n;this.file=s;this.stopEmitter=new J;this.disposed=!1;this.onUpdate=new J().event;this.onStop=this.stopEmitter.event}async dispose(){this.disposed||(this.disposed=!0,this.stopEmitter.fire())}async stop(){let e=await this.cdp.Profiler.stop({});if(!e)throw new re(ac());await this.dispose();let r=await jk(e.profile,this.sources,this.workspaceFolder);await this.fs.writeFile(this.file,JSON.stringify(r))}};async function jk(t,e,r){let i=new nl(e),n=t.nodes.map(s=>{var o;return{...s,locationId:i.getLocationIdFor(s.callFrame),positionTicks:(o=s.positionTicks)==null?void 0:o.map(a=>({...a,startLocationId:i.getLocationIdFor({...s.callFrame,lineNumber:a.line-1,columnNumber:0}),endLocationId:i.getLocationIdFor({...s.callFrame,lineNumber:a.line,columnNumber:0})}))}});return{...t,nodes:n,$vscode:{rootPath:r,locations:await i.getLocations()}}}var mw=F(Ct()),ru=F(ue());var ii=class{constructor(e,r,i,n){this.cdp=e;this.fs=r;this.sources=i;this.launchConfig=n}static canApplyTo(){return!0}async start(e,r){if(await this.cdp.HeapProfiler.enable({}),!await this.cdp.HeapProfiler.startSampling({}))throw new re(ac());return new Hw(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,r)}};ii.type="heap",ii.extension=".heapprofile",ii.label=mw.t("Heap Profile"),ii.description=mw.t("Generates a .heapprofile file you can open in the Chrome devtools"),ii.editable=!0,ii=X([(0,ru.injectable)(),x(0,(0,ru.inject)(gt)),x(1,(0,ru.inject)(nt)),x(2,(0,ru.inject)(zt)),x(3,(0,ru.inject)(Fe))],ii);var Hw=class{constructor(e,r,i,n,s){this.cdp=e;this.fs=r;this.sources=i;this.workspaceFolder=n;this.file=s;this.stopEmitter=new J;this.disposed=!1;this.onUpdate=new J().event;this.onStop=this.stopEmitter.event}async dispose(){this.disposed||(this.disposed=!0,await this.cdp.HeapProfiler.disable({}),this.stopEmitter.fire())}async stop(){let e=await this.cdp.HeapProfiler.stopSampling({});if(!e)throw new re(ac());await this.dispose();let r=await this.annotateSources(e.profile);await this.fs.writeFile(this.file,JSON.stringify(r))}async annotateSources(e){let r=new nl(this.sources),i=(s,o)=>{o.locationId=r.getLocationIdFor(s.callFrame);for(let a of s.children){let u={...a,children:[]};o.children.push(u),i(a,u)}},n={...e.head,children:[]};return i(e.head,n),{...e,head:n,$vscode:{rootPath:this.workspaceFolder,locations:await r.getLocations()}}}};var gw=F(Ct()),qk=w("fs"),YH=F(ue());var ni=class{constructor(e){this.cdp=e;this.cdp.HeapProfiler.on("addHeapSnapshotChunk",({chunk:r})=>{var i;return(i=this.currentWriter)==null?void 0:i.stream.write(r)})}static canApplyTo(){return!0}async start(e,r){return{onStop:new J().event,onUpdate:new J().event,dispose:()=>{},stop:async()=>{await this.cdp.HeapProfiler.enable({}),await this.dumpToFile(r),await this.cdp.HeapProfiler.disable({})}}}async dumpToFile(e){let{stream:r,promise:i}=this.currentWriter={stream:(0,qk.createWriteStream)(e),promise:this.cdp.HeapProfiler.takeHeapSnapshot({})};await i,r.end(),this.currentWriter=void 0}};ni.type="memory",ni.extension=".heapsnapshot",ni.label=gw.t("Heap Snapshot"),ni.description=gw.t("Generates a .heapsnapshot file you can open in the Chrome devtools"),ni.instant=!0,ni=X([(0,YH.injectable)(),x(0,(0,YH.inject)(gt))],ni);var ZH=Symbol("IProfilerFactory"),Wk=()=>{let t=new Date;return["vscode-profile",t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].map(e=>String(e).padStart(2,"0")).join("-")},ws=class{constructor(e){this.container=e}get(e){let r=ws.ctors.find(i=>i.type===e);if(!r)throw new Error(`Invalid profilter type ${e}`);return this.container.get(r)}};ws.ctors=[Qt,ii,ni],ws=X([(0,QH.injectable)(),x(0,(0,QH.inject)(wc))],ws);var eg=Symbol("IProfileController"),sl=class{constructor(e,r,i,n,s){this.cdp=e;this.factory=r;this.basicCpuProfiler=i;this.breakpoints=n;this.shutdown=s;this.seenConsoleProfileNames=Object.create(null)}connect(e,r){e.on("startProfile",async i=>(await this.start(e,r,i),{})),e.on("stopProfile",()=>this.stopProfiling(e)),this.cdp.Profiler.on("consoleProfileStarted",()=>{e.output({output:yw.t("Console profile started")+`
`,category:"console"})}),this.cdp.Profiler.on("consoleProfileFinished",async i=>{let n=this.saveConsoleProfile(e,i),s=this.shutdown.register(0,()=>n);await n,s.dispose()}),r.onPaused(()=>this.stopProfiling(e))}async start(e,r,i){if(this.profile)throw new re(cD());this.profile=this.startProfileInner(e,r,i).catch(n=>{throw this.profile=void 0,n}),await this.profile}async saveConsoleProfile(e,r){var n;let i;if(r.title){i=(n=r.title)==null?void 0:n.replace(/[\/\\]/g,"-");let s=this.seenConsoleProfileNames[r.title]||0;this.seenConsoleProfileNames[r.title]=s+1,s>0&&(i+=`-${s}`)}else i=Wk();i+=Qt.extension,await this.basicCpuProfiler.save(r.profile,i),e.output({output:yw.t('CPU profile saved as "{0}" in your workspace folder',i)+`
`,category:"console"})}async startProfileInner(e,r,i){var l;let n=!1,s;if((l=i.stopAtBreakpoint)!=null&&l.length){let p=new Set(i.stopAtBreakpoint);n=!0,s=f=>!(f instanceof yi)||p.has(f.dapId)}else s=()=>!1;await this.breakpoints.applyEnabledFilter(s);let o=(0,Kk.join)((0,Gk.tmpdir)(),`vscode-js-profile-${(0,Vk.randomBytes)(4).toString("hex")}`),a=await this.factory.get(i.type).start(i,o),u={file:o,profile:a,enableFilter:s,keptDebuggerOn:n};a.onUpdate(p=>e.profilerStateUpdate({label:p,running:!0})),a.onStop(()=>this.disposeProfile(u));let c=!!r.pausedDetails();return n?await r.resume():c&&(await this.cdp.Debugger.disable({}),c&&r.onResumed()),e.profileStarted({file:u.file,type:i.type}),u}async stopProfiling(e){var i;let r=await((i=this.profile)==null?void 0:i.catch(()=>{}));return!r||!this.profile?{}:(this.profile=void 0,await(r==null?void 0:r.profile.stop()),e.profilerStateUpdate({label:"",running:!1}),{})}async disposeProfile({profile:e,enableFilter:r,keptDebuggerOn:i}){i||await this.cdp.Debugger.enable({}),await this.breakpoints.applyEnabledFilter(void 0,r),e.dispose()}};sl=X([(0,Oo.injectable)(),x(0,(0,Oo.inject)(gt)),x(1,(0,Oo.inject)(ZH)),x(2,(0,Oo.inject)(Qt)),x(3,(0,Oo.inject)(vi)),x(4,(0,Oo.inject)(vo))],sl);var As=class{constructor(e,r,i,n){this.asyncStackPolicy=r;this.launchConfig=i;this._services=n;this._disposables=new Je;this._customBreakpoints=new Set;this._threadDeferred=Xe();this.breakpointIdCounter=sh();this._cdpProxyProvider=this._services.get(IH);this._configurationDoneDeferred=Xe(),this.sourceContainer=n.get(zt),this.breakpointManager=n.get(vi);let s=n.get(zH),o=n.get(Er);o.onFlush(()=>{o.report("breakpointStats",this.breakpointManager.statisticsForTelemetry()),o.report("statistics",this.sourceContainer.statistics())}),this.dap=e,this.dap.on("initialize",a=>this.onInitialize(a)),this.dap.on("setBreakpoints",a=>this._onSetBreakpoints(a)),this.dap.on("setExceptionBreakpoints",a=>this.setExceptionBreakpoints(a)),this.dap.on("configurationDone",()=>this.configurationDone()),this.dap.on("loadedSources",()=>this._onLoadedSources()),this.dap.on("disableSourcemap",a=>this._onDisableSourcemap(a)),this.dap.on("source",a=>this._onSource(a)),this.dap.on("threads",()=>this._onThreads()),this.dap.on("stackTrace",a=>this._withThread(u=>u.stackTrace(a))),this.dap.on("variables",a=>this._onVariables(a)),this.dap.on("readMemory",a=>this._onReadMemory(a)),this.dap.on("writeMemory",a=>this._onWriteMemory(a)),this.dap.on("setVariable",a=>this._onSetVariable(a)),this.dap.on("setExpression",a=>this._onSetExpression(a)),this.dap.on("continue",()=>this._withThread(a=>a.resume())),this.dap.on("pause",()=>this._withThread(a=>a.pause())),this.dap.on("next",()=>this._withThread(a=>a.stepOver())),this.dap.on("stepIn",a=>this._withThread(u=>u.stepInto(a.targetId))),this.dap.on("stepOut",()=>this._withThread(a=>a.stepOut())),this.dap.on("restartFrame",a=>this._withThread(u=>u.restartFrame(a))),this.dap.on("scopes",a=>this._withThread(u=>u.scopes(a))),this.dap.on("evaluate",a=>this.onEvaluate(a)),this.dap.on("completions",a=>this._withThread(u=>u.completions(a))),this.dap.on("exceptionInfo",()=>this._withThread(a=>a.exceptionInfo())),this.dap.on("enableCustomBreakpoints",a=>this.enableCustomBreakpoints(a)),this.dap.on("toggleSkipFileStatus",a=>this._toggleSkipFileStatus(a)),this.dap.on("disableCustomBreakpoints",a=>this._disableCustomBreakpoints(a)),this.dap.on("prettyPrintSource",a=>this._prettyPrintSource(a)),this.dap.on("revealPage",()=>this._withThread(a=>a.revealPage())),this.dap.on("getPerformance",()=>this._withThread(a=>s.retrieve(a.cdp()))),this.dap.on("breakpointLocations",a=>this._breakpointLocations(a)),this.dap.on("createDiagnostics",a=>this._dumpDiagnostics(a)),this.dap.on("requestCDPProxy",()=>this._requestCDPProxy()),this.dap.on("setExcludedCallers",a=>this._onSetExcludedCallers(a)),this.dap.on("saveDiagnosticLogs",({toFile:a})=>this._saveDiagnosticLogs(a)),this.dap.on("setSourceMapStepping",a=>this._setSourceMapStepping(a)),this.dap.on("stepInTargets",a=>this._stepInTargets(a)),this.dap.on("setDebuggerProperty",a=>this._setDebuggerProperty(a)),this.dap.on("setSymbolOptions",a=>this._setSymbolOptions(a))}_setDebuggerProperty(e){var r;return(r=this._thread)==null||r.cdp().DotnetDebugger.setDebuggerProperty(e),Promise.resolve({})}_setSymbolOptions(e){var r;return(r=this._thread)==null||r.cdp().DotnetDebugger.setSymbolOptions(e),Promise.resolve({})}_breakpointLocations(e){return this._withThread(async r=>{let i=this.sourceContainer.source(e.source);return i?{breakpoints:(await this.breakpointManager.getBreakpointLocations(r,i,new Kr(e.line,e.column||1),new Kr(e.endLine||e.line+1,e.endColumn||e.column||1))).map(s=>s.uiLocations.find(o=>o.source===i)).filter(vt).map(s=>({line:s.lineNumber,column:s.columnNumber}))}:{breakpoints:[]}})}_stepInTargets(e){return this._withThread(async r=>({targets:await r.getStepInTargets(e.frameId)}))}_setSourceMapStepping({enabled:e}){return this.sourceContainer.doSourceMappedStepping=e,Promise.resolve({})}async _saveDiagnosticLogs(e){let r=this._services.get(pe).getRecentLogs();return await this._services.get(nt).writeFile(e,r.map(i=>JSON.stringify(i)).join(`
`)),{}}async launchBlocker(){await this._configurationDoneDeferred.promise,await this._services.get(il).launchBlocker,await this.breakpointManager.launchBlocker()}async _onSetExcludedCallers({callers:e}){return(await this._threadDeferred.promise).setExcludedCallers(e),{}}async onInitialize(e){console.assert(e.linesStartAt1),console.assert(e.columnsStartAt1);let r=As.capabilities(!0);return setTimeout(()=>this.dap.initialized({}),0),setTimeout(()=>{var i;return(i=this._thread)==null?void 0:i.dapInitialized()},0),r}static capabilities(e=!1){return{supportsConfigurationDoneRequest:!0,supportsFunctionBreakpoints:!1,supportsConditionalBreakpoints:!0,supportsHitConditionalBreakpoints:!0,supportsEvaluateForHovers:!0,supportsReadMemoryRequest:!0,supportsWriteMemoryRequest:!0,exceptionBreakpointFilters:[{filter:"all",label:Ii.t("Caught Exceptions"),default:!1,supportsCondition:!0,description:Ii.t("Breaks on all throw errors, even if they're caught later."),conditionDescription:'error.name == "MyError"'},{filter:"uncaught",label:Ii.t("Uncaught Exceptions"),default:!1,supportsCondition:!0,description:Ii.t("Breaks only on errors or promise rejections that are not handled."),conditionDescription:'error.name == "MyError"'}],supportsStepBack:!1,supportsSetVariable:!0,supportsRestartFrame:!0,supportsGotoTargetsRequest:!1,supportsStepInTargetsRequest:!0,supportsCompletionsRequest:!0,supportsModulesRequest:!1,additionalModuleColumns:[],supportedChecksumAlgorithms:[],supportsRestartRequest:!0,supportsExceptionOptions:!1,supportsValueFormattingOptions:!0,supportsExceptionInfoRequest:!0,supportTerminateDebuggee:!1,supportsDelayedStackTraceLoading:!0,supportsLoadedSourcesRequest:!0,supportsLogPoints:!0,supportsTerminateThreadsRequest:!1,supportsSetExpression:!0,supportsTerminateRequest:!1,completionTriggerCharacters:[".","[",'"',"'"],supportsBreakpointLocationsRequest:!0,supportsClipboardContext:!0,supportsExceptionFilterOptions:!0,supportsEvaluationOptions:!!e,supportsDebuggerProperties:!!e,supportsSetSymbolOptions:!!e}}async _onSetBreakpoints(e){var r;return this.breakpointManager.setBreakpoints(e,((r=e.breakpoints)==null?void 0:r.map(()=>this.breakpointIdCounter()))??[])}async setExceptionBreakpoints(e){return await this._services.get(il).setBreakpoints(e),{}}async configurationDone(){return this._configurationDoneDeferred.resolve(),{}}async _onLoadedSources(){return{sources:await this.sourceContainer.loadedSources()}}async _onDisableSourcemap(e){var i;let r=this.sourceContainer.source(e.source);if(!r)return Qe(Ii.t("Source not found"));if(!(r instanceof Bt))return Qe(Ii.t("Source not a source map"));for(let n of r.compiledToSourceUrl.keys())this.sourceContainer.disableSourceMapForSource(n,!0);return await((i=this._thread)==null?void 0:i.refreshStackTrace()),{}}async _onSource(e){e.source||(e.source={sourceReference:e.sourceReference}),e.source.path=Gi(e.source.path);let r=this.sourceContainer.source(e.source);if(!r)return Qe(Ii.t("Source not found"));let i=await r.content();return i===void 0?(r instanceof Bt&&this.dap.suggestDisableSourcemap({source:e.source}),Qe(Ii.t("Unable to retrieve source content"))):{content:i,mimeType:r.getSuggestedMimeType}}async _onThreads(){let e=[];return this._thread&&e.push({id:this._thread.id,name:this._thread.name()}),{threads:e}}findVariableStore(e){if(!this._thread)return;let r=this._thread.pausedVariables();if(r&&e(r))return r;if(e(this._thread.replVariables))return this._thread.replVariables}async _onVariables(e){let r=this.findVariableStore(i=>i.hasVariable(e.variablesReference));return{variables:await(r==null?void 0:r.getVariables(e))??[]}}async _onReadMemory(e){var n;let r=e.memoryReference,i=await((n=this.findVariableStore(s=>s.hasMemory(r)))==null?void 0:n.readMemory(r,e.offset??0,e.count));return i?{address:"0",data:i.toString("base64"),unreadableBytes:e.count-i.length}:{address:"0",unreadableBytes:e.count}}async _onWriteMemory(e){var n;let r=e.memoryReference;return{bytesWritten:await((n=this.findVariableStore(s=>s.hasMemory(r)))==null?void 0:n.writeMemory(r,e.offset??0,Buffer.from(e.data,"base64")))}}async _onSetExpression(e){if(!this._thread)throw new re(f_());let r=await this._thread.evaluate({expression:`${e.expression} = ${Qp(e.value)}`,context:"repl",frameId:e.frameId});return{value:r.result,variablesReference:r.variablesReference,indexedVariables:r.indexedVariables,namedVariables:r.namedVariables,presentationHint:r.presentationHint,type:r.type}}async _onSetVariable(e){let r=this.findVariableStore(i=>i.hasVariable(e.variablesReference));return r?(e.value=Qp(e.value.trim()),r.setVariable(e)):Qe(Ii.t("Variable not found"))}_withThread(e){if(!this._thread)throw new re(f_());return e(this._thread)}async _refreshStackTrace(){if(!this._thread)return;this._thread.pausedDetails()&&await this._thread.refreshStackTrace()}createThread(e,r){this._thread=new Do(this.sourceContainer,e,this.dap,r,this._services.get(bo),this._services.get(pe),this._services.get(gi),this._services.get(SH),this.launchConfig,this.breakpointManager,this._services.get(VH),this._services.get(il),this._services.get(To),this._services.get(vo));let i=this._services.get(eg);i.connect(this.dap,this._thread),"profileStartup"in this.launchConfig&&this.launchConfig.profileStartup&&i.start(this.dap,this._thread,{type:Qt.type});for(let n of this._customBreakpoints)this._thread.updateCustomBreakpoint(n,!0);return this.asyncStackPolicy.connect(e).then(n=>this._disposables.push(n)).catch(n=>this._services.get(pe).error("internal","Error enabling async stacks",n)),this.breakpointManager.setThread(this._thread),this._services.get(ht).attach(e),this._threadDeferred.resolve(this._thread),this._thread}async enableCustomBreakpoints(e){let r=[];for(let i of e.ids)this._customBreakpoints.add(i),this._thread&&r.push(this._thread.updateCustomBreakpoint(i,!0));return await Promise.all(r),{}}async _disableCustomBreakpoints(e){let r=[];for(let i of e.ids)this._customBreakpoints.delete(i),this._thread&&r.push(this._thread.updateCustomBreakpoint(i,!1));return await Promise.all(r),{}}async _toggleSkipFileStatus(e){return await this._services.get(Ho).toggleSkippingFile(e),await this._refreshStackTrace(),{}}async _prettyPrintSource(e){if(!e.source)return{canPrettyPrint:!1};e.source.path=Gi(e.source.path);let r=this.sourceContainer.source(e.source);if(!r)return Qe(Ii.t("Source not found"));let i=await r.prettyPrint();if(!i)return Qe(Ii.t("Unable to pretty print"));let{map:n,source:s}=i;return this.breakpointManager.moveBreakpoints(r,n,s),this.sourceContainer.clearDisabledSourceMaps(r),await this._refreshStackTrace(),{}}onEvaluate(e){return e.expression===".scripts"?this._dumpDiagnostics({fromSuggestion:!1}).then(this.dap.openDiagnosticTool).then(()=>({result:"Opening diagnostic tool...",variablesReference:0})):this._withThread(r=>r.evaluate(e))}async _dumpDiagnostics(e){let r={file:await this._services.get(ko).generateHtml()};return e.fromSuggestion&&this._services.get(Er).report("diagnosticPrompt",{event:"opened"}),r}async _requestCDPProxy(){return await this._cdpProxyProvider.proxy()}dispose(){this._disposables.dispose(),Vm(this._services)}};var G8=F(Ct()),Db=F(w("os"));var iQ={connect:async()=>Ru},zk=t=>({async connect(e){return await e.Debugger.setAsyncCallStackDepth({maxDepth:t}),Ru}}),nQ=t=>{let e=new J,r=!1,i=()=>{r||(r=!0,e.fire())};return{async connect(n){if(r)return await n.Debugger.setAsyncCallStackDepth({maxDepth:t}),Ru;let s=new Je;return s.push(e.event(()=>{s.dispose(),n.Debugger.setAsyncCallStackDepth({maxDepth:t})}),n.Debugger.on("breakpointResolved",i),n.Debugger.on("paused",o=>{o.reason!=="instrumentation"&&i()})),s}}},Xk=zk(32),Jk=t=>t===!1?iQ:t===!0?Xk:"onAttach"in t?zk(t.onAttach):"onceBreakpointResolved"in t?nQ(t.onceBreakpointResolved):Xk;var Yk=w("inspector"),Qk=w("fs"),tg=class{constructor(e){this.file=e;this.session=new Yk.Session;this.session.connect()}async start(){try{await this.post("Profiler.enable")}catch{}await this.post("Profiler.start")}async stop(){let{profile:e}=await this.post("Profiler.stop");await Qk.promises.writeFile(this.file,JSON.stringify(e))}dispose(){this.session.disconnect()}post(e,r){return new Promise((i,n)=>this.session.post(e,r,(s,o)=>{s?n(s):i(o)}))}};var Bf=Symbol("MutableLaunchConfig"),Zk=t=>{let e=new J;return new Proxy({},{ownKeys(){return Object.keys(t)},get(r,i){switch(i){case"update":return n=>{t=n,e.fire()};case"onChange":return e.event;default:return t[i]}}})};var xb=F(Pw()),O8=F(s_()),Eb=w("fs"),Lb=F(ue());var Uf=F(ue());var Ff=class{toDap(){return{category:"console",output:"\x1B[2J"}}},lg=class{toDap(){return{category:"stdout",output:"",group:"end"}}};var pg=class{constructor(e){this.sink=e;this.q=[];this.disposed=!1;this.onDrainedEmitter=new J;this.onDrained=this.onDrainedEmitter.event}get length(){return this.q.length}enqueue(e){this.disposed||(this.q.push(new Dw(e)),this.q.length===1&&this.process())}dispose(){this.disposed=!0,this.q=[]}async process(){let e=this.q.findIndex(r=>r.value===lR);e===0?await this.q[0].wait:e===-1?(this.sink(cR(this.q)),this.q=[]):(this.sink(cR(this.q.slice(0,e))),this.q=this.q.slice(e)),this.q.length?this.process():this.onDrainedEmitter.fire()}},cR=t=>t.map(e=>e.value).filter(e=>e!==pR),lR=Symbol("unsettled"),pR=Symbol("unsettled"),Dw=class{constructor(e){this.value=lR;e instanceof Promise?this.wait=e.then(r=>{this.value=r},()=>{this.value=pR}):(this.value=e,this.wait=Promise.resolve())}};var CQ=new Set(["group","assert","count"]),al=class{constructor(e,r){this.dap=e;this.isDirty=!1;this.queue=new pg(e=>{for(let r of e)this.dap.output(r)});this.onDrained=this.queue.onDrained;r.register(0,async()=>{this.length&&await new Promise(i=>this.onDrained(i)),this.dispose()})}get length(){return this.queue.length}dispose(){this.queue.dispose()}dispatch(e,r){let i=this.parse(r);i&&this.enqueue(e,i)}enqueue(e,r){if(!(r instanceof Ff))this.isDirty=!0;else if(this.isDirty)this.isDirty=!1;else return;this.queue.enqueue(r.toDap(e))}parse(e){var r;if(e.type==="log"){let i=(r=e.stackTrace)==null?void 0:r.callFrames[0];if(i&&i.url==="internal/console/constructor.js"&&CQ.has(i.functionName))return}switch(e.type){case"clear":return new Ff;case"endGroup":return new lg;case"assert":return new BH(e);case"table":return new WH(e);case"startGroup":case"startGroupCollapsed":return new qH(e);case"debug":case"log":case"info":return new $o(e);case"trace":return new FH(e);case"error":return new jH(e);case"warning":return new UH(e);case"dir":case"dirxml":return new $o(e);case"count":return new $o(e);case"profile":case"profileEnd":return new $o(e);case"timeEnd":return new $o(e);default:try{ih(e.type,"unknown console message type")}catch{}}}};al=X([(0,Uf.injectable)(),x(0,(0,Uf.inject)(di)),x(1,(0,Uf.inject)(vo))],al);var dR=F(ue());var fR=(t,e,r)=>{e=e.toLowerCase();let i=t==null?void 0:t[e];return{...t,[e]:i?i instanceof Array?i.concat(r):[i,r]:r}};var No=class{constructor(){this.cdp=[]}attach(e){return this.cdp.push({cdp:e,enabledNetwork:!1}),{dispose:()=>{this.cdp=this.cdp.filter(r=>r.cdp!==e)}}}async apply(e,r){let i=this.cdp[0];return i&&(r=await this.applyCookies(i,e,r)),r}async applyCookies(e,r,i){var s;e.enabledNetwork||(e.enabledNetwork=!0,await e.cdp.Network.enable({}));let n=await e.cdp.Network.getCookies({urls:[r]});return(s=n==null?void 0:n.cookies)!=null&&s.length?fR(i,"Cookie",n.cookies.sort((o,a)=>o.path.length-a.path.length).map(o=>`${o.name}=${o.value}`).join("; ")):i}};No=X([(0,dR.injectable)()],No);var Kn=F(ue());var NN=F(mR()),BN=w("dns"),Ug=F(ON()),ou=F(ue());var Fg=Symbol("IRequestOptionsProvider");var qo=class{constructor(e,r){this.fs=e;this.options=r}async fetch(e,r=xr,i){try{let s=(0,NN.default)(e);return{ok:!0,url:e,body:s.toString("utf-8"),statusCode:200}}catch{}let n=fr(e)?e:st(e);if(n)try{return{ok:!0,url:e,body:await this.fs.readFile(n,"utf-8"),statusCode:200}}catch(s){return{ok:!1,url:e,error:s,statusCode:200}}return this.fetchHttp(e,r,i)}async fetchJson(e,r,i){let n=await this.fetch(e,r,{Accept:"application/json",...i});if(!n.ok)return n;try{return{...n,body:JSON.parse(n.body)}}catch(s){return{...n,ok:!1,url:e,error:s}}}async fetchHttp(e,r,i){var u;let n=new URL(e),s=n.protocol!=="http:",o={headers:i,followRedirect:!0};s&&await bc(e)&&(o.rejectUnauthorized=!1),(u=this.options)==null||u.provideOptions(o,e);let a=await this.requestHttp(e,o,r);if(a.statusCode===503&&n.hostname==="localhost"){let c;try{c=await BN.promises.lookup(n.hostname)}catch{return a}return n.hostname=c.family===6?"127.0.0.1":"[::1]",this.requestHttp(n.toString(),o,r)}return a}async requestHttp(e,r,i){var s,o,a;(s=this.options)==null||s.provideOptions(r,e);let n=new Je;try{let u=(0,Ug.default)(e,r);n.push(i.onCancellationRequested(()=>u.cancel()));let c=await u;return{ok:!0,url:e,body:c.body,statusCode:c.statusCode}}catch(u){if(!(u instanceof Ug.RequestError))throw u;let c=u.response?String((o=u.response)==null?void 0:o.body):u.message,l=((a=u.response)==null?void 0:a.statusCode)??503;return{ok:!1,body:c,statusCode:l,url:e,error:new mm(l,e,c)}}finally{n.dispose()}}};qo=X([(0,ou.injectable)(),x(0,(0,ou.inject)(nt)),x(1,(0,ou.optional)()),x(1,(0,ou.inject)(Fg))],qo);var au=class extends qo{constructor(r,i,n,s){super(r,s);this.state=i;this.disposables=new Je;n&&this.disposables.push(this.state.attach(n))}dispose(){this.disposables.dispose()}async fetchHttp(r,i,n={}){let s=await super.fetchHttp(r,i,n);if(!s.ok){let o=await this.state.apply(r,n);if(o!==n)return await super.fetchHttp(r,i,o)}return s}};au=X([(0,Kn.injectable)(),x(0,(0,Kn.inject)(nt)),x(1,(0,Kn.inject)(No)),x(2,(0,Kn.optional)()),x(2,(0,Kn.inject)(gt)),x(3,(0,Kn.optional)()),x(3,(0,Kn.inject)(Fg))],au);var Vo=F(ue()),jN=F(yf());var Wo="node:";function UN(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("!")){let n=FN(i.slice(1));for(let s=0;s<e.length;s++)e[s]=`^(?!${n.slice(1)})${e[s].slice(1)}`}else e.push(FN(i))}return e.map(r=>new RegExp(r,"i"))}function FN(t){let e=t.split("/"),r=[];for(let i=0;i<e.length;i++){let n=e[i];if(n==="**")i===0?r.push("(.+/)?"):i===e.length-1||r.push(".*/");else{if(n.includes("*")){let s=n.split("*");r.push(s.map(o=>Ar(o)).join("[^\\/]*"))}else r.push(Ar(n));r.push(i<e.length-1?"\\/":"$")}}return`^${r.join("")}`}function $te(t){let e=/^<node_internals>[\/\\](.*)$/,r=t.map(i=>{i=i.trim();let n=e.exec(i);return n?n[1]:null}).filter(vt);return r.length>0?r:void 0}function Mte(t,e){return e.filter(i=>!i.includes("<node_internals>")).map(i=>fr(i)?qm(t.rebaseLocalToRemote(i)):Ye(i)).map(Bm)}var Xn=class{constructor({skipFiles:e},r,i,n,s){this.logger=i;this.cdp=n;this._regexForAuthored=kE(UN);this._scriptsWithSkipping=new Set;this._targetId=s.id(),this._rootTargetId=qN(s).id(),this._isUrlFromSourceMapSkipped=new xn(o=>this._normalizeUrl(o)),this._authoredGlobs=Mte(r,e),this._nodeInternalsGlobs=$te(e),this._initNodeInternals(s),this._updateSkippedDebounce=OE(500,()=>this._updateGeneratedSkippedSources()),e.length&&this._updateGeneratedSkippedSources(),Xn.sharedSkipsEmitter.event(o=>{o.rootTargetId===this._rootTargetId&&o.targetId!==this._targetId&&this._toggleSkippingFile(o.params)})}setSourceContainer(e){this._sourceContainer=e}_testSkipNodeInternal(e){return this._nodeInternalsGlobs?(e.startsWith(Wo)&&(e=e.slice(Wo.length)),(0,jN.default)([e],this._nodeInternalsGlobs).length>0):!1}_testSkipAuthored(e){return this._regexForAuthored(this._authoredGlobs).some(r=>r.test(e))}_isNodeInternal(e,r){return e.startsWith(Wo)?!0:(r==null?void 0:r.has(e))||/^internal\/.+\.js$/.test(e)}async _updateGeneratedSkippedSources(){var i;let e=this._regexForAuthored(this._authoredGlobs).map(n=>n.source),r=(i=this._allNodeInternals)==null?void 0:i.settledValue;if(r){e.push(`^(${Wo})?internal\\/`);for(let n of r)this._testSkipNodeInternal(n)&&e.push(`^(${Wo})?${Ar(n)}$`)}await this.cdp.Debugger.setBlackboxPatterns({patterns:e})}_normalizeUrl(e){return Ye(e.toLowerCase())}isScriptSkipped(e){var r;return this._isNodeInternal(e,(r=this._allNodeInternals)==null?void 0:r.settledValue)?this._testSkipNodeInternal(e):(e=this._normalizeUrl(e),this._isUrlFromSourceMapSkipped.get(e)===!0?!0:this._testSkipAuthored(e))}async _updateSourceWithSkippedSourceMappedSources(e,r){let i=this.isScriptSkipped(e.url),n=[],s=i;Array.from(e.sourceMap.sourceByUrl.values()).forEach(a=>{let u=this.isScriptSkipped(a.url);if(typeof u>"u"&&(u=i),u!==s){let c=this._sourceContainer.currentSiblingUiLocations({source:a,lineNumber:1,columnNumber:1},e);c[0]?(n.push({lineNumber:c[0].lineNumber-1,columnNumber:c[0].columnNumber-1}),s=!s):this.logger.error("internal","Could not map script beginning for "+a.sourceReference)}});let o=r;n.length||(o=o.filter(a=>this._scriptsWithSkipping.has(a.scriptId)),o.forEach(a=>this._scriptsWithSkipping.delete(a.scriptId))),await Promise.all(o.map(({scriptId:a})=>this.cdp.Debugger.setBlackboxedRanges({scriptId:a,positions:n})))}initializeSkippingValueForSource(e){this._initializeSkippingValueForSource(e)}_initializeSkippingValueForSource(e,r=e.scripts){let i=e.url,n=this.isScriptSkipped(i);if(!n&&e.absolutePath&&this._testSkipAuthored(We(e.absolutePath))&&(this.setIsUrlBlackboxSkipped(i,!0),n=!0,this._updateSkippedDebounce()),Sr(e)){if(n)for(let s of e.sourceMap.sourceByUrl.values())this._isUrlFromSourceMapSkipped.set(s.url,!0);for(let s of e.sourceMap.sourceByUrl.values())this._initializeSkippingValueForSource(s,r);this._updateSourceWithSkippedSourceMappedSources(e,r)}}async _initNodeInternals(e){if(e.type()!=="node"||!this._nodeInternalsGlobs||this._allNodeInternals)return;let r=this._allNodeInternals=Xe(),i=await this.cdp.Runtime.evaluate({expression:"require('module').builtinModules"+Ht(),returnByValue:!0,includeCommandLineAPI:!0});i&&!i.exceptionDetails?r.resolve(new Set(i.result.value.map(n=>n+".js"))):r.resolve(new Set),await this._updateGeneratedSkippedSources()}async _toggleSkippingFile(e){let r;e.resource&&fr(e.resource)&&(r=e.resource);let i={path:r,sourceReference:e.sourceReference},n=this._sourceContainer.source(i);if(!n)return{};let s=!this.isScriptSkipped(n.url);if(n instanceof Bt){this._isUrlFromSourceMapSkipped.set(n.url,s);let o=Array.from(n.compiledToSourceUrl.keys());await Promise.all(o.map(a=>this._updateSourceWithSkippedSourceMappedSources(a,a.scripts)))}else{if(Sr(n))for(let o of n.sourceMap.sourceByUrl.values())this._isUrlFromSourceMapSkipped.set(o.url,s);this.setIsUrlBlackboxSkipped(n.url,s),await this._updateGeneratedSkippedSources()}return{}}setIsUrlBlackboxSkipped(e,r){let i=e,n=`!${i}`,s=this._authoredGlobs.filter(o=>o!==i&&o!==n);this._regexForAuthored(s).some(o=>o.test(e))!==r&&(s.push(r?i:n),this._regexForAuthored.clear()),this._authoredGlobs=s}async toggleSkippingFile(e){let r=await this._toggleSkippingFile(e);return Xn.sharedSkipsEmitter.fire({params:e,rootTargetId:this._rootTargetId,targetId:this._targetId}),r}};Xn.sharedSkipsEmitter=new J,Xn=X([(0,Vo.injectable)(),x(0,(0,Vo.inject)(Fe)),x(1,(0,Vo.inject)(et)),x(2,(0,Vo.inject)(pe)),x(3,(0,Vo.inject)(gt)),x(4,(0,Vo.inject)(Mo))],Xn);function qN(t){let e=t.parent();return e?qN(e):t}var Qf=F(ue());var VN=w("path");var WN=/^webpack:\/{3}([^/]+?\.vue)(\?[0-9a-z]*)?$/i,kte=/^webpack:\/{3}\.\/.+\.vue\?[0-9a-z]+$/i,_l=Symbol("IVueFileMapper");var vl=class{constructor(e,r){this.files=e;this.search=r;this.getMapping=Be(async()=>{let e=new Map;return await this.search.streamAllChildren(this.files,r=>e.set((0,VN.basename)(r),r)),e})}async lookup(e){let r=WN.exec(e);return r?(await this.getMapping()).get(r[1]):void 0}getVueHandling(e){return this.files.empty?0:WN.test(e)?1:kte.test(e)?2:0}};vl=X([(0,Qf.injectable)(),x(0,(0,Qf.inject)(Hs)),x(1,(0,Qf.inject)(xc))],vl);var zn=class{constructor(){this.changeEmitter=new J;this.addEmitter=new J;this.removeEmitter=new J;this.targetMap=new Map;this.onChanged=this.changeEmitter.event;this.onAdd=this.addEmitter.event;this.onRemove=this.removeEmitter.event}get size(){return this.targetMap.size}add(e,r){this.targetMap.set(e,r),this.addEmitter.fire([e,r]),this.changeEmitter.fire()}get(e){return this.targetMap.get(e)}remove(e){let r=this.targetMap.get(e);return r===void 0?!1:(this.targetMap.delete(e),this.removeEmitter.fire([e,r]),this.changeEmitter.fire(),!0)}value(){return this.targetMap.values()}};var gF=F(hF()),zg=F(ue());var mF=w("child_process"),Cs=class extends Error{constructor(r,i,n,s,o){super(`${r} exited with code ${s||-1}: ${i}`);this.command=r;this.stderr=i;this.stdout=n;this.code=s;this.innerError=o}static fromExeca(r){return new Cs(r.command,r.stderr.toString(),r.stdout.toString(),r.exitCode)}};function Xg(t,e,r){return new Promise((i,n)=>{let s=(0,mF.spawn)(t,e,{...r,stdio:"pipe"}),o=[],a=[];s.stderr.on("data",c=>o.push(c)),s.stdout.on("data",c=>a.push(c));let u=(c,l)=>n(new Cs(t,Buffer.concat(o).toString(),Buffer.concat(a).toString(),c,l));s.on("error",c=>u(void 0,c)),s.on("close",c=>c?u(c):i({stdout:Buffer.concat(a).toString(),stderr:Buffer.concat(o).toString()}))})}var Bre=new Map([["chrome",0],["safari",1],["firefox",2],["msedge",3],["microsoft edge",3],["appxq0fevzme2pys62n3e0fbqa7peapykr8v",4],["ie.http",5]]),HF=t=>{t=t.toLowerCase();for(let[e,r]of Bre.entries())if(t.includes(e))return r},yF=Symbol("IDefaultBrowserProvider"),Il=class{constructor(e,r=process.platform){this.execa=e;this.platform=r;this.lookup=Be(()=>this.platform==="win32"?this.lookupWindows():this.lookupUnix())}async lookupUnix(){let{name:e}=await(0,gF.default)();return HF(e)}async lookupWindows(){let e=await this.execa("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]);if(e.failed)throw Cs.fromExeca(e);let r=/ProgId\s*REG_SZ\s*(\S+)/.exec(e.stdout);if(r)return HF(r[1])}};Il=X([(0,zg.injectable)(),x(0,(0,zg.inject)(af))],Il);var vF=F(ue()),Yg=F(w("os"));var Jg=class{async setup(){}dispose(){}write(e){if(e.level>2)throw new Error(e.message);console.log(JSON.stringify(e))}};var tI=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))}},Li=class{constructor(){this.logTarget={queue:[]};this.logBuffer=new tI}static async test(){let e=new Li;return e.setup({sinks:[new Jg],showWelcome:!1}),e}info(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:1})}verbose(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:0})}warn(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:2})}error(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:3})}fatal(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:4})}assert(e,r){if(e===!1||e===void 0||e===null){if(this.error("runtime.assertion",r,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(r);debugger;return!1}return!0}log(e){if(this.logBuffer.write(e),"queue"in this.logTarget){this.logTarget.queue.push(e);return}for(let r of this.logTarget.sinks)r.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(i=>i.setup())),e.showWelcome!==!1){let i=Fre();for(let n of e.sinks)n.write(i)}let r=this.logTarget;this.logTarget={sinks:e.sinks.slice()},"sinks"in r?r.sinks.forEach(i=>i.dispose()):r.queue.forEach(i=>this.log(i))}};Li.null=(()=>{let e=new Li;return e.setup({sinks:[]}),e})(),Li=X([(0,vF.injectable)()],Li);var Fre=()=>({timestamp:Date.now(),tag:"runtime.welcome",level:1,message:`${Wm} v${of} started`,metadata:{os:`${Yg.platform()} ${Yg.arch()}`,nodeVersion:process.version,adapterVersion:of}});var Kj=F(ue());var Gj=F(Vj()),jy=F(ue());var Bs=class{constructor(e){this.logger=e}async streamAllChildren(e,r){let i=[];return await this.globForFiles(e,s=>i.push(r(wt(s.path)))),(await Promise.all(i)).filter(s=>s!==void 0)}async streamChildrenWithSourcemaps(e){let r=[];return await this.globForFiles(e.files,n=>r.push(Lc(wt(n.path)).then(s=>s&&e.processMap(s)).then(s=>s&&e.onProcessedMap(s)).catch(s=>this.logger.warn("sourcemap.parsing","Error parsing source map",{error:s,file:n.path})))),{values:(await Promise.all(r)).filter(vt),state:void 0}}async globForFiles(e,r){await Promise.all([...e.explode()].map(i=>new Promise((n,s)=>(0,Gj.default)([i.pattern,"!**/*.asar/**"],{ignore:i.negations,matchBase:!0,cwd:i.cwd}).on("data",r).on("finish",n).on("error",s))))}};Bs=X([(0,jy.injectable)(),x(0,(0,jy.inject)(pe))],Bs);var na=class{constructor(e,r){this.vscode=e;this.logger=r;this.nodeStrategy=new Bs(this.logger)}static createOrFallback(e){try{let r=w("vscode");if(r.workspace.findTextInFiles!==void 0)return new na(r,e)}catch{}return new Bs(e)}async streamAllChildren(e,r){return this.nodeStrategy.streamAllChildren(e,r)}async streamChildrenWithSourcemaps(e){let r=[];return await Promise.all([...e.files.explode()].map(n=>this._streamChildrenWithSourcemaps(e,n,r))),{values:(await Promise.all(r)).filter(vt),state:void 0}}async _streamChildrenWithSourcemaps(e,r,i){return await this.vscode.workspace.findTextInFiles({pattern:"sourceMappingURL",isCaseSensitive:!0},{...this.getTextSearchOptions(r),previewOptions:{charsPerLine:Number.MAX_SAFE_INTEGER,matchLines:1}},s=>{let o="text"in s?s.text:s.preview.text;i.push(Lc(s.uri.fsPath,o).then(a=>a&&e.processMap(a)).then(a=>a&&e.onProcessedMap(a)).catch(a=>{this.logger.warn("sourcemap.parsing","Error parsing source map",{error:a,file:s.uri.fsPath})}))}),this.logger.info("sourcemap.parsing",`findTextInFiles search found ${i.length} files`),(await Promise.all(i)).filter(vt)}getTextSearchOptions(e){return{include:new this.vscode.RelativePattern(this.vscode.Uri.file(e.cwd),e.pattern),exclude:e.negations.join(","),useDefaultExcludes:!1,useIgnoreFiles:!1,useGlobalIgnoreFiles:!1,followSymlinks:!0,beforeContext:0,afterContext:0}}};na=X([(0,Kj.injectable)()],na);var zj=F(ue());var Ul=Symbol("touched"),sa;(u=>{function t(){return{children:{},[Ul]:1}}u.root=t;function e(c,l){return a(c,o(l),0)}u.getPath=e;function r(c){c[Ul]=1}u.touch=r;function i(c){c[Ul]=2}u.touchAll=i;function n(c,l){let p=c.children[l]??={children:{}};return p[Ul]=1,p}u.getOrMakeChild=n;function s(c){if(c[Ul]){for(let[l,p]of Object.entries(c.children))switch(p[Ul]){case 1:s(p);break;case 2:break;default:delete c.children[l]}return c}}u.prune=s;function o(c){let l=c.split(/\/|\\/);return l[0]===""&&l.unshift(),l}function a(c,l,p){let f=n(c,l[p]);return p===l.length-1?f:a(f,l,p+1)}})(sa||={});var QS=w("fs"),ZS=F(yf()),wu=w("path"),Xj=F(JS());var Cce=/\//g,qy=class{constructor(e){this.stat=wa(e=>QS.promises.lstat(e));this.readdir=wa(e=>QS.promises.readdir(e,{withFileTypes:!0}));this.alreadyProcessedFiles=new Set;this.fileEmitter=new J;this.onFile=this.fileEmitter.event;this.errorEmitter=new J;this.onError=this.errorEmitter.event;this.processor=e.fileProcessor,this.filter=e.filter,this.ignore=e.ignore.map(n=>ZS.default.matcher((0,Xj.default)(Ye(n),{cwd:e.cwd})));let r=(0,wu.isAbsolute)(e.pattern)?(0,wu.relative)(e.cwd,e.pattern):e.pattern,i=ZS.default.parse(Ye(r),{ignore:e.ignore,cwd:e.cwd,expand:!0});this.done=Promise.all(i.map(n=>{let s=[];for(let c=1;c<n.tokens.length;){let l=c+1;for(;l<n.tokens.length&&n.tokens[l].type!=="slash";)l++;let p=n.tokens[c];p.type==="globstar"?s.push("**"):l===c+1&&p.type==="text"?s.push(p.value):s.push(new RegExp("^"+n.tokens.slice(c,l).map(f=>f.output||f.value).join("")+"$")),c=l+1}let o=s[0]==="**"?[0,1]:[0],a=sa.getPath(e.cache,e.cwd),u={elements:s,seen:new Set};return Promise.all(o.map(c=>this.readSomething(u,c,e.cwd,a)))})).then(()=>{})}async readSomething(e,r,i,n){if(this.alreadyProcessedFiles.has(n))return;let s=`${r}:${i}`;if(e.seen.has(s))return;e.seen.add(s);let o;try{o=await this.stat(i)}catch(u){this.errorEmitter.fire({path:i,error:u});return}if(this.alreadyProcessedFiles.has(n))return;let a=n.data;if(a&&o.mtimeMs===a.mtime){if(a.type===0){let u=[];for(let[c,l]of Object.entries(n.children))u.push(l.data!==void 0?this.handleDirectoryEntry(e,r,i,{name:c,type:l.data.type},n):this.stat(i).then(p=>this.handleDirectoryEntry(e,r,i,{name:c,type:p.isFile()?1:0},n),()=>{}));await Promise.all(u)}else a.type===1&&(this.alreadyProcessedFiles.add(n),this.fileEmitter.fire(a.extracted));return}o.isDirectory()?await this.handleDir(e,r,o.mtimeMs,i,n):(this.alreadyProcessedFiles.add(n),await this.handleFile(o.mtimeMs,i,n))}applyFilterToFile(e,r,i){var o;let n=i.children[e];if(this.alreadyProcessedFiles.has(n))return!1;if(!this.filter||!this.filter(r))return!0;let s=((o=n.data)==null?void 0:o.type)===1?n.data.extracted:void 0;return this.alreadyProcessedFiles.add(n),sa.touch(n),this.filter(r,s)}handleDirectoryEntry(e,r,i,n,s){let o=i+"/"+n.name,a=this.getDirectoryReadDescends(e,r,i,n);if(a===void 0)return;let u=sa.getOrMakeChild(s,n.name);if(!(n.type===1&&!this.applyFilterToFile(n.name,o,s)))return typeof a=="number"?this.readSomething(e,r+a,o,u):Promise.all(a.map(c=>this.readSomething(e,r+c,o,u)))}getDirectoryReadDescends(e,r,i,n){let s=i+"/"+n.name;if(this.ignore.some(u=>u(s)))return;let o=r===e.elements.length-1,a=e.elements[r];if(a==="**")return n.type===1?o?0:this.getDirectoryReadDescends(e,r+1,i,n):o?0:[0,1];if((a instanceof RegExp&&a.test(n.name)||a===n.name)&&(n.type===0?!o:o))return 1}async handleFile(e,r,i){let n=wu.sep==="/"?r:r.replace(Cce,wu.sep),s;try{s=await this.processor(n)}catch(o){this.errorEmitter.fire({path:n,error:o});return}i.data={type:1,mtime:e,extracted:s},this.fileEmitter.fire(s)}async handleDir(e,r,i,n,s){let o;try{o=await this.readdir(n)}catch(u){this.errorEmitter.fire({path:n,error:u});return}let a=[];for(let u of o){if(u.name.startsWith("."))continue;let c;if(u.isDirectory())c=0;else if(u.isFile())c=1;else continue;a.push(this.handleDirectoryEntry(e,r,n,{name:u.name,type:c},s))}await Promise.all(a),s.data={type:0,mtime:i}}};var jl=class extends Bs{async streamAllChildren(e,r){return super.streamAllChildren(e,r)}async streamChildrenWithSourcemaps(e){let r=[],i=e.lastState||{},n={};return await Promise.all([...e.files.explode()].map(async o=>{let a=JSON.stringify(o),u=i[a]||sa.root();await this._streamChildrenWithSourcemaps(u,e,r,o);let c=sa.prune(u);c&&(n[a]=c)})),this.logger.info("sourcemap.parsing",`turboGlobStream search found ${r.length} files`),{values:(await Promise.all(r)).filter(vt),state:n}}async _streamChildrenWithSourcemaps(e,r,i,n){let s=new qy({pattern:n.pattern,ignore:n.negations,cwd:n.cwd,cache:e,filter:r.filter,fileProcessor:o=>Lc(o).then(a=>a&&r.processMap(a))});s.onError(({path:o,error:a})=>{this.logger.warn("sourcemap.parsing","Error parsing source map",{error:a,path:o})}),s.onFile(o=>o&&i.push(r.onProcessedMap(o))),await s.done}};jl=X([(0,zj.injectable)()],jl);var eb=F(Ct()),ca=F(ue());var Jj=w("url"),Yj=F(w("path"));var Wy=class{constructor(){this._onFrameAddedEmitter=new J;this._onFrameRemovedEmitter=new J;this._onFrameNavigatedEmitter=new J;this.onFrameAdded=this._onFrameAddedEmitter.event;this.onFrameRemoved=this._onFrameRemovedEmitter.event;this.onFrameNavigated=this._onFrameNavigatedEmitter.event;this._frames=new Map}attached(e,r){e.Page.enable({}),e.Page.getResourceTree({}).then(i=>{this._processCachedResources(e,i?i.frameTree:void 0,r)})}mainFrame(){return this._mainFrame}_processCachedResources(e,r,i){r&&this._addFramesRecursively(e,r,r.frame.parentId,i),e.Page.on("frameAttached",n=>{this._frameAttached(e,i,n.frameId,n.parentFrameId)}),e.Page.on("frameNavigated",n=>{this._frameNavigated(e,i,n.frame)}),e.Page.on("frameDetached",n=>{this._frameDetached(e,i,n.frameId)})}_addFrame(e,r,i){let n=new tE(this,e,r,i);return this._frames.set(n.id,n),n.isMainFrame()&&(this._mainFrame=n),this._onFrameAddedEmitter.fire(n),n}_frameAttached(e,r,i,n){let s=this._frames.get(i);return s||(s=this._addFrame(e,i,n)),s._ref(r),s}_frameNavigated(e,r,i){let n=this._frames.get(i.id);n||(n=this._frameAttached(e,r,i.id,i.parentId)),n._navigate(i,r),this._onFrameNavigatedEmitter.fire(n)}_frameDetached(e,r,i){let n=this._frames.get(i);n&&n._unref(r)}frameForId(e){return this._frames.get(e)}frames(){return Array.from(this._frames.values())}_addFramesRecursively(e,r,i,n){let s=r.frame,o=this._frames.get(s.id);o?(o._navigate(s,n),this._onFrameNavigatedEmitter.fire(o)):(o=this._addFrame(e,s.id,i),o._navigate(s,n));for(let a=0;r.childFrames&&a<r.childFrames.length;++a)this._addFramesRecursively(e,r.childFrames[a],o.id,n)}},tE=class{constructor(e,r,i,n){this._targets=new Set;this.cdp=r,this.model=e,this._parentFrameId=n,this.id=i,this._url=""}_ref(e){this._targets.add(e)}_navigate(e,r){this._name=e.name,this._url=e.url,this._securityOrigin=e.securityOrigin,this._unreachableUrl=e.unreachableUrl||"",this._ref(r),this._unrefChildFrames(r)}name(){return this._name||""}url(){return this._url}securityOrigin(){return this._securityOrigin}unreachableUrl(){return this._unreachableUrl}isMainFrame(){return!this._parentFrameId}parentFrame(){return this._parentFrameId?this.model.frameForId(this._parentFrameId):void 0}childFrames(){return this.model.frames().filter(e=>e._parentFrameId===this.id)}_unrefChildFrames(e){for(let r of this.childFrames())r._unref(e)}_unref(e){this._targets.delete(e),!this._targets.size&&(this._unrefChildFrames(e),this.model._frames.delete(this.id),this.model._onFrameRemovedEmitter.fire(this))}displayName(){return this._name?this._name:Pce(this._url)||`<iframe ${this.id}>`}};function eE(t,e){return t.length<=e?t:t.substr(0,e-1)+"\u2026"}function Pce(t){let e;try{e=new Jj.URL(t)}catch{return eE(t,20)}if(e.protocol==="data")return eE(t,20);if(e.protocol==="blob"||t==="about:blank")return t;let r=Yj.basename(e.pathname);return r||(r=(e.host||"")+"/"),r==="/"&&(r=eE(t,20)),r}var Qj=w("url"),rE=class{constructor(e){this.versions=new Map;this.id=e.registrationId,this.scopeURL=e.scopeURL}},iE=class{constructor(e,r){this.revisions=[];this.registration=e,this.id=r.versionId,this.scriptURL=r.scriptURL,this._targetId=r.targetId,this._status=r.status,this._runningStatus=r.runningStatus}addRevision(e){this._targetId&&e.targetId&&this._targetId!==e.targetId&&console.error(`${this._targetId} !== ${e.targetId}`),e.targetId&&(this._targetId=e.targetId),this._status=e.status,this._runningStatus=e.runningStatus,this.revisions.unshift(e)}status(){return this._status}runningStatus(){return this._runningStatus}targetId(){return this._targetId}label(){let e=new Qj.URL(this.registration.scopeURL),r=e.pathname.substr(1);r.endsWith("/")&&(r=r.substring(0,r.length-1));let i=r||`${e.host}`,n=this._status==="activated"?"":` ${this._status}`,s=this._runningStatus==="running"?"":` ${this._runningStatus}`;return`${i} #${this.id}${n}${s}`}},oa=class{constructor(e){this._registrations=new Map;this._versions=new Map;this._onDidChangeUpdater=new J;this.onDidChange=this._onDidChangeUpdater.event;this._targets=new Set;this._frameModel=e,oa._instances.add(this)}dispose(){oa._instances.delete(this)}attached(e){this._targets.add(e),!this._cdp&&(this._cdp=e,e.ServiceWorker.enable({}),e.ServiceWorker.on("workerRegistrationUpdated",r=>this._workerRegistrationsUpdated(r.registrations)),e.ServiceWorker.on("workerVersionUpdated",r=>this._workerVersionsUpdated(r.versions)),oa._mode!=="normal"&&this.setMode(oa._mode))}async detached(e){this._targets.delete(e)}version(e){return this._versions.get(e)}registrations(){let e=[],r=this._frameModel.frames().map(i=>i.url());for(let i of this._registrations.values())for(let n of r)if(n.startsWith(i.scopeURL)){e.push(i);break}return e}registration(e){return this._registrations.get(e)}_workerVersionsUpdated(e){for(let r of e){let i=this._registrations.get(r.registrationId);if(!i)continue;let n=i.versions.get(r.versionId);n||(n=new iE(i,r),i.versions.set(r.versionId,n)),r.targetId&&this._versions.set(r.targetId,n),n.addRevision(r),n.status()==="redundant"&&n.runningStatus()==="stopped"&&(r.targetId&&this._versions.delete(r.targetId),i.versions.delete(n.id))}this._onDidChangeUpdater.fire()}_workerRegistrationsUpdated(e){for(let r of e)if(r.isDeleted){if(!this._registrations.has(r.registrationId))debugger;this._registrations.delete(r.registrationId)}else{if(this._registrations.has(r.registrationId))return;this._registrations.set(r.registrationId,new rE(r))}this._onDidChangeUpdater.fire()}static setModeForAll(e){oa._mode=e;for(let r of oa._instances)r.setMode(e)}setMode(e){if(this._cdp){this._cdp.ServiceWorker.setForceUpdateOnPageLoad({forceUpdateOnPageLoad:e==="force"});for(let r of this._targets.values())e==="bypass"?(r.Network.enable({}),r.Network.setBypassServiceWorker({bypass:!0})):r.Network.disable({})}}async stopWorker(e){if(!this._cdp)return;let r=this.version(e);r&&await this._cdp.ServiceWorker.stopWorker({versionId:r.id})}},Ud=oa;Ud._instances=new Set;var aa=class{constructor(e,r,i,n,s,o,a,u){this.process=r;this.logger=s;this.telemetry=o;this.launchParams=a;this._targets=new Map;this._detachedTargets=new Set;this.frameModel=new Wy;this.serviceWorkerModel=new Ud(this.frameModel);this._lifecycleQueue=Promise.resolve();this._onTargetAddedEmitter=new J;this._onTargetRemovedEmitter=new J;this.onTargetAdded=this._onTargetAddedEmitter.event;this.onTargetRemoved=this._onTargetRemovedEmitter.event;this._connection=e,this._sourcePathResolver=n,this._browser=i,this._targetOrigin=u,this.serviceWorkerModel.onDidChange(()=>{for(let c of this._targets.values())c.type()==="service_worker"&&c._onNameChangedEmitter.fire()})}static async connect(e,r,i,n,s,o,a){let c=await e.rootSession().Target.attachToBrowserTarget({});if(!c)return;let l=e.createSession(c.sessionId);return new this(e,r,l,i,s,o,n,a)}dispose(){this.serviceWorkerModel.dispose()}targetList(){return Array.from(this._targets.values()).filter(e=>ef.has(e.type()))}async getCandiateInfo(e){let r=await this._browser.Target.getTargets({});return r?e?r.targetInfos.filter(e):r.targetInfos:[]}async closeBrowser(){var e;if(this.launchParams.request==="launch"){if(this.launchParams.cleanUp==="wholeBrowser")await this._browser.Browser.close({}),(e=this.process)==null||e.kill();else for(let r of this._targets.values())await this._browser.Target.closeTarget({targetId:r.targetId}),this._connection.close();this.process=void 0}}waitForMainTarget(e){let r,i=new Promise(s=>r=s),n=async s=>{if([...this._targets.values()].some(u=>u.targetId===s.targetId)||this._detachedTargets.has(s.targetId)||e&&!e(s))return;let o=this._browser.Target.on("targetInfoChanged",u=>{u.targetInfo.targetId===s.targetId&&(s=u.targetInfo)}),a;try{a=await this._browser.Target.attachToTarget({targetId:s.targetId,flatten:!0})}finally{o.dispose()}if(!a){r(void 0);return}r(this.attachedToTarget(s,a.sessionId,!0))};return this._browser.Target.setDiscoverTargets({discover:!0}),this._browser.Target.on("targetCreated",this.enqueueLifecycleFn(s=>n(s.targetInfo))),this._browser.Target.on("targetInfoChanged",s=>this._targetInfoChanged(s.targetInfo,this.enqueueLifecycleFn(n))),this._browser.Target.on("detachedFromTarget",this.enqueueLifecycleFn(async s=>{s.targetId&&await this._detachedFromTarget(s.sessionId,!1)})),i}enqueueLifecycleFn(e){return r=>this._lifecycleQueue=this._lifecycleQueue.then(()=>e(r))}attachedToTarget(e,r,i,n,s=!0){let o=this._targets.get(r);if(o)return o;let a=this._connection.createSession(r),u=new gc(this,e,a,n,i,this.launchParams,r,this.logger,()=>{this._connection.disposeSession(r),this._detachedFromTarget(r)});this._targets.set(r,u),n&&n._children.set(e.targetId,u),a.Target.on("attachedToTarget",async l=>{this.attachedToTarget(l.targetInfo,l.sessionId,l.waitingForDebugger,u)}),a.Target.on("detachedFromTarget",async l=>{l.targetId&&this._detachedFromTarget(l.sessionId,!1)}),a.Target.setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:s,flatten:!0}),a.Network.setCacheDisabled({cacheDisabled:this.launchParams.disableNetworkCache}).catch(l=>this.logger.info("runtime.target","Error setting network cache state",l)),n||this.retrieveBrowserTelemetry(a);let c=e.type;return R_.has(c)&&this.frameModel.attached(a,e.targetId),this.serviceWorkerModel.attached(a),this._onTargetAddedEmitter.fire(u),!ef.has(c)||c==="service_worker"?u.runIfWaitingForDebugger():c==="page"&&s&&a.Page.waitForDebugger({}),u}async retrieveBrowserTelemetry(e){try{let r=await e.Browser.getVersion({});if(!r)throw new Error("Undefined return from getVersion()");let i={targetCRDPVersion:r.protocolVersion,targetRevision:r.revision,targetUserAgent:r.userAgent,targetV8:r.jsVersion,targetVersion:"",targetProject:"",targetProduct:""};this.logger.verbose("runtime.target","Retrieved browser information",r);let n=(r.product||"").split("/");n.length===2?(i.targetProject=n[0],i.targetVersion=n[1]):i.targetProduct=r.product,this.telemetry.report("browserVersion",i)}catch(r){this.logger.warn("runtime.target","Error getting browser telemetry",r)}}async _detachedFromTarget(e,r=!0){var n;let i=this._targets.get(e);if(i){this._targets.delete(e),(n=i.parentTarget)==null||n._children.delete(e);try{await i._detached()}catch{}if(this._onTargetRemovedEmitter.fire(i),r&&(this._detachedTargets.add(i.targetId),await this._browser.Target.detachFromTarget({sessionId:e})),!this._targets.size&&this.launchParams.request==="launch")try{this.launchParams.cleanUp==="wholeBrowser"?await this._browser.Browser.close({}):(await this._browser.Target.closeTarget({targetId:i.id()}),this._connection.close())}catch{}}}async _targetInfoChanged(e,r){let i=[...this._targets.values()].filter(n=>n.targetId===e.targetId);if(!e.attached||!i.length)return i.length&&await Promise.all(i.map(n=>this._detachedFromTarget(n.sessionId,!1))),r(e);for(let n of i)n._updateFromInfo(e);for(let n of this._targets.values())n.targetId!==e.targetId&&n._onNameChangedEmitter.fire()}};var hq=F(w("child_process")),mq=w("fs");var Dce=50,Dr=class{constructor(e){this.messageEmitter=new J;this.endEmitter=new J;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this._ws=e,this._ws.addEventListener("message",r=>{this.messageEmitter.fire([r.data.toString("utf-8"),new Lr])}),this._ws.addEventListener("close",()=>{this.endEmitter.fire(),this._ws=void 0}),this._ws.addEventListener("error",()=>{})}static async create(e,r,i){let n=!e.startsWith("ws://"),s=await bc(e);for(;;){let o=Date.now()+Dce;try{let a={headers:{host:i??"localhost"},perMessageDeflate:!1,maxPayload:268435456,rejectUnauthorized:!(n&&s),followRedirects:!0},u=new CM(e,[],a);return await jn(new Promise((c,l)=>{u.addEventListener("open",()=>c(new Dr(u))),u.addEventListener("error",p=>{let f=e===u.url?e:u.url.replace(/^http(s?):/,"ws$1:");if(f===e){l(p.error);return}this.create(f,r,i).then(c,l)})}),Jt.withTimeout(2e3,r).token,`Could not open ${e}`).catch(c=>{throw u.close(),c})}catch(a){if(r.isCancellationRequested)throw a;let u=o-Date.now();u>0&&await Me(u)}}}send(e){var r;(r=this._ws)==null||r.send(e)}dispose(){return new Promise(e=>{if(!this._ws)return e();this._ws.addEventListener("close",()=>e()),this._ws.close()})}};var Vy=F(w("path"));function Tce(t){let e=[/^APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL$/i,/^ELECTRON_.+$/i,/^GOOGLE_API_KEY$/i,/^VSCODE_.+$/i,/^SNAP(|_.*)$/i,/^GDK_PIXBUF_.+$/i];return new xt(t).map((r,i)=>e.some(n=>n.test(r))?void 0:i)}var Di=class{constructor(e){this.defined=Be(()=>ku(this.value));this.value=e?DE(e):{}}lookup(e){return Di.platform==="win32"?ME(this.value,e):this.value[e]}addToPath(e,r="append",i=!1){let n=Di.platform==="win32"?"Path":"PATH",s=Di.platform==="win32"?Vy.win32.delimiter:Vy.posix.delimiter,o=this.lookup(n);return i&&!o&&(o=`\${env:${n}}`),o?r==="append"?o=o+s+e:o=e+s+o:o=e,this.update(n,o)}addNodeOption(e){let r=this.lookup("NODE_OPTIONS");return this.update("NODE_OPTIONS",r?`${r} ${e}`:e)}update(e,r){return Di.merge(this,{[e]:r})}merge(...e){return Di.merge(this,...e)}map(e){return new Di(as(this.value,(r,i)=>e(i,r)))}static merge(...e){let r=e.map(n=>n instanceof Di?n.value:n),i=Di.platform==="win32"?$E(...r):Object.assign({},...r);return new Di(i)}},xt=Di;xt.platform=process.platform,xt.empty=new Di({}),xt.processEnv=Be(()=>Tce(process.env));var Zj="--remote-debugging-port",eq="--remote-debugging-pipe",tq=t=>{let e={};for(let r of t){let i=r.indexOf("=");i===-1?e[r]=null:e[r.slice(0,i)]=r.slice(i+1)}return e},Gy=t=>{let e=[];for(let r of Object.keys(t)){let i=t[r];i!==void 0&&e.push(i===null?r:`${r}=${i}`)}return e},Fs=class{constructor(e=[]){this.args=e;this.argMap=Be(()=>tq(this.args))}add(e,r=null){return new Fs(Gy({...this.argMap(),[e]:r}))}remove(e){return new Fs(Gy({...this.argMap(),[e]:void 0}))}merge(e){return new Fs(Gy({...this.argMap(),...e instanceof Fs?e.argMap():tq(e)}))}setConnection(e){return new Fs(Gy({...this.argMap(),[eq]:e==="pipe"?null:void 0,[Zj]:e!=="pipe"?String(e):void 0}))}getSuggestedConnection(){let e=this.argMap();if(e.hasOwnProperty(eq))return"pipe";let r=e[Zj];if(r!==void 0)return r&&Number(r)||0}filter(e){let r=this.argMap(),i=[];for(let n of Object.keys(r)){let s=r[n];e(n,s)&&i.push(s===null?n:`${n}=${s}`)}return new Fs(i)}toArray(){return this.args.slice()}},Us=Fs;Us.default=new Fs(["--disable-background-networking","--disable-background-timer-throttling","--disable-backgrounding-occluded-windows","--disable-breakpad","--disable-client-side-phishing-detection","--disable-default-apps","--disable-dev-shm-usage","--disable-renderer-backgrounding","--disable-sync","--metrics-recording-only","--no-first-run","--no-default-browser-check"]);var nE=w("url");function Ky(t,e,r){let i=wa(o=>{if(o)return new nE.URL(o);throw new Error(`A valid url wasn't supplied: <${o}>`)}),n={"url.hostname":()=>i(e).hostname,"url.port":()=>i(e).port,browserInspectUri:()=>encodeURIComponent(r),browserInspectUriPath:()=>new nE.URL(r).pathname,wsProtocol:()=>i(e).protocol==="https:"?"wss":"ws"};return t.replace(/{([^\}]+)}/g,(o,a)=>n.hasOwnProperty(a)?n[a]():o)}var lq=F(w("readline"));var sq=F(zy());var Ti=class{constructor(e,r,i){this.logger=e;this.pipeWrite=r;this.pipeRead=i;this.messageEmitter=new J;this.endEmitter=new J;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this.onceEnded=Be(()=>{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 n=i||r;this.streams={read:n.on("error",s=>this.logger.error("internal","pipeRead error",{error:s})).pipe((0,sq.default)("\0")).on("data",s=>this.messageEmitter.fire([s,new Lr])).on("end",this.onceEnded),write:r.on("end",this.onceEnded).on("error",this.onWriteError)}}send(e){var r;(r=this.streams)==null||r.write.write(e+"\0")}dispose(){this.onceEnded()}beforeClose(){}};var Jy=w("child_process"),sE=w("path");function js(t,e,r="forceful"){if(r==="none")return!0;if(process.platform==="win32"){let i=process.env.WINDIR||"C:\\Windows",n=(0,sE.join)(i,"System32","taskkill.exe");try{return(0,Jy.execSync)(`${n} ${r==="forceful"?"/F":""} /T /PID ${t}`,{stdio:"pipe"}),!0}catch(s){return e.error("runtime.exception","Error running taskkill.exe",s),!1}}else try{let i=(0,sE.join)(__dirname,"./targets/node/terminateProcess.sh"),n=(0,Jy.spawnSync)("sh",[i,t.toString(),r==="forceful"?"9":"15"]);return n.stderr&&n.status?(e.error("runtime.exception","Error running terminateProcess",n),!1):!0}catch(i){return e.error("runtime.exception","Error running terminateProcess",i),!1}}var uq=w("fs");async function oE(t,e,r,i){let n=new qo(uq.promises),[s,o]=await Promise.all([oq(n,new URL("/json/version",t),e),i?oq(n,new URL("/json/list",t),e):Promise.resolve(void 0)]);if(!s.ok)r.verbose("runtime.launch","Error looking up /json/version",s);else if(s.body.webSocketDebuggerUrl){let a=aq(s.url,s.body.webSocketDebuggerUrl);return r.verbose("runtime.launch","Discovered target URL from /json/version",{url:s.body.webSocketDebuggerUrl,fixed:a}),a}if(o)if(!o.ok)r.verbose("runtime.launch","Error looking up /json/list",o);else{let a=aq(o.url,o.body[0].webSocketDebuggerUrl);return r.verbose("runtime.launch","Discovered target URL from /json/list",{url:o.body[0].webSocketDebuggerUrl,fixed:a}),a}throw new Error("Could not find any debuggable target")}async function oq(t,e,r){if(e.hostname!=="localhost")return t.fetchJson(e.toString(),r,{host:"localhost"});let i=e.toString();e.hostname="127.0.0.1";let n=e.toString(),s=new Jt(r);try{let o;return await Bu([i,n].map(async u=>(o=await t.fetchJson(u,s.token),o.ok&&o)))||o}finally{s.cancel()}}var cq=t=>async(e,r,i)=>{for(;;)try{return await oE(e,r,i,t)}catch(n){if(r.isCancellationRequested)throw new Error(`Could not connect to debug target at ${e}: ${n.message}`);await Me(200)}},ql=cq(!0),Yy=cq(!1);function aq(t,e){let r=new URL(t),i=new URL(e);return i.host=r.host,i.toString()}var pq=async(t,e,r,i)=>{let n=r.connection===0?await Bce(e,i):await Yy(`http://localhost:${r.connection}`,i,t),s=r.inspectUri?Ky(r.inspectUri,r.url,n):n;for(;;)try{return await Dr.create(s,i)}catch(o){if(i.isCancellationRequested)throw o;await Me(200)}},Qy=class{constructor(e){this.logger=e;this.pid=void 0;this.onExit=new J().event;this.onError=new J().event}async transport(e,r){return pq(this.logger,this,e,r)}kill(){}},Zy=class{constructor(e,r){this.cp=e;this.logger=r;this.pid=void 0;this.exitEmitter=new J;this.onExit=this.exitEmitter.event;this.errorEmitter=new J;this.onError=this.errorEmitter.event;e.on("exit",i=>this.exitEmitter.fire(i||0)),e.on("error",i=>this.errorEmitter.fire(i))}get stderr(){return this.cp.stderr}get stdio(){return this.cp.stdio}async transport(e,r){return e.connection==="pipe"?new Ti(this.logger,this.cp.stdio[3],this.cp.stdio[4]):pq(this.logger,this,e,r)}kill(){js(this.cp.pid,this.logger)}};function Bce(t,e){if(!t.stderr)throw new Error("Cannot wait for a websocket for a target that lacks stderr");return new Promise((r,i)=>{let n=lq.createInterface({input:t.stderr}),s="",o=()=>c();n.on("line",l),n.on("close",o);let a=new Je([t.onExit(()=>c()),t.onError(c)]),u=e.onCancellationRequested(()=>{p(),i(new Un(`Timed out after ${u} ms while trying to connect to the browser!`))});function c(f){p(),i(new Error(["Failed to launch browser!"+(f?" "+f.message:""),s,"","TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md",""].join(`
`)))}function l(f){s+=f+`
`;let H=f.match(/^DevTools listening on (ws:\/\/.*)$/);H&&(p(),r(H[1]))}function p(){u.dispose(),n.removeListener("line",l),n.removeListener("close",o),a.dispose()}})}async function fq(t,e,r,i){let n=t.launchUnelevatedRequest({process:e,args:r});await jn(n,i,"Could not launch browser unelevated")}var dq=()=>{};async function Hq(t,e,r,i,n,s,o={}){var W,N,M,R;let{onStderr:a=dq,onStdout:u=dq,args:c=[],dumpio:l=!1,cwd:p=process.cwd(),env:f=xt.empty,connection:H="pipe",cleanUp:m="wholeBrowser",url:y,inspectUri:b}=o,A=new Us(c),B=A.getSuggestedConnection();o.includeLaunchArgs!==!1?(A=aE(A,o),B===void 0&&(A=A.setConnection(H),B=H)):B===void 0&&(B="pipe");let q=["pipe","pipe","pipe"];B==="pipe"&&(l?q=["ignore","pipe","pipe","pipe","pipe"]:q=["ignore","ignore","ignore","pipe","pipe"]);let L;if(!!(n.supportsLaunchUnelevatedProcessRequest&&o.launchUnelevated)&&typeof B=="number"&&B!==0)await fq(t,e,A.toArray(),s),L=new Qy(r);else{r.info("runtime.launch",`Launching Chrome from ${e}`);let S=hq.spawn(e,A.toArray(),{detached:!0,env:f.defined(),cwd:await ec(mq.promises,p)?p:process.cwd(),stdio:q});if(S.pid===void 0)throw await Promise.race([Me(1e3).then(()=>new Error("Unable to launch the executable (undefined pid)")),new Promise($=>S.once("error",$))]);L=new Zy(S,r)}l?((W=L.stderr)==null||W.on("data",S=>a(S.toString())),(N=L.stdout)==null||N.on("data",S=>u(S.toString()))):((M=L.stderr)==null||M.resume(),(R=L.stdout)==null||R.resume());let G=()=>{m==="wholeBrowser"&&L.kill()};process.on("exit",G),L.onExit(()=>process.removeListener("exit",G));try{o.promisedPort&&(B=await o.promisedPort);let S=await L.transport({connection:B,inspectUri:b||void 0,url:y||void 0},s),$=new Mt(S,r,i);return G=async()=>{m==="wholeBrowser"?(await $.rootSession().Browser.close({}),L.kill()):$.close()},{cdp:$,process:L}}catch(S){throw G(),S}}function aE(t,e={}){let{userDataDir:r=null,ignoreDefaultArgs:i=!1}=e,n=i===!0?new Us:Us.default;return i instanceof Array&&(n=n.filter(s=>!i.includes(s))),r&&(n=n.add("--user-data-dir",r)),n=n.merge(t),t.toArray().every(s=>s.startsWith("-"))&&e.hasUserNavigation&&(n=n.add("about:blank")),n}async function gq(t,e,r,i){let{browserWSEndpoint:n,browserURL:s}=t;if(n){let o=await Dr.create(n,e);return new Mt(o,r,i)}else if(s){let o=await Yy(s,e,r),a=t.inspectUri?Ky(t.inspectUri,t.pageURL,o):o,u=await Dr.create(a,e);return new Mt(u,r,i)}throw new Error("Either browserURL or browserWSEndpoint needs to be specified")}var $i=class{constructor(e,r,i){this.logger=e;this.pathResolver=r;this.vscode=i;this._disposables=[];this._onTerminatedEmitter=new J;this.onTerminated=this._onTerminatedEmitter.event;this._onTargetListChangedEmitter=new J;this.onTargetListChanged=this._onTargetListChangedEmitter.event}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[],this._attemptTimer&&clearTimeout(this._attemptTimer),this._targetManager&&this._targetManager.dispose()}resolveParams(e){return e.request==="attach"&&(e.type==="pwa-chrome"||e.type==="pwa-msedge"&&typeof e.useWebView!="object")&&e.browserAttachLocation==="workspace"}async launch(e,r){return this.resolveParams(e)?(this._lastLaunchParams={...e,timeout:1/0},await this.attemptToAttach(this._lastLaunchParams,r),{blockSessionTermination:!0}):{blockSessionTermination:!1}}_scheduleAttach(e,r){this._attemptTimer=setTimeout(()=>{this._attemptTimer=void 0,this.attemptToAttach(e,{...r,cancellationToken:xr})},1e3)}createTargetManager(e,r,i){return aa.connect(e,void 0,this.pathResolver,r,this.logger,i.telemetryReporter,i.targetOrigin)}async attemptToAttach(e,r){let i=await this.acquireConnectionForBrowser(r,e);this._connection=i,i.onDisconnected(()=>{this._connection=void 0,this._targetManager&&(this._targetManager.dispose(),this._targetManager=void 0,this._onTargetListChangedEmitter.fire()),this._lastLaunchParams===e&&e.restart?this._scheduleAttach(e,r):this._onTerminatedEmitter.fire({killed:!0,code:0})},void 0,this._disposables);let n=this._targetManager=await this.createTargetManager(i,e,r);if(!n)return;n.serviceWorkerModel.onDidChange(()=>this._onTargetListChangedEmitter.fire()),n.frameModel.onFrameNavigated(()=>this._onTargetListChangedEmitter.fire()),n.onTargetAdded(()=>{this._onTargetListChangedEmitter.fire()}),n.onTargetRemoved(()=>{this._onTargetListChangedEmitter.fire(),n.targetList().length||this._onTerminatedEmitter.fire({killed:!0,code:0})});let s=await Promise.race([n.waitForMainTarget(await this.getTargetFilter(n,e)),Me(e.timeout).then(()=>{throw new re(gm())})]);return typeof s=="string"?s:void 0}async getTargetFilter(e,r){let i=po(r),n=vc(i);if(r.targetSelection!=="pick")return n;let s=await e.getCandiateInfo(n);if(s.length===0)return n;if(s.length===1||!this.vscode)return u=>u.targetId===s[0].targetId;let o=eb.t("Select a tab"),a=await this.vscode.window.showQuickPick(s.map(u=>({label:u.title,detail:u.url,targetId:u.targetId})),{matchOnDescription:!0,matchOnDetail:!0,placeHolder:o});return a?u=>u.targetId===a.targetId:n}async acquireConnectionForBrowser({telemetryReporter:e,cancellationToken:r},i){for(;this._lastLaunchParams===i;)try{return await this.acquireConnectionInner(e,i,r)}catch(n){if(r.isCancellationRequested)throw new re(Up(eb.t("Cannot connect to the target at {0}: {1}",`${i.address}:${i.port}`,n.message)));await Me(1e3)}throw new re(Up(eb.t("Cannot connect to the target at {0}: {1}",`${i.address}:${i.port}`,"Cancelled")))}async acquireConnectionInner(e,r,i){let n=`http://${r.address}:${r.port}`;return await gq({browserURL:n,inspectUri:r.inspectUri,pageURL:r.url},i,this.logger,e)}async terminate(){var e;this._lastLaunchParams=void 0,(e=this._connection)==null||e.close()}async restart(){if(this._targetManager)for(let e of this._targetManager.targetList())e.type()==="page"&&!e.name().startsWith("devtools://")&&e.restart()}targetList(){let e=this._targetManager;return e?e.targetList():[]}};$i=X([(0,ca.injectable)(),x(0,(0,ca.inject)(pe)),x(1,(0,ca.inject)(et)),x(2,(0,ca.optional)()),x(2,(0,ca.inject)(mo))],$i);var nn=F(ue());var bq=F(Pw()),jd=F(w("fs")),la=F(ue()),Wl=F(w("path"));var ts=class{constructor(e,r,i,n,s){this.storagePath=e;this.logger=r;this.pathResolver=i;this.initializeParams=n;this.fs=s;this._disposables=new Je;this._terminated=!1;this._onTerminatedEmitter=new J;this.onTerminated=this._onTerminatedEmitter.event;this._onTargetListChangedEmitter=new J;this.onTargetListChanged=this._onTargetListChangedEmitter.event}dispose(){this._disposables.dispose()}async launchBrowser({runtimeExecutable:e,trace:r,includeDefaultArgs:i,includeLaunchArgs:n,runtimeArgs:s,userDataDir:o,env:a,cwd:u,port:c,url:l,file:p,inspectUri:f,webRoot:H,cleanUp:m,launchUnelevated:y},b,A,B,q){let L=await this.findBrowserPath(e||"stable"),D;return typeof o=="string"?D=Wl.resolve(o):o&&(D=Wl.resolve(Wl.join(this.storagePath,s!=null&&s.includes("--headless")?".headless-profile":".profile"))),jd.mkdirSync(this.storagePath,{recursive:!0}),D&&(jd.mkdirSync(D,{recursive:!0}),D=jd.realpathSync(D)),await Hq(b,L,this.logger,B,this.initializeParams,A,{onStdout:G=>b.output({category:"stdout",output:G}),onStderr:G=>b.output({category:"stderr",output:G}),dumpio:typeof r=="boolean"?r:r.stdio,cleanUp:m,hasUserNavigation:!!(l||p),cwd:u||H||void 0,env:xt.merge(xt.processEnv(),a),args:s||[],userDataDir:D,connection:c||(f?0:"pipe"),launchUnelevated:y,ignoreDefaultArgs:!i,includeLaunchArgs:n,url:l,inspectUri:f,promisedPort:q})}getFilterForTarget(e){return vc(po(e,["about:blank"]))}async prepareLaunch(e,{dap:r,targetOrigin:i,cancellationToken:n,telemetryReporter:s}){let o;try{o=await this.launchBrowser(e,r,n,s)}catch(c){throw new re(pD(c))}if(this._disposables.push(o.cdp.onDisconnected(()=>this.fireTerminatedEvent())),this._connectionForTest=o.cdp,this._launchParams=e,this._targetManager=await aa.connect(o.cdp,o.process,this.pathResolver,this._launchParams,this.logger,s,i),!this._targetManager)throw o.process.kill(),new re(Up());this._targetManager.serviceWorkerModel.onDidChange(()=>this._onTargetListChangedEmitter.fire()),this._targetManager.frameModel.onFrameNavigated(()=>this._onTargetListChangedEmitter.fire()),this._disposables.push(this._targetManager),this._targetManager.onTargetAdded(()=>{this._onTargetListChangedEmitter.fire()}),this._targetManager.onTargetRemoved(()=>{this._onTargetListChangedEmitter.fire()});let a=this.getFilterForTarget(e),u=await jn(this._targetManager.waitForMainTarget(a),n,"Could not attach to main target");if(!u)throw o.process.kill(),new re(gm());return u}async finishLaunch(e,r){if("skipNavigateForTest"in r)return;let i;if(r.file){let n=Wl.resolve(r.webRoot||r.rootPath||"",r.file),s=Math.min(n.includes("#")?n.indexOf("#"):1/0,n.includes("?")?n.indexOf("?"):1/0);isFinite(s)&&!await eo(this.fs,n)?i=We(n.slice(0,s))+n.slice(s):i=We(n)}else i=r.url;i&&await e.cdp().Page.navigate({url:i})}async launch(e,r){let i=this.resolveParams(e);if(!i)return{blockSessionTermination:!1};let n=await this.prepareLaunch(i,r);return await this.finishLaunch(n,i),{blockSessionTermination:!0}}async terminate(){var e;await((e=this._targetManager)==null?void 0:e.closeBrowser())}async restart(){for(let e of this.targetList())e.type()==="page"&&e.restart()}async findBrowserByExe(e,r){var i;if(r==="*"){let n=await e.findWhere(s=>s.quality==="stable")||(await e.findAll())[0];return n==null?void 0:n.path}else return(0,bq.isQuality)(r)?(i=await e.findWhere(n=>n.quality===r))==null?void 0:i.path:r}targetList(){let e=this._targetManager;return e?e.targetList():[]}connectionForTest(){return this._connectionForTest}fireTerminatedEvent(){this._terminated||(this._terminated=!0,this._onTerminatedEmitter.fire({code:0,killed:!0}))}};ts=X([(0,la.injectable)(),x(0,(0,la.inject)(Mn)),x(1,(0,la.inject)(pe)),x(2,(0,la.inject)(et)),x(3,(0,la.inject)(dr)),x(4,(0,la.inject)(nt))],ts);var Au=class extends ts{constructor(r,i,n,s,o,a){super(r,i,o,a,s);this.browserFinder=n}resolveParams(r){return r.type==="pwa-chrome"&&r.request==="launch"&&r.browserLaunchLocation==="workspace"?r:void 0}async findBrowserPath(r){let i=await this.findBrowserByExe(this.browserFinder,r);if(!i||!await ec(this.fs,i))throw new re(Hm("Chrome",r,(await this.browserFinder.findAll()).map(n=>n.quality)));return i}};Au=X([(0,nn.injectable)(),x(0,(0,nn.inject)(Mn)),x(1,(0,nn.inject)(pe)),x(2,(0,nn.inject)(ka)),x(2,(0,nn.tagged)("browser","chrome")),x(3,(0,nn.inject)(nt)),x(4,(0,nn.inject)(et)),x(5,(0,nn.inject)(dr))],Au);var vq=w("crypto"),sn=F(ue()),_q=w("net"),wq=w("os"),Aq=w("path");var Fce=["--do-not-de-elevate"],Vl=class extends ts{constructor(r,i,n,s,o,a){super(r,i,o,a,s);this.browserFinder=n}resolveParams(r){return r.type==="pwa-msedge"&&r.request==="launch"&&r.browserLaunchLocation==="workspace"?r:void 0}launchBrowser(r,i,n,s){return super.launchBrowser({...r,runtimeArgs:r.runtimeArgs??Fce},i,n,s,r.useWebView?this.getWebviewPort(r,s):void 0)}getFilterForTarget(r){return r.useWebView&&r.urlFilter?vc(po(r)):super.getFilterForTarget(r)}async getWebviewPort(r,i){let n=Xe();if(!r.runtimeExecutable)return n.resolve(r.port),n.promise;let s=r.runtimeExecutable.split(/\\|\//).pop(),o=`VSCode_${(0,vq.randomBytes)(12).toString("base64")}`,a=`\\\\.\\pipe\\WebView2\\Debugger\\${s}\\${o}`,u=(0,_q.createServer)(c=>{c.on("data",async l=>{let p=JSON.parse(l.toString()),f=p.devtoolsActivePort||"",H=parseInt(f.split(`
`).shift()||""),m=r.port||H;n.resolve(m);let y=`ws://${r.address}:${m}/devtools/${p.type}/${p.id}`,b=await Dr.create(y,xr),A=new Mt(b,this.logger,i);await A.rootSession().Runtime.runIfWaitingForDebugger({}),A.close()})});return u.on("error",n.reject),u.on("close",()=>n.resolve(r.port)),u.listen(a),r.userDataDir=r.userDataDir||(0,Aq.join)((0,wq.tmpdir)(),`vscode-js-debug-userdatadir_${r.port}`),r.env=r.env||{},r.env.WEBVIEW2_USER_DATA_FOLDER=r.userDataDir.toString(),r.env.WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=`--remote-debugging-port=${r.port}`,r.env.WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER="true",r.env.WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER=o,n.promise}async findBrowserPath(r){let i=await this.findBrowserByExe(this.browserFinder,r);if(!i||!await ec(this.fs,i))throw new re(Hm("Edge",r,(await this.browserFinder.findAll()).map(n=>n.quality)));return i}};Vl=X([(0,sn.injectable)(),x(0,(0,sn.inject)(Mn)),x(1,(0,sn.inject)(pe)),x(2,(0,sn.inject)(ka)),x(2,(0,sn.tagged)("browser","edge")),x(3,(0,sn.inject)(nt)),x(4,(0,sn.inject)(et)),x(5,(0,sn.inject)(dr))],Vl);var qs=F(ue());var Iq=w("crypto"),tb=F(ue());var Uce=0,rs=class{constructor(e){this.portLeaseTracker=e;this.teardown=new WeakMap}async launch(e,r,i){this.server&&this.server.close();let n=`/${(0,Iq.randomBytes)(20).toString("hex")}`,s=this.server=await AH(this.portLeaseTracker,{perMessageDeflate:!0,host:"127.0.0.1",path:n}),o=++Uce;e.launchBrowserInCompanion({...i,serverPort:s.address().port,path:n,launchId:o});let a=await jn(new Promise((c,l)=>{s.once("connection",c),s.once("error",l)}),r,"Timed out waiting for browser connection"),u=new Dr(a);return this.teardown.set(u,()=>e.killCompanionBrowser({launchId:o})),u}close(e){var r;(r=this.teardown.get(e))==null||r()}dispose(){var e;(e=this.server)==null||e.close(),this.server=void 0}};rs=X([(0,tb.injectable)(),x(0,(0,tb.inject)(wi))],rs);var Gl=class extends $i{constructor(r,i,n,s){super(i,n,s);this.helper=r}resolveParams(r){return r.request==="attach"&&(r.type==="pwa-chrome"||r.type==="pwa-msedge")&&r.browserAttachLocation==="ui"}async acquireConnectionForBrowser(r,i){let n=await this.helper.launch(r.dap,r.cancellationToken,{type:i.type==="pwa-chrome"?"chrome":"edge",params:i,attach:{host:i.address,port:i.port}});return new Mt(n,this.logger,r.telemetryReporter)}};Gl=X([(0,qs.injectable)(),x(0,(0,qs.inject)(rs)),x(1,(0,qs.inject)(pe)),x(2,(0,qs.inject)(et)),x(3,(0,qs.optional)()),x(3,(0,qs.inject)(mo))],Gl);var Ws=F(ue());var Kl=class extends ts{constructor(r,i,n,s,o,a){super(r,i,n,s,o);this.helper=a}resolveParams(r){return(r.type==="pwa-chrome"||r.type==="pwa-msedge")&&r.request==="launch"&&r.browserLaunchLocation==="ui"?r:void 0}async launchBrowser(r,i,n,s){let o=await this.helper.launch(i,n,{type:r.type==="pwa-chrome"?"chrome":"edge",browserArgs:aE(new Us(r.runtimeArgs||[]),{hasUserNavigation:!!r.url,ignoreDefaultArgs:!r.includeDefaultArgs}).setConnection(r.port||"pipe").toArray(),params:r});return{cdp:new Mt(o,this.logger,s),process:{onExit:new J().event,onError:new J().event,transport:()=>Promise.resolve(o),kill:()=>this.helper.close(o)}}}async findBrowserPath(){throw new Error("not implemented")}};Kl=X([(0,Ws.injectable)(),x(0,(0,Ws.inject)(Mn)),x(1,(0,Ws.inject)(pe)),x(2,(0,Ws.inject)(et)),x(3,(0,Ws.inject)(dr)),x(4,(0,Ws.inject)(nt)),x(5,(0,Ws.inject)(rs))],Kl);var pa=F(ue()),Dq=w("net");var Xl=class extends $i{constructor(e,r,i){super(e,r,i)}resolveParams(e){return e.request==="attach"&&e.type==="pwa-msedge"&&typeof e.useWebView=="object"}async acquireConnectionForBrowser(e,r){let{getAppContainerProcessTokens:i}=await Promise.resolve().then(()=>F(Pq())),n=i(r.useWebView.pipeName);if(!n)throw new re(dD());let s=n.map(u=>(0,Dq.connect)(u)),o;try{o=await jn(Bu(s.map(u=>new Promise(c=>u.on("error",()=>c(void 0)).on("connect",()=>c(u))))),e.cancellationToken)}finally{for(let u of s)u!==o&&u.destroy()}if(!o)throw new re(hD());let a=new Ti(this.logger,o);return new Mt(a,this.logger,e.telemetryReporter)}};Xl=X([(0,pa.injectable)(),x(0,(0,pa.inject)(pe)),x(1,(0,pa.inject)(et)),x(2,(0,pa.optional)()),x(2,(0,pa.inject)(mo))],Xl);var Zl=F(ue()),Vq=w("net");var ui=F(ue());var uE=Symbol("ILinkedBreakpointLocation");var Bq=F(w("path"));var Wd=F(ue()),da=F(w("path")),Nq=w("url");var Tq=w("fs"),Vs=F(w("path")),cE=w("url");function ib(t,e){return t?(t.endsWith("/")||(t+="/"),t+e):e}async function nb(t,e,r,i,n){e=st(e)||e;let s;if(t){if(Vi(t))s=st(t);else if(fr(t))s=await i(t,r,n)||t;else if(Vs.isAbsolute(e))s=Xce(e,t);else{let o=new cE.URL(e).pathname,a=await i(o,r,n),u=Vs.dirname(a);s=to(u,t)}n.verbose("sourcemap.parsing","resolved sourceRoot",{sourceRoot:t,absSourceRoot:s})}else if(Vs.isAbsolute(e))s=Vs.dirname(e),n.verbose("sourcemap.parsing","no sourceRoot specified, using script dirname",{absSourceRoot:s});else{let o=new cE.URL(e).pathname||"/placeholder.js",a=await i(o,r,n);s=a?Vs.dirname(a):"",n.verbose("sourcemap.parsing","no sourceRoot specified, using webRoot + script path dirname",{absSourceRoot:s})}return s=PT(s),s=wt(s),s}var qd=async(t,e,r)=>{if(!t||!t.startsWith("/"))return"";let i=Object.keys(e).sort((n,s)=>s.length-n.length);for(let n of i){if(!n)continue;let s=e[n];if(n[0]!=="/"&&(r.verbose("sourcemap.parsing",`Keys should be absolute: ${n}`),n="/"+n),Gce(n,t))return Kce(n,s,t)}return""},$q=(t,e)=>async(r,i,n)=>{if(process.platform==="win32"&&/^[a-z]:/i.test(r))return r;let s=await Um(t,Vs.dirname(e),"package.json");if(!s)return qd(r,i,n);let o=await qd(r,TE(i,a=>a.length>=s.length),n);if(process.platform!=="win32"&&r!=="/"&&!o){let a=await Tq.promises.stat(r).catch(()=>{});if(a!=null&&a.isDirectory())return r}return o||s};function Gce(t,e){return t===e?!0:(t.endsWith("/")||(t+="/"),e.startsWith(t))}function Kce(t,e,r){let i=decodeURIComponent(r.substring(t.length));return i?to(e,i):e}function Xce(t,e){return Xr(Vs.dirname(t),e)}var Oq=F(yf()),Jl=F(w("path"));var ab="*",Mq=new RegExp(Ar(ab),"g"),sb="?:"+ab,zce=new RegExp(Ar(sb),"g"),lE=(t,e)=>{let r=e.match(t);return t.lastIndex=0,r?r.length:0},kq=new RegExp(`${Ar(sb)}|${Ar(ab)}`,"g"),ob=class{constructor(e,r){this.logger=r;this.replacers=[];let i=Object.keys(e).sort((n,s)=>s.replace(sb,"*").length-n.replace(sb,"*").length);for(let n of i){let s=e[n];if(!s.includes("*")&&/\$[0-9'`&]/.test(s)){this.replacers.push([new RegExp(`^${n}$`,"i"),s]);continue}let o=Ye(n),a=`"${o}": "${s}"`,u=lE(Mq,o)-lE(zce,o);if(u>1){r.warn("runtime.sourcemap",`Warning: only one asterisk allowed in a sourceMapPathOverrides entry - ${a}`);continue}if(lE(Mq,s)>u){r.warn("runtime.sourcemap",`The right side of a sourceMapPathOverrides entry must have 0 or 1 asterisks - ${a}}`);continue}let c="^",l=0;for(kq.lastIndex=0;;){let p=kq.exec(o);if(c+=Ar(o.slice(l,p==null?void 0:p.index),"/"),!p)break;p[0]===ab?c+="(.*?)":c+=".*?",l=p.index+p[0].length}u===0&&(c+="([\\/\\\\].*)?",s+="*"),this.replacers.push([new RegExp(c+"$","i"),s.replace(/\$/g,"$$$$").replace(/\*/,"$1")])}}apply(e){let r=Ye(e);for(let[i,n]of this.replacers){let s=r.replace(i,n);if(s!==r)return this.logger.verbose("runtime.sourcemap",`SourceMap: mapping ${e} => ${s}, via sourceMapPathOverrides entry - ${i.toString()}`),to(s)}return e}};var Jce=/\x00/,Rq,zl=class{constructor(e,r){this.options=e;this.logger=r;this.sourceMapOverrides=new ob(this.options.sourceMapOverrides,this.logger);this.resolvePatterns=(Rq=this.options.resolveSourceMapLocations)==null?void 0:Rq.map(e=>{let r=e.startsWith("!")?"!":"",i=e.slice(r.length).replace(/\.[a-z0-9]+$/,".*");if(!fr(i))return Ye(e);i=Ye(Xr(i));let n=o_(this.options.workspaceFolder),s=o_(i),o=0;for(let a=0;a<n.length&&a<s.length&&s[a].toLowerCase()===n[a].toLowerCase();a++)o+=n[a].length+1;return i=i.slice(0,o).replace(/[\[\]\(\)\{\}\!\*]/g,"\\$&")+i.slice(o),r+i})}shouldResolveSourceMap({sourceMapUrl:e,compiledPath:r}){if(r.startsWith(Wo))return!1;if(!this.resolvePatterns||this.resolvePatterns.length===0)return!0;let i=st(e)||tr(e)&&r||e;if(i.startsWith("webpack-internal:///"))return!0;let n=hm(e)?!1:B_(),s=this.rebaseRemoteToLocal(i);return(0,Oq.default)((s!==i?[i,s]:[i]).map(Ye),this.resolvePatterns,{dot:!0,nocase:!n}).length>0}rebaseRemoteToLocal(e){if(!this.options.remoteRoot||!this.options.localRoot||!this.canMapPath(e))return Jl.resolve(e);let r=Fp(this.options.remoteRoot,e);if(r.startsWith(".."))return"";let i=to(this.options.localRoot,r);return i=a_(i),this.logger.verbose("runtime.sourcemap",`Mapped remoteToLocal: ${e} -> ${i}`),Xr(i)}rebaseLocalToRemote(e){if(!this.options.remoteRoot||!this.options.localRoot||!this.canMapPath(e))return e;let r=Fp(this.options.localRoot,e),i=to(this.options.remoteRoot,r);return i=wt(i,!0),this.logger.verbose("runtime.sourcemap",`Mapped localToRemote: ${e} -> ${i}`),i}normalizeSourceMapUrl(e){e=e.replace(Jce,"");let r=e.lastIndexOf("?");return r!==-1&&e.slice(r-4,r)!==".vue"&&(e=e.slice(0,r)),e}canMapPath(e){return Jl.posix.isAbsolute(e)||Jl.win32.isAbsolute(e)||Vi(e)}};var pE="https?:\\/\\/[^\\/]+\\/",fa=class extends zl{constructor(r,i,n,s){super(n,s);this.vueMapper=r;this.fsUtils=i}absolutePathToUrlPath(r){r=da.normalize(r);let{baseUrl:i,pathMapping:n}=this.options,s=["/",n["/"]],o=Object.entries(n).sort(([c,l],[p,f])=>f.length-l.length||p.length-c.length).find(([,c])=>YP(c,r))||s;if(!o)return{url:We(r),needsWildcard:!1};let a=lo(da.relative(o[1],r)),u=o[0].replace(/\/$|^\//g,"");return u&&(a=u+"/"+a),!i&&!jm(a)?{url:a,needsWildcard:!0}:{url:km(i,a),needsWildcard:!1}}async urlToAbsolutePath({url:r,map:i}){let n=r.indexOf("?");return n!==-1&&r.slice(n-4,n)!==".vue"&&(r=r.slice(0,n)),i?this.sourceMapSourceToAbsolute(r,i):this.simpleUrlToAbsolute(r)}async simpleUrlToAbsolute(r){if(!r)return;if(Vi(r)){let o=st(r);if(await this.fsUtils.exists(o))return o;let a=DT(r);if(await this.fsUtils.exists(a))return a}let i;try{let o=new Nq.URL(r);if(!o.pathname||o.pathname==="/"?i="index.html":i=o.pathname,o.protocol==="webpack-internal:")return}catch{i=r}let n=da.extname(i),s=i.replace(/^\//,"").split(/[\/\\]/);for(;s.length>0;){let o="/"+s.join("/"),a=await qd(o,this.options.pathMapping,this.logger);if(a){if(!n&&await this.fsUtils.exists(a+".html"))return a+".html";if(await this.fsUtils.exists(a))return a}s.shift()}}async sourceMapSourceToAbsolute(r,i){if(!this.shouldResolveSourceMap(i.metadata))return;switch(this.vueMapper.getVueHandling(r)){case 2:return;case 1:let a=await this.vueMapper.lookup(r);if(a)return wt(a);break;default:}r=this.normalizeSourceMapUrl(r);let{pathMapping:n}=this.options,s=ib(i.sourceRoot,r),o=this.sourceMapOverrides.apply(s);if(o!==s){o=wt(o);let a=Xr(n["/"],"..","ClientApp",Fp(n["/"],o));return this.options.clientID==="visualstudio"&&s.startsWith("webpack:///")&&!await this.fsUtils.exists(o)&&await this.fsUtils.exists(a)?a:o}return Vi(r)?st(r):da.isAbsolute(r)?wt(r):Xr(await nb(i.sourceRoot,i.metadata.compiledPath,n,qd,this.logger),r)}absolutePathToUrlRegexp(r){let i=this.absolutePathToUrlPath(r),n=i.url,s=n.length;n.endsWith("index.html")?(s=n.length-10-1,n=n.slice(0,s)+"\\/?($|index(\\.html)?)"):n.endsWith(".html")&&(s=n.length-5,n=n.slice(0,s)+"(\\.html)?");let o=0;i.needsWildcard&&(n=pE+n,o=pE.length,s+=pE.length);let a=Fr(n,[o,s]);return i.needsWildcard?`${Fr(We(r))}|${a}`:a}};fa=X([(0,Wd.injectable)(),x(0,(0,Wd.inject)(_l)),x(1,(0,Wd.inject)(Or))],fa);var ub=class extends fa{constructor(r,i,n,s){super(r,i,n,s);this.blazorInCodespacesRegexpSubstitution="$1:\\$2";if(this.options.remoteFilePrefix){let o=`\\${Bq.default.sep}`,a=this.options.remoteFilePrefix.replace(new RegExp(o,"g"),o);this.blazorInCodespacesRegexp=new RegExp(`^${a}${o}([A-z])\\$${o}(.*)$`)}else this.blazorInCodespacesRegexp=new RegExp("")}absolutePathToUrlRegexp(r){if(this.options.remoteFilePrefix){let i=r.replace(this.blazorInCodespacesRegexp,this.blazorInCodespacesRegexpSubstitution),s=lo(i).replace(/^(\w):(.*)$/,"$1$2"),o=Fr(s);if(o){let a=`dotnet://.*\\.dll/${o}`;return this.logger.verbose("runtime.breakpoints","absolutePathToUrlRegexp.blazor.remoteFs",{absolutePath:r,dotnetUrlRegexp:a}),a}}else{let i=We(r),n=Fr(i),s=super.absolutePathToUrlRegexp(r);return n.includes(s)?n:`${n}|${s}`}return super.absolutePathToUrlRegexp(r)}};var Fq=w("url");function Uq(t){if("file"in t&&t.file)return qm(t.file);if(t.url)try{let e=new Fq.URL(t.url);return e.pathname="/",e.search="",e.hash="",e.protocol==="data:"?void 0:e.href}catch{}}var Iu=F(w("path")),qq=w("url");var jq="node:",on=class extends zl{constructor(r,i,n,s){super(n,s);this.fsUtils=r;this.linkedBp=i;this.options=n;this.logger=s}static shouldWarnAboutSymlinks(r){var i;return"runtimeArgs"in r&&!((i=r.runtimeArgs)!=null&&i.includes("--preserve-symlinks"))}static getOptions(r){return{workspaceFolder:r.__workspaceFolder,resolveSourceMapLocations:r.resolveSourceMapLocations,basePath:r.cwd,sourceMapOverrides:r.sourceMapPathOverrides,remoteRoot:r.remoteRoot,localRoot:r.localRoot}}derive(r){return new on(this.fsUtils,this.linkedBp,{...this.options,...r},this.logger)}get resolutionOptions(){return this.options}async urlToAbsolutePath({url:r,map:i}){if(r=this.normalizeSourceMapUrl(r),r.startsWith(jq)&&this.options.basePath)return r=Iu.join(this.options.basePath,"lib",r.slice(jq.length)),r.endsWith(".js")||(r+=".js"),r;if(i)return this.sourceMapSourceToAbsolute(r,i);let n=st(r);if(n)return this.rebaseRemoteToLocal(n);if(jm(r)){let o=this.sourceMapOverrides.apply(r);r=o===r?new qq.URL(r).pathname.slice(1):o}else if(Iu.isAbsolute(r))r=this.sourceMapOverrides.apply(r);else return`<node_internals>/${r}`;let s=Xr(this.options.basePath??"",r);return this.rebaseRemoteToLocal(s)}absolutePathToUrl(r){return We(this.rebaseLocalToRemote(Iu.normalize(r)))}async absolutePathToUrlRegexp(r){var n;let i=r;try{i=await this.fsUtils.realPath(r)}catch{}return Fm(i,r)?Fr(this.absolutePathToUrl(r)):((n=this.linkedBp)==null||n.warn(),Fr(this.absolutePathToUrl(r))+"|"+Fr(this.absolutePathToUrl(i)))}async sourceMapSourceToAbsolute(r,i){if(!this.shouldResolveSourceMap(i.metadata))return;let n=ib(i.sourceRoot,r),s=this.sourceMapOverrides.apply(n);return s!==n?wt(s):Vi(r)?st(r):!Iu.isAbsolute(r)&&this.options.basePath?Xr(await nb(this.options.remoteRoot&&fr(i.sourceRoot)&&this.rebaseRemoteToLocal(i.sourceRoot)||i.sourceRoot,i.metadata.compiledPath,{"/":this.options.basePath},$q(this.fsUtils,i.metadata.compiledPath),this.logger),r):this.rebaseRemoteToLocal(r)||r}};var an=Symbol("ISourcePathResolverFactory"),Yl=class{constructor(e,r){this.fsUtils=e;this.linkedBp=r}create(e,r){if(e.type==="pwa-node"||e.type==="node-terminal"||e.type==="pwa-extensionHost")return new on(this.fsUtils,on.shouldWarnAboutSymlinks(e)?this.linkedBp:void 0,on.getOptions(e),r);throw new Error(`Not usable for type ${e.type}`)}};Yl=X([(0,ui.injectable)(),x(0,(0,ui.inject)(Or)),x(1,(0,ui.optional)()),x(1,(0,ui.inject)(uE))],Yl);var Ql=class{constructor(e,r,i,n){this.initializeParams=e;this.vueMapper=r;this.fsUtils=i;this.linkedBp=n}create(e,r){if(e.type==="pwa-node"||e.type==="node-terminal"||e.type==="pwa-extensionHost")return new on(this.fsUtils,on.shouldWarnAboutSymlinks(e)?this.linkedBp:void 0,on.getOptions(e),r);{let i=!!e.inspectUri;return new(i?ub:fa)(this.vueMapper,this.fsUtils,{workspaceFolder:e.__workspaceFolder,resolveSourceMapLocations:e.resolveSourceMapLocations,baseUrl:Uq(e),localRoot:null,remoteRoot:null,pathMapping:{"/":e.webRoot,...e.pathMapping},sourceMapOverrides:e.sourceMapPathOverrides,clientID:this.initializeParams.clientID,remoteFilePrefix:e.__remoteFilePrefix},r)}}};Ql=X([(0,ui.injectable)(),x(0,(0,ui.inject)(dr)),x(1,(0,ui.inject)(_l)),x(2,(0,ui.inject)(Or)),x(3,(0,ui.optional)()),x(3,(0,ui.inject)(uE))],Ql);var Wq=w("url");var cb=class extends aa{constructor(){super(...arguments);this.baseFilter=po(this.launchParams);this.filter=r=>{let{debugWebWorkerExtHost:i,debugWebviews:n}=this.launchParams;return!!(i&&(r.type==="worker"&&r.title==="DebugWorkerExtensionHost"||r.type==="page"&&r.title.includes("[Extension Development Host]"))||n&&r.type==="iframe"&&this.baseFilter(r))}}static async connectRenderer(r,i,n,s,o,a){let c=await r.rootSession().Target.attachToBrowserTarget({});if(!c)return;let l=r.createSession(c.sessionId);return new this(r,void 0,l,i,s,o,n,a)}waitForMainTarget(r){let i=this.launchParams;return i.debugWebWorkerExtHost&&this._browser.Target.on("targetCreated",this.enqueueLifecycleFn(async({targetInfo:n})=>{if(!n.url.includes(i.__sessionId))return;let s=await this._browser.Target.attachToTarget({targetId:n.targetId,flatten:!0});s&&this.attachedToTarget(n,s.sessionId,!1)})),super.waitForMainTarget(r)}attachedToTarget(r,i,n,s){let o=super.attachedToTarget(r,i,n||this.filter(r),s,!1);return r.type==="iframe"&&o.setComputeNameFn(Yce),o}},Yce=t=>{let e;try{e=new Wq.URL(t.targetInfo.url)}catch{return}switch(e.searchParams.get("purpose")){case"customEditor":return`${e.searchParams.get("extensionId")} editor: ${e.host}`;case"notebookRenderer":return`Notebook Renderer: ${e.host}`;default:let r=e.searchParams.get("extensionId");return`Webview: ${r?r+" ":""} ${e.host}`}};var un=class extends $i{constructor(r,i,n){super(r,i);this.pathResolverFactory=n}async launch(r,i){if(r.type!=="pwa-extensionHost"||r.request!=="attach")return{blockSessionTermination:!1};let n=un.debugIdToRendererDebugPort.get(r.__sessionId);if(!n)return{blockSessionTermination:!1};let s=_c({name:"Webview",type:"pwa-chrome",request:"attach",port:n,__workspaceFolder:r.__workspaceFolder,urlFilter:"",...r.rendererDebugOptions});return s.__sessionId=r.__sessionId,s.debugWebWorkerExtHost=r.debugWebWorkerHost,s.debugWebviews=r.debugWebviews,super.launch(s,i).catch(o=>this.logger.error("runtime.exception","Error in webview attach",{err:o})),{blockSessionTermination:!1}}async acquireConnectionInner(r,i,n){let s=new Je,o=await new Promise((a,u)=>{let c=(0,Vq.createConnection)({port:i.port},()=>a(c));c.on("error",u),s.push(n.onCancellationRequested(()=>{c.destroy(),u(new Error("connection timed out"))}))}).finally(()=>s.dispose());return new Mt(new Ti(this.logger,o),this.logger,r)}async getTargetFilter(r){return r.filter}async createTargetManager(r,i,n){return new cb(r,void 0,r.rootSession(),this.pathResolverFactory.create(i,this.logger),this.logger,n.telemetryReporter,i,n.targetOrigin)}};un.debugIdToRendererDebugPort=new Map,un=X([(0,Zl.injectable)(),x(0,(0,Zl.inject)(pe)),x(1,(0,Zl.inject)(et)),x(2,(0,Zl.inject)(an))],un);var ha=class{constructor(){this.target={queue:[]}}connectTo(e){this.target={logger:e}}info(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:1})}verbose(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:0})}warn(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:2})}error(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:3})}fatal(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:4})}log(e){this.target&&("queue"in this.target?this.target.queue.push(e):this.target.logger.log(e))}getRecentLogs(){return this.target?"queue"in this.target?this.target.queue:this.target.logger.getRecentLogs():[]}assert(e,r){if(e===!1||e===void 0||e===null){if(this.error("runtime.assertion",r,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(r);debugger;return!1}return!0}setup(){throw new Error("A ProxyLogger cannot be setup()")}dispose(){this.target=void 0}forTarget(){return new ha}};var Gq=Symbol("ITargetOrigin"),lb=class{constructor(e){this.id=e}},pb=class{constructor(e){this.id=e}};var fb=class{constructor(e,r){this.parentList=e;this.logger=r;this.targets=new zn;this.onTerminatedEmitter=new J;this.onTerminated=this.onTerminatedEmitter.event;this.onTargetListChanged=this.targets.onChanged;e.onAdd(([,i])=>{i.parent&&this.targets.get(i.parent.id)&&this.targets.add(i.id,i.target)}),e.onRemove(([i])=>{this.targets.remove(i)&&!this.targets.size&&this.onTerminatedEmitter.fire({killed:!0,code:0})})}async launch(e,r){if(e.type!=="node-terminal"||e.request!=="attach")return{blockSessionTermination:!1};let i=this.parentList.get(e.delegateId);if(i===void 0)return setTimeout(()=>this.onTerminatedEmitter.fire({killed:!0,code:0}),1),{blockSessionTermination:!0};let n=i.target.targetOrigin();if(!(n instanceof pb))throw new Error("Expected delegate session to have a mutable target origin");let s=i.target.logger;if(!(s instanceof ha))throw new Error("Expected delegate session to have a proxy logger");return n.id=r.targetOrigin.id,s.connectTo(this.logger),setTimeout(()=>{this.targets.add(e.delegateId,i.target),i.dap.connect(r.dap)},0),{blockSessionTermination:!0}}terminate(){for(let e of this.targets.value())e.stop();return Promise.resolve()}restart(){for(let e of this.targets.value())e.restart();return Promise.resolve()}targetList(){return[...this.targets.value()]}dispose(){this.terminate()}};var Kq=F(ue());var Qce=0,Su=class{constructor(){this.delegateSessions=new zn;this.refsByTarget=new WeakMap}createLauncher(e){return new fb(this.delegateSessions,e)}addDelegate(e,r,i){let n={id:Qce++,target:e,dap:r,parent:i&&this.refsByTarget.get(i)};return this.refsByTarget.set(e,n),this.delegateSessions.add(n.id,n),n.id}removeDelegate(e){let r=this.refsByTarget.get(e);r&&this.delegateSessions.remove(r.id)}};Su=X([(0,Kq.injectable)()],Su);var u8=F(ue());var Ke=class{constructor(e,r,i){this.major=e;this.minor=r;this.patch=i}static parse(e){let r=e.split(".").map(Number);if(r.length!==3||r.some(isNaN))throw new SyntaxError(`Input string '${e}' is not a semver`);return new Ke(r[0],r[1],r[2])}static min(e,r){return e.lt(r)?e:r}compare(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch}gt(e){return this.compare(e)>0}gte(e){return this.compare(e)>=0}lt(e){return this.compare(e)<0}lte(e){return this.compare(e)<=0}toString(){return`${this.major}.${this.minor}.${this.patch}`}};var n8=F(ue());var r8=F(zq()),ss=F(w("fs")),xu=F(ue()),i8=F(w("net")),mE=F(w("os")),HE=F(w("path"));var mb=class{constructor(e,r){this.sessionId=e;this.sink=r;this.onMessageEmitter=new J;this.onEndEmitter=new J;this.disposables=new Je;this.onMessage=this.onMessageEmitter.event;this.onEnd=this.onEndEmitter.event;this.disposables.push(r.NodeWorker.on("detachedFromWorker",i=>{i.sessionId===e&&(this.onEndEmitter.fire(),this.dispose())}),r.NodeWorker.on("receivedMessageFromWorker",i=>{i.sessionId===e&&this.onMessageEmitter.fire([i.message,new Lr])}))}send(e){this.sink.NodeWorker.sendMessageToWorker({message:e,sessionId:this.sessionId})}dispose(){this.disposables.isDisposed||(this.disposables.dispose(),this.onEndEmitter.fire())}};var dE=w("path"),P$e=(0,dE.join)(__dirname,"watchdog.js"),Jq=(0,dE.join)(__dirname,"bootloader.js");var Xd=F(Ct()),Mi=F(ue()),is=w("path");var Vd=F(ue()),Yq=w("path");var Eu=Symbol("IPackageJsonProvider");var ep=class{constructor(e,r){this.fs=e;this.config=r;this.getPath=Be(async()=>{if(this.config.type!=="pwa-node"||this.config.request!=="launch")return;let e=await Um(this.fs,this.config.cwd,"package.json");return e?(0,Yq.join)(e,"package.json"):void 0});this.getContents=Be(async()=>{let e=await this.getPath();if(e)try{let r=await this.fs.readFile(e);return JSON.parse(r.toString())}catch{return}})}};ep=X([(0,Vd.injectable)(),x(0,(0,Vd.inject)(Or)),x(1,(0,Vd.inject)(Fe))],ep);var ma=Symbol("INodeBinaryProvider");function Qq(t,e){return t.has(1)?e.addNodeOption("--inspect-publish-uid=http"):e}var sle=new Set(["npm","yarn","pnpm","tnpm","cnpm"]),Zq=t=>sle.has((0,is.basename)(t,(0,is.extname)(t))),e8=(t,e)=>{if(!(!t||!Zq(t)))return e.find(r=>!r.startsWith("-")&&r!=="run"&&r!=="run-script")},hE=new Ke(12,0,0),ole=new Ke(8,0,0),ale=[{inclusiveMin:new Ke(16,0,0),inclusiveMax:new Ke(16,3,99),message:Xd.t("Some breakpoints might not work in your version of Node.js. We recommend upgrading for the latest bug, performance, and security fixes. Details: https://aka.ms/AAcsvqm")},{inclusiveMin:new Ke(7,0,0),inclusiveMax:new Ke(8,99,99),message:Xd.t("You're running an outdated version of Node.js. We recommend upgrading for the latest bug, performance, and security fixes.")}],cn=class{constructor(e,r){this.path=e;this.version=r;this.capabilities=new Set;r===void 0&&(r=hE),r.gte(new Ke(12,0,0))&&this.capabilities.add(0),r.gte(new Ke(12,6,0))&&this.capabilities.add(1)}get isPreciselyKnown(){return this.version!==void 0}get warning(){if(this.version){for(let e of ale)if(e.inclusiveMax.gte(this.version)&&e.inclusiveMin.lte(this.version))return e}}has(e,r){return!this.isPreciselyKnown&&r!==void 0?r:this.capabilities.has(e)}},Kd=class extends re{constructor(r,i){super(aD(r.toString(),i));this.version=r;this.location=i}},ule=["node","node64","electron"],cle=new Map([[11,new Ke(12,0,0)],[10,new Ke(12,0,0)],[9,new Ke(12,0,0)],[8,new Ke(12,0,0)],[7,new Ke(12,0,0)],[6,new Ke(12,0,0)],[5,new Ke(10,0,0)],[4,new Ke(10,0,0)],[3,new Ke(10,0,0)],[2,new Ke(8,0,0)],[1,new Ke(8,0,0)]]),Gd=class{constructor(e,r,i){this.logger=e;this.fs=r;this.packageJson=i;this.knownGoodMappings=new Map}async resolveAndValidate(e,r="node",i,n){try{return await this.resolveAndValidateInner(e,r,i,n)}catch(s){if(!(s instanceof Kd))throw s;if(await this.shouldTryDebuggingAnyway(s))return new cn(s.location,s.version instanceof Ke?s.version:void 0);throw s}}shouldTryDebuggingAnyway(e){return Promise.resolve(!1)}async resolveAndValidateInner(e,r,i,n){let s=await this.resolveBinaryLocation(r,e);if(this.logger.info("runtime.launch","Using binary at",{location:s,executable:r}),!s)throw new re(p_(r,Xd.t("path does not exist")));if(i)return new cn(s,new Ke(i,0,0));let o=CT(s);if(!ule.includes(o)){if(Zq(s)){let y=await this.packageJson.getPath();y&&(e=e.addToPath((0,is.resolve)((0,is.dirname)(y),"node_modules/.bin"),"prepend"))}try{let y=await this.resolveAndValidateInner(e,"node",void 0,n);return new cn(s,y.version)}catch(y){if(HD(y,9230))throw y;return new cn(s,void 0)}}if(s.startsWith("/snap/"))return new cn(s,void 0);let a=this.knownGoodMappings.get(s);if(a)return a;let u=await this.getVersionText(s,n);if(!u)return new cn(s,void 0);this.logger.info("runtime.launch","Discovered version",{version:u});let c=/v([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(u);if(!c)throw new Kd(u,s);let[,l,p,f]=c.map(Number),H=new Ke(l,p,f);if(o==="electron"){let y=await this.resolveAndValidate(e);H=Ke.min(cle.get(H.major)??hE,y.version??hE)}if(H.lt(ole))throw new Kd(H,s);let m=new cn(s,H);return this.knownGoodMappings.set(s,m),m}async resolveBinaryLocation(e,r){return e&&(0,is.isAbsolute)(e)?await XP(this.fs,e,r):await dm(this.fs,e,r.value)}async getVersionText(e,r){var i;try{let{stdout:n}=await Xg(e,["--version"],{env:xt.processEnv().defined(),cwd:r});return n.trim()}catch(n){throw r&&!((i=await eo(this.fs,r))!=null&&i.isDirectory())?new re(oD(r)):new re(p_(e,n.message))}}};Gd=X([(0,Mi.injectable)(),x(0,(0,Mi.inject)(pe)),x(1,(0,Mi.inject)(nt)),x(2,(0,Mi.inject)(Eu))],Gd);var tp=class extends Gd{constructor(r,i,n,s){super(r,i,n);this.vscode=s}async shouldTryDebuggingAnyway({message:r}){if(!this.vscode)return!1;let i=Xd.t("Yes");return await this.vscode.window.showErrorMessage(r,i)===i}};tp=X([x(0,(0,Mi.inject)(pe)),x(1,(0,Mi.inject)(nt)),x(2,(0,Mi.inject)(Eu)),x(3,(0,Mi.optional)()),x(3,(0,Mi.inject)(mo))],tp);var t8=w("path");var Hb=class{constructor(e,r,i,n,s,o,a={},u){this.launchConfig=e;this.targetOriginValue=r;this.connection=i;this.targetInfo=s;this.logger=o;this.lifecycle=a;this._parent=u;this._serialize=Promise.resolve(void 0);this._attached=!1;this._onNameChangedEmitter=new J;this._onDisconnectEmitter=new J;this.entryBreakpoint=void 0;this.onDisconnect=this._onDisconnectEmitter.event;this.onNameChanged=this._onNameChangedEmitter.event;this.connection=i,this._cdp=n,n.pause(),this._waitingForDebugger=s.type==="waitingForDebugger",s.title?this._targetName=`${(0,t8.basename)(s.title)} [${s.processId}]`:this._targetName=`[${s.processId}]`,n.Target.on("targetDestroyed",()=>this.connection.close()),i.onDisconnected(()=>this._disconnected())}id(){return this.targetInfo.targetId}processId(){return this.targetInfo.processId}name(){return this._targetName}fileName(){return this.targetInfo.title}type(){return"node"}targetOrigin(){return this.targetOriginValue}parent(){return this._parent}async initialize(){this.lifecycle.initialized&&(this.entryBreakpoint=await this.lifecycle.initialized(this)||void 0)}waitingForDebugger(){return this._waitingForDebugger}scriptUrlToUrl(e){return e[0]==="/"||process.platform==="win32"&&e[1]===":"&&e[2]==="\\"?We(e):e}supportsCustomBreakpoints(){return!1}executionContextName(){return this._targetName}hasParent(){return!!this._parent}async runIfWaitingForDebugger(){await this._cdp.Runtime.runIfWaitingForDebugger({})}async _disconnected(){this._onDisconnectEmitter.fire()}canAttach(){return!this._attached}async attach(){return this._serialize=this._serialize.then(async()=>{if(!this._attached)return this._doAttach()}),this._serialize}async _doAttach(){this._waitingForDebugger=!1,this._attached=!0;let e=await this._cdp.Target.attachToTarget({targetId:this.targetInfo.targetId});if(!e){this.logger.info("runtime.launch","Failed to attach to target",{targetId:this.targetInfo.targetId});return}this._cdp.NodeWorker.enable({waitForDebuggerOnStart:!0}),e&&"__dynamicAttach"in e&&(await this._cdp.Runtime.enable({}),await this._cdp.Debugger.enable({}));let r;return this._cdp.Runtime.on("executionContextCreated",i=>{i.context.auxData&&i.context.auxData.isDefault&&(r=i.context.id)}),this._cdp.Runtime.on("executionContextDestroyed",i=>{i.executionContextId===r&&this.connection.close()}),this._cdp}async afterBind(){this._cdp.resume()}canDetach(){return this._attached}async detach(){this._serialize=this._serialize.then(async()=>{if(this._waitingForDebugger){let e=await this._doAttach();await(e==null?void 0:e.Runtime.runIfWaitingForDebugger({}))}this._attached&&this._doDetach()})}async _doDetach(){await Promise.all([this._cdp.Target.detachFromTarget({targetId:this.targetInfo.targetId}),this._cdp.NodeWorker.disable({})]),this.connection.close(),this._attached=!1}canRestart(){return!1}restart(){}canStop(){return!0}stop(){try{this.lifecycle.close&&this.lifecycle.close(this)}finally{this.connection.close()}}};var ns=class{constructor(e,r,i,n){this.pathProvider=e;this.logger=r;this.portLeaseTracker=i;this.pathResolverFactory=n;this.serverConnections=new Set;this.targets=new zn;this.onTerminatedEmitter=new J;this.onTerminated=this.onTerminatedEmitter.event;this.onTargetListChanged=this.targets.onChanged;this.bootloaderFile=Be(this.getBootloaderFile.bind(this))}async launch(e,r){let i=this.resolveParams(e);if(!i)return{blockSessionTermination:!1};this._stopServer();let{server:n,pipe:s}=await this._startServer(r.telemetryReporter),o=this.logger.forTarget(),a=this.run={server:n,serverAddress:s,params:i,context:r,logger:o,pathResolver:this.pathResolverFactory.create(i,this.logger)};return await this.launchProgram(a),{blockSessionTermination:!0}}async terminate(){this.program?await this.program.stop():this.onProgramTerminated({code:0,killed:!0})}async restart(e){if(!this.run)return;let r=this.program;r&&(this.program=void 0,await r.stop(),await Promise.race([Me(2e3).then(()=>!1),Promise.all([...this.serverConnections].map(n=>new Promise(s=>n.onDisconnected(s))))])||(this.logger.warn("runtime.launch","Timeout waiting for server connections to close"),this.closeAllConnections())),await this.launchProgram({...this.run,params:e?this.resolveParams(e)??this.run.params:this.run.params,context:{...this.run.context,cancellationToken:this.run.params.timeout>0?Jt.withTimeout(this.run.params.timeout).token:xr}})}targetList(){return[...this.targets.value()]}dispose(){this._stopServer()}onProgramTerminated(e){this.onTerminatedEmitter.fire(e),this._stopServer(),this.program=void 0}resolveNodePath(e,r="node"){return this.pathProvider.resolveAndValidate(xt.merge(xt.processEnv(),this.getConfiguredEnvironment(e)),r,e.nodeVersionHint,e.cwd)}getConfiguredEnvironment(e){let r=xt.empty;if(e.envFile)try{r=r.merge(lle(e.envFile))}catch(i){throw new re(sD(i.message))}return r.merge(e.env)}async resolveEnvironment({params:e,serverAddress:r},i,n){let s=this.getConfiguredEnvironment(e),o=await this.bootloaderFile(e.cwd,i),a={inspectorIpc:r,deferredMode:!1,waitForDebugger:"",execPath:await dm(ss.promises,"node",process.env),onlyEntrypoint:!e.autoAttachChildProcesses,verbose:e.trace===!0||typeof e.trace=="object"&&e.trace.stdio?!0:void 0,autoAttachMode:"always",mandatePortTracking:this.portLeaseTracker.isMandated?!0:void 0,...n},u={NODE_OPTIONS:`--require ${o.interpolatedPath}`,VSCODE_INSPECTOR_OPTIONS:JSON.stringify(a),ELECTRON_RUN_AS_NODE:null},c=s.lookup("NODE_OPTIONS");c&&(u.NODE_OPTIONS+=` ${c}`);let l=xt.processEnv().lookup("NODE_OPTIONS");return l&&(u.NODE_OPTIONS+=` ${l}`),s.merge({...u})}createLifecycle(e,r,i){return{}}async _startServer(e){let r=KP(),i=await new Promise((n,s)=>{let o=i8.createServer(a=>this._startSession(a,e)).on("error",s).listen(r,()=>n(o))});return{pipe:r,server:i}}_stopServer(){var e,r;(e=this.run)==null||e.server.close(),this.run=void 0,(r=this.bootloaderFile.value)==null||r.then(i=>i.dispose()),this.bootloaderFile.forget(),this.closeAllConnections()}closeAllConnections(){this.serverConnections.forEach(e=>e.close()),this.serverConnections.clear()}async _startSession(e,r){if(!this.run)return;let{connection:i,cdp:n,targetInfo:s}=await this.acquireTarget(e,r,this.run.logger);if(!this.run){e.destroy();return}s.processId===void 0&&(s.processId=Number(s.targetId));let o=new Hb(this.run.params,this.run.context.targetOrigin,i,n,s,this.run.logger,this.createLifecycle(n,this.run,s),s.openerId?this.targets.get(s.openerId):void 0);this.listenToWorkerDomain(n,r,o),this.targets.add(s.targetId,o),o.onDisconnect(()=>this.targets.remove(s.targetId))}async listenToWorkerDomain(e,r,i){e.NodeWorker.on("attachedToWorker",n=>{let s=new mb(n.sessionId,e),o=new el(i.launchConfig,{attached:!0,canAccessOpener:!1,type:"node-worker",targetId:`${i.id()}-${n.sessionId}`,title:n.workerInfo.title,url:n.workerInfo.url,openerId:i.id()},i,i.targetOrigin(),new Mt(s,i.logger,r).rootSession(),i.logger),a=new Je;a.push(s),a.push(i.onDisconnect(()=>a.dispose())),a.push(s.onEnd(()=>a.dispose())),a.callback(()=>this.targets.remove(o.id())),this.targets.add(o.id(),o)})}async acquireTarget(e,r,i){let n=new Mt(new Ti(i,e),i,r);this.serverConnections.add(n),n.onDisconnected(()=>this.serverConnections.delete(n));let s=n.rootSession(),{targetInfo:o}=await new Promise(c=>s.Target.on("targetCreated",c)),a=o,u=this.portLeaseTracker.register(a.processInspectorPort);return n.onDisconnected(()=>u.dispose()),{targetInfo:a,cdp:s,connection:n,logger:i}}async getBootloaderFile(e,r){let i=Ye(Jq);if(!i.includes(" "))return{interpolatedPath:i,dispose:()=>{}};if(r.has(0))return{interpolatedPath:`"${i}"`,dispose:()=>{}};let n=`require(${JSON.stringify(i)})`;if(!mE.tmpdir().includes(" ")||!e){let a=HE.join(mE.tmpdir(),"vscode-js-debug-bootloader.js");return await ss.promises.writeFile(a,n),{interpolatedPath:a,dispose:()=>{}}}let s=".vscode-js-debug-bootloader.js",o=HE.join(e,s);return await ss.promises.writeFile(o,n),{interpolatedPath:`./${s}`,dispose:()=>ss.unlinkSync(o)}}async gatherTelemetryFromCdp(e,r){for(let i=0;i<8;i++){let n=await e.Runtime.evaluate({contextId:1,returnByValue:!0,expression:"typeof process === 'undefined' || process.pid === undefined ? 'process not defined' : ({ processId: process.pid, nodeVersion: process.version, architecture: process.arch })"+Ht()});if(!this.program)return;if(!n||!n.result.value){this.logger.error("runtime.target","Undefined result getting telemetry");return}if(typeof n.result.value!="object"){this.logger.info("runtime.target","Process not yet defined, will retry"),await Me(50*2**i);continue}let s=n.result.value;return r.context.telemetryReporter.report("nodeRuntime",{version:s.nodeVersion,arch:s.architecture}),this.program.gotTelemetery(s),s}}};ns=X([(0,xu.injectable)(),x(0,(0,xu.inject)(ma)),x(1,(0,xu.inject)(pe)),x(2,(0,xu.inject)(wi)),x(3,(0,xu.inject)(an))],ns);function lle(t){if(!ss.existsSync(t))return{};let e=ple(ss.readFileSync(t,"utf8"));return r8.parse(Buffer.from(e))}function ple(t){return t&&t[0]==="\uFEFF"&&(t=t.substr(1)),t}var Ha=class extends ns{};Ha=X([(0,n8.injectable)()],Ha);var gb=class{constructor(e,r){this.a=e;this.b=r;this.stopped=Promise.race([this.a.stopped.then(async e=>await this.b.stop()&&e),this.b.stopped.then(async e=>await this.a.stop()&&e)])}gotTelemetery(e){this.a.gotTelemetery(e),this.b.gotTelemetery(e)}async stop(){return(await Promise.all([this.a.stop(),this.b.stop()]))[0]}},yb=class{constructor(e,r,i){this.child=e;this.logger=r;this.killBehavior=i;this.killed=!1;this.stopped=new Promise((n,s)=>{e.once("exit",o=>n({killed:this.killed,code:o||0})),e.once("error",o=>s({killed:this.killed,code:1,error:o}))})}gotTelemetery(){}stop(){return this.killed=!0,js(this.child.pid,this.logger,this.killBehavior),this.stopped}},Lu=class{constructor(){this.stopped=new Promise(e=>this.stopDefer=e)}gotTelemetery(e){this.telemetry=e}stop(){return this.stopDefer({code:0,killed:!0}),this.stopped}},ya=class extends Lu{constructor(r){super();this.wd=r;r.onEnd(i=>{this.stopDefer(i),this.wd.dispose()})}stop(){return this.wd.dispose(),this.stopped}},zd=class{constructor(e,r,i){this.terminalResult=e;this.logger=r;this.killBehavior=i;this.didStop=!1;this.stopped=new Promise(e=>this.onStopped=r=>{this.didStop=!0,e({code:0,killed:r})});e.processId&&this.startPollLoop(e.processId)}gotTelemetery({processId:e}){if(this.didStop){js(e,this.logger,this.killBehavior);return}this.loop||this.startPollLoop(e)}stop(){return this.didStop?this.stopped:(this.didStop=!0,this.loop?(js(this.loop.processId,this.logger,this.killBehavior),this.startPollLoop(this.loop.processId,zd.killConfirmInterval)):this.terminalResult.shellProcessId?(js(this.terminalResult.shellProcessId,this.logger,this.killBehavior),this.startPollLoop(this.terminalResult.shellProcessId,zd.killConfirmInterval)):this.onStopped(!0),this.stopped)}startPollLoop(e,r=zd.terminationPollInterval){this.loop&&clearInterval(this.loop.timer);let i={processId:e,timer:setInterval(()=>{fle(e)||(clearInterval(i.timer),this.onStopped(!0))},r)};this.loop=i}},ga=zd;ga.terminationPollInterval=1e3,ga.killConfirmInterval=200;function fle(t){try{return process.kill(t,0),!0}catch{return!1}}var a8=F(w("net"));var s8=w("crypto"),o8=()=>(0,s8.randomBytes)(12).toString("hex");var ki=class{constructor(e,r){this.info=e;this.server=r;this.onEndEmitter=new J;this.cts=new Jt;this.gracefulExit=!1;this.targetAlive=!1;this.targetInfo={targetId:this.info.ownId??o8(),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 r=await new Promise((n,s)=>{let o=a8.createConnection(e.ipcAddress,()=>n(o));o.on("error",s)}),i=new Ti(Li.null,r);return new ki(e,i)}listenToServer(){let{server:e,targetInfo:r}=this;e.send(JSON.stringify({method:"Target.targetCreated",params:{targetInfo:r}})),e.onMessage(async([i])=>{if(this.target&&!i.includes("Target.attachToTarget")&&!i.includes("Target.detachFromTarget")){this.target.send(i);return}let n=await this.execute(i);n&&e.send(JSON.stringify(n))}),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 i;let r=JSON.parse(e);switch(r.method){case"Target.attachToTarget":return this.target&&this.disposeTarget(),this.target=await this.createTarget(),{id:r.id,result:{sessionId:this.targetInfo.targetId,__dynamicAttach:this.info.dynamicAttach?!0:void 0}};case"Target.detachFromTarget":return this.gracefulExit=!0,this.disposeTarget(),{id:r.id,result:{}};default:(i=this.target)==null||i.send(r);return}}async createTarget(){this.gracefulExit=!1;let e=await Dr.create(this.info.inspectorURL,this.cts.token,this.info.remoteHostHeader);return e.onMessage(([r])=>this.server.send(r)),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 gE=class extends ya{constructor(r,i){super(r);this.logger=i;this.stopped.then(()=>{this.telemetry&&js(this.telemetry.processId,this.logger,"polite")})}},rp=class extends Ha{constructor(){super(...arguments);this.restarting=!1}async restart(){var r;this.restarting=!0,this.onProgramTerminated({code:0,killed:!0,restart:!0}),(r=this.program)==null||r.stop()}resolveParams(r){return r.type==="pwa-extensionHost"&&r.request==="attach"?r:void 0}async launchProgram(r){let i=await ql(`http://localhost:${r.params.port}`,r.context.cancellationToken,this.logger),n=await ki.attach({ipcAddress:r.serverAddress,scriptName:"Extension Host",inspectorURL:i,waitForDebugger:!0,dynamicAttach:!0}),s=this.program=new gE(n,this.logger);this.program.stopped.then(o=>{s===this.program&&this.onProgramTerminated(o)})}createLifecycle(r,i,n){return n.openerId?{}:{initialized:()=>this.onFirstInitialize(r,i,n)}}async onFirstInitialize(r,i,n){this.setEnvironmentVariables(r,i,n.targetId);let s=await this.gatherTelemetryFromCdp(r,i),o=this.program;if(s&&o){let a=new ga({processId:s.processId},this.logger,"forceful");a.stopped.then(()=>o.stop()),o.stopped.then(()=>{this.restarting||a.stop()})}}async setEnvironmentVariables(r,i,n){if(!i.params.autoAttachChildProcesses)return;let s=await this.resolveEnvironment(i,new cn("node",Ke.parse(process.versions.node)),{openerId:n});for(let o=0;o<200;o++){let a=await r.Runtime.evaluate({contextId:1,returnByValue:!0,expression:`Object.assign(process.env, ${JSON.stringify(s.defined())})`+Ht()});if(!a)this.logger.error("runtime.target","Undefined result setting child environment vars");else if(a.exceptionDetails)this.logger.error("runtime.target","Error setting child environment vars",a.exceptionDetails);else return;await Me(50)}}};rp=X([(0,u8.injectable)()],rp);var Jd=w("fs"),c8=F(ue());var ip=class extends ns{resolveParams(e){return e.type==="pwa-extensionHost"&&e.request==="launch"?e:void 0}async launchProgram(e){let r=e.params.port||await _H(),i=await e.context.dap.launchVSCodeRequest({args:dle(e.params,r),env:this.getConfiguredEnvironment(e.params).defined(),debugRenderer:e.params.debugWebviews||e.params.debugWebWorkerHost});i.rendererDebugPort&&un.debugIdToRendererDebugPort.set(e.params.__sessionId,i.rendererDebugPort),this.program=new Lu,this.program.stop()}};ip=X([(0,c8.injectable)()],ip);var dle=(t,e)=>{let r=t.args.map(i=>{if(i.startsWith("-")){let n=i.split("=",2);return n.length===2&&((0,Jd.existsSync)(n[1])||(0,Jd.existsSync)(n[1]+".js"))?{prefix:n[0]+"=",path:n[1]}:{prefix:i}}else{try{let n=(0,Jd.lstatSync)(i);if(n.isDirectory())return{prefix:"--folder-uri=",path:i};if(n.isFile())return{prefix:"--file-uri=",path:i}}catch{}return{path:i}}});return t.noDebug||r.unshift({prefix:`--inspect-brk-extensions=${e}`}),r.unshift({prefix:`--debugId=${t.__sessionId}`}),r};var A8=F(Ct()),Pu=F(ue());var l8=w("crypto"),Yd=w("fs"),p8=w("os"),f8=F(w("path")),bb=class{constructor(){this.disposed=!1;this.path=f8.join((0,p8.tmpdir)(),`node-debug-callback-${(0,l8.randomBytes)(8).toString("hex")}`);this.file=Yd.promises.open(this.path,"w")}static isValid(e){try{let r=(0,Yd.readFileSync)(e);return r.length?r.readDoubleBE()>Date.now()-bb.recencyDeadline:!1}catch{return!1}}async startTouchLoop(){await this.touch(),this.disposed||(this.updateInterval=setInterval(()=>this.touch(),bb.updateInterval))}async touch(e=()=>Date.now()){let r=await this.file,i=Buffer.alloc(8);i.writeDoubleBE(e()),await r.write(i,0,i.length,0)}async dispose(){if(!this.disposed){this.disposed=!0,this.updateInterval&&clearInterval(this.updateInterval);try{await(await this.file).close(),await Yd.promises.unlink(this.path)}catch{}}}},np=bb;np.updateInterval=1e3,np.recencyDeadline=2e3;var y8=w("fs");var m8=w("path");var d8=w("child_process"),h8=F(zy()),sp=class{constructor(e=d8.spawn){this.spawn=e}lookup(e,r){return new Promise((i,n)=>{let s=this.createProcess(),o=this.createParser();s.on("error",n),s.stderr.on("error",a=>n(`Error finding processes: ${a.toString()}`)),s.stdout.pipe((0,h8.default)(/\r?\n/)).on("data",a=>{let u=o(a);u&&(r=e(u,r))}),s.on("close",(a,u)=>{a===0?i(r):u?n(new Error(`process terminated with signal: ${u}`)):a&&n(new Error(`process terminated with exit code: ${a}`))})})}};var op=class extends sp{constructor(r){super();this.fsUtils=r}async getWorkingDirectory(r){try{let{stdout:i}=await Xg("lsof",["-a","-dcwd","-Fn",`-p${r}`]),n=i.trim().split(`
`).pop().slice(1);return n&&(0,m8.isAbsolute)(n)&&await this.fsUtils.exists(n)?n:void 0}catch(i){if(i instanceof Cs)return;throw i}}createProcess(){return this.spawn("/bin/ps",["-xo",`pid=PID,ppid=PPID,comm=${"a".repeat(256)},command=COMMAND`])}createParser(){let r;return i=>{if(!r){r=i.indexOf("COMMAND");return}let n=/^\W*([0-9]+)\W*([0-9]+)\W*/.exec(i);if(n)return{pid:Number(n[1]),ppid:Number(n[2]),command:i.slice(n[0].length,r).trim(),args:i.slice(r).trim()}}}};var vb=class extends op{createProcess(){return this.spawn("/bin/ps",["-axo","pid=PID,ppid=PPID,comm:30,command=COMMAND"])}createParser(){let e=super.createParser();return r=>{let i=e(r);if(!i)return;let n=i.args.indexOf(i.command);if(n===-1)return i;for(n=n+i.command.length;n<i.args.length&&i.args[n]!==" ";)n++;return i.command=i.args.substr(0,n),i.args=i.args.substr(n+1),i}}};var H8=w("path");var _b=class extends sp{async getWorkingDirectory(){}createProcess(){let e=(0,H8.join)(process.env.WINDIR||"C:\\Windows","System32","wbem","WMIC.exe");return this.spawn(e,["process","get","CommandLine,CreationDate,ParentProcessId,ProcessId"])}createParser(){let e=/^(.*)\s+([0-9]+)\.[0-9]+[+-][0-9]+\s+([0-9]+)\s+([0-9]+)$/;return r=>{let i=e.exec(r.trim());if(!i||i.length!==5)return;let n=Number(i[4]),s=Number(i[3]),o=Number(i[2]),a=i[1].trim();if(!isNaN(n)&&!isNaN(s)&&a){let u=a;if(a[0]==='"'){let c=a.indexOf('"',1);c>0&&(u=a.substr(1,c-1),a=a.substr(c+2))}else{let c=a.indexOf(" ");c>0?(u=a.substr(0,c),a=a.substr(c+1)):a=""}return{pid:n,ppid:s,command:u,args:a,date:o}}}}};var g8=new Ui(y8.promises),b8=process.platform==="win32"?new _b:process.platform==="darwin"?new op(g8):new vb(g8);function v8(t){let e=/--inspect(-brk)?(=((\[[0-9a-fA-F:]*\]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9\.]*):)?(\d+))?/,r=/--inspect-port=(\d+)/,i,n,s=e.exec(t);return s&&s.length>=1&&(s.length>=5&&s[4]&&(i=s[4]),s.length>=6&&s[5]&&(n=parseInt(s[5]))),s=r.exec(t),s&&s.length===2&&(n=parseInt(s[1])),{address:i,port:n}}async function _8(t,e,r,i=xr){let n=await hle(t.pid,r);if(!n)return[];let s=[],o=n.children.slice();for(;o.length;){let a=o.pop();o=o.concat(a.children);let{port:u}=v8(a.args);u&&s.push(oE(`http://${t.hostname}:${u}`,i,r,!0).then(c=>ki.attach({ipcAddress:t.ipcAddress,scriptName:"Child Process",inspectorURL:c,waitForDebugger:!0,dynamicAttach:!0,pid:String(a.pid),openerId:e})).catch(c=>r.info("internal","Could not spawn WD for child process",{err:c,port:u,child:a})))}return(await Promise.all(s)).filter(a=>!!a)}async function hle(t,e){let r=new Map;r.set(0,{children:[],pid:0,ppid:0,command:"",args:""});try{await b8.lookup(({pid:n,ppid:s,command:o,args:a})=>(n!==s&&r.set(n,{pid:n,ppid:s,command:o,args:a,children:[]}),r),null)}catch(n){e.warn("internal","Error getting child process tree",n);return}let i=r.values();for(let n of i){let s=r.get(n.ppid);s&&s!==n&&s.children.push(n)}return!isNaN(t)&&t>0?r.get(t):r.get(0)}var w8=F(ue());var os=class{create(e){return e===!1?new yE:e===!0?new Cu({maxAttempts:1/0,delay:1e3}):new Cu({maxAttempts:e.maxAttempts??1/0,delay:e.delay??1e3})}};os=X([(0,w8.injectable)()],os);var Cu=class{constructor(e,r=0){this.options=e;this.attempt=r}get delay(){return this.options.delay}next(){return this.attempt===this.options.maxAttempts?void 0:new Cu(this.options,this.attempt+1)}reset(){return this.attempt?new Cu(this.options):this}},yE=class{constructor(){this.delay=-1}next(){}reset(){return this}};var ap=class extends Ha{constructor(r,i,n,s,o=new os){super(r,i,s,n);this.restarters=o}resolveParams(r){return r.type==="pwa-node"&&r.request==="attach"?r:void 0}async launchProgram(r){let i=async(s,o)=>{let a=this.program,u;try{r.params.websocketAddress?u=r.params.websocketAddress:u=await ql(`http://${r.params.address}:${r.params.port}`,o&&r.params.timeout>0?Jt.withTimeout(r.params.timeout).token:r.context.cancellationToken,this.logger)}catch(p){if(a&&a===o)return n(s,a,{killed:!1,code:1});throw p}let c=await ki.attach({ipcAddress:r.serverAddress,scriptName:"Remote Process",inspectorURL:u,remoteHostHeader:r.params.remoteHostHeader,waitForDebugger:!0,dynamicAttach:!0}),l=this.program=new ya(c);l.stopped.then(p=>n(s.reset(),l,p))},n=async(s,o,a)=>{if(this.program!==o)return;if(a.killed){this.onProgramTerminated(a);return}let u=s.next();if(!u){this.onProgramTerminated(a);return}r.context.dap.output({output:A8.t(`Lost connection to debugee, reconnecting in {0}ms\r
`,u.delay)});let c=new Lu;this.program=c;let l=await Promise.race([Me(u.delay),c.stopped]);this.program===c&&(l?this.onProgramTerminated(a):i(u,c))};return i(this.restarters.create(r.params.restart))}createLifecycle(r,i,n){if(n.openerId)return{};let s;return{initialized:async()=>{s=this.onFirstInitialize(r,i,n),await s},close:()=>{var o;this.targetList().length&&((o=this.program)==null||o.stop()),s==null||s.then(a=>a.dispose())}}}async onFirstInitialize(r,i,n){let s=new np;await s.startTouchLoop();let o=await this.resolveNodePath(i.params),[a]=await Promise.all([this.gatherTelemetryFromCdp(r,i),this.setEnvironmentVariables(r,i,s.path,n.targetId,o)]);return a&&i.params.attachExistingChildren&&_8({pid:a.processId,nodePath:o.path,hostname:i.params.address,ipcAddress:i.serverAddress},n.targetId,this.logger).catch(u=>this.logger.warn("internal","Error watching child processes",{err:u})),s}async setEnvironmentVariables(r,i,n,s,o){if(!i.params.autoAttachChildProcesses)return;if(!await bc(i.params.address)){this.logger.warn("runtime.target","Cannot attach to children of remote process");return}let a=await this.resolveEnvironment(i,o,{requireLease:n,openerId:s});for(let u=0;u<5;u++){let c=await r.Runtime.evaluate({contextId:1,returnByValue:!0,expression:`typeof process === 'undefined' || process.pid === undefined ? 'process not defined' : Object.assign(process.env, ${JSON.stringify(a.defined())})`+Ht()});if(!c){this.logger.error("runtime.target","Undefined result setting child environment vars");return}if(!c.exceptionDetails&&c.result.value!=="process not defined")return;this.logger.error("runtime.target","Error setting child environment vars",c),await Me(50)}}};ap=X([(0,Pu.injectable)(),x(0,(0,Pu.inject)(ma)),x(1,(0,Pu.inject)(pe)),x(2,(0,Pu.inject)(an)),x(3,(0,Pu.inject)(wi))],ap);var ci=F(ue()),lp=w("path");function Qd(t){return t instanceof Array?t:[t]}function I8(t){if(!t.runtimeArgs||t.attachSimplePort)return;let e=[];for(let r of t.runtimeArgs)/^--inspect-brk(=|$)/.test(r)?t.stopOnEntry=t.stopOnEntry||!0:e.push(r);t.runtimeArgs=e}var S8=w("os"),E8=F(w("path")),x8=w("crypto"),up=w("fs"),bE=class{constructor(){this.path=E8.join((0,S8.tmpdir)(),`node-debug-callback-${(0,x8.randomBytes)(8).toString("hex")}`);this.disposed=!1}read(e=bE.pollInterval){return this.readPromise?this.readPromise:(this.readPromise=new Promise((r,i)=>{let n=setInterval(()=>{if(this.disposed){clearInterval(n),r(void 0);return}if((0,up.existsSync)(this.path)){try{r(JSON.parse((0,up.readFileSync)(this.path,"utf-8")))}catch(s){i(s)}finally{this.dispose()}clearInterval(n)}},e)}),this.readPromise)}dispose(){if(!this.disposed){this.disposed=!0;try{(0,up.unlinkSync)(this.path)}catch{}}}},Zd=bE;Zd.pollInterval=200;var Du=F(w("path"));var eh=Symbol("IProgramLauncher"),wb=t=>{let e=t.program;if(e&&Du.isAbsolute(e)){let r=Du.relative(t.cwd,e);e=Du.isAbsolute(r)?r:`.${Du.sep}${r}`}return e?[...t.runtimeArgs,e,...Qd(t.args)]:[...t.runtimeArgs,...Qd(t.args)]};var mle=async(t,e)=>{if(typeof e.stopOnEntry=="string")return(0,lp.resolve)(e.cwd,e.stopOnEntry);if(e.program)return(0,lp.resolve)(e.cwd,e.program);for(let r of Qd(e.args)){if(r.startsWith("-"))continue;let i=(0,lp.resolve)(e.cwd,r);if(await t.exists(i))return i}},cp=class extends ns{constructor(r,i,n,s,o,a,u,c,l){super(r,i,l,c);this.bpPredictor=n;this.launchers=s;this.restarters=o;this.fsUtils=a;this.packageJson=u}resolveParams(r){let i;if(r.type==="pwa-node"&&r.request==="launch"?i={...r}:"server"in r&&r.server&&"program"in r.server&&(i={...r.server}),!!i)return I8(i),i}async launchProgram(r){r.params.program&&(r.params.program=await this.tryGetCompiledFile(r.params.program)),this.attachSimplePort=await this.getSimpleAttachPortIfAny(r.params);let i=async n=>{this.program&&this.program.stop();let s=await this.resolveNodePath(r.params,r.params.runtimeExecutable||void 0),o=s.warning;o&&r.context.dap.output({category:"stderr",output:o.message});let a=new Zd,u=await this.resolveEnvironment(r,s,{fileCallback:a.path});this.attachSimplePort?(r.params.attachSimplePort||r.context.dap.output({category:"stderr",output:"Using legacy attach mode for --inspect-brk in npm scripts. We recommend removing --inspect-brk, and using `stopOnEntry` in your launch.json if you need it."}),u=u.merge({NODE_OPTIONS:null})):u=Qq(s,u);let c={...r.params,env:u.value},l=this.launchers.find(f=>f.canLaunch(c));if(!l)throw new Error("Cannot find an appropriate launcher for the given set of options");let p=await l.launchProgram(s.path,c,r.context);if(this.attachSimplePort){let f=await ki.attach({ipcAddress:r.serverAddress,scriptName:"Remote Process",inspectorURL:await ql(`http://127.0.0.1:${this.attachSimplePort}`,r.context.cancellationToken,this.logger),waitForDebugger:!0,dynamicAttach:!0});p=new gb(p,new ya(f))}else a.read().then(f=>{f&&p.gotTelemetery(f)});this.program=p,p.stopped.then(async f=>{if(a.dispose(),this.program!==p)return;if(f.killed||f.code===0){this.onProgramTerminated(f);return}let H=n.next();if(!H){this.onProgramTerminated(f);return}await Me(H.delay),this.program===p&&i(H)})};return i(this.restarters.create(r.params.restart))}async getSimpleAttachPortIfAny(r){var s,o;if(r.attachSimplePort)return r.attachSimplePort;let i=e8(r.runtimeExecutable,r.runtimeArgs);if(!i)return;let n=await this.packageJson.getContents();if((o=(s=n==null?void 0:n.scripts)==null?void 0:s[i])!=null&&o.includes("--inspect-brk"))return r.port??9229}createLifecycle(r,i,{targetId:n}){return{initialized:async()=>{if(this.attachSimplePort&&await this.gatherTelemetryFromCdp(r,i),!i.params.stopOnEntry)return;let s=await mle(this.fsUtils,i.params);if(!s){this.logger.warn("runtime","Could not resolve program entrypointfrom args");return}let o="(?:entryBreakpoint){0}",a=We(s),u=Fr(a)+o,c=await r.Debugger.setBreakpointByUrl({urlRegex:u,lineNumber:0,columnNumber:0});return c!=null&&c.breakpointId?{cdpId:c==null?void 0:c.breakpointId,path:a}:void 0},close:()=>{let s=Number(n);if(s>0)try{process.kill(s)}catch{}}}}async tryGetCompiledFile(r){r=wt(r);let i=(0,lp.extname)(r);if(!i||i===".js")return r;let n=await this.bpPredictor.getPredictionForSource(r);if(!n||n.size===0)return r;let s=n.values().next().value;return s?(this.logger.info("runtime.launch","Updating entrypoint to compiled file",{from:r,to:s.compiledPath,candidates:n.size}),s.compiledPath):r}};cp=X([(0,ci.injectable)(),x(0,(0,ci.inject)(ma)),x(1,(0,ci.inject)(pe)),x(2,(0,ci.inject)(Fa)),x(3,(0,ci.multiInject)(eh)),x(4,(0,ci.inject)(os)),x(5,(0,ci.inject)(Or)),x(6,(0,ci.inject)(Eu)),x(7,(0,ci.inject)(an)),x(8,(0,ci.inject)(wi))],cp);var fp=F(w("fs")),L8=w("fs"),Ab=F(ue()),C8=F(w("os")),Tr=F(w("path"));var P8=Symbol("INvmResolver");var pp=class{constructor(e=new Ui(L8.promises),r=process.env,i=process.arch,n=process.platform,s=C8.homedir()){this.fsUtils=e;this.env=r;this.arch=i;this.platform=n;this.homedir=s}async resolveNvmVersionPath(e){let r=this.env["NVS_HOME"];if(!r){let o=this.platform==="win32"?Tr.join(this.env.LOCALAPPDATA||"","nvs"):Tr.join(this.env.HOME||"",".nvs");fp.existsSync(o)&&(r=o)}let i,n=[],s=this.parseVersionString(e);if(s.nvsFormat||r){if(i=await this.resolveNvs(r,s),!i&&s.nvsFormat)throw new re(l_(e,"nvs"));n.push("nvs")}if(!i)if(this.platform==="win32")this.env["NVM_HOME"]&&(i=await this.resolveWindowsNvm(e),n.push("nvm-windows"));else{let o=this.env["NVM_DIR"]||Tr.join(this.homedir,".nvm");await this.fsUtils.exists(o)&&(i=await this.resolveUnixNvm(e),n.push("nvm"))}if(!n.length)throw new re(c_());if(!i||!await this.fsUtils.exists(i))throw new re(l_(e,n.join("/")));return{directory:i,binary:await this.getBinaryInFolder(i)}}async getBinaryInFolder(e){return await Bu(["node64.exe","node64"].map(r=>this.fsUtils.exists(Tr.join(e,r))))?"node64":"node"}async resolveNvs(e,{remoteName:r,semanticVersion:i,arch:n}){if(!e)throw new re(rD());let s=this.findBinFolderForVersion(Tr.join(e,r),i,o=>fp.existsSync(Tr.join(o,n)));if(s)return this.platform!=="win32"?Tr.join(s,n,"bin"):Tr.join(s,n)}async resolveUnixNvm(e){let r=this.env["NVM_DIR"];if(!r){let n=Tr.join(this.env.HOME||"",".nvm");await this.fsUtils.exists(n)&&(r=n)}if(!r)throw new re(c_());let i=this.findBinFolderForVersion(Tr.join(r,"versions","node"),`v${e}`);return i?Tr.join(i,"bin"):void 0}async resolveWindowsNvm(e){let r=this.env["NVM_HOME"];if(!r)throw new re(iD());return this.findBinFolderForVersion(r,`v${e}`)}findBinFolderForVersion(e,r,i){if(!fp.existsSync(e))return;let n=fp.readdirSync(e);if(n.includes(r))return Tr.join(e,r);let s=n.filter(o=>o.startsWith(`${r}.`)).sort(Hle).filter(o=>i?i(Tr.join(e,o)):!0).pop();return s?Tr.join(e,s):void 0}parseVersionString(e){let i=/^(([\w-]+)\/)?(v?(\d+(\.\d+(\.\d+)?)?))(\/((x86)|(32)|((x)?64)|(arm\w*)|(ppc\w*)))?$/i.exec(e);if(!i)throw new Error("Invalid version string: "+e);let n=!!(i[2]||i[8]),s=i[2]||"node",o=i[4]||"",a=gle(i[8]||this.arch);return{nvsFormat:n,remoteName:s,semanticVersion:o,arch:a}}};pp=X([(0,Ab.injectable)(),x(0,(0,Ab.inject)(Or))],pp);var Hle=(t,e)=>{let r=/([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(t),i=/([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(e);if(!r||!i)return(i?-1:0)+(r?1:0);let[,n,s,o]=r,[,a,u,c]=i;return Number(n)-Number(a)||Number(s)-Number(u)||Number(o)-Number(c)};function gle(t){switch(t){case"32":case"x86":case"ia32":return"x86";case"64":case"x64":case"amd64":return"x64";case"arm":let e=process.config.variables.arm_version;return e?"armv"+e+"l":"arm";default:return t}}var D8=w("child_process"),Ib=F(ue()),T8=F(zy());var dp=class{constructor(e){this.logger=e}canLaunch(e){return e.console==="internalConsole"}async launchProgram(e,r,i){let{executable:n,args:s,shell:o,cwd:a}=yle(e,wb(r),r.cwd);i.dap.output({category:"console",output:[n,...s].join(" ")+`
`});let u=(0,D8.spawn)(n,s,{shell:o,cwd:a,env:xt.merge(xt.processEnv(),r.env).defined()});return r.outputCapture==="console"?this.discardStdio(i.dap,u):this.captureStdio(i.dap,u),new yb(u,this.logger,r.killBehavior)}captureStdio(e,r){r.stdout.pipe(hp.stream()).on("data",i=>e.output({category:"stdout",output:i})).resume(),r.stderr.pipe(hp.stream()).on("data",i=>e.output({category:"stderr",output:i})).resume()}discardStdio(e,r){let i=[],n=()=>{i&&e.output({category:"stderr",output:Buffer.concat(i).toString()})},s=Buffer.from("Debugger attached."),o=a=>{a.includes(s)?(i=void 0,r.stderr.removeListener("data",o)):i&&i.push(a)};r.stderr.on("data",o),r.on("error",a=>{n(),e.output({category:"stderr",output:a.stack||a.message})}),r.on("exit",a=>{a!==null&&a>0&&(n(),e.output({category:"stderr",output:`Process exited with code ${a}\r
`}))}),r.stdout.resume(),r.stderr.resume()}};dp=X([(0,Ib.injectable)(),x(0,(0,Ib.inject)(pe))],dp);var yle=(t,e,r)=>{if(process.platform==="win32"&&(t=Gi(t),r=Gi(r),t.endsWith(".ps1")&&(e=["-File",t,...e],t="powershell.exe")),process.platform!=="win32"||!t.includes(" "))return{executable:t,args:e,shell:!1,cwd:r};let i=!1,n=[];for(let s of e)s.includes(" ")?(n.push(`"${s}"`),i=!0):n.push(s);return i?{executable:`"${t}"`,args:n,shell:!0,cwd:r}:{executable:t,args:e,shell:!1,cwd:r}};var hp=class{constructor(){this.etxSpotted=!1}static stream(){return(0,T8.default)(new hp,void 0,void 0)}[Symbol.split](e){this.etxSpotted||=e.includes("");let r=e.split(this.etxSpotted?"":`
`);return r.length>1?r.map((i,n)=>n<r.length-1?`${i}
`:i):r}};var Sb=F(ue());var mp=class{constructor(e){this.logger=e}canLaunch(e){return e.internalConsoleOptions,e.console!=="internalConsole"}async launchProgram(e,r,i){let n={kind:r.console==="integratedTerminal"?"integrated":"external",title:r.name,cwd:r.cwd,args:[e,...wb(r)],env:ku(r.env),argsCanBeInterpretedByShell:!Array.isArray(r.args)},s;try{s=await this.sendLaunchRequest(n,i)}catch(o){throw new re(nD(o.message))}return new ga(s,this.logger,r.killBehavior)}sendLaunchRequest(e,r){return r.dap.runInTerminalRequest(e)}};mp=X([(0,Sb.injectable)(),x(0,(0,Sb.inject)(pe))],mp);var $8=F(ue());var Hp=class{getTreatment(e,r){return Promise.resolve(r)}};Hp=X([(0,$8.injectable)()],Hp);var M8=F(ue());var Tu=class{constructor(){this.flushEmitter=new J;this.onFlush=this.flushEmitter.event}report(){}reportOperation(){}attachDap(){}flush(){this.flushEmitter.fire()}dispose(){}};Tu=X([(0,M8.injectable)()],Tu);var k8=t=>{},R8=t=>{};var N8=(t,e,r,i)=>{let n=new Lb.Container;return n.parent=t,n.bind(Fe).toConstantValue(e.launchConfig),n.bind(wc).toConstantValue(n),n.bind(di).toConstantValue(r),n.bind(gt).toConstantValue(i),n.bind(Mo).toConstantValue(e),n.bind(Gq).toConstantValue(e.targetOrigin()),n.bind(La).to(au).inSingletonScope(),n.bind(rH).to(Mc).inSingletonScope(),n.bind(wo).toSelf().inSingletonScope(),e.sourcePathResolver&&n.bind(et).toConstantValue(e.sourcePathResolver),n.bind(eu).toSelf(),n.bind(zH).toDynamicValue(s=>s.container.get(eu).create()).inSingletonScope(),e.parent()&&(n.bind(Fa).to(Ba).inSingletonScope(),n.bind(On).to(Pc).inSingletonScope()),n.bind(Er).to(process.env.DA_TEST_DISABLE_TELEMETRY?Tu:kn).inSingletonScope().onActivation(Nt),n.bind(vi).toSelf().inSingletonScope(),n.bind(zt).toSelf().inSingletonScope(),n.bind(ko).toSelf().inSingletonScope(),n.bind(Ho).to(Xn).inSingletonScope(),n.bind(To).toSelf().inSingletonScope(),n.bind(il).to(rl).inSingletonScope(),n.bind(SH).to(zc).inSingletonScope(),n.bind(gi).to(Dc).inSingletonScope(),n.bind(VH).to(al).inSingletonScope(),n.bind(vo).to(Sc).inSingletonScope(),n.bind(Qt).toSelf(),n.bind(ii).toSelf(),n.bind(ni).toSelf(),n.bind(ZH).to(ws).inSingletonScope(),n.bind(eg).to(sl).inSingletonScope(),n.bind(IH).to(Kc).inSingletonScope().onActivation(Nt),n},B8=t=>{let e=new Lb.Container;e.parent=t,e.bind(wc).toConstantValue(e),e.bind(pe).to(Li).inSingletonScope().onActivation(Nt),e.bind(No).toSelf().inSingletonScope(),e.bind(La).to(au).inSingletonScope(),e.bind(Er).to(process.env.DA_TEST_DISABLE_TELEMETRY?Tu:kn).inSingletonScope().onActivation(Nt),e.bind(Rn).to(Rn).inSingletonScope(),e.bind(Hs).to(Hs).inSingletonScope(),e.bind(_l).to(vl).inSingletonScope(),e.bind(Ym).toDynamicValue(i=>na.createOrFallback(i.container.get(pe))).inSingletonScope(),e.bind(xc).to(jl).inSingletonScope(),e.bind(ma).to(tp),e.bind(rs).toSelf().inSingletonScope().onActivation(Nt),e.bind(os).toSelf(),e.bind(Cr).to(un).onActivation(Nt),e.bind(Cr).to(rp).onActivation(Nt),e.bind(Cr).to(ip).onActivation(Nt),e.bind(Cr).to(cp).onActivation(Nt),e.bind(eh).to(dp),e.bind(eh).to(mp),e.bind(Eu).to(ep).inSingletonScope(),R8(e),e.bind(Cr).to(ap).onActivation(Nt),e.bind(Au).toSelf().inSingletonScope().onActivation(Nt),e.bind(Cr).toService(Au),e.bind(Cr).to(Vl).inSingletonScope().onActivation(Nt),e.bind(Cr).to(Kl).inSingletonScope().onActivation(Nt),e.bind(Cr).to(Gl).inSingletonScope().onActivation(Nt),e.bind(Cr).to(Xl).inSingletonScope().onActivation(Nt),e.bind(Cr).to($i).onActivation(Nt),e.bind(Cr).toDynamicValue(()=>t.get(Su).createLauncher(e.get(pe))).inSingletonScope();let r=i=>n=>new i(n.container.get(W_),n.container.get(nt),n.container.get(af));return e.bind(ka).toDynamicValue(r(xb.ChromeBrowserFinder)).inSingletonScope().whenTargetTagged("browser","chrome"),e.bind(ka).toDynamicValue(r(xb.EdgeBrowserFinder)).inSingletonScope().whenTargetTagged("browser","edge"),e},F8=t=>{let e=new Lb.Container;return e.bind(wc).toConstantValue(e),e.bind(Su).toSelf().inSingletonScope(),e.bind(Yl).toSelf().inSingletonScope(),e.bind(dH).to(Hp).inSingletonScope(),e.bind(BT).toConstantValue(new zn),e.bind(yF).to(Il).inSingletonScope(),e.bind(Mn).toConstantValue(t.storagePath),e.bind(Ac).toConstantValue(t.isVsCode),e.bind(P8).to(pp),e.bind(wi).to(Gc).inSingletonScope(),e.bind(W_).toConstantValue(process.env),e.bind(af).toConstantValue(O8.default),e.bind(nt).toConstantValue(Eb.promises),e.bind(Or).toConstantValue(new Ui(Eb.promises)),e.bind(Ma).toConstantValue(t.isRemote?"remote":"local"),t.context&&e.bind(NT).toConstantValue(t.context),k8(e),e},U8=(t,e,r)=>{t.bind(Bf).toConstantValue(Zk(e)),t.bind(Fe).toService(Bf),t.bind(an).to(Ql).inSingletonScope(),t.bind(uc).toConstantValue(r),t.bind(et).toDynamicValue(i=>i.container.get(an).create(e,i.container.get(pe))).inSingletonScope(),t.bind(Or).toConstantValue(tm.create(e.__remoteFilePrefix,Eb.promises,r)),t.bind(ms).to(ho).inSingletonScope().onActivation(Nt),t.bind(bo).to(Ic).inSingletonScope(),t.bind(ht).toSelf().inSingletonScope().onActivation(Nt),t.bind(Na).toSelf().inSingletonScope(),t.bind(Fa).to(Ba).inSingletonScope(),t.bind(On).to(Cc).inSingletonScope()};var Cb=F(w("path"));function q8(t,e,r){let i=j8(t,e,"uncaughtException",r),n=j8(t,e,"unhandledRejection",r);return process.addListener("uncaughtException",i),process.addListener("unhandledRejection",n),{dispose:()=>{process.removeListener("uncaughtException",i),process.removeListener("unhandledRejection",n)}}}var j8=(t,e,r,i=!0)=>n=>{_le(n)&&(e.report("error",{"!error":n,error:i?void 0:n,exceptionType:r}),t.error("runtime.exception","Unhandled error in debug adapter",n))},ble=t=>typeof t=="object"&&!!t&&"stack"in t,vle=Cb.dirname(Cb.dirname(Cb.dirname(__dirname)));function _le(t){var e;return!W8||ble(t)&&!!((e=t.stack)!=null&&e.includes(vle))}var W8=!1;function V8(){W8=!0}var Pb=class{constructor(e,r,i,n){this._delegate=e;this._rootServices=i;this._disposables=new Je;this._serviceTree=new WeakMap;this._root=new ba(void 0);this.getLaunchers=Be(()=>{let e=new Set(this._rootServices.getAll(Cr));for(let r of e)this._disposables.push(r.onTargetListChanged(()=>{let i=this.targetList();this._attachToNewTargets(i,r),this._terminateOrphanThreads(i)}));return e});this._dap=r.dap(),this._targetOrigin=n,this._disposables.callback(()=>Vm(i)),this._disposables.push(q8(i.get(pe),i.get(Er),i.get(Ac))),r.attachTelemetry(i.get(Er));let s=this._dap,o=0,a;s.on("initialize",async u=>{this._rootServices.bind(dr).toConstantValue(u);let c=As.capabilities();return u.clientID==="vscode"&&V8(),setTimeout(()=>s.initialized({}),0),c}),s.on("setExceptionBreakpoints",async()=>({})),s.on("setBreakpoints",async u=>{var c,l;return(c=u.breakpoints)!=null&&c.length&&i.get(ht).notifyHadBreakpoint(),{breakpoints:((l=u.breakpoints)==null?void 0:l.map(()=>({id:++o,verified:!1,message:G8.t("Unbound breakpoint")})))??[]}}),s.on("configurationDone",async()=>({})),s.on("threads",async()=>({threads:[]})),s.on("loadedSources",async()=>({sources:[]})),s.on("breakpointLocations",()=>Promise.resolve({breakpoints:[]})),s.on("attach",async u=>(await this.boot(u,s),{})),s.on("launch",async u=>(await this.boot(u,s),{})),s.on("pause",async()=>({})),s.on("terminate",()=>this._terminateRoot()),s.on("disconnect",()=>this._disconnectRoot()),s.on("restart",async({arguments:u})=>(await this._restart(u),{})),s.on("startSelfProfile",async({file:u})=>(a==null||a.dispose(),a=new tg(u),await a.start(),{})),s.on("stopSelfProfile",async()=>(a&&(await a.stop(),a.dispose(),a=void 0),{}))}async _terminateRoot(){return this._root.state=1,await Promise.all([...this.getLaunchers()].map(e=>e.terminate())),await this._root.waitUntilChildrenAre(2),this._root.state=2,{}}async _disconnectRoot(){return this._root.state<1&&await this._terminateRoot(),this._rootServices.get(Er).flush(),await this._root.waitUntilChildrenAre(3),this._root.state=3,{}}async boot(e,r){return this._boot(_c(e,this._rootServices.get(Ma)),r)}async _boot(e,r){wle(r),this.reportBootTelemetry(e),U8(this._rootServices,e,r),this._rootServices.get(pe).setup(qE(r,e.trace));let i=e.timeout>0?Jt.withTimeout(e.timeout):new Jt;e.rootPath&&(e.rootPath=Gi(e.rootPath)),this._launchParams=e;let n=await Promise.all([...this.getLaunchers()].map(s=>this._launch(s,e,i.token)));return Promise.all(n.map(s=>s.terminated)).then(s=>{let o=s.find(vt);this._markTargetAsTerminated(this._root,{restart:!!(o!=null&&o.restart)})}),{}}reportBootTelemetry(e){let r=_c({type:e.type,request:e.request,name:"<string>",__workspaceFolder:"<workspace>"}),i=(n,s)=>typeof n=="string"?s&&r[s]===n?n:"<string>":n instanceof Array?n.map(o=>i(o)):n&&typeof n=="object"?as(n,o=>i(o)):n;this._rootServices.get(Er).report("launch",{type:e.type,request:e.request,os:`${Db.platform()} ${Db.arch()}`,nodeVersion:process.version,adapterVersion:of,parameters:as(e,i)})}async _restart(e){let r;if(e){let i=this._rootServices.get(Bf);r=_c({__workspaceFolder:i.__workspaceFolder,...e},this._rootServices.get(Ma)),i.update(r)}await Promise.all([...this.getLaunchers()].map(i=>i.restart(r)))}async _launch(e,r,i){return(await this.captureLaunch(e,r,i)).blockSessionTermination?{terminated:new Promise(s=>{let o=this._disposables.push(e.onTerminated(a=>{o.dispose(),s(a)}))})}:{terminated:Promise.resolve(void 0)}}async captureLaunch(e,r,i){let n=e.constructor.name,s;try{s=await e.launch(r,{telemetryReporter:this._rootServices.get(Er),cancellationToken:i,targetOrigin:this._targetOrigin,dap:this._dap})}catch(o){throw this._rootServices.get(pe).warn("runtime.launch","Launch returned error",{error:o,wasCancelled:i.isCancellationRequested,name:n}),o}return s.blockSessionTermination&&this._rootServices.get(pe).info("runtime.launch","Launched successfully",{name:n}),s}dispose(){this._disposables.dispose(),this._terminateOrphanThreads([])}targetList(){let e=[];for(let r of this.getLaunchers())e.push(...r.targetList());return e}async attach(e,r){if(!this._launchParams)throw new Error("Cannot launch before params have been set");let i=e.value;if(!i.canAttach())return;let n=await i.attach();if(!n)return;let s=await this._delegate.acquireDap(i),o=s.dap(),a=this._launchParams;this._asyncStackPolicy||(this._asyncStackPolicy=Jk(a.showAsyncStacks));let u=i.parent(),c=u&&this._serviceTree.get(u)||this._rootServices,l=N8(c,i,o,n);s.attachTelemetry(l.get(Er)),this._serviceTree.set(i,c);let p=new As(o,this._asyncStackPolicy,a,l),f=p.createThread(n,i),H=async()=>(await p.launchBlocker(),i.runIfWaitingForDebugger(),e.threadData.resolve({thread:f,debugAdapter:p}),{});o.on("disconnect",m=>this._disconnectTarget(e,m)),o.on("terminate",()=>this._terminateTarget(e)),o.on("restart",async()=>(i.canRestart()?i.restart():await this._restart(),Promise.resolve({}))),await this._delegate.initAdapter(p,i,r)?H():(o.on("attach",H),o.on("launch",H)),await i.afterBind()}_attachToNewTargets(e,r){for(let i of e.values()){if(!i.waitingForDebugger()||ba.targetNodes.has(i))continue;let n=i.parent(),s=n?ba.targetNodes.get(n):this._root;if(!s)throw new Error(`Got target with unknown parent: ${i.name()}`);let o=new ba(i);s.add(o),this.attach(o,r)}}async _terminateOrphanThreads(e,r){let i=[...this._root.all()].filter(n=>!e.includes(n.value));return Promise.all(i.map(n=>this._markTargetAsTerminated(n,r)))}async _markTargetAsTerminated(e,r={}){if(e.state>=1)return await e.waitUntil(2),{};if(e.state=1,K8(e)){let i=await e.threadData.promise;await i.thread.dispose(),i.debugAdapter.dap.terminated(r),i.debugAdapter.dispose()}else this._dap.terminated(r);return await e.waitUntilChildrenAre(2),e.state=2,{}}async _terminateTarget(e){return e.state>=3?{}:(e.value.canStop()?e.value.stop():this._terminateRoot(),await e.waitUntil(2),{})}async _disconnectTarget(e,r){if(e.state>=3)return{};e.state<1&&(r.terminateDebuggee===!1&&e.value.canDetach()?await e.value.detach():e.value.canStop()?e.value.stop():this._terminateRoot()),await e.waitUntil(2),await e.waitUntilChildrenAre(3),e.state=3,queueMicrotask(()=>this._delegate.releaseDap(e.value));let i=e.value.parent(),n=i?ba.targetNodes.get(i):this._root;return n==null||n.remove(e),{}}};function wle(t){OT&&t.output({category:"console",output:`Note: Using the "preview" debug extension
`})}var K8=t=>!!t.value,vE=class{constructor(e){this.value=e;this.threadData=Xe();this._state=0;this._children=new Set;this._stateChangeEmitter=new J;e&&vE.targetNodes.set(e,this)}get state(){return this._state}set state(e){e>this._state&&(this._state=e,this._stateChangeEmitter.fire(e))}add(e){this._children.add(e)}remove(e){this._children.delete(e)}async waitUntil(e){return this._state>=e?Promise.resolve():new Promise(r=>{let i=this._stateChangeEmitter.event(n=>{n>=e&&(i.dispose(),r())})})}async waitUntilChildrenAre(e){await Promise.all([...this._children].map(r=>r.waitUntil(e)))}*all(){K8(this)&&(yield this);for(let e of this._children)yield*e.all()}},ba=vE;ba.targetNodes=new WeakMap;var X8=`\r
\r
`,Ale=0,Tb=class{constructor(e,r,i){this.inputStream=e;this.outputStream=r;this._contentLength=-1;this._connectionId=Ale++;this.msgEmitter=new J;this.messageReceived=this.msgEmitter.event;this.endedEmitter=new J;this.closed=this.endedEmitter.event;this._handleData=e=>{var i;let r=new Lr;for(this._rawData=Buffer.concat([this._rawData,e]);;){if(this._contentLength>=0){if(this._rawData.length>=this._contentLength){let n=this._rawData.toString("utf8",0,this._contentLength);if(this._rawData=this._rawData.slice(this._contentLength),this._contentLength=-1,n.length>0)try{let s=JSON.parse(n);(i=this.logger)==null||i.verbose("dap.receive",void 0,{connectionId:this._connectionId,message:s}),this.msgEmitter.fire({message:s,receivedTime:r})}catch(s){console.error("Error handling data: "+(s&&s.message))}continue}}else{let n=this._rawData.indexOf(X8);if(n!==-1){let o=this._rawData.toString("utf8",0,n).split(`\r
`);for(let a=0;a<o.length;a++){let u=o[a].split(/: +/);u[0]==="Content-Length"&&(this._contentLength=+u[1])}this._rawData=this._rawData.slice(n+X8.length);continue}}break}};this.logger=i,this._rawData=Buffer.alloc(0),e.on("end",()=>this.endedEmitter.fire()),e.on("data",this._handleData)}send(e,r=!0,i){var o,a;let n=JSON.stringify(e);if(r){let u=e;e.type==="response"&&e.command==="source"&&(u={...e,body:{...e.body,content:"<script source>"}}),(o=this.logger)==null||o.verbose("dap.send",void 0,{connectionId:this._connectionId,message:u})}let s=`Content-Length: ${Buffer.byteLength(n,"utf8")}\r
\r
${n}`;if(this.outputStream.destroyed){(a=this.logger)==null||a.warn("dap.send","Message not sent. Connection was closed."),i==null||i();return}this.outputStream.write(s,"utf8",u=>{var c;i==null||i(),u&&(console.log(e),(c=this.logger)==null||c.error("dap.send","Error while writing to output stream",u),this.close())})}close(){this.inputStream.destroy(),this.outputStream.destroy()}setLogger(e){return this.logger=e,this}};process.env.L10N_FSPATH_TO_BUNDLE&&$b.config({fsPath:process.env.L10N_FSPATH_TO_BUNDLE});var Ile=J8.mkdtempSync(Mb.join(Q8.tmpdir(),"vscode-js-debug-"));function Sle(t){let e,r=[],i=new Set,n=Xe(),s=0,o;return t.on("setBreakpoints",async a=>{var l;let u=((l=a.breakpoints)==null?void 0:l.map(()=>++s))??[];return r.push({params:a,ids:u}),{breakpoints:u.map(p=>({id:p,verified:!1,message:$b.t("breakpoint.provisionalBreakpoint","Unbound breakpoint")}))}}),t.on("setExceptionBreakpoints",async a=>(e=a,{})),t.on("enableCustomBreakpoints",async a=>{for(let u of a.ids)i.add(u);return{}}),t.on("disableCustomBreakpoints",async a=>{for(let u of a.ids)i.delete(u);return{}}),t.on("configurationDone",async()=>(n.resolve(),{})),t.on("threads",async()=>({threads:[]})),t.on("loadedSources",async()=>({sources:[]})),t.on("initialize",async a=>(o=a,setTimeout(()=>t.initialized({}),0),As.capabilities())),new Promise(a=>{let u=async c=>{await n.promise;let l=Xe();if(!o)throw new Error("cannot call launch/attach before initialize");return a({initializeParams:o,setExceptionBreakpointsParams:e,setBreakpointsParams:r,customBreakpoints:i,launchParams:c,deferred:l}),l.promise};t.on("launch",c=>u(c)),t.on("attach",u)})}var wE=class{constructor(e,r){this.dapRoot=e;this.services=r;this.sessions=new Map}async acquireDap(e){var o;let r=this.sessions.get(e.id());if(r){let{connection:a}=await r.promise;return a}let i=e.parent(),n;if(i){let a=(o=this.sessions.get(i.id()))==null?void 0:o.settledValue;if(!a)throw new Error("Expected parent session to have a settled value");n=a.connection.dap()}else n=this.dapRoot;let s=Xe();return this.sessions.set(e.id(),s),n.startDebuggingRequest({request:e.launchConfig.request,configuration:{type:e.launchConfig.type,name:e.name(),__pendingTargetId:e.id()}}).catch(a=>s.reject(a)),s.promise.then(a=>a.connection)}async initAdapter(e,r){var n;let i=(n=this.sessions.get(r.id()))==null?void 0:n.settledValue;if(!i)throw new Error(`Expected to find pending init for target ${r.id()}`);i.setExceptionBreakpointsParams&&await e.setExceptionBreakpoints(i.setExceptionBreakpointsParams);for(let{params:s,ids:o}of i.setBreakpointsParams)await e.breakpointManager.setBreakpoints(s,o);return await e.enableCustomBreakpoints({ids:Array.from(i.customBreakpoints)}),await e.onInitialize(i.initializeParams),await e.configurationDone(),await e.launchBlocker(),i.deferred.resolve({}),!0}releaseDap(e){this.sessions.delete(e.id())}hasPendingTarget(e){var r;return((r=this.sessions.get(e))==null?void 0:r.hasSettled())===!1}handleConnection(e){if(!("__pendingTargetId"in e.launchParams)||!e.launchParams.__pendingTargetId)throw new Error("Incoming session is missing __pendingTargetId");let r=e.launchParams.__pendingTargetId,i=this.sessions.get(r);if(!i)throw new Error(`__pendingTargetId ${r} not found`);i.resolve(e)}};function z8(t){let e=F8({storagePath:Ile,isVsCode:!1}),r=new Set,i=Y8.createServer(async n=>{try{let s=new ha,o=new Tb(n,n,s),a=new jp(o,s),u=a.dap(),c=await Sle(u);if("__pendingTargetId"in c.launchParams){let l=c.launchParams.__pendingTargetId,p=l&&[...r].find(f=>f.hasPendingTarget(l));if(!p)throw new Error(`Cannot find pending target for ${l}`);s.connectTo(p.services.get(pe)),p.handleConnection({...c,connection:a})}else{let l=B8(e),p=new wE(u,l);r.add(p),l.bind(dr).toConstantValue(c.initializeParams),s.connectTo(l.get(pe));let f=new Pb(p,a,l,new lb("targetOrigin"));o.closed(()=>{f.dispose(),r.delete(p)}),c.deferred.resolve(await f.boot(c.launchParams,u))}}catch(s){return console.error(s),n.destroy()}}).on("error",n=>{console.error(n),process.exit(1)}).listen(t,()=>{let n=i.address();console.log(`Debug server listening at ${typeof n=="string"?n:`${n.address}:${n.port}`}`)})}var[,Ele,_E="8123",xle="localhost"]=process.argv;process.argv.includes("--help")?console.log(`Usage: ${Mb.basename(Ele)} [port|socket path=8123] [host=localhost]`):isNaN(Number(_E))?z8({path:_E}):z8({port:Number(_E),host:xle});})();
/*! Bundled license information:

is-number/index.js:
  (*!
   * is-number <https://github.com/jonschlinkert/is-number>
   *
   * Copyright (c) 2014-present, Jon Schlinkert.
   * Released under the MIT License.
   *)

to-regex-range/index.js:
  (*!
   * to-regex-range <https://github.com/micromatch/to-regex-range>
   *
   * Copyright (c) 2015-present, Jon Schlinkert.
   * Released under the MIT License.
   *)

fill-range/index.js:
  (*!
   * fill-range <https://github.com/jonschlinkert/fill-range>
   *
   * Copyright (c) 2014-present, Jon Schlinkert.
   * Licensed under the MIT License.
   *)

object-assign/index.js:
  (*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  *)

safe-buffer/index.js:
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)

is-extglob/index.js:
  (*!
   * is-extglob <https://github.com/jonschlinkert/is-extglob>
   *
   * Copyright (c) 2014-2016, Jon Schlinkert.
   * Licensed under the MIT License.
   *)

is-glob/index.js:
  (*!
   * is-glob <https://github.com/jonschlinkert/is-glob>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)

is-windows/index.js:
  (*!
   * is-windows <https://github.com/jonschlinkert/is-windows>
   *
   * Copyright © 2015-2018, Jon Schlinkert.
   * Released under the MIT License.
   *)

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.
  ***************************************************************************** *)
*/
